var Uae=Object.defineProperty;var qae=(t,e,n)=>e in t?Uae(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Yae=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var JE=(t,e,n)=>(qae(t,typeof e!="symbol"?e+"":e,n),n);var bat=Yae((ks,Ps)=>{const Xae=function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}};Xae();function PM(t,e){const n=Object.create(null),r=t.split(",");for(let i=0;i!!n[i.toLowerCase()]:i=>!!n[i]}function mt(t){if(ut(t)){const e={};for(let n=0;n{if(n){const r=n.split(Gae);r.length>1&&(e[r[0].trim()]=r[1].trim())}}),e}function j(t){let e="";if(At(t))e=t;else if(ut(t))for(let n=0;njg(n,e))}const je=t=>At(t)?t:t==null?"":ut(t)||sn(t)&&(t.toString===Kj||!$t(t.toString))?JSON.stringify(t,Gj,2):String(t),Gj=(t,e)=>e&&e.__v_isRef?Gj(t,e.value):xg(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[r,i])=>(n[`${r} =>`]=i,n),{})}:nx(e)?{[`Set(${e.size})`]:[...e.values()]}:sn(e)&&!ut(e)&&!tw(e)?String(e):e,yi={},Sg=[],yr=()=>{},rse=()=>!1,ise=/^on[^a-z]/,tx=t=>ise.test(t),AM=t=>t.startsWith("onUpdate:"),yo=Object.assign,MM=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},ose=Object.prototype.hasOwnProperty,Dn=(t,e)=>ose.call(t,e),ut=Array.isArray,xg=t=>cb(t)==="[object Map]",nx=t=>cb(t)==="[object Set]",af=t=>cb(t)==="[object Date]",$t=t=>typeof t=="function",At=t=>typeof t=="string",Ky=t=>typeof t=="symbol",sn=t=>t!==null&&typeof t=="object",Jy=t=>sn(t)&&$t(t.then)&&$t(t.catch),Kj=Object.prototype.toString,cb=t=>Kj.call(t),u1=t=>cb(t).slice(8,-1),tw=t=>cb(t)==="[object Object]",RM=t=>At(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,c1=PM(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),rx=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ase=/-(\w)/g,gl=rx(t=>t.replace(ase,(e,n)=>n?n.toUpperCase():"")),sse=/\B([A-Z])/g,Mf=rx(t=>t.replace(sse,"-$1").toLowerCase()),db=rx(t=>t.charAt(0).toUpperCase()+t.slice(1)),gy=rx(t=>t?`on${db(t)}`:""),e0=(t,e)=>!Object.is(t,e),d1=(t,e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},Q2=t=>{const e=parseFloat(t);return isNaN(e)?t:e},lse=t=>{const e=At(t)?Number(t):NaN;return isNaN(e)?t:e};let m3;const use=()=>m3||(m3=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let ws;class Jj{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ws,!e&&ws&&(this.index=(ws.scopes||(ws.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=ws;try{return ws=this,e()}finally{ws=n}}}on(){ws=this}off(){ws=this.parent}stop(e){if(this._active){let n,r;for(n=0,r=this.effects.length;n{const e=new Set(t);return e.w=0,e.n=0,e},nz=t=>(t.w&sf)>0,rz=t=>(t.n&sf)>0,fse=({deps:t})=>{if(t.length)for(let e=0;e{const{deps:e}=t;if(e.length){let n=0;for(let r=0;r{(c==="length"||c>=l)&&s.push(u)})}else switch(n!==void 0&&s.push(a.get(n)),e){case"add":ut(t)?RM(n)&&s.push(a.get("length")):(s.push(a.get(Bh)),xg(t)&&s.push(a.get(W2)));break;case"delete":ut(t)||(s.push(a.get(Bh)),xg(t)&&s.push(a.get(W2)));break;case"set":xg(t)&&s.push(a.get(Bh));break}if(s.length===1)s[0]&&U2(s[0]);else{const l=[];for(const u of s)u&&l.push(...u);U2($M(l))}}function U2(t,e){const n=ut(t)?t:[...t];for(const r of n)r.computed&&y3(r);for(const r of n)r.computed||y3(r)}function y3(t,e){(t!==Ul||t.allowRecurse)&&(t.scheduler?t.scheduler():t.run())}function pse(t,e){var n;return(n=rw.get(t))===null||n===void 0?void 0:n.get(e)}const gse=PM("__proto__,__v_isRef,__isVue"),az=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Ky)),mse=DM(),vse=DM(!1,!0),yse=DM(!0),b3=bse();function bse(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const r=Bn(this);for(let o=0,a=this.length;o{t[e]=function(...n){Pm();const r=Bn(this)[e].apply(this,n);return Am(),r}}),t}function _se(t){const e=Bn(this);return es(e,"has",t),e.hasOwnProperty(t)}function DM(t=!1,e=!1){return function(r,i,o){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_isShallow")return e;if(i==="__v_raw"&&o===(t?e?Lse:dz:e?cz:uz).get(r))return r;const a=ut(r);if(!t){if(a&&Dn(b3,i))return Reflect.get(b3,i,o);if(i==="hasOwnProperty")return _se}const s=Reflect.get(r,i,o);return(Ky(i)?az.has(i):gse(i))||(t||es(r,"get",i),e)?s:kr(s)?a&&RM(i)?s:s.value:sn(s)?t?Mm(s):Sn(s):s}}const Ose=sz(),wse=sz(!0);function sz(t=!1){return function(n,r,i,o){let a=n[r];if(zg(a)&&kr(a)&&!kr(i))return!1;if(!t&&(!iw(i)&&!zg(i)&&(a=Bn(a),i=Bn(i)),!ut(n)&&kr(a)&&!kr(i)))return a.value=i,!0;const s=ut(n)&&RM(r)?Number(r)t,ix=t=>Reflect.getPrototypeOf(t);function z_(t,e,n=!1,r=!1){t=t.__v_raw;const i=Bn(t),o=Bn(e);n||(e!==o&&es(i,"get",e),es(i,"get",o));const{has:a}=ix(i),s=r?LM:n?FM:t0;if(a.call(i,e))return s(t.get(e));if(a.call(i,o))return s(t.get(o));t!==i&&t.get(e)}function Q_(t,e=!1){const n=this.__v_raw,r=Bn(n),i=Bn(t);return e||(t!==i&&es(r,"has",t),es(r,"has",i)),t===i?n.has(t):n.has(t)||n.has(i)}function H_(t,e=!1){return t=t.__v_raw,!e&&es(Bn(t),"iterate",Bh),Reflect.get(t,"size",t)}function _3(t){t=Bn(t);const e=Bn(this);return ix(e).has.call(e,t)||(e.add(t),Qc(e,"add",t,t)),this}function O3(t,e){e=Bn(e);const n=Bn(this),{has:r,get:i}=ix(n);let o=r.call(n,t);o||(t=Bn(t),o=r.call(n,t));const a=i.call(n,t);return n.set(t,e),o?e0(e,a)&&Qc(n,"set",t,e):Qc(n,"add",t,e),this}function w3(t){const e=Bn(this),{has:n,get:r}=ix(e);let i=n.call(e,t);i||(t=Bn(t),i=n.call(e,t)),r&&r.call(e,t);const o=e.delete(t);return i&&Qc(e,"delete",t,void 0),o}function S3(){const t=Bn(this),e=t.size!==0,n=t.clear();return e&&Qc(t,"clear",void 0,void 0),n}function W_(t,e){return function(r,i){const o=this,a=o.__v_raw,s=Bn(a),l=e?LM:t?FM:t0;return!t&&es(s,"iterate",Bh),a.forEach((u,c)=>r.call(i,l(u),l(c),o))}}function U_(t,e,n){return function(...r){const i=this.__v_raw,o=Bn(i),a=xg(o),s=t==="entries"||t===Symbol.iterator&&a,l=t==="keys"&&a,u=i[t](...r),c=n?LM:e?FM:t0;return!e&&es(o,"iterate",l?W2:Bh),{next(){const{value:d,done:f}=u.next();return f?{value:d,done:f}:{value:s?[c(d[0]),c(d[1])]:c(d),done:f}},[Symbol.iterator](){return this}}}}function Od(t){return function(...e){return t==="delete"?!1:this}}function kse(){const t={get(o){return z_(this,o)},get size(){return H_(this)},has:Q_,add:_3,set:O3,delete:w3,clear:S3,forEach:W_(!1,!1)},e={get(o){return z_(this,o,!1,!0)},get size(){return H_(this)},has:Q_,add:_3,set:O3,delete:w3,clear:S3,forEach:W_(!1,!0)},n={get(o){return z_(this,o,!0)},get size(){return H_(this,!0)},has(o){return Q_.call(this,o,!0)},add:Od("add"),set:Od("set"),delete:Od("delete"),clear:Od("clear"),forEach:W_(!0,!1)},r={get(o){return z_(this,o,!0,!0)},get size(){return H_(this,!0)},has(o){return Q_.call(this,o,!0)},add:Od("add"),set:Od("set"),delete:Od("delete"),clear:Od("clear"),forEach:W_(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=U_(o,!1,!1),n[o]=U_(o,!0,!1),e[o]=U_(o,!1,!0),r[o]=U_(o,!0,!0)}),[t,n,e,r]}const[Pse,Ase,Mse,Rse]=kse();function IM(t,e){const n=e?t?Rse:Mse:t?Ase:Pse;return(r,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?r:Reflect.get(Dn(n,i)&&i in r?n:r,i,o)}const $se={get:IM(!1,!1)},Nse={get:IM(!1,!0)},Dse={get:IM(!0,!1)},uz=new WeakMap,cz=new WeakMap,dz=new WeakMap,Lse=new WeakMap;function Ise(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bse(t){return t.__v_skip||!Object.isExtensible(t)?0:Ise(u1(t))}function Sn(t){return zg(t)?t:BM(t,!1,lz,$se,uz)}function fz(t){return BM(t,!1,Tse,Nse,cz)}function Mm(t){return BM(t,!0,Ese,Dse,dz)}function BM(t,e,n,r,i){if(!sn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=i.get(t);if(o)return o;const a=Bse(t);if(a===0)return t;const s=new Proxy(t,a===2?r:n);return i.set(t,s),s}function Cg(t){return zg(t)?Cg(t.__v_raw):!!(t&&t.__v_isReactive)}function zg(t){return!!(t&&t.__v_isReadonly)}function iw(t){return!!(t&&t.__v_isShallow)}function hz(t){return Cg(t)||zg(t)}function Bn(t){const e=t&&t.__v_raw;return e?Bn(e):t}function Bc(t){return nw(t,"__v_skip",!0),t}const t0=t=>sn(t)?Sn(t):t,FM=t=>sn(t)?Mm(t):t;function VM(t){Zd&&Ul&&(t=Bn(t),oz(t.dep||(t.dep=$M())))}function jM(t,e){t=Bn(t);const n=t.dep;n&&U2(n)}function kr(t){return!!(t&&t.__v_isRef===!0)}function F(t){return pz(t,!1)}function Tr(t){return pz(t,!0)}function pz(t,e){return kr(t)?t:new Fse(t,e)}class Fse{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:Bn(e),this._value=n?e:t0(e)}get value(){return VM(this),this._value}set value(e){const n=this.__v_isShallow||iw(e)||zg(e);e=n?e:Bn(e),e0(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:t0(e),jM(this))}}function p(t){return kr(t)?t.value:t}const Vse={get:(t,e,n)=>p(Reflect.get(t,e,n)),set:(t,e,n,r)=>{const i=t[e];return kr(i)&&!kr(n)?(i.value=n,!0):Reflect.set(t,e,n,r)}};function gz(t){return Cg(t)?t:new Proxy(t,Vse)}class jse{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:r}=e(()=>VM(this),()=>jM(this));this._get=n,this._set=r}get value(){return this._get()}set value(e){this._set(e)}}function zse(t){return new jse(t)}function Ri(t){const e=ut(t)?new Array(t.length):{};for(const n in t)e[n]=er(t,n);return e}class Qse{constructor(e,n,r){this._object=e,this._key=n,this._defaultValue=r,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return pse(Bn(this._object),this._key)}}function er(t,e,n){const r=t[e];return kr(r)?r:new Qse(t,e,n)}var mz;class Hse{constructor(e,n,r,i){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this[mz]=!1,this._dirty=!0,this.effect=new NM(e,()=>{this._dirty||(this._dirty=!0,jM(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!i,this.__v_isReadonly=r}get value(){const e=Bn(this);return VM(e),(e._dirty||!e._cacheable)&&(e._dirty=!1,e._value=e.effect.run()),e._value}set value(e){this._setter(e)}}mz="__v_isReadonly";function Wse(t,e,n=!1){let r,i;const o=$t(t);return o?(r=t,i=yr):(r=t.get,i=t.set),new Hse(r,i,o||!i,n)}function Use(t,...e){}function Gd(t,e,n,r){let i;try{i=r?t(...r):t()}catch(o){ox(o,e,n)}return i}function ul(t,e,n,r){if($t(t)){const o=Gd(t,e,n,r);return o&&Jy(o)&&o.catch(a=>{ox(a,e,n)}),o}const i=[];for(let o=0;o>>1;r0(ea[r])Nu&&ea.splice(e,1)}function Zse(t){ut(t)?Eg.push(...t):(!Rc||!Rc.includes(t,t.allowRecurse?gh+1:gh))&&Eg.push(t),yz()}function x3(t,e=n0?Nu+1:0){for(;er0(n)-r0(r)),gh=0;ght.id==null?1/0:t.id,Gse=(t,e)=>{const n=r0(t)-r0(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function _z(t){q2=!1,n0=!0,ea.sort(Gse);const e=yr;try{for(Nu=0;NuAt(h)?h.trim():h)),d&&(i=n.map(Q2))}let s,l=r[s=gy(e)]||r[s=gy(gl(e))];!l&&o&&(l=r[s=gy(Mf(e))]),l&&ul(l,t,6,i);const u=r[s+"Once"];if(u){if(!t.emitted)t.emitted={};else if(t.emitted[s])return;t.emitted[s]=!0,ul(u,t,6,i)}}function Oz(t,e,n=!1){const r=e.emitsCache,i=r.get(t);if(i!==void 0)return i;const o=t.emits;let a={},s=!1;if(!$t(t)){const l=u=>{const c=Oz(u,e,!0);c&&(s=!0,yo(a,c))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!s?(sn(t)&&r.set(t,null),null):(ut(o)?o.forEach(l=>a[l]=null):yo(a,o),sn(t)&&r.set(t,a),a)}function ax(t,e){return!t||!tx(e)?!1:(e=e.slice(2).replace(/Once$/,""),Dn(t,e[0].toLowerCase()+e.slice(1))||Dn(t,Mf(e))||Dn(t,e))}let Lo=null,sx=null;function ow(t){const e=Lo;return Lo=t,sx=t&&t.type.__scopeId||null,e}function Jse(t){sx=t}function ele(){sx=null}function z(t,e=Lo,n){if(!e||t._n)return t;const r=(...i)=>{r._d&&D3(-1);const o=ow(e);let a;try{a=t(...i)}finally{ow(o),r._d&&D3(1)}return a};return r._n=!0,r._c=!0,r._d=!0,r}function eT(t){const{type:e,vnode:n,proxy:r,withProxy:i,props:o,propsOptions:[a],slots:s,attrs:l,emit:u,render:c,renderCache:d,data:f,setupState:h,ctx:m,inheritAttrs:g}=t;let y,b;const w=ow(t);try{if(n.shapeFlag&4){const S=i||r;y=Mu(c.call(S,S,d,o,h,f,m)),b=l}else{const S=e;y=Mu(S.length>1?S(o,{attrs:l,slots:s,emit:u}):S(o,null)),b=e.props?l:tle(l)}}catch(S){by.length=0,ox(S,t,1),y=B(oa)}let O=y;if(b&&g!==!1){const S=Object.keys(b),{shapeFlag:x}=O;S.length&&x&7&&(a&&S.some(AM)&&(b=nle(b,a)),O=Hc(O,b))}return n.dirs&&(O=Hc(O),O.dirs=O.dirs?O.dirs.concat(n.dirs):n.dirs),n.transition&&(O.transition=n.transition),y=O,ow(w),y}const tle=t=>{let e;for(const n in t)(n==="class"||n==="style"||tx(n))&&((e||(e={}))[n]=t[n]);return e},nle=(t,e)=>{const n={};for(const r in t)(!AM(r)||!(r.slice(9)in e))&&(n[r]=t[r]);return n};function rle(t,e,n){const{props:r,children:i,component:o}=t,{props:a,children:s,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 r?C3(r,a,u):!!a;if(l&8){const c=e.dynamicProps;for(let d=0;dt.__isSuspense;function ale(t,e){e&&e.pendingBranch?ut(t)?e.effects.push(...t):e.effects.push(t):Zse(t)}function _n(t,e){if(ji){let n=ji.provides;const r=ji.parent&&ji.parent.provides;r===n&&(n=ji.provides=Object.create(r)),n[t]=e}}function ht(t,e,n=!1){const r=ji||Lo;if(r){const i=r.parent==null?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides;if(i&&t in i)return i[t];if(arguments.length>1)return n&&$t(e)?e.call(r.proxy):e}}function Bo(t,e){return HM(t,null,e)}const q_={};function Ve(t,e,n){return HM(t,e,n)}function HM(t,e,{immediate:n,deep:r,flush:i,onTrack:o,onTrigger:a}=yi){const s=ez()===(ji==null?void 0:ji.scope)?ji:null;let l,u=!1,c=!1;if(kr(t)?(l=()=>t.value,u=iw(t)):Cg(t)?(l=()=>t,r=!0):ut(t)?(c=!0,u=t.some(O=>Cg(O)||iw(O)),l=()=>t.map(O=>{if(kr(O))return O.value;if(Cg(O))return kh(O);if($t(O))return Gd(O,s,2)})):$t(t)?e?l=()=>Gd(t,s,2):l=()=>{if(!(s&&s.isUnmounted))return d&&d(),ul(t,s,3,[f])}:l=yr,e&&r){const O=l;l=()=>kh(O())}let d,f=O=>{d=b.onStop=()=>{Gd(O,s,4)}},h;if(s0)if(f=yr,e?n&&ul(e,s,3,[l(),c?[]:void 0,f]):l(),i==="sync"){const O=qle();h=O.__watcherHandles||(O.__watcherHandles=[])}else return yr;let m=c?new Array(t.length).fill(q_):q_;const g=()=>{if(!!b.active)if(e){const O=b.run();(r||u||(c?O.some((S,x)=>e0(S,m[x])):e0(O,m)))&&(d&&d(),ul(e,s,3,[O,m===q_?void 0:c&&m[0]===q_?[]:m,f]),m=O)}else b.run()};g.allowRecurse=!!e;let y;i==="sync"?y=g:i==="post"?y=()=>Fa(g,s&&s.suspense):(g.pre=!0,s&&(g.id=s.uid),y=()=>QM(g));const b=new NM(l,y);e?n?g():m=b.run():i==="post"?Fa(b.run.bind(b),s&&s.suspense):b.run();const w=()=>{b.stop(),s&&s.scope&&MM(s.scope.effects,b)};return h&&h.push(w),w}function sle(t,e,n){const r=this.proxy,i=At(t)?t.includes(".")?wz(r,t):()=>r[t]:t.bind(r,r);let o;$t(e)?o=e:(o=e.handler,n=e);const a=ji;Qg(this);const s=HM(i,o.bind(r),n);return a?Qg(a):Fh(),s}function wz(t,e){const n=e.split(".");return()=>{let r=t;for(let i=0;i{kh(n,e)});else if(tw(t))for(const n in t)kh(t[n],e);return t}function Sz(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Bt(()=>{t.isMounted=!0}),pr(()=>{t.isUnmounting=!0}),t}const Ys=[Function,Array],lle={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ys,onEnter:Ys,onAfterEnter:Ys,onEnterCancelled:Ys,onBeforeLeave:Ys,onLeave:Ys,onAfterLeave:Ys,onLeaveCancelled:Ys,onBeforeAppear:Ys,onAppear:Ys,onAfterAppear:Ys,onAppearCancelled:Ys},setup(t,{slots:e}){const n=en(),r=Sz();let i;return()=>{const o=e.default&&WM(e.default(),!0);if(!o||!o.length)return;let a=o[0];if(o.length>1){for(const g of o)if(g.type!==oa){a=g;break}}const s=Bn(t),{mode:l}=s;if(r.isLeaving)return tT(a);const u=E3(a);if(!u)return tT(a);const c=i0(u,s,r,n);o0(u,c);const d=n.subTree,f=d&&E3(d);let h=!1;const{getTransitionKey:m}=u.type;if(m){const g=m();i===void 0?i=g:g!==i&&(i=g,h=!0)}if(f&&f.type!==oa&&(!mh(u,f)||h)){const g=i0(f,s,r,n);if(o0(f,g),l==="out-in")return r.isLeaving=!0,g.afterLeave=()=>{r.isLeaving=!1,n.update.active!==!1&&n.update()},tT(a);l==="in-out"&&u.type!==oa&&(g.delayLeave=(y,b,w)=>{const O=Cz(r,f);O[String(f.key)]=f,y._leaveCb=()=>{b(),y._leaveCb=void 0,delete c.delayedLeave},c.delayedLeave=w})}return a}}},xz=lle;function Cz(t,e){const{leavingVNodes:n}=t;let r=n.get(e.type);return r||(r=Object.create(null),n.set(e.type,r)),r}function i0(t,e,n,r){const{appear:i,mode:o,persisted:a=!1,onBeforeEnter:s,onEnter:l,onAfterEnter:u,onEnterCancelled:c,onBeforeLeave:d,onLeave:f,onAfterLeave:h,onLeaveCancelled:m,onBeforeAppear:g,onAppear:y,onAfterAppear:b,onAppearCancelled:w}=e,O=String(t.key),S=Cz(n,t),x=(T,P)=>{T&&ul(T,r,9,P)},C=(T,P)=>{const A=P[1];x(T,P),ut(T)?T.every(D=>D.length<=1)&&A():T.length<=1&&A()},E={mode:o,persisted:a,beforeEnter(T){let P=s;if(!n.isMounted)if(i)P=g||s;else return;T._leaveCb&&T._leaveCb(!0);const A=S[O];A&&mh(t,A)&&A.el._leaveCb&&A.el._leaveCb(),x(P,[T])},enter(T){let P=l,A=u,D=c;if(!n.isMounted)if(i)P=y||l,A=b||u,D=w||c;else return;let N=!1;const $=T._enterCb=W=>{N||(N=!0,W?x(D,[T]):x(A,[T]),E.delayedLeave&&E.delayedLeave(),T._enterCb=void 0)};P?C(P,[T,$]):$()},leave(T,P){const A=String(t.key);if(T._enterCb&&T._enterCb(!0),n.isUnmounting)return P();x(d,[T]);let D=!1;const N=T._leaveCb=$=>{D||(D=!0,P(),$?x(m,[T]):x(h,[T]),T._leaveCb=void 0,S[A]===t&&delete S[A])};S[A]=t,f?C(f,[T,N]):N()},clone(T){return i0(T,e,n,r)}};return E}function tT(t){if(lx(t))return t=Hc(t),t.children=null,t}function E3(t){return lx(t)?t.children?t.children[0]:void 0:t}function o0(t,e){t.shapeFlag&6&&t.component?o0(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 WM(t,e=!1,n){let r=[],i=0;for(let o=0;o1)for(let o=0;o!!t.type.__asyncLoader,lx=t=>t.type.__isKeepAlive;function UM(t,e){Tz(t,"a",e)}function Ez(t,e){Tz(t,"da",e)}function Tz(t,e,n=ji){const r=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(ux(e,r,n),n){let i=n.parent;for(;i&&i.parent;)lx(i.parent.vnode)&&ule(r,e,n,i),i=i.parent}}function ule(t,e,n,r){const i=ux(e,t,r,!0);ed(()=>{MM(r[e],i)},n)}function ux(t,e,n=ji,r=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...a)=>{if(n.isUnmounted)return;Pm(),Qg(n);const s=ul(e,n,t,a);return Fh(),Am(),s});return r?i.unshift(o):i.push(o),o}}const Kc=t=>(e,n=ji)=>(!s0||t==="sp")&&ux(t,(...r)=>e(...r),n),cx=Kc("bm"),Bt=Kc("m"),kz=Kc("bu"),Jc=Kc("u"),pr=Kc("bum"),ed=Kc("um"),cle=Kc("sp"),dle=Kc("rtg"),fle=Kc("rtc");function hle(t,e=ji){ux("ec",t,e)}function Ht(t,e){const n=Lo;if(n===null)return t;const r=hx(n)||n.proxy,i=t.dirs||(t.dirs=[]);for(let o=0;oe(a,s,void 0,o&&o[s]));else{const a=Object.keys(t);i=new Array(a.length);for(let s=0,l=a.length;s{const o=r.fn(...i);return o&&(o.key=r.key),o}:r.fn)}return t}function xe(t,e,n={},r,i){if(Lo.isCE||Lo.parent&&my(Lo.parent)&&Lo.parent.isCE)return e!=="default"&&(n.name=e),B("slot",n,r&&r());let o=t[e];o&&o._c&&(o._d=!1),R();const a=o&&Az(o(n)),s=we(ct,{key:n.key||a&&a.key||`_${e}`},a||(r?r():[]),a&&t._===1?64:-2);return!i&&s.scopeId&&(s.slotScopeIds=[s.scopeId+"-s"]),o&&o._c&&(o._d=!0),s}function Az(t){return t.some(e=>Kr(e)?!(e.type===oa||e.type===ct&&!Az(e.children)):!0)?t:null}function gle(t,e){const n={};for(const r in t)n[e&&/[A-Z]/.test(r)?`on:${r}`:gy(r)]=t[r];return n}const Y2=t=>t?jz(t)?hx(t)||t.proxy:Y2(t.parent):null,vy=yo(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=>Y2(t.parent),$root:t=>Y2(t.root),$emit:t=>t.emit,$options:t=>XM(t),$forceUpdate:t=>t.f||(t.f=()=>QM(t.update)),$nextTick:t=>t.n||(t.n=Ot.bind(t.proxy)),$watch:t=>sle.bind(t)}),nT=(t,e)=>t!==yi&&!t.__isScriptSetup&&Dn(t,e),mle={get({_:t},e){const{ctx:n,setupState:r,data:i,props:o,accessCache:a,type:s,appContext:l}=t;let u;if(e[0]!=="$"){const h=a[e];if(h!==void 0)switch(h){case 1:return r[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(nT(r,e))return a[e]=1,r[e];if(i!==yi&&Dn(i,e))return a[e]=2,i[e];if((u=t.propsOptions[0])&&Dn(u,e))return a[e]=3,o[e];if(n!==yi&&Dn(n,e))return a[e]=4,n[e];X2&&(a[e]=0)}}const c=vy[e];let d,f;if(c)return e==="$attrs"&&es(t,"get",e),c(t);if((d=s.__cssModules)&&(d=d[e]))return d;if(n!==yi&&Dn(n,e))return a[e]=4,n[e];if(f=l.config.globalProperties,Dn(f,e))return f[e]},set({_:t},e,n){const{data:r,setupState:i,ctx:o}=t;return nT(i,e)?(i[e]=n,!0):r!==yi&&Dn(r,e)?(r[e]=n,!0):Dn(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:r,appContext:i,propsOptions:o}},a){let s;return!!n[a]||t!==yi&&Dn(t,a)||nT(e,a)||(s=o[0])&&Dn(s,a)||Dn(r,a)||Dn(vy,a)||Dn(i.config.globalProperties,a)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Dn(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};let X2=!0;function vle(t){const e=XM(t),n=t.proxy,r=t.ctx;X2=!1,e.beforeCreate&&k3(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:a,watch:s,provide:l,inject:u,created:c,beforeMount:d,mounted:f,beforeUpdate:h,updated:m,activated:g,deactivated:y,beforeDestroy:b,beforeUnmount:w,destroyed:O,unmounted:S,render:x,renderTracked:C,renderTriggered:E,errorCaptured:T,serverPrefetch:P,expose:A,inheritAttrs:D,components:N,directives:$,filters:W}=e;if(u&&yle(u,r,null,t.appContext.config.unwrapInjectedRef),a)for(const U in a){const Q=a[U];$t(Q)&&(r[U]=Q.bind(n))}if(i){const U=i.call(n,n);sn(U)&&(t.data=Sn(U))}if(X2=!0,o)for(const U in o){const Q=o[U],V=$t(Q)?Q.bind(n,n):$t(Q.get)?Q.get.bind(n,n):yr,q=!$t(Q)&&$t(Q.set)?Q.set.bind(n):yr,K=M({get:V,set:q});Object.defineProperty(r,U,{enumerable:!0,configurable:!0,get:()=>K.value,set:ie=>K.value=ie})}if(s)for(const U in s)Mz(s[U],r,n,U);if(l){const U=$t(l)?l.call(n):l;Reflect.ownKeys(U).forEach(Q=>{_n(Q,U[Q])})}c&&k3(c,t,"c");function I(U,Q){ut(Q)?Q.forEach(V=>U(V.bind(n))):Q&&U(Q.bind(n))}if(I(cx,d),I(Bt,f),I(kz,h),I(Jc,m),I(UM,g),I(Ez,y),I(hle,T),I(fle,C),I(dle,E),I(pr,w),I(ed,S),I(cle,P),ut(A))if(A.length){const U=t.exposed||(t.exposed={});A.forEach(Q=>{Object.defineProperty(U,Q,{get:()=>n[Q],set:V=>n[Q]=V})})}else t.exposed||(t.exposed={});x&&t.render===yr&&(t.render=x),D!=null&&(t.inheritAttrs=D),N&&(t.components=N),$&&(t.directives=$)}function yle(t,e,n=yr,r=!1){ut(t)&&(t=Z2(t));for(const i in t){const o=t[i];let a;sn(o)?"default"in o?a=ht(o.from||i,o.default,!0):a=ht(o.from||i):a=ht(o),kr(a)&&r?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>a.value,set:s=>a.value=s}):e[i]=a}}function k3(t,e,n){ul(ut(t)?t.map(r=>r.bind(e.proxy)):t.bind(e.proxy),e,n)}function Mz(t,e,n,r){const i=r.includes(".")?wz(n,r):()=>n[r];if(At(t)){const o=e[t];$t(o)&&Ve(i,o)}else if($t(t))Ve(i,t.bind(n));else if(sn(t))if(ut(t))t.forEach(o=>Mz(o,e,n,r));else{const o=$t(t.handler)?t.handler.bind(n):e[t.handler];$t(o)&&Ve(i,o,t)}}function XM(t){const e=t.type,{mixins:n,extends:r}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:a}}=t.appContext,s=o.get(e);let l;return s?l=s:!i.length&&!n&&!r?l=e:(l={},i.length&&i.forEach(u=>aw(l,u,a,!0)),aw(l,e,a)),sn(e)&&o.set(e,l),l}function aw(t,e,n,r=!1){const{mixins:i,extends:o}=e;o&&aw(t,o,n,!0),i&&i.forEach(a=>aw(t,a,n,!0));for(const a in e)if(!(r&&a==="expose")){const s=ble[a]||n&&n[a];t[a]=s?s(t[a],e[a]):e[a]}return t}const ble={data:P3,props:hh,emits:hh,methods:hh,computed:hh,beforeCreate:ma,created:ma,beforeMount:ma,mounted:ma,beforeUpdate:ma,updated:ma,beforeDestroy:ma,beforeUnmount:ma,destroyed:ma,unmounted:ma,activated:ma,deactivated:ma,errorCaptured:ma,serverPrefetch:ma,components:hh,directives:hh,watch:Ole,provide:P3,inject:_le};function P3(t,e){return e?t?function(){return yo($t(t)?t.call(this,this):t,$t(e)?e.call(this,this):e)}:e:t}function _le(t,e){return hh(Z2(t),Z2(e))}function Z2(t){if(ut(t)){const e={};for(let n=0;n0)&&!(a&16)){if(a&8){const c=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[f,h]=$z(d,e,!0);yo(a,f),h&&s.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 sn(t)&&r.set(t,Sg),Sg;if(ut(o))for(let c=0;c-1,h[1]=g<0||m-1||Dn(h,"default"))&&s.push(d)}}}const u=[a,s];return sn(t)&&r.set(t,u),u}function A3(t){return t[0]!=="$"}function M3(t){const e=t&&t.toString().match(/^\s*(function|class) (\w+)/);return e?e[2]:t===null?"null":""}function R3(t,e){return M3(t)===M3(e)}function $3(t,e){return ut(e)?e.findIndex(n=>R3(n,t)):$t(e)&&R3(e,t)?0:-1}const Nz=t=>t[0]==="_"||t==="$stable",ZM=t=>ut(t)?t.map(Mu):[Mu(t)],xle=(t,e,n)=>{if(e._n)return e;const r=z((...i)=>ZM(e(...i)),n);return r._c=!1,r},Dz=(t,e,n)=>{const r=t._ctx;for(const i in t){if(Nz(i))continue;const o=t[i];if($t(o))e[i]=xle(i,o,r);else if(o!=null){const a=ZM(o);e[i]=()=>a}}},Lz=(t,e)=>{const n=ZM(e);t.slots.default=()=>n},Cle=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=Bn(e),nw(e,"_",n)):Dz(e,t.slots={})}else t.slots={},e&&Lz(t,e);nw(t.slots,fx,1)},Ele=(t,e,n)=>{const{vnode:r,slots:i}=t;let o=!0,a=yi;if(r.shapeFlag&32){const s=e._;s?n&&s===1?o=!1:(yo(i,e),!n&&s===1&&delete i._):(o=!e.$stable,Dz(e,i)),a=e}else e&&(Lz(t,e),a={default:1});if(o)for(const s in i)!Nz(s)&&!(s in a)&&delete i[s]};function Iz(){return{app:null,config:{isNativeTag:rse,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 Tle=0;function kle(t,e){return function(r,i=null){$t(r)||(r=Object.assign({},r)),i!=null&&!sn(i)&&(i=null);const o=Iz(),a=new Set;let s=!1;const l=o.app={_uid:Tle++,_component:r,_props:i,_container:null,_context:o,_instance:null,version:Yle,get config(){return o.config},set config(u){},use(u,...c){return a.has(u)||(u&&$t(u.install)?(a.add(u),u.install(l,...c)):$t(u)&&(a.add(u),u(l,...c))),l},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),l},component(u,c){return c?(o.components[u]=c,l):o.components[u]},directive(u,c){return c?(o.directives[u]=c,l):o.directives[u]},mount(u,c,d){if(!s){const f=B(r,i);return f.appContext=o,c&&e?e(f,u):t(f,u,d),s=!0,l._container=u,u.__vue_app__=l,hx(f.component)||f.component.proxy}},unmount(){s&&(t(null,l._container),delete l._container.__vue_app__)},provide(u,c){return o.provides[u]=c,l}};return l}}function K2(t,e,n,r,i=!1){if(ut(t)){t.forEach((f,h)=>K2(f,e&&(ut(e)?e[h]:e),n,r,i));return}if(my(r)&&!i)return;const o=r.shapeFlag&4?hx(r.component)||r.component.proxy:r.el,a=i?null:o,{i:s,r:l}=t,u=e&&e.r,c=s.refs===yi?s.refs={}:s.refs,d=s.setupState;if(u!=null&&u!==l&&(At(u)?(c[u]=null,Dn(d,u)&&(d[u]=null)):kr(u)&&(u.value=null)),$t(l))Gd(l,s,12,[a,c]);else{const f=At(l),h=kr(l);if(f||h){const m=()=>{if(t.f){const g=f?Dn(d,l)?d[l]:c[l]:l.value;i?ut(g)&&MM(g,o):ut(g)?g.includes(o)||g.push(o):f?(c[l]=[o],Dn(d,l)&&(d[l]=c[l])):(l.value=[o],t.k&&(c[t.k]=l.value))}else f?(c[l]=a,Dn(d,l)&&(d[l]=a)):h&&(l.value=a,t.k&&(c[t.k]=a))};a?(m.id=-1,Fa(m,n)):m()}}}const Fa=ale;function Ple(t){return Ale(t)}function Ale(t,e){const n=use();n.__VUE__=!0;const{insert:r,remove:i,patchProp:o,createElement:a,createText:s,createComment:l,setText:u,setElementText:c,parentNode:d,nextSibling:f,setScopeId:h=yr,insertStaticContent:m}=t,g=(Z,ce,Te,Ie=null,ae=null,me=null,Ae=!1,X=null,ee=!!ce.dynamicChildren)=>{if(Z===ce)return;Z&&!mh(Z,ce)&&(Ie=re(Z),ie(Z,ae,me,!0),Z=null),ce.patchFlag===-2&&(ee=!1,ce.dynamicChildren=null);const{type:le,ref:Ce,shapeFlag:fe}=ce;switch(le){case Rm:y(Z,ce,Te,Ie);break;case oa:b(Z,ce,Te,Ie);break;case rT:Z==null&&w(ce,Te,Ie,Ae);break;case ct:N(Z,ce,Te,Ie,ae,me,Ae,X,ee);break;default:fe&1?x(Z,ce,Te,Ie,ae,me,Ae,X,ee):fe&6?$(Z,ce,Te,Ie,ae,me,Ae,X,ee):(fe&64||fe&128)&&le.process(Z,ce,Te,Ie,ae,me,Ae,X,ee,ge)}Ce!=null&&ae&&K2(Ce,Z&&Z.ref,me,ce||Z,!ce)},y=(Z,ce,Te,Ie)=>{if(Z==null)r(ce.el=s(ce.children),Te,Ie);else{const ae=ce.el=Z.el;ce.children!==Z.children&&u(ae,ce.children)}},b=(Z,ce,Te,Ie)=>{Z==null?r(ce.el=l(ce.children||""),Te,Ie):ce.el=Z.el},w=(Z,ce,Te,Ie)=>{[Z.el,Z.anchor]=m(Z.children,ce,Te,Ie,Z.el,Z.anchor)},O=({el:Z,anchor:ce},Te,Ie)=>{let ae;for(;Z&&Z!==ce;)ae=f(Z),r(Z,Te,Ie),Z=ae;r(ce,Te,Ie)},S=({el:Z,anchor:ce})=>{let Te;for(;Z&&Z!==ce;)Te=f(Z),i(Z),Z=Te;i(ce)},x=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{Ae=Ae||ce.type==="svg",Z==null?C(ce,Te,Ie,ae,me,Ae,X,ee):P(Z,ce,ae,me,Ae,X,ee)},C=(Z,ce,Te,Ie,ae,me,Ae,X)=>{let ee,le;const{type:Ce,props:fe,shapeFlag:Ee,transition:be,dirs:Be}=Z;if(ee=Z.el=a(Z.type,me,fe&&fe.is,fe),Ee&8?c(ee,Z.children):Ee&16&&T(Z.children,ee,null,Ie,ae,me&&Ce!=="foreignObject",Ae,X),Be&&ih(Z,null,Ie,"created"),E(ee,Z,Z.scopeId,Ae,Ie),fe){for(const Ke in fe)Ke!=="value"&&!c1(Ke)&&o(ee,Ke,null,fe[Ke],me,Z.children,Ie,ae,Y);"value"in fe&&o(ee,"value",null,fe.value),(le=fe.onVnodeBeforeMount)&&wu(le,Ie,Z)}Be&&ih(Z,null,Ie,"beforeMount");const Xe=(!ae||ae&&!ae.pendingBranch)&&be&&!be.persisted;Xe&&be.beforeEnter(ee),r(ee,ce,Te),((le=fe&&fe.onVnodeMounted)||Xe||Be)&&Fa(()=>{le&&wu(le,Ie,Z),Xe&&be.enter(ee),Be&&ih(Z,null,Ie,"mounted")},ae)},E=(Z,ce,Te,Ie,ae)=>{if(Te&&h(Z,Te),Ie)for(let me=0;me{for(let le=ee;le{const X=ce.el=Z.el;let{patchFlag:ee,dynamicChildren:le,dirs:Ce}=ce;ee|=Z.patchFlag&16;const fe=Z.props||yi,Ee=ce.props||yi;let be;Te&&oh(Te,!1),(be=Ee.onVnodeBeforeUpdate)&&wu(be,Te,ce,Z),Ce&&ih(ce,Z,Te,"beforeUpdate"),Te&&oh(Te,!0);const Be=ae&&ce.type!=="foreignObject";if(le?A(Z.dynamicChildren,le,X,Te,Ie,Be,me):Ae||Q(Z,ce,X,null,Te,Ie,Be,me,!1),ee>0){if(ee&16)D(X,ce,fe,Ee,Te,Ie,ae);else if(ee&2&&fe.class!==Ee.class&&o(X,"class",null,Ee.class,ae),ee&4&&o(X,"style",fe.style,Ee.style,ae),ee&8){const Xe=ce.dynamicProps;for(let Ke=0;Ke{be&&wu(be,Te,ce,Z),Ce&&ih(ce,Z,Te,"updated")},Ie)},A=(Z,ce,Te,Ie,ae,me,Ae)=>{for(let X=0;X{if(Te!==Ie){if(Te!==yi)for(const X in Te)!c1(X)&&!(X in Ie)&&o(Z,X,Te[X],null,Ae,ce.children,ae,me,Y);for(const X in Ie){if(c1(X))continue;const ee=Ie[X],le=Te[X];ee!==le&&X!=="value"&&o(Z,X,le,ee,Ae,ce.children,ae,me,Y)}"value"in Ie&&o(Z,"value",Te.value,Ie.value)}},N=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{const le=ce.el=Z?Z.el:s(""),Ce=ce.anchor=Z?Z.anchor:s("");let{patchFlag:fe,dynamicChildren:Ee,slotScopeIds:be}=ce;be&&(X=X?X.concat(be):be),Z==null?(r(le,Te,Ie),r(Ce,Te,Ie),T(ce.children,Te,Ce,ae,me,Ae,X,ee)):fe>0&&fe&64&&Ee&&Z.dynamicChildren?(A(Z.dynamicChildren,Ee,Te,ae,me,Ae,X),(ce.key!=null||ae&&ce===ae.subTree)&&GM(Z,ce,!0)):Q(Z,ce,Te,Ce,ae,me,Ae,X,ee)},$=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{ce.slotScopeIds=X,Z==null?ce.shapeFlag&512?ae.ctx.activate(ce,Te,Ie,Ae,ee):W(ce,Te,Ie,ae,me,Ae,ee):L(Z,ce,ee)},W=(Z,ce,Te,Ie,ae,me,Ae)=>{const X=Z.component=Vle(Z,Ie,ae);if(lx(Z)&&(X.ctx.renderer=ge),jle(X),X.asyncDep){if(ae&&ae.registerDep(X,I),!Z.el){const ee=X.subTree=B(oa);b(null,ee,ce,Te)}return}I(X,Z,ce,Te,ae,me,Ae)},L=(Z,ce,Te)=>{const Ie=ce.component=Z.component;if(rle(Z,ce,Te))if(Ie.asyncDep&&!Ie.asyncResolved){U(Ie,ce,Te);return}else Ie.next=ce,Xse(Ie.update),Ie.update();else ce.el=Z.el,Ie.vnode=ce},I=(Z,ce,Te,Ie,ae,me,Ae)=>{const X=()=>{if(Z.isMounted){let{next:Ce,bu:fe,u:Ee,parent:be,vnode:Be}=Z,Xe=Ce,Ke;oh(Z,!1),Ce?(Ce.el=Be.el,U(Z,Ce,Ae)):Ce=Be,fe&&d1(fe),(Ke=Ce.props&&Ce.props.onVnodeBeforeUpdate)&&wu(Ke,be,Ce,Be),oh(Z,!0);const tt=eT(Z),Dt=Z.subTree;Z.subTree=tt,g(Dt,tt,d(Dt.el),re(Dt),Z,ae,me),Ce.el=tt.el,Xe===null&&ile(Z,tt.el),Ee&&Fa(Ee,ae),(Ke=Ce.props&&Ce.props.onVnodeUpdated)&&Fa(()=>wu(Ke,be,Ce,Be),ae)}else{let Ce;const{el:fe,props:Ee}=ce,{bm:be,m:Be,parent:Xe}=Z,Ke=my(ce);if(oh(Z,!1),be&&d1(be),!Ke&&(Ce=Ee&&Ee.onVnodeBeforeMount)&&wu(Ce,Xe,ce),oh(Z,!0),fe&&$e){const tt=()=>{Z.subTree=eT(Z),$e(fe,Z.subTree,Z,ae,null)};Ke?ce.type.__asyncLoader().then(()=>!Z.isUnmounted&&tt()):tt()}else{const tt=Z.subTree=eT(Z);g(null,tt,Te,Ie,Z,ae,me),ce.el=tt.el}if(Be&&Fa(Be,ae),!Ke&&(Ce=Ee&&Ee.onVnodeMounted)){const tt=ce;Fa(()=>wu(Ce,Xe,tt),ae)}(ce.shapeFlag&256||Xe&&my(Xe.vnode)&&Xe.vnode.shapeFlag&256)&&Z.a&&Fa(Z.a,ae),Z.isMounted=!0,ce=Te=Ie=null}},ee=Z.effect=new NM(X,()=>QM(le),Z.scope),le=Z.update=()=>ee.run();le.id=Z.uid,oh(Z,!0),le()},U=(Z,ce,Te)=>{ce.component=Z;const Ie=Z.vnode.props;Z.vnode=ce,Z.next=null,Sle(Z,ce.props,Ie,Te),Ele(Z,ce.children,Te),Pm(),x3(),Am()},Q=(Z,ce,Te,Ie,ae,me,Ae,X,ee=!1)=>{const le=Z&&Z.children,Ce=Z?Z.shapeFlag:0,fe=ce.children,{patchFlag:Ee,shapeFlag:be}=ce;if(Ee>0){if(Ee&128){q(le,fe,Te,Ie,ae,me,Ae,X,ee);return}else if(Ee&256){V(le,fe,Te,Ie,ae,me,Ae,X,ee);return}}be&8?(Ce&16&&Y(le,ae,me),fe!==le&&c(Te,fe)):Ce&16?be&16?q(le,fe,Te,Ie,ae,me,Ae,X,ee):Y(le,ae,me,!0):(Ce&8&&c(Te,""),be&16&&T(fe,Te,Ie,ae,me,Ae,X,ee))},V=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{Z=Z||Sg,ce=ce||Sg;const le=Z.length,Ce=ce.length,fe=Math.min(le,Ce);let Ee;for(Ee=0;EeCe?Y(Z,ae,me,!0,!1,fe):T(ce,Te,Ie,ae,me,Ae,X,ee,fe)},q=(Z,ce,Te,Ie,ae,me,Ae,X,ee)=>{let le=0;const Ce=ce.length;let fe=Z.length-1,Ee=Ce-1;for(;le<=fe&&le<=Ee;){const be=Z[le],Be=ce[le]=ee?Pd(ce[le]):Mu(ce[le]);if(mh(be,Be))g(be,Be,Te,null,ae,me,Ae,X,ee);else break;le++}for(;le<=fe&&le<=Ee;){const be=Z[fe],Be=ce[Ee]=ee?Pd(ce[Ee]):Mu(ce[Ee]);if(mh(be,Be))g(be,Be,Te,null,ae,me,Ae,X,ee);else break;fe--,Ee--}if(le>fe){if(le<=Ee){const be=Ee+1,Be=beEe)for(;le<=fe;)ie(Z[le],ae,me,!0),le++;else{const be=le,Be=le,Xe=new Map;for(le=Be;le<=Ee;le++){const Pe=ce[le]=ee?Pd(ce[le]):Mu(ce[le]);Pe.key!=null&&Xe.set(Pe.key,le)}let Ke,tt=0;const Dt=Ee-Be+1;let jt=!1,Me=0;const nt=new Array(Dt);for(le=0;le=Dt){ie(Pe,ae,me,!0);continue}let Le;if(Pe.key!=null)Le=Xe.get(Pe.key);else for(Ke=Be;Ke<=Ee;Ke++)if(nt[Ke-Be]===0&&mh(Pe,ce[Ke])){Le=Ke;break}Le===void 0?ie(Pe,ae,me,!0):(nt[Le-Be]=le+1,Le>=Me?Me=Le:jt=!0,g(Pe,ce[Le],Te,null,ae,me,Ae,X,ee),tt++)}const de=jt?Mle(nt):Sg;for(Ke=de.length-1,le=Dt-1;le>=0;le--){const Pe=Be+le,Le=ce[Pe],wt=Pe+1{const{el:me,type:Ae,transition:X,children:ee,shapeFlag:le}=Z;if(le&6){K(Z.component.subTree,ce,Te,Ie);return}if(le&128){Z.suspense.move(ce,Te,Ie);return}if(le&64){Ae.move(Z,ce,Te,ge);return}if(Ae===ct){r(me,ce,Te);for(let fe=0;feX.enter(me),ae);else{const{leave:fe,delayLeave:Ee,afterLeave:be}=X,Be=()=>r(me,ce,Te),Xe=()=>{fe(me,()=>{Be(),be&&be()})};Ee?Ee(me,Be,Xe):Xe()}else r(me,ce,Te)},ie=(Z,ce,Te,Ie=!1,ae=!1)=>{const{type:me,props:Ae,ref:X,children:ee,dynamicChildren:le,shapeFlag:Ce,patchFlag:fe,dirs:Ee}=Z;if(X!=null&&K2(X,null,Te,Z,!0),Ce&256){ce.ctx.deactivate(Z);return}const be=Ce&1&&Ee,Be=!my(Z);let Xe;if(Be&&(Xe=Ae&&Ae.onVnodeBeforeUnmount)&&wu(Xe,ce,Z),Ce&6)ke(Z.component,Te,Ie);else{if(Ce&128){Z.suspense.unmount(Te,Ie);return}be&&ih(Z,null,ce,"beforeUnmount"),Ce&64?Z.type.remove(Z,ce,Te,ae,ge,Ie):le&&(me!==ct||fe>0&&fe&64)?Y(le,ce,Te,!1,!0):(me===ct&&fe&384||!ae&&Ce&16)&&Y(ee,ce,Te),Ie&&oe(Z)}(Be&&(Xe=Ae&&Ae.onVnodeUnmounted)||be)&&Fa(()=>{Xe&&wu(Xe,ce,Z),be&&ih(Z,null,ce,"unmounted")},Te)},oe=Z=>{const{type:ce,el:Te,anchor:Ie,transition:ae}=Z;if(ce===ct){Se(Te,Ie);return}if(ce===rT){S(Z);return}const me=()=>{i(Te),ae&&!ae.persisted&&ae.afterLeave&&ae.afterLeave()};if(Z.shapeFlag&1&&ae&&!ae.persisted){const{leave:Ae,delayLeave:X}=ae,ee=()=>Ae(Te,me);X?X(Z.el,me,ee):ee()}else me()},Se=(Z,ce)=>{let Te;for(;Z!==ce;)Te=f(Z),i(Z),Z=Te;i(ce)},ke=(Z,ce,Te)=>{const{bum:Ie,scope:ae,update:me,subTree:Ae,um:X}=Z;Ie&&d1(Ie),ae.stop(),me&&(me.active=!1,ie(Ae,Z,ce,Te)),X&&Fa(X,ce),Fa(()=>{Z.isUnmounted=!0},ce),ce&&ce.pendingBranch&&!ce.isUnmounted&&Z.asyncDep&&!Z.asyncResolved&&Z.suspenseId===ce.pendingId&&(ce.deps--,ce.deps===0&&ce.resolve())},Y=(Z,ce,Te,Ie=!1,ae=!1,me=0)=>{for(let Ae=me;AeZ.shapeFlag&6?re(Z.component.subTree):Z.shapeFlag&128?Z.suspense.next():f(Z.anchor||Z.el),te=(Z,ce,Te)=>{Z==null?ce._vnode&&ie(ce._vnode,null,null,!0):g(ce._vnode||null,Z,ce,null,null,null,Te),x3(),bz(),ce._vnode=Z},ge={p:g,um:ie,m:K,r:oe,mt:W,mc:T,pc:Q,pbc:A,n:re,o:t};let Re,$e;return e&&([Re,$e]=e(ge)),{render:te,hydrate:Re,createApp:kle(te,Re)}}function oh({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function GM(t,e,n=!1){const r=t.children,i=e.children;if(ut(r)&&ut(i))for(let o=0;o>1,t[n[s]]0&&(e[r]=n[o-1]),n[o]=r)}}for(o=n.length,a=n[o-1];o-- >0;)n[o]=a,a=e[a];return n}const Rle=t=>t.__isTeleport,yy=t=>t&&(t.disabled||t.disabled===""),N3=t=>typeof SVGElement!="undefined"&&t instanceof SVGElement,J2=(t,e)=>{const n=t&&t.to;return At(n)?e?e(n):null:n},$le={__isTeleport:!0,process(t,e,n,r,i,o,a,s,l,u){const{mc:c,pc:d,pbc:f,o:{insert:h,querySelector:m,createText:g,createComment:y}}=u,b=yy(e.props);let{shapeFlag:w,children:O,dynamicChildren:S}=e;if(t==null){const x=e.el=g(""),C=e.anchor=g("");h(x,n,r),h(C,n,r);const E=e.target=J2(e.props,m),T=e.targetAnchor=g("");E&&(h(T,E),a=a||N3(E));const P=(A,D)=>{w&16&&c(O,A,D,i,o,a,s,l)};b?P(n,C):E&&P(E,T)}else{e.el=t.el;const x=e.anchor=t.anchor,C=e.target=t.target,E=e.targetAnchor=t.targetAnchor,T=yy(t.props),P=T?n:C,A=T?x:E;if(a=a||N3(C),S?(f(t.dynamicChildren,S,P,i,o,a,s),GM(t,e,!0)):l||d(t,e,P,A,i,o,a,s,!1),b)T||Y_(e,n,x,u,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const D=e.target=J2(e.props,m);D&&Y_(e,D,null,u,0)}else T&&Y_(e,C,E,u,1)}Bz(e)},remove(t,e,n,r,{um:i,o:{remove:o}},a){const{shapeFlag:s,children:l,anchor:u,targetAnchor:c,target:d,props:f}=t;if(d&&o(c),(a||!yy(f))&&(o(u),s&16))for(let h=0;h0?Zl||Sg:null,Lle(),a0>0&&Zl&&Zl.push(t),t}function G(t,e,n,r,i,o){return Fz(J(t,e,n,r,i,o,!0))}function we(t,e,n,r,i){return Fz(B(t,e,n,r,i,!0))}function Kr(t){return t?t.__v_isVNode===!0:!1}function mh(t,e){return t.type===e.type&&t.key===e.key}const fx="__vInternal",Vz=({key:t})=>t!=null?t:null,f1=({ref:t,ref_key:e,ref_for:n})=>t!=null?At(t)||kr(t)||$t(t)?{i:Lo,r:t,k:e,f:!!n}:t:null;function J(t,e=null,n=null,r=0,i=null,o=t===ct?0:1,a=!1,s=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Vz(e),ref:e&&f1(e),scopeId:sx,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Lo};return s?(KM(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=At(n)?8:16),a0>0&&!a&&Zl&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Zl.push(l),l}const B=Ile;function Ile(t,e=null,n=null,r=0,i=null,o=!1){if((!t||t===Pz)&&(t=oa),Kr(t)){const s=Hc(t,e,!0);return n&&KM(s,n),a0>0&&!o&&Zl&&(s.shapeFlag&6?Zl[Zl.indexOf(t)]=s:Zl.push(s)),s.patchFlag|=-2,s}if(Wle(t)&&(t=t.__vccOpts),e){e=lf(e);let{class:s,style:l}=e;s&&!At(s)&&(e.class=j(s)),sn(l)&&(hz(l)&&!ut(l)&&(l=yo({},l)),e.style=mt(l))}const a=At(t)?1:ole(t)?128:Rle(t)?64:sn(t)?4:$t(t)?2:0;return J(t,e,n,r,i,a,o,!0)}function lf(t){return t?hz(t)||fx in t?yo({},t):t:null}function Hc(t,e,n=!1){const{props:r,ref:i,patchFlag:o,children:a}=t,s=e?gn(r||{},e):r;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:s,key:s&&Vz(s),ref:e&&e.ref?n&&i?ut(i)?i.concat(f1(e)):[i,f1(e)]:f1(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ct?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Hc(t.ssContent),ssFallback:t.ssFallback&&Hc(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function qe(t=" ",e=0){return B(Rm,null,t,e)}function _e(t="",e=!1){return e?(R(),we(oa,null,t)):B(oa,null,t)}function Mu(t){return t==null||typeof t=="boolean"?B(oa):ut(t)?B(ct,null,t.slice()):typeof t=="object"?Pd(t):B(Rm,null,String(t))}function Pd(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Hc(t)}function KM(t,e){let n=0;const{shapeFlag:r}=t;if(e==null)e=null;else if(ut(e))n=16;else if(typeof e=="object")if(r&65){const i=e.default;i&&(i._c&&(i._d=!1),KM(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!(fx in e)?e._ctx=Lo:i===3&&Lo&&(Lo.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else $t(e)?(e={default:e,_ctx:Lo},n=32):(e=String(e),r&64?(n=16,e=[qe(e)]):n=8);t.children=e,t.shapeFlag|=n}function gn(...t){const e={};for(let n=0;nji||Lo,Qg=t=>{ji=t,t.scope.on()},Fh=()=>{ji&&ji.scope.off(),ji=null};function jz(t){return t.vnode.shapeFlag&4}let s0=!1;function jle(t,e=!1){s0=e;const{props:n,children:r}=t.vnode,i=jz(t);wle(t,n,i,e),Cle(t,r);const o=i?zle(t,e):void 0;return s0=!1,o}function zle(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=Bc(new Proxy(t.ctx,mle));const{setup:r}=n;if(r){const i=t.setupContext=r.length>1?Qz(t):null;Qg(t),Pm();const o=Gd(r,t,0,[t.props,i]);if(Am(),Fh(),Jy(o)){if(o.then(Fh,Fh),e)return o.then(a=>{L3(t,a,e)}).catch(a=>{ox(a,t,0)});t.asyncDep=o}else L3(t,o,e)}else zz(t,e)}function L3(t,e,n){$t(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:sn(e)&&(t.setupState=gz(e)),zz(t,n)}let I3;function zz(t,e,n){const r=t.type;if(!t.render){if(!e&&I3&&!r.render){const i=r.template||XM(t).template;if(i){const{isCustomElement:o,compilerOptions:a}=t.appContext.config,{delimiters:s,compilerOptions:l}=r,u=yo(yo({isCustomElement:o,delimiters:s},a),l);r.render=I3(i,u)}}t.render=r.render||yr}Qg(t),Pm(),vle(t),Am(),Fh()}function Qle(t){return new Proxy(t.attrs,{get(e,n){return es(t,"get","$attrs"),e[n]}})}function Qz(t){const e=r=>{t.exposed=r||{}};let n;return{get attrs(){return n||(n=Qle(t))},slots:t.slots,emit:t.emit,expose:e}}function hx(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(gz(Bc(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in vy)return vy[n](t)},has(e,n){return n in e||n in vy}}))}function Hle(t,e=!0){return $t(t)?t.displayName||t.name:t.name||e&&t.__name}function Wle(t){return $t(t)&&"__vccOpts"in t}const M=(t,e)=>Wse(t,e,s0);function Ji(){return Hz().slots}function mp(){return Hz().attrs}function Hz(){const t=en();return t.setupContext||(t.setupContext=Qz(t))}function Et(t,e,n){const r=arguments.length;return r===2?sn(e)&&!ut(e)?Kr(e)?B(t,null,[e]):B(t,e):B(t,null,e):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Kr(n)&&(n=[n]),B(t,e,n))}const Ule=Symbol(""),qle=()=>ht(Ule),Yle="3.2.47",Xle="http://www.w3.org/2000/svg",vh=typeof document!="undefined"?document:null,B3=vh&&vh.createElement("template"),Zle={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,r)=>{const i=e?vh.createElementNS(Xle,t):vh.createElement(t,n?{is:n}:void 0);return t==="select"&&r&&r.multiple!=null&&i.setAttribute("multiple",r.multiple),i},createText:t=>vh.createTextNode(t),createComment:t=>vh.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>vh.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,r,i,o){const a=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{B3.innerHTML=r?`${t}`:t;const s=B3.content;if(r){const l=s.firstChild;for(;l.firstChild;)s.appendChild(l.firstChild);s.removeChild(l)}e.insertBefore(s,n)}return[a?a.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}};function Gle(t,e,n){const r=t._vtc;r&&(e=(e?[e,...r]:[...r]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}function Kle(t,e,n){const r=t.style,i=At(n);if(n&&!i){if(e&&!At(e))for(const o in e)n[o]==null&&ek(r,o,"");for(const o in n)ek(r,o,n[o])}else{const o=r.display;i?e!==n&&(r.cssText=n):e&&t.removeAttribute("style"),"_vod"in t&&(r.display=o)}}const F3=/\s*!important$/;function ek(t,e,n){if(ut(n))n.forEach(r=>ek(t,e,r));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const r=Jle(t,e);F3.test(n)?t.setProperty(Mf(r),n.replace(F3,""),"important"):t[r]=n}}const V3=["Webkit","Moz","ms"],iT={};function Jle(t,e){const n=iT[e];if(n)return n;let r=gl(e);if(r!=="filter"&&r in t)return iT[e]=r;r=db(r);for(let i=0;ioT||(oue.then(()=>oT=0),oT=Date.now());function sue(t,e){const n=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=n.attached)return;ul(lue(r,n.value),e,5,[r])};return n.value=t,n.attached=aue(),n}function lue(t,e){if(ut(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(r=>i=>!i._stopped&&r&&r(i))}else return e}const Q3=/^on[a-z]/,uue=(t,e,n,r,i=!1,o,a,s,l)=>{e==="class"?Gle(t,r,i):e==="style"?Kle(t,n,r):tx(e)?AM(e)||rue(t,e,n,r,a):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):cue(t,e,r,i))?tue(t,e,r,o,a,s,l):(e==="true-value"?t._trueValue=r:e==="false-value"&&(t._falseValue=r),eue(t,e,r,i))};function cue(t,e,n,r){return r?!!(e==="innerHTML"||e==="textContent"||e in t&&Q3.test(e)&&$t(n)):e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA"||Q3.test(e)&&At(n)?!1:e in t}const wd="transition",Av="animation",Qi=(t,{slots:e})=>Et(xz,Uz(t),e);Qi.displayName="Transition";const Wz={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},due=Qi.props=yo({},xz.props,Wz),ah=(t,e=[])=>{ut(t)?t.forEach(n=>n(...e)):t&&t(...e)},H3=t=>t?ut(t)?t.some(e=>e.length>1):t.length>1:!1;function Uz(t){const e={};for(const N in t)N in Wz||(e[N]=t[N]);if(t.css===!1)return e;const{name:n="v",type:r,duration:i,enterFromClass:o=`${n}-enter-from`,enterActiveClass:a=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:u=a,appearToClass:c=s,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=t,m=fue(i),g=m&&m[0],y=m&&m[1],{onBeforeEnter:b,onEnter:w,onEnterCancelled:O,onLeave:S,onLeaveCancelled:x,onBeforeAppear:C=b,onAppear:E=w,onAppearCancelled:T=O}=e,P=(N,$,W)=>{xd(N,$?c:s),xd(N,$?u:a),W&&W()},A=(N,$)=>{N._isLeaving=!1,xd(N,d),xd(N,h),xd(N,f),$&&$()},D=N=>($,W)=>{const L=N?E:w,I=()=>P($,N,W);ah(L,[$,I]),W3(()=>{xd($,N?l:o),Mc($,N?c:s),H3(L)||U3($,r,g,I)})};return yo(e,{onBeforeEnter(N){ah(b,[N]),Mc(N,o),Mc(N,a)},onBeforeAppear(N){ah(C,[N]),Mc(N,l),Mc(N,u)},onEnter:D(!1),onAppear:D(!0),onLeave(N,$){N._isLeaving=!0;const W=()=>A(N,$);Mc(N,d),Yz(),Mc(N,f),W3(()=>{!N._isLeaving||(xd(N,d),Mc(N,h),H3(S)||U3(N,r,y,W))}),ah(S,[N,W])},onEnterCancelled(N){P(N,!1),ah(O,[N])},onAppearCancelled(N){P(N,!0),ah(T,[N])},onLeaveCancelled(N){A(N),ah(x,[N])}})}function fue(t){if(t==null)return null;if(sn(t))return[aT(t.enter),aT(t.leave)];{const e=aT(t);return[e,e]}}function aT(t){return lse(t)}function Mc(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t._vtc||(t._vtc=new Set)).add(e)}function xd(t,e){e.split(/\s+/).forEach(r=>r&&t.classList.remove(r));const{_vtc:n}=t;n&&(n.delete(e),n.size||(t._vtc=void 0))}function W3(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let hue=0;function U3(t,e,n,r){const i=t._endId=++hue,o=()=>{i===t._endId&&r()};if(n)return setTimeout(o,n);const{type:a,timeout:s,propCount:l}=qz(t,e);if(!a)return r();const u=a+"end";let c=0;const d=()=>{t.removeEventListener(u,f),o()},f=h=>{h.target===t&&++c>=l&&d()};setTimeout(()=>{c(n[m]||"").split(", "),i=r(`${wd}Delay`),o=r(`${wd}Duration`),a=q3(i,o),s=r(`${Av}Delay`),l=r(`${Av}Duration`),u=q3(s,l);let c=null,d=0,f=0;e===wd?a>0&&(c=wd,d=a,f=o.length):e===Av?u>0&&(c=Av,d=u,f=l.length):(d=Math.max(a,u),c=d>0?a>u?wd:Av:null,f=c?c===wd?o.length:l.length:0);const h=c===wd&&/\b(transform|all)(,|$)/.test(r(`${wd}Property`).toString());return{type:c,timeout:d,propCount:f,hasTransform:h}}function q3(t,e){for(;t.lengthY3(n)+Y3(t[r])))}function Y3(t){return Number(t.slice(0,-1).replace(",","."))*1e3}function Yz(){return document.body.offsetHeight}const Xz=new WeakMap,Zz=new WeakMap,Gz={name:"TransitionGroup",props:yo({},due,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=en(),r=Sz();let i,o;return Jc(()=>{if(!i.length)return;const a=t.moveClass||`${t.name||"v"}-move`;if(!yue(i[0].el,n.vnode.el,a))return;i.forEach(gue),i.forEach(mue);const s=i.filter(vue);Yz(),s.forEach(l=>{const u=l.el,c=u.style;Mc(u,a),c.transform=c.webkitTransform=c.transitionDuration="";const d=u._moveCb=f=>{f&&f.target!==u||(!f||/transform$/.test(f.propertyName))&&(u.removeEventListener("transitionend",d),u._moveCb=null,xd(u,a))};u.addEventListener("transitionend",d)})}),()=>{const a=Bn(t),s=Uz(a);let l=a.tag||ct;i=o,o=e.default?WM(e.default()):[];for(let u=0;udelete t.mode;Gz.props;const Kz=Gz;function gue(t){const e=t.el;e._moveCb&&e._moveCb(),e._enterCb&&e._enterCb()}function mue(t){Zz.set(t,t.el.getBoundingClientRect())}function vue(t){const e=Xz.get(t),n=Zz.get(t),r=e.left-n.left,i=e.top-n.top;if(r||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${r}px,${i}px)`,o.transitionDuration="0s",t}}function yue(t,e,n){const r=t.cloneNode();t._vtc&&t._vtc.forEach(a=>{a.split(/\s+/).forEach(s=>s&&r.classList.remove(s))}),n.split(/\s+/).forEach(a=>a&&r.classList.add(a)),r.style.display="none";const i=e.nodeType===1?e:e.parentNode;i.appendChild(r);const{hasTransform:o}=qz(r);return i.removeChild(r),o}const Hg=t=>{const e=t.props["onUpdate:modelValue"]||!1;return ut(e)?n=>d1(e,n):e};function bue(t){t.target.composing=!0}function X3(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const JM={created(t,{modifiers:{lazy:e,trim:n,number:r}},i){t._assign=Hg(i);const o=r||i.props&&i.props.type==="number";Ld(t,e?"change":"input",a=>{if(a.target.composing)return;let s=t.value;n&&(s=s.trim()),o&&(s=Q2(s)),t._assign(s)}),n&&Ld(t,"change",()=>{t.value=t.value.trim()}),e||(Ld(t,"compositionstart",bue),Ld(t,"compositionend",X3),Ld(t,"change",X3))},mounted(t,{value:e}){t.value=e==null?"":e},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:r,number:i}},o){if(t._assign=Hg(o),t.composing||document.activeElement===t&&t.type!=="range"&&(n||r&&t.value.trim()===e||(i||t.type==="number")&&Q2(t.value)===e))return;const a=e==null?"":e;t.value!==a&&(t.value=a)}},sw={deep:!0,created(t,e,n){t._assign=Hg(n),Ld(t,"change",()=>{const r=t._modelValue,i=e7(t),o=t.checked,a=t._assign;if(ut(r)){const s=Zj(r,i),l=s!==-1;if(o&&!l)a(r.concat(i));else if(!o&&l){const u=[...r];u.splice(s,1),a(u)}}else if(nx(r)){const s=new Set(r);o?s.add(i):s.delete(i),a(s)}else a(t7(t,o))})},mounted:Z3,beforeUpdate(t,e,n){t._assign=Hg(n),Z3(t,e,n)}};function Z3(t,{value:e,oldValue:n},r){t._modelValue=e,ut(e)?t.checked=Zj(e,r.props.value)>-1:nx(e)?t.checked=e.has(r.props.value):e!==n&&(t.checked=jg(e,t7(t,!0)))}const Jz={created(t,{value:e},n){t.checked=jg(e,n.props.value),t._assign=Hg(n),Ld(t,"change",()=>{t._assign(e7(t))})},beforeUpdate(t,{value:e,oldValue:n},r){t._assign=Hg(r),e!==n&&(t.checked=jg(e,r.props.value))}};function e7(t){return"_value"in t?t._value:t.value}function t7(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const _ue=["ctrl","shift","alt","meta"],Oue={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)=>_ue.some(n=>t[`${n}Key`]&&!e.includes(n))},Pt=(t,e)=>(n,...r)=>{for(let i=0;in=>{if(!("key"in n))return;const r=Mf(n.key);if(e.some(i=>i===r||wue[i]===r))return t(n)},zn={beforeMount(t,{value:e},{transition:n}){t._vod=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Mv(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:r}){!e!=!n&&(r?e?(r.beforeEnter(t),Mv(t,!0),r.enter(t)):r.leave(t,()=>{Mv(t,!1)}):Mv(t,e))},beforeUnmount(t,{value:e}){Mv(t,e)}};function Mv(t,e){t.style.display=e?t._vod:"none"}const Sue=yo({patchProp:uue},Zle);let G3;function n7(){return G3||(G3=Ple(Sue))}const uf=(...t)=>{n7().render(...t)},px=(...t)=>{const e=n7().createApp(...t),{mount:n}=e;return e.mount=r=>{const i=xue(r);if(!i)return;const o=e._component;!$t(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.innerHTML="";const a=n(i,!1,i instanceof SVGElement);return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),a},e};function xue(t){return At(t)?document.querySelector(t):t}const Cue='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',Eue=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,K3=t=>Array.from(t.querySelectorAll(Cue)).filter(e=>Tue(e)&&Eue(e)),Tue=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.disabled)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}},h1=function(t,e,...n){let r;e.includes("mouse")||e.includes("click")?r="MouseEvents":e.includes("key")?r="KeyboardEvent":r="HTMLEvents";const i=document.createEvent(r);return i.initEvent(e,...n),t.dispatchEvent(i),t},r7=t=>!t.getAttribute("aria-owns"),i7=(t,e,n)=>{const{parentNode:r}=t;if(!r)return null;const i=r.querySelectorAll(n),o=Array.prototype.indexOf.call(i,t);return i[o+e]||null},p1=t=>{!t||(t.focus(),!r7(t)&&t.click())},fi=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=t==null?void 0:t(i);if(n===!1||!o)return e==null?void 0:e(i)},J3=t=>e=>e.pointerType==="mouse"?t(e):void 0;var kue=Object.defineProperty,Pue=Object.defineProperties,Aue=Object.getOwnPropertyDescriptors,e4=Object.getOwnPropertySymbols,Mue=Object.prototype.hasOwnProperty,Rue=Object.prototype.propertyIsEnumerable,t4=(t,e,n)=>e in t?kue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$ue=(t,e)=>{for(var n in e||(e={}))Mue.call(e,n)&&t4(t,n,e[n]);if(e4)for(var n of e4(e))Rue.call(e,n)&&t4(t,n,e[n]);return t},Nue=(t,e)=>Pue(t,Aue(e));function n4(t,e){var n;const r=Tr();return Bo(()=>{r.value=t()},Nue($ue({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),Mm(r)}var r4;const Tn=typeof window!="undefined",Due=t=>typeof t!="undefined",tk=t=>typeof t=="function",Lue=t=>typeof t=="string",Wg=()=>{},nk=Tn&&((r4=window==null?void 0:window.navigator)==null?void 0:r4.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function cf(t){return typeof t=="function"?t():p(t)}function o7(t,e){function n(...r){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,r),{fn:e,thisArg:this,args:r})).then(i).catch(o)})}return n}function Iue(t,e={}){let n,r,i=Wg;const o=s=>{clearTimeout(s),i(),i=Wg};return s=>{const l=cf(t),u=cf(e.maxWait);return n&&o(n),l<=0||u!==void 0&&u<=0?(r&&(o(r),r=null),Promise.resolve(s())):new Promise((c,d)=>{i=e.rejectOnCancel?d:c,u&&!r&&(r=setTimeout(()=>{n&&o(n),r=null,c(s())},u)),n=setTimeout(()=>{r&&o(r),r=null,c(s())},l)})}}function Bue(t,e=!0,n=!0,r=!1){let i=0,o,a=!0,s=Wg,l;const u=()=>{o&&(clearTimeout(o),o=void 0,s(),s=Wg)};return d=>{const f=cf(t),h=Date.now()-i,m=()=>l=d();return u(),f<=0?(i=Date.now(),m()):(h>f&&(n||!a)?(i=Date.now(),m()):e&&(l=new Promise((g,y)=>{s=r?y:g,o=setTimeout(()=>{i=Date.now(),a=!0,g(m()),u()},Math.max(0,f-h))})),!n&&!o&&(o=setTimeout(()=>a=!0,f)),a=!1,l)}}function Fue(t){return t}function Vue(t,e){let n,r,i;const o=F(!0),a=()=>{o.value=!0,i()};Ve(t,a,{flush:"sync"});const s=tk(e)?e:e.get,l=tk(e)?void 0:e.set,u=zse((c,d)=>(r=c,i=d,{get(){return o.value&&(n=s(),o.value=!1),r(),n},set(f){l==null||l(f)}}));return Object.isExtensible(u)&&(u.trigger=a),u}function fb(t){return ez()?(tz(t),!0):!1}function jue(t,e=200,n={}){return o7(Iue(e,n),t)}function zue(t,e=200,n={}){const r=F(t.value),i=jue(()=>{r.value=t.value},e,n);return Ve(t,()=>i()),r}function a7(t,e=200,n=!1,r=!0,i=!1){return o7(Bue(e,n,r,i),t)}function eR(t,e=!0){en()?Bt(t):e?t():Ot(t)}function Xh(t,e,n={}){const{immediate:r=!0}=n,i=F(!1);let o=null;function a(){o&&(clearTimeout(o),o=null)}function s(){i.value=!1,a()}function l(...u){a(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...u)},cf(e))}return r&&(i.value=!0,Tn&&l()),fb(s),{isPending:Mm(i),start:l,stop:s}}function Wa(t){var e;const n=cf(t);return(e=n==null?void 0:n.$el)!=null?e:n}const Rf=Tn?window:void 0,Que=Tn?window.document:void 0;function sr(...t){let e,n,r,i;if(Lue(t[0])||Array.isArray(t[0])?([n,r,i]=t,e=Rf):[e,n,r,i]=t,!e)return Wg;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const o=[],a=()=>{o.forEach(c=>c()),o.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=Ve(()=>[Wa(e),cf(i)],([c,d])=>{a(),c&&o.push(...n.flatMap(f=>r.map(h=>s(c,f,h,d))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return fb(u),u}let i4=!1;function tR(t,e,n={}){const{window:r=Rf,ignore:i=[],capture:o=!0,detectIframe:a=!1}=n;if(!r)return;nk&&!i4&&(i4=!0,Array.from(r.document.body.children).forEach(f=>f.addEventListener("click",Wg)));let s=!0;const l=f=>i.some(h=>{if(typeof h=="string")return Array.from(r.document.querySelectorAll(h)).some(m=>m===f.target||f.composedPath().includes(m));{const m=Wa(h);return m&&(f.target===m||f.composedPath().includes(m))}}),c=[sr(r,"click",f=>{const h=Wa(t);if(!(!h||h===f.target||f.composedPath().includes(h))){if(f.detail===0&&(s=!l(f)),!s){s=!0;return}e(f)}},{passive:!0,capture:o}),sr(r,"pointerdown",f=>{const h=Wa(t);h&&(s=!f.composedPath().includes(h)&&!l(f))},{passive:!0}),a&&sr(r,"blur",f=>{var h;const m=Wa(t);((h=r.document.activeElement)==null?void 0:h.tagName)==="IFRAME"&&!(m!=null&&m.contains(r.document.activeElement))&&e(f)})].filter(Boolean);return()=>c.forEach(f=>f())}function Hue(t={}){var e;const{window:n=Rf}=t,r=(e=t.document)!=null?e:n==null?void 0:n.document,i=Vue(()=>null,()=>r==null?void 0:r.activeElement);return n&&(sr(n,"blur",o=>{o.relatedTarget===null&&i.trigger()},!0),sr(n,"focus",i.trigger,!0)),i}function s7(t,e=!1){const n=F(),r=()=>n.value=Boolean(t());return r(),eR(r,e),n}function Wue(t){return JSON.parse(JSON.stringify(t))}const rk=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},ik="__vueuse_ssr_handlers__";rk[ik]=rk[ik]||{};rk[ik];function Uue(t,e,{window:n=Rf,initialValue:r=""}={}){const i=F(r),o=M(()=>{var a;return Wa(e)||((a=n==null?void 0:n.document)==null?void 0:a.documentElement)});return Ve([o,()=>cf(t)],([a,s])=>{var l;if(a&&n){const u=(l=n.getComputedStyle(a).getPropertyValue(s))==null?void 0:l.trim();i.value=u||r}},{immediate:!0}),Ve(i,a=>{var s;(s=o.value)!=null&&s.style&&o.value.style.setProperty(cf(t),a)}),i}function que({document:t=Que}={}){if(!t)return F("visible");const e=F(t.visibilityState);return sr(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var o4=Object.getOwnPropertySymbols,Yue=Object.prototype.hasOwnProperty,Xue=Object.prototype.propertyIsEnumerable,Zue=(t,e)=>{var n={};for(var r in t)Yue.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&o4)for(var r of o4(t))e.indexOf(r)<0&&Xue.call(t,r)&&(n[r]=t[r]);return n};function Zr(t,e,n={}){const r=n,{window:i=Rf}=r,o=Zue(r,["window"]);let a;const s=s7(()=>i&&"ResizeObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Ve(()=>Wa(t),d=>{l(),s.value&&i&&d&&(a=new ResizeObserver(e),a.observe(d,o))},{immediate:!0,flush:"post"}),c=()=>{l(),u()};return fb(c),{isSupported:s,stop:c}}function a4(t,e={}){const{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:o=!0}=e,a=F(0),s=F(0),l=F(0),u=F(0),c=F(0),d=F(0),f=F(0),h=F(0);function m(){const g=Wa(t);if(!g){n&&(a.value=0,s.value=0,l.value=0,u.value=0,c.value=0,d.value=0,f.value=0,h.value=0);return}const y=g.getBoundingClientRect();a.value=y.height,s.value=y.bottom,l.value=y.left,u.value=y.right,c.value=y.top,d.value=y.width,f.value=y.x,h.value=y.y}return Zr(t,m),Ve(()=>Wa(t),g=>!g&&m()),i&&sr("scroll",m,{capture:!0,passive:!0}),r&&sr("resize",m,{passive:!0}),eR(()=>{o&&m()}),{height:a,bottom:s,left:l,right:u,top:c,width:d,x:f,y:h,update:m}}var s4=Object.getOwnPropertySymbols,Gue=Object.prototype.hasOwnProperty,Kue=Object.prototype.propertyIsEnumerable,Jue=(t,e)=>{var n={};for(var r in t)Gue.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&s4)for(var r of s4(t))e.indexOf(r)<0&&Kue.call(t,r)&&(n[r]=t[r]);return n};function l7(t,e,n={}){const r=n,{window:i=Rf}=r,o=Jue(r,["window"]);let a;const s=s7(()=>i&&"MutationObserver"in i),l=()=>{a&&(a.disconnect(),a=void 0)},u=Ve(()=>Wa(t),d=>{l(),s.value&&i&&d&&(a=new MutationObserver(e),a.observe(d,o))},{immediate:!0}),c=()=>{l(),u()};return fb(c),{isSupported:s,stop:c}}var l4;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(l4||(l4={}));var ece=Object.defineProperty,u4=Object.getOwnPropertySymbols,tce=Object.prototype.hasOwnProperty,nce=Object.prototype.propertyIsEnumerable,c4=(t,e,n)=>e in t?ece(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rce=(t,e)=>{for(var n in e||(e={}))tce.call(e,n)&&c4(t,n,e[n]);if(u4)for(var n of u4(e))nce.call(e,n)&&c4(t,n,e[n]);return t};const ice={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};rce({linear:Fue},ice);function u7(t,e,n,r={}){var i,o,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d}=r,f=en(),h=n||(f==null?void 0:f.emit)||((i=f==null?void 0:f.$emit)==null?void 0:i.bind(f))||((a=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:a.bind(f==null?void 0:f.proxy));let m=u;e||(e="modelValue"),m=u||m||`update:${e.toString()}`;const g=b=>s?tk(s)?s(b):Wue(b):b,y=()=>Due(t[e])?g(t[e]):d;if(l){const b=y(),w=F(b);return Ve(()=>t[e],O=>w.value=g(O)),Ve(w,O=>{(O!==t[e]||c)&&h(m,O)},{deep:c}),w}else return M({get(){return y()},set(b){h(m,b)}})}function oce({window:t=Rf}={}){if(!t)return F(!1);const e=F(t.document.hasFocus());return sr(t,"blur",()=>{e.value=!1}),sr(t,"focus",()=>{e.value=!0}),e}function ace(t={}){const{window:e=Rf,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:o=!0}=t,a=F(n),s=F(r),l=()=>{e&&(o?(a.value=e.innerWidth,s.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,s.value=e.document.documentElement.clientHeight))};return l(),eR(l),sr("resize",l,{passive:!0}),i&&sr("orientationchange",l,{passive:!0}),{width:a,height:s}}const nR=()=>Tn&&/firefox/i.test(window.navigator.userAgent),sce=(t,e)=>{if(!Tn||!t||!e)return!1;const n=t.getBoundingClientRect();let r;return e instanceof Element?r=e.getBoundingClientRect():r={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.topr.top&&n.right>r.left&&n.left{let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e},ok=(t,e)=>Math.abs(d4(t)-d4(e)),rR=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}};function lce(t,e,n,r){const i=n-e;return t/=r/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}var uce=typeof global=="object"&&global&&global.Object===Object&&global,c7=uce,cce=typeof self=="object"&&self&&self.Object===Object&&self,dce=c7||cce||Function("return this")(),Oo=dce,fce=Oo.Symbol,sa=fce,d7=Object.prototype,hce=d7.hasOwnProperty,pce=d7.toString,Rv=sa?sa.toStringTag:void 0;function gce(t){var e=hce.call(t,Rv),n=t[Rv];try{t[Rv]=void 0;var r=!0}catch{}var i=pce.call(t);return r&&(e?t[Rv]=n:delete t[Rv]),i}var mce=Object.prototype,vce=mce.toString;function yce(t){return vce.call(t)}var bce="[object Null]",_ce="[object Undefined]",f4=sa?sa.toStringTag:void 0;function ka(t){return t==null?t===void 0?_ce:bce:f4&&f4 in Object(t)?gce(t):yce(t)}function $i(t){return t!=null&&typeof t=="object"}var Oce="[object Symbol]";function $s(t){return typeof t=="symbol"||$i(t)&&ka(t)==Oce}var wce=0/0;function h4(t){return typeof t=="number"?t:$s(t)?wce:+t}function Ci(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n0){if(++e>=pde)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}var vde=b7(g7),_7=vde,yde=/\{\n\/\* \[wrapped with (.+)\] \*/,bde=/,? & /;function _de(t){var e=t.match(yde);return e?e[1].split(bde):[]}var Ode=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function wde(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(Ode,`{ /* [wrapped with `+e+`] */ `)}function oR(t){return function(){return t}}var Sde=function(){try{var t=yp(Object,"defineProperty");return t({},"",{}),t}catch{}}(),uw=Sde,xde=uw?function(t,e){return uw(t,"toString",{configurable:!0,enumerable:!1,value:oR(e),writable:!0})}:Pa,Cde=xde,Ede=b7(Cde),aR=Ede;function Cl(t,e){for(var n=-1,r=t==null?0:t.length;++n-1}var kde=1,Pde=2,Ade=8,Mde=16,Rde=32,$de=64,Nde=128,Dde=256,Lde=512,Ide=[["ary",Nde],["bind",kde],["bindKey",Pde],["curry",Ade],["curryRight",Mde],["flip",Lde],["partial",Rde],["partialRight",$de],["rearg",Dde]];function Bde(t,e){return Cl(Ide,function(n){var r="_."+n[0];e&n[1]&&!yx(t,r)&&t.push(r)}),t.sort()}function w7(t,e,n){var r=e+"";return aR(t,wde(r,Bde(_de(r),n)))}var Fde=1,Vde=2,jde=4,zde=8,_4=32,O4=64;function S7(t,e,n,r,i,o,a,s,l,u){var c=e&zde,d=c?a:void 0,f=c?void 0:a,h=c?o:void 0,m=c?void 0:o;e|=c?_4:O4,e&=~(c?O4:_4),e&jde||(e&=~(Fde|Vde));var g=[t,e,i,h,d,m,f,s,l,u],y=n.apply(void 0,g);return ak(t)&&_7(y,g),y.placeholder=r,w7(y,t,e)}function Dm(t){var e=t;return e.placeholder}var Qde=9007199254740991,Hde=/^(?:0|[1-9]\d*)$/;function nd(t,e){var n=typeof t;return e=e==null?Qde:e,!!e&&(n=="number"||n!="symbol"&&Hde.test(t))&&t>-1&&t%1==0&&t1&&w.reverse(),c&&l-1&&t%1==0&&t<=dfe}function as(t){return t!=null&&_x(t.length)&&!td(t)}function xa(t,e,n){if(!_i(n))return!1;var r=typeof e;return(r=="number"?as(n)&&nd(e,n.length):r=="string"&&e in n)?fu(n[e],t):!1}function Lm(t){return cr(function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,a&&xa(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),e=Object(e);++r-1}function Mhe(t,e){var n=this.__data__,r=Ox(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function od(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0&&n(s)?e>1?zo(s,e-1,n,r,i):Nf(i,s):r||(i[i.length]=s)}return i}function fR(t){var e=t==null?0:t.length;return e?zo(t,1):[]}function sd(t){return aR(C7(t,void 0,fR),t+"")}var qhe=sd(dR),Yhe=qhe,Xhe=A7(Object.getPrototypeOf,Object),Sx=Xhe,Zhe="[object Object]",Ghe=Function.prototype,Khe=Object.prototype,R7=Ghe.toString,Jhe=Khe.hasOwnProperty,epe=R7.call(Object);function mb(t){if(!$i(t)||ka(t)!=Zhe)return!1;var e=Sx(t);if(e===null)return!0;var n=Jhe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&R7.call(n)==epe}var tpe="[object DOMException]",npe="[object Error]";function hR(t){if(!$i(t))return!1;var e=ka(t);return e==npe||e==tpe||typeof t.message=="string"&&typeof t.name=="string"&&!mb(t)}var rpe=cr(function(t,e){try{return Ds(t,void 0,e)}catch(n){return hR(n)?n:new Error(n)}}),$7=rpe,ipe="Expected a function";function N7(t,e){var n;if(typeof e!="function")throw new TypeError(ipe);return t=tr(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var ope=1,ape=32,pR=cr(function(t,e,n){var r=ope;if(n.length){var i=df(n,Dm(pR));r|=ape}return rd(t,r,e,n,i)});pR.placeholder={};var D7=pR,spe=sd(function(t,e){return Cl(e,function(n){n=ac(n),id(t,n,D7(t[n],t))}),t}),lpe=spe,upe=1,cpe=2,dpe=32,gR=cr(function(t,e,n){var r=upe|cpe;if(n.length){var i=df(n,Dm(gR));r|=dpe}return rd(e,r,t,n,i)});gR.placeholder={};var fpe=gR;function yl(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),n=n>i?i:n,n<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r=r?t:yl(t,e,n)}var hpe="\\ud800-\\udfff",ppe="\\u0300-\\u036f",gpe="\\ufe20-\\ufe2f",mpe="\\u20d0-\\u20ff",vpe=ppe+gpe+mpe,ype="\\ufe0e\\ufe0f",bpe="\\u200d",_pe=RegExp("["+bpe+hpe+vpe+ype+"]");function Bm(t){return _pe.test(t)}function Ope(t){return t.split("")}var L7="\\ud800-\\udfff",wpe="\\u0300-\\u036f",Spe="\\ufe20-\\ufe2f",xpe="\\u20d0-\\u20ff",Cpe=wpe+Spe+xpe,Epe="\\ufe0e\\ufe0f",Tpe="["+L7+"]",sk="["+Cpe+"]",lk="\\ud83c[\\udffb-\\udfff]",kpe="(?:"+sk+"|"+lk+")",I7="[^"+L7+"]",B7="(?:\\ud83c[\\udde6-\\uddff]){2}",F7="[\\ud800-\\udbff][\\udc00-\\udfff]",Ppe="\\u200d",V7=kpe+"?",j7="["+Epe+"]?",Ape="(?:"+Ppe+"(?:"+[I7,B7,F7].join("|")+")"+j7+V7+")*",Mpe=j7+V7+Ape,Rpe="(?:"+[I7+sk+"?",sk,B7,F7,Tpe].join("|")+")",$pe=RegExp(lk+"(?="+lk+")|"+Rpe+Mpe,"g");function Npe(t){return t.match($pe)||[]}function au(t){return Bm(t)?Npe(t):Ope(t)}function z7(t){return function(e){e=qr(e);var n=Bm(e)?au(e):void 0,r=n?n[0]:e.charAt(0),i=n?Df(n,1).join(""):e.slice(1);return r[t]()+i}}var Dpe=z7("toUpperCase"),mR=Dpe;function Q7(t){return mR(qr(t).toLowerCase())}function vR(t,e,n,r){var i=-1,o=t==null?0:t.length;for(r&&o&&(n=t[++i]);++i=e?t:e)),t}function Age(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=cl(n),n=n===n?n:0),e!==void 0&&(e=cl(e),e=e===e?e:0),_p(cl(t),e,n)}function Mge(){this.__data__=new od,this.size=0}function Rge(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function $ge(t){return this.__data__.get(t)}function Nge(t){return this.__data__.has(t)}var Dge=200;function Lge(t,e){var n=this.__data__;if(n instanceof od){var r=n.__data__;if(!d0||r.lengths))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&wve?new Kh:void 0;for(o.set(t,e),o.set(e,t);++d=e||E<0||d&&T>=o}function b(){var C=v1();if(y(C))return w(C);s=setTimeout(b,g(C))}function w(C){return s=void 0,f&&r?h(C):(r=i=void 0,a)}function O(){s!==void 0&&clearTimeout(s),u=0,r=l=i=s=void 0}function S(){return s===void 0?a:w(v1())}function x(){var C=v1(),E=y(C);if(r=arguments,i=this,l=C,E){if(s===void 0)return m(l);if(d)return clearTimeout(s),s=setTimeout(b,e),h(l)}return s===void 0&&(s=setTimeout(b,e)),a}return x.cancel=O,x.flush=S,x}function vye(t,e){return t==null||t!==t?e:t}var k9=Object.prototype,yye=k9.hasOwnProperty,bye=cr(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&xa(e[0],e[1],i)&&(r=1);++n=Aye&&(o=f0,a=!1,e=new Kh(e));e:for(;++i=0&&t.slice(n,i)==e}function qye(t,e){return Ci(e,function(n){return[n,t[n]]})}function Yye(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=[r,r]}),n}var Xye="[object Map]",Zye="[object Set]";function D9(t){return function(e){var n=Zu(e);return n==Xye?CR(e):n==Zye?Yye(e):qye(e,t(e))}}var Gye=D9(co),Gu=Gye,Kye=D9(ss),i5=Kye,Jye={"&":"&","<":"<",">":">",'"':""","'":"'"},e0e=yR(Jye),t0e=e0e,L9=/[&<>"']/g,n0e=RegExp(L9.source);function I9(t){return t=qr(t),t&&n0e.test(t)?t.replace(L9,t0e):t}var B9=/[\\^$.*+?()[\]{}|]/g,r0e=RegExp(B9.source);function i0e(t){return t=qr(t),t&&r0e.test(t)?t.replace(B9,"\\$&"):t}function F9(t,e){for(var n=-1,r=t==null?0:t.length;++ni?0:i+n),r=r===void 0||r>i?i:tr(r),r<0&&(r+=i),r=n>r?0:V9(r);n-1?i[o?e[a]:a]:void 0}}var c0e=Math.max;function DR(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:tr(n);return i<0&&(i=c0e(r+i,0)),vx(t,Un(e),i)}var d0e=z9(DR),hf=d0e;function Q9(t,e,n){var r;return n(t,function(i,o,a){if(e(i,o,a))return r=o,!1}),r}function f0e(t,e){return Q9(t,Un(e),sc)}var h0e=Math.max,p0e=Math.min;function kx(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r-1;return n!==void 0&&(i=tr(n),i=n<0?h0e(r+i,0):p0e(i,r-1)),vx(t,Un(e),i,!0)}var g0e=z9(kx),m0e=g0e;function v0e(t,e){return Q9(t,Un(e),NR)}function o5(t){return t&&t.length?t[0]:void 0}function H9(t,e){var n=-1,r=as(t)?Array(t.length):[];return If(t,function(i,o,a){r[++n]=e(i,o,a)}),r}function Ca(t,e){var n=Qn(t)?Ci:H9;return n(t,Un(e))}function W9(t,e){return zo(Ca(t,e),1)}var y0e=1/0;function b0e(t,e){return zo(Ca(t,e),y0e)}function _0e(t,e,n){return n=n===void 0?1:tr(n),zo(Ca(t,e),n)}var O0e=1/0;function U9(t){var e=t==null?0:t.length;return e?zo(t,O0e):[]}function w0e(t,e){var n=t==null?0:t.length;return n?(e=e===void 0?1:tr(e),zo(t,e)):[]}var S0e=512;function x0e(t){return rd(t,S0e)}var C0e=bR("floor"),E0e=C0e,T0e="Expected a function",k0e=8,P0e=32,A0e=128,M0e=256;function q9(t){return sd(function(e){var n=e.length,r=n,i=ml.prototype.thru;for(t&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new TypeError(T0e);if(i&&!a&&m1(o)=="wrapper")var a=new ml([],!0)}for(r=a?r:n;++re}function Ax(t){return function(e,n){return typeof e=="string"&&typeof n=="string"||(e=cl(e),n=cl(n)),t(e,n)}}var U0e=Ax(LR),q0e=U0e,Y0e=Ax(function(t,e){return t>=e}),X0e=Y0e,Z0e=Object.prototype,G0e=Z0e.hasOwnProperty;function K0e(t,e){return t!=null&&G0e.call(t,e)}function qg(t,e){return t!=null&&w9(t,e,K0e)}var J0e=Math.max,ebe=Math.min;function tbe(t,e,n){return t>=ebe(e,n)&&t-1:!!i&&Nm(t,e,n)>-1}var abe=Math.max;function Y9(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:tr(n);return i<0&&(i=abe(r+i,0)),Nm(t,e,i)}function sbe(t){var e=t==null?0:t.length;return e?yl(t,0,-1):[]}var lbe=Math.min;function BR(t,e,n){for(var r=n?$R:yx,i=t[0].length,o=t.length,a=o,s=Array(o),l=1/0,u=[];a--;){var c=t[a];a&&e&&(c=Ci(c,Ls(e))),l=lbe(c.length,l),s[a]=!n&&(e||i>=120&&c.length>=120)?new Kh(a&&c):void 0}c=t[0];var d=-1,f=s[0];e:for(;++d=-u5&&t<=u5}function Wc(t){return t===void 0}var i_e="[object WeakMap]";function o_e(t){return $i(t)&&Zu(t)==i_e}var a_e="[object WeakSet]";function s_e(t){return $i(t)&&ka(t)==a_e}var l_e=1;function u_e(t){return Un(typeof t=="function"?t:dl(t,l_e))}var c_e=Array.prototype,d_e=c_e.join;function f_e(t,e){return t==null?"":d_e.call(t,e)}var h_e=Fm(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()}),p_e=h_e,g_e=Cx(function(t,e,n){id(t,n,e)}),m_e=g_e;function v_e(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}var y_e=Math.max,b_e=Math.min;function __e(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=r;return n!==void 0&&(i=tr(n),i=i<0?y_e(r+i,0):b_e(i,r-1)),e===e?v_e(t,e,i):vx(t,O7,i,!0)}var O_e=Fm(function(t,e,n){return t+(n?" ":"")+e.toLowerCase()}),w_e=O_e,S_e=z7("toLowerCase"),x_e=S_e;function zR(t,e){return t=this.__values__.length,e=t?void 0:this.__values__[this.__index__++];return{done:t,value:e}}function iQ(t,e){var n=t.length;if(!!n)return e+=e<0?n:0,nd(e,n)?t[e]:void 0}function J_e(t,e){return t&&t.length?iQ(t,tr(e)):void 0}function eOe(t){return t=tr(t),cr(function(e){return iQ(e,t)})}function HR(t,e){return e=$f(e,t),t=G9(t,e),t==null||delete t[ac(ns(e))]}function tOe(t){return mb(t)?void 0:t}var nOe=1,rOe=2,iOe=4,oOe=sd(function(t,e){var n={};if(t==null)return n;var r=!1;e=Ci(e,function(o){return o=$f(o,t),r||(r=o.length>1),o}),oc(t,wR(t),n),r&&(n=dl(n,nOe|rOe|iOe,tOe));for(var i=e.length;i--;)HR(n,e[i]);return n}),oQ=oOe;function Ob(t,e,n,r){if(!_i(t))return t;e=$f(e,t);for(var i=-1,o=e.length,a=o-1,s=t;s!=null&&++ie||o&&a&&l&&!s&&!u||r&&a&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&t=s)return l;var u=n[r];return l*(u=="desc"?-1:1)}}return t.index-e.index}function uQ(t,e,n){e.length?e=Ci(e,function(o){return Qn(o)?function(a){return bp(a,o.length===1?o[0]:o)}:o}):e=[Pa];var r=-1;e=Ci(e,Ls(Un));var i=H9(t,function(o,a,s){var l=Ci(e,function(u){return u(o)});return{criteria:l,index:++r,value:o}});return lOe(i,function(o,a){return uOe(o,a,n)})}function cOe(t,e,n,r){return t==null?[]:(Qn(e)||(e=e==null?[]:[e]),n=r?void 0:n,Qn(n)||(n=n==null?[]:[n]),uQ(t,e,n))}function WR(t){return sd(function(e){return e=Ci(e,Ls(Un)),cr(function(n){var r=this;return t(e,function(i){return Ds(i,r,n)})})})}var dOe=WR(Ci),fOe=dOe,hOe=cr,pOe=hOe,gOe=Math.min,mOe=pOe(function(t,e){e=e.length==1&&Qn(e[0])?Ci(e[0],Ls(Un)):Ci(zo(e,1),Ls(Un));var n=e.length;return cr(function(r){for(var i=-1,o=gOe(r.length,n);++iwOe)return n;do e%2&&(n+=t),e=SOe(e/2),e&&(t+=t);while(e);return n}var xOe=PR("length"),COe=xOe,cQ="\\ud800-\\udfff",EOe="\\u0300-\\u036f",TOe="\\ufe20-\\ufe2f",kOe="\\u20d0-\\u20ff",POe=EOe+TOe+kOe,AOe="\\ufe0e\\ufe0f",MOe="["+cQ+"]",mk="["+POe+"]",vk="\\ud83c[\\udffb-\\udfff]",ROe="(?:"+mk+"|"+vk+")",dQ="[^"+cQ+"]",fQ="(?:\\ud83c[\\udde6-\\uddff]){2}",hQ="[\\ud800-\\udbff][\\udc00-\\udfff]",$Oe="\\u200d",pQ=ROe+"?",gQ="["+AOe+"]?",NOe="(?:"+$Oe+"(?:"+[dQ,fQ,hQ].join("|")+")"+gQ+pQ+")*",DOe=gQ+pQ+NOe,LOe="(?:"+[dQ+mk+"?",mk,fQ,hQ,MOe].join("|")+")",c5=RegExp(vk+"(?="+vk+")|"+LOe+DOe,"g");function IOe(t){for(var e=c5.lastIndex=0;c5.test(t);)++e;return e}function jm(t){return Bm(t)?IOe(t):COe(t)}var BOe=Math.ceil;function hw(t,e){e=e===void 0?" ":Ns(e);var n=e.length;if(n<2)return n?gk(e,t):e;var r=gk(e,BOe(t/jm(e)));return Bm(e)?Df(au(r),0,t).join(""):r.slice(0,t)}var FOe=Math.ceil,VOe=Math.floor;function jOe(t,e,n){t=qr(t),e=tr(e);var r=e?jm(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return hw(VOe(i),n)+t+hw(FOe(i),n)}function zOe(t,e,n){t=qr(t),e=tr(e);var r=e?jm(t):0;return e&&r-1;)s!==t&&d5.call(s,l,1),d5.call(t,l,1);return t}function vQ(t,e){return t&&t.length&&e&&e.length?YR(t,e):t}var i1e=cr(vQ),o1e=i1e;function a1e(t,e,n){return t&&t.length&&e&&e.length?YR(t,e,Un(n)):t}function s1e(t,e,n){return t&&t.length&&e&&e.length?YR(t,e,void 0,n):t}var l1e=Array.prototype,u1e=l1e.splice;function yQ(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;nd(i)?u1e.call(t,i,1):HR(t,i)}}return t}var c1e=sd(function(t,e){var n=t==null?0:t.length,r=dR(t,e);return yQ(t,Ci(e,function(i){return nd(i,n)?+i:i}).sort(lQ)),r}),d1e=c1e,f1e=Math.floor,h1e=Math.random;function XR(t,e){return t+f1e(h1e()*(e-t+1))}var p1e=parseFloat,g1e=Math.min,m1e=Math.random;function v1e(t,e,n){if(n&&typeof n!="boolean"&&xa(t,e,n)&&(e=n=void 0),n===void 0&&(typeof e=="boolean"?(n=e,e=void 0):typeof t=="boolean"&&(n=t,t=void 0)),t===void 0&&e===void 0?(t=0,e=1):(t=Fc(t),e===void 0?(e=t,t=0):e=Fc(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=m1e();return g1e(t+i*(e-t+p1e("1e-"+((i+"").length-1))),e)}return XR(t,e)}var y1e=Math.ceil,b1e=Math.max;function _1e(t,e,n,r){for(var i=-1,o=b1e(y1e((e-t)/(n||1)),0),a=Array(o);o--;)a[r?o:++i]=t,t+=n;return a}function bQ(t){return function(e,n,r){return r&&typeof r!="number"&&xa(e,n,r)&&(n=r=void 0),e=Fc(e),n===void 0?(n=e,e=0):n=Fc(n),r=r===void 0?e1&&xa(t,e[0],e[1])?e=[]:n>2&&xa(e[0],e[1],e[2])&&(e=[e[0]]),uQ(t,zo(e,1),[])}),SQ=iwe,owe=4294967295,awe=owe-1,swe=Math.floor,lwe=Math.min;function GR(t,e,n,r){var i=0,o=t==null?0:t.length;if(o===0)return 0;e=n(e);for(var a=e!==e,s=e===null,l=$s(e),u=e===void 0;i>>1;function Nx(t,e,n){var r=0,i=t==null?r:t.length;if(typeof e=="number"&&e===e&&i<=cwe){for(;r>>1,a=t[o];a!==null&&!$s(a)&&(n?a<=e:a>>0,n?(t=qr(t),t&&(typeof e=="string"||e!=null&&!jR(e))&&(e=Ns(e),!e&&Bm(t))?Df(au(t),0,n):t.split(e,n)):[]}var Owe="Expected a function",wwe=Math.max;function Swe(t,e){if(typeof t!="function")throw new TypeError(Owe);return e=e==null?0:wwe(tr(e),0),cr(function(n){var r=n[e],i=Df(n,0,e);return r&&Nf(i,r),Ds(t,this,i)})}var xwe=Fm(function(t,e,n){return t+(n?" ":"")+mR(e)}),Cwe=xwe;function Ewe(t,e,n){return t=qr(t),n=n==null?0:_p(tr(n),0,t.length),e=Ns(e),t.slice(n,n+e.length)==e}function Twe(){return{}}function kwe(){return""}function Pwe(){return!0}var Awe=gx(function(t,e){return t-e},0),Mwe=Awe;function Rwe(t){return t&&t.length?QR(t,Pa):0}function $we(t,e){return t&&t.length?QR(t,Un(e)):0}function Nwe(t){var e=t==null?0:t.length;return e?yl(t,1,e):[]}function Dwe(t,e,n){return t&&t.length?(e=n||e===void 0?1:tr(e),yl(t,0,e<0?0:e)):[]}function Lwe(t,e,n){var r=t==null?0:t.length;return r?(e=n||e===void 0?1:tr(e),e=r-e,yl(t,e<0?0:e,r)):[]}function Iwe(t,e){return t&&t.length?Tx(t,Un(e),!1,!0):[]}function Bwe(t,e){return t&&t.length?Tx(t,Un(e)):[]}function Fwe(t,e){return e(t),t}var CQ=Object.prototype,Vwe=CQ.hasOwnProperty;function f5(t,e,n,r){return t===void 0||fu(t,CQ[n])&&!Vwe.call(r,n)?e:t}var jwe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function zwe(t){return"\\"+jwe[t]}var Qwe=/<%=([\s\S]+?)%>/g,EQ=Qwe,Hwe=/<%-([\s\S]+?)%>/g,Wwe=Hwe,Uwe=/<%([\s\S]+?)%>/g,qwe=Uwe,Ywe={escape:Wwe,evaluate:qwe,interpolate:EQ,variable:"",imports:{_:{escape:I9}}},bk=Ywe,Xwe="Invalid `variable` option passed into `_.template`",Zwe=/\b__p \+= '';/g,Gwe=/\b(__p \+=) '' \+/g,Kwe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Jwe=/[()=,{}\[\]\/\s]/,eSe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Z_=/($^)/,tSe=/['\n\r\u2028\u2029\\]/g,nSe=Object.prototype,h5=nSe.hasOwnProperty;function rSe(t,e,n){var r=bk.imports._.templateSettings||bk;n&&xa(t,e,n)&&(e=void 0),t=qr(t),e=cw({},e,r,f5);var i=cw({},e.imports,r.imports,f5),o=co(i),a=IR(i,o),s,l,u=0,c=e.interpolate||Z_,d="__p += '",f=RegExp((e.escape||Z_).source+"|"+c.source+"|"+(c===EQ?eSe:Z_).source+"|"+(e.evaluate||Z_).source+"|$","g"),h=h5.call(e,"sourceURL")?"//# sourceURL="+(e.sourceURL+"").replace(/\s/g," ")+` `:"";t.replace(f,function(y,b,w,O,S,x){return w||(w=O),d+=t.slice(u,x).replace(tSe,zwe),b&&(s=!0,d+=`' + __e(`+b+`) + '`),S&&(l=!0,d+=`'; `+S+`; __p += '`),w&&(d+=`' + ((__t = (`+w+`)) == null ? '' : __t) + '`),u=x+y.length,y}),d+=`'; `;var m=h5.call(e,"variable")&&e.variable;if(!m)d=`with (obj) { `+d+` } `;else if(Jwe.test(m))throw new Error(Xwe);d=(l?d.replace(Zwe,""):d).replace(Gwe,"$1").replace(Kwe,"$1;"),d="function("+(m||"obj")+`) { `+(m?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(l?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+d+`return __p }`;var g=$7(function(){return Function(o,h+"return "+d).apply(void 0,a)});if(g.source=d,hR(g))throw g;return g}var iSe="Expected a function";function Vc(t,e,n){var r=!0,i=!0;if(typeof t!="function")throw new TypeError(iSe);return _i(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),jo(t,e,{leading:r,maxWait:e,trailing:i})}function wb(t,e){return e(t)}var oSe=9007199254740991,pT=4294967295,aSe=Math.min;function sSe(t,e){if(t=tr(t),t<1||t>oSe)return[];var n=pT,r=aSe(t,pT);e=lc(e),t-=pT;for(var i=sR(r,e);++n-1;);return n}function PQ(t,e){for(var n=-1,r=t.length;++n-1;);return n}function pSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return h7(t);if(!t||!(e=Ns(e)))return t;var r=au(t),i=au(e),o=PQ(r,i),a=kQ(r,i)+1;return Df(r,o,a).join("")}function gSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return t.slice(0,f7(t)+1);if(!t||!(e=Ns(e)))return t;var r=au(t),i=kQ(r,au(e))+1;return Df(r,0,i).join("")}var mSe=/^\s+/;function vSe(t,e,n){if(t=qr(t),t&&(n||e===void 0))return t.replace(mSe,"");if(!t||!(e=Ns(e)))return t;var r=au(t),i=PQ(r,au(e));return Df(r,i).join("")}var ySe=30,bSe="...",_Se=/\w*$/;function OSe(t,e){var n=ySe,r=bSe;if(_i(e)){var i="separator"in e?e.separator:i;n="length"in e?tr(e.length):n,r="omission"in e?Ns(e.omission):r}t=qr(t);var o=t.length;if(Bm(t)){var a=au(t);o=a.length}if(n>=o)return t;var s=n-jm(r);if(s<1)return r;var l=a?Df(a,0,s).join(""):t.slice(0,s);if(i===void 0)return l+r;if(a&&(s+=l.length-s),jR(i)){if(t.slice(s).search(i)){var u,c=l;for(i.global||(i=RegExp(i.source,qr(_Se.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var d=u.index;l=l.slice(0,d===void 0?s:d)}}else if(t.indexOf(Ns(i),s)!=s){var f=l.lastIndexOf(i);f>-1&&(l=l.slice(0,f))}return l+r}function wSe(t){return x7(t,1)}var SSe={"&":"&","<":"<",">":">",""":'"',"'":"'"},xSe=yR(SSe),CSe=xSe,AQ=/&(?:amp|lt|gt|quot|#39);/g,ESe=RegExp(AQ.source);function TSe(t){return t=qr(t),t&&ESe.test(t)?t.replace(AQ,CSe):t}var kSe=1/0,PSe=Pg&&1/xx(new Pg([,-0]))[1]==kSe?function(t){return new Pg(t)}:Tg,ASe=PSe,MSe=200;function pf(t,e,n){var r=-1,i=yx,o=t.length,a=!0,s=[],l=s;if(n)a=!1,i=$R;else if(o>=MSe){var u=e?null:ASe(t);if(u)return xx(u);a=!1,i=f0,l=new Kh}else l=e?[]:s;e:for(;++r1||this.__actions__.length||!(r instanceof Sr)||!nd(n)?this.thru(i):(r=r.slice(n,+n+(e?1:0)),r.__actions__.push({func:wb,args:[i],thisArg:void 0}),new ml(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(void 0),o}))}),JSe=KSe;function exe(){return o9(this)}function txe(){var t=this.__wrapped__;if(t instanceof Sr){var e=t;return this.__actions__.length&&(e=new Sr(this)),e=e.reverse(),e.__actions__.push({func:wb,args:[yk],thisArg:void 0}),new ml(e,this.__chain__)}return this.thru(yk)}function JR(t,e,n){var r=t.length;if(r<2)return r?pf(t[0]):[];for(var i=-1,o=Array(r);++i1?t[e-1]:void 0;return n=typeof n=="function"?(t.pop(),n):void 0,MQ(t,n)}),hxe=fxe,cn={chunk:Pge,compact:mve,concat:vve,difference:Rye,differenceBy:Nye,differenceWith:Lye,drop:Fye,dropRight:Vye,dropRightWhile:jye,dropWhile:zye,fill:u0e,findIndex:DR,findLastIndex:kx,first:o5,flatten:fR,flattenDeep:U9,flattenDepth:w0e,fromPairs:Ug,head:o5,indexOf:Y9,initial:sbe,intersection:cbe,intersectionBy:fbe,intersectionWith:pbe,join:f_e,last:ns,lastIndexOf:__e,nth:J_e,pull:o1e,pullAll:vQ,pullAllBy:a1e,pullAllWith:s1e,pullAt:d1e,remove:M1e,reverse:yk,slice:J1e,sortedIndex:dwe,sortedIndexBy:fwe,sortedIndexOf:hwe,sortedLastIndex:pwe,sortedLastIndexBy:gwe,sortedLastIndexOf:mwe,sortedUniq:vwe,sortedUniqBy:ywe,tail:Nwe,take:Dwe,takeRight:Lwe,takeRightWhile:Iwe,takeWhile:Bwe,union:y1,unionBy:NSe,unionWith:LSe,uniq:ISe,uniqBy:BSe,uniqWith:FSe,unzip:KR,unzipWith:MQ,without:ZSe,xor:rxe,xorBy:oxe,xorWith:sxe,zip:uxe,zipObject:cxe,zipObjectDeep:dxe,zipWith:hxe},ei={countBy:uye,each:jn,eachRight:r5,every:a0e,filter:Jv,find:hf,findLast:m0e,flatMap:W9,flatMapDeep:b0e,flatMapDepth:_0e,forEach:jn,forEachRight:r5,groupBy:W0e,includes:obe,invokeMap:Tbe,keyBy:m_e,map:Ca,orderBy:cOe,partition:GOe,reduce:OQ,reduceRight:P1e,reject:A1e,sample:z1e,sampleSize:W1e,shuffle:X1e,size:K1e,some:rwe,sortBy:SQ},pxe={now:v1},Di={after:Dce,ary:x7,before:N7,bind:D7,bindKey:fpe,curry:MR,curryRight:RR,debounce:jo,defer:Tye,delay:Pye,flip:x0e,memoize:gb,negate:_b,once:sOe,overArgs:vOe,partial:mQ,partialRight:XOe,rearg:T1e,rest:D1e,spread:Swe,throttle:Vc,unary:wSe,wrap:GSe},Cn={castArray:$o,clone:fk,cloneDeep:Fn,cloneDeepWith:fve,cloneWith:pve,conformsTo:tye,eq:fu,gt:q0e,gte:X0e,isArguments:Zh,isArray:Qn,isArrayBuffer:Mbe,isArrayLike:as,isArrayLikeObject:zi,isBoolean:fw,isBuffer:ff,isDate:Lbe,isElement:Ibe,isEmpty:VR,isEqual:so,isEqualWith:zbe,isError:hR,isFinite:Hbe,isFunction:td,isInteger:K9,isLength:_x,isMap:h9,isMatch:Wbe,isMatchWith:Ube,isNaN:Ybe,isNative:Kbe,isNil:Dr,isNull:Jbe,isNumber:J9,isObject:_i,isObjectLike:$i,isPlainObject:mb,isRegExp:jR,isSafeInteger:r_e,isSet:p9,isString:Mx,isSymbol:$s,isTypedArray:Im,isUndefined:Wc,isWeakMap:o_e,isWeakSet:s_e,lt:E_e,lte:k_e,toArray:rQ,toFinite:Fc,toInteger:tr,toLength:V9,toNumber:cl,toPlainObject:P9,toSafeInteger:dSe,toString:qr},Aa={add:Ece,ceil:Ege,divide:Bye,floor:E0e,max:N_e,maxBy:D_e,mean:I_e,meanBy:B_e,min:H_e,minBy:W_e,multiply:q_e,round:V1e,subtract:Mwe,sum:Rwe,sumBy:$we},e$={clamp:Age,inRange:nbe,random:v1e},Hn={assign:$r,assignIn:N4,assignInWith:cw,assignWith:che,at:Yhe,create:cye,defaults:_ye,defaultsDeep:xye,entries:Gu,entriesIn:i5,extend:N4,extendWith:cw,findKey:f0e,findLastKey:v0e,forIn:L0e,forInRight:I0e,forOwn:B0e,forOwnRight:F0e,functions:V0e,functionsIn:j0e,get:Wr,has:qg,hasIn:kR,invert:bbe,invertBy:Sbe,invoke:Cbe,keys:co,keysIn:ss,mapKeys:eQ,mapValues:P_e,merge:Jh,mergeWith:M9,omit:oQ,omitBy:aOe,pick:vo,pickBy:sQ,result:L1e,set:ZR,setWith:U1e,toPairs:Gu,toPairsIn:i5,transform:hSe,unset:zSe,update:HSe,updateWith:WSe,values:Vm,valuesIn:YSe},uc={at:JSe,chain:o9,commit:gve,lodash:pe,next:K_e,plant:e1e,reverse:txe,tap:Fwe,thru:wb,toIterator:lSe,toJSON:gT,value:gT,valueOf:gT,wrapperChain:exe},jr={camelCase:wge,capitalize:Q7,deburr:H7,endsWith:Uye,escape:I9,escapeRegExp:i0e,kebabCase:p_e,lowerCase:w_e,lowerFirst:x_e,pad:jOe,padEnd:zOe,padStart:QOe,parseInt:UOe,repeat:R1e,replace:$1e,snakeCase:twe,split:_we,startCase:Cwe,startsWith:Ewe,template:rSe,templateSettings:bk,toLower:uSe,toUpper:fSe,trim:pSe,trimEnd:gSe,trimStart:vSe,truncate:OSe,unescape:TSe,upperCase:qSe,upperFirst:mR,words:i9},Yr={attempt:$7,bindAll:lpe,cond:Gve,conforms:eye,constant:oR,defaultTo:vye,flow:$0e,flowRight:D0e,identity:Pa,iteratee:u_e,matches:M_e,matchesProperty:$_e,method:j_e,methodOf:Q_e,mixin:nQ,noop:Tg,nthArg:eOe,over:fOe,overEvery:bOe,overSome:OOe,property:x9,propertyOf:t1e,range:w1e,rangeRight:x1e,stubArray:_R,stubFalse:lR,stubObject:Twe,stubString:kwe,stubTrue:Pwe,times:sSe,toPath:cSe,uniqueId:jSe};function gxe(){var t=new Sr(this.__wrapped__);return t.__actions__=Xa(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Xa(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Xa(this.__views__),t}function mxe(){if(this.__filtered__){var t=new Sr(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}var vxe=Math.max,yxe=Math.min;function bxe(t,e,n){for(var r=-1,i=n.length;++r * Build: `lodash modularize exports="es" -o ./` * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */var xxe="4.17.21",Cxe=2,Exe=1,Txe=3,NQ=4294967295,kxe=Array.prototype,Pxe=Object.prototype,DQ=Pxe.hasOwnProperty,g5=sa?sa.iterator:void 0,Axe=Math.max,m5=Math.min,t$=function(t){return function(e,n,r){if(r==null){var i=_i(n),o=i&&co(n),a=o&&o.length&&Px(n,o);(a?a.length:i)||(r=n,n=e,e=this)}return t(e,n,r)}}(nQ);pe.after=Di.after;pe.ary=Di.ary;pe.assign=Hn.assign;pe.assignIn=Hn.assignIn;pe.assignInWith=Hn.assignInWith;pe.assignWith=Hn.assignWith;pe.at=Hn.at;pe.before=Di.before;pe.bind=Di.bind;pe.bindAll=Yr.bindAll;pe.bindKey=Di.bindKey;pe.castArray=Cn.castArray;pe.chain=uc.chain;pe.chunk=cn.chunk;pe.compact=cn.compact;pe.concat=cn.concat;pe.cond=Yr.cond;pe.conforms=Yr.conforms;pe.constant=Yr.constant;pe.countBy=ei.countBy;pe.create=Hn.create;pe.curry=Di.curry;pe.curryRight=Di.curryRight;pe.debounce=Di.debounce;pe.defaults=Hn.defaults;pe.defaultsDeep=Hn.defaultsDeep;pe.defer=Di.defer;pe.delay=Di.delay;pe.difference=cn.difference;pe.differenceBy=cn.differenceBy;pe.differenceWith=cn.differenceWith;pe.drop=cn.drop;pe.dropRight=cn.dropRight;pe.dropRightWhile=cn.dropRightWhile;pe.dropWhile=cn.dropWhile;pe.fill=cn.fill;pe.filter=ei.filter;pe.flatMap=ei.flatMap;pe.flatMapDeep=ei.flatMapDeep;pe.flatMapDepth=ei.flatMapDepth;pe.flatten=cn.flatten;pe.flattenDeep=cn.flattenDeep;pe.flattenDepth=cn.flattenDepth;pe.flip=Di.flip;pe.flow=Yr.flow;pe.flowRight=Yr.flowRight;pe.fromPairs=cn.fromPairs;pe.functions=Hn.functions;pe.functionsIn=Hn.functionsIn;pe.groupBy=ei.groupBy;pe.initial=cn.initial;pe.intersection=cn.intersection;pe.intersectionBy=cn.intersectionBy;pe.intersectionWith=cn.intersectionWith;pe.invert=Hn.invert;pe.invertBy=Hn.invertBy;pe.invokeMap=ei.invokeMap;pe.iteratee=Yr.iteratee;pe.keyBy=ei.keyBy;pe.keys=co;pe.keysIn=Hn.keysIn;pe.map=ei.map;pe.mapKeys=Hn.mapKeys;pe.mapValues=Hn.mapValues;pe.matches=Yr.matches;pe.matchesProperty=Yr.matchesProperty;pe.memoize=Di.memoize;pe.merge=Hn.merge;pe.mergeWith=Hn.mergeWith;pe.method=Yr.method;pe.methodOf=Yr.methodOf;pe.mixin=t$;pe.negate=_b;pe.nthArg=Yr.nthArg;pe.omit=Hn.omit;pe.omitBy=Hn.omitBy;pe.once=Di.once;pe.orderBy=ei.orderBy;pe.over=Yr.over;pe.overArgs=Di.overArgs;pe.overEvery=Yr.overEvery;pe.overSome=Yr.overSome;pe.partial=Di.partial;pe.partialRight=Di.partialRight;pe.partition=ei.partition;pe.pick=Hn.pick;pe.pickBy=Hn.pickBy;pe.property=Yr.property;pe.propertyOf=Yr.propertyOf;pe.pull=cn.pull;pe.pullAll=cn.pullAll;pe.pullAllBy=cn.pullAllBy;pe.pullAllWith=cn.pullAllWith;pe.pullAt=cn.pullAt;pe.range=Yr.range;pe.rangeRight=Yr.rangeRight;pe.rearg=Di.rearg;pe.reject=ei.reject;pe.remove=cn.remove;pe.rest=Di.rest;pe.reverse=cn.reverse;pe.sampleSize=ei.sampleSize;pe.set=Hn.set;pe.setWith=Hn.setWith;pe.shuffle=ei.shuffle;pe.slice=cn.slice;pe.sortBy=ei.sortBy;pe.sortedUniq=cn.sortedUniq;pe.sortedUniqBy=cn.sortedUniqBy;pe.split=jr.split;pe.spread=Di.spread;pe.tail=cn.tail;pe.take=cn.take;pe.takeRight=cn.takeRight;pe.takeRightWhile=cn.takeRightWhile;pe.takeWhile=cn.takeWhile;pe.tap=uc.tap;pe.throttle=Di.throttle;pe.thru=wb;pe.toArray=Cn.toArray;pe.toPairs=Hn.toPairs;pe.toPairsIn=Hn.toPairsIn;pe.toPath=Yr.toPath;pe.toPlainObject=Cn.toPlainObject;pe.transform=Hn.transform;pe.unary=Di.unary;pe.union=cn.union;pe.unionBy=cn.unionBy;pe.unionWith=cn.unionWith;pe.uniq=cn.uniq;pe.uniqBy=cn.uniqBy;pe.uniqWith=cn.uniqWith;pe.unset=Hn.unset;pe.unzip=cn.unzip;pe.unzipWith=cn.unzipWith;pe.update=Hn.update;pe.updateWith=Hn.updateWith;pe.values=Hn.values;pe.valuesIn=Hn.valuesIn;pe.without=cn.without;pe.words=jr.words;pe.wrap=Di.wrap;pe.xor=cn.xor;pe.xorBy=cn.xorBy;pe.xorWith=cn.xorWith;pe.zip=cn.zip;pe.zipObject=cn.zipObject;pe.zipObjectDeep=cn.zipObjectDeep;pe.zipWith=cn.zipWith;pe.entries=Hn.toPairs;pe.entriesIn=Hn.toPairsIn;pe.extend=Hn.assignIn;pe.extendWith=Hn.assignInWith;t$(pe,pe);pe.add=Aa.add;pe.attempt=Yr.attempt;pe.camelCase=jr.camelCase;pe.capitalize=jr.capitalize;pe.ceil=Aa.ceil;pe.clamp=e$.clamp;pe.clone=Cn.clone;pe.cloneDeep=Cn.cloneDeep;pe.cloneDeepWith=Cn.cloneDeepWith;pe.cloneWith=Cn.cloneWith;pe.conformsTo=Cn.conformsTo;pe.deburr=jr.deburr;pe.defaultTo=Yr.defaultTo;pe.divide=Aa.divide;pe.endsWith=jr.endsWith;pe.eq=Cn.eq;pe.escape=jr.escape;pe.escapeRegExp=jr.escapeRegExp;pe.every=ei.every;pe.find=ei.find;pe.findIndex=cn.findIndex;pe.findKey=Hn.findKey;pe.findLast=ei.findLast;pe.findLastIndex=cn.findLastIndex;pe.findLastKey=Hn.findLastKey;pe.floor=Aa.floor;pe.forEach=ei.forEach;pe.forEachRight=ei.forEachRight;pe.forIn=Hn.forIn;pe.forInRight=Hn.forInRight;pe.forOwn=Hn.forOwn;pe.forOwnRight=Hn.forOwnRight;pe.get=Hn.get;pe.gt=Cn.gt;pe.gte=Cn.gte;pe.has=Hn.has;pe.hasIn=Hn.hasIn;pe.head=cn.head;pe.identity=Pa;pe.includes=ei.includes;pe.indexOf=cn.indexOf;pe.inRange=e$.inRange;pe.invoke=Hn.invoke;pe.isArguments=Cn.isArguments;pe.isArray=Qn;pe.isArrayBuffer=Cn.isArrayBuffer;pe.isArrayLike=Cn.isArrayLike;pe.isArrayLikeObject=Cn.isArrayLikeObject;pe.isBoolean=Cn.isBoolean;pe.isBuffer=Cn.isBuffer;pe.isDate=Cn.isDate;pe.isElement=Cn.isElement;pe.isEmpty=Cn.isEmpty;pe.isEqual=Cn.isEqual;pe.isEqualWith=Cn.isEqualWith;pe.isError=Cn.isError;pe.isFinite=Cn.isFinite;pe.isFunction=Cn.isFunction;pe.isInteger=Cn.isInteger;pe.isLength=Cn.isLength;pe.isMap=Cn.isMap;pe.isMatch=Cn.isMatch;pe.isMatchWith=Cn.isMatchWith;pe.isNaN=Cn.isNaN;pe.isNative=Cn.isNative;pe.isNil=Cn.isNil;pe.isNull=Cn.isNull;pe.isNumber=Cn.isNumber;pe.isObject=_i;pe.isObjectLike=Cn.isObjectLike;pe.isPlainObject=Cn.isPlainObject;pe.isRegExp=Cn.isRegExp;pe.isSafeInteger=Cn.isSafeInteger;pe.isSet=Cn.isSet;pe.isString=Cn.isString;pe.isSymbol=Cn.isSymbol;pe.isTypedArray=Cn.isTypedArray;pe.isUndefined=Cn.isUndefined;pe.isWeakMap=Cn.isWeakMap;pe.isWeakSet=Cn.isWeakSet;pe.join=cn.join;pe.kebabCase=jr.kebabCase;pe.last=ns;pe.lastIndexOf=cn.lastIndexOf;pe.lowerCase=jr.lowerCase;pe.lowerFirst=jr.lowerFirst;pe.lt=Cn.lt;pe.lte=Cn.lte;pe.max=Aa.max;pe.maxBy=Aa.maxBy;pe.mean=Aa.mean;pe.meanBy=Aa.meanBy;pe.min=Aa.min;pe.minBy=Aa.minBy;pe.stubArray=Yr.stubArray;pe.stubFalse=Yr.stubFalse;pe.stubObject=Yr.stubObject;pe.stubString=Yr.stubString;pe.stubTrue=Yr.stubTrue;pe.multiply=Aa.multiply;pe.nth=cn.nth;pe.noop=Yr.noop;pe.now=pxe.now;pe.pad=jr.pad;pe.padEnd=jr.padEnd;pe.padStart=jr.padStart;pe.parseInt=jr.parseInt;pe.random=e$.random;pe.reduce=ei.reduce;pe.reduceRight=ei.reduceRight;pe.repeat=jr.repeat;pe.replace=jr.replace;pe.result=Hn.result;pe.round=Aa.round;pe.sample=ei.sample;pe.size=ei.size;pe.snakeCase=jr.snakeCase;pe.some=ei.some;pe.sortedIndex=cn.sortedIndex;pe.sortedIndexBy=cn.sortedIndexBy;pe.sortedIndexOf=cn.sortedIndexOf;pe.sortedLastIndex=cn.sortedLastIndex;pe.sortedLastIndexBy=cn.sortedLastIndexBy;pe.sortedLastIndexOf=cn.sortedLastIndexOf;pe.startCase=jr.startCase;pe.startsWith=jr.startsWith;pe.subtract=Aa.subtract;pe.sum=Aa.sum;pe.sumBy=Aa.sumBy;pe.template=jr.template;pe.times=Yr.times;pe.toFinite=Cn.toFinite;pe.toInteger=tr;pe.toLength=Cn.toLength;pe.toLower=jr.toLower;pe.toNumber=Cn.toNumber;pe.toSafeInteger=Cn.toSafeInteger;pe.toString=Cn.toString;pe.toUpper=jr.toUpper;pe.trim=jr.trim;pe.trimEnd=jr.trimEnd;pe.trimStart=jr.trimStart;pe.truncate=jr.truncate;pe.unescape=jr.unescape;pe.uniqueId=Yr.uniqueId;pe.upperCase=jr.upperCase;pe.upperFirst=jr.upperFirst;pe.each=ei.forEach;pe.eachRight=ei.forEachRight;pe.first=cn.head;t$(pe,function(){var t={};return sc(pe,function(e,n){DQ.call(pe.prototype,n)||(t[n]=e)}),t}(),{chain:!1});pe.VERSION=xxe;(pe.templateSettings=jr.templateSettings).imports._=pe;Cl(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){pe[t].placeholder=pe});Cl(["drop","take"],function(t,e){Sr.prototype[t]=function(n){n=n===void 0?1:Axe(tr(n),0);var r=this.__filtered__&&!e?new Sr(this):this.clone();return r.__filtered__?r.__takeCount__=m5(n,r.__takeCount__):r.__views__.push({size:m5(n,NQ),type:t+(r.__dir__<0?"Right":"")}),r},Sr.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}});Cl(["filter","map","takeWhile"],function(t,e){var n=e+1,r=n==Exe||n==Txe;Sr.prototype[t]=function(i){var o=this.clone();return o.__iteratees__.push({iteratee:Un(i),type:n}),o.__filtered__=o.__filtered__||r,o}});Cl(["head","last"],function(t,e){var n="take"+(e?"Right":"");Sr.prototype[t]=function(){return this[n](1).value()[0]}});Cl(["initial","tail"],function(t,e){var n="drop"+(e?"":"Right");Sr.prototype[t]=function(){return this.__filtered__?new Sr(this):this[n](1)}});Sr.prototype.compact=function(){return this.filter(Pa)};Sr.prototype.find=function(t){return this.filter(t).head()};Sr.prototype.findLast=function(t){return this.reverse().find(t)};Sr.prototype.invokeMap=cr(function(t,e){return typeof t=="function"?new Sr(this):this.map(function(n){return bb(n,t,e)})});Sr.prototype.reject=function(t){return this.filter(_b(Un(t)))};Sr.prototype.slice=function(t,e){t=tr(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Sr(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==void 0&&(e=tr(e),n=e<0?n.dropRight(-e):n.take(e-t)),n)};Sr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()};Sr.prototype.toArray=function(){return this.take(NQ)};sc(Sr.prototype,function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=pe[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);!i||(pe.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,l=a instanceof Sr,u=s[0],c=l||Qn(a),d=function(b){var w=i.apply(pe,Nf([b],s));return r&&f?w[0]:w};c&&n&&typeof u=="function"&&u.length!=1&&(l=c=!1);var f=this.__chain__,h=!!this.__actions__.length,m=o&&!f,g=l&&!h;if(!o&&c){a=g?a:new Sr(this);var y=t.apply(a,s);return y.__actions__.push({func:wb,args:[d],thisArg:void 0}),new ml(y,f)}return m&&g?t.apply(this,s):(y=this.thru(d),m?r?y.value()[0]:y.value():y)})});Cl(["pop","push","shift","sort","splice","unshift"],function(t){var e=kxe[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);pe.prototype[t]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(Qn(o)?o:[],i)}return this[n](function(a){return e.apply(Qn(a)?a:[],i)})}});sc(Sr.prototype,function(t,e){var n=pe[e];if(n){var r=n.name+"";DQ.call(kg,r)||(kg[r]=[]),kg[r].push({name:e,func:n})}});kg[bx(void 0,Cxe).name]=[{name:"wrapper",func:void 0}];Sr.prototype.clone=gxe;Sr.prototype.reverse=mxe;Sr.prototype.value=Sxe;pe.prototype.at=uc.at;pe.prototype.chain=uc.wrapperChain;pe.prototype.commit=uc.commit;pe.prototype.next=uc.next;pe.prototype.plant=uc.plant;pe.prototype.reverse=uc.reverse;pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=uc.value;pe.prototype.first=pe.prototype.head;g5&&(pe.prototype[g5]=uc.toIterator);const ai=t=>t===void 0,si=t=>typeof t=="boolean",kt=t=>typeof t=="number",xs=t=>!t&&t!==0||ut(t)&&t.length===0||sn(t)&&!Object.keys(t).length,As=t=>typeof Element=="undefined"?!1:t instanceof Element,ep=t=>Dr(t),Mxe=t=>At(t)?!Number.isNaN(Number(t)):!1,Dx=t=>t===window,gf=t=>Tn?window.requestAnimationFrame(t):setTimeout(t,16),tp=t=>Tn?window.cancelAnimationFrame(t):clearTimeout(t),n$=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Du=t=>db(t),Yg=t=>Object.keys(t),Rxe=t=>Object.entries(t),b1=(t,e,n)=>({get value(){return Wr(t,e,n)},set value(r){ZR(t,e,r)}});class $xe extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Hi(t,e){throw new $xe(`[${t}] ${e}`)}const LQ=(t="")=>t.split(" ").filter(e=>!!e.trim()),Ua=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},rl=(t,e)=>{!t||!e.trim()||t.classList.add(...LQ(e))},aa=(t,e)=>{!t||!e.trim()||t.classList.remove(...LQ(e))},Id=(t,e)=>{var n;if(!Tn||!t||!e)return"";let r=gl(e);r==="float"&&(r="cssFloat");try{const i=t.style[r];if(i)return i;const o=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return o?o[r]:""}catch{return t.style[r]}};function pi(t,e="px"){if(!t)return"";if(kt(t)||Mxe(t))return`${t}${e}`;if(At(t))return t}const Nxe=(t,e)=>{if(!Tn)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],r=Id(t,n);return["scroll","auto","overlay"].some(i=>r.includes(i))},r$=(t,e)=>{if(!Tn)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Nxe(n,e))return n;n=n.parentNode}return n};let G_;const IQ=t=>{var e;if(!Tn)return 0;if(G_!==void 0)return G_;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 r=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const o=i.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),G_=r-o,G_};function i$(t,e){if(!Tn)return;if(!e){t.scrollTop=0;return}const n=[];let r=e.offsetParent;for(;r!==null&&t!==r&&t.contains(r);)n.push(r),r=r.offsetParent;const i=e.offsetTop+n.reduce((l,u)=>l+u.offsetTop,0),o=i+e.offsetHeight,a=t.scrollTop,s=a+t.clientHeight;is&&(t.scrollTop=o-t.clientHeight)}function Dxe(t,e,n,r,i){const o=Date.now();let a;const s=()=>{const u=Date.now()-o,c=lce(u>r?r:u,e,n,r);Dx(t)?t.scrollTo(window.pageXOffset,c):t.scrollTop=c,u{a&&tp(a)}}const v5=(t,e)=>Dx(e)?t.ownerDocument.documentElement:e,y5=t=>Dx(t)?window.scrollY:t.scrollTop,K_=t=>{if(!Tn||t==="")return null;if(At(t))try{return document.querySelector(t)}catch{return null}return t};/*! Element Plus Icons Vue v2.3.1 */var Lxe=ue({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 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.592 30.592 0 0 0-42.752 0z"})]))}}),ld=Lxe,Ixe=ue({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),mf=Ixe,Bxe=ue({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 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"})]))}}),ba=Bxe,Fxe=ue({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),o$=Fxe,Vxe=ue({name:"Back",__name:"back",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),J("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),jxe=Vxe,zxe=ue({name:"BottomLeft",__name:"bottom-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M256 768h416a32 32 0 1 1 0 64H224a32 32 0 0 1-32-32V352a32 32 0 0 1 64 0z"}),J("path",{fill:"currentColor",d:"M246.656 822.656a32 32 0 0 1-45.312-45.312l544-544a32 32 0 0 1 45.312 45.312l-544 544z"})]))}}),Lx=zxe,Qxe=ue({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Hxe=Qxe,Wxe=ue({name:"CaretRight",__name:"caret-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),BQ=Wxe,Uxe=ue({name:"CaretTop",__name:"caret-top",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),qxe=Uxe,Yxe=ue({name:"Check",__name:"check",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Sb=Yxe,Xxe=ue({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Zxe=Xxe,Gxe=ue({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("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.752l265.344-265.408z"})]))}}),a$=Gxe,Kxe=ue({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),s$=Kxe,Jxe=ue({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("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"})]))}}),Bf=Jxe,eCe=ue({name:"Clock",__name:"clock",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"}),J("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),J("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),FQ=eCe,tCe=ue({name:"Close",__name:"close",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),_a=tCe,nCe=ue({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 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.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 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.672l331.648-340.224z"})]))}}),vf=nCe,rCe=ue({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 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.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),yf=rCe,iCe=ue({name:"Delete",__name:"delete",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),l$=iCe,oCe=ue({name:"Document",__name:"document",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),aCe=oCe,sCe=ue({name:"Edit",__name:"edit",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),J("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),VQ=sCe,lCe=ue({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),zm=lCe,uCe=ue({name:"Hide",__name:"hide",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-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 176C44.8 438.4 0 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.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 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.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.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.6-28.8 48-80 105.6-153.6 172.8-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-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),J("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 112-32 28.8-67.2 48-112 48Z"})]))}}),cCe=uCe,dCe=ue({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.992 12.992 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"})]))}}),u$=dCe,fCe=ue({name:"Loading",__name:"loading",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.248zm452.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.248zM828.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 0z"})]))}}),Ku=fCe,hCe=ue({name:"MapLocation",__name:"map-location",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M800 416a288 288 0 1 0-576 0c0 118.144 94.528 272.128 288 456.576C705.472 688.128 800 534.144 800 416M512 960C277.312 746.688 160 565.312 160 416a352 352 0 0 1 704 0c0 149.312-117.312 330.688-352 544"}),J("path",{fill:"currentColor",d:"M512 448a64 64 0 1 0 0-128 64 64 0 0 0 0 128m0 64a128 128 0 1 1 0-256 128 128 0 0 1 0 256m345.6 192L960 960H672v-64H352v64H64l102.4-256zm-68.928 0H235.328l-76.8 192h706.944z"})]))}}),pCe=hCe,gCe=ue({name:"Minus",__name:"minus",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),mCe=gCe,vCe=ue({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),Oy=vCe,yCe=ue({name:"More",__name:"more",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),bCe=yCe,_Ce=ue({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),OCe=_Ce,wCe=ue({name:"Plus",__name:"plus",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),pw=wCe,SCe=ue({name:"QuestionFilled",__name:"question-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"})]))}}),xCe=SCe,CCe=ue({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),ECe=CCe,TCe=ue({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.88z"})]))}}),jQ=TCe,kCe=ue({name:"RemoveFilled",__name:"remove-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896M288 512a38.4 38.4 0 0 0 38.4 38.4h371.2a38.4 38.4 0 0 0 0-76.8H326.4A38.4 38.4 0 0 0 288 512"})]))}}),PCe=kCe,ACe=ue({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),MCe=ACe,RCe=ue({name:"Search",__name:"search",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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 704"})]))}}),c$=RCe,$Ce=ue({name:"SortDown",__name:"sort-down",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M576 96v709.568L333.312 562.816A32 32 0 1 0 288 608l297.408 297.344A32 32 0 0 0 640 882.688V96a32 32 0 0 0-64 0"})]))}}),NCe=$Ce,DCe=ue({name:"SortUp",__name:"sort-up",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M384 141.248V928a32 32 0 1 0 64 0V218.56l242.688 242.688A32 32 0 1 0 736 416L438.592 118.656A32 32 0 0 0 384 141.248"})]))}}),LCe=DCe,ICe=ue({name:"StarFilled",__name:"star-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M283.84 867.84 512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"})]))}}),J_=ICe,BCe=ue({name:"Star",__name:"star",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"m512 747.84 228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"})]))}}),FCe=BCe,VCe=ue({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),d$=VCe,jCe=ue({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),zCe=jCe,QCe=ue({name:"View",__name:"view",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),HCe=QCe,WCe=ue({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 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"})]))}}),Ix=WCe,UCe=ue({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),zQ=UCe,qCe=ue({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(R(),G("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[J("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"})]))}}),YCe=qCe;const QQ="__epPropKey",Oe=t=>t,XCe=t=>sn(t)&&!!t[QQ],hu=(t,e)=>{if(!sn(t)||XCe(t))return t;const{values:n,required:r,default:i,type:o,validator:a}=t,l={type:o,required:!!r,validator:n||a?u=>{let c=!1,d=[];if(n&&(d=Array.from(n),Dn(t,"default")&&d.push(i),c||(c=d.includes(u))),a&&(c||(c=a(u))),!c&&d.length>0){const f=[...new Set(d)].map(h=>JSON.stringify(h)).join(", ");Use(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${f}], got value ${JSON.stringify(u)}.`)}return c}:void 0,[QQ]:!0};return Dn(t,"default")&&(l.default=i),l},Ye=t=>Ug(Object.entries(t).map(([e,n])=>[e,hu(n,e)])),fr=Oe([String,Object,Function]),f$={Close:_a},h$={Close:_a,SuccessFilled:d$,InfoFilled:u$,WarningFilled:Ix,CircleCloseFilled:s$},bf={success:d$,warning:Ix,error:s$,info:u$},p$={validating:Ku,success:a$,error:Bf},Vt=(t,e)=>{if(t.install=n=>{for(const r of[t,...Object.values(e!=null?e:{})])n.component(r.name,r)},e)for(const[n,r]of Object.entries(e))t[n]=r;return t},HQ=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),ZCe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),ti=t=>(t.install=yr,t),Bx=(...t)=>e=>{t.forEach(n=>{$t(n)?n(e):n.value=e})},St={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"},GCe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],mT=["sun","mon","tue","wed","thu","fri","sat"],Zt="update:modelValue",Lr="change",Oa="input",b5=Symbol("INSTALLED_KEY"),cc=["","default","small","large"],WQ=t=>["",...cc].includes(t);var Ks=(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))(Ks||{});function _k(t){return Kr(t)&&t.type===ct}function KCe(t){return Kr(t)&&t.type===oa}function JCe(t){return Kr(t)&&!_k(t)&&!KCe(t)}const eEe=t=>{if(!Kr(t))return{};const e=t.props||{},n=(Kr(t.type)?t.type.props:void 0)||{},r={};return Object.keys(n).forEach(i=>{Dn(n[i],"default")&&(r[i]=n[i].default)}),Object.keys(e).forEach(i=>{r[gl(i)]=e[i]}),r},tEe=t=>{if(!ut(t)||t.length>1)throw new Error("expect to receive a single Vue element child");return t[0]},Kd=t=>{const e=ut(t)?t:[t],n=[];return e.forEach(r=>{var i;ut(r)?n.push(...Kd(r)):Kr(r)&&ut(r.children)?n.push(...Kd(r.children)):(n.push(r),Kr(r)&&((i=r.component)==null?void 0:i.subTree)&&n.push(...Kd(r.component.subTree)))}),n},_5=t=>[...new Set(t)],ya=t=>!t&&t!==0?[]:Array.isArray(t)?t:[t],nEe=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),Jr=t=>t;function rEe(t){let e=0;const n=(...r)=>{e&&tp(e),e=gf(()=>{t(...r),e=0})};return n.cancel=()=>{tp(e),e=0},n}const iEe=["class","style"],oEe=/^on[A-Z]/,g$=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,r=M(()=>((n==null?void 0:n.value)||[]).concat(iEe)),i=en();return M(i?()=>{var o;return Ug(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([a])=>!r.value.includes(a)&&!(e&&oEe.test(a))))}:()=>({}))},Jd=({from:t,replacement:e,scope:n,version:r,ref:i,type:o="API"},a)=>{Ve(()=>p(a),s=>{},{immediate:!0})},UQ=(t,e,n,r)=>{let i={offsetX:0,offsetY:0};const o=u=>{const c=u.clientX,d=u.clientY,{offsetX:f,offsetY:h}=i,m=t.value.getBoundingClientRect(),g=m.left,y=m.top,b=m.width,w=m.height,O=document.documentElement.clientWidth,S=document.documentElement.clientHeight,x=-g+f,C=-y+h,E=O-g-b+f,T=S-y-w+h,P=D=>{let N=f+D.clientX-c,$=h+D.clientY-d;r!=null&&r.value||(N=Math.min(Math.max(N,x),E),$=Math.min(Math.max($,C),T)),i={offsetX:N,offsetY:$},t.value&&(t.value.style.transform=`translate(${pi(N)}, ${pi($)})`)},A=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",A)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",A)},a=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",o)},s=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",o)},l=()=>{i={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return Bt(()=>{Bo(()=>{n.value?a():s()})}),pr(()=>{s()}),{resetPosition:l}};var aEe={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"},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",week:"week",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"},tour:{next:"Next",previous:"Previous",finish:"Finish"},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 sEe=t=>(e,n)=>lEe(e,n,p(t)),lEe=(t,e,n)=>Wr(n,t,t).replace(/\{(\w+)\}/g,(r,i)=>{var o;return`${(o=e==null?void 0:e[i])!=null?o:`{${i}}`}`}),uEe=t=>{const e=M(()=>p(t).name),n=kr(t)?t:F(t);return{lang:e,locale:n,t:sEe(t)}},qQ=Symbol("localeContextKey"),kn=t=>{const e=t||ht(qQ,F());return uEe(M(()=>e.value||aEe))},wy="el",cEe="is-",sh=(t,e,n,r,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),r&&(o+=`__${r}`),i&&(o+=`--${i}`),o},YQ=Symbol("namespaceContextKey"),m$=t=>{const e=t||(en()?ht(YQ,F(wy)):F(wy));return M(()=>p(e)||wy)},Qe=(t,e)=>{const n=m$(e);return{namespace:n,b:(g="")=>sh(n.value,t,g,"",""),e:g=>g?sh(n.value,t,"",g,""):"",m:g=>g?sh(n.value,t,"","",g):"",be:(g,y)=>g&&y?sh(n.value,t,g,y,""):"",em:(g,y)=>g&&y?sh(n.value,t,"",g,y):"",bm:(g,y)=>g&&y?sh(n.value,t,g,"",y):"",bem:(g,y,b)=>g&&y&&b?sh(n.value,t,g,y,b):"",is:(g,...y)=>{const b=y.length>=1?y[0]:!0;return g&&b?`${cEe}${g}`:""},cssVar:g=>{const y={};for(const b in g)g[b]&&(y[`--${n.value}-${b}`]=g[b]);return y},cssVarName:g=>`--${n.value}-${g}`,cssVarBlock:g=>{const y={};for(const b in g)g[b]&&(y[`--${n.value}-${t}-${b}`]=g[b]);return y},cssVarBlockName:g=>`--${n.value}-${t}-${g}`}},v$=(t,e={})=>{kr(t)||Hi("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Qe("popup"),r=M(()=>n.bm("parent","hidden"));if(!Tn||Ua(document.body,r.value))return;let i=0,o=!1,a="0";const s=()=>{setTimeout(()=>{typeof document!="undefined"&&(aa(document==null?void 0:document.body,r.value),o&&document&&(document.body.style.width=a))},200)};Ve(t,l=>{if(!l){s();return}o=!Ua(document.body,r.value),o&&(a=document.body.style.width),i=IQ(n.namespace.value);const u=document.documentElement.clientHeight0&&(u||c==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`),rl(document.body,r.value)}),tz(()=>s())},dEe=hu({type:Oe(Boolean),default:null}),fEe=hu({type:Oe(Function)}),hEe=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,r=[e],i={[t]:dEe,[n]:fEe};return{useModelToggle:({indicator:a,toggleReason:s,shouldHideWhenRouteChanges:l,shouldProceed:u,onShow:c,onHide:d})=>{const f=en(),{emit:h}=f,m=f.props,g=M(()=>$t(m[n])),y=M(()=>m[t]===null),b=E=>{a.value!==!0&&(a.value=!0,s&&(s.value=E),$t(c)&&c(E))},w=E=>{a.value!==!1&&(a.value=!1,s&&(s.value=E),$t(d)&&d(E))},O=E=>{if(m.disabled===!0||$t(u)&&!u())return;const T=g.value&&Tn;T&&h(e,!0),(y.value||!T)&&b(E)},S=E=>{if(m.disabled===!0||!Tn)return;const T=g.value&&Tn;T&&h(e,!1),(y.value||!T)&&w(E)},x=E=>{!si(E)||(m.disabled&&E?g.value&&h(e,!1):a.value!==E&&(E?b():w()))},C=()=>{a.value?S():O()};return Ve(()=>m[t],x),l&&f.appContext.config.globalProperties.$route!==void 0&&Ve(()=>({...f.proxy.$route}),()=>{l.value&&a.value&&S()}),Bt(()=>{x(m[t])}),{hide:S,show:O,toggle:C,hasUpdateHandler:g}},useModelToggleProps:i,useModelToggleEmits:r}},XQ=t=>{const e=en();return M(()=>{var n,r;return(r=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:r[t]})};var Za="top",bl="bottom",_l="right",Ga="left",y$="auto",xb=[Za,bl,_l,Ga],Xg="start",h0="end",pEe="clippingParents",ZQ="viewport",Nv="popper",gEe="reference",O5=xb.reduce(function(t,e){return t.concat([e+"-"+Xg,e+"-"+h0])},[]),ud=[].concat(xb,[y$]).reduce(function(t,e){return t.concat([e,e+"-"+Xg,e+"-"+h0])},[]),mEe="beforeRead",vEe="read",yEe="afterRead",bEe="beforeMain",_Ee="main",OEe="afterMain",wEe="beforeWrite",SEe="write",xEe="afterWrite",CEe=[mEe,vEe,yEe,bEe,_Ee,OEe,wEe,SEe,xEe];function Ju(t){return t?(t.nodeName||"").toLowerCase():null}function pu(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Zg(t){var e=pu(t).Element;return t instanceof e||t instanceof Element}function fl(t){var e=pu(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function b$(t){if(typeof ShadowRoot=="undefined")return!1;var e=pu(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function EEe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var r=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!fl(o)||!Ju(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function TEe(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(r){var i=e.elements[r],o=e.attributes[r]||{},a=Object.keys(e.styles.hasOwnProperty(r)?e.styles[r]:n[r]),s=a.reduce(function(l,u){return l[u]="",l},{});!fl(i)||!Ju(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var GQ={name:"applyStyles",enabled:!0,phase:"write",fn:EEe,effect:TEe,requires:["computeStyles"]};function Wu(t){return t.split("-")[0]}var Vh=Math.max,gw=Math.min,Gg=Math.round;function Kg(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),r=1,i=1;if(fl(t)&&e){var o=t.offsetHeight,a=t.offsetWidth;a>0&&(r=Gg(n.width)/a||1),o>0&&(i=Gg(n.height)/o||1)}return{width:n.width/r,height:n.height/i,top:n.top/i,right:n.right/r,bottom:n.bottom/i,left:n.left/r,x:n.left/r,y:n.top/i}}function _$(t){var e=Kg(t),n=t.offsetWidth,r=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-r)<=1&&(r=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:r}}function KQ(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&b$(n)){var r=e;do{if(r&&t.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Uc(t){return pu(t).getComputedStyle(t)}function kEe(t){return["table","td","th"].indexOf(Ju(t))>=0}function Ff(t){return((Zg(t)?t.ownerDocument:t.document)||window.document).documentElement}function Fx(t){return Ju(t)==="html"?t:t.assignedSlot||t.parentNode||(b$(t)?t.host:null)||Ff(t)}function w5(t){return!fl(t)||Uc(t).position==="fixed"?null:t.offsetParent}function PEe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&fl(t)){var r=Uc(t);if(r.position==="fixed")return null}var i=Fx(t);for(b$(i)&&(i=i.host);fl(i)&&["html","body"].indexOf(Ju(i))<0;){var o=Uc(i);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 i;i=i.parentNode}return null}function Cb(t){for(var e=pu(t),n=w5(t);n&&kEe(n)&&Uc(n).position==="static";)n=w5(n);return n&&(Ju(n)==="html"||Ju(n)==="body"&&Uc(n).position==="static")?e:n||PEe(t)||e}function O$(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Sy(t,e,n){return Vh(t,gw(e,n))}function AEe(t,e,n){var r=Sy(t,e,n);return r>n?n:r}function JQ(){return{top:0,right:0,bottom:0,left:0}}function eH(t){return Object.assign({},JQ(),t)}function tH(t,e){return e.reduce(function(n,r){return n[r]=t,n},{})}var MEe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,eH(typeof t!="number"?t:tH(t,xb))};function REe(t){var e,n=t.state,r=t.name,i=t.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=Wu(n.placement),l=O$(s),u=[Ga,_l].indexOf(s)>=0,c=u?"height":"width";if(!(!o||!a)){var d=MEe(i.padding,n),f=_$(o),h=l==="y"?Za:Ga,m=l==="y"?bl:_l,g=n.rects.reference[c]+n.rects.reference[l]-a[l]-n.rects.popper[c],y=a[l]-n.rects.reference[l],b=Cb(o),w=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,O=g/2-y/2,S=d[h],x=w-f[c]-d[m],C=w/2-f[c]/2+O,E=Sy(S,C,x),T=l;n.modifiersData[r]=(e={},e[T]=E,e.centerOffset=E-C,e)}}function $Ee(t){var e=t.state,n=t.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!KQ(e.elements.popper,i)||(e.elements.arrow=i))}var NEe={name:"arrow",enabled:!0,phase:"main",fn:REe,effect:$Ee,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Jg(t){return t.split("-")[1]}var DEe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function LEe(t){var e=t.x,n=t.y,r=window,i=r.devicePixelRatio||1;return{x:Gg(e*i)/i||0,y:Gg(n*i)/i||0}}function S5(t){var e,n=t.popper,r=t.popperRect,i=t.placement,o=t.variation,a=t.offsets,s=t.position,l=t.gpuAcceleration,u=t.adaptive,c=t.roundOffsets,d=t.isFixed,f=a.x,h=f===void 0?0:f,m=a.y,g=m===void 0?0:m,y=typeof c=="function"?c({x:h,y:g}):{x:h,y:g};h=y.x,g=y.y;var b=a.hasOwnProperty("x"),w=a.hasOwnProperty("y"),O=Ga,S=Za,x=window;if(u){var C=Cb(n),E="clientHeight",T="clientWidth";if(C===pu(n)&&(C=Ff(n),Uc(C).position!=="static"&&s==="absolute"&&(E="scrollHeight",T="scrollWidth")),C=C,i===Za||(i===Ga||i===_l)&&o===h0){S=bl;var P=d&&C===x&&x.visualViewport?x.visualViewport.height:C[E];g-=P-r.height,g*=l?1:-1}if(i===Ga||(i===Za||i===bl)&&o===h0){O=_l;var A=d&&C===x&&x.visualViewport?x.visualViewport.width:C[T];h-=A-r.width,h*=l?1:-1}}var D=Object.assign({position:s},u&&DEe),N=c===!0?LEe({x:h,y:g}):{x:h,y:g};if(h=N.x,g=N.y,l){var $;return Object.assign({},D,($={},$[S]=w?"0":"",$[O]=b?"0":"",$.transform=(x.devicePixelRatio||1)<=1?"translate("+h+"px, "+g+"px)":"translate3d("+h+"px, "+g+"px, 0)",$))}return Object.assign({},D,(e={},e[S]=w?g+"px":"",e[O]=b?h+"px":"",e.transform="",e))}function IEe(t){var e=t.state,n=t.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,u={placement:Wu(e.placement),variation:Jg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,S5(Object.assign({},u,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,S5(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 nH={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:IEe,data:{}},eO={passive:!0};function BEe(t){var e=t.state,n=t.instance,r=t.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=pu(e.elements.popper),u=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&u.forEach(function(c){c.addEventListener("scroll",n.update,eO)}),s&&l.addEventListener("resize",n.update,eO),function(){o&&u.forEach(function(c){c.removeEventListener("scroll",n.update,eO)}),s&&l.removeEventListener("resize",n.update,eO)}}var rH={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:BEe,data:{}},FEe={left:"right",right:"left",bottom:"top",top:"bottom"};function _1(t){return t.replace(/left|right|bottom|top/g,function(e){return FEe[e]})}var VEe={start:"end",end:"start"};function x5(t){return t.replace(/start|end/g,function(e){return VEe[e]})}function w$(t){var e=pu(t),n=e.pageXOffset,r=e.pageYOffset;return{scrollLeft:n,scrollTop:r}}function S$(t){return Kg(Ff(t)).left+w$(t).scrollLeft}function jEe(t){var e=pu(t),n=Ff(t),r=e.visualViewport,i=n.clientWidth,o=n.clientHeight,a=0,s=0;return r&&(i=r.width,o=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=r.offsetLeft,s=r.offsetTop)),{width:i,height:o,x:a+S$(t),y:s}}function zEe(t){var e,n=Ff(t),r=w$(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Vh(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Vh(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+S$(t),l=-r.scrollTop;return Uc(i||n).direction==="rtl"&&(s+=Vh(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function x$(t){var e=Uc(t),n=e.overflow,r=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function iH(t){return["html","body","#document"].indexOf(Ju(t))>=0?t.ownerDocument.body:fl(t)&&x$(t)?t:iH(Fx(t))}function xy(t,e){var n;e===void 0&&(e=[]);var r=iH(t),i=r===((n=t.ownerDocument)==null?void 0:n.body),o=pu(r),a=i?[o].concat(o.visualViewport||[],x$(r)?r:[]):r,s=e.concat(a);return i?s:s.concat(xy(Fx(a)))}function Ok(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function QEe(t){var e=Kg(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function C5(t,e){return e===ZQ?Ok(jEe(t)):Zg(e)?QEe(e):Ok(zEe(Ff(t)))}function HEe(t){var e=xy(Fx(t)),n=["absolute","fixed"].indexOf(Uc(t).position)>=0,r=n&&fl(t)?Cb(t):t;return Zg(r)?e.filter(function(i){return Zg(i)&&KQ(i,r)&&Ju(i)!=="body"}):[]}function WEe(t,e,n){var r=e==="clippingParents"?HEe(t):[].concat(e),i=[].concat(r,[n]),o=i[0],a=i.reduce(function(s,l){var u=C5(t,l);return s.top=Vh(u.top,s.top),s.right=gw(u.right,s.right),s.bottom=gw(u.bottom,s.bottom),s.left=Vh(u.left,s.left),s},C5(t,o));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function oH(t){var e=t.reference,n=t.element,r=t.placement,i=r?Wu(r):null,o=r?Jg(r):null,a=e.x+e.width/2-n.width/2,s=e.y+e.height/2-n.height/2,l;switch(i){case Za:l={x:a,y:e.y-n.height};break;case bl:l={x:a,y:e.y+e.height};break;case _l:l={x:e.x+e.width,y:s};break;case Ga:l={x:e.x-n.width,y:s};break;default:l={x:e.x,y:e.y}}var u=i?O$(i):null;if(u!=null){var c=u==="y"?"height":"width";switch(o){case Xg:l[u]=l[u]-(e[c]/2-n[c]/2);break;case h0:l[u]=l[u]+(e[c]/2-n[c]/2);break}}return l}function p0(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=r===void 0?t.placement:r,o=n.boundary,a=o===void 0?pEe:o,s=n.rootBoundary,l=s===void 0?ZQ:s,u=n.elementContext,c=u===void 0?Nv:u,d=n.altBoundary,f=d===void 0?!1:d,h=n.padding,m=h===void 0?0:h,g=eH(typeof m!="number"?m:tH(m,xb)),y=c===Nv?gEe:Nv,b=t.rects.popper,w=t.elements[f?y:c],O=WEe(Zg(w)?w:w.contextElement||Ff(t.elements.popper),a,l),S=Kg(t.elements.reference),x=oH({reference:S,element:b,strategy:"absolute",placement:i}),C=Ok(Object.assign({},b,x)),E=c===Nv?C:S,T={top:O.top-E.top+g.top,bottom:E.bottom-O.bottom+g.bottom,left:O.left-E.left+g.left,right:E.right-O.right+g.right},P=t.modifiersData.offset;if(c===Nv&&P){var A=P[i];Object.keys(T).forEach(function(D){var N=[_l,bl].indexOf(D)>=0?1:-1,$=[Za,bl].indexOf(D)>=0?"y":"x";T[D]+=A[$]*N})}return T}function UEe(t,e){e===void 0&&(e={});var n=e,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?ud:l,c=Jg(r),d=c?s?O5:O5.filter(function(m){return Jg(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]=p0(t,{placement:g,boundary:i,rootBoundary:o,padding:a})[Wu(g)],m},{});return Object.keys(h).sort(function(m,g){return h[m]-h[g]})}function qEe(t){if(Wu(t)===y$)return[];var e=_1(t);return[x5(t),e,x5(e)]}function YEe(t){var e=t.state,n=t.options,r=t.name;if(!e.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,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,y=e.options.placement,b=Wu(y),w=b===y,O=l||(w||!m?[_1(y)]:qEe(y)),S=[y].concat(O).reduce(function(Se,ke){return Se.concat(Wu(ke)===y$?UEe(e,{placement:ke,boundary:c,rootBoundary:d,padding:u,flipVariations:m,allowedAutoPlacements:g}):ke)},[]),x=e.rects.reference,C=e.rects.popper,E=new Map,T=!0,P=S[0],A=0;A=0,L=W?"width":"height",I=p0(e,{placement:D,boundary:c,rootBoundary:d,altBoundary:f,padding:u}),U=W?$?_l:Ga:$?bl:Za;x[L]>C[L]&&(U=_1(U));var Q=_1(U),V=[];if(o&&V.push(I[N]<=0),s&&V.push(I[U]<=0,I[Q]<=0),V.every(function(Se){return Se})){P=D,T=!1;break}E.set(D,V)}if(T)for(var q=m?3:1,K=function(Se){var ke=S.find(function(Y){var re=E.get(Y);if(re)return re.slice(0,Se).every(function(te){return te})});if(ke)return P=ke,"break"},ie=q;ie>0;ie--){var oe=K(ie);if(oe==="break")break}e.placement!==P&&(e.modifiersData[r]._skip=!0,e.placement=P,e.reset=!0)}}var XEe={name:"flip",enabled:!0,phase:"main",fn:YEe,requiresIfExists:["offset"],data:{_skip:!1}};function E5(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 T5(t){return[Za,_l,bl,Ga].some(function(e){return t[e]>=0})}function ZEe(t){var e=t.state,n=t.name,r=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,a=p0(e,{elementContext:"reference"}),s=p0(e,{altBoundary:!0}),l=E5(a,r),u=E5(s,i,o),c=T5(l),d=T5(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 GEe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ZEe};function KEe(t,e,n){var r=Wu(t),i=[Ga,Za].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[Ga,_l].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function JEe(t){var e=t.state,n=t.options,r=t.name,i=n.offset,o=i===void 0?[0,0]:i,a=ud.reduce(function(c,d){return c[d]=KEe(d,e.rects,o),c},{}),s=a[e.placement],l=s.x,u=s.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=u),e.modifiersData[r]=a}var eTe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:JEe};function tTe(t){var e=t.state,n=t.name;e.modifiersData[n]=oH({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var aH={name:"popperOffsets",enabled:!0,phase:"read",fn:tTe,data:{}};function nTe(t){return t==="x"?"y":"x"}function rTe(t){var e=t.state,n=t.options,r=t.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,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,y=p0(e,{boundary:l,rootBoundary:u,padding:d,altBoundary:c}),b=Wu(e.placement),w=Jg(e.placement),O=!w,S=O$(b),x=nTe(S),C=e.modifiersData.popperOffsets,E=e.rects.reference,T=e.rects.popper,P=typeof g=="function"?g(Object.assign({},e.rects,{placement:e.placement})):g,A=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),D=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,N={x:0,y:0};if(C){if(o){var $,W=S==="y"?Za:Ga,L=S==="y"?bl:_l,I=S==="y"?"height":"width",U=C[S],Q=U+y[W],V=U-y[L],q=h?-T[I]/2:0,K=w===Xg?E[I]:T[I],ie=w===Xg?-T[I]:-E[I],oe=e.elements.arrow,Se=h&&oe?_$(oe):{width:0,height:0},ke=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:JQ(),Y=ke[W],re=ke[L],te=Sy(0,E[I],Se[I]),ge=O?E[I]/2-q-te-Y-A.mainAxis:K-te-Y-A.mainAxis,Re=O?-E[I]/2+q+te+re+A.mainAxis:ie+te+re+A.mainAxis,$e=e.elements.arrow&&Cb(e.elements.arrow),Z=$e?S==="y"?$e.clientTop||0:$e.clientLeft||0:0,ce=($=D==null?void 0:D[S])!=null?$:0,Te=U+ge-ce-Z,Ie=U+Re-ce,ae=Sy(h?gw(Q,Te):Q,U,h?Vh(V,Ie):V);C[S]=ae,N[S]=ae-U}if(s){var me,Ae=S==="x"?Za:Ga,X=S==="x"?bl:_l,ee=C[x],le=x==="y"?"height":"width",Ce=ee+y[Ae],fe=ee-y[X],Ee=[Za,Ga].indexOf(b)!==-1,be=(me=D==null?void 0:D[x])!=null?me:0,Be=Ee?Ce:ee-E[le]-T[le]-be+A.altAxis,Xe=Ee?ee+E[le]+T[le]-be-A.altAxis:fe,Ke=h&&Ee?AEe(Be,ee,Xe):Sy(h?Be:Ce,ee,h?Xe:fe);C[x]=Ke,N[x]=Ke-ee}e.modifiersData[r]=N}}var iTe={name:"preventOverflow",enabled:!0,phase:"main",fn:rTe,requiresIfExists:["offset"]};function oTe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function aTe(t){return t===pu(t)||!fl(t)?w$(t):oTe(t)}function sTe(t){var e=t.getBoundingClientRect(),n=Gg(e.width)/t.offsetWidth||1,r=Gg(e.height)/t.offsetHeight||1;return n!==1||r!==1}function lTe(t,e,n){n===void 0&&(n=!1);var r=fl(e),i=fl(e)&&sTe(e),o=Ff(e),a=Kg(t,i),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((Ju(e)!=="body"||x$(o))&&(s=aTe(e)),fl(e)?(l=Kg(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=S$(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function uTe(t){var e=new Map,n=new Set,r=[];t.forEach(function(o){e.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=e.get(s);l&&i(l)}}),r.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),r}function cTe(t){var e=uTe(t);return CEe.reduce(function(n,r){return n.concat(e.filter(function(i){return i.phase===r}))},[])}function dTe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function fTe(t){var e=t.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(e).map(function(n){return e[n]})}var k5={placement:"bottom",modifiers:[],strategy:"absolute"};function P5(){for(var t=arguments.length,e=new Array(t),n=0;n{const r={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const u=vTe(l);Object.assign(a.value,u)},requires:["computeStyles"]},i=M(()=>{const{onFirstUpdate:l,placement:u,strategy:c,modifiers:d}=p(n);return{onFirstUpdate:l,placement:u||"bottom",strategy:c||"absolute",modifiers:[...d||[],r,{name:"applyStyles",enabled:!1}]}}),o=Tr(),a=F({styles:{popper:{position:p(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=()=>{!o.value||(o.value.destroy(),o.value=void 0)};return Ve(i,l=>{const u=p(o);u&&u.setOptions(l)},{deep:!0}),Ve([t,e],([l,u])=>{s(),!(!l||!u)&&(o.value=gTe(l,u,p(i)))}),pr(()=>{s()}),{state:M(()=>{var l;return{...((l=p(o))==null?void 0:l.state)||{}}}),styles:M(()=>p(a).styles),attributes:M(()=>p(a).attributes),update:()=>{var l;return(l=p(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=p(o))==null?void 0:l.forceUpdate()},instanceRef:M(()=>p(o))}};function vTe(t){const e=Object.keys(t.elements),n=Ug(e.map(i=>[i,t.styles[i]||{}])),r=Ug(e.map(i=>[i,t.attributes[i]]));return{styles:n,attributes:r}}const E$=t=>{if(!t)return{onClick:yr,onMousedown:yr,onMouseup:yr};let e=!1,n=!1;return{onClick:a=>{e&&n&&t(a),e=n=!1},onMousedown:a=>{e=a.target===a.currentTarget},onMouseup:a=>{n=a.target===a.currentTarget}}},yTe=(t,e=0)=>{if(e===0)return t;const n=F(!1);let r=null;const i=()=>{r&&clearTimeout(r),r=setTimeout(()=>{n.value=t.value},e)};return Bt(i),Ve(()=>t.value,o=>{o?i():n.value=o}),n};function A5(){let t;const e=(r,i)=>{n(),t=window.setTimeout(r,i)},n=()=>window.clearTimeout(t);return fb(()=>n()),{registerTimeout:e,cancelTimeout:n}}const M5={prefix:Math.floor(Math.random()*1e4),current:0},bTe=Symbol("elIdInjection"),T$=()=>en()?ht(bTe,M5):M5,bo=t=>{const e=T$(),n=m$();return M(()=>p(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let og=[];const R5=t=>{const e=t;e.key===St.esc&&og.forEach(n=>n(e))},_Te=t=>{Bt(()=>{og.length===0&&document.addEventListener("keydown",R5),Tn&&og.push(t)}),pr(()=>{og=og.filter(e=>e!==t),og.length===0&&Tn&&document.removeEventListener("keydown",R5)})},sH=()=>{const t=m$(),e=T$(),n=M(()=>`${t.value}-popper-container-${e.prefix}`),r=M(()=>`#${n.value}`);return{id:n,selector:r}},OTe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},wTe=()=>{const{id:t,selector:e}=sH();return cx(()=>{!Tn||document.body.querySelector(e.value)||OTe(t.value)}),{id:t,selector:e}},STe=Ye({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),xTe=({showAfter:t,hideAfter:e,autoClose:n,open:r,close:i})=>{const{registerTimeout:o}=A5(),{registerTimeout:a,cancelTimeout:s}=A5();return{onOpen:c=>{o(()=>{r(c);const d=p(n);kt(d)&&d>0&&a(()=>{i(c)},d)},p(t))},onClose:c=>{s(),o(()=>{i(c)},p(e))}}},lH=Symbol("elForwardRef"),CTe=t=>{_n(lH,{setForwardRef:n=>{t.value=n}})},ETe=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),$5={current:0},N5=F(0),uH=2e3,D5=Symbol("elZIndexContextKey"),cH=Symbol("zIndexContextKey"),Qm=t=>{const e=en()?ht(D5,$5):$5,n=t||(en()?ht(cH,void 0):void 0),r=M(()=>{const a=p(n);return kt(a)?a:uH}),i=M(()=>r.value+N5.value),o=()=>(e.current++,N5.value=e.current,i.value);return!Tn&&ht(D5),{initialZIndex:r,currentZIndex:i,nextZIndex:o}},em=Math.min,jh=Math.max,mw=Math.round,tO=Math.floor,_f=t=>({x:t,y:t}),TTe={left:"right",right:"left",bottom:"top",top:"bottom"},kTe={start:"end",end:"start"};function wk(t,e,n){return jh(t,em(e,n))}function Eb(t,e){return typeof t=="function"?t(e):t}function np(t){return t.split("-")[0]}function Tb(t){return t.split("-")[1]}function dH(t){return t==="x"?"y":"x"}function k$(t){return t==="y"?"height":"width"}function tm(t){return["top","bottom"].includes(np(t))?"y":"x"}function P$(t){return dH(tm(t))}function PTe(t,e,n){n===void 0&&(n=!1);const r=Tb(t),i=P$(t),o=k$(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(a=vw(a)),[a,vw(a)]}function ATe(t){const e=vw(t);return[Sk(t),e,Sk(e)]}function Sk(t){return t.replace(/start|end/g,e=>kTe[e])}function MTe(t,e,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?o:a;default:return[]}}function RTe(t,e,n,r){const i=Tb(t);let o=MTe(np(t),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),e&&(o=o.concat(o.map(Sk)))),o}function vw(t){return t.replace(/left|right|bottom|top/g,e=>TTe[e])}function $Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function fH(t){return typeof t!="number"?$Te(t):{top:t,right:t,bottom:t,left:t}}function yw(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function L5(t,e,n){let{reference:r,floating:i}=t;const o=tm(e),a=P$(e),s=k$(a),l=np(e),u=o==="y",c=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2;let h;switch(l){case"top":h={x:c,y:r.y-i.height};break;case"bottom":h={x:c,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Tb(e)){case"start":h[a]-=f*(n&&u?-1:1);break;case"end":h[a]+=f*(n&&u?-1:1);break}return h}const NTe=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let u=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:c,y:d}=L5(u,r,l),f=r,h={},m=0;for(let g=0;g({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:l}=e,{element:u,padding:c=0}=Eb(t,e)||{};if(u==null)return{};const d=fH(c),f={x:n,y:r},h=P$(i),m=k$(h),g=await a.getDimensions(u),y=h==="y",b=y?"top":"left",w=y?"bottom":"right",O=y?"clientHeight":"clientWidth",S=o.reference[m]+o.reference[h]-f[h]-o.floating[m],x=f[h]-o.reference[h],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=C?C[O]:0;(!E||!await(a.isElement==null?void 0:a.isElement(C)))&&(E=s.floating[O]||o.floating[m]);const T=S/2-x/2,P=E/2-g[m]/2-1,A=em(d[b],P),D=em(d[w],P),N=A,$=E-g[m]-D,W=E/2-g[m]/2+T,L=wk(N,W,$),I=!l.arrow&&Tb(i)!=null&&W!==L&&o.reference[m]/2-(WW<=0)){var D,N;const W=(((D=o.flip)==null?void 0:D.index)||0)+1,L=E[W];if(L)return{data:{index:W,overflows:A},reset:{placement:L}};let I=(N=A.filter(U=>U.overflows[0]<=0).sort((U,Q)=>U.overflows[1]-Q.overflows[1])[0])==null?void 0:N.placement;if(!I)switch(h){case"bestFit":{var $;const U=($=A.filter(Q=>{if(C){const V=tm(Q.placement);return V===w||V==="y"}return!0}).map(Q=>[Q.placement,Q.overflows.filter(V=>V>0).reduce((V,q)=>V+q,0)]).sort((Q,V)=>Q[1]-V[1])[0])==null?void 0:$[0];U&&(I=U);break}case"initialPlacement":I=s;break}if(i!==I)return{reset:{placement:I}}}return{}}}};async function ITe(t,e){const{placement:n,platform:r,elements:i}=t,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=np(n),s=Tb(n),l=tm(n)==="y",u=["left","top"].includes(a)?-1:1,c=o&&l?-1:1,d=Eb(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:m}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m=="number"&&(h=s==="end"?m*-1:m),l?{x:h*c,y:f*u}:{x:f*u,y:h*c}}const BTe=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=e,l=await ITe(e,t);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},FTe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:y=>{let{x:b,y:w}=y;return{x:b,y:w}}},...l}=Eb(t,e),u={x:n,y:r},c=await A$(e,l),d=tm(np(i)),f=dH(d);let h=u[f],m=u[d];if(o){const y=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=h+c[y],O=h-c[b];h=wk(w,h,O)}if(a){const y=d==="y"?"top":"left",b=d==="y"?"bottom":"right",w=m+c[y],O=m-c[b];m=wk(w,m,O)}const g=s.fn({...e,[f]:h,[d]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:o,[d]:a}}}}}};function Vx(){return typeof window!="undefined"}function Hm(t){return hH(t)?(t.nodeName||"").toLowerCase():"#document"}function Ms(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function dc(t){var e;return(e=(hH(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function hH(t){return Vx()?t instanceof Node||t instanceof Ms(t).Node:!1}function su(t){return Vx()?t instanceof Element||t instanceof Ms(t).Element:!1}function ec(t){return Vx()?t instanceof HTMLElement||t instanceof Ms(t).HTMLElement:!1}function I5(t){return!Vx()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof Ms(t).ShadowRoot}function kb(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=lu(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function VTe(t){return["table","td","th"].includes(Hm(t))}function jx(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function M$(t){const e=R$(),n=su(t)?lu(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function jTe(t){let e=Of(t);for(;ec(e)&&!nm(e);){if(M$(e))return e;if(jx(e))return null;e=Of(e)}return null}function R$(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function nm(t){return["html","body","#document"].includes(Hm(t))}function lu(t){return Ms(t).getComputedStyle(t)}function zx(t){return su(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Of(t){if(Hm(t)==="html")return t;const e=t.assignedSlot||t.parentNode||I5(t)&&t.host||dc(t);return I5(e)?e.host:e}function pH(t){const e=Of(t);return nm(e)?t.ownerDocument?t.ownerDocument.body:t.body:ec(e)&&kb(e)?e:pH(e)}function g0(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=pH(t),o=i===((r=t.ownerDocument)==null?void 0:r.body),a=Ms(i);if(o){const s=xk(a);return e.concat(a,a.visualViewport||[],kb(i)?i:[],s&&n?g0(s):[])}return e.concat(i,g0(i,[],n))}function xk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function gH(t){const e=lu(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ec(t),o=i?t.offsetWidth:n,a=i?t.offsetHeight:r,s=mw(n)!==o||mw(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function $$(t){return su(t)?t:t.contextElement}function Ag(t){const e=$$(t);if(!ec(e))return _f(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:o}=gH(e);let a=(o?mw(n.width):n.width)/r,s=(o?mw(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const zTe=_f(0);function mH(t){const e=Ms(t);return!R$()||!e.visualViewport?zTe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function QTe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Ms(t)?!1:e}function rp(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=$$(t);let a=_f(1);e&&(r?su(r)&&(a=Ag(r)):a=Ag(t));const s=QTe(o,n,r)?mH(o):_f(0);let l=(i.left+s.x)/a.x,u=(i.top+s.y)/a.y,c=i.width/a.x,d=i.height/a.y;if(o){const f=Ms(o),h=r&&su(r)?Ms(r):r;let m=f,g=xk(m);for(;g&&r&&h!==m;){const y=Ag(g),b=g.getBoundingClientRect(),w=lu(g),O=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,S=b.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,c*=y.x,d*=y.y,l+=O,u+=S,m=Ms(g),g=xk(m)}}return yw({width:c,height:d,x:l,y:u})}function HTe(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const o=i==="fixed",a=dc(r),s=e?jx(e.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},u=_f(1);const c=_f(0),d=ec(r);if((d||!d&&!o)&&((Hm(r)!=="body"||kb(a))&&(l=zx(r)),ec(r))){const f=rp(r);u=Ag(r),c.x=f.x+r.clientLeft,c.y=f.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+c.x,y:n.y*u.y-l.scrollTop*u.y+c.y}}function WTe(t){return Array.from(t.getClientRects())}function Ck(t,e){const n=zx(t).scrollLeft;return e?e.left+n:rp(dc(t)).left+n}function UTe(t){const e=dc(t),n=zx(t),r=t.ownerDocument.body,i=jh(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),o=jh(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ck(t);const s=-n.scrollTop;return lu(r).direction==="rtl"&&(a+=jh(e.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function qTe(t,e){const n=Ms(t),r=dc(t),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const u=R$();(!u||u&&e==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function YTe(t,e){const n=rp(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,o=ec(t)?Ag(t):_f(1),a=t.clientWidth*o.x,s=t.clientHeight*o.y,l=i*o.x,u=r*o.y;return{width:a,height:s,x:l,y:u}}function B5(t,e,n){let r;if(e==="viewport")r=qTe(t,n);else if(e==="document")r=UTe(dc(t));else if(su(e))r=YTe(e,n);else{const i=mH(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return yw(r)}function vH(t,e){const n=Of(t);return n===e||!su(n)||nm(n)?!1:lu(n).position==="fixed"||vH(n,e)}function XTe(t,e){const n=e.get(t);if(n)return n;let r=g0(t,[],!1).filter(s=>su(s)&&Hm(s)!=="body"),i=null;const o=lu(t).position==="fixed";let a=o?Of(t):t;for(;su(a)&&!nm(a);){const s=lu(a),l=M$(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||kb(a)&&!l&&vH(t,a))?r=r.filter(c=>c!==a):i=s,a=Of(a)}return e.set(t,r),r}function ZTe(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?jx(e)?[]:XTe(e,this._c):[].concat(n),r],s=a[0],l=a.reduce((u,c)=>{const d=B5(e,c,i);return u.top=jh(d.top,u.top),u.right=em(d.right,u.right),u.bottom=em(d.bottom,u.bottom),u.left=jh(d.left,u.left),u},B5(e,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function GTe(t){const{width:e,height:n}=gH(t);return{width:e,height:n}}function KTe(t,e,n){const r=ec(e),i=dc(e),o=n==="fixed",a=rp(t,!0,o,e);let s={scrollLeft:0,scrollTop:0};const l=_f(0);if(r||!r&&!o)if((Hm(e)!=="body"||kb(i))&&(s=zx(e)),r){const h=rp(e,!0,o,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=Ck(i));let u=0,c=0;if(i&&!r&&!o){const h=i.getBoundingClientRect();c=h.top+s.scrollTop,u=h.left+s.scrollLeft-Ck(i,h)}const d=a.left+s.scrollLeft-l.x-u,f=a.top+s.scrollTop-l.y-c;return{x:d,y:f,width:a.width,height:a.height}}function vT(t){return lu(t).position==="static"}function F5(t,e){if(!ec(t)||lu(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return dc(t)===n&&(n=n.ownerDocument.body),n}function yH(t,e){const n=Ms(t);if(jx(t))return n;if(!ec(t)){let i=Of(t);for(;i&&!nm(i);){if(su(i)&&!vT(i))return i;i=Of(i)}return n}let r=F5(t,e);for(;r&&VTe(r)&&vT(r);)r=F5(r,e);return r&&nm(r)&&vT(r)&&!M$(r)?n:r||jTe(t)||n}const JTe=async function(t){const e=this.getOffsetParent||yH,n=this.getDimensions,r=await n(t.floating);return{reference:KTe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function e2e(t){return lu(t).direction==="rtl"}const t2e={convertOffsetParentRelativeRectToViewportRelativeRect:HTe,getDocumentElement:dc,getClippingRect:ZTe,getOffsetParent:yH,getElementRects:JTe,getClientRects:WTe,getDimensions:GTe,getScale:Ag,isElement:su,isRTL:e2e};function n2e(t,e){let n=null,r;const i=dc(t);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const{left:u,top:c,width:d,height:f}=t.getBoundingClientRect();if(s||e(),!d||!f)return;const h=tO(c),m=tO(i.clientWidth-(u+d)),g=tO(i.clientHeight-(c+f)),y=tO(u),w={rootMargin:-h+"px "+-m+"px "+-g+"px "+-y+"px",threshold:jh(0,em(1,l))||1};let O=!0;function S(x){const C=x[0].intersectionRatio;if(C!==l){if(!O)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O=!1}try{n=new IntersectionObserver(S,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(S,w)}n.observe(t)}return a(!0),o}function r2e(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=$$(t),c=i||o?[...u?g0(u):[],...g0(e)]:[];c.forEach(b=>{i&&b.addEventListener("scroll",n,{passive:!0}),o&&b.addEventListener("resize",n)});const d=u&&s?n2e(u,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var O;(O=h)==null||O.observe(e)})),n()}),u&&!l&&h.observe(u),h.observe(e));let m,g=l?rp(t):null;l&&y();function y(){const b=rp(t);g&&(b.x!==g.x||b.y!==g.y||b.width!==g.width||b.height!==g.height)&&n(),g=b,m=requestAnimationFrame(y)}return n(),()=>{var b;c.forEach(w=>{i&&w.removeEventListener("scroll",n),o&&w.removeEventListener("resize",n)}),d==null||d(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(m)}}const i2e=A$,bH=BTe,o2e=FTe,a2e=LTe,_H=DTe,OH=(t,e,n)=>{const r=new Map,i={platform:t2e,...n},o={...i.platform,_c:r};return NTe(t,e,{...i,platform:o})};Ye({});const s2e=t=>{if(!Tn)return;if(!t)return t;const e=Wa(t);return e||(kr(t)?e:t)},l2e=({middleware:t,placement:e,strategy:n})=>{const r=F(),i=F(),o=F(),a=F(),s=F({}),l={x:o,y:a,placement:e,strategy:n,middlewareData:s},u=async()=>{if(!Tn)return;const c=s2e(r),d=Wa(i);if(!c||!d)return;const f=await OH(c,d,{placement:p(e),strategy:p(n),middleware:p(t)});Yg(l).forEach(h=>{l[h].value=f[h]})};return Bt(()=>{Bo(()=>{u()})}),{...l,update:u,referenceRef:r,contentRef:i}},u2e=({arrowRef:t,padding:e})=>({name:"arrow",options:{element:t,padding:e},fn(n){const r=p(t);return r?_H({element:r,padding:e}).fn(n):{}}});function c2e(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:o,value:a}=t.value;if(i==null||o==null)return;const s=a.slice(0,Math.max(0,i)),l=a.slice(Math.max(0,o));e={selectionStart:i,selectionEnd:o,value:a,beforeTxt:s,afterTxt:l}}function r(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:o,afterTxt:a,selectionStart:s}=e;if(o==null||a==null||s==null)return;let l=i.length;if(i.endsWith(a))l=i.length-a.length;else if(i.startsWith(o))l=o.length;else{const u=o[s-1],c=i.indexOf(u,s-1);c!==-1&&(l=c+1)}t.value.setSelectionRange(l,l)}return[n,r]}const d2e=(t,e,n)=>Kd(t.subTree).filter(o=>{var a;return Kr(o)&&((a=o.type)==null?void 0:a.name)===e&&!!o.component}).map(o=>o.component.uid).map(o=>n[o]).filter(o=>!!o),N$=(t,e)=>{const n={},r=Tr([]);return{children:r,addChild:a=>{n[a.uid]=a,r.value=d2e(t,e,n)},removeChild:a=>{delete n[a],r.value=r.value.filter(s=>s.uid!==a)}}},Wi=hu({type:String,values:cc,required:!1}),wH=Symbol("size"),SH=()=>{const t=ht(wH,{});return M(()=>p(t.size)||"")};function Pb(t,{beforeFocus:e,afterFocus:n,beforeBlur:r,afterBlur:i}={}){const o=en(),{emit:a}=o,s=Tr(),l=F(!1),u=f=>{($t(e)?e(f):!1)||l.value||(l.value=!0,a("focus",f),n==null||n())},c=f=>{var h;($t(r)?r(f):!1)||f.relatedTarget&&((h=s.value)==null?void 0:h.contains(f.relatedTarget))||(l.value=!1,a("blur",f),i==null||i())},d=()=>{var f,h;((f=s.value)==null?void 0:f.contains(document.activeElement))&&s.value!==document.activeElement||(h=t.value)==null||h.focus()};return Ve(s,f=>{f&&f.setAttribute("tabindex","-1")}),sr(s,"focus",u,!0),sr(s,"blur",c,!0),sr(s,"click",d,!0),{isFocused:l,wrapperRef:s,handleFocus:u,handleBlur:c}}function Qx({afterComposition:t,emit:e}){const n=F(!1),r=s=>{e==null||e("compositionstart",s),n.value=!0},i=s=>{var l;e==null||e("compositionupdate",s);const u=(l=s.target)==null?void 0:l.value,c=u[u.length-1]||"";n.value=!nEe(c)},o=s=>{e==null||e("compositionend",s),n.value&&(n.value=!1,Ot(()=>t(s)))};return{isComposing:n,handleComposition:s=>{s.type==="compositionend"?o(s):i(s)},handleCompositionStart:r,handleCompositionUpdate:i,handleCompositionEnd:o}}const xH=Symbol("emptyValuesContextKey"),f2e=["",void 0,null],h2e=void 0,Wm=Ye({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>$t(t)?!t():!t}}),Hx=(t,e)=>{const n=en()?ht(xH,F({})):F({}),r=M(()=>t.emptyValues||n.value.emptyValues||f2e),i=M(()=>$t(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:$t(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:h2e),o=a=>r.value.includes(a);return r.value.includes(i.value),{emptyValues:r,valueOnClear:i,isEmptyValue:o}},p2e=Ye({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),wo=t=>vo(p2e,t),CH=Symbol(),bw=F();function Wx(t,e=void 0){const n=en()?ht(CH,bw):bw;return t?M(()=>{var r,i;return(i=(r=n.value)==null?void 0:r[t])!=null?i:e}):n}function Ux(t,e){const n=Wx(),r=Qe(t,M(()=>{var s;return((s=n.value)==null?void 0:s.namespace)||wy})),i=kn(M(()=>{var s;return(s=n.value)==null?void 0:s.locale})),o=Qm(M(()=>{var s;return((s=n.value)==null?void 0:s.zIndex)||uH})),a=M(()=>{var s;return p(e)||((s=n.value)==null?void 0:s.size)||""});return D$(M(()=>p(n)||{})),{ns:r,locale:i,zIndex:o,size:a}}const D$=(t,e,n=!1)=>{var r;const i=!!en(),o=i?Wx():void 0,a=(r=e==null?void 0:e.provide)!=null?r:i?_n:void 0;if(!a)return;const s=M(()=>{const l=p(t);return o!=null&&o.value?g2e(o.value,l):l});return a(CH,s),a(qQ,M(()=>s.value.locale)),a(YQ,M(()=>s.value.namespace)),a(cH,M(()=>s.value.zIndex)),a(wH,{size:M(()=>s.value.size||"")}),a(xH,M(()=>({emptyValues:s.value.emptyValues,valueOnClear:s.value.valueOnClear}))),(n||!bw.value)&&(bw.value=s.value),s},g2e=(t,e)=>{const n=[...new Set([...Yg(t),...Yg(e)])],r={};for(const i of n)r[i]=e[i]!==void 0?e[i]:t[i];return r},m2e=Ye({a11y:{type:Boolean,default:!0},locale:{type:Oe(Object)},size:Wi,button:{type:Oe(Object)},experimentalFeatures:{type:Oe(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Oe(Object)},zIndex:Number,namespace:{type:String,default:"el"},...Wm}),Ql={},v2e=ue({name:"ElConfigProvider",props:m2e,setup(t,{slots:e}){Ve(()=>t.message,r=>{Object.assign(Ql,r!=null?r:{})},{immediate:!0,deep:!0});const n=D$(t);return()=>xe(e,"default",{config:n==null?void 0:n.value})}}),EH=Vt(v2e),y2e="2.8.6",b2e=(t=[])=>({version:y2e,install:(n,r)=>{n[b5]||(n[b5]=!0,t.forEach(i=>n.use(i)),r&&D$(r,n,!0))}}),_2e=Ye({zIndex:{type:Oe([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"}}),O2e={scroll:({scrollTop:t,fixed:e})=>kt(t)&&si(e),[Lr]:t=>si(t)};var Ge=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const TH="ElAffix",w2e=ue({name:TH}),S2e=ue({...w2e,props:_2e,emits:O2e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("affix"),o=Tr(),a=Tr(),s=Tr(),{height:l}=ace(),{height:u,width:c,top:d,bottom:f,update:h}=a4(a,{windowScroll:!1}),m=a4(o),g=F(!1),y=F(0),b=F(0),w=M(()=>({height:g.value?`${u.value}px`:"",width:g.value?`${c.value}px`:""})),O=M(()=>{if(!g.value)return{};const C=r.offset?pi(r.offset):0;return{height:`${u.value}px`,width:`${c.value}px`,top:r.position==="top"?C:"",bottom:r.position==="bottom"?C:"",transform:b.value?`translateY(${b.value}px)`:"",zIndex:r.zIndex}}),S=()=>{if(!s.value)return;y.value=s.value instanceof Window?document.documentElement.scrollTop:s.value.scrollTop||0;const{position:C,target:E,offset:T}=r,P=T+u.value;if(C==="top")if(E){const A=m.bottom.value-P;g.value=T>d.value&&m.bottom.value>0,b.value=A<0?A:0}else g.value=T>d.value;else if(E){const A=l.value-m.top.value-P;g.value=l.value-Tm.top.value,b.value=A<0?-A:0}else g.value=l.value-T{h(),n("scroll",{scrollTop:y.value,fixed:g.value})};return Ve(g,C=>n("change",C)),Bt(()=>{var C;r.target?(o.value=(C=document.querySelector(r.target))!=null?C:void 0,o.value||Hi(TH,`Target does not exist: ${r.target}`)):o.value=document.documentElement,s.value=r$(a.value,!0),h()}),sr(s,"scroll",x),Bo(S),e({update:S,updateRoot:h}),(C,E)=>(R(),G("div",{ref_key:"root",ref:a,class:j(p(i).b()),style:mt(p(w))},[J("div",{class:j({[p(i).m("fixed")]:g.value}),style:mt(p(O))},[xe(C.$slots,"default")],6)],6))}});var x2e=Ge(S2e,[["__file","affix.vue"]]);const C2e=Vt(x2e),E2e=Ye({size:{type:Oe([Number,String])},color:{type:String}}),T2e=ue({name:"ElIcon",inheritAttrs:!1}),k2e=ue({...T2e,props:E2e,setup(t){const e=t,n=Qe("icon"),r=M(()=>{const{size:i,color:o}=e;return!i&&!o?{}:{fontSize:ai(i)?void 0:pi(i),"--color":o}});return(i,o)=>(R(),G("i",gn({class:p(n).b(),style:p(r)},i.$attrs),[xe(i.$slots,"default")],16))}});var P2e=Ge(k2e,[["__file","icon.vue"]]);const gt=Vt(P2e),A2e=["light","dark"],M2e=Ye({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:Yg(bf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:A2e,default:"light"}}),R2e={close:t=>t instanceof MouseEvent},$2e=ue({name:"ElAlert"}),N2e=ue({...$2e,props:M2e,emits:R2e,setup(t,{emit:e}){const n=t,{Close:r}=h$,i=Ji(),o=Qe("alert"),a=F(!0),s=M(()=>bf[n.type]),l=M(()=>[o.e("icon"),{[o.is("big")]:!!n.description||!!i.default}]),u=M(()=>({"with-description":n.description||i.default})),c=d=>{a.value=!1,e("close",d)};return(d,f)=>(R(),we(Qi,{name:p(o).b("fade"),persisted:""},{default:z(()=>[Ht(J("div",{class:j([p(o).b(),p(o).m(d.type),p(o).is("center",d.center),p(o).is(d.effect)]),role:"alert"},[d.showIcon&&p(s)?(R(),we(p(gt),{key:0,class:j(p(l))},{default:z(()=>[(R(),we(un(p(s))))]),_:1},8,["class"])):_e("v-if",!0),J("div",{class:j(p(o).e("content"))},[d.title||d.$slots.title?(R(),G("span",{key:0,class:j([p(o).e("title"),p(u)])},[xe(d.$slots,"title",{},()=>[qe(je(d.title),1)])],2)):_e("v-if",!0),d.$slots.default||d.description?(R(),G("p",{key:1,class:j(p(o).e("description"))},[xe(d.$slots,"default",{},()=>[qe(je(d.description),1)])],2)):_e("v-if",!0),d.closable?(R(),G(ct,{key:2},[d.closeText?(R(),G("div",{key:0,class:j([p(o).e("close-btn"),p(o).is("customed")]),onClick:c},je(d.closeText),3)):(R(),we(p(gt),{key:1,class:j(p(o).e("close-btn")),onClick:c},{default:z(()=>[B(p(r))]),_:1},8,["class"]))],64)):_e("v-if",!0)],2)],2),[[zn,a.value]])]),_:3},8,["name"]))}});var D2e=Ge(N2e,[["__file","alert.vue"]]);const kH=Vt(D2e),Op=Symbol("formContextKey"),tc=Symbol("formItemContextKey"),Ni=(t,e={})=>{const n=F(void 0),r=e.prop?n:XQ("size"),i=e.global?n:SH(),o=e.form?{size:void 0}:ht(Op,void 0),a=e.formItem?{size:void 0}:ht(tc,void 0);return M(()=>r.value||p(t)||(a==null?void 0:a.size)||(o==null?void 0:o.size)||i.value||"")},la=t=>{const e=XQ("disabled"),n=ht(Op,void 0);return M(()=>e.value||p(t)||(n==null?void 0:n.disabled)||!1)},ua=()=>{const t=ht(Op,void 0),e=ht(tc,void 0);return{form:t,formItem:e}},gu=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:r})=>{n||(n=F(!1)),r||(r=F(!1));const i=F();let o;const a=M(()=>{var s;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((s=e.inputIds)==null?void 0:s.length)<=1)});return Bt(()=>{o=Ve([er(t,"id"),n],([s,l])=>{const u=s!=null?s:l?void 0:bo().value;u!==i.value&&(e!=null&&e.removeInputId&&(i.value&&e.removeInputId(i.value),!(r!=null&&r.value)&&!l&&u&&e.addInputId(u)),i.value=u)},{immediate:!0})}),ed(()=>{o&&o(),e!=null&&e.removeInputId&&i.value&&e.removeInputId(i.value)}),{isLabeledByFormItem:a,inputId:i}},L2e=Ye({size:{type:String,values:cc},disabled:Boolean}),I2e=Ye({...L2e,model:Object,rules:{type:Oe(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:[Object,Boolean]}}),B2e={validate:(t,e,n)=>(ut(t)||At(t))&&si(e)&&At(n)};function F2e(){const t=F([]),e=M(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const a=t.value.indexOf(o);return a===-1&&e.value,a}function r(o,a){if(o&&a){const s=n(a);t.value.splice(s,1,o)}else o&&t.value.push(o)}function i(o){const a=n(o);a>-1&&t.value.splice(a,1)}return{autoLabelWidth:e,registerLabelWidth:r,deregisterLabelWidth:i}}const nO=(t,e)=>{const n=$o(e);return n.length>0?t.filter(r=>r.prop&&n.includes(r.prop)):t},V2e="ElForm",j2e=ue({name:V2e}),z2e=ue({...j2e,props:I2e,emits:B2e,setup(t,{expose:e,emit:n}){const r=t,i=[],o=Ni(),a=Qe("form"),s=M(()=>{const{labelPosition:O,inline:S}=r;return[a.b(),a.m(o.value||"default"),{[a.m(`label-${O}`)]:O,[a.m("inline")]:S}]}),l=O=>i.find(S=>S.prop===O),u=O=>{i.push(O)},c=O=>{O.prop&&i.splice(i.indexOf(O),1)},d=(O=[])=>{!r.model||nO(i,O).forEach(S=>S.resetField())},f=(O=[])=>{nO(i,O).forEach(S=>S.clearValidate())},h=M(()=>!!r.model),m=O=>{if(i.length===0)return[];const S=nO(i,O);return S.length?S:[]},g=async O=>b(void 0,O),y=async(O=[])=>{if(!h.value)return!1;const S=m(O);if(S.length===0)return!0;let x={};for(const C of S)try{await C.validate("")}catch(E){x={...x,...E}}return Object.keys(x).length===0?!0:Promise.reject(x)},b=async(O=[],S)=>{const x=!$t(S);try{const C=await y(O);return C===!0&&await(S==null?void 0:S(C)),C}catch(C){if(C instanceof Error)throw C;const E=C;return r.scrollToError&&w(Object.keys(E)[0]),await(S==null?void 0:S(!1,E)),x&&Promise.reject(E)}},w=O=>{var S;const x=nO(i,O)[0];x&&((S=x.$el)==null||S.scrollIntoView(r.scrollIntoViewOptions))};return Ve(()=>r.rules,()=>{r.validateOnRuleChange&&g().catch(O=>void 0)},{deep:!0}),_n(Op,Sn({...Ri(r),emit:n,resetFields:d,clearValidate:f,validateField:b,getField:l,addField:u,removeField:c,...F2e()})),e({validate:g,validateField:b,resetFields:d,clearValidate:f,scrollToField:w,fields:i}),(O,S)=>(R(),G("form",{class:j(p(s))},[xe(O.$slots,"default")],2))}});var Q2e=Ge(z2e,[["__file","form.vue"]]);function Ph(){return Ph=Object.assign?Object.assign.bind():function(t){for(var e=1;e1?e-1:0),r=1;r=o)return s;switch(s){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function X2e(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function lo(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||X2e(e)&&typeof t=="string"&&!t)}function Z2e(t,e,n){var r=[],i=0,o=t.length;function a(s){r.push.apply(r,s||[]),i++,i===o&&n(r)}t.forEach(function(s){e(s,a)})}function V5(t,e,n){var r=0,i=t.length;function o(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s()\[\]\\.,;:\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},ey={integer:function(e){return ey.number(e)&&parseInt(e,10)===e},float:function(e){return ey.number(e)&&!ey.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"&&!ey.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(H5.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(nke())},hex:function(e){return typeof e=="string"&&!!e.match(H5.hex)}},rke=function(e,n,r,i,o){if(e.required&&n===void 0){PH(e,n,r,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?ey[s](n)||i.push(Es(o.messages.types[s],e.fullField,e.type)):s&&typeof n!==e.type&&i.push(Es(o.messages.types[s],e.fullField,e.type))},ike=function(e,n,r,i,o){var a=typeof e.len=="number",s=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),a?c!==e.len&&i.push(Es(o.messages[d].len,e.fullField,e.len)):s&&!l&&ce.max?i.push(Es(o.messages[d].max,e.fullField,e.max)):s&&l&&(ce.max)&&i.push(Es(o.messages[d].range,e.fullField,e.min,e.max))},zp="enum",oke=function(e,n,r,i,o){e[zp]=Array.isArray(e[zp])?e[zp]:[],e[zp].indexOf(n)===-1&&i.push(Es(o.messages[zp],e.fullField,e[zp].join(", ")))},ake=function(e,n,r,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(n)||i.push(Es(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},wr={required:PH,whitespace:tke,type:rke,range:ike,enum:oke,pattern:ake},ske=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"string")&&!e.required)return r();wr.required(e,n,i,a,o,"string"),lo(n,"string")||(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o),wr.pattern(e,n,i,a,o),e.whitespace===!0&&wr.whitespace(e,n,i,a,o))}r(a)},lke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},uke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n===""&&(n=void 0),lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},cke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},dke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),lo(n)||wr.type(e,n,i,a,o)}r(a)},fke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},hke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},pke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(n==null&&!e.required)return r();wr.required(e,n,i,a,o,"array"),n!=null&&(wr.type(e,n,i,a,o),wr.range(e,n,i,a,o))}r(a)},gke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr.type(e,n,i,a,o)}r(a)},mke="enum",vke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o),n!==void 0&&wr[mke](e,n,i,a,o)}r(a)},yke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"string")&&!e.required)return r();wr.required(e,n,i,a,o),lo(n,"string")||wr.pattern(e,n,i,a,o)}r(a)},bke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n,"date")&&!e.required)return r();if(wr.required(e,n,i,a,o),!lo(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),wr.type(e,l,i,a,o),l&&wr.range(e,l.getTime(),i,a,o)}}r(a)},_ke=function(e,n,r,i,o){var a=[],s=Array.isArray(n)?"array":typeof n;wr.required(e,n,i,a,o,s),r(a)},yT=function(e,n,r,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(lo(n,a)&&!e.required)return r();wr.required(e,n,i,s,o,a),lo(n,a)||wr.type(e,n,i,s,o)}r(s)},Oke=function(e,n,r,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(lo(n)&&!e.required)return r();wr.required(e,n,i,a,o)}r(a)},Cy={string:ske,method:lke,number:uke,boolean:cke,regexp:dke,integer:fke,float:hke,array:pke,object:gke,enum:vke,pattern:yke,date:bke,url:yT,hex:yT,email:yT,required:_ke,any:Oke};function Pk(){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 Ak=Pk(),Ab=function(){function t(n){this.rules=null,this._messages=Ak,this.define(n)}var e=t.prototype;return e.define=function(r){var i=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(typeof r!="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var a=r[o];i.rules[o]=Array.isArray(a)?a:[a]})},e.messages=function(r){return r&&(this._messages=Q5(Pk(),r)),this._messages},e.validate=function(r,i,o){var a=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var s=r,l=i,u=o;if(typeof l=="function"&&(u=l,l={}),!this.rules||Object.keys(this.rules).length===0)return u&&u(null,s),Promise.resolve(s);function c(g){var y=[],b={};function w(S){if(Array.isArray(S)){var x;y=(x=y).concat.apply(x,S)}else y.push(S)}for(var O=0;O");const i=Qe("form"),o=F(),a=F(0),s=()=>{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")=>{Ot(()=>{e.default&&t.isAutoWidth&&(c==="update"?a.value=s():c==="remove"&&(n==null||n.deregisterLabelWidth(a.value)))})},u=()=>l("update");return Bt(()=>{u()}),pr(()=>{l("remove")}),Jc(()=>u()),Ve(a,(c,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(c,d))}),Zr(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==null?void 0:n.autoLabelWidth,m=r==null?void 0:r.hasLabel,g={};if(m&&h&&h!=="auto"){const y=Math.max(0,Number.parseInt(h,10)-a.value),w=(r.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(g[w]=`${y}px`)}return B("div",{ref:o,class:[i.be("item","label-wrap")],style:g},[(c=e.default)==null?void 0:c.call(e)])}else return B(ct,{ref:o},[(d=e.default)==null?void 0:d.call(e)])}}});const Cke=ue({name:"ElFormItem"}),Eke=ue({...Cke,props:Ske,setup(t,{expose:e}){const n=t,r=Ji(),i=ht(Op,void 0),o=ht(tc,void 0),a=Ni(void 0,{formItem:!1}),s=Qe("form-item"),l=bo().value,u=F([]),c=F(""),d=zue(c,100),f=F(""),h=F();let m,g=!1;const y=M(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),b=M(()=>{if(y.value==="top")return{};const te=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return te?{width:te}:{}}),w=M(()=>{if(y.value==="top"||(i==null?void 0:i.inline))return{};if(!n.label&&!n.labelWidth&&A)return{};const te=pi(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!r.label?{marginLeft:te}:{}}),O=M(()=>[s.b(),s.m(a.value),s.is("error",c.value==="error"),s.is("validating",c.value==="validating"),s.is("success",c.value==="success"),s.is("required",L.value||n.required),s.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[s.m("feedback")]:i==null?void 0:i.statusIcon,[s.m(`label-${y.value}`)]:y.value}]),S=M(()=>si(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),x=M(()=>[s.e("error"),{[s.em("error","inline")]:S.value}]),C=M(()=>n.prop?At(n.prop)?n.prop:n.prop.join("."):""),E=M(()=>!!(n.label||r.label)),T=M(()=>n.for||(u.value.length===1?u.value[0]:void 0)),P=M(()=>!T.value&&E.value),A=!!o,D=M(()=>{const te=i==null?void 0:i.model;if(!(!te||!n.prop))return b1(te,n.prop).value}),N=M(()=>{const{required:te}=n,ge=[];n.rules&&ge.push(...$o(n.rules));const Re=i==null?void 0:i.rules;if(Re&&n.prop){const $e=b1(Re,n.prop).value;$e&&ge.push(...$o($e))}if(te!==void 0){const $e=ge.map((Z,ce)=>[Z,ce]).filter(([Z])=>Object.keys(Z).includes("required"));if($e.length>0)for(const[Z,ce]of $e)Z.required!==te&&(ge[ce]={...Z,required:te});else ge.push({required:te})}return ge}),$=M(()=>N.value.length>0),W=te=>N.value.filter(Re=>!Re.trigger||!te?!0:Array.isArray(Re.trigger)?Re.trigger.includes(te):Re.trigger===te).map(({trigger:Re,...$e})=>$e),L=M(()=>N.value.some(te=>te.required)),I=M(()=>{var te;return d.value==="error"&&n.showMessage&&((te=i==null?void 0:i.showMessage)!=null?te:!0)}),U=M(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),Q=te=>{c.value=te},V=te=>{var ge,Re;const{errors:$e,fields:Z}=te;(!$e||!Z)&&console.error(te),Q("error"),f.value=$e?(Re=(ge=$e==null?void 0:$e[0])==null?void 0:ge.message)!=null?Re:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,f.value)},q=()=>{Q("success"),i==null||i.emit("validate",n.prop,!0,"")},K=async te=>{const ge=C.value;return new Ab({[ge]:te}).validate({[ge]:D.value},{firstFields:!0}).then(()=>(q(),!0)).catch($e=>(V($e),Promise.reject($e)))},ie=async(te,ge)=>{if(g||!n.prop)return!1;const Re=$t(ge);if(!$.value)return ge==null||ge(!1),!1;const $e=W(te);return $e.length===0?(ge==null||ge(!0),!0):(Q("validating"),K($e).then(()=>(ge==null||ge(!0),!0)).catch(Z=>{const{fields:ce}=Z;return ge==null||ge(!1,ce),Re?!1:Promise.reject(ce)}))},oe=()=>{Q(""),f.value="",g=!1},Se=async()=>{const te=i==null?void 0:i.model;if(!te||!n.prop)return;const ge=b1(te,n.prop);g=!0,ge.value=fk(m),await Ot(),oe(),g=!1},ke=te=>{u.value.includes(te)||u.value.push(te)},Y=te=>{u.value=u.value.filter(ge=>ge!==te)};Ve(()=>n.error,te=>{f.value=te||"",Q(te?"error":"")},{immediate:!0}),Ve(()=>n.validateStatus,te=>Q(te||""));const re=Sn({...Ri(n),$el:h,size:a,validateState:c,labelId:l,inputIds:u,isGroup:P,hasLabel:E,fieldValue:D,addInputId:ke,removeInputId:Y,resetField:Se,clearValidate:oe,validate:ie});return _n(tc,re),Bt(()=>{n.prop&&(i==null||i.addField(re),m=fk(D.value))}),pr(()=>{i==null||i.removeField(re)}),e({size:a,validateMessage:f,validateState:c,validate:ie,clearValidate:oe,resetField:Se}),(te,ge)=>{var Re;return R(),G("div",{ref_key:"formItemRef",ref:h,class:j(p(O)),role:p(P)?"group":void 0,"aria-labelledby":p(P)?p(l):void 0},[B(p(xke),{"is-auto-width":p(b).width==="auto","update-all":((Re=p(i))==null?void 0:Re.labelWidth)==="auto"},{default:z(()=>[p(E)?(R(),we(un(p(T)?"label":"div"),{key:0,id:p(l),for:p(T),class:j(p(s).e("label")),style:mt(p(b))},{default:z(()=>[xe(te.$slots,"label",{label:p(U)},()=>[qe(je(p(U)),1)])]),_:3},8,["id","for","class","style"])):_e("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),J("div",{class:j(p(s).e("content")),style:mt(p(w))},[xe(te.$slots,"default"),B(Kz,{name:`${p(s).namespace.value}-zoom-in-top`},{default:z(()=>[p(I)?xe(te.$slots,"error",{key:0,error:f.value},()=>[J("div",{class:j(p(x))},je(f.value),3)]):_e("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var AH=Ge(Eke,[["__file","form-item.vue"]]);const El=Vt(Q2e,{FormItem:AH}),Tl=ti(AH);let Il;const Tke=` height:0 !important; visibility:hidden !important; ${nR()?"":"overflow:hidden !important;"} position:absolute !important; z-index:-1000 !important; top:0 !important; right:0 !important; `,kke=["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"];function Pke(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),r=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:kke.map(a=>`${a}:${e.getPropertyValue(a)}`).join(";"),paddingSize:r,borderSize:i,boxSizing:n}}function U5(t,e=1,n){var r;Il||(Il=document.createElement("textarea"),document.body.appendChild(Il));const{paddingSize:i,borderSize:o,boxSizing:a,contextStyle:s}=Pke(t);Il.setAttribute("style",`${s};${Tke}`),Il.value=t.value||t.placeholder||"";let l=Il.scrollHeight;const u={};a==="border-box"?l=l+o:a==="content-box"&&(l=l-i),Il.value="";const c=Il.scrollHeight-i;if(kt(e)){let d=c*e;a==="border-box"&&(d=d+i+o),l=Math.max(d,l),u.minHeight=`${d}px`}if(kt(n)){let d=c*n;a==="border-box"&&(d=d+i+o),l=Math.min(d,l)}return u.height=`${l}px`,(r=Il.parentNode)==null||r.removeChild(Il),Il=void 0,u}const L$=Ye({id:{type:String,default:void 0},size:Wi,disabled:Boolean,modelValue:{type:Oe([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Oe([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:fr},prefixIcon:{type:fr},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Oe([Object,Array,String]),default:()=>Jr({})},autofocus:Boolean,rows:{type:Number,default:2},...wo(["ariaLabel"])}),Ake={[Zt]:t=>At(t),input:t=>At(t),change:t=>At(t),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},Mke=ue({name:"ElInput",inheritAttrs:!1}),Rke=ue({...Mke,props:L$,emits:Ake,setup(t,{expose:e,emit:n}){const r=t,i=mp(),o=Ji(),a=M(()=>{const be={};return r.containerRole==="combobox"&&(be["aria-haspopup"]=i["aria-haspopup"],be["aria-owns"]=i["aria-owns"],be["aria-expanded"]=i["aria-expanded"]),be}),s=M(()=>[r.type==="textarea"?y.b():g.b(),g.m(h.value),g.is("disabled",m.value),g.is("exceed",oe.value),{[g.b("group")]:o.prepend||o.append,[g.m("prefix")]:o.prefix||r.prefixIcon,[g.m("suffix")]:o.suffix||r.suffixIcon||r.clearable||r.showPassword,[g.bm("suffix","password-clear")]:V.value&&q.value,[g.b("hidden")]:r.type==="hidden"},i.class]),l=M(()=>[g.e("wrapper"),g.is("focus",P.value)]),u=g$({excludeKeys:M(()=>Object.keys(a.value))}),{form:c,formItem:d}=ua(),{inputId:f}=gu(r,{formItemContext:d}),h=Ni(),m=la(),g=Qe("input"),y=Qe("textarea"),b=Tr(),w=Tr(),O=F(!1),S=F(!1),x=F(),C=Tr(r.inputStyle),E=M(()=>b.value||w.value),{wrapperRef:T,isFocused:P,handleFocus:A,handleBlur:D}=Pb(E,{beforeFocus(){return m.value},afterBlur(){var be;r.validateEvent&&((be=d==null?void 0:d.validate)==null||be.call(d,"blur").catch(Be=>void 0))}}),N=M(()=>{var be;return(be=c==null?void 0:c.statusIcon)!=null?be:!1}),$=M(()=>(d==null?void 0:d.validateState)||""),W=M(()=>$.value&&p$[$.value]),L=M(()=>S.value?HCe:cCe),I=M(()=>[i.style]),U=M(()=>[r.inputStyle,C.value,{resize:r.resize}]),Q=M(()=>Dr(r.modelValue)?"":String(r.modelValue)),V=M(()=>r.clearable&&!m.value&&!r.readonly&&!!Q.value&&(P.value||O.value)),q=M(()=>r.showPassword&&!m.value&&!!Q.value&&(!!Q.value||P.value)),K=M(()=>r.showWordLimit&&!!r.maxlength&&(r.type==="text"||r.type==="textarea")&&!m.value&&!r.readonly&&!r.showPassword),ie=M(()=>Q.value.length),oe=M(()=>!!K.value&&ie.value>Number(r.maxlength)),Se=M(()=>!!o.suffix||!!r.suffixIcon||V.value||r.showPassword||K.value||!!$.value&&N.value),[ke,Y]=c2e(b);Zr(w,be=>{if(ge(),!K.value||r.resize!=="both")return;const Be=be[0],{width:Xe}=Be.contentRect;x.value={right:`calc(100% - ${Xe+15+6}px)`}});const re=()=>{const{type:be,autosize:Be}=r;if(!(!Tn||be!=="textarea"||!w.value))if(Be){const Xe=sn(Be)?Be.minRows:void 0,Ke=sn(Be)?Be.maxRows:void 0,tt=U5(w.value,Xe,Ke);C.value={overflowY:"hidden",...tt},Ot(()=>{w.value.offsetHeight,C.value=tt})}else C.value={minHeight:U5(w.value).minHeight}},ge=(be=>{let Be=!1;return()=>{var Xe;if(Be||!r.autosize)return;((Xe=w.value)==null?void 0:Xe.offsetParent)===null||(be(),Be=!0)}})(re),Re=()=>{const be=E.value,Be=r.formatter?r.formatter(Q.value):Q.value;!be||be.value===Be||(be.value=Be)},$e=async be=>{ke();let{value:Be}=be.target;if(r.formatter&&(Be=r.parser?r.parser(Be):Be),!ce.value){if(Be===Q.value){Re();return}n(Zt,Be),n("input",Be),await Ot(),Re(),Y()}},Z=be=>{n("change",be.target.value)},{isComposing:ce,handleCompositionStart:Te,handleCompositionUpdate:Ie,handleCompositionEnd:ae}=Qx({emit:n,afterComposition:$e}),me=()=>{S.value=!S.value,Ae()},Ae=async()=>{var be;await Ot(),(be=E.value)==null||be.focus()},X=()=>{var be;return(be=E.value)==null?void 0:be.blur()},ee=be=>{O.value=!1,n("mouseleave",be)},le=be=>{O.value=!0,n("mouseenter",be)},Ce=be=>{n("keydown",be)},fe=()=>{var be;(be=E.value)==null||be.select()},Ee=()=>{n(Zt,""),n("change",""),n("clear"),n("input","")};return Ve(()=>r.modelValue,()=>{var be;Ot(()=>re()),r.validateEvent&&((be=d==null?void 0:d.validate)==null||be.call(d,"change").catch(Be=>void 0))}),Ve(Q,()=>Re()),Ve(()=>r.type,async()=>{await Ot(),Re(),re()}),Bt(()=>{!r.formatter&&r.parser,Re(),Ot(re)}),e({input:b,textarea:w,ref:E,textareaStyle:U,autosize:er(r,"autosize"),isComposing:ce,focus:Ae,blur:X,select:fe,clear:Ee,resizeTextarea:re}),(be,Be)=>(R(),G("div",gn(p(a),{class:[p(s),{[p(g).bm("group","append")]:be.$slots.append,[p(g).bm("group","prepend")]:be.$slots.prepend}],style:p(I),role:be.containerRole,onMouseenter:le,onMouseleave:ee}),[_e(" input "),be.type!=="textarea"?(R(),G(ct,{key:0},[_e(" prepend slot "),be.$slots.prepend?(R(),G("div",{key:0,class:j(p(g).be("group","prepend"))},[xe(be.$slots,"prepend")],2)):_e("v-if",!0),J("div",{ref_key:"wrapperRef",ref:T,class:j(p(l))},[_e(" prefix slot "),be.$slots.prefix||be.prefixIcon?(R(),G("span",{key:0,class:j(p(g).e("prefix"))},[J("span",{class:j(p(g).e("prefix-inner"))},[xe(be.$slots,"prefix"),be.prefixIcon?(R(),we(p(gt),{key:0,class:j(p(g).e("icon"))},{default:z(()=>[(R(),we(un(be.prefixIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],2)):_e("v-if",!0),J("input",gn({id:p(f),ref_key:"input",ref:b,class:p(g).e("inner")},p(u),{minlength:be.minlength,maxlength:be.maxlength,type:be.showPassword?S.value?"text":"password":be.type,disabled:p(m),readonly:be.readonly,autocomplete:be.autocomplete,tabindex:be.tabindex,"aria-label":be.ariaLabel,placeholder:be.placeholder,style:be.inputStyle,form:be.form,autofocus:be.autofocus,onCompositionstart:p(Te),onCompositionupdate:p(Ie),onCompositionend:p(ae),onInput:$e,onChange:Z,onKeydown:Ce}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),_e(" suffix slot "),p(Se)?(R(),G("span",{key:1,class:j(p(g).e("suffix"))},[J("span",{class:j(p(g).e("suffix-inner"))},[!p(V)||!p(q)||!p(K)?(R(),G(ct,{key:0},[xe(be.$slots,"suffix"),be.suffixIcon?(R(),we(p(gt),{key:0,class:j(p(g).e("icon"))},{default:z(()=>[(R(),we(un(be.suffixIcon)))]),_:1},8,["class"])):_e("v-if",!0)],64)):_e("v-if",!0),p(V)?(R(),we(p(gt),{key:1,class:j([p(g).e("icon"),p(g).e("clear")]),onMousedown:Pt(p(yr),["prevent"]),onClick:Ee},{default:z(()=>[B(p(Bf))]),_:1},8,["class","onMousedown"])):_e("v-if",!0),p(q)?(R(),we(p(gt),{key:2,class:j([p(g).e("icon"),p(g).e("password")]),onClick:me},{default:z(()=>[(R(),we(un(p(L))))]),_:1},8,["class"])):_e("v-if",!0),p(K)?(R(),G("span",{key:3,class:j(p(g).e("count"))},[J("span",{class:j(p(g).e("count-inner"))},je(p(ie))+" / "+je(be.maxlength),3)],2)):_e("v-if",!0),p($)&&p(W)&&p(N)?(R(),we(p(gt),{key:4,class:j([p(g).e("icon"),p(g).e("validateIcon"),p(g).is("loading",p($)==="validating")])},{default:z(()=>[(R(),we(un(p(W))))]),_:1},8,["class"])):_e("v-if",!0)],2)],2)):_e("v-if",!0)],2),_e(" append slot "),be.$slots.append?(R(),G("div",{key:1,class:j(p(g).be("group","append"))},[xe(be.$slots,"append")],2)):_e("v-if",!0)],64)):(R(),G(ct,{key:1},[_e(" textarea "),J("textarea",gn({id:p(f),ref_key:"textarea",ref:w,class:[p(y).e("inner"),p(g).is("focus",p(P))]},p(u),{minlength:be.minlength,maxlength:be.maxlength,tabindex:be.tabindex,disabled:p(m),readonly:be.readonly,autocomplete:be.autocomplete,style:p(U),"aria-label":be.ariaLabel,placeholder:be.placeholder,form:be.form,autofocus:be.autofocus,rows:be.rows,onCompositionstart:p(Te),onCompositionupdate:p(Ie),onCompositionend:p(ae),onInput:$e,onFocus:p(A),onBlur:p(D),onChange:Z,onKeydown:Ce}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),p(K)?(R(),G("span",{key:0,style:mt(x.value),class:j(p(g).e("count"))},je(p(ie))+" / "+je(be.maxlength),7)):_e("v-if",!0)],64))],16,["role"]))}});var $ke=Ge(Rke,[["__file","input.vue"]]);const hi=Vt($ke),Qp=4,MH={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"}},Nke=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),I$=Symbol("scrollbarContextKey"),Dke=Ye({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),Lke="Thumb",Ike=ue({__name:"thumb",props:Dke,setup(t){const e=t,n=ht(I$),r=Qe("scrollbar");n||Hi(Lke,"can not inject scrollbar context");const i=F(),o=F(),a=F({}),s=F(!1);let l=!1,u=!1,c=Tn?document.onselectstart:null;const d=M(()=>MH[e.vertical?"vertical":"horizontal"]),f=M(()=>Nke({size:e.size,move:e.move,bar:d.value})),h=M(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),m=C=>{var E;if(C.stopPropagation(),C.ctrlKey||[1,2].includes(C.button))return;(E=window.getSelection())==null||E.removeAllRanges(),y(C);const T=C.currentTarget;!T||(a.value[d.value.axis]=T[d.value.offset]-(C[d.value.client]-T.getBoundingClientRect()[d.value.direction]))},g=C=>{if(!o.value||!i.value||!n.wrapElement)return;const E=Math.abs(C.target.getBoundingClientRect()[d.value.direction]-C[d.value.client]),T=o.value[d.value.offset]/2,P=(E-T)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=P*n.wrapElement[d.value.scrollSize]/100},y=C=>{C.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",b),document.addEventListener("mouseup",w),c=document.onselectstart,document.onselectstart=()=>!1},b=C=>{if(!i.value||!o.value||l===!1)return;const E=a.value[d.value.axis];if(!E)return;const T=(i.value.getBoundingClientRect()[d.value.direction]-C[d.value.client])*-1,P=o.value[d.value.offset]-E,A=(T-P)*100*h.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=A*n.wrapElement[d.value.scrollSize]/100},w=()=>{l=!1,a.value[d.value.axis]=0,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",w),x(),u&&(s.value=!1)},O=()=>{u=!1,s.value=!!e.size},S=()=>{u=!0,s.value=l};pr(()=>{x(),document.removeEventListener("mouseup",w)});const x=()=>{document.onselectstart!==c&&(document.onselectstart=c)};return sr(er(n,"scrollbarElement"),"mousemove",O),sr(er(n,"scrollbarElement"),"mouseleave",S),(C,E)=>(R(),we(Qi,{name:p(r).b("fade"),persisted:""},{default:z(()=>[Ht(J("div",{ref_key:"instance",ref:i,class:j([p(r).e("bar"),p(r).is(p(d).key)]),onMousedown:g},[J("div",{ref_key:"thumb",ref:o,class:j(p(r).e("thumb")),style:mt(p(f)),onMousedown:m},null,38)],34),[[zn,C.always||s.value]])]),_:1},8,["name"]))}});var q5=Ge(Ike,[["__file","thumb.vue"]]);const Bke=Ye({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Fke=ue({__name:"bar",props:Bke,setup(t,{expose:e}){const n=t,r=ht(I$),i=F(0),o=F(0),a=F(""),s=F(""),l=F(1),u=F(1);return e({handleScroll:f=>{if(f){const h=f.offsetHeight-Qp,m=f.offsetWidth-Qp;o.value=f.scrollTop*100/h*l.value,i.value=f.scrollLeft*100/m*u.value}},update:()=>{const f=r==null?void 0:r.wrapElement;if(!f)return;const h=f.offsetHeight-Qp,m=f.offsetWidth-Qp,g=h**2/f.scrollHeight,y=m**2/f.scrollWidth,b=Math.max(g,n.minSize),w=Math.max(y,n.minSize);l.value=g/(h-g)/(b/(h-b)),u.value=y/(m-y)/(w/(m-w)),s.value=b+Qp(R(),G(ct,null,[B(q5,{move:i.value,ratio:u.value,size:a.value,always:f.always},null,8,["move","ratio","size","always"]),B(q5,{move:o.value,ratio:l.value,size:s.value,vertical:"",always:f.always},null,8,["move","ratio","size","always"])],64))}});var Vke=Ge(Fke,[["__file","bar.vue"]]);const jke=Ye({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:Oe([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,...wo(["ariaLabel","ariaOrientation"])}),zke={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(kt)},Qke="ElScrollbar",Hke=ue({name:Qke}),Wke=ue({...Hke,props:jke,emits:zke,setup(t,{expose:e,emit:n}){const r=t,i=Qe("scrollbar");let o,a,s=0,l=0;const u=F(),c=F(),d=F(),f=F(),h=M(()=>{const x={};return r.height&&(x.height=pi(r.height)),r.maxHeight&&(x.maxHeight=pi(r.maxHeight)),[r.wrapStyle,x]}),m=M(()=>[r.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!r.native}]),g=M(()=>[i.e("view"),r.viewClass]),y=()=>{var x;c.value&&((x=f.value)==null||x.handleScroll(c.value),s=c.value.scrollTop,l=c.value.scrollLeft,n("scroll",{scrollTop:c.value.scrollTop,scrollLeft:c.value.scrollLeft}))};function b(x,C){sn(x)?c.value.scrollTo(x):kt(x)&&kt(C)&&c.value.scrollTo(x,C)}const w=x=>{!kt(x)||(c.value.scrollTop=x)},O=x=>{!kt(x)||(c.value.scrollLeft=x)},S=()=>{var x;(x=f.value)==null||x.update()};return Ve(()=>r.noresize,x=>{x?(o==null||o(),a==null||a()):({stop:o}=Zr(d,S),a=sr("resize",S))},{immediate:!0}),Ve(()=>[r.maxHeight,r.height],()=>{r.native||Ot(()=>{var x;S(),c.value&&((x=f.value)==null||x.handleScroll(c.value))})}),_n(I$,Sn({scrollbarElement:u,wrapElement:c})),UM(()=>{c.value&&(c.value.scrollTop=s,c.value.scrollLeft=l)}),Bt(()=>{r.native||Ot(()=>{S()})}),Jc(()=>S()),e({wrapRef:c,update:S,scrollTo:b,setScrollTop:w,setScrollLeft:O,handleScroll:y}),(x,C)=>(R(),G("div",{ref_key:"scrollbarRef",ref:u,class:j(p(i).b())},[J("div",{ref_key:"wrapRef",ref:c,class:j(p(m)),style:mt(p(h)),tabindex:x.tabindex,onScroll:y},[(R(),we(un(x.tag),{id:x.id,ref_key:"resizeRef",ref:d,class:j(p(g)),style:mt(x.viewStyle),role:x.role,"aria-label":x.ariaLabel,"aria-orientation":x.ariaOrientation},{default:z(()=>[xe(x.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),x.native?_e("v-if",!0):(R(),we(Vke,{key:0,ref_key:"barRef",ref:f,always:x.always,"min-size":x.minSize},null,8,["always","min-size"]))],2))}});var Uke=Ge(Wke,[["__file","scrollbar.vue"]]);const mu=Vt(Uke),B$=Symbol("popper"),RH=Symbol("popperContent"),qke=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],$H=Ye({role:{type:String,values:qke,default:"tooltip"}}),Yke=ue({name:"ElPopper",inheritAttrs:!1}),Xke=ue({...Yke,props:$H,setup(t,{expose:e}){const n=t,r=F(),i=F(),o=F(),a=F(),s=M(()=>n.role),l={triggerRef:r,popperInstanceRef:i,contentRef:o,referenceRef:a,role:s};return e(l),_n(B$,l),(u,c)=>xe(u.$slots,"default")}});var Zke=Ge(Xke,[["__file","popper.vue"]]);const NH=Ye({arrowOffset:{type:Number,default:5}}),Gke=ue({name:"ElPopperArrow",inheritAttrs:!1}),Kke=ue({...Gke,props:NH,setup(t,{expose:e}){const n=t,r=Qe("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:a}=ht(RH,void 0);return Ve(()=>n.arrowOffset,s=>{i.value=s}),pr(()=>{o.value=void 0}),e({arrowRef:o}),(s,l)=>(R(),G("span",{ref_key:"arrowRef",ref:o,class:j(p(r).e("arrow")),style:mt(p(a)),"data-popper-arrow":""},null,6))}});var Jke=Ge(Kke,[["__file","arrow.vue"]]);const ePe="ElOnlyChild",DH=ue({name:ePe,setup(t,{slots:e,attrs:n}){var r;const i=ht(lH),o=ETe((r=i==null?void 0:i.setForwardRef)!=null?r:yr);return()=>{var a;const s=(a=e.default)==null?void 0:a.call(e,n);if(!s||s.length>1)return null;const l=LH(s);return l?Ht(Hc(l,n),[[o]]):null}}});function LH(t){if(!t)return null;const e=t;for(const n of e){if(sn(n))switch(n.type){case oa:continue;case Rm:case"svg":return Y5(n);case ct:return LH(n.children);default:return n}return Y5(n)}return null}function Y5(t){const e=Qe("only-child");return B("span",{class:e.e("content")},[t])}const IH=Ye({virtualRef:{type:Oe(Object)},virtualTriggering:Boolean,onMouseenter:{type:Oe(Function)},onMouseleave:{type:Oe(Function)},onClick:{type:Oe(Function)},onKeydown:{type:Oe(Function)},onFocus:{type:Oe(Function)},onBlur:{type:Oe(Function)},onContextmenu:{type:Oe(Function)},id:String,open:Boolean}),tPe=ue({name:"ElPopperTrigger",inheritAttrs:!1}),nPe=ue({...tPe,props:IH,setup(t,{expose:e}){const n=t,{role:r,triggerRef:i}=ht(B$,void 0);CTe(i);const o=M(()=>s.value?n.id:void 0),a=M(()=>{if(r&&r.value==="tooltip")return n.open&&n.id?n.id:void 0}),s=M(()=>{if(r&&r.value!=="tooltip")return r.value}),l=M(()=>s.value?`${n.open}`:void 0);let u;const c=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Bt(()=>{Ve(()=>n.virtualRef,d=>{d&&(i.value=Wa(d))},{immediate:!0}),Ve(i,(d,f)=>{u==null||u(),u=void 0,As(d)&&(c.forEach(h=>{var m;const g=n[h];g&&(d.addEventListener(h.slice(2).toLowerCase(),g),(m=f==null?void 0:f.removeEventListener)==null||m.call(f,h.slice(2).toLowerCase(),g))}),u=Ve([o,a,s,l],h=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,g)=>{Dr(h[g])?d.removeAttribute(m):d.setAttribute(m,h[g])})},{immediate:!0})),As(f)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(h=>f.removeAttribute(h))},{immediate:!0})}),pr(()=>{if(u==null||u(),u=void 0,i.value&&As(i.value)){const d=i.value;c.forEach(f=>{const h=n[f];h&&d.removeEventListener(f.slice(2).toLowerCase(),h)}),i.value=void 0}}),e({triggerRef:i}),(d,f)=>d.virtualTriggering?_e("v-if",!0):(R(),we(p(DH),gn({key:0},d.$attrs,{"aria-controls":p(o),"aria-describedby":p(a),"aria-expanded":p(l),"aria-haspopup":p(s)}),{default:z(()=>[xe(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var rPe=Ge(nPe,[["__file","trigger.vue"]]);const bT="focus-trap.focus-after-trapped",_T="focus-trap.focus-after-released",iPe="focus-trap.focusout-prevented",X5={cancelable:!0,bubbles:!1},oPe={cancelable:!0,bubbles:!1},Z5="focusAfterTrapped",G5="focusAfterReleased",F$=Symbol("elFocusTrap"),V$=F(),qx=F(0),j$=F(0);let iO=0;const BH=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0||r===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},K5=(t,e)=>{for(const n of t)if(!aPe(n,e))return n},aPe=(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},sPe=t=>{const e=BH(t),n=K5(e,t),r=K5(e.reverse(),t);return[n,r]},lPe=t=>t instanceof HTMLInputElement&&"select"in t,Cd=(t,e)=>{if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),j$.value=window.performance.now(),t!==n&&lPe(t)&&e&&t.select()}};function J5(t,e){const n=[...t],r=t.indexOf(e);return r!==-1&&n.splice(r,1),n}const uPe=()=>{let t=[];return{push:r=>{const i=t[0];i&&r!==i&&i.pause(),t=J5(t,r),t.unshift(r)},remove:r=>{var i,o;t=J5(t,r),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},cPe=(t,e=!1)=>{const n=document.activeElement;for(const r of t)if(Cd(r,e),document.activeElement!==n)return},e8=uPe(),dPe=()=>qx.value>j$.value,oO=()=>{V$.value="pointer",qx.value=window.performance.now()},t8=()=>{V$.value="keyboard",qx.value=window.performance.now()},fPe=()=>(Bt(()=>{iO===0&&(document.addEventListener("mousedown",oO),document.addEventListener("touchstart",oO),document.addEventListener("keydown",t8)),iO++}),pr(()=>{iO--,iO<=0&&(document.removeEventListener("mousedown",oO),document.removeEventListener("touchstart",oO),document.removeEventListener("keydown",t8))}),{focusReason:V$,lastUserFocusTimestamp:qx,lastAutomatedFocusTimestamp:j$}),aO=t=>new CustomEvent(iPe,{...oPe,detail:t}),hPe=ue({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Z5,G5,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=F();let r,i;const{focusReason:o}=fPe();_Te(m=>{t.trapped&&!a.paused&&e("release-requested",m)});const a={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},s=m=>{if(!t.loop&&!t.trapped||a.paused)return;const{key:g,altKey:y,ctrlKey:b,metaKey:w,currentTarget:O,shiftKey:S}=m,{loop:x}=t,C=g===St.tab&&!y&&!b&&!w,E=document.activeElement;if(C&&E){const T=O,[P,A]=sPe(T);if(P&&A){if(!S&&E===A){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||(m.preventDefault(),x&&Cd(P,!0))}else if(S&&[P,T].includes(E)){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||(m.preventDefault(),x&&Cd(A,!0))}}else if(E===T){const N=aO({focusReason:o.value});e("focusout-prevented",N),N.defaultPrevented||m.preventDefault()}}};_n(F$,{focusTrapRef:n,onKeydown:s}),Ve(()=>t.focusTrapEl,m=>{m&&(n.value=m)},{immediate:!0}),Ve([n],([m],[g])=>{m&&(m.addEventListener("keydown",s),m.addEventListener("focusin",c),m.addEventListener("focusout",d)),g&&(g.removeEventListener("keydown",s),g.removeEventListener("focusin",c),g.removeEventListener("focusout",d))});const l=m=>{e(Z5,m)},u=m=>e(G5,m),c=m=>{const g=p(n);if(!g)return;const y=m.target,b=m.relatedTarget,w=y&&g.contains(y);t.trapped||b&&g.contains(b)||(r=b),w&&e("focusin",m),!a.paused&&t.trapped&&(w?i=y:Cd(i,!0))},d=m=>{const g=p(n);if(!(a.paused||!g))if(t.trapped){const y=m.relatedTarget;!Dr(y)&&!g.contains(y)&&setTimeout(()=>{if(!a.paused&&t.trapped){const b=aO({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Cd(i,!0)}},0)}else{const y=m.target;y&&g.contains(y)||e("focusout",m)}};async function f(){await Ot();const m=p(n);if(m){e8.push(a);const g=m.contains(document.activeElement)?r:document.activeElement;if(r=g,!m.contains(g)){const b=new Event(bT,X5);m.addEventListener(bT,l),m.dispatchEvent(b),b.defaultPrevented||Ot(()=>{let w=t.focusStartEl;At(w)||(Cd(w),document.activeElement!==w&&(w="first")),w==="first"&&cPe(BH(m),!0),(document.activeElement===g||w==="container")&&Cd(m)})}}}function h(){const m=p(n);if(m){m.removeEventListener(bT,l);const g=new CustomEvent(_T,{...X5,detail:{focusReason:o.value}});m.addEventListener(_T,u),m.dispatchEvent(g),!g.defaultPrevented&&(o.value=="keyboard"||!dPe()||m.contains(document.activeElement))&&Cd(r!=null?r:document.body),m.removeEventListener(_T,u),e8.remove(a)}}return Bt(()=>{t.trapped&&f(),Ve(()=>t.trapped,m=>{m?f():h()})}),pr(()=>{t.trapped&&h(),n.value&&(n.value.removeEventListener("keydown",s),n.value.removeEventListener("focusin",c),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:s}}});function pPe(t,e,n,r,i,o){return xe(t.$slots,"default",{handleKeydown:t.onKeydown})}var Mb=Ge(hPe,[["render",pPe],["__file","focus-trap.vue"]]);const gPe=["fixed","absolute"],mPe=Ye({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:Oe(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:ud,default:"bottom"},popperOptions:{type:Oe(Object),default:()=>({})},strategy:{type:String,values:gPe,default:"absolute"}}),FH=Ye({...mPe,id:String,style:{type:Oe([String,Array,Object])},className:{type:Oe([String,Array,Object])},effect:{type:Oe(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:Oe([String,Array,Object])},popperStyle:{type:Oe([String,Array,Object])},referenceEl:{type:Oe(Object)},triggerTargetEl:{type:Oe(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...wo(["ariaLabel"])}),vPe={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},yPe=(t,e=[])=>{const{placement:n,strategy:r,popperOptions:i}=t,o={placement:n,strategy:r,...i,modifiers:[..._Pe(t),...e]};return OPe(o,i==null?void 0:i.modifiers),o},bPe=t=>{if(!!Tn)return Wa(t)};function _Pe(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:r}=t;return[{name:"offset",options:{offset:[0,e!=null?e:12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:r}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function OPe(t,e){e&&(t.modifiers=[...t.modifiers,...e!=null?e:[]])}const wPe=0,SPe=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:r,role:i}=ht(B$,void 0),o=F(),a=F(),s=M(()=>({name:"eventListeners",enabled:!!t.visible})),l=M(()=>{var b;const w=p(o),O=(b=p(a))!=null?b:wPe;return{name:"arrow",enabled:!Wc(w),options:{element:w,padding:O}}}),u=M(()=>({onFirstUpdate:()=>{m()},...yPe(t,[p(l),p(s)])})),c=M(()=>bPe(t.referenceEl)||p(r)),{attributes:d,state:f,styles:h,update:m,forceUpdate:g,instanceRef:y}=mTe(c,n,u);return Ve(y,b=>e.value=b),Bt(()=>{Ve(()=>{var b;return(b=p(c))==null?void 0:b.getBoundingClientRect()},()=>{m()})}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:y,state:f,styles:h,role:i,forceUpdate:g,update:m}},xPe=(t,{attributes:e,styles:n,role:r})=>{const{nextZIndex:i}=Qm(),o=Qe("popper"),a=M(()=>p(e).popper),s=F(kt(t.zIndex)?t.zIndex:i()),l=M(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),u=M(()=>[{zIndex:p(s)},p(n).popper,t.popperStyle||{}]),c=M(()=>r.value==="dialog"?"false":void 0),d=M(()=>p(n).arrow||{});return{ariaModal:c,arrowStyle:d,contentAttrs:a,contentClass:l,contentStyle:u,contentZIndex:s,updateZIndex:()=>{s.value=kt(t.zIndex)?t.zIndex:i()}}},CPe=(t,e)=>{const n=F(!1),r=F();return{focusStartRef:r,trapped:n,onFocusAfterReleased:u=>{var c;((c=u.detail)==null?void 0:c.focusReason)!=="pointer"&&(r.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:u=>{t.visible&&!n.value&&(u.target&&(r.value=u.target),n.value=!0)},onFocusoutPrevented:u=>{t.trapping||(u.detail.focusReason==="pointer"&&u.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},EPe=ue({name:"ElPopperContent"}),TPe=ue({...EPe,props:FH,emits:vPe,setup(t,{expose:e,emit:n}){const r=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:s,onFocusInTrap:l,onFocusoutPrevented:u,onReleaseRequested:c}=CPe(r,n),{attributes:d,arrowRef:f,contentRef:h,styles:m,instanceRef:g,role:y,update:b}=SPe(r),{ariaModal:w,arrowStyle:O,contentAttrs:S,contentClass:x,contentStyle:C,updateZIndex:E}=xPe(r,{styles:m,attributes:d,role:y}),T=ht(tc,void 0),P=F();_n(RH,{arrowStyle:O,arrowRef:f,arrowOffset:P}),T&&_n(tc,{...T,addInputId:yr,removeInputId:yr});let A;const D=($=!0)=>{b(),$&&E()},N=()=>{D(!1),r.visible&&r.focusOnShow?o.value=!0:r.visible===!1&&(o.value=!1)};return Bt(()=>{Ve(()=>r.triggerTargetEl,($,W)=>{A==null||A(),A=void 0;const L=p($||h.value),I=p(W||h.value);As(L)&&(A=Ve([y,()=>r.ariaLabel,w,()=>r.id],U=>{["role","aria-label","aria-modal","id"].forEach((Q,V)=>{Dr(U[V])?L.removeAttribute(Q):L.setAttribute(Q,U[V])})},{immediate:!0})),I!==L&&As(I)&&["role","aria-label","aria-modal","id"].forEach(U=>{I.removeAttribute(U)})},{immediate:!0}),Ve(()=>r.visible,N,{immediate:!0})}),pr(()=>{A==null||A(),A=void 0}),e({popperContentRef:h,popperInstanceRef:g,updatePopper:D,contentStyle:C}),($,W)=>(R(),G("div",gn({ref_key:"contentRef",ref:h},p(S),{style:p(C),class:p(x),tabindex:"-1",onMouseenter:L=>$.$emit("mouseenter",L),onMouseleave:L=>$.$emit("mouseleave",L)}),[B(p(Mb),{trapped:p(o),"trap-on-focus-in":!0,"focus-trap-el":p(h),"focus-start-el":p(i),onFocusAfterTrapped:p(s),onFocusAfterReleased:p(a),onFocusin:p(l),onFocusoutPrevented:p(u),onReleaseRequested:p(c)},{default:z(()=>[xe($.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var kPe=Ge(TPe,[["__file","content.vue"]]);const VH=Vt(Zke),Yx=Symbol("elTooltip"),io=Ye({...STe,...FH,appendTo:{type:Oe([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Oe(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...wo(["ariaLabel"])}),v0=Ye({...IH,disabled:Boolean,trigger:{type:Oe([String,Array]),default:"hover"},triggerKeys:{type:Oe(Array),default:()=>[St.enter,St.space]}}),{useModelToggleProps:PPe,useModelToggleEmits:APe,useModelToggle:MPe}=hEe("visible"),RPe=Ye({...$H,...PPe,...io,...v0,...NH,showArrow:{type:Boolean,default:!0}}),$Pe=[...APe,"before-show","before-hide","show","hide","open","close"],NPe=(t,e)=>ut(t)?t.includes(e):t===e,Hp=(t,e,n)=>r=>{NPe(p(t),e)&&n(r)},DPe=ue({name:"ElTooltipTrigger"}),LPe=ue({...DPe,props:v0,setup(t,{expose:e}){const n=t,r=Qe("tooltip"),{controlled:i,id:o,open:a,onOpen:s,onClose:l,onToggle:u}=ht(Yx,void 0),c=F(null),d=()=>{if(p(i)||n.disabled)return!0},f=er(n,"trigger"),h=fi(d,Hp(f,"hover",s)),m=fi(d,Hp(f,"hover",l)),g=fi(d,Hp(f,"click",S=>{S.button===0&&u(S)})),y=fi(d,Hp(f,"focus",s)),b=fi(d,Hp(f,"focus",l)),w=fi(d,Hp(f,"contextmenu",S=>{S.preventDefault(),u(S)})),O=fi(d,S=>{const{code:x}=S;n.triggerKeys.includes(x)&&(S.preventDefault(),u(S))});return e({triggerRef:c}),(S,x)=>(R(),we(p(rPe),{id:p(o),"virtual-ref":S.virtualRef,open:p(a),"virtual-triggering":S.virtualTriggering,class:j(p(r).e("trigger")),onBlur:p(b),onClick:p(g),onContextmenu:p(w),onFocus:p(y),onMouseenter:p(h),onMouseleave:p(m),onKeydown:p(O)},{default:z(()=>[xe(S.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var IPe=Ge(LPe,[["__file","trigger.vue"]]);const BPe=Ye({to:{type:Oe([String,Object]),required:!0},disabled:Boolean}),FPe=ue({__name:"teleport",props:BPe,setup(t){return(e,n)=>e.disabled?xe(e.$slots,"default",{key:0}):(R(),we(Dle,{key:1,to:e.to},[xe(e.$slots,"default")],8,["to"]))}});var VPe=Ge(FPe,[["__file","teleport.vue"]]);const Um=Vt(VPe),jPe=ue({name:"ElTooltipContent",inheritAttrs:!1}),zPe=ue({...jPe,props:io,setup(t,{expose:e}){const n=t,{selector:r}=sH(),i=Qe("tooltip"),o=F(null);let a;const{controlled:s,id:l,open:u,trigger:c,onClose:d,onOpen:f,onShow:h,onHide:m,onBeforeShow:g,onBeforeHide:y}=ht(Yx,void 0),b=M(()=>n.transition||`${i.namespace.value}-fade-in-linear`),w=M(()=>n.persistent);pr(()=>{a==null||a()});const O=M(()=>p(w)?!0:p(u)),S=M(()=>n.disabled?!1:p(u)),x=M(()=>n.appendTo||r.value),C=M(()=>{var I;return(I=n.style)!=null?I:{}}),E=F(!0),T=()=>{m(),E.value=!0},P=()=>{if(p(s))return!0},A=fi(P,()=>{n.enterable&&p(c)==="hover"&&f()}),D=fi(P,()=>{p(c)==="hover"&&d()}),N=()=>{var I,U;(U=(I=o.value)==null?void 0:I.updatePopper)==null||U.call(I),g==null||g()},$=()=>{y==null||y()},W=()=>{h(),a=tR(M(()=>{var I;return(I=o.value)==null?void 0:I.popperContentRef}),()=>{if(p(s))return;p(c)!=="hover"&&d()})},L=()=>{n.virtualTriggering||d()};return Ve(()=>p(u),I=>{I?E.value=!1:a==null||a()},{flush:"post"}),Ve(()=>n.content,()=>{var I,U;(U=(I=o.value)==null?void 0:I.updatePopper)==null||U.call(I)}),e({contentRef:o}),(I,U)=>(R(),we(p(Um),{disabled:!I.teleported,to:p(x)},{default:z(()=>[B(Qi,{name:p(b),onAfterLeave:T,onBeforeEnter:N,onAfterEnter:W,onBeforeLeave:$},{default:z(()=>[p(O)?Ht((R(),we(p(kPe),gn({key:0,id:p(l),ref_key:"contentRef",ref:o},I.$attrs,{"aria-label":I.ariaLabel,"aria-hidden":E.value,"boundaries-padding":I.boundariesPadding,"fallback-placements":I.fallbackPlacements,"gpu-acceleration":I.gpuAcceleration,offset:I.offset,placement:I.placement,"popper-options":I.popperOptions,strategy:I.strategy,effect:I.effect,enterable:I.enterable,pure:I.pure,"popper-class":I.popperClass,"popper-style":[I.popperStyle,p(C)],"reference-el":I.referenceEl,"trigger-target-el":I.triggerTargetEl,visible:p(S),"z-index":I.zIndex,onMouseenter:p(A),onMouseleave:p(D),onBlur:L,onClose:p(d)}),{default:z(()=>[xe(I.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[zn,p(S)]]):_e("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var QPe=Ge(zPe,[["__file","content.vue"]]);const HPe=ue({name:"ElTooltip"}),WPe=ue({...HPe,props:RPe,emits:$Pe,setup(t,{expose:e,emit:n}){const r=t;wTe();const i=bo(),o=F(),a=F(),s=()=>{var b;const w=p(o);w&&((b=w.popperInstanceRef)==null||b.update())},l=F(!1),u=F(),{show:c,hide:d,hasUpdateHandler:f}=MPe({indicator:l,toggleReason:u}),{onOpen:h,onClose:m}=xTe({showAfter:er(r,"showAfter"),hideAfter:er(r,"hideAfter"),autoClose:er(r,"autoClose"),open:c,close:d}),g=M(()=>si(r.visible)&&!f.value);_n(Yx,{controlled:g,id:i,open:Mm(l),trigger:er(r,"trigger"),onOpen:b=>{h(b)},onClose:b=>{m(b)},onToggle:b=>{p(l)?m(b):h(b)},onShow:()=>{n("show",u.value)},onHide:()=>{n("hide",u.value)},onBeforeShow:()=>{n("before-show",u.value)},onBeforeHide:()=>{n("before-hide",u.value)},updatePopper:s}),Ve(()=>r.disabled,b=>{b&&l.value&&(l.value=!1)});const y=b=>{var w,O;const S=(O=(w=a.value)==null?void 0:w.contentRef)==null?void 0:O.popperContentRef,x=(b==null?void 0:b.relatedTarget)||document.activeElement;return S&&S.contains(x)};return Ez(()=>l.value&&d()),e({popperRef:o,contentRef:a,isFocusInsideContent:y,updatePopper:s,onOpen:h,onClose:m,hide:d}),(b,w)=>(R(),we(p(VH),{ref_key:"popperRef",ref:o,role:b.role},{default:z(()=>[B(IPe,{disabled:b.disabled,trigger:b.trigger,"trigger-keys":b.triggerKeys,"virtual-ref":b.virtualRef,"virtual-triggering":b.virtualTriggering},{default:z(()=>[b.$slots.default?xe(b.$slots,"default",{key:0}):_e("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),B(QPe,{ref_key:"contentRef",ref:a,"aria-label":b.ariaLabel,"boundaries-padding":b.boundariesPadding,content:b.content,disabled:b.disabled,effect:b.effect,enterable:b.enterable,"fallback-placements":b.fallbackPlacements,"hide-after":b.hideAfter,"gpu-acceleration":b.gpuAcceleration,offset:b.offset,persistent:b.persistent,"popper-class":b.popperClass,"popper-style":b.popperStyle,placement:b.placement,"popper-options":b.popperOptions,pure:b.pure,"raw-content":b.rawContent,"reference-el":b.referenceEl,"trigger-target-el":b.triggerTargetEl,"show-after":b.showAfter,strategy:b.strategy,teleported:b.teleported,transition:b.transition,"virtual-triggering":b.virtualTriggering,"z-index":b.zIndex,"append-to":b.appendTo},{default:z(()=>[xe(b.$slots,"content",{},()=>[b.rawContent?(R(),G("span",{key:0,innerHTML:b.content},null,8,["innerHTML"])):(R(),G("span",{key:1},je(b.content),1))]),b.showArrow?(R(),we(p(Jke),{key:0,"arrow-offset":b.arrowOffset},null,8,["arrow-offset"])):_e("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","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var UPe=Ge(WPe,[["__file","tooltip.vue"]]);const Ui=Vt(UPe),qPe=Ye({valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:Oe(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:Oe([Function,Array]),default:yr},popperClass:{type:String,default:""},triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:{type:Boolean,default:!1},hideLoading:{type:Boolean,default:!1},teleported:io.teleported,highlightFirstItem:{type:Boolean,default:!1},fitInputWidth:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},name:String,...wo(["ariaLabel"])}),YPe={[Zt]:t=>At(t),[Oa]:t=>At(t),[Lr]:t=>At(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,select:t=>sn(t)},jH="ElAutocomplete",XPe=ue({name:jH,inheritAttrs:!1}),ZPe=ue({...XPe,props:qPe,emits:YPe,setup(t,{expose:e,emit:n}){const r=t,i=g$(),o=mp(),a=la(),s=Qe("autocomplete"),l=F(),u=F(),c=F(),d=F();let f=!1,h=!1;const m=F([]),g=F(-1),y=F(""),b=F(!1),w=F(!1),O=F(!1),S=bo(),x=M(()=>o.style),C=M(()=>(m.value.length>0||O.value)&&b.value),E=M(()=>!r.hideLoading&&O.value),T=M(()=>l.value?Array.from(l.value.$el.querySelectorAll("input")):[]),P=()=>{C.value&&(y.value=`${l.value.$el.offsetWidth}px`)},A=()=>{g.value=-1},D=async re=>{if(w.value)return;const te=ge=>{O.value=!1,!w.value&&(ut(ge)?(m.value=ge,g.value=r.highlightFirstItem?0:-1):Hi(jH,"autocomplete suggestions must be an array"))};if(O.value=!0,ut(r.fetchSuggestions))te(r.fetchSuggestions);else{const ge=await r.fetchSuggestions(re,te);ut(ge)&&te(ge)}},N=jo(D,r.debounce),$=re=>{const te=!!re;if(n(Oa,re),n(Zt,re),w.value=!1,b.value||(b.value=te),!r.triggerOnFocus&&!re){w.value=!0,m.value=[];return}N(re)},W=re=>{var te;a.value||(((te=re.target)==null?void 0:te.tagName)!=="INPUT"||T.value.includes(document.activeElement))&&(b.value=!0)},L=re=>{n(Lr,re)},I=re=>{h?h=!1:(b.value=!0,n("focus",re),r.triggerOnFocus&&!f&&N(String(r.modelValue)))},U=re=>{setTimeout(()=>{var te;if((te=c.value)!=null&&te.isFocusInsideContent()){h=!0;return}b.value&&K(),n("blur",re)})},Q=()=>{b.value=!1,n(Zt,""),n("clear")},V=async()=>{C.value&&g.value>=0&&g.value{C.value&&(re.preventDefault(),re.stopPropagation(),K())},K=()=>{b.value=!1},ie=()=>{var re;(re=l.value)==null||re.focus()},oe=()=>{var re;(re=l.value)==null||re.blur()},Se=async re=>{n(Oa,re[r.valueKey]),n(Zt,re[r.valueKey]),n("select",re),m.value=[],g.value=-1},ke=re=>{if(!C.value||O.value)return;if(re<0){g.value=-1;return}re>=m.value.length&&(re=m.value.length-1);const te=u.value.querySelector(`.${s.be("suggestion","wrap")}`),Re=te.querySelectorAll(`.${s.be("suggestion","list")} li`)[re],$e=te.scrollTop,{offsetTop:Z,scrollHeight:ce}=Re;Z+ce>$e+te.clientHeight&&(te.scrollTop+=ce),Z<$e&&(te.scrollTop-=ce),g.value=re,l.value.ref.setAttribute("aria-activedescendant",`${S.value}-item-${g.value}`)},Y=tR(d,()=>{C.value&&K()});return pr(()=>{Y==null||Y()}),Bt(()=>{l.value.ref.setAttribute("role","textbox"),l.value.ref.setAttribute("aria-autocomplete","list"),l.value.ref.setAttribute("aria-controls","id"),l.value.ref.setAttribute("aria-activedescendant",`${S.value}-item-${g.value}`),f=l.value.ref.hasAttribute("readonly")}),e({highlightedIndex:g,activated:b,loading:O,inputRef:l,popperRef:c,suggestions:m,handleSelect:Se,handleKeyEnter:V,focus:ie,blur:oe,close:K,highlight:ke,getData:D}),(re,te)=>(R(),we(p(Ui),{ref_key:"popperRef",ref:c,visible:p(C),placement:re.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[p(s).e("popper"),re.popperClass],teleported:re.teleported,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${p(s).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:P,onHide:A},{content:z(()=>[J("div",{ref_key:"regionRef",ref:u,class:j([p(s).b("suggestion"),p(s).is("loading",p(E))]),style:mt({[re.fitInputWidth?"width":"minWidth"]:y.value,outline:"none"}),role:"region"},[B(p(mu),{id:p(S),tag:"ul","wrap-class":p(s).be("suggestion","wrap"),"view-class":p(s).be("suggestion","list"),role:"listbox"},{default:z(()=>[p(E)?(R(),G("li",{key:0},[xe(re.$slots,"loading",{},()=>[B(p(gt),{class:j(p(s).is("loading"))},{default:z(()=>[B(p(Ku))]),_:1},8,["class"])])])):(R(!0),G(ct,{key:1},Wt(m.value,(ge,Re)=>(R(),G("li",{id:`${p(S)}-item-${Re}`,key:Re,class:j({highlighted:g.value===Re}),role:"option","aria-selected":g.value===Re,onClick:$e=>Se(ge)},[xe(re.$slots,"default",{item:ge},()=>[qe(je(ge[re.valueKey]),1)])],10,["id","aria-selected","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class"])],6)]),default:z(()=>[J("div",{ref_key:"listboxRef",ref:d,class:j([p(s).b(),re.$attrs.class]),style:mt(p(x)),role:"combobox","aria-haspopup":"listbox","aria-expanded":p(C),"aria-owns":p(S)},[B(p(hi),gn({ref_key:"inputRef",ref:l},p(i),{clearable:re.clearable,disabled:p(a),name:re.name,"model-value":re.modelValue,"aria-label":re.ariaLabel,onInput:$,onChange:L,onFocus:I,onBlur:U,onClear:Q,onKeydown:[br(Pt(ge=>ke(g.value-1),["prevent"]),["up"]),br(Pt(ge=>ke(g.value+1),["prevent"]),["down"]),br(V,["enter"]),br(K,["tab"]),br(q,["esc"])],onMousedown:W}),ts({_:2},[re.$slots.prepend?{name:"prepend",fn:z(()=>[xe(re.$slots,"prepend")])}:void 0,re.$slots.append?{name:"append",fn:z(()=>[xe(re.$slots,"append")])}:void 0,re.$slots.prefix?{name:"prefix",fn:z(()=>[xe(re.$slots,"prefix")])}:void 0,re.$slots.suffix?{name:"suffix",fn:z(()=>[xe(re.$slots,"suffix")])}:void 0]),1040,["clearable","disabled","name","model-value","aria-label","onKeydown"])],14,["aria-expanded","aria-owns"])]),_:3},8,["visible","placement","popper-class","teleported","transition"]))}});var GPe=Ge(ZPe,[["__file","autocomplete.vue"]]);const KPe=Vt(GPe),JPe=Ye({size:{type:[Number,String],values:cc,default:"",validator:t=>kt(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:fr},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Oe(String),default:"cover"}}),eAe={error:t=>t instanceof Event},tAe=ue({name:"ElAvatar"}),nAe=ue({...tAe,props:JPe,emits:eAe,setup(t,{emit:e}){const n=t,r=Qe("avatar"),i=F(!1),o=M(()=>{const{size:u,icon:c,shape:d}=n,f=[r.b()];return At(u)&&f.push(r.m(u)),c&&f.push(r.m("icon")),d&&f.push(r.m(d)),f}),a=M(()=>{const{size:u}=n;return kt(u)?r.cssVarBlock({size:pi(u)||""}):void 0}),s=M(()=>({objectFit:n.fit}));Ve(()=>n.src,()=>i.value=!1);function l(u){i.value=!0,e("error",u)}return(u,c)=>(R(),G("span",{class:j(p(o)),style:mt(p(a))},[(u.src||u.srcSet)&&!i.value?(R(),G("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:mt(p(s)),onError:l},null,44,["src","alt","srcset"])):u.icon?(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(u.icon)))]),_:1})):xe(u.$slots,"default",{key:2})],6))}});var rAe=Ge(nAe,[["__file","avatar.vue"]]);const iAe=Vt(rAe),oAe={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},aAe={click:t=>t instanceof MouseEvent},sAe=(t,e,n)=>{const r=Tr(),i=Tr(),o=F(!1),a=()=>{r.value&&(o.value=r.value.scrollTop>=t.visibilityHeight)},s=u=>{var c;(c=r.value)==null||c.scrollTo({top:0,behavior:"smooth"}),e("click",u)},l=a7(a,300,!0);return sr(i,"scroll",l),Bt(()=>{var u;i.value=document,r.value=document.documentElement,t.target&&(r.value=(u=document.querySelector(t.target))!=null?u:void 0,r.value||Hi(n,`target does not exist: ${t.target}`),i.value=r.value),a()}),{visible:o,handleClick:s}},zH="ElBacktop",lAe=ue({name:zH}),uAe=ue({...lAe,props:oAe,emits:aAe,setup(t,{emit:e}){const n=t,r=Qe("backtop"),{handleClick:i,visible:o}=sAe(n,e,zH),a=M(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(s,l)=>(R(),we(Qi,{name:`${p(r).namespace.value}-fade-in`},{default:z(()=>[p(o)?(R(),G("div",{key:0,style:mt(p(a)),class:j(p(r).b()),onClick:Pt(p(i),["stop"])},[xe(s.$slots,"default",{},()=>[B(p(gt),{class:j(p(r).e("icon"))},{default:z(()=>[B(p(qxe))]),_:1},8,["class"])])],14,["onClick"])):_e("v-if",!0)]),_:3},8,["name"]))}});var cAe=Ge(uAe,[["__file","backtop.vue"]]);const dAe=Vt(cAe),fAe=Ye({value:{type:[String,Number],default:""},max:{type:Number,default:99},isDot:Boolean,hidden:Boolean,type:{type:String,values:["primary","success","warning","info","danger"],default:"danger"},showZero:{type:Boolean,default:!0},color:String,badgeStyle:{type:Oe([String,Object,Array])},offset:{type:Oe(Array),default:[0,0]},badgeClass:{type:String}}),hAe=ue({name:"ElBadge"}),pAe=ue({...hAe,props:fAe,setup(t,{expose:e}){const n=t,r=Qe("badge"),i=M(()=>n.isDot?"":kt(n.value)&&kt(n.max)?n.max{var a,s,l,u,c;return[{backgroundColor:n.color,marginRight:pi(-((s=(a=n.offset)==null?void 0:a[0])!=null?s:0)),marginTop:pi((u=(l=n.offset)==null?void 0:l[1])!=null?u:0)},(c=n.badgeStyle)!=null?c:{}]});return e({content:i}),(a,s)=>(R(),G("div",{class:j(p(r).b())},[xe(a.$slots,"default"),B(Qi,{name:`${p(r).namespace.value}-zoom-in-center`,persisted:""},{default:z(()=>[Ht(J("sup",{class:j([p(r).e("content"),p(r).em("content",a.type),p(r).is("fixed",!!a.$slots.default),p(r).is("dot",a.isDot),p(r).is("hide-zero",!a.showZero&&n.value===0),a.badgeClass]),style:mt(p(o)),textContent:je(p(i))},null,14,["textContent"]),[[zn,!a.hidden&&(p(i)||a.isDot)]])]),_:1},8,["name"])],2))}});var gAe=Ge(pAe,[["__file","badge.vue"]]);const QH=Vt(gAe),HH=Symbol("breadcrumbKey"),mAe=Ye({separator:{type:String,default:"/"},separatorIcon:{type:fr}}),vAe=ue({name:"ElBreadcrumb"}),yAe=ue({...vAe,props:mAe,setup(t){const e=t,{t:n}=kn(),r=Qe("breadcrumb"),i=F();return _n(HH,e),Bt(()=>{const o=i.value.querySelectorAll(`.${r.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,a)=>(R(),G("div",{ref_key:"breadcrumb",ref:i,class:j(p(r).b()),"aria-label":p(n)("el.breadcrumb.label"),role:"navigation"},[xe(o.$slots,"default")],10,["aria-label"]))}});var bAe=Ge(yAe,[["__file","breadcrumb.vue"]]);const _Ae=Ye({to:{type:Oe([String,Object]),default:""},replace:Boolean}),OAe=ue({name:"ElBreadcrumbItem"}),wAe=ue({...OAe,props:_Ae,setup(t){const e=t,n=en(),r=ht(HH,void 0),i=Qe("breadcrumb"),o=n.appContext.config.globalProperties.$router,a=F(),s=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(l,u)=>{var c,d;return R(),G("span",{class:j(p(i).e("item"))},[J("span",{ref_key:"link",ref:a,class:j([p(i).e("inner"),p(i).is("link",!!l.to)]),role:"link",onClick:s},[xe(l.$slots,"default")],2),(c=p(r))!=null&&c.separatorIcon?(R(),we(p(gt),{key:0,class:j(p(i).e("separator"))},{default:z(()=>[(R(),we(un(p(r).separatorIcon)))]),_:1},8,["class"])):(R(),G("span",{key:1,class:j(p(i).e("separator")),role:"presentation"},je((d=p(r))==null?void 0:d.separator),3))],2)}}});var WH=Ge(wAe,[["__file","breadcrumb-item.vue"]]);const SAe=Vt(bAe,{BreadcrumbItem:WH}),xAe=ti(WH),UH=Symbol("buttonGroupContextKey"),CAe=(t,e)=>{Jd({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=ht(UH,void 0),r=Wx("button"),{form:i}=ua(),o=Ni(M(()=>n==null?void 0:n.size)),a=la(),s=F(),l=Ji(),u=M(()=>t.type||(n==null?void 0:n.type)||""),c=M(()=>{var m,g,y;return(y=(g=t.autoInsertSpace)!=null?g:(m=r.value)==null?void 0:m.autoInsertSpace)!=null?y:!1}),d=M(()=>t.tag==="button"?{ariaDisabled:a.value||t.loading,disabled:a.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),f=M(()=>{var m;const g=(m=l.default)==null?void 0:m.call(l);if(c.value&&(g==null?void 0:g.length)===1){const y=g[0];if((y==null?void 0:y.type)===Rm){const b=y.children;return/^\p{Unified_Ideograph}{2}$/u.test(b.trim())}}return!1});return{_disabled:a,_size:o,_type:u,_ref:s,_props:d,shouldAddSpace:f,handleClick:m=>{if(a.value||t.loading){m.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",m)}}},Mk=["default","primary","success","warning","info","danger","text",""],EAe=["button","submit","reset"],Rk=Ye({size:Wi,disabled:Boolean,type:{type:String,values:Mk,default:""},icon:{type:fr},nativeType:{type:String,values:EAe,default:"button"},loading:Boolean,loadingIcon:{type:fr,default:()=>Ku},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Oe([String,Object]),default:"button"}}),TAe={click:t=>t instanceof MouseEvent};function Fo(t,e){kAe(t)&&(t="100%");var n=PAe(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 sO(t){return Math.min(1,Math.max(0,t))}function kAe(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function PAe(t){return typeof t=="string"&&t.indexOf("%")!==-1}function qH(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function lO(t){return t<=1?"".concat(Number(t)*100,"%"):t}function Ah(t){return t.length===1?"0"+t:String(t)}function AAe(t,e,n){return{r:Fo(t,255)*255,g:Fo(e,255)*255,b:Fo(n,255)*255}}function n8(t,e,n){t=Fo(t,255),e=Fo(e,255),n=Fo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case t:o=(e-n)/l+(e1&&(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 MAe(t,e,n){var r,i,o;if(t=Fo(t,360),e=Fo(e,100),n=Fo(n,100),e===0)i=n,o=n,r=n;else{var a=n<.5?n*(1+e):n+e-n*e,s=2*n-a;r=OT(s,a,t+1/3),i=OT(s,a,t),o=OT(s,a,t-1/3)}return{r:r*255,g:i*255,b:o*255}}function r8(t,e,n){t=Fo(t,255),e=Fo(e,255),n=Fo(n,255);var r=Math.max(t,e,n),i=Math.min(t,e,n),o=0,a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:o=(e-n)/s+(e>16,g:(t&65280)>>8,b:t&255}}var $k={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 LAe(t){var e={r:0,g:0,b:0},n=1,r=null,i=null,o=null,a=!1,s=!1;return typeof t=="string"&&(t=FAe(t)),typeof t=="object"&&(kc(t.r)&&kc(t.g)&&kc(t.b)?(e=AAe(t.r,t.g,t.b),a=!0,s=String(t.r).substr(-1)==="%"?"prgb":"rgb"):kc(t.h)&&kc(t.s)&&kc(t.v)?(r=lO(t.s),i=lO(t.v),e=RAe(t.h,r,i),a=!0,s="hsv"):kc(t.h)&&kc(t.s)&&kc(t.l)&&(r=lO(t.s),o=lO(t.l),e=MAe(t.h,r,o),a=!0,s="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=qH(n),{ok:a,format:t.format||s,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 IAe="[-\\+]?\\d+%?",BAe="[-\\+]?\\d*\\.\\d+%?",Vd="(?:".concat(BAe,")|(?:").concat(IAe,")"),wT="[\\s|\\(]+(".concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")\\s*\\)?"),ST="[\\s|\\(]+(".concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")[,|\\s]+(").concat(Vd,")\\s*\\)?"),Vl={CSS_UNIT:new RegExp(Vd),rgb:new RegExp("rgb"+wT),rgba:new RegExp("rgba"+ST),hsl:new RegExp("hsl"+wT),hsla:new RegExp("hsla"+ST),hsv:new RegExp("hsv"+wT),hsva:new RegExp("hsva"+ST),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 FAe(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if($k[t])t=$k[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Vl.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Vl.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Vl.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Vl.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Vl.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Vl.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Vl.hex8.exec(t),n?{r:_s(n[1]),g:_s(n[2]),b:_s(n[3]),a:o8(n[4]),format:e?"name":"hex8"}:(n=Vl.hex6.exec(t),n?{r:_s(n[1]),g:_s(n[2]),b:_s(n[3]),format:e?"name":"hex"}:(n=Vl.hex4.exec(t),n?{r:_s(n[1]+n[1]),g:_s(n[2]+n[2]),b:_s(n[3]+n[3]),a:o8(n[4]+n[4]),format:e?"name":"hex8"}:(n=Vl.hex3.exec(t),n?{r:_s(n[1]+n[1]),g:_s(n[2]+n[2]),b:_s(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function kc(t){return Boolean(Vl.CSS_UNIT.exec(String(t)))}var YH=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var r;if(e instanceof t)return e;typeof e=="number"&&(e=DAe(e)),this.originalInput=e;var i=LAe(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:i.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=i.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,r,i,o=e.r/255,a=e.g/255,s=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),a<=.03928?r=a/12.92:r=Math.pow((a+.055)/1.055,2.4),s<=.03928?i=s/12.92:i=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=qH(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=r8(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=r8(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=n8(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=n8(this.r,this.g,this.b),n=Math.round(e.h*360),r=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),i8(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),$Ae(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),r=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(r,")"):"rgba(".concat(e,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Fo(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(Fo(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="#"+i8(this.r,this.g,this.b,!1),n=0,r=Object.entries($k);n=0,o=!n&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(r=this.toRgbString()),e==="prgb"&&(r=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(r=this.toHexString()),e==="hex3"&&(r=this.toHexString(!0)),e==="hex4"&&(r=this.toHex8String(!0)),e==="hex8"&&(r=this.toHex8String()),e==="name"&&(r=this.toName()),e==="hsl"&&(r=this.toHslString()),e==="hsv"&&(r=this.toHsvString()),r||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=sO(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=sO(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=sO(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=sO(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),r=(n.h+e)%360;return n.h=r<0?360+r:r,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var r=this.toRgb(),i=new t(e).toRgb(),o=n/100,a={r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a};return new t(a)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*e>>1)+720)%360;--e;)r.h=(r.h+i)%360,o.push(new t(r));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(),r=n.h,i=n.s,o=n.v,a=[],s=1/e;e--;)a.push(new t({h:r,s:i,v:o})),o=(o+s)%1;return a},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(),r=new t(e).toRgb(),i=n.a+r.a*(1-n.a);return new t({r:(n.r*n.a+r.r*r.a*(1-n.a))/i,g:(n.g*n.a+r.g*r.a*(1-n.a))/i,b:(n.b*n.a+r.b*r.a*(1-n.a))/i,a:i})},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(),r=n.h,i=[this],o=360/e,a=1;a{let r={},i=t.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const a=new YH(i),s=t.dark?a.tint(20).toString():Sd(a,20);if(t.plain)r=n.cssVarBlock({"bg-color":t.dark?Sd(a,90):a.tint(90).toString(),"text-color":i,"border-color":t.dark?Sd(a,50):a.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":s,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":s}),e.value&&(r[n.cssVarBlockName("disabled-bg-color")]=t.dark?Sd(a,90):a.tint(90).toString(),r[n.cssVarBlockName("disabled-text-color")]=t.dark?Sd(a,50):a.tint(50).toString(),r[n.cssVarBlockName("disabled-border-color")]=t.dark?Sd(a,80):a.tint(80).toString());else{const l=t.dark?Sd(a,30):a.tint(30).toString(),u=a.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(r=n.cssVarBlock({"bg-color":i,"text-color":u,"border-color":i,"hover-bg-color":l,"hover-text-color":u,"hover-border-color":l,"active-bg-color":s,"active-border-color":s}),e.value){const c=t.dark?Sd(a,50):a.tint(50).toString();r[n.cssVarBlockName("disabled-bg-color")]=c,r[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,r[n.cssVarBlockName("disabled-border-color")]=c}}}return r})}const jAe=ue({name:"ElButton"}),zAe=ue({...jAe,props:Rk,emits:TAe,setup(t,{expose:e,emit:n}){const r=t,i=VAe(r),o=Qe("button"),{_ref:a,_size:s,_type:l,_disabled:u,_props:c,shouldAddSpace:d,handleClick:f}=CAe(r,n),h=M(()=>[o.b(),o.m(l.value),o.m(s.value),o.is("disabled",u.value),o.is("loading",r.loading),o.is("plain",r.plain),o.is("round",r.round),o.is("circle",r.circle),o.is("text",r.text),o.is("link",r.link),o.is("has-bg",r.bg)]);return e({ref:a,size:s,type:l,disabled:u,shouldAddSpace:d}),(m,g)=>(R(),we(un(m.tag),gn({ref_key:"_ref",ref:a},p(c),{class:p(h),style:p(i),onClick:p(f)}),{default:z(()=>[m.loading?(R(),G(ct,{key:0},[m.$slots.loading?xe(m.$slots,"loading",{key:0}):(R(),we(p(gt),{key:1,class:j(p(o).is("loading"))},{default:z(()=>[(R(),we(un(m.loadingIcon)))]),_:1},8,["class"]))],64)):m.icon||m.$slots.icon?(R(),we(p(gt),{key:1},{default:z(()=>[m.icon?(R(),we(un(m.icon),{key:0})):xe(m.$slots,"icon",{key:1})]),_:3})):_e("v-if",!0),m.$slots.default?(R(),G("span",{key:2,class:j({[p(o).em("text","expand")]:p(d)})},[xe(m.$slots,"default")],2)):_e("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var QAe=Ge(zAe,[["__file","button.vue"]]);const HAe={size:Rk.size,type:Rk.type},WAe=ue({name:"ElButtonGroup"}),UAe=ue({...WAe,props:HAe,setup(t){const e=t;_n(UH,Sn({size:er(e,"size"),type:er(e,"type")}));const n=Qe("button");return(r,i)=>(R(),G("div",{class:j(p(n).b("group"))},[xe(r.$slots,"default")],2))}});var XH=Ge(UAe,[["__file","button-group.vue"]]);const lr=Vt(QAe,{ButtonGroup:XH}),ZH=ti(XH);var Mi=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},GH={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",u="day",c="week",d="month",f="quarter",h="year",m="date",g="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,w={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(W){var L=["th","st","nd","rd"],I=W%100;return"["+W+(L[(I-20)%10]||L[I]||L[0])+"]"}},O=function(W,L,I){var U=String(W);return!U||U.length>=L?W:""+Array(L+1-U.length).join(I)+W},S={s:O,z:function(W){var L=-W.utcOffset(),I=Math.abs(L),U=Math.floor(I/60),Q=I%60;return(L<=0?"+":"-")+O(U,2,"0")+":"+O(Q,2,"0")},m:function W(L,I){if(L.date()1)return W(q[0])}else{var K=L.name;C[K]=L,Q=K}return!U&&Q&&(x=Q),Q||!U&&x},A=function(W,L){if(T(W))return W.clone();var I=typeof L=="object"?L:{};return I.date=W,I.args=arguments,new N(I)},D=S;D.l=P,D.i=T,D.w=function(W,L){return A(W,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var N=function(){function W(I){this.$L=P(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[E]=!0}var L=W.prototype;return L.parse=function(I){this.$d=function(U){var Q=U.date,V=U.utc;if(Q===null)return new Date(NaN);if(D.u(Q))return new Date;if(Q instanceof Date)return new Date(Q);if(typeof Q=="string"&&!/Z$/i.test(Q)){var q=Q.match(y);if(q){var K=q[2]-1||0,ie=(q[7]||"0").substring(0,3);return V?new Date(Date.UTC(q[1],K,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ie)):new Date(q[1],K,q[3]||1,q[4]||0,q[5]||0,q[6]||0,ie)}}return new Date(Q)}(I),this.init()},L.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},L.$utils=function(){return D},L.isValid=function(){return this.$d.toString()!==g},L.isSame=function(I,U){var Q=A(I);return this.startOf(U)<=Q&&Q<=this.endOf(U)},L.isAfter=function(I,U){return A(I)68?1900:2e3)},c=function(y){return function(b){this[y]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),O=60*w[1]+(+w[2]||0);return O===0?0:w[0]==="+"?-O:O}(y)}],f=function(y){var b=l[y];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(y,b){var w,O=l.meridiem;if(O){for(var S=1;S<=24;S+=1)if(y.indexOf(O(S,0,b))>-1){w=S>12;break}}else w=y===(b?"pm":"PM");return w},m={A:[s,function(y){this.afternoon=h(y,!1)}],a:[s,function(y){this.afternoon=h(y,!0)}],Q:[i,function(y){this.month=3*(y-1)+1}],S:[i,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,c("seconds")],ss:[a,c("seconds")],m:[a,c("minutes")],mm:[a,c("minutes")],H:[a,c("hours")],h:[a,c("hours")],HH:[a,c("hours")],hh:[a,c("hours")],D:[a,c("day")],DD:[o,c("day")],Do:[s,function(y){var b=l.ordinal,w=y.match(/\d+/);if(this.day=w[0],b)for(var O=1;O<=31;O+=1)b(O).replace(/\[|\]/g,"")===y&&(this.day=O)}],w:[a,c("week")],ww:[o,c("week")],M:[a,c("month")],MM:[o,c("month")],MMM:[s,function(y){var b=f("months"),w=(f("monthsShort")||b.map(function(O){return O.slice(0,3)})).indexOf(y)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(y){var b=f("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,c("year")],YY:[o,function(y){this.year=u(y)}],YYYY:[/\d{4}/,c("year")],Z:d,ZZ:d};function g(y){var b,w;b=y,w=l&&l.formats;for(var O=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,D,N){var $=N&&N.toUpperCase();return D||w[N]||n[N]||w[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(W,L,I){return L||I.slice(1)})})).match(r),S=O.length,x=0;x-1)return new Date((Q==="X"?1e3:1)*U);var K=g(Q)(U),ie=K.year,oe=K.month,Se=K.day,ke=K.hours,Y=K.minutes,re=K.seconds,te=K.milliseconds,ge=K.zone,Re=K.week,$e=new Date,Z=Se||(ie||oe?1:$e.getDate()),ce=ie||$e.getFullYear(),Te=0;ie&&!oe||(Te=oe>0?oe-1:$e.getMonth());var Ie,ae=ke||0,me=Y||0,Ae=re||0,X=te||0;return ge?new Date(Date.UTC(ce,Te,Z,ae,me,Ae,X+60*ge.offset*1e3)):V?new Date(Date.UTC(ce,Te,Z,ae,me,Ae,X)):(Ie=new Date(ce,Te,Z,ae,me,Ae,X),Re&&(Ie=q(Ie).week(Re).toDate()),Ie)}catch{return new Date("")}}(C,P,E,w),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&C!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var W=P.length,L=1;L<=W;L+=1){T[1]=P[L-1];var I=w.apply(this,T);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}L===W&&(this.$d=new Date(""))}else S.call(this,x)}}})})(KH);var z$=KH.exports;const a8=["hours","minutes","seconds"],Nk="HH:mm:ss",ag="YYYY-MM-DD",qAe={date:ag,dates:ag,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${ag} ${Nk}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:ag,datetimerange:`${ag} ${Nk}`},xT=(t,e)=>[t>0?t-1:void 0,t,tArray.from(Array.from({length:t}).keys()),JH=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),eW=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),s8=function(t,e){const n=af(t),r=af(e);return n&&r?t.getTime()===e.getTime():!n&&!r?t===e:!1},l8=function(t,e){const n=ut(t),r=ut(e);return n&&r?t.length!==e.length?!1:t.every((i,o)=>s8(i,e[o])):!n&&!r?s8(t,e):!1},u8=function(t,e,n){const r=xs(e)||e==="x"?It(t).locale(n):It(t,e).locale(n);return r.isValid()?r:void 0},c8=function(t,e,n){return xs(e)?t:e==="x"?+t:It(t).locale(n).format(e)},CT=(t,e)=>{var n;const r=[],i=e==null?void 0:e();for(let o=0;o({})},modelValue:{type:Oe([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Oe([Date,Array])},defaultTime:{type:Oe([Date,Array])},isRange:Boolean,...tW,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:Oe([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:Oe(String),values:ud,default:"bottom"},fallbackPlacements:{type:Oe(Array),default:["bottom","top","right","left"]},...Wm,...wo(["ariaLabel"])}),YAe=ue({name:"Picker"}),XAe=ue({...YAe,props:Q$,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const r=t,i=mp(),{lang:o}=kn(),a=Qe("date"),s=Qe("input"),l=Qe("range"),{form:u,formItem:c}=ua(),d=ht("ElPopperOptions",{}),{valueOnClear:f}=Hx(r,null),h=F(),m=F(),g=F(!1),y=F(!1),b=F(null);let w=!1,O=!1;const S=M(()=>[a.b("editor"),a.bm("editor",r.type),s.e("wrapper"),a.is("disabled",oe.value),a.is("active",g.value),l.b("editor"),ee?l.bm("editor",ee.value):"",i.class]),x=M(()=>[s.e("icon"),l.e("close-icon"),Z.value?"":l.e("close-icon--hidden")]);Ve(g,De=>{De?Ot(()=>{De&&(b.value=r.modelValue)}):(Ee.value=null,Ot(()=>{C(r.modelValue)}))});const C=(De,xt)=>{(xt||!l8(De,b.value))&&(n("change",De),r.validateEvent&&(c==null||c.validate("change").catch(qt=>void 0)))},E=De=>{if(!l8(r.modelValue,De)){let xt;ut(De)?xt=De.map(qt=>c8(qt,r.valueFormat,o.value)):De&&(xt=c8(De,r.valueFormat,o.value)),n("update:modelValue",De&&xt,o.value)}},T=De=>{n("keydown",De)},P=M(()=>{if(m.value){const De=X.value?m.value:m.value.$el;return Array.from(De.querySelectorAll("input"))}return[]}),A=(De,xt,qt)=>{const ln=P.value;!ln.length||(!qt||qt==="min"?(ln[0].setSelectionRange(De,xt),ln[0].focus()):qt==="max"&&(ln[1].setSelectionRange(De,xt),ln[1].focus()))},D=()=>{V(!0,!0),Ot(()=>{O=!1})},N=(De="",xt=!1)=>{xt||(O=!0),g.value=xt;let qt;ut(De)?qt=De.map(ln=>ln.toDate()):qt=De&&De.toDate(),Ee.value=null,E(qt)},$=()=>{y.value=!0},W=()=>{n("visible-change",!0)},L=De=>{(De==null?void 0:De.key)===St.esc&&V(!0,!0)},I=()=>{y.value=!1,g.value=!1,O=!1,n("visible-change",!1)},U=()=>{g.value=!0},Q=()=>{g.value=!1},V=(De=!0,xt=!1)=>{O=xt;const[qt,ln]=p(P);let nn=qt;!De&&X.value&&(nn=ln),nn&&nn.focus()},q=De=>{r.readonly||oe.value||g.value||O||(g.value=!0,n("focus",De))};let K;const ie=De=>{const xt=async()=>{setTimeout(()=>{var qt;K===xt&&(!(((qt=h.value)==null?void 0:qt.isFocusInsideContent())&&!w)&&P.value.filter(ln=>ln.contains(document.activeElement)).length===0&&(be(),g.value=!1,n("blur",De),r.validateEvent&&(c==null||c.validate("blur").catch(ln=>void 0))),w=!1)},0)};K=xt,xt()},oe=M(()=>r.disabled||(u==null?void 0:u.disabled)),Se=M(()=>{let De;if(Te.value?Pe.value.getDefaultValue&&(De=Pe.value.getDefaultValue()):ut(r.modelValue)?De=r.modelValue.map(xt=>u8(xt,r.valueFormat,o.value)):De=u8(r.modelValue,r.valueFormat,o.value),Pe.value.getRangeAvailableTime){const xt=Pe.value.getRangeAvailableTime(De);so(xt,De)||(De=xt,Te.value||E(ut(De)?De.map(qt=>qt.toDate()):De.toDate()))}return ut(De)&&De.some(xt=>!xt)&&(De=[]),De}),ke=M(()=>{if(!Pe.value.panelReady)return"";const De=Xe(Se.value);return ut(Ee.value)?[Ee.value[0]||De&&De[0]||"",Ee.value[1]||De&&De[1]||""]:Ee.value!==null?Ee.value:!re.value&&Te.value||!g.value&&Te.value?"":De?te.value||ge.value||Re.value?De.join(", "):De:""}),Y=M(()=>r.type.includes("time")),re=M(()=>r.type.startsWith("time")),te=M(()=>r.type==="dates"),ge=M(()=>r.type==="months"),Re=M(()=>r.type==="years"),$e=M(()=>r.prefixIcon||(Y.value?FQ:Hxe)),Z=F(!1),ce=De=>{r.readonly||oe.value||(Z.value&&(De.stopPropagation(),D(),Pe.value.handleClear?Pe.value.handleClear():E(f.value),C(f.value,!0),Z.value=!1,I()),n("clear"))},Te=M(()=>{const{modelValue:De}=r;return!De||ut(De)&&!De.filter(Boolean).length}),Ie=async De=>{var xt;r.readonly||oe.value||(((xt=De.target)==null?void 0:xt.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},ae=()=>{r.readonly||oe.value||!Te.value&&r.clearable&&(Z.value=!0)},me=()=>{Z.value=!1},Ae=De=>{var xt;r.readonly||oe.value||(((xt=De.touches[0].target)==null?void 0:xt.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(g.value=!0)},X=M(()=>r.type.includes("range")),ee=Ni(),le=M(()=>{var De,xt;return(xt=(De=p(h))==null?void 0:De.popperRef)==null?void 0:xt.contentRef}),Ce=M(()=>{var De;return p(X)?p(m):(De=p(m))==null?void 0:De.$el}),fe=tR(Ce,De=>{const xt=p(le),qt=p(Ce);xt&&(De.target===xt||De.composedPath().includes(xt))||De.target===qt||De.composedPath().includes(qt)||(g.value=!1)});pr(()=>{fe==null||fe()});const Ee=F(null),be=()=>{if(Ee.value){const De=Be(ke.value);De&&Ke(De)&&(E(ut(De)?De.map(xt=>xt.toDate()):De.toDate()),Ee.value=null)}Ee.value===""&&(E(f.value),C(f.value),Ee.value=null)},Be=De=>De?Pe.value.parseUserInput(De):null,Xe=De=>De?Pe.value.formatToString(De):null,Ke=De=>Pe.value.isValidValue(De),tt=async De=>{if(r.readonly||oe.value)return;const{code:xt}=De;if(T(De),xt===St.esc){g.value===!0&&(g.value=!1,De.preventDefault(),De.stopPropagation());return}if(xt===St.down&&(Pe.value.handleFocusPicker&&(De.preventDefault(),De.stopPropagation()),g.value===!1&&(g.value=!0,await Ot()),Pe.value.handleFocusPicker)){Pe.value.handleFocusPicker();return}if(xt===St.tab){w=!0;return}if(xt===St.enter||xt===St.numpadEnter){(Ee.value===null||Ee.value===""||Ke(Be(ke.value)))&&(be(),g.value=!1),De.stopPropagation();return}if(Ee.value){De.stopPropagation();return}Pe.value.handleKeydownInput&&Pe.value.handleKeydownInput(De)},Dt=De=>{Ee.value=De,g.value||(g.value=!0)},jt=De=>{const xt=De.target;Ee.value?Ee.value=[xt.value,Ee.value[1]]:Ee.value=[xt.value,null]},Me=De=>{const xt=De.target;Ee.value?Ee.value=[Ee.value[0],xt.value]:Ee.value=[null,xt.value]},nt=()=>{var De;const xt=Ee.value,qt=Be(xt&&xt[0]),ln=p(Se);if(qt&&qt.isValid()){Ee.value=[Xe(qt),((De=ke.value)==null?void 0:De[1])||null];const nn=[qt,ln&&(ln[1]||null)];Ke(nn)&&(E(nn),Ee.value=null)}},de=()=>{var De;const xt=p(Ee),qt=Be(xt&&xt[1]),ln=p(Se);if(qt&&qt.isValid()){Ee.value=[((De=p(ke))==null?void 0:De[0])||null,Xe(qt)];const nn=[ln&&ln[0],qt];Ke(nn)&&(E(nn),Ee.value=null)}},Pe=F({}),Le=De=>{Pe.value[De[0]]=De[1],Pe.value.panelReady=!0},wt=De=>{n("calendar-change",De)},tn=(De,xt,qt)=>{n("panel-change",De,xt,qt)};return _n("EP_PICKER_BASE",{props:r}),e({focus:V,handleFocusInput:q,handleBlurInput:ie,handleOpen:U,handleClose:Q,onPick:N}),(De,xt)=>(R(),we(p(Ui),gn({ref_key:"refPopper",ref:h,visible:g.value,effect:"light",pure:"",trigger:"click"},De.$attrs,{role:"dialog",teleported:"",transition:`${p(a).namespace.value}-zoom-in-top`,"popper-class":[`${p(a).namespace.value}-picker__popper`,De.popperClass],"popper-options":p(d),"fallback-placements":De.fallbackPlacements,"gpu-acceleration":!1,placement:De.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:$,onShow:W,onHide:I}),{default:z(()=>[p(X)?(R(),G("div",{key:1,ref_key:"inputRef",ref:m,class:j(p(S)),style:mt(De.$attrs.style),onClick:q,onMouseenter:ae,onMouseleave:me,onTouchstartPassive:Ae,onKeydown:tt},[p($e)?(R(),we(p(gt),{key:0,class:j([p(s).e("icon"),p(l).e("icon")]),onMousedown:Pt(Ie,["prevent"]),onTouchstartPassive:Ae},{default:z(()=>[(R(),we(un(p($e))))]),_:1},8,["class","onMousedown"])):_e("v-if",!0),J("input",{id:De.id&&De.id[0],autocomplete:"off",name:De.name&&De.name[0],placeholder:De.startPlaceholder,value:p(ke)&&p(ke)[0],disabled:p(oe),readonly:!De.editable||De.readonly,class:j(p(l).b("input")),onMousedown:Ie,onInput:jt,onChange:nt,onFocus:q,onBlur:ie},null,42,["id","name","placeholder","value","disabled","readonly"]),xe(De.$slots,"range-separator",{},()=>[J("span",{class:j(p(l).b("separator"))},je(De.rangeSeparator),3)]),J("input",{id:De.id&&De.id[1],autocomplete:"off",name:De.name&&De.name[1],placeholder:De.endPlaceholder,value:p(ke)&&p(ke)[1],disabled:p(oe),readonly:!De.editable||De.readonly,class:j(p(l).b("input")),onMousedown:Ie,onFocus:q,onBlur:ie,onInput:Me,onChange:de},null,42,["id","name","placeholder","value","disabled","readonly"]),De.clearIcon?(R(),we(p(gt),{key:1,class:j(p(x)),onClick:ce},{default:z(()=>[(R(),we(un(De.clearIcon)))]),_:1},8,["class"])):_e("v-if",!0)],38)):(R(),we(p(hi),{key:0,id:De.id,ref_key:"inputRef",ref:m,"container-role":"combobox","model-value":p(ke),name:De.name,size:p(ee),disabled:p(oe),placeholder:De.placeholder,class:j([p(a).b("editor"),p(a).bm("editor",De.type),De.$attrs.class]),style:mt(De.$attrs.style),readonly:!De.editable||De.readonly||p(te)||p(ge)||p(Re)||De.type==="week","aria-label":De.ariaLabel,tabindex:De.tabindex,"validate-event":!1,onInput:Dt,onFocus:q,onBlur:ie,onKeydown:tt,onChange:be,onMousedown:Ie,onMouseenter:ae,onMouseleave:me,onTouchstartPassive:Ae,onClick:Pt(()=>{},["stop"])},{prefix:z(()=>[p($e)?(R(),we(p(gt),{key:0,class:j(p(s).e("icon")),onMousedown:Pt(Ie,["prevent"]),onTouchstartPassive:Ae},{default:z(()=>[(R(),we(un(p($e))))]),_:1},8,["class","onMousedown"])):_e("v-if",!0)]),suffix:z(()=>[Z.value&&De.clearIcon?(R(),we(p(gt),{key:0,class:j(`${p(s).e("icon")} clear-icon`),onClick:Pt(ce,["stop"])},{default:z(()=>[(R(),we(un(De.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onKeydown","onClick"]))]),content:z(()=>[xe(De.$slots,"default",{visible:g.value,actualVisible:y.value,parsedValue:p(Se),format:De.format,dateFormat:De.dateFormat,timeFormat:De.timeFormat,unlinkPanels:De.unlinkPanels,type:De.type,defaultValue:De.defaultValue,onPick:N,onSelectRange:A,onSetPickerOption:Le,onCalendarChange:wt,onPanelChange:tn,onKeydown:L,onMousedown:Pt(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options","fallback-placements","placement"]))}});var rW=Ge(XAe,[["__file","picker.vue"]]);const ZAe=Ye({...nW,datetimeRole:String,parsedValue:{type:Oe(Object)}}),iW=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const r=(a,s,l,u)=>{const c={hour:t,minute:e,second:n};let d=a;return["hour","minute","second"].forEach(f=>{if(c[f]){let h;const m=c[f];switch(f){case"minute":{h=m(d.hour(),s,u);break}case"second":{h=m(d.hour(),d.minute(),s,u);break}default:{h=m(s,u);break}}if((h==null?void 0:h.length)&&!h.includes(d[f]())){const g=l?0:h.length-1;d=d[f](h[g])}}}),d},i={};return{timePickerOptions:i,getAvailableTime:r,onSetOption:([a,s])=>{i[a]=s}}},ET=t=>{const e=(r,i)=>r||i,n=r=>r!==!0;return t.map(e).filter(n)},oW=(t,e,n)=>({getHoursList:(a,s)=>CT(24,t&&(()=>t==null?void 0:t(a,s))),getMinutesList:(a,s,l)=>CT(60,e&&(()=>e==null?void 0:e(a,s,l))),getSecondsList:(a,s,l,u)=>CT(60,n&&(()=>n==null?void 0:n(a,s,l,u)))}),aW=(t,e,n)=>{const{getHoursList:r,getMinutesList:i,getSecondsList:o}=oW(t,e,n);return{getAvailableHours:(u,c)=>ET(r(u,c)),getAvailableMinutes:(u,c,d)=>ET(i(u,c,d)),getAvailableSeconds:(u,c,d,f)=>ET(o(u,c,d,f))}},sW=t=>{const e=F(t.parsedValue);return Ve(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},Ed=new Map;if(Tn){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Ed.values())for(const{documentHandler:r}of n)r(e,t);t=void 0}})}function d8(t,e){let n=[];return Array.isArray(e.arg)?n=e.arg:As(e.arg)&&n.push(e.arg),function(r,i){const o=e.instance.popperRef,a=r.target,s=i==null?void 0:i.target,l=!e||!e.instance,u=!a||!s,c=t.contains(a)||t.contains(s),d=t===a,f=n.length&&n.some(m=>m==null?void 0:m.contains(a))||n.length&&n.includes(s),h=o&&(o.contains(a)||o.contains(s));l||u||c||d||f||h||e.value(r,i)}}const qc={beforeMount(t,e){Ed.has(t)||Ed.set(t,[]),Ed.get(t).push({documentHandler:d8(t,e),bindingFn:e.value})},updated(t,e){Ed.has(t)||Ed.set(t,[]);const n=Ed.get(t),r=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:d8(t,e),bindingFn:e.value};r>=0?n.splice(r,1,i):n.push(i)},unmounted(t){Ed.delete(t)}},GAe=100,KAe=600,_w={beforeMount(t,e){const n=e.value,{interval:r=GAe,delay:i=KAe}=$t(n)?{}:n;let o,a;const s=()=>$t(n)?n():n.handler(),l=()=>{a&&(clearTimeout(a),a=void 0),o&&(clearInterval(o),o=void 0)};t.addEventListener("mousedown",u=>{u.button===0&&(l(),s(),document.addEventListener("mouseup",()=>l(),{once:!0}),a=setTimeout(()=>{o=setInterval(()=>{s()},r)},i))})}},Dk="_trap-focus-children",Mh=[],f8=t=>{if(Mh.length===0)return;const e=Mh[Mh.length-1][Dk];if(e.length>0&&t.code===St.tab){if(e.length===1){t.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const n=t.shiftKey,r=t.target===e[0],i=t.target===e[e.length-1];r&&n&&(t.preventDefault(),e[e.length-1].focus()),i&&!n&&(t.preventDefault(),e[0].focus())}},JAe={beforeMount(t){t[Dk]=K3(t),Mh.push(t),Mh.length<=1&&document.addEventListener("keydown",f8)},updated(t){Ot(()=>{t[Dk]=K3(t)})},unmounted(){Mh.shift(),Mh.length===0&&document.removeEventListener("keydown",f8)}};var h8=!1,yh,Lk,Ik,w1,S1,lW,x1,Bk,Fk,Vk,uW,jk,zk,cW,dW;function Ba(){if(!h8){h8=!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(jk=/\b(iPhone|iP[ao]d)/.exec(t),zk=/\b(iP[ao]d)/.exec(t),Vk=/Android/i.exec(t),cW=/FBAN\/\w+;/i.exec(t),dW=/Mobile/i.exec(t),uW=!!/Win64/.exec(t),e){yh=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,yh&&document&&document.documentMode&&(yh=document.documentMode);var r=/(?:Trident\/(\d+.\d+))/.exec(t);lW=r?parseFloat(r[1])+4:yh,Lk=e[2]?parseFloat(e[2]):NaN,Ik=e[3]?parseFloat(e[3]):NaN,w1=e[4]?parseFloat(e[4]):NaN,w1?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),S1=e&&e[1]?parseFloat(e[1]):NaN):S1=NaN}else yh=Lk=Ik=S1=w1=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);x1=i?parseFloat(i[1].replace("_",".")):!0}else x1=!1;Bk=!!n[2],Fk=!!n[3]}else x1=Bk=Fk=!1}}var Qk={ie:function(){return Ba()||yh},ieCompatibilityMode:function(){return Ba()||lW>yh},ie64:function(){return Qk.ie()&&uW},firefox:function(){return Ba()||Lk},opera:function(){return Ba()||Ik},webkit:function(){return Ba()||w1},safari:function(){return Qk.webkit()},chrome:function(){return Ba()||S1},windows:function(){return Ba()||Bk},osx:function(){return Ba()||x1},linux:function(){return Ba()||Fk},iphone:function(){return Ba()||jk},mobile:function(){return Ba()||jk||zk||Vk||dW},nativeApp:function(){return Ba()||cW},android:function(){return Ba()||Vk},ipad:function(){return Ba()||zk}},eMe=Qk,uO=!!(typeof window<"u"&&window.document&&window.document.createElement),tMe={canUseDOM:uO,canUseWorkers:typeof Worker<"u",canUseEventListeners:uO&&!!(window.addEventListener||window.attachEvent),canUseViewport:uO&&!!window.screen,isInWorker:!uO},fW=tMe,hW;fW.canUseDOM&&(hW=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function nMe(t,e){if(!fW.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,r=n in document;if(!r){var i=document.createElement("div");i.setAttribute(n,"return;"),r=typeof i[n]=="function"}return!r&&hW&&t==="wheel"&&(r=document.implementation.hasFeature("Events.wheel","3.0")),r}var rMe=nMe,p8=10,g8=40,m8=800;function pW(t){var e=0,n=0,r=0,i=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),r=e*p8,i=n*p8,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(r=t.deltaX),(r||i)&&t.deltaMode&&(t.deltaMode==1?(r*=g8,i*=g8):(r*=m8,i*=m8)),r&&!e&&(e=r<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:r,pixelY:i}}pW.getEventType=function(){return eMe.firefox()?"DOMMouseScroll":rMe("wheel")?"wheel":"mousewheel"};var iMe=pW;/** * Checks if an event is supported in the current execution environment. * * NOTE: This will not work correctly for non-generic events such as `change`, * `reset`, `load`, `error`, and `select`. * * Borrows from Modernizr. * * @param {string} eventNameSuffix Event name, e.g. "click". * @param {?boolean} capture Check if the capture phase is supported. * @return {boolean} True if the event is supported. * @internal * @license Modernizr 3.0.0pre (Custom Build) | MIT */const oMe=function(t,e){if(t&&t.addEventListener){const n=function(r){const i=iMe(r);e&&Reflect.apply(e,this,[r,i])};t.addEventListener("wheel",n,{passive:!0})}},aMe={beforeMount(t,e){oMe(t,e.value)}},sMe=Ye({role:{type:String,required:!0},spinnerDate:{type:Oe(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Oe(String),default:""},...tW}),lMe=ue({__name:"basic-time-spinner",props:sMe,emits:["change","select-range","set-option"],setup(t,{emit:e}){const n=t,r=Qe("time"),{getHoursList:i,getMinutesList:o,getSecondsList:a}=oW(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let s=!1;const l=F(),u=F(),c=F(),d=F(),f={hours:u,minutes:c,seconds:d},h=M(()=>n.showSeconds?a8:a8.slice(0,2)),m=M(()=>{const{spinnerDate:V}=n,q=V.hour(),K=V.minute(),ie=V.second();return{hours:q,minutes:K,seconds:ie}}),g=M(()=>{const{hours:V,minutes:q}=p(m);return{hours:i(n.role),minutes:o(V,n.role),seconds:a(V,q,n.role)}}),y=M(()=>{const{hours:V,minutes:q,seconds:K}=p(m);return{hours:xT(V,23),minutes:xT(q,59),seconds:xT(K,59)}}),b=jo(V=>{s=!1,S(V)},200),w=V=>{if(!!!n.amPmMode)return"";const K=n.amPmMode==="A";let ie=V<12?" am":" pm";return K&&(ie=ie.toUpperCase()),ie},O=V=>{let q;switch(V){case"hours":q=[0,2];break;case"minutes":q=[3,5];break;case"seconds":q=[6,8];break}const[K,ie]=q;e("select-range",K,ie),l.value=V},S=V=>{E(V,p(m)[V])},x=()=>{S("hours"),S("minutes"),S("seconds")},C=V=>V.querySelector(`.${r.namespace.value}-scrollbar__wrap`),E=(V,q)=>{if(n.arrowControl)return;const K=p(f[V]);K&&K.$el&&(C(K.$el).scrollTop=Math.max(0,q*T(V)))},T=V=>{const q=p(f[V]),K=q==null?void 0:q.$el.querySelector("li");return K&&Number.parseFloat(Id(K,"height"))||0},P=()=>{D(1)},A=()=>{D(-1)},D=V=>{l.value||O("hours");const q=l.value,K=p(m)[q],ie=l.value==="hours"?24:60,oe=N(q,K,V,ie);$(q,oe),E(q,oe),Ot(()=>O(q))},N=(V,q,K,ie)=>{let oe=(q+K+ie)%ie;const Se=p(g)[V];for(;Se[oe]&&oe!==q;)oe=(oe+K+ie)%ie;return oe},$=(V,q)=>{if(p(g)[V][q])return;const{hours:oe,minutes:Se,seconds:ke}=p(m);let Y;switch(V){case"hours":Y=n.spinnerDate.hour(q).minute(Se).second(ke);break;case"minutes":Y=n.spinnerDate.hour(oe).minute(q).second(ke);break;case"seconds":Y=n.spinnerDate.hour(oe).minute(Se).second(q);break}e("change",Y)},W=(V,{value:q,disabled:K})=>{K||($(V,q),O(V),E(V,q))},L=V=>{s=!0,b(V);const q=Math.min(Math.round((C(p(f[V]).$el).scrollTop-(I(V)*.5-10)/T(V)+3)/T(V)),V==="hours"?23:59);$(V,q)},I=V=>p(f[V]).$el.offsetHeight,U=()=>{const V=q=>{const K=p(f[q]);K&&K.$el&&(C(K.$el).onscroll=()=>{L(q)})};V("hours"),V("minutes"),V("seconds")};Bt(()=>{Ot(()=>{!n.arrowControl&&U(),x(),n.role==="start"&&O("hours")})});const Q=(V,q)=>{f[q].value=V};return e("set-option",[`${n.role}_scrollDown`,D]),e("set-option",[`${n.role}_emitSelectRange`,O]),Ve(()=>n.spinnerDate,()=>{s||x()}),(V,q)=>(R(),G("div",{class:j([p(r).b("spinner"),{"has-seconds":V.showSeconds}])},[V.arrowControl?_e("v-if",!0):(R(!0),G(ct,{key:0},Wt(p(h),K=>(R(),we(p(mu),{key:K,ref_for:!0,ref:ie=>Q(ie,K),class:j(p(r).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":p(r).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ie=>O(K),onMousemove:ie=>S(K)},{default:z(()=>[(R(!0),G(ct,null,Wt(p(g)[K],(ie,oe)=>(R(),G("li",{key:oe,class:j([p(r).be("spinner","item"),p(r).is("active",oe===p(m)[K]),p(r).is("disabled",ie)]),onClick:Se=>W(K,{value:oe,disabled:ie})},[K==="hours"?(R(),G(ct,{key:0},[qe(je(("0"+(V.amPmMode?oe%12||12:oe)).slice(-2))+je(w(oe)),1)],64)):(R(),G(ct,{key:1},[qe(je(("0"+oe).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),V.arrowControl?(R(!0),G(ct,{key:1},Wt(p(h),K=>(R(),G("div",{key:K,class:j([p(r).be("spinner","wrapper"),p(r).is("arrow")]),onMouseenter:ie=>O(K)},[Ht((R(),we(p(gt),{class:j(["arrow-up",p(r).be("spinner","arrow")])},{default:z(()=>[B(p(o$))]),_:1},8,["class"])),[[p(_w),A]]),Ht((R(),we(p(gt),{class:j(["arrow-down",p(r).be("spinner","arrow")])},{default:z(()=>[B(p(ld))]),_:1},8,["class"])),[[p(_w),P]]),J("ul",{class:j(p(r).be("spinner","list"))},[(R(!0),G(ct,null,Wt(p(y)[K],(ie,oe)=>(R(),G("li",{key:oe,class:j([p(r).be("spinner","item"),p(r).is("active",ie===p(m)[K]),p(r).is("disabled",p(g)[K][ie])])},[typeof ie=="number"?(R(),G(ct,{key:0},[K==="hours"?(R(),G(ct,{key:0},[qe(je(("0"+(V.amPmMode?ie%12||12:ie)).slice(-2))+je(w(ie)),1)],64)):(R(),G(ct,{key:1},[qe(je(("0"+ie).slice(-2)),1)],64))],64)):_e("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):_e("v-if",!0)],2))}});var Hk=Ge(lMe,[["__file","basic-time-spinner.vue"]]);const uMe=ue({__name:"panel-time-pick",props:ZAe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{arrowControl:i,disabledHours:o,disabledMinutes:a,disabledSeconds:s,defaultValue:l}=r.props,{getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}=aW(o,a,s),f=Qe("time"),{t:h,lang:m}=kn(),g=F([0,2]),y=sW(n),b=M(()=>ai(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),w=M(()=>n.format.includes("ss")),O=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),S=Q=>{const V=It(Q).locale(m.value),q=W(V);return V.isSame(q)},x=()=>{e("pick",y.value,!1)},C=(Q=!1,V=!1)=>{V||e("pick",n.parsedValue,Q)},E=Q=>{if(!n.visible)return;const V=W(Q).millisecond(0);e("pick",V,!0)},T=(Q,V)=>{e("select-range",Q,V),g.value=[Q,V]},P=Q=>{const V=[0,3].concat(w.value?[6]:[]),q=["hours","minutes"].concat(w.value?["seconds"]:[]),ie=(V.indexOf(g.value[0])+Q+V.length)%V.length;D.start_emitSelectRange(q[ie])},A=Q=>{const V=Q.code,{left:q,right:K,up:ie,down:oe}=St;if([q,K].includes(V)){P(V===q?-1:1),Q.preventDefault();return}if([ie,oe].includes(V)){const Se=V===ie?-1:1;D.start_scrollDown(Se),Q.preventDefault();return}},{timePickerOptions:D,onSetOption:N,getAvailableTime:$}=iW({getAvailableHours:u,getAvailableMinutes:c,getAvailableSeconds:d}),W=Q=>$(Q,n.datetimeRole||"",!0),L=Q=>Q?It(Q,n.format).locale(m.value):null,I=Q=>Q?Q.format(n.format):null,U=()=>It(l).locale(m.value);return e("set-picker-option",["isValidValue",S]),e("set-picker-option",["formatToString",I]),e("set-picker-option",["parseUserInput",L]),e("set-picker-option",["handleKeydownInput",A]),e("set-picker-option",["getRangeAvailableTime",W]),e("set-picker-option",["getDefaultValue",U]),(Q,V)=>(R(),we(Qi,{name:p(b)},{default:z(()=>[Q.actualVisible||Q.visible?(R(),G("div",{key:0,class:j(p(f).b("panel"))},[J("div",{class:j([p(f).be("panel","content"),{"has-seconds":p(w)}])},[B(Hk,{ref:"spinner",role:Q.datetimeRole||"start","arrow-control":p(i),"show-seconds":p(w),"am-pm-mode":p(O),"spinner-date":Q.parsedValue,"disabled-hours":p(o),"disabled-minutes":p(a),"disabled-seconds":p(s),onChange:E,onSetOption:p(N),onSelectRange:T},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),J("div",{class:j(p(f).be("panel","footer"))},[J("button",{type:"button",class:j([p(f).be("panel","btn"),"cancel"]),onClick:x},je(p(h)("el.datepicker.cancel")),3),J("button",{type:"button",class:j([p(f).be("panel","btn"),"confirm"]),onClick:q=>C()},je(p(h)("el.datepicker.confirm")),11,["onClick"])],2)],2)):_e("v-if",!0)]),_:1},8,["name"]))}});var Ow=Ge(uMe,[["__file","panel-time-pick.vue"]]);const cMe=Ye({...nW,parsedValue:{type:Oe(Array)}}),dMe=ue({__name:"panel-time-range",props:cMe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,r=($e,Z)=>{const ce=[];for(let Te=$e;Te<=Z;Te++)ce.push(Te);return ce},{t:i,lang:o}=kn(),a=Qe("time"),s=Qe("picker"),l=ht("EP_PICKER_BASE"),{arrowControl:u,disabledHours:c,disabledMinutes:d,disabledSeconds:f,defaultValue:h}=l.props,m=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),g=M(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),S.value?"has-seconds":""]),y=M(()=>n.parsedValue[0]),b=M(()=>n.parsedValue[1]),w=sW(n),O=()=>{e("pick",w.value,!1)},S=M(()=>n.format.includes("ss")),x=M(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),C=($e=!1)=>{e("pick",[y.value,b.value],$e)},E=$e=>{A($e.millisecond(0),b.value)},T=$e=>{A(y.value,$e.millisecond(0))},P=$e=>{const Z=$e.map(Te=>It(Te).locale(o.value)),ce=K(Z);return Z[0].isSame(ce[0])&&Z[1].isSame(ce[1])},A=($e,Z)=>{e("pick",[$e,Z],!0)},D=M(()=>y.value>b.value),N=F([0,2]),$=($e,Z)=>{e("select-range",$e,Z,"min"),N.value=[$e,Z]},W=M(()=>S.value?11:8),L=($e,Z)=>{e("select-range",$e,Z,"max");const ce=p(W);N.value=[$e+ce,Z+ce]},I=$e=>{const Z=S.value?[0,3,6,11,14,17]:[0,3,8,11],ce=["hours","minutes"].concat(S.value?["seconds"]:[]),Ie=(Z.indexOf(N.value[0])+$e+Z.length)%Z.length,ae=Z.length/2;Ie{const Z=$e.code,{left:ce,right:Te,up:Ie,down:ae}=St;if([ce,Te].includes(Z)){I(Z===ce?-1:1),$e.preventDefault();return}if([Ie,ae].includes(Z)){const me=Z===Ie?-1:1,Ae=N.value[0]{const ce=c?c($e):[],Te=$e==="start",ae=(Z||(Te?b.value:y.value)).hour(),me=Te?r(ae+1,23):r(0,ae-1);return y1(ce,me)},V=($e,Z,ce)=>{const Te=d?d($e,Z):[],Ie=Z==="start",ae=ce||(Ie?b.value:y.value),me=ae.hour();if($e!==me)return Te;const Ae=ae.minute(),X=Ie?r(Ae+1,59):r(0,Ae-1);return y1(Te,X)},q=($e,Z,ce,Te)=>{const Ie=f?f($e,Z,ce):[],ae=ce==="start",me=Te||(ae?b.value:y.value),Ae=me.hour(),X=me.minute();if($e!==Ae||Z!==X)return Ie;const ee=me.second(),le=ae?r(ee+1,59):r(0,ee-1);return y1(Ie,le)},K=([$e,Z])=>[Y($e,"start",!0,Z),Y(Z,"end",!1,$e)],{getAvailableHours:ie,getAvailableMinutes:oe,getAvailableSeconds:Se}=aW(Q,V,q),{timePickerOptions:ke,getAvailableTime:Y,onSetOption:re}=iW({getAvailableHours:ie,getAvailableMinutes:oe,getAvailableSeconds:Se}),te=$e=>$e?ut($e)?$e.map(Z=>It(Z,n.format).locale(o.value)):It($e,n.format).locale(o.value):null,ge=$e=>$e?ut($e)?$e.map(Z=>Z.format(n.format)):$e.format(n.format):null,Re=()=>{if(ut(h))return h.map(Z=>It(Z).locale(o.value));const $e=It(h).locale(o.value);return[$e,$e.add(60,"m")]};return e("set-picker-option",["formatToString",ge]),e("set-picker-option",["parseUserInput",te]),e("set-picker-option",["isValidValue",P]),e("set-picker-option",["handleKeydownInput",U]),e("set-picker-option",["getDefaultValue",Re]),e("set-picker-option",["getRangeAvailableTime",K]),($e,Z)=>$e.actualVisible?(R(),G("div",{key:0,class:j([p(a).b("range-picker"),p(s).b("panel")])},[J("div",{class:j(p(a).be("range-picker","content"))},[J("div",{class:j(p(a).be("range-picker","cell"))},[J("div",{class:j(p(a).be("range-picker","header"))},je(p(i)("el.datepicker.startTime")),3),J("div",{class:j(p(m))},[B(Hk,{ref:"minSpinner",role:"start","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(y),"disabled-hours":Q,"disabled-minutes":V,"disabled-seconds":q,onChange:E,onSetOption:p(re),onSelectRange:$},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),J("div",{class:j(p(a).be("range-picker","cell"))},[J("div",{class:j(p(a).be("range-picker","header"))},je(p(i)("el.datepicker.endTime")),3),J("div",{class:j(p(g))},[B(Hk,{ref:"maxSpinner",role:"end","show-seconds":p(S),"am-pm-mode":p(x),"arrow-control":p(u),"spinner-date":p(b),"disabled-hours":Q,"disabled-minutes":V,"disabled-seconds":q,onChange:T,onSetOption:p(re),onSelectRange:L},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),J("div",{class:j(p(a).be("panel","footer"))},[J("button",{type:"button",class:j([p(a).be("panel","btn"),"cancel"]),onClick:ce=>O()},je(p(i)("el.datepicker.cancel")),11,["onClick"]),J("button",{type:"button",class:j([p(a).be("panel","btn"),"confirm"]),disabled:p(D),onClick:ce=>C()},je(p(i)("el.datepicker.confirm")),11,["disabled","onClick"])],2)],2)):_e("v-if",!0)}});var fMe=Ge(dMe,[["__file","panel-time-range.vue"]]);It.extend(z$);var hMe=ue({name:"ElTimePicker",install:null,props:{...Q$,isRange:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,e){const n=F(),[r,i]=t.isRange?["timerange",fMe]:["time",Ow],o=a=>e.emit("update:modelValue",a);return _n("ElPopperOptions",t.popperOptions),e.expose({focus:a=>{var s;(s=n.value)==null||s.handleFocusInput(a)},blur:a=>{var s;(s=n.value)==null||s.handleBlurInput(a)},handleOpen:()=>{var a;(a=n.value)==null||a.handleOpen()},handleClose:()=>{var a;(a=n.value)==null||a.handleClose()}}),()=>{var a;const s=(a=t.format)!=null?a:Nk;return B(rW,gn(t,{ref:n,type:r,format:s,"onUpdate:modelValue":o}),{default:l=>B(i,l,null)})}}});const pMe=Vt(hMe),gMe=(t,e)=>{const n=t.subtract(1,"month").endOf("month").date();return ef(e).map((r,i)=>n-(e-i-1))},mMe=t=>{const e=t.daysInMonth();return ef(e).map((n,r)=>r+1)},vMe=t=>ef(t.length/7).map(e=>{const n=e*7;return t.slice(n,n+7)}),yMe=Ye({selectedDay:{type:Oe(Object)},range:{type:Oe(Array)},date:{type:Oe(Object),required:!0},hideHeader:{type:Boolean}}),bMe={pick:t=>sn(t)};var gW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r,i){var o=r.prototype,a=function(d){return d&&(d.indexOf?d:d.s)},s=function(d,f,h,m,g){var y=d.name?d:d.$locale(),b=a(y[f]),w=a(y[h]),O=b||w.map(function(x){return x.slice(0,m)});if(!g)return O;var S=y.weekStart;return O.map(function(x,C){return O[(C+(S||0))%7]})},l=function(){return i.Ls[i.locale()]},u=function(d,f){return d.formats[f]||function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(m,g,y){return g||y.slice(1)})}(d.formats[f.toUpperCase()])},c=function(){var d=this;return{months:function(f){return f?f.format("MMMM"):s(d,"months")},monthsShort:function(f){return f?f.format("MMM"):s(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(f){return f?f.format("dddd"):s(d,"weekdays")},weekdaysMin:function(f){return f?f.format("dd"):s(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(f){return f?f.format("ddd"):s(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)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(f){return u(d,f)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return s(l(),"months")},i.monthsShort=function(){return s(l(),"monthsShort","months",3)},i.weekdays=function(d){return s(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return s(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return s(l(),"weekdaysMin","weekdays",2,d)}}})})(gW);var mW=gW.exports;const _Me=(t,e)=>{It.extend(mW);const n=It.localeData().firstDayOfWeek(),{t:r,lang:i}=kn(),o=It().locale(i.value),a=M(()=>!!t.range&&!!t.range.length),s=M(()=>{let f=[];if(a.value){const[h,m]=t.range,g=ef(m.date()-h.date()+1).map(w=>({text:h.date()+w,type:"current"}));let y=g.length%7;y=y===0?0:7-y;const b=ef(y).map((w,O)=>({text:O+1,type:"next"}));f=g.concat(b)}else{const h=t.date.startOf("month").day(),m=gMe(t.date,(h-n+7)%7).map(w=>({text:w,type:"prev"})),g=mMe(t.date).map(w=>({text:w,type:"current"}));f=[...m,...g];const y=7-(f.length%7||7),b=ef(y).map((w,O)=>({text:O+1,type:"next"}));f=f.concat(b)}return vMe(f)}),l=M(()=>{const f=n;return f===0?mT.map(h=>r(`el.datepicker.weeks.${h}`)):mT.slice(f).concat(mT.slice(0,f)).map(h=>r(`el.datepicker.weeks.${h}`))}),u=(f,h)=>{switch(h){case"prev":return t.date.startOf("month").subtract(1,"month").date(f);case"next":return t.date.startOf("month").add(1,"month").date(f);case"current":return t.date.date(f)}};return{now:o,isInRange:a,rows:s,weekDays:l,getFormattedDate:u,handlePickDay:({text:f,type:h})=>{const m=u(f,h);e("pick",m)},getSlotData:({text:f,type:h})=>{const m=u(f,h);return{isSelected:m.isSame(t.selectedDay),type:`${h}-month`,day:m.format("YYYY-MM-DD"),date:m.toDate()}}}},OMe=ue({name:"DateTable"}),wMe=ue({...OMe,props:yMe,emits:bMe,setup(t,{expose:e,emit:n}){const r=t,{isInRange:i,now:o,rows:a,weekDays:s,getFormattedDate:l,handlePickDay:u,getSlotData:c}=_Me(r,n),d=Qe("calendar-table"),f=Qe("calendar-day"),h=({text:m,type:g})=>{const y=[g];if(g==="current"){const b=l(m,g);b.isSame(r.selectedDay,"day")&&y.push(f.is("selected")),b.isSame(o,"day")&&y.push(f.is("today"))}return y};return e({getFormattedDate:l}),(m,g)=>(R(),G("table",{class:j([p(d).b(),p(d).is("range",p(i))]),cellspacing:"0",cellpadding:"0"},[m.hideHeader?_e("v-if",!0):(R(),G("thead",{key:0},[(R(!0),G(ct,null,Wt(p(s),y=>(R(),G("th",{key:y},je(y),1))),128))])),J("tbody",null,[(R(!0),G(ct,null,Wt(p(a),(y,b)=>(R(),G("tr",{key:b,class:j({[p(d).e("row")]:!0,[p(d).em("row","hide-border")]:b===0&&m.hideHeader})},[(R(!0),G(ct,null,Wt(y,(w,O)=>(R(),G("td",{key:O,class:j(h(w)),onClick:S=>p(u)(w)},[J("div",{class:j(p(f).b())},[xe(m.$slots,"date-cell",{data:p(c)(w)},()=>[J("span",null,je(w.text),1)])],2)],10,["onClick"]))),128))],2))),128))])],2))}});var v8=Ge(wMe,[["__file","date-table.vue"]]);const SMe=(t,e)=>{const n=t.endOf("month"),r=e.startOf("month"),o=n.isSame(r,"week")?r.add(1,"week"):r;return[[t,n],[o.startOf("week"),e]]},xMe=(t,e)=>{const n=t.endOf("month"),r=t.add(1,"month").startOf("month"),i=n.isSame(r,"week")?r.add(1,"week"):r,o=i.endOf("month"),a=e.startOf("month"),s=o.isSame(a,"week")?a.add(1,"week"):a;return[[t,n],[i.startOf("week"),o],[s.startOf("week"),e]]},CMe=(t,e,n)=>{const{lang:r}=kn(),i=F(),o=It().locale(r.value),a=M({get(){return t.modelValue?l.value:i.value},set(y){if(!y)return;i.value=y;const b=y.toDate();e(Oa,b),e(Zt,b)}}),s=M(()=>{if(!t.range||!ut(t.range)||t.range.length!==2||t.range.some(O=>!af(O)))return[];const y=t.range.map(O=>It(O).locale(r.value)),[b,w]=y;return b.isAfter(w)?[]:b.isSame(w,"month")?h(b,w):b.add(1,"month").month()!==w.month()?[]:h(b,w)}),l=M(()=>t.modelValue?It(t.modelValue).locale(r.value):a.value||(s.value.length?s.value[0][0]:o)),u=M(()=>l.value.subtract(1,"month").date(1)),c=M(()=>l.value.add(1,"month").date(1)),d=M(()=>l.value.subtract(1,"year").date(1)),f=M(()=>l.value.add(1,"year").date(1)),h=(y,b)=>{const w=y.startOf("week"),O=b.endOf("week"),S=w.get("month"),x=O.get("month");return S===x?[[w,O]]:(S+1)%12===x?SMe(w,O):S+2===x||(S+1)%11===x?xMe(w,O):[]},m=y=>{a.value=y};return{calculateValidatedDateRange:h,date:l,realSelectedDay:a,pickDay:m,selectDate:y=>{const w={"prev-month":u.value,"next-month":c.value,"prev-year":d.value,"next-year":f.value,today:o}[y];w.isSame(l.value,"day")||m(w)},validatedRange:s}},EMe=t=>ut(t)&&t.length===2&&t.every(e=>af(e)),TMe=Ye({modelValue:{type:Date},range:{type:Oe(Array),validator:EMe}}),kMe={[Zt]:t=>af(t),[Oa]:t=>af(t)},PMe="ElCalendar",AMe=ue({name:PMe}),MMe=ue({...AMe,props:TMe,emits:kMe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("calendar"),{calculateValidatedDateRange:o,date:a,pickDay:s,realSelectedDay:l,selectDate:u,validatedRange:c}=CMe(r,n),{t:d}=kn(),f=M(()=>{const h=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${d("el.datepicker.year")} ${d(h)}`});return e({selectedDay:l,pickDay:s,selectDate:u,calculateValidatedDateRange:o}),(h,m)=>(R(),G("div",{class:j(p(i).b())},[J("div",{class:j(p(i).e("header"))},[xe(h.$slots,"header",{date:p(f)},()=>[J("div",{class:j(p(i).e("title"))},je(p(f)),3),p(c).length===0?(R(),G("div",{key:0,class:j(p(i).e("button-group"))},[B(p(ZH),null,{default:z(()=>[B(p(lr),{size:"small",onClick:g=>p(u)("prev-month")},{default:z(()=>[qe(je(p(d)("el.datepicker.prevMonth")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:g=>p(u)("today")},{default:z(()=>[qe(je(p(d)("el.datepicker.today")),1)]),_:1},8,["onClick"]),B(p(lr),{size:"small",onClick:g=>p(u)("next-month")},{default:z(()=>[qe(je(p(d)("el.datepicker.nextMonth")),1)]),_:1},8,["onClick"])]),_:1})],2)):_e("v-if",!0)])],2),p(c).length===0?(R(),G("div",{key:0,class:j(p(i).e("body"))},[B(v8,{date:p(a),"selected-day":p(l),onPick:p(s)},ts({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:z(g=>[xe(h.$slots,"date-cell",Xl(lf(g)))])}:void 0]),1032,["date","selected-day","onPick"])],2)):(R(),G("div",{key:1,class:j(p(i).e("body"))},[(R(!0),G(ct,null,Wt(p(c),(g,y)=>(R(),we(v8,{key:y,date:g[0],"selected-day":p(l),range:g,"hide-header":y!==0,onPick:p(s)},ts({_:2},[h.$slots["date-cell"]?{name:"date-cell",fn:z(b=>[xe(h.$slots,"date-cell",Xl(lf(b)))])}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var RMe=Ge(MMe,[["__file","calendar.vue"]]);const $Me=Vt(RMe),NMe=Ye({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:Oe([String,Object,Array]),default:""},bodyClass:String,shadow:{type:String,values:["always","hover","never"],default:"always"}}),DMe=ue({name:"ElCard"}),LMe=ue({...DMe,props:NMe,setup(t){const e=Qe("card");return(n,r)=>(R(),G("div",{class:j([p(e).b(),p(e).is(`${n.shadow}-shadow`)])},[n.$slots.header||n.header?(R(),G("div",{key:0,class:j(p(e).e("header"))},[xe(n.$slots,"header",{},()=>[qe(je(n.header),1)])],2)):_e("v-if",!0),J("div",{class:j([p(e).e("body"),n.bodyClass]),style:mt(n.bodyStyle)},[xe(n.$slots,"default")],6),n.$slots.footer||n.footer?(R(),G("div",{key:1,class:j(p(e).e("footer"))},[xe(n.$slots,"footer",{},()=>[qe(je(n.footer),1)])],2)):_e("v-if",!0)],2))}});var IMe=Ge(LMe,[["__file","card.vue"]]);const BMe=Vt(IMe),FMe=Ye({initialIndex:{type:Number,default:0},height:{type:String,default:""},trigger:{type:String,values:["hover","click"],default:"hover"},autoplay:{type:Boolean,default:!0},interval:{type:Number,default:3e3},indicatorPosition:{type:String,values:["","none","outside"],default:""},arrow:{type:String,values:["always","hover","never"],default:"hover"},type:{type:String,values:["","card"],default:""},cardScale:{type:Number,default:.83},loop:{type:Boolean,default:!0},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},pauseOnHover:{type:Boolean,default:!0},motionBlur:Boolean}),VMe={change:(t,e)=>[t,e].every(kt)},vW=Symbol("carouselContextKey"),Wk="ElCarouselItem",y8=300,jMe=(t,e,n)=>{const{children:r,addChild:i,removeChild:o}=N$(en(),Wk),a=Ji(),s=F(-1),l=F(null),u=F(!1),c=F(),d=F(0),f=F(!0),h=F(!0),m=F(!1),g=M(()=>t.arrow!=="never"&&!p(w)),y=M(()=>r.value.some(Y=>Y.props.label.toString().length>0)),b=M(()=>t.type==="card"),w=M(()=>t.direction==="vertical"),O=M(()=>t.height!=="auto"?{height:t.height}:{height:`${d.value}px`,overflow:"hidden"}),S=Vc(Y=>{A(Y)},y8,{trailing:!0}),x=Vc(Y=>{V(Y)},y8),C=Y=>f.value?s.value<=1?Y<=1:Y>1:!0;function E(){l.value&&(clearInterval(l.value),l.value=null)}function T(){t.interval<=0||!t.autoplay||l.value||(l.value=setInterval(()=>P(),t.interval))}const P=()=>{h.value||(m.value=!0),h.value=!1,s.valueRe.props.name===Y);ge.length>0&&(Y=r.value.indexOf(ge[0]))}if(Y=Number(Y),Number.isNaN(Y)||Y!==Math.floor(Y))return;const re=r.value.length,te=s.value;Y<0?s.value=t.loop?re-1:0:Y>=re?s.value=t.loop?0:re-1:s.value=Y,te===s.value&&D(te),ie()}function D(Y){r.value.forEach((re,te)=>{re.translateItem(te,s.value,Y)})}function N(Y,re){var te,ge,Re,$e;const Z=p(r),ce=Z.length;if(ce===0||!Y.states.inStage)return!1;const Te=re+1,Ie=re-1,ae=ce-1,me=Z[ae].states.active,Ae=Z[0].states.active,X=(ge=(te=Z[Te])==null?void 0:te.states)==null?void 0:ge.active,ee=($e=(Re=Z[Ie])==null?void 0:Re.states)==null?void 0:$e.active;return re===ae&&Ae||X?"left":re===0&&me||ee?"right":!1}function $(){u.value=!0,t.pauseOnHover&&E()}function W(){u.value=!1,T()}function L(){m.value=!1}function I(Y){p(w)||r.value.forEach((re,te)=>{Y===N(re,te)&&(re.states.hover=!0)})}function U(){p(w)||r.value.forEach(Y=>{Y.states.hover=!1})}function Q(Y){Y!==s.value&&(h.value||(m.value=!0)),s.value=Y}function V(Y){t.trigger==="hover"&&Y!==s.value&&(s.value=Y,h.value||(m.value=!0))}function q(){A(s.value-1)}function K(){A(s.value+1)}function ie(){E(),t.pauseOnHover||T()}function oe(Y){t.height==="auto"&&(d.value=Y)}function Se(){var Y;const re=(Y=a.default)==null?void 0:Y.call(a);if(!re)return null;const ge=Kd(re).filter(Re=>Kr(Re)&&Re.type.name===Wk);return(ge==null?void 0:ge.length)===2&&t.loop&&!b.value?(f.value=!0,ge):(f.value=!1,null)}Ve(()=>s.value,(Y,re)=>{D(re),f.value&&(Y=Y%2,re=re%2),re>-1&&e("change",Y,re)}),Ve(()=>t.autoplay,Y=>{Y?T():E()}),Ve(()=>t.loop,()=>{A(s.value)}),Ve(()=>t.interval,()=>{ie()});const ke=Tr();return Bt(()=>{Ve(()=>r.value,()=>{r.value.length>0&&A(t.initialIndex)},{immediate:!0}),ke.value=Zr(c.value,()=>{D()}),T()}),pr(()=>{E(),c.value&&ke.value&&ke.value.stop()}),_n(vW,{root:c,isCardType:b,isVertical:w,items:r,loop:t.loop,cardScale:t.cardScale,addItem:i,removeItem:o,setActiveItem:A,setContainerHeight:oe}),{root:c,activeIndex:s,arrowDisplay:g,hasLabel:y,hover:u,isCardType:b,isTransitioning:m,items:r,isVertical:w,containerStyle:O,isItemsTwoLength:f,handleButtonEnter:I,handleTransitionEnd:L,handleButtonLeave:U,handleIndicatorClick:Q,handleMouseEnter:$,handleMouseLeave:W,setActiveItem:A,prev:q,next:K,PlaceholderItem:Se,isTwoLengthShow:C,throttledArrowClick:S,throttledIndicatorHover:x}},zMe="ElCarousel",QMe=ue({name:zMe}),HMe=ue({...QMe,props:FMe,emits:VMe,setup(t,{expose:e,emit:n}){const r=t,{root:i,activeIndex:o,arrowDisplay:a,hasLabel:s,hover:l,isCardType:u,items:c,isVertical:d,containerStyle:f,handleButtonEnter:h,handleButtonLeave:m,isTransitioning:g,handleIndicatorClick:y,handleMouseEnter:b,handleMouseLeave:w,handleTransitionEnd:O,setActiveItem:S,prev:x,next:C,PlaceholderItem:E,isTwoLengthShow:T,throttledArrowClick:P,throttledIndicatorHover:A}=jMe(r,n),D=Qe("carousel"),{t:N}=kn(),$=M(()=>{const I=[D.b(),D.m(r.direction)];return p(u)&&I.push(D.m("card")),I}),W=M(()=>{const I=[D.e("container")];return r.motionBlur&&p(g)&&c.value.length>1&&I.push(p(d)?`${D.namespace.value}-transitioning-vertical`:`${D.namespace.value}-transitioning`),I}),L=M(()=>{const I=[D.e("indicators"),D.em("indicators",r.direction)];return p(s)&&I.push(D.em("indicators","labels")),r.indicatorPosition==="outside"&&I.push(D.em("indicators","outside")),p(d)&&I.push(D.em("indicators","right")),I});return e({activeIndex:o,setActiveItem:S,prev:x,next:C}),(I,U)=>(R(),G("div",{ref_key:"root",ref:i,class:j(p($)),onMouseenter:Pt(p(b),["stop"]),onMouseleave:Pt(p(w),["stop"])},[p(a)?(R(),we(Qi,{key:0,name:"carousel-arrow-left",persisted:""},{default:z(()=>[Ht(J("button",{type:"button",class:j([p(D).e("arrow"),p(D).em("arrow","left")]),"aria-label":p(N)("el.carousel.leftArrow"),onMouseenter:Q=>p(h)("left"),onMouseleave:p(m),onClick:Pt(Q=>p(P)(p(o)-1),["stop"])},[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[zn,(I.arrow==="always"||p(l))&&(r.loop||p(o)>0)]])]),_:1})):_e("v-if",!0),p(a)?(R(),we(Qi,{key:1,name:"carousel-arrow-right",persisted:""},{default:z(()=>[Ht(J("button",{type:"button",class:j([p(D).e("arrow"),p(D).em("arrow","right")]),"aria-label":p(N)("el.carousel.rightArrow"),onMouseenter:Q=>p(h)("right"),onMouseleave:p(m),onClick:Pt(Q=>p(P)(p(o)+1),["stop"])},[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})],42,["aria-label","onMouseenter","onMouseleave","onClick"]),[[zn,(I.arrow==="always"||p(l))&&(r.loop||p(o)Ht((R(),G("li",{key:V,class:j([p(D).e("indicator"),p(D).em("indicator",I.direction),p(D).is("active",V===p(o))]),onMouseenter:q=>p(A)(V),onClick:Pt(q=>p(y)(V),["stop"])},[J("button",{class:j(p(D).e("button")),"aria-label":p(N)("el.carousel.indicator",{index:V+1})},[p(s)?(R(),G("span",{key:0},je(Q.props.label),1)):_e("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[zn,p(T)(V)]])),128))],2)):_e("v-if",!0),r.motionBlur?(R(),G("svg",{key:3,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[J("defs",null,[J("filter",{id:"elCarouselHorizontal"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),J("filter",{id:"elCarouselVertical"},[J("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):_e("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var WMe=Ge(HMe,[["__file","carousel.vue"]]);const UMe=Ye({name:{type:String,default:""},label:{type:[String,Number],default:""}}),qMe=t=>{const e=ht(vW),n=en(),r=F(),i=F(!1),o=F(0),a=F(1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),{isCardType:d,isVertical:f,cardScale:h}=e;function m(O,S,x){const C=x-1,E=S-1,T=S+1,P=x/2;return S===0&&O===C?-1:S===C&&O===0?x:O=P?x+1:O>T&&O-S>=P?-2:O}function g(O,S){var x,C;const E=p(f)?((x=e.root.value)==null?void 0:x.offsetHeight)||0:((C=e.root.value)==null?void 0:C.offsetWidth)||0;return u.value?E*((2-h)*(O-S)+1)/4:O{var C;const E=p(d),T=(C=e.items.value.length)!=null?C:Number.NaN,P=O===S;!E&&!ai(x)&&(c.value=P||O===x),!P&&T>2&&e.loop&&(O=m(O,S,T));const A=p(f);s.value=P,E?(u.value=Math.round(Math.abs(O-S))<=1,o.value=g(O,S),a.value=p(s)?1:h):o.value=y(O,S,A),l.value=!0,P&&r.value&&e.setContainerHeight(r.value.offsetHeight)};function w(){if(e&&p(d)){const O=e.items.value.findIndex(({uid:S})=>S===n.uid);e.setActiveItem(O)}}return Bt(()=>{e.addItem({props:t,states:Sn({hover:i,translate:o,scale:a,active:s,ready:l,inStage:u,animating:c}),uid:n.uid,translateItem:b})}),ed(()=>{e.removeItem(n.uid)}),{carouselItemRef:r,active:s,animating:c,hover:i,inStage:u,isVertical:f,translate:o,isCardType:d,scale:a,ready:l,handleItemClick:w}},YMe=ue({name:Wk}),XMe=ue({...YMe,props:UMe,setup(t){const e=t,n=Qe("carousel"),{carouselItemRef:r,active:i,animating:o,hover:a,inStage:s,isVertical:l,translate:u,isCardType:c,scale:d,ready:f,handleItemClick:h}=qMe(e),m=M(()=>[n.e("item"),n.is("active",i.value),n.is("in-stage",s.value),n.is("hover",a.value),n.is("animating",o.value),{[n.em("item","card")]:c.value,[n.em("item","card-vertical")]:c.value&&l.value}]),g=M(()=>{const b=`${`translate${p(l)?"Y":"X"}`}(${p(u)}px)`,w=`scale(${p(d)})`;return{transform:[b,w].join(" ")}});return(y,b)=>Ht((R(),G("div",{ref_key:"carouselItemRef",ref:r,class:j(p(m)),style:mt(p(g)),onClick:p(h)},[p(c)?Ht((R(),G("div",{key:0,class:j(p(n).e("mask"))},null,2)),[[zn,!p(i)]]):_e("v-if",!0),xe(y.$slots,"default")],14,["onClick"])),[[zn,p(f)]])}});var yW=Ge(XMe,[["__file","carousel-item.vue"]]);const ZMe=Vt(WMe,{CarouselItem:yW}),GMe=ti(yW),bW={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:Boolean,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:Wi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...wo(["ariaControls"])},_W={[Zt]:t=>At(t)||kt(t)||si(t),change:t=>At(t)||kt(t)||si(t)},qm=Symbol("checkboxGroupContextKey"),KMe=({model:t,isChecked:e})=>{const n=ht(qm,void 0),r=M(()=>{var o,a;const s=(o=n==null?void 0:n.max)==null?void 0:o.value,l=(a=n==null?void 0:n.min)==null?void 0:a.value;return!ai(s)&&t.value.length>=s&&!e.value||!ai(l)&&t.value.length<=l&&e.value});return{isDisabled:la(M(()=>(n==null?void 0:n.disabled.value)||r.value)),isLimitDisabled:r}},JMe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:r,isDisabled:i,isLabeledByFormItem:o})=>{const a=ht(qm,void 0),{formItem:s}=ua(),{emit:l}=en();function u(m){var g,y,b,w;return[!0,t.trueValue,t.trueLabel].includes(m)?(y=(g=t.trueValue)!=null?g:t.trueLabel)!=null?y:!0:(w=(b=t.falseValue)!=null?b:t.falseLabel)!=null?w:!1}function c(m,g){l("change",u(m),g)}function d(m){if(n.value)return;const g=m.target;l("change",u(g.checked),m)}async function f(m){n.value||!r.value&&!i.value&&o.value&&(m.composedPath().some(b=>b.tagName==="LABEL")||(e.value=u([!1,t.falseValue,t.falseLabel].includes(e.value)),await Ot(),c(e.value,m)))}const h=M(()=>(a==null?void 0:a.validateEvent)||t.validateEvent);return Ve(()=>t.modelValue,()=>{h.value&&(s==null||s.validate("change").catch(m=>void 0))}),{handleChange:d,onClickRoot:f}},eRe=t=>{const e=F(!1),{emit:n}=en(),r=ht(qm,void 0),i=M(()=>ai(r)===!1),o=F(!1),a=M({get(){var s,l;return i.value?(s=r==null?void 0:r.modelValue)==null?void 0:s.value:(l=t.modelValue)!=null?l:e.value},set(s){var l,u;i.value&&ut(s)?(o.value=((l=r==null?void 0:r.max)==null?void 0:l.value)!==void 0&&s.length>(r==null?void 0:r.max.value)&&s.length>a.value.length,o.value===!1&&((u=r==null?void 0:r.changeEvent)==null||u.call(r,s))):(n(Zt,s),e.value=s)}});return{model:a,isGroup:i,isLimitExceeded:o}},tRe=(t,e,{model:n})=>{const r=ht(qm,void 0),i=F(!1),o=M(()=>ep(t.value)?t.label:t.value),a=M(()=>{const c=n.value;return si(c)?c:ut(c)?sn(o.value)?c.map(Bn).some(d=>so(d,o.value)):c.map(Bn).includes(o.value):c!=null?c===t.trueValue||c===t.trueLabel:!!c}),s=Ni(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value}),{prop:!0}),l=Ni(M(()=>{var c;return(c=r==null?void 0:r.size)==null?void 0:c.value})),u=M(()=>!!e.default||!ep(o.value));return{checkboxButtonSize:s,isChecked:a,isFocused:i,checkboxSize:l,hasOwnLabel:u,actualValue:o}},OW=(t,e)=>{const{formItem:n}=ua(),{model:r,isGroup:i,isLimitExceeded:o}=eRe(t),{isFocused:a,isChecked:s,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,actualValue:d}=tRe(t,e,{model:r}),{isDisabled:f}=KMe({model:r,isChecked:s}),{inputId:h,isLabeledByFormItem:m}=gu(t,{formItemContext:n,disableIdGeneration:c,disableIdManagement:i}),{handleChange:g,onClickRoot:y}=JMe(t,{model:r,isLimitExceeded:o,hasOwnLabel:c,isDisabled:f,isLabeledByFormItem:m});return(()=>{function w(){var O,S;ut(r.value)&&!r.value.includes(d.value)?r.value.push(d.value):r.value=(S=(O=t.trueValue)!=null?O:t.trueLabel)!=null?S:!0}t.checked&&w()})(),Jd({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(()=>i.value&&ep(t.value))),Jd({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)),Jd({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:s,isDisabled:f,isFocused:a,checkboxButtonSize:l,checkboxSize:u,hasOwnLabel:c,model:r,actualValue:d,handleChange:g,onClickRoot:y}},nRe=ue({name:"ElCheckbox"}),rRe=ue({...nRe,props:bW,emits:_W,setup(t){const e=t,n=Ji(),{inputId:r,isLabeledByFormItem:i,isChecked:o,isDisabled:a,isFocused:s,checkboxSize:l,hasOwnLabel:u,model:c,actualValue:d,handleChange:f,onClickRoot:h}=OW(e,n),m=Qe("checkbox"),g=M(()=>[m.b(),m.m(l.value),m.is("disabled",a.value),m.is("bordered",e.border),m.is("checked",o.value)]),y=M(()=>[m.e("input"),m.is("disabled",a.value),m.is("checked",o.value),m.is("indeterminate",e.indeterminate),m.is("focus",s.value)]);return(b,w)=>(R(),we(un(!p(u)&&p(i)?"span":"label"),{class:j(p(g)),"aria-controls":b.indeterminate?b.ariaControls:null,onClick:p(h)},{default:z(()=>{var O,S,x,C;return[J("span",{class:j(p(y))},[b.trueValue||b.falseValue||b.trueLabel||b.falseLabel?Ht((R(),G("input",{key:0,id:p(r),"onUpdate:modelValue":E=>kr(c)?c.value=E:null,class:j(p(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,name:b.name,tabindex:b.tabindex,disabled:p(a),"true-value":(S=(O=b.trueValue)!=null?O:b.trueLabel)!=null?S:!0,"false-value":(C=(x=b.falseValue)!=null?x:b.falseLabel)!=null?C:!1,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[sw,p(c)]]):Ht((R(),G("input",{key:1,id:p(r),"onUpdate:modelValue":E=>kr(c)?c.value=E:null,class:j(p(m).e("original")),type:"checkbox",indeterminate:b.indeterminate,disabled:p(a),value:p(d),name:b.name,tabindex:b.tabindex,onChange:p(f),onFocus:E=>s.value=!0,onBlur:E=>s.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[sw,p(c)]]),J("span",{class:j(p(m).e("inner"))},null,2)],2),p(u)?(R(),G("span",{key:0,class:j(p(m).e("label"))},[xe(b.$slots,"default"),b.$slots.default?_e("v-if",!0):(R(),G(ct,{key:0},[qe(je(b.label),1)],64))],2)):_e("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var iRe=Ge(rRe,[["__file","checkbox.vue"]]);const oRe=ue({name:"ElCheckboxButton"}),aRe=ue({...oRe,props:bW,emits:_W,setup(t){const e=t,n=Ji(),{isFocused:r,isChecked:i,isDisabled:o,checkboxButtonSize:a,model:s,actualValue:l,handleChange:u}=OW(e,n),c=ht(qm,void 0),d=Qe("checkbox"),f=M(()=>{var m,g,y,b;const w=(g=(m=c==null?void 0:c.fill)==null?void 0:m.value)!=null?g:"";return{backgroundColor:w,borderColor:w,color:(b=(y=c==null?void 0:c.textColor)==null?void 0:y.value)!=null?b:"",boxShadow:w?`-1px 0 0 0 ${w}`:void 0}}),h=M(()=>[d.b("button"),d.bm("button",a.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",r.value)]);return(m,g)=>{var y,b,w,O;return R(),G("label",{class:j(p(h))},[m.trueValue||m.falseValue||m.trueLabel||m.falseLabel?Ht((R(),G("input",{key:0,"onUpdate:modelValue":S=>kr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:p(o),"true-value":(b=(y=m.trueValue)!=null?y:m.trueLabel)!=null?b:!0,"false-value":(O=(w=m.falseValue)!=null?w:m.falseLabel)!=null?O:!1,onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[sw,p(s)]]):Ht((R(),G("input",{key:1,"onUpdate:modelValue":S=>kr(s)?s.value=S:null,class:j(p(d).be("button","original")),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:p(o),value:p(l),onChange:p(u),onFocus:S=>r.value=!0,onBlur:S=>r.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[sw,p(s)]]),m.$slots.default||m.label?(R(),G("span",{key:2,class:j(p(d).be("button","inner")),style:mt(p(i)?p(f):void 0)},[xe(m.$slots,"default",{},()=>[qe(je(m.label),1)])],6)):_e("v-if",!0)],2)}}});var wW=Ge(aRe,[["__file","checkbox-button.vue"]]);const sRe=Ye({modelValue:{type:Oe(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Wi,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),lRe={[Zt]:t=>ut(t),change:t=>ut(t)},uRe=ue({name:"ElCheckboxGroup"}),cRe=ue({...uRe,props:sRe,emits:lRe,setup(t,{emit:e}){const n=t,r=Qe("checkbox"),{formItem:i}=ua(),{inputId:o,isLabeledByFormItem:a}=gu(n,{formItemContext:i}),s=async u=>{e(Zt,u),await Ot(),e("change",u)},l=M({get(){return n.modelValue},set(u){s(u)}});return _n(qm,{...vo(Ri(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:s}),Ve(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(u=>void 0))}),(u,c)=>{var d;return R(),we(un(u.tag),{id:p(o),class:j(p(r).b("group")),role:"group","aria-label":p(a)?void 0:u.ariaLabel||"checkbox-group","aria-labelledby":p(a)?(d=p(i))==null?void 0:d.labelId:void 0},{default:z(()=>[xe(u.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var SW=Ge(cRe,[["__file","checkbox-group.vue"]]);const Is=Vt(iRe,{CheckboxButton:wW,CheckboxGroup:SW}),dRe=ti(wW),xW=ti(SW),CW=Ye({modelValue:{type:[String,Number,Boolean],default:void 0},size:Wi,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),fRe=Ye({...CW,border:Boolean}),EW={[Zt]:t=>At(t)||kt(t)||si(t),[Lr]:t=>At(t)||kt(t)||si(t)},TW=Symbol("radioGroupKey"),kW=(t,e)=>{const n=F(),r=ht(TW,void 0),i=M(()=>!!r),o=M(()=>ep(t.value)?t.label:t.value),a=M({get(){return i.value?r.modelValue:t.modelValue},set(d){i.value?r.changeEvent(d):e&&e(Zt,d),n.value.checked=t.modelValue===o.value}}),s=Ni(M(()=>r==null?void 0:r.size)),l=la(M(()=>r==null?void 0:r.disabled)),u=F(!1),c=M(()=>l.value||i.value&&a.value!==o.value?-1:0);return Jd({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(()=>i.value&&ep(t.value))),{radioRef:n,isGroup:i,radioGroup:r,focus:u,size:s,disabled:l,tabIndex:c,modelValue:a,actualValue:o}},hRe=ue({name:"ElRadio"}),pRe=ue({...hRe,props:fRe,emits:EW,setup(t,{emit:e}){const n=t,r=Qe("radio"),{radioRef:i,radioGroup:o,focus:a,size:s,disabled:l,modelValue:u,actualValue:c}=kW(n,e);function d(){Ot(()=>e("change",u.value))}return(f,h)=>{var m;return R(),G("label",{class:j([p(r).b(),p(r).is("disabled",p(l)),p(r).is("focus",p(a)),p(r).is("bordered",f.border),p(r).is("checked",p(u)===p(c)),p(r).m(p(s))])},[J("span",{class:j([p(r).e("input"),p(r).is("disabled",p(l)),p(r).is("checked",p(u)===p(c))])},[Ht(J("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":g=>kr(u)?u.value=g:null,class:j(p(r).e("original")),value:p(c),name:f.name||((m=p(o))==null?void 0:m.name),disabled:p(l),checked:p(u)===p(c),type:"radio",onFocus:g=>a.value=!0,onBlur:g=>a.value=!1,onChange:d,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Jz,p(u)]]),J("span",{class:j(p(r).e("inner"))},null,2)],2),J("span",{class:j(p(r).e("label")),onKeydown:Pt(()=>{},["stop"])},[xe(f.$slots,"default",{},()=>[qe(je(f.label),1)])],42,["onKeydown"])],2)}}});var gRe=Ge(pRe,[["__file","radio.vue"]]);const mRe=Ye({...CW}),vRe=ue({name:"ElRadioButton"}),yRe=ue({...vRe,props:mRe,setup(t){const e=t,n=Qe("radio"),{radioRef:r,focus:i,size:o,disabled:a,modelValue:s,radioGroup:l,actualValue:u}=kW(e),c=M(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,f)=>{var h;return R(),G("label",{class:j([p(n).b("button"),p(n).is("active",p(s)===p(u)),p(n).is("disabled",p(a)),p(n).is("focus",p(i)),p(n).bm("button",p(o))])},[Ht(J("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":m=>kr(s)?s.value=m:null,class:j(p(n).be("button","original-radio")),value:p(u),type:"radio",name:d.name||((h=p(l))==null?void 0:h.name),disabled:p(a),onFocus:m=>i.value=!0,onBlur:m=>i.value=!1,onClick:Pt(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Jz,p(s)]]),J("span",{class:j(p(n).be("button","inner")),style:mt(p(s)===p(u)?p(c):{}),onKeydown:Pt(()=>{},["stop"])},[xe(d.$slots,"default",{},()=>[qe(je(d.label),1)])],46,["onKeydown"])],2)}}});var PW=Ge(yRe,[["__file","radio-button.vue"]]);const bRe=Ye({id:{type:String,default:void 0},size:Wi,disabled:Boolean,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},...wo(["ariaLabel"])}),_Re=EW,ORe=ue({name:"ElRadioGroup"}),wRe=ue({...ORe,props:bRe,emits:_Re,setup(t,{emit:e}){const n=t,r=Qe("radio"),i=bo(),o=F(),{formItem:a}=ua(),{inputId:s,isLabeledByFormItem:l}=gu(n,{formItemContext:a}),u=d=>{e(Zt,d),Ot(()=>e("change",d))};Bt(()=>{const d=o.value.querySelectorAll("[type=radio]"),f=d[0];!Array.from(d).some(h=>h.checked)&&f&&(f.tabIndex=0)});const c=M(()=>n.name||i.value);return _n(TW,Sn({...Ri(n),changeEvent:u,name:c})),Ve(()=>n.modelValue,()=>{n.validateEvent&&(a==null||a.validate("change").catch(d=>void 0))}),(d,f)=>(R(),G("div",{id:p(s),ref_key:"radioGroupRef",ref:o,class:j(p(r).b("group")),role:"radiogroup","aria-label":p(l)?void 0:d.ariaLabel||"radio-group","aria-labelledby":p(l)?p(a).labelId:void 0},[xe(d.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var AW=Ge(wRe,[["__file","radio-group.vue"]]);const MW=Vt(gRe,{RadioButton:PW,RadioGroup:AW}),SRe=ti(AW),xRe=ti(PW);var CRe=ue({name:"NodeContent",setup(){return{ns:Qe("cascader-node")}},render(){const{ns:t}=this,{node:e,panel:n}=this.$parent,{data:r,label:i}=e,{renderLabelFn:o}=n;return Et("span",{class:t.e("label")},o?o({node:e,data:r}):i)}});const H$=Symbol(),ERe=ue({name:"ElCascaderNode",components:{ElCheckbox:Is,ElRadio:MW,NodeContent:CRe,ElIcon:gt,Check:Sb,Loading:Ku,ArrowRight:ba},props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=ht(H$),r=Qe("cascader-node"),i=M(()=>n.isHoverMenu),o=M(()=>n.config.multiple),a=M(()=>n.config.checkStrictly),s=M(()=>{var C;return(C=n.checkedNodes[0])==null?void 0:C.uid}),l=M(()=>t.node.isDisabled),u=M(()=>t.node.isLeaf),c=M(()=>a.value&&!u.value||!l.value),d=M(()=>h(n.expandingNode)),f=M(()=>a.value&&n.checkedNodes.some(h)),h=C=>{var E;const{level:T,uid:P}=t.node;return((E=C==null?void 0:C.pathNodes[T-1])==null?void 0:E.uid)===P},m=()=>{d.value||n.expandNode(t.node)},g=C=>{const{node:E}=t;C!==E.checked&&n.handleCheckChange(E,C)},y=()=>{n.lazyLoad(t.node,()=>{u.value||m()})},b=C=>{!i.value||(w(),!u.value&&e("expand",C))},w=()=>{const{node:C}=t;!c.value||C.loading||(C.loaded?m():y())},O=()=>{i.value&&!u.value||(u.value&&!l.value&&!a.value&&!o.value?x(!0):w())},S=C=>{a.value?(g(C),t.node.loaded&&m()):x(C)},x=C=>{t.node.loaded?(g(C),!a.value&&m()):y()};return{panel:n,isHoverMenu:i,multiple:o,checkStrictly:a,checkedNodeId:s,isDisabled:l,isLeaf:u,expandable:c,inExpandingPath:d,inCheckedPath:f,ns:r,handleHoverExpand:b,handleExpand:w,handleClick:O,handleCheck:x,handleSelectCheck:S}}});function TRe(t,e,n,r,i,o){const a=an("el-checkbox"),s=an("el-radio"),l=an("check"),u=an("el-icon"),c=an("node-content"),d=an("loading"),f=an("arrow-right");return R(),G("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!t.isLeaf,"aria-owns":t.isLeaf?null:t.menuId,"aria-expanded":t.inExpandingPath,tabindex:t.expandable?-1:void 0,class:j([t.ns.b(),t.ns.is("selectable",t.checkStrictly),t.ns.is("active",t.node.checked),t.ns.is("disabled",!t.expandable),t.inExpandingPath&&"in-active-path",t.inCheckedPath&&"in-checked-path"]),onMouseenter:t.handleHoverExpand,onFocus:t.handleHoverExpand,onClick:t.handleClick},[_e(" prefix "),t.multiple?(R(),we(a,{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:t.isDisabled,onClick:Pt(()=>{},["stop"]),"onUpdate:modelValue":t.handleSelectCheck},null,8,["model-value","indeterminate","disabled","onClick","onUpdate:modelValue"])):t.checkStrictly?(R(),we(s,{key:1,"model-value":t.checkedNodeId,label:t.node.uid,disabled:t.isDisabled,"onUpdate:modelValue":t.handleSelectCheck,onClick:Pt(()=>{},["stop"])},{default:z(()=>[_e(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `),J("span")]),_:1},8,["model-value","label","disabled","onUpdate:modelValue","onClick"])):t.isLeaf&&t.node.checked?(R(),we(u,{key:2,class:j(t.ns.e("prefix"))},{default:z(()=>[B(l)]),_:1},8,["class"])):_e("v-if",!0),_e(" content "),B(c),_e(" postfix "),t.isLeaf?_e("v-if",!0):(R(),G(ct,{key:3},[t.node.loading?(R(),we(u,{key:0,class:j([t.ns.is("loading"),t.ns.e("postfix")])},{default:z(()=>[B(d)]),_:1},8,["class"])):(R(),we(u,{key:1,class:j(["arrow-right",t.ns.e("postfix")])},{default:z(()=>[B(f)]),_:1},8,["class"]))],64))],42,["id","aria-haspopup","aria-owns","aria-expanded","tabindex","onMouseenter","onFocus","onClick"])}var kRe=Ge(ERe,[["render",TRe],["__file","node.vue"]]);const PRe=ue({name:"ElCascaderMenu",components:{Loading:Ku,ElIcon:gt,ElScrollbar:mu,ElCascaderNode:kRe},props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=en(),n=Qe("cascader-menu"),{t:r}=kn(),i=bo();let o=null,a=null;const s=ht(H$),l=F(null),u=M(()=>!t.nodes.length),c=M(()=>!s.initialLoaded),d=M(()=>`${i.value}-${t.index}`),f=y=>{o=y.target},h=y=>{if(!(!s.isHoverMenu||!o||!l.value))if(o.contains(y.target)){m();const b=e.vnode.el,{left:w}=b.getBoundingClientRect(),{offsetWidth:O,offsetHeight:S}=b,x=y.clientX-w,C=o.offsetTop,E=C+o.offsetHeight;l.value.innerHTML=` `}else a||(a=window.setTimeout(g,s.config.hoverThreshold))},m=()=>{!a||(clearTimeout(a),a=null)},g=()=>{!l.value||(l.value.innerHTML="",m())};return{ns:n,panel:s,hoverZone:l,isEmpty:u,isLoading:c,menuId:d,t:r,handleExpand:f,handleMouseMove:h,clearHoverZone:g}}});function ARe(t,e,n,r,i,o){const a=an("el-cascader-node"),s=an("loading"),l=an("el-icon"),u=an("el-scrollbar");return R(),we(u,{key:t.menuId,tag:"ul",role:"menu",class:j(t.ns.b()),"wrap-class":t.ns.e("wrap"),"view-class":[t.ns.e("list"),t.ns.is("empty",t.isEmpty)],onMousemove:t.handleMouseMove,onMouseleave:t.clearHoverZone},{default:z(()=>{var c;return[(R(!0),G(ct,null,Wt(t.nodes,d=>(R(),we(a,{key:d.uid,node:d,"menu-id":t.menuId,onExpand:t.handleExpand},null,8,["node","menu-id","onExpand"]))),128)),t.isLoading?(R(),G("div",{key:0,class:j(t.ns.e("empty-text"))},[B(l,{size:"14",class:j(t.ns.is("loading"))},{default:z(()=>[B(s)]),_:1},8,["class"]),qe(" "+je(t.t("el.cascader.loading")),1)],2)):t.isEmpty?(R(),G("div",{key:1,class:j(t.ns.e("empty-text"))},[xe(t.$slots,"empty",{},()=>[qe(je(t.t("el.cascader.noData")),1)])],2)):(c=t.panel)!=null&&c.isHoverMenu?(R(),G("svg",{key:2,ref:"hoverZone",class:j(t.ns.e("hover-zone"))},null,2)):_e("v-if",!0)]}),_:3},8,["class","wrap-class","view-class","onMousemove","onMouseleave"])}var MRe=Ge(PRe,[["render",ARe],["__file","menu.vue"]]);let RRe=0;const $Re=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};class rm{constructor(e,n,r,i=!1){this.data=e,this.config=n,this.parent=r,this.root=i,this.uid=RRe++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:o,label:a,children:s}=n,l=e[s],u=$Re(this);this.level=i?0:r?r.level+1:1,this.value=e[o],this.label=e[a],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 rm(c,n,this)),this.loaded=!n.lazy||this.isLeaf||!xs(l)}get isDisabled(){const{data:e,parent:n,config:r}=this,{disabled:i,checkStrictly:o}=r;return($t(i)?i(e,this):!!e[i])||!o&&(n==null?void 0:n.isDisabled)}get isLeaf(){const{data:e,config:n,childrenData:r,loaded:i}=this,{lazy:o,leaf:a}=n,s=$t(a)?a(e,this):e[a];return ai(s)?o&&!i?!1:!(Array.isArray(r)&&r.length):!!s}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:r}=this,i=new rm(e,this.config,this);return Array.isArray(n)?n.push(e):this.childrenData=[e],r.push(i),i}calcText(e,n){const r=e?this.pathLabels.join(n):this.label;return this.text=r,r}broadcast(e,...n){const r=`onParent${Du(e)}`;this.children.forEach(i=>{i&&(i.broadcast(e,...n),i[r]&&i[r](...n))})}emit(e,...n){const{parent:r}=this,i=`onChild${Du(e)}`;r&&(r[i]&&r[i](...n),r.emit(e,...n))}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(i=>!i.isDisabled),r=n.length?n.every(i=>i.checked):!1;this.setCheckState(r)}setCheckState(e){const n=this.children.length,r=this.children.reduce((i,o)=>{const a=o.checked?1:o.indeterminate?.5:0;return i+a},0);this.checked=this.loaded&&this.children.filter(i=>!i.isDisabled).every(i=>i.loaded&&i.checked)&&e,this.indeterminate=this.loaded&&r!==n&&r>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:r}=this.config;n||!r?this.checked=e:(this.broadcast("check",e),this.setCheckState(e),this.emit("check"))}}const Uk=(t,e)=>t.reduce((n,r)=>(r.isLeaf?n.push(r):(!e&&n.push(r),n=n.concat(Uk(r.children,e))),n),[]);class b8{constructor(e,n){this.config=n;const r=(e||[]).map(i=>new rm(i,this.config));this.nodes=r,this.allNodes=Uk(r,!1),this.leafNodes=Uk(r,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const r=n?n.appendChild(e):new rm(e,this.config);n||this.nodes.push(r),this.allNodes.push(r),r.isLeaf&&this.leafNodes.push(r)}appendNodes(e,n){e.forEach(r=>this.appendNode(r,n))}getNodeByValue(e,n=!1){return!e&&e!==0?null:this.getFlattedNodes(n).find(i=>so(i.value,e)||so(i.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:r,level:i})=>so(e.value,r)&&e.level===i)||null}}const RW=Ye({modelValue:{type:Oe([Number,String,Array])},options:{type:Oe(Array),default:()=>[]},props:{type:Oe(Object),default:()=>({})}}),NRe={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:yr,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500},DRe=t=>M(()=>({...NRe,...t.props})),_8=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},LRe=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():r7(t)&&t.click()},IRe=(t,e)=>{const n=e.slice(0),r=n.map(o=>o.uid),i=t.reduce((o,a)=>{const s=r.indexOf(a.uid);return s>-1&&(o.push(a),n.splice(s,1),r.splice(s,1)),o},[]);return i.push(...n),i},BRe=ue({name:"ElCascaderPanel",components:{ElCascaderMenu:MRe},props:{...RW,border:{type:Boolean,default:!0},renderLabel:Function},emits:[Zt,Lr,"close","expand-change"],setup(t,{emit:e,slots:n}){let r=!1;const i=Qe("cascader"),o=DRe(t);let a=null;const s=F(!0),l=F([]),u=F(null),c=F([]),d=F(null),f=F([]),h=M(()=>o.value.expandTrigger==="hover"),m=M(()=>t.renderLabel||n.default),g=()=>{const{options:N}=t,$=o.value;r=!1,a=new b8(N,$),c.value=[a.getNodes()],$.lazy&&xs(t.options)?(s.value=!1,y(void 0,W=>{W&&(a=new b8(W,$),c.value=[a.getNodes()]),s.value=!0,T(!1,!0)})):T(!1,!0)},y=(N,$)=>{const W=o.value;N=N||new rm({},W,void 0,!0),N.loading=!0;const L=I=>{const U=N,Q=U.root?null:U;I&&(a==null||a.appendNodes(I,Q)),U.loading=!1,U.loaded=!0,U.childrenData=U.childrenData||[],$&&$(I)};W.lazyLoad(N,L)},b=(N,$)=>{var W;const{level:L}=N,I=c.value.slice(0,L);let U;N.isLeaf?U=N.pathNodes[L-2]:(U=N,I.push(N.children)),((W=d.value)==null?void 0:W.uid)!==(U==null?void 0:U.uid)&&(d.value=N,c.value=I,!$&&e("expand-change",(N==null?void 0:N.pathValues)||[]))},w=(N,$,W=!0)=>{const{checkStrictly:L,multiple:I}=o.value,U=f.value[0];r=!0,!I&&(U==null||U.doCheck(!1)),N.doCheck($),E(),W&&!I&&!L&&e("close"),!W&&!I&&!L&&O(N)},O=N=>{!N||(N=N.parent,O(N),N&&b(N))},S=N=>a==null?void 0:a.getFlattedNodes(N),x=N=>{var $;return($=S(N))==null?void 0:$.filter(W=>W.checked!==!1)},C=()=>{f.value.forEach(N=>N.doCheck(!1)),E(),c.value=c.value.slice(0,1),d.value=null,e("expand-change",[])},E=()=>{var N;const{checkStrictly:$,multiple:W}=o.value,L=f.value,I=x(!$),U=IRe(L,I),Q=U.map(V=>V.valueByOption);f.value=U,u.value=W?Q:(N=Q[0])!=null?N:null},T=(N=!1,$=!1)=>{const{modelValue:W}=t,{lazy:L,multiple:I,checkStrictly:U}=o.value,Q=!U;if(!(!s.value||r||!$&&so(W,u.value)))if(L&&!N){const q=_5(U9(ya(W))).map(K=>a==null?void 0:a.getNodeByValue(K)).filter(K=>!!K&&!K.loaded&&!K.loading);q.length?q.forEach(K=>{y(K,()=>T(!1,$))}):T(!0,$)}else{const V=I?ya(W):[W],q=_5(V.map(K=>a==null?void 0:a.getNodeByValue(K,Q)));P(q,$),u.value=Fn(W)}},P=(N,$=!0)=>{const{checkStrictly:W}=o.value,L=f.value,I=N.filter(V=>!!V&&(W||V.isLeaf)),U=a==null?void 0:a.getSameNode(d.value),Q=$&&U||I[0];Q?Q.pathNodes.forEach(V=>b(V,!0)):d.value=null,L.forEach(V=>V.doCheck(!1)),Sn(I).forEach(V=>V.doCheck(!0)),f.value=I,Ot(A)},A=()=>{!Tn||l.value.forEach(N=>{const $=N==null?void 0:N.$el;if($){const W=$.querySelector(`.${i.namespace.value}-scrollbar__wrap`),L=$.querySelector(`.${i.b("node")}.${i.is("active")}`)||$.querySelector(`.${i.b("node")}.in-active-path`);i$(W,L)}})},D=N=>{const $=N.target,{code:W}=N;switch(W){case St.up:case St.down:{N.preventDefault();const L=W===St.up?-1:1;p1(i7($,L,`.${i.b("node")}[tabindex="-1"]`));break}case St.left:{N.preventDefault();const L=l.value[_8($)-1],I=L==null?void 0:L.$el.querySelector(`.${i.b("node")}[aria-expanded="true"]`);p1(I);break}case St.right:{N.preventDefault();const L=l.value[_8($)+1],I=L==null?void 0:L.$el.querySelector(`.${i.b("node")}[tabindex="-1"]`);p1(I);break}case St.enter:LRe($);break}};return _n(H$,Sn({config:o,expandingNode:d,checkedNodes:f,isHoverMenu:h,initialLoaded:s,renderLabelFn:m,lazyLoad:y,expandNode:b,handleCheckChange:w})),Ve([o,()=>t.options],g,{deep:!0,immediate:!0}),Ve(()=>t.modelValue,()=>{r=!1,T()},{deep:!0}),Ve(()=>u.value,N=>{so(N,t.modelValue)||(e(Zt,N),e(Lr,N))}),kz(()=>l.value=[]),Bt(()=>!xs(t.modelValue)&&T()),{ns:i,menuList:l,menus:c,checkedNodes:f,handleKeyDown:D,handleCheckChange:w,getFlattedNodes:S,getCheckedNodes:x,clearCheckedNodes:C,calculateCheckedValue:E,scrollToExpandingNode:A}}});function FRe(t,e,n,r,i,o){const a=an("el-cascader-menu");return R(),G("div",{class:j([t.ns.b("panel"),t.ns.is("bordered",t.border)]),onKeydown:t.handleKeyDown},[(R(!0),G(ct,null,Wt(t.menus,(s,l)=>(R(),we(a,{key:l,ref_for:!0,ref:u=>t.menuList[l]=u,index:l,nodes:[...s]},{empty:z(()=>[xe(t.$slots,"empty")]),_:2},1032,["index","nodes"]))),128))],42,["onKeydown"])}var VRe=Ge(BRe,[["render",FRe],["__file","index.vue"]]);const $W=Vt(VRe),ip=Ye({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:cc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),jRe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},zRe=ue({name:"ElTag"}),QRe=ue({...zRe,props:ip,emits:jRe,setup(t,{emit:e}){const n=t,r=Ni(),i=Qe("tag"),o=M(()=>{const{type:u,hit:c,effect:d,closable:f,round:h}=n;return[i.b(),i.is("closable",f),i.m(u||"primary"),i.m(r.value),i.m(d),i.is("hit",c),i.is("round",h)]}),a=u=>{e("close",u)},s=u=>{e("click",u)},l=u=>{u.component.subTree.component.bum=null};return(u,c)=>u.disableTransitions?(R(),G("span",{key:0,class:j(p(o)),style:mt({backgroundColor:u.color}),onClick:s},[J("span",{class:j(p(i).e("content"))},[xe(u.$slots,"default")],2),u.closable?(R(),we(p(gt),{key:0,class:j(p(i).e("close")),onClick:Pt(a,["stop"])},{default:z(()=>[B(p(_a))]),_:1},8,["class","onClick"])):_e("v-if",!0)],6)):(R(),we(Qi,{key:1,name:`${p(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:z(()=>[J("span",{class:j(p(o)),style:mt({backgroundColor:u.color}),onClick:s},[J("span",{class:j(p(i).e("content"))},[xe(u.$slots,"default")],2),u.closable?(R(),we(p(gt),{key:0,class:j(p(i).e("close")),onClick:Pt(a,["stop"])},{default:z(()=>[B(p(_a))]),_:1},8,["class","onClick"])):_e("v-if",!0)],6)]),_:3},8,["name"]))}});var HRe=Ge(QRe,[["__file","tag.vue"]]);const Bs=Vt(HRe),WRe=Ye({...RW,size:Wi,placeholder:String,disabled:Boolean,clearable:Boolean,filterable:Boolean,filterMethod:{type:Oe(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:{type:Boolean,default:!1},debounce:{type:Number,default:300},beforeFilter:{type:Oe(Function),default:()=>!0},placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:{type:String,default:""},teleported:io.teleported,tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...Wm}),URe={[Zt]:t=>!0,[Lr]:t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>si(t),expandChange:t=>!!t,removeTag:t=>!!t},qRe="ElCascader",YRe=ue({name:qRe}),XRe=ue({...YRe,props:WRe,emits:URe,setup(t,{expose:e,emit:n}){const r=t,i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:de})=>{const{modifiersData:Pe,placement:Le}=de;["right","left","bottom","top"].includes(Le)||(Pe.arrow.x=35)},requires:["arrow"]}]},o=mp();let a=0,s=0;const l=Qe("cascader"),u=Qe("input"),{t:c}=kn(),{form:d,formItem:f}=ua(),{valueOnClear:h}=Hx(r),{isComposing:m,handleComposition:g}=Qx({afterComposition(de){var Pe;const Le=(Pe=de.target)==null?void 0:Pe.value;Me(Le)}}),y=F(null),b=F(null),w=F(null),O=F(null),S=F(null),x=F(!1),C=F(!1),E=F(!1),T=F(!1),P=F(""),A=F(""),D=F([]),N=F([]),$=F([]),W=M(()=>o.style),L=M(()=>r.disabled||(d==null?void 0:d.disabled)),I=M(()=>r.placeholder||c("el.cascader.placeholder")),U=M(()=>A.value||D.value.length>0||m.value?"":I.value),Q=Ni(),V=M(()=>["small"].includes(Q.value)?"small":"default"),q=M(()=>!!r.props.multiple),K=M(()=>!r.filterable||q.value),ie=M(()=>q.value?A.value:P.value),oe=M(()=>{var de;return((de=O.value)==null?void 0:de.checkedNodes)||[]}),Se=M(()=>!r.clearable||L.value||E.value||!C.value?!1:!!oe.value.length),ke=M(()=>{const{showAllLevels:de,separator:Pe}=r,Le=oe.value;return Le.length?q.value?"":Le[0].calcText(de,Pe):""}),Y=M(()=>(f==null?void 0:f.validateState)||""),re=M({get(){return Fn(r.modelValue)},set(de){const Pe=de!=null?de:h.value;n(Zt,Pe),n(Lr,Pe),r.validateEvent&&(f==null||f.validate("change").catch(Le=>void 0))}}),te=M(()=>[l.b(),l.m(Q.value),l.is("disabled",L.value),o.class]),ge=M(()=>[u.e("icon"),"icon-arrow-down",l.is("reverse",x.value)]),Re=M(()=>l.is("focus",x.value||T.value)),$e=M(()=>{var de,Pe;return(Pe=(de=y.value)==null?void 0:de.popperRef)==null?void 0:Pe.contentRef}),Z=de=>{var Pe,Le,wt;L.value||(de=de!=null?de:!x.value,de!==x.value&&(x.value=de,(Le=(Pe=b.value)==null?void 0:Pe.input)==null||Le.setAttribute("aria-expanded",`${de}`),de?(ce(),Ot((wt=O.value)==null?void 0:wt.scrollToExpandingNode)):r.filterable&&be(),n("visibleChange",de)))},ce=()=>{Ot(()=>{var de;(de=y.value)==null||de.updatePopper()})},Te=()=>{E.value=!1},Ie=de=>{const{showAllLevels:Pe,separator:Le}=r;return{node:de,key:de.uid,text:de.calcText(Pe,Le),hitState:!1,closable:!L.value&&!de.isDisabled,isCollapseTag:!1}},ae=de=>{var Pe;const Le=de.node;Le.doCheck(!1),(Pe=O.value)==null||Pe.calculateCheckedValue(),n("removeTag",Le.valueByOption)},me=()=>{if(!q.value)return;const de=oe.value,Pe=[],Le=[];if(de.forEach(wt=>Le.push(Ie(wt))),N.value=Le,de.length){de.slice(0,r.maxCollapseTags).forEach(De=>Pe.push(Ie(De)));const wt=de.slice(r.maxCollapseTags),tn=wt.length;tn&&(r.collapseTags?Pe.push({key:-1,text:`+ ${tn}`,closable:!1,isCollapseTag:!0}):wt.forEach(De=>Pe.push(Ie(De))))}D.value=Pe},Ae=()=>{var de,Pe;const{filterMethod:Le,showAllLevels:wt,separator:tn}=r,De=(Pe=(de=O.value)==null?void 0:de.getFlattedNodes(!r.props.checkStrictly))==null?void 0:Pe.filter(xt=>xt.isDisabled?!1:(xt.calcText(wt,tn),Le(xt,ie.value)));q.value&&(D.value.forEach(xt=>{xt.hitState=!1}),N.value.forEach(xt=>{xt.hitState=!1})),E.value=!0,$.value=De,ce()},X=()=>{var de;let Pe;E.value&&S.value?Pe=S.value.$el.querySelector(`.${l.e("suggestion-item")}`):Pe=(de=O.value)==null?void 0:de.$el.querySelector(`.${l.b("node")}[tabindex="-1"]`),Pe&&(Pe.focus(),!E.value&&Pe.click())},ee=()=>{var de,Pe;const Le=(de=b.value)==null?void 0:de.input,wt=w.value,tn=(Pe=S.value)==null?void 0:Pe.$el;if(!(!Tn||!Le)){if(tn){const De=tn.querySelector(`.${l.e("suggestion-list")}`);De.style.minWidth=`${Le.offsetWidth}px`}if(wt){const{offsetHeight:De}=wt,xt=D.value.length>0?`${Math.max(De+6,a)}px`:`${a}px`;Le.style.height=xt,ce()}}},le=de=>{var Pe;return(Pe=O.value)==null?void 0:Pe.getCheckedNodes(de)},Ce=de=>{ce(),n("expandChange",de)},fe=de=>{if(!m.value)switch(de.code){case St.enter:Z();break;case St.down:Z(!0),Ot(X),de.preventDefault();break;case St.esc:x.value===!0&&(de.preventDefault(),de.stopPropagation(),Z(!1));break;case St.tab:Z(!1);break}},Ee=()=>{var de;(de=O.value)==null||de.clearCheckedNodes(),!x.value&&r.filterable&&be(),Z(!1),n("clear")},be=()=>{const{value:de}=ke;P.value=de,A.value=de},Be=de=>{var Pe,Le;const{checked:wt}=de;q.value?(Pe=O.value)==null||Pe.handleCheckChange(de,!wt,!1):(!wt&&((Le=O.value)==null||Le.handleCheckChange(de,!0,!1)),Z(!1))},Xe=de=>{const Pe=de.target,{code:Le}=de;switch(Le){case St.up:case St.down:{const wt=Le===St.up?-1:1;p1(i7(Pe,wt,`.${l.e("suggestion-item")}[tabindex="-1"]`));break}case St.enter:Pe.click();break}},Ke=()=>{const de=D.value,Pe=de[de.length-1];s=A.value?0:s+1,!(!Pe||!s||r.collapseTags&&de.length>1)&&(Pe.hitState?ae(Pe):Pe.hitState=!0)},tt=de=>{const Pe=de.target,Le=l.e("search-input");Pe.className===Le&&(T.value=!0),n("focus",de)},Dt=de=>{T.value=!1,n("blur",de)},jt=jo(()=>{const{value:de}=ie;if(!de)return;const Pe=r.beforeFilter(de);Jy(Pe)?Pe.then(Ae).catch(()=>{}):Pe!==!1?Ae():Te()},r.debounce),Me=(de,Pe)=>{!x.value&&Z(!0),!(Pe!=null&&Pe.isComposing)&&(de?jt():Te())},nt=de=>Number.parseFloat(Uue(u.cssVarName("input-height"),de).value)-2;return Ve(E,ce),Ve([oe,L,()=>r.collapseTags],me),Ve(D,()=>{Ot(()=>ee())}),Ve(Q,async()=>{await Ot();const de=b.value.input;a=nt(de)||a,ee()}),Ve(ke,be,{immediate:!0}),Bt(()=>{const de=b.value.input,Pe=nt(de);a=de.offsetHeight||Pe,Zr(de,ee)}),e({getCheckedNodes:le,cascaderPanelRef:O,togglePopperVisible:Z,contentRef:$e,presentText:ke}),(de,Pe)=>(R(),we(p(Ui),{ref_key:"tooltipRef",ref:y,visible:x.value,teleported:de.teleported,"popper-class":[p(l).e("dropdown"),de.popperClass],"popper-options":i,"fallback-placements":de.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:de.placement,transition:`${p(l).namespace.value}-zoom-in-top`,effect:"light",pure:"",persistent:de.persistent,onHide:Te},{default:z(()=>[Ht((R(),G("div",{class:j(p(te)),style:mt(p(W)),onClick:()=>Z(p(K)?void 0:!0),onKeydown:fe,onMouseenter:Le=>C.value=!0,onMouseleave:Le=>C.value=!1},[B(p(hi),{ref_key:"input",ref:b,modelValue:P.value,"onUpdate:modelValue":Le=>P.value=Le,placeholder:p(U),readonly:p(K),disabled:p(L),"validate-event":!1,size:p(Q),class:j(p(Re)),tabindex:p(q)&&de.filterable&&!p(L)?-1:void 0,onCompositionstart:p(g),onCompositionupdate:p(g),onCompositionend:p(g),onFocus:tt,onBlur:Dt,onInput:Me},{suffix:z(()=>[p(Se)?(R(),we(p(gt),{key:"clear",class:j([p(u).e("icon"),"icon-circle-close"]),onClick:Pt(Ee,["stop"])},{default:z(()=>[B(p(Bf))]),_:1},8,["class","onClick"])):(R(),we(p(gt),{key:"arrow-down",class:j(p(ge)),onClick:Pt(Le=>Z(),["stop"])},{default:z(()=>[B(p(ld))]),_:1},8,["class","onClick"]))]),_:1},8,["modelValue","onUpdate:modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),p(q)?(R(),G("div",{key:0,ref_key:"tagWrapper",ref:w,class:j([p(l).e("tags"),p(l).is("validate",Boolean(p(Y)))])},[(R(!0),G(ct,null,Wt(D.value,Le=>(R(),we(p(Bs),{key:Le.key,type:de.tagType,size:p(V),effect:de.tagEffect,hit:Le.hitState,closable:Le.closable,"disable-transitions":"",onClose:wt=>ae(Le)},{default:z(()=>[Le.isCollapseTag===!1?(R(),G("span",{key:0},je(Le.text),1)):(R(),we(p(Ui),{key:1,disabled:x.value||!de.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom",effect:"light"},{default:z(()=>[J("span",null,je(Le.text),1)]),content:z(()=>[J("div",{class:j(p(l).e("collapse-tags"))},[(R(!0),G(ct,null,Wt(N.value.slice(de.maxCollapseTags),(wt,tn)=>(R(),G("div",{key:tn,class:j(p(l).e("collapse-tag"))},[(R(),we(p(Bs),{key:wt.key,class:"in-tooltip",type:de.tagType,size:p(V),effect:de.tagEffect,hit:wt.hitState,closable:wt.closable,"disable-transitions":"",onClose:De=>ae(wt)},{default:z(()=>[J("span",null,je(wt.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:2},1032,["disabled"]))]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128)),de.filterable&&!p(L)?Ht((R(),G("input",{key:0,"onUpdate:modelValue":Le=>A.value=Le,type:"text",class:j(p(l).e("search-input")),placeholder:p(ke)?"":p(I),onInput:Le=>Me(A.value,Le),onClick:Pt(Le=>Z(!0),["stop"]),onKeydown:br(Ke,["delete"]),onCompositionstart:p(g),onCompositionupdate:p(g),onCompositionend:p(g),onFocus:tt,onBlur:Dt},null,42,["onUpdate:modelValue","placeholder","onInput","onClick","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend"])),[[JM,A.value]]):_e("v-if",!0)],2)):_e("v-if",!0)],46,["onClick","onMouseenter","onMouseleave"])),[[p(qc),()=>Z(!1),p($e)]])]),content:z(()=>[Ht(B(p($W),{ref_key:"cascaderPanelRef",ref:O,modelValue:p(re),"onUpdate:modelValue":Le=>kr(re)?re.value=Le:null,options:de.options,props:r.props,border:!1,"render-label":de.$slots.default,onExpandChange:Ce,onClose:Le=>de.$nextTick(()=>Z(!1))},{empty:z(()=>[xe(de.$slots,"empty")]),_:3},8,["modelValue","onUpdate:modelValue","options","props","render-label","onClose"]),[[zn,!E.value]]),de.filterable?Ht((R(),we(p(mu),{key:0,ref_key:"suggestionPanel",ref:S,tag:"ul",class:j(p(l).e("suggestion-panel")),"view-class":p(l).e("suggestion-list"),onKeydown:Xe},{default:z(()=>[$.value.length?(R(!0),G(ct,{key:0},Wt($.value,Le=>(R(),G("li",{key:Le.uid,class:j([p(l).e("suggestion-item"),p(l).is("checked",Le.checked)]),tabindex:-1,onClick:wt=>Be(Le)},[J("span",null,je(Le.text),1),Le.checked?(R(),we(p(gt),{key:0},{default:z(()=>[B(p(Sb))]),_:1})):_e("v-if",!0)],10,["onClick"]))),128)):xe(de.$slots,"empty",{key:1},()=>[J("li",{class:j(p(l).e("empty-text"))},je(p(c)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[zn,E.value]]):_e("v-if",!0)]),_:3},8,["visible","teleported","popper-class","fallback-placements","placement","transition","persistent"]))}});var ZRe=Ge(XRe,[["__file","cascader.vue"]]);const GRe=Vt(ZRe),KRe=Ye({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),JRe={"update:checked":t=>si(t),[Lr]:t=>si(t)},e$e=ue({name:"ElCheckTag"}),t$e=ue({...e$e,props:KRe,emits:JRe,setup(t,{emit:e}){const n=t,r=Qe("check-tag"),i=M(()=>n.disabled),o=M(()=>[r.b(),r.is("checked",n.checked),r.is("disabled",i.value),r.m(n.type||"primary")]),a=()=>{if(i.value)return;const s=!n.checked;e(Lr,s),e("update:checked",s)};return(s,l)=>(R(),G("span",{class:j(p(o)),onClick:a},[xe(s.$slots,"default")],2))}});var n$e=Ge(t$e,[["__file","check-tag.vue"]]);const r$e=Vt(n$e),NW=Symbol("rowContextKey"),i$e=["start","center","end","space-around","space-between","space-evenly"],o$e=["top","middle","bottom"],a$e=Ye({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:i$e,default:"start"},align:{type:String,values:o$e}}),s$e=ue({name:"ElRow"}),l$e=ue({...s$e,props:a$e,setup(t){const e=t,n=Qe("row"),r=M(()=>e.gutter);_n(NW,{gutter:r});const i=M(()=>{const a={};return e.gutter&&(a.marginRight=a.marginLeft=`-${e.gutter/2}px`),a}),o=M(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(a,s)=>(R(),we(un(a.tag),{class:j(p(o)),style:mt(p(i))},{default:z(()=>[xe(a.$slots,"default")]),_:3},8,["class","style"]))}});var u$e=Ge(l$e,[["__file","row.vue"]]);const fo=Vt(u$e),c$e=Ye({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:Oe([Number,Object]),default:()=>Jr({})},sm:{type:Oe([Number,Object]),default:()=>Jr({})},md:{type:Oe([Number,Object]),default:()=>Jr({})},lg:{type:Oe([Number,Object]),default:()=>Jr({})},xl:{type:Oe([Number,Object]),default:()=>Jr({})}}),d$e=ue({name:"ElCol"}),f$e=ue({...d$e,props:c$e,setup(t){const e=t,{gutter:n}=ht(NW,{gutter:M(()=>0)}),r=Qe("col"),i=M(()=>{const a={};return n.value&&(a.paddingLeft=a.paddingRight=`${n.value/2}px`),a}),o=M(()=>{const a=[];return["span","offset","pull","push"].forEach(u=>{const c=e[u];kt(c)&&(u==="span"?a.push(r.b(`${e[u]}`)):c>0&&a.push(r.b(`${u}-${e[u]}`)))}),["xs","sm","md","lg","xl"].forEach(u=>{kt(e[u])?a.push(r.b(`${u}-${e[u]}`)):sn(e[u])&&Object.entries(e[u]).forEach(([c,d])=>{a.push(c!=="span"?r.b(`${u}-${c}-${d}`):r.b(`${u}-${d}`))})}),n.value&&a.push(r.is("guttered")),[r.b(),a]});return(a,s)=>(R(),we(un(a.tag),{class:j(p(o)),style:mt(p(i))},{default:z(()=>[xe(a.$slots,"default")]),_:3},8,["class","style"]))}});var h$e=Ge(f$e,[["__file","col.vue"]]);const ho=Vt(h$e),O8=t=>kt(t)||At(t)||ut(t),p$e=Ye({accordion:Boolean,modelValue:{type:Oe([Array,String,Number]),default:()=>Jr([])}}),g$e={[Zt]:O8,[Lr]:O8},DW=Symbol("collapseContextKey"),m$e=(t,e)=>{const n=F($o(t.modelValue)),r=o=>{n.value=o;const a=t.accordion?n.value[0]:n.value;e(Zt,a),e(Lr,a)},i=o=>{if(t.accordion)r([n.value[0]===o?"":o]);else{const a=[...n.value],s=a.indexOf(o);s>-1?a.splice(s,1):a.push(o),r(a)}};return Ve(()=>t.modelValue,()=>n.value=$o(t.modelValue),{deep:!0}),_n(DW,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:r}},v$e=()=>{const t=Qe("collapse");return{rootKls:M(()=>t.b())}},y$e=ue({name:"ElCollapse"}),b$e=ue({...y$e,props:p$e,emits:g$e,setup(t,{expose:e,emit:n}){const r=t,{activeNames:i,setActiveNames:o}=m$e(r,n),{rootKls:a}=v$e();return e({activeNames:i,setActiveNames:o}),(s,l)=>(R(),G("div",{class:j(p(a))},[xe(s.$slots,"default")],2))}});var _$e=Ge(b$e,[["__file","collapse.vue"]]);const O$e=ue({name:"ElCollapseTransition"}),w$e=ue({...O$e,setup(t){const e=Qe("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},r={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,o)=>(R(),we(Qi,gn({name:p(e).b()},gle(r)),{default:z(()=>[xe(i.$slots,"default")]),_:3},16,["name"]))}});var S$e=Ge(w$e,[["__file","collapse-transition.vue"]]);const Xx=Vt(S$e),x$e=Ye({title:{type:String,default:""},name:{type:Oe([String,Number]),default:void 0},icon:{type:fr,default:ba},disabled:Boolean}),C$e=t=>{const e=ht(DW),{namespace:n}=Qe("collapse"),r=F(!1),i=F(!1),o=T$(),a=M(()=>o.current++),s=M(()=>{var f;return(f=t.name)!=null?f:`${n.value}-id-${o.prefix}-${p(a)}`}),l=M(()=>e==null?void 0:e.activeNames.value.includes(p(s)));return{focusing:r,id:a,isActive:l,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:r.value=!0},50)},handleHeaderClick:()=>{t.disabled||(e==null||e.handleItemClick(p(s)),r.value=!1,i.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(p(s))}}},E$e=(t,{focusing:e,isActive:n,id:r})=>{const i=Qe("collapse"),o=M(()=>[i.b("item"),i.is("active",p(n)),i.is("disabled",t.disabled)]),a=M(()=>[i.be("item","header"),i.is("active",p(n)),{focusing:p(e)&&!t.disabled}]),s=M(()=>[i.be("item","arrow"),i.is("active",p(n))]),l=M(()=>i.be("item","wrap")),u=M(()=>i.be("item","content")),c=M(()=>i.b(`content-${p(r)}`)),d=M(()=>i.b(`head-${p(r)}`));return{arrowKls:s,headKls:a,rootKls:o,itemWrapperKls:l,itemContentKls:u,scopedContentId:c,scopedHeadId:d}},T$e=ue({name:"ElCollapseItem"}),k$e=ue({...T$e,props:x$e,setup(t,{expose:e}){const n=t,{focusing:r,id:i,isActive:o,handleFocus:a,handleHeaderClick:s,handleEnterClick:l}=C$e(n),{arrowKls:u,headKls:c,rootKls:d,itemWrapperKls:f,itemContentKls:h,scopedContentId:m,scopedHeadId:g}=E$e(n,{focusing:r,isActive:o,id:i});return e({isActive:o}),(y,b)=>(R(),G("div",{class:j(p(d))},[J("button",{id:p(g),class:j(p(c)),"aria-expanded":p(o),"aria-controls":p(m),"aria-describedby":p(m),tabindex:y.disabled?-1:0,type:"button",onClick:p(s),onKeydown:br(Pt(p(l),["stop","prevent"]),["space","enter"]),onFocus:p(a),onBlur:w=>r.value=!1},[xe(y.$slots,"title",{},()=>[qe(je(y.title),1)]),xe(y.$slots,"icon",{isActive:p(o)},()=>[B(p(gt),{class:j(p(u))},{default:z(()=>[(R(),we(un(y.icon)))]),_:1},8,["class"])])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),B(p(Xx),null,{default:z(()=>[Ht(J("div",{id:p(m),role:"region",class:j(p(f)),"aria-hidden":!p(o),"aria-labelledby":p(g)},[J("div",{class:j(p(h))},[xe(y.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[zn,p(o)]])]),_:3})],2))}});var LW=Ge(k$e,[["__file","collapse-item.vue"]]);const Zx=Vt(_$e,{CollapseItem:LW}),Gx=ti(LW),P$e=Ye({color:{type:Oe(Object),required:!0},vertical:{type:Boolean,default:!1}});let TT=!1;function y0(t,e){if(!Tn)return;const n=function(o){var a;(a=e.drag)==null||a.call(e,o)},r=function(o){var a;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",r),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",r),document.onselectstart=null,document.ondragstart=null,TT=!1,(a=e.end)==null||a.call(e,o)},i=function(o){var a;TT||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",r),document.addEventListener("touchmove",n),document.addEventListener("touchend",r),TT=!0,(a=e.start)==null||a.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const A$e=t=>{const e=en(),{t:n}=kn(),r=Tr(),i=Tr(),o=M(()=>t.color.get("alpha")),a=M(()=>n("el.colorpicker.alphaLabel"));function s(d){var f;d.target!==r.value&&l(d),(f=r.value)==null||f.focus()}function l(d){if(!i.value||!r.value)return;const h=e.vnode.el.getBoundingClientRect(),{clientX:m,clientY:g}=rR(d);if(t.vertical){let y=g-h.top;y=Math.max(r.value.offsetHeight/2,y),y=Math.min(y,h.height-r.value.offsetHeight/2),t.color.set("alpha",Math.round((y-r.value.offsetHeight/2)/(h.height-r.value.offsetHeight)*100))}else{let y=m-h.left;y=Math.max(r.value.offsetWidth/2,y),y=Math.min(y,h.width-r.value.offsetWidth/2),t.color.set("alpha",Math.round((y-r.value.offsetWidth/2)/(h.width-r.value.offsetWidth)*100))}}function u(d){const{code:f,shiftKey:h}=d,m=h?10:1;switch(f){case St.left:case St.down:d.preventDefault(),d.stopPropagation(),c(-m);break;case St.right:case St.up:d.preventDefault(),d.stopPropagation(),c(m);break}}function c(d){let f=o.value+d;f=f<0?0:f>100?100:f,t.color.set("alpha",f)}return{thumb:r,bar:i,alpha:o,alphaLabel:a,handleDrag:l,handleClick:s,handleKeydown:u}},M$e=(t,{bar:e,thumb:n,handleDrag:r})=>{const i=en(),o=Qe("color-alpha-slider"),a=F(0),s=F(0),l=F();function u(){if(!n.value||t.vertical)return 0;const w=i.vnode.el,O=t.color.get("alpha");return w?Math.round(O*(w.offsetWidth-n.value.offsetWidth/2)/100):0}function c(){if(!n.value)return 0;const w=i.vnode.el;if(!t.vertical)return 0;const O=t.color.get("alpha");return w?Math.round(O*(w.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(t.color&&t.color.value){const{r:w,g:O,b:S}=t.color.toRgb();return`linear-gradient(to right, rgba(${w}, ${O}, ${S}, 0) 0%, rgba(${w}, ${O}, ${S}, 1) 100%)`}return""}function f(){a.value=u(),s.value=c(),l.value=d()}Bt(()=>{if(!e.value||!n.value)return;const w={drag:O=>{r(O)},end:O=>{r(O)}};y0(e.value,w),y0(n.value,w),f()}),Ve(()=>t.color.get("alpha"),()=>f()),Ve(()=>t.color.value,()=>f());const h=M(()=>[o.b(),o.is("vertical",t.vertical)]),m=M(()=>o.e("bar")),g=M(()=>o.e("thumb")),y=M(()=>({background:l.value})),b=M(()=>({left:pi(a.value),top:pi(s.value)}));return{rootKls:h,barKls:m,barStyle:y,thumbKls:g,thumbStyle:b,update:f}},R$e="ElColorAlphaSlider",$$e=ue({name:R$e}),N$e=ue({...$$e,props:P$e,setup(t,{expose:e}){const n=t,{alpha:r,alphaLabel:i,bar:o,thumb:a,handleDrag:s,handleClick:l,handleKeydown:u}=A$e(n),{rootKls:c,barKls:d,barStyle:f,thumbKls:h,thumbStyle:m,update:g}=M$e(n,{bar:o,thumb:a,handleDrag:s});return e({update:g,bar:o,thumb:a}),(y,b)=>(R(),G("div",{class:j(p(c))},[J("div",{ref_key:"bar",ref:o,class:j(p(d)),style:mt(p(f)),onClick:p(l)},null,14,["onClick"]),J("div",{ref_key:"thumb",ref:a,class:j(p(h)),style:mt(p(m)),"aria-label":p(i),"aria-valuenow":p(r),"aria-orientation":y.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:p(u)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var D$e=Ge(N$e,[["__file","alpha-slider.vue"]]);const L$e=ue({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=Qe("color-hue-slider"),n=en(),r=F(),i=F(),o=F(0),a=F(0),s=M(()=>t.color.get("hue"));Ve(()=>s.value,()=>{f()});function l(h){h.target!==r.value&&u(h)}function u(h){if(!i.value||!r.value)return;const g=n.vnode.el.getBoundingClientRect(),{clientX:y,clientY:b}=rR(h);let w;if(t.vertical){let O=b-g.top;O=Math.min(O,g.height-r.value.offsetHeight/2),O=Math.max(r.value.offsetHeight/2,O),w=Math.round((O-r.value.offsetHeight/2)/(g.height-r.value.offsetHeight)*360)}else{let O=y-g.left;O=Math.min(O,g.width-r.value.offsetWidth/2),O=Math.max(r.value.offsetWidth/2,O),w=Math.round((O-r.value.offsetWidth/2)/(g.width-r.value.offsetWidth)*360)}t.color.set("hue",w)}function c(){if(!r.value)return 0;const h=n.vnode.el;if(t.vertical)return 0;const m=t.color.get("hue");return h?Math.round(m*(h.offsetWidth-r.value.offsetWidth/2)/360):0}function d(){if(!r.value)return 0;const h=n.vnode.el;if(!t.vertical)return 0;const m=t.color.get("hue");return h?Math.round(m*(h.offsetHeight-r.value.offsetHeight/2)/360):0}function f(){o.value=c(),a.value=d()}return Bt(()=>{if(!i.value||!r.value)return;const h={drag:m=>{u(m)},end:m=>{u(m)}};y0(i.value,h),y0(r.value,h),f()}),{bar:i,thumb:r,thumbLeft:o,thumbTop:a,hueValue:s,handleClick:l,update:f,ns:e}}});function I$e(t,e,n,r,i,o){return R(),G("div",{class:j([t.ns.b(),t.ns.is("vertical",t.vertical)])},[J("div",{ref:"bar",class:j(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),J("div",{ref:"thumb",class:j(t.ns.e("thumb")),style:mt({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var B$e=Ge(L$e,[["render",I$e],["__file","hue-slider.vue"]]);const F$e=Ye({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Wi,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:io.teleported,predefine:{type:Oe(Array)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),V$e={[Zt]:t=>At(t)||Dr(t),[Lr]:t=>At(t)||Dr(t),activeChange:t=>At(t)||Dr(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},IW=Symbol("colorPickerContextKey"),w8=function(t,e,n){return[t,e*n/((t=(2-e)*n)<1?t:2-t)||0,t/2]},j$e=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},z$e=function(t){return typeof t=="string"&&t.includes("%")},Mg=function(t,e){j$e(t)&&(t="100%");const n=z$e(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),n&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},S8={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},C1=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),n=t%16;return`${S8[e]||e}${S8[n]||n}`},x8=function({r:t,g:e,b:n}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+n)?"":`#${C1(t)}${C1(e)}${C1(n)}`},kT={A:10,B:11,C:12,D:13,E:14,F:15},lh=function(t){return t.length===2?(kT[t[0].toUpperCase()]||+t[0])*16+(kT[t[1].toUpperCase()]||+t[1]):kT[t[1].toUpperCase()]||+t[1]},Q$e=function(t,e,n){e=e/100,n=n/100;let r=e;const i=Math.max(n,.01);n*=2,e*=n<=1?n:2-n,r*=i<=1?i:2-i;const o=(n+e)/2,a=n===0?2*r/(i+r):2*e/(n+e);return{h:t,s:a*100,v:o*100}},C8=(t,e,n)=>{t=Mg(t,255),e=Mg(e,255),n=Mg(n,255);const r=Math.max(t,e,n),i=Math.min(t,e,n);let o;const a=r,s=r-i,l=r===0?0:s/r;if(r===i)o=0;else{switch(r){case t:{o=(e-n)/s+(e{this._hue=Math.max(0,Math.min(360,r)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(e.includes("hsl")){const r=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=Q$e(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("hsv")){const r=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3&&n(r[0],r[1],r[2])}else if(e.includes("rgb")){const r=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(r.length===4?this._alpha=Number.parseFloat(r[3])*100:r.length===3&&(this._alpha=100),r.length>=3){const{h:i,s:o,v:a}=C8(r[0],r[1],r[2]);n(i,o,a)}}else if(e.includes("#")){const r=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(r))return;let i,o,a;r.length===3?(i=lh(r[0]+r[0]),o=lh(r[1]+r[1]),a=lh(r[2]+r[2])):(r.length===6||r.length===8)&&(i=lh(r.slice(0,2)),o=lh(r.slice(2,4)),a=lh(r.slice(4,6))),r.length===8?this._alpha=lh(r.slice(6))/255*100:(r.length===3||r.length===6)&&(this._alpha=100);const{h:s,s:l,v:u}=C8(i,o,a);n(s,l,u)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:n,_value:r,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const a=w8(e,n/100,r/100);this.value=`hsla(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(n)}%, ${Math.round(r)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${x8(Dv(e,n,r))}${C1(i*255/100)}`;break}default:{const{r:a,g:s,b:l}=Dv(e,n,r);this.value=`rgba(${a}, ${s}, ${l}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const a=w8(e,n/100,r/100);this.value=`hsl(${e}, ${Math.round(a[1]*100)}%, ${Math.round(a[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(n)}%, ${Math.round(r)}%)`;break}case"rgb":{const{r:a,g:s,b:l}=Dv(e,n,r);this.value=`rgb(${a}, ${s}, ${l})`;break}default:this.value=x8(Dv(e,n,r))}}}const H$e=ue({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=Qe("color-predefine"),{currentColor:n}=ht(IW),r=F(o(t.colors,t.color));Ve(()=>n.value,a=>{const s=new Ey;s.fromString(a),r.value.forEach(l=>{l.selected=s.compare(l)})}),Bo(()=>{r.value=o(t.colors,t.color)});function i(a){t.color.fromString(t.colors[a])}function o(a,s){return a.map(l=>{const u=new Ey;return u.enableAlpha=t.enableAlpha,u.format="rgba",u.fromString(l),u.selected=u.value===s.value,u})}return{rgbaColors:r,handleSelect:i,ns:e}}});function W$e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.b())},[J("div",{class:j(t.ns.e("colors"))},[(R(!0),G(ct,null,Wt(t.rgbaColors,(a,s)=>(R(),G("div",{key:t.colors[s],class:j([t.ns.e("color-selector"),t.ns.is("alpha",a._alpha<100),{selected:a.selected}]),onClick:l=>t.handleSelect(s)},[J("div",{style:mt({backgroundColor:a.value})},null,4)],10,["onClick"]))),128))],2)],2)}var U$e=Ge(H$e,[["render",W$e],["__file","predefine.vue"]]);const q$e=ue({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=Qe("color-svpanel"),n=en(),r=F(0),i=F(0),o=F("hsl(0, 100%, 50%)"),a=M(()=>{const u=t.color.get("hue"),c=t.color.get("value");return{hue:u,value:c}});function s(){const u=t.color.get("saturation"),c=t.color.get("value"),d=n.vnode.el,{clientWidth:f,clientHeight:h}=d;i.value=u*f/100,r.value=(100-c)*h/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function l(u){const d=n.vnode.el.getBoundingClientRect(),{clientX:f,clientY:h}=rR(u);let m=f-d.left,g=h-d.top;m=Math.max(0,m),m=Math.min(m,d.width),g=Math.max(0,g),g=Math.min(g,d.height),i.value=m,r.value=g,t.color.set({saturation:m/d.width*100,value:100-g/d.height*100})}return Ve(()=>a.value,()=>{s()}),Bt(()=>{y0(n.vnode.el,{drag:u=>{l(u)},end:u=>{l(u)}}),s()}),{cursorTop:r,cursorLeft:i,background:o,colorValue:a,handleDrag:l,update:s,ns:e}}});function Y$e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.b()),style:mt({backgroundColor:t.background})},[J("div",{class:j(t.ns.e("white"))},null,2),J("div",{class:j(t.ns.e("black"))},null,2),J("div",{class:j(t.ns.e("cursor")),style:mt({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[J("div")],6)],6)}var X$e=Ge(q$e,[["render",Y$e],["__file","sv-panel.vue"]]);const Z$e=ue({name:"ElColorPicker"}),G$e=ue({...Z$e,props:F$e,emits:V$e,setup(t,{expose:e,emit:n}){const r=t,{t:i}=kn(),o=Qe("color"),{formItem:a}=ua(),s=Ni(),l=la(),{inputId:u,isLabeledByFormItem:c}=gu(r,{formItemContext:a}),d=F(),f=F(),h=F(),m=F(),g=F(),y=F(),{isFocused:b,handleFocus:w,handleBlur:O}=Pb(g,{beforeFocus(){return l.value},beforeBlur(ge){var Re;return(Re=m.value)==null?void 0:Re.isFocusInsideContent(ge)},afterBlur(){L(!1),V()}});let S=!0;const x=Sn(new Ey({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue})),C=F(!1),E=F(!1),T=F(""),P=M(()=>!r.modelValue&&!E.value?"transparent":W(x,r.showAlpha)),A=M(()=>!r.modelValue&&!E.value?"":x.value),D=M(()=>c.value?void 0:r.ariaLabel||i("el.colorpicker.defaultLabel")),N=M(()=>c.value?a==null?void 0:a.labelId:void 0),$=M(()=>[o.b("picker"),o.is("disabled",l.value),o.bm("picker",s.value),o.is("focused",b.value)]);function W(ge,Re){if(!(ge instanceof Ey))throw new TypeError("color should be instance of _color Class");const{r:$e,g:Z,b:ce}=ge.toRgb();return Re?`rgba(${$e}, ${Z}, ${ce}, ${ge.get("alpha")/100})`:`rgb(${$e}, ${Z}, ${ce})`}function L(ge){C.value=ge}const I=jo(L,100,{leading:!0});function U(){l.value||L(!0)}function Q(){I(!1),V()}function V(){Ot(()=>{r.modelValue?x.fromString(r.modelValue):(x.value="",Ot(()=>{E.value=!1}))})}function q(){l.value||I(!C.value)}function K(){x.fromString(T.value)}function ie(){const ge=x.value;n(Zt,ge),n("change",ge),r.validateEvent&&(a==null||a.validate("change").catch(Re=>void 0)),I(!1),Ot(()=>{const Re=new Ey({enableAlpha:r.showAlpha,format:r.colorFormat||"",value:r.modelValue});x.compare(Re)||V()})}function oe(){I(!1),n(Zt,null),n("change",null),r.modelValue!==null&&r.validateEvent&&(a==null||a.validate("change").catch(ge=>void 0)),V()}function Se(){!C.value||(Q(),b.value&&re())}function ke(ge){ge.preventDefault(),ge.stopPropagation(),L(!1),V()}function Y(ge){switch(ge.code){case St.enter:case St.space:ge.preventDefault(),ge.stopPropagation(),U(),y.value.focus();break;case St.esc:ke(ge);break}}function re(){g.value.focus()}function te(){g.value.blur()}return Bt(()=>{r.modelValue&&(T.value=A.value)}),Ve(()=>r.modelValue,ge=>{ge?ge&&ge!==x.value&&(S=!1,x.fromString(ge)):E.value=!1}),Ve(()=>[r.colorFormat,r.showAlpha],()=>{x.enableAlpha=r.showAlpha,x.format=r.colorFormat||x.format,x.doOnChange(),n(Zt,x.value)}),Ve(()=>A.value,ge=>{T.value=ge,S&&n("activeChange",ge),S=!0}),Ve(()=>x.value,()=>{!r.modelValue&&!E.value&&(E.value=!0)}),Ve(()=>C.value,()=>{Ot(()=>{var ge,Re,$e;(ge=d.value)==null||ge.update(),(Re=f.value)==null||Re.update(),($e=h.value)==null||$e.update()})}),_n(IW,{currentColor:A}),e({color:x,show:U,hide:Q,focus:re,blur:te}),(ge,Re)=>(R(),we(p(Ui),{ref_key:"popper",ref:m,visible:C.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[p(o).be("picker","panel"),p(o).b("dropdown"),ge.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:ge.teleported,transition:`${p(o).namespace.value}-zoom-in-top`,persistent:"",onHide:$e=>L(!1)},{content:z(()=>[Ht((R(),G("div",{onKeydown:br(ke,["esc"])},[J("div",{class:j(p(o).be("dropdown","main-wrapper"))},[B(B$e,{ref_key:"hue",ref:d,class:"hue-slider",color:p(x),vertical:""},null,8,["color"]),B(X$e,{ref_key:"sv",ref:f,color:p(x)},null,8,["color"])],2),ge.showAlpha?(R(),we(D$e,{key:0,ref_key:"alpha",ref:h,color:p(x)},null,8,["color"])):_e("v-if",!0),ge.predefine?(R(),we(U$e,{key:1,ref:"predefine","enable-alpha":ge.showAlpha,color:p(x),colors:ge.predefine},null,8,["enable-alpha","color","colors"])):_e("v-if",!0),J("div",{class:j(p(o).be("dropdown","btns"))},[J("span",{class:j(p(o).be("dropdown","value"))},[B(p(hi),{ref_key:"inputRef",ref:y,modelValue:T.value,"onUpdate:modelValue":$e=>T.value=$e,"validate-event":!1,size:"small",onKeyup:br(K,["enter"]),onBlur:K},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),B(p(lr),{class:j(p(o).be("dropdown","link-btn")),text:"",size:"small",onClick:oe},{default:z(()=>[qe(je(p(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),B(p(lr),{plain:"",size:"small",class:j(p(o).be("dropdown","btn")),onClick:ie},{default:z(()=>[qe(je(p(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[p(qc),Se]])]),default:z(()=>[J("div",gn({id:p(u),ref_key:"triggerRef",ref:g},ge.$attrs,{class:p($),role:"button","aria-label":p(D),"aria-labelledby":p(N),"aria-description":p(i)("el.colorpicker.description",{color:ge.modelValue||""}),"aria-disabled":p(l),tabindex:p(l)?-1:ge.tabindex,onKeydown:Y,onFocus:p(w),onBlur:p(O)}),[p(l)?(R(),G("div",{key:0,class:j(p(o).be("picker","mask"))},null,2)):_e("v-if",!0),J("div",{class:j(p(o).be("picker","trigger")),onClick:q},[J("span",{class:j([p(o).be("picker","color"),p(o).is("alpha",ge.showAlpha)])},[J("span",{class:j(p(o).be("picker","color-inner")),style:mt({backgroundColor:p(P)})},[Ht(B(p(gt),{class:j([p(o).be("picker","icon"),p(o).is("icon-arrow-down")])},{default:z(()=>[B(p(ld))]),_:1},8,["class"]),[[zn,ge.modelValue||E.value]]),Ht(B(p(gt),{class:j([p(o).be("picker","empty"),p(o).is("icon-close")])},{default:z(()=>[B(p(_a))]),_:1},8,["class"]),[[zn,!ge.modelValue&&!E.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var K$e=Ge(G$e,[["__file","color-picker.vue"]]);const J$e=Vt(K$e),eNe=ue({name:"ElContainer"}),tNe=ue({...eNe,props:{direction:{type:String}},setup(t){const e=t,n=Ji(),r=Qe("container"),i=M(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(a=>{const s=a.type.name;return s==="ElHeader"||s==="ElFooter"}):!1);return(o,a)=>(R(),G("section",{class:j([p(r).b(),p(r).is("vertical",p(i))])},[xe(o.$slots,"default")],2))}});var nNe=Ge(tNe,[["__file","container.vue"]]);const rNe=ue({name:"ElAside"}),iNe=ue({...rNe,props:{width:{type:String,default:null}},setup(t){const e=t,n=Qe("aside"),r=M(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(R(),G("aside",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var BW=Ge(iNe,[["__file","aside.vue"]]);const oNe=ue({name:"ElFooter"}),aNe=ue({...oNe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("footer"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),G("footer",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var FW=Ge(aNe,[["__file","footer.vue"]]);const sNe=ue({name:"ElHeader"}),lNe=ue({...sNe,props:{height:{type:String,default:null}},setup(t){const e=t,n=Qe("header"),r=M(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(R(),G("header",{class:j(p(n).b()),style:mt(p(r))},[xe(i.$slots,"default")],6))}});var VW=Ge(lNe,[["__file","header.vue"]]);const uNe=ue({name:"ElMain"}),cNe=ue({...uNe,setup(t){const e=Qe("main");return(n,r)=>(R(),G("main",{class:j(p(e).b())},[xe(n.$slots,"default")],2))}});var jW=Ge(cNe,[["__file","main.vue"]]);const dNe=Vt(nNe,{Aside:BW,Footer:FW,Header:VW,Main:jW}),fNe=ti(BW),hNe=ti(FW),pNe=ti(VW),gNe=ti(jW);var zW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){var i=r.prototype,o=i.format;i.format=function(a){var s=this,l=this.$locale();if(!this.isValid())return o.bind(this)(a);var u=this.$utils(),c=(a||"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((s.$M+1)/3);case"Do":return l.ordinal(s.$D);case"gggg":return s.weekYear();case"GGGG":return s.isoWeekYear();case"wo":return l.ordinal(s.week(),"W");case"w":case"ww":return u.s(s.week(),d==="w"?1:2,"0");case"W":case"WW":return u.s(s.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return u.s(String(s.$H===0?24:s.$H),d==="k"?1:2,"0");case"X":return Math.floor(s.$d.getTime()/1e3);case"x":return s.$d.getTime();case"z":return"["+s.offsetName()+"]";case"zzz":return"["+s.offsetName("long")+"]";default:return d}});return o.bind(this)(c)}}})})(zW);var mNe=zW.exports,QW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){var n="week",r="year";return function(i,o,a){var s=o.prototype;s.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=a(this).startOf(r).add(1,r).date(u),d=a(this).endOf(n);if(c.isBefore(d))return 1}var f=a(this).startOf(r).date(u).startOf(n).subtract(1,"millisecond"),h=this.diff(f,n,!0);return h<0?a(this).startOf("week").week():Math.ceil(h)},s.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(QW);var vNe=QW.exports,HW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.weekYear=function(){var i=this.month(),o=this.week(),a=this.year();return o===1&&i===11?a+1:i===0&&o>=52?a-1:a}}})})(HW);var yNe=HW.exports,WW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r,i){r.prototype.dayOfYear=function(o){var a=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return o==null?a:this.add(o-a,"day")}}})})(WW);var bNe=WW.exports,UW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(UW);var _Ne=UW.exports,qW={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Mi,function(){return function(n,r){r.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(qW);var ONe=qW.exports;const Kx=Symbol(),wNe=Ye({...Q$,type:{type:Oe(String),default:"date"}}),SNe=["date","dates","year","years","month","months","week","range"],W$=Ye({disabledDate:{type:Oe(Function)},date:{type:Oe(Object),required:!0},minDate:{type:Oe(Object)},maxDate:{type:Oe(Object)},parsedValue:{type:Oe([Object,Array])},rangeState:{type:Oe(Object),default:()=>({endDate:null,selecting:!1})}}),YW=Ye({type:{type:Oe(String),required:!0,values:GCe},dateFormat:String,timeFormat:String}),U$=Ye({unlinkPanels:Boolean,parsedValue:{type:Oe(Array)}}),q$=t=>({type:String,values:SNe,default:t}),xNe=Ye({...YW,parsedValue:{type:Oe([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),im=t=>{if(!ut(t))return!1;const[e,n]=t;return It.isDayjs(e)&&It.isDayjs(n)&&e.isSameOrBefore(n)},Y$=(t,{lang:e,unit:n,unlinkPanels:r})=>{let i;if(ut(t)){let[o,a]=t.map(s=>It(s).locale(e));return r||(a=o.add(1,n)),[o,a]}else t?i=It(t):i=It();return i=i.locale(e),[i,i.add(1,n)]},CNe=(t,e,{columnIndexOffset:n,startDate:r,nextEndDate:i,now:o,unit:a,relativeDateGetter:s,setCellMetadata:l,setRowMetadata:u})=>{for(let c=0;c{const r=It().locale(n).startOf("month").month(e).year(t),i=r.daysInMonth();return ef(i).map(o=>r.add(o,"day").toDate())},b0=(t,e,n,r)=>{const i=It().year(t).month(e).startOf("month"),o=ww(t,e,n).find(a=>!(r!=null&&r(a)));return o?It(o).locale(n):i.locale(n)},qk=(t,e,n)=>{const r=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!ww(r,i,e).every(n))return b0(r,i,e,n);for(let o=0;o<12;o++)if(!ww(r,o,e).every(n))return b0(r,o,e,n);return t},ENe=Ye({...W$,cellClassName:{type:Oe(Function)},showWeekNumber:Boolean,selectionMode:q$("date")}),TNe=["changerange","pick","select"],Yk=(t="")=>["normal","today"].includes(t),kNe=(t,e)=>{const{lang:n}=kn(),r=F(),i=F(),o=F(),a=F(),s=F([[],[],[],[],[],[]]);let l=!1;const u=t.date.$locale().weekStart||7,c=t.date.locale("en").localeData().weekdaysShort().map(V=>V.toLowerCase()),d=M(()=>u>3?7-u:-u),f=M(()=>{const V=t.date.startOf("month");return V.subtract(V.day()||7,"day")}),h=M(()=>c.concat(c).slice(u,u+7)),m=M(()=>fR(p(S)).some(V=>V.isCurrent)),g=M(()=>{const V=t.date.startOf("month"),q=V.day()||7,K=V.daysInMonth(),ie=V.subtract(1,"month").daysInMonth();return{startOfMonthDay:q,dateCountOfMonth:K,dateCountOfLastMonth:ie}}),y=M(()=>t.selectionMode==="dates"?ya(t.parsedValue):[]),b=(V,{count:q,rowIndex:K,columnIndex:ie})=>{const{startOfMonthDay:oe,dateCountOfMonth:Se,dateCountOfLastMonth:ke}=p(g),Y=p(d);if(K>=0&&K<=1){const re=oe+Y<0?7+oe+Y:oe+Y;if(ie+K*7>=re)return V.text=q,!0;V.text=ke-(re-ie%7)+1+K*7,V.type="prev-month"}else return q<=Se?V.text=q:(V.text=q-Se,V.type="next-month"),!0;return!1},w=(V,{columnIndex:q,rowIndex:K},ie)=>{const{disabledDate:oe,cellClassName:Se}=t,ke=p(y),Y=b(V,{count:ie,rowIndex:K,columnIndex:q}),re=V.dayjs.toDate();return V.selected=ke.find(te=>te.isSame(V.dayjs,"day")),V.isSelected=!!V.selected,V.isCurrent=C(V),V.disabled=oe==null?void 0:oe(re),V.customClass=Se==null?void 0:Se(re),Y},O=V=>{if(t.selectionMode==="week"){const[q,K]=t.showWeekNumber?[1,7]:[0,6],ie=Q(V[q+1]);V[q].inRange=ie,V[q].start=ie,V[K].inRange=ie,V[K].end=ie}},S=M(()=>{const{minDate:V,maxDate:q,rangeState:K,showWeekNumber:ie}=t,oe=p(d),Se=p(s),ke="day";let Y=1;if(ie)for(let re=0;re<6;re++)Se[re][0]||(Se[re][0]={type:"week",text:p(f).add(re*7+1,ke).week()});return CNe({row:6,column:7},Se,{startDate:V,columnIndexOffset:ie?1:0,nextEndDate:K.endDate||q||K.selecting&&V||null,now:It().locale(p(n)).startOf(ke),unit:ke,relativeDateGetter:re=>p(f).add(re-oe,ke),setCellMetadata:(...re)=>{w(...re,Y)&&(Y+=1)},setRowMetadata:O}),Se});Ve(()=>t.date,async()=>{var V;(V=p(r))!=null&&V.contains(document.activeElement)&&(await Ot(),await x())});const x=async()=>{var V;return(V=p(i))==null?void 0:V.focus()},C=V=>t.selectionMode==="date"&&Yk(V.type)&&E(V,t.parsedValue),E=(V,q)=>q?It(q).locale(p(n)).isSame(t.date.date(Number(V.text)),"day"):!1,T=(V,q)=>{const K=V*7+(q-(t.showWeekNumber?1:0))-p(d);return p(f).add(K,"day")},P=V=>{var q;if(!t.rangeState.selecting)return;let K=V.target;if(K.tagName==="SPAN"&&(K=(q=K.parentNode)==null?void 0:q.parentNode),K.tagName==="DIV"&&(K=K.parentNode),K.tagName!=="TD")return;const ie=K.parentNode.rowIndex-1,oe=K.cellIndex;p(S)[ie][oe].disabled||(ie!==p(o)||oe!==p(a))&&(o.value=ie,a.value=oe,e("changerange",{selecting:!0,endDate:T(ie,oe)}))},A=V=>!p(m)&&(V==null?void 0:V.text)===1&&V.type==="normal"||V.isCurrent,D=V=>{l||p(m)||t.selectionMode!=="date"||U(V,!0)},N=V=>{!V.target.closest("td")||(l=!0)},$=V=>{!V.target.closest("td")||(l=!1)},W=V=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:V,maxDate:null}),e("select",!0)):(V>=t.minDate?e("pick",{minDate:t.minDate,maxDate:V}):e("pick",{minDate:V,maxDate:t.minDate}),e("select",!1))},L=V=>{const q=V.week(),K=`${V.year()}w${q}`;e("pick",{year:V.year(),week:q,value:K,date:V.startOf("week")})},I=(V,q)=>{const K=q?ya(t.parsedValue).filter(ie=>(ie==null?void 0:ie.valueOf())!==V.valueOf()):ya(t.parsedValue).concat([V]);e("pick",K)},U=(V,q=!1)=>{const K=V.target.closest("td");if(!K)return;const ie=K.parentNode.rowIndex-1,oe=K.cellIndex,Se=p(S)[ie][oe];if(Se.disabled||Se.type==="week")return;const ke=T(ie,oe);switch(t.selectionMode){case"range":{W(ke);break}case"date":{e("pick",ke,q);break}case"week":{L(ke);break}case"dates":{I(ke,!!Se.selected);break}}},Q=V=>{if(t.selectionMode!=="week")return!1;let q=t.date.startOf("day");if(V.type==="prev-month"&&(q=q.subtract(1,"month")),V.type==="next-month"&&(q=q.add(1,"month")),q=q.date(Number.parseInt(V.text,10)),t.parsedValue&&!Array.isArray(t.parsedValue)){const K=(t.parsedValue.day()-u+7)%7-1;return t.parsedValue.subtract(K,"day").isSame(q,"day")}return!1};return{WEEKS:h,rows:S,tbodyRef:r,currentCellRef:i,focus:x,isCurrent:C,isWeekActive:Q,isSelectedCell:A,handlePickDate:U,handleMouseUp:$,handleMouseDown:N,handleMouseMove:P,handleFocus:D}},PNe=(t,{isCurrent:e,isWeekActive:n})=>{const r=Qe("date-table"),{t:i}=kn(),o=M(()=>[r.b(),{"is-week-mode":t.selectionMode==="week"}]),a=M(()=>i("el.datepicker.dateTablePrompt")),s=M(()=>i("el.datepicker.week"));return{tableKls:o,tableLabel:a,weekLabel:s,getCellClasses:c=>{const d=[];return Yk(c.type)&&!c.disabled?(d.push("available"),c.type==="today"&&d.push("today")):d.push(c.type),e(c)&&d.push("current"),c.inRange&&(Yk(c.type)||t.selectionMode==="week")&&(d.push("in-range"),c.start&&d.push("start-date"),c.end&&d.push("end-date")),c.disabled&&d.push("disabled"),c.selected&&d.push("selected"),c.customClass&&d.push(c.customClass),d.join(" ")},getRowKls:c=>[r.e("row"),{current:n(c)}],t:i}},ANe=Ye({cell:{type:Oe(Object)}});var X$=ue({name:"ElDatePickerCell",props:ANe,setup(t){const e=Qe("date-table-cell"),{slots:n}=ht(Kx);return()=>{const{cell:r}=t;return xe(n,"default",{...r},()=>{var i;return[B("div",{class:e.b()},[B("span",{class:e.e("text")},[(i=r==null?void 0:r.renderText)!=null?i:r==null?void 0:r.text])])]})}}});const MNe=ue({__name:"basic-date-table",props:ENe,emits:TNe,setup(t,{expose:e,emit:n}){const r=t,{WEEKS:i,rows:o,tbodyRef:a,currentCellRef:s,focus:l,isCurrent:u,isWeekActive:c,isSelectedCell:d,handlePickDate:f,handleMouseUp:h,handleMouseDown:m,handleMouseMove:g,handleFocus:y}=kNe(r,n),{tableLabel:b,tableKls:w,weekLabel:O,getCellClasses:S,getRowKls:x,t:C}=PNe(r,{isCurrent:u,isWeekActive:c});return e({focus:l}),(E,T)=>(R(),G("table",{"aria-label":p(b),class:j(p(w)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:p(f),onMousemove:p(g),onMousedown:Pt(p(m),["prevent"]),onMouseup:p(h)},[J("tbody",{ref_key:"tbodyRef",ref:a},[J("tr",null,[E.showWeekNumber?(R(),G("th",{key:0,scope:"col"},je(p(O)),1)):_e("v-if",!0),(R(!0),G(ct,null,Wt(p(i),(P,A)=>(R(),G("th",{key:A,"aria-label":p(C)("el.datepicker.weeksFull."+P),scope:"col"},je(p(C)("el.datepicker.weeks."+P)),9,["aria-label"]))),128))]),(R(!0),G(ct,null,Wt(p(o),(P,A)=>(R(),G("tr",{key:A,class:j(p(x)(P[1]))},[(R(!0),G(ct,null,Wt(P,(D,N)=>(R(),G("td",{key:`${A}.${N}`,ref_for:!0,ref:$=>p(d)(D)&&(s.value=$),class:j(p(S)(D)),"aria-current":D.isCurrent?"date":void 0,"aria-selected":D.isCurrent,tabindex:p(d)(D)?0:-1,onFocus:p(y)},[B(p(X$),{cell:D},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var Xk=Ge(MNe,[["__file","basic-date-table.vue"]]);const RNe=Ye({...W$,selectionMode:q$("month")}),$Ne=ue({__name:"basic-month-table",props:RNe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=Qe("month-table"),{t:o,lang:a}=kn(),s=F(),l=F(),u=F(r.date.locale("en").localeData().monthsShort().map(O=>O.toLowerCase())),c=F([[],[],[]]),d=F(),f=F(),h=M(()=>{var O,S;const x=c.value,C=It().locale(a.value).startOf("month");for(let E=0;E<3;E++){const T=x[E];for(let P=0;P<4;P++){const A=T[P]||(T[P]={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});A.type="normal";const D=E*4+P,N=r.date.startOf("year").month(D),$=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&N.isSameOrAfter(r.minDate,"month")&&$&&N.isSameOrBefore($,"month"))||!!(r.minDate&&N.isSameOrBefore(r.minDate,"month")&&$&&N.isSameOrAfter($,"month")),(O=r.minDate)!=null&&O.isSameOrAfter($)?(A.start=!!($&&N.isSame($,"month")),A.end=r.minDate&&N.isSame(r.minDate,"month")):(A.start=!!(r.minDate&&N.isSame(r.minDate,"month")),A.end=!!($&&N.isSame($,"month"))),C.isSame(N)&&(A.type="today"),A.text=D,A.disabled=((S=r.disabledDate)==null?void 0:S.call(r,N.toDate()))||!1}}return x}),m=()=>{var O;(O=l.value)==null||O.focus()},g=O=>{const S={},x=r.date.year(),C=new Date,E=O.text;return S.disabled=r.disabledDate?ww(x,E,a.value).every(r.disabledDate):!1,S.current=ya(r.parsedValue).findIndex(T=>It.isDayjs(T)&&T.year()===x&&T.month()===E)>=0,S.today=C.getFullYear()===x&&C.getMonth()===E,O.inRange&&(S["in-range"]=!0,O.start&&(S["start-date"]=!0),O.end&&(S["end-date"]=!0)),S},y=O=>{const S=r.date.year(),x=O.text;return ya(r.date).findIndex(C=>C.year()===S&&C.month()===x)>=0},b=O=>{var S;if(!r.rangeState.selecting)return;let x=O.target;if(x.tagName==="SPAN"&&(x=(S=x.parentNode)==null?void 0:S.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const C=x.parentNode.rowIndex,E=x.cellIndex;h.value[C][E].disabled||(C!==d.value||E!==f.value)&&(d.value=C,f.value=E,n("changerange",{selecting:!0,endDate:r.date.startOf("year").month(C*4+E)}))},w=O=>{var S;const x=(S=O.target)==null?void 0:S.closest("td");if((x==null?void 0:x.tagName)!=="TD"||Ua(x,"disabled"))return;const C=x.cellIndex,T=x.parentNode.rowIndex*4+C,P=r.date.startOf("year").month(T);if(r.selectionMode==="months"){if(O.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const A=b0(r.date.year(),T,a.value,r.disabledDate),D=Ua(x,"current")?ya(r.parsedValue).filter(N=>(N==null?void 0:N.month())!==A.month()):ya(r.parsedValue).concat([It(A)]);n("pick",D)}else r.selectionMode==="range"?r.rangeState.selecting?(r.minDate&&P>=r.minDate?n("pick",{minDate:r.minDate,maxDate:P}):n("pick",{minDate:P,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:P,maxDate:null}),n("select",!0)):n("pick",T)};return Ve(()=>r.date,async()=>{var O,S;(O=s.value)!=null&&O.contains(document.activeElement)&&(await Ot(),(S=l.value)==null||S.focus())}),e({focus:m}),(O,S)=>(R(),G("table",{role:"grid","aria-label":p(o)("el.datepicker.monthTablePrompt"),class:j(p(i).b()),onClick:w,onMousemove:b},[J("tbody",{ref_key:"tbodyRef",ref:s},[(R(!0),G(ct,null,Wt(p(h),(x,C)=>(R(),G("tr",{key:C},[(R(!0),G(ct,null,Wt(x,(E,T)=>(R(),G("td",{key:T,ref_for:!0,ref:P=>y(E)&&(l.value=P),class:j(g(E)),"aria-selected":`${y(E)}`,"aria-label":p(o)(`el.datepicker.month${+E.text+1}`),tabindex:y(E)?0:-1,onKeydown:[br(Pt(w,["prevent","stop"]),["space"]),br(Pt(w,["prevent","stop"]),["enter"])]},[B(p(X$),{cell:{...E,renderText:p(o)("el.datepicker.months."+u.value[E.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Zk=Ge($Ne,[["__file","basic-month-table.vue"]]);const NNe=Ye({...W$,selectionMode:q$("year")}),DNe=ue({__name:"basic-year-table",props:NNe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const r=t,i=(S,x)=>{const C=It(String(S)).locale(x).startOf("year"),T=C.endOf("year").dayOfYear();return ef(T).map(P=>C.add(P,"day").toDate())},o=Qe("year-table"),{t:a,lang:s}=kn(),l=F(),u=F(),c=M(()=>Math.floor(r.date.year()/10)*10),d=F([[],[],[]]),f=F(),h=F(),m=M(()=>{var S;const x=d.value,C=It().locale(s.value).startOf("year");for(let E=0;E<3;E++){const T=x[E];for(let P=0;P<4&&!(E*4+P>=10);P++){let A=T[P];A||(A={row:E,column:P,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),A.type="normal";const D=E*4+P+c.value,N=It().year(D),$=r.rangeState.endDate||r.maxDate||r.rangeState.selecting&&r.minDate||null;A.inRange=!!(r.minDate&&N.isSameOrAfter(r.minDate,"year")&&$&&N.isSameOrBefore($,"year"))||!!(r.minDate&&N.isSameOrBefore(r.minDate,"year")&&$&&N.isSameOrAfter($,"year")),(S=r.minDate)!=null&&S.isSameOrAfter($)?(A.start=!!($&&N.isSame($,"year")),A.end=!!(r.minDate&&N.isSame(r.minDate,"year"))):(A.start=!!(r.minDate&&N.isSame(r.minDate,"year")),A.end=!!($&&N.isSame($,"year"))),C.isSame(N)&&(A.type="today"),A.text=D;const L=N.toDate();A.disabled=r.disabledDate&&r.disabledDate(L)||!1,T[P]=A}}return x}),g=()=>{var S;(S=u.value)==null||S.focus()},y=S=>{const x={},C=It().locale(s.value),E=S.text;return x.disabled=r.disabledDate?i(E,s.value).every(r.disabledDate):!1,x.today=C.year()===E,x.current=ya(r.parsedValue).findIndex(T=>T.year()===E)>=0,S.inRange&&(x["in-range"]=!0,S.start&&(x["start-date"]=!0),S.end&&(x["end-date"]=!0)),x},b=S=>{const x=S.text;return ya(r.date).findIndex(C=>C.year()===x)>=0},w=S=>{var x;const C=(x=S.target)==null?void 0:x.closest("td");if(!C||!C.textContent||Ua(C,"disabled"))return;const E=C.cellIndex,P=C.parentNode.rowIndex*4+E+c.value,A=It().year(P);if(r.selectionMode==="range")r.rangeState.selecting?(r.minDate&&A>=r.minDate?n("pick",{minDate:r.minDate,maxDate:A}):n("pick",{minDate:A,maxDate:r.minDate}),n("select",!1)):(n("pick",{minDate:A,maxDate:null}),n("select",!0));else if(r.selectionMode==="years"){if(S.type==="keydown"){n("pick",ya(r.parsedValue),!1);return}const D=qk(A.startOf("year"),s.value,r.disabledDate),N=Ua(C,"current")?ya(r.parsedValue).filter($=>($==null?void 0:$.year())!==P):ya(r.parsedValue).concat([D]);n("pick",N)}else n("pick",P)},O=S=>{var x;if(!r.rangeState.selecting)return;const C=(x=S.target)==null?void 0:x.closest("td");if(!C)return;const E=C.parentNode.rowIndex,T=C.cellIndex;m.value[E][T].disabled||(E!==f.value||T!==h.value)&&(f.value=E,h.value=T,n("changerange",{selecting:!0,endDate:It().year(c.value).add(E*4+T,"year")}))};return Ve(()=>r.date,async()=>{var S,x;(S=l.value)!=null&&S.contains(document.activeElement)&&(await Ot(),(x=u.value)==null||x.focus())}),e({focus:g}),(S,x)=>(R(),G("table",{role:"grid","aria-label":p(a)("el.datepicker.yearTablePrompt"),class:j(p(o).b()),onClick:w,onMousemove:O},[J("tbody",{ref_key:"tbodyRef",ref:l},[(R(!0),G(ct,null,Wt(p(m),(C,E)=>(R(),G("tr",{key:E},[(R(!0),G(ct,null,Wt(C,(T,P)=>(R(),G("td",{key:`${E}_${P}`,ref_for:!0,ref:A=>b(T)&&(u.value=A),class:j(["available",y(T)]),"aria-selected":b(T),"aria-label":String(T.text),tabindex:b(T)?0:-1,onKeydown:[br(Pt(w,["prevent","stop"]),["space"]),br(Pt(w,["prevent","stop"]),["enter"])]},[B(p(X$),{cell:T},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var Gk=Ge(DNe,[["__file","basic-year-table.vue"]]);const LNe=ue({__name:"panel-date-pick",props:xNe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,r=(Me,nt,de)=>!0,i=Qe("picker-panel"),o=Qe("date-picker"),a=mp(),s=Ji(),{t:l,lang:u}=kn(),c=ht("EP_PICKER_BASE"),d=ht(Yx),{shortcuts:f,disabledDate:h,cellClassName:m,defaultTime:g}=c.props,y=er(c.props,"defaultValue"),b=F(),w=F(It().locale(u.value)),O=F(!1);let S=!1;const x=M(()=>It(g).locale(u.value)),C=M(()=>w.value.month()),E=M(()=>w.value.year()),T=F([]),P=F(null),A=F(null),D=Me=>T.value.length>0?r(Me,T.value,n.format||"HH:mm:ss"):!0,N=Me=>g&&!Ie.value&&!O.value&&!S?x.value.year(Me.year()).month(Me.month()).date(Me.date()):re.value?Me.millisecond(0):Me.startOf("day"),$=(Me,...nt)=>{if(!Me)e("pick",Me,...nt);else if(ut(Me)){const de=Me.map(N);e("pick",de,...nt)}else e("pick",N(Me),...nt);P.value=null,A.value=null,O.value=!1,S=!1},W=async(Me,nt)=>{if(q.value==="date"){Me=Me;let de=n.parsedValue?n.parsedValue.year(Me.year()).month(Me.month()).date(Me.date()):Me;D(de)||(de=T.value[0][0].year(Me.year()).month(Me.month()).date(Me.date())),w.value=de,$(de,re.value||nt),n.type==="datetime"&&(await Ot(),Ke())}else q.value==="week"?$(Me.date):q.value==="dates"&&$(Me,!0)},L=Me=>{const nt=Me?"add":"subtract";w.value=w.value[nt](1,"month"),jt("month")},I=Me=>{const nt=w.value,de=Me?"add":"subtract";w.value=U.value==="year"?nt[de](10,"year"):nt[de](1,"year"),jt("year")},U=F("date"),Q=M(()=>{const Me=l("el.datepicker.year");if(U.value==="year"){const nt=Math.floor(E.value/10)*10;return Me?`${nt} ${Me} - ${nt+9} ${Me}`:`${nt} - ${nt+9}`}return`${E.value} ${Me}`}),V=Me=>{const nt=$t(Me.value)?Me.value():Me.value;if(nt){S=!0,$(It(nt).locale(u.value));return}Me.onClick&&Me.onClick({attrs:a,slots:s,emit:e})},q=M(()=>{const{type:Me}=n;return["week","month","months","year","years","dates"].includes(Me)?Me:"date"}),K=M(()=>q.value==="dates"||q.value==="months"||q.value==="years"),ie=M(()=>q.value==="date"?U.value:q.value),oe=M(()=>!!f.length),Se=async(Me,nt)=>{q.value==="month"?(w.value=b0(w.value.year(),Me,u.value,h),$(w.value,!1)):q.value==="months"?$(Me,nt!=null?nt:!0):(w.value=b0(w.value.year(),Me,u.value,h),U.value="date",["month","year","date","week"].includes(q.value)&&($(w.value,!0),await Ot(),Ke())),jt("month")},ke=async(Me,nt)=>{if(q.value==="year"){const de=w.value.startOf("year").year(Me);w.value=qk(de,u.value,h),$(w.value,!1)}else if(q.value==="years")$(Me,nt!=null?nt:!0);else{const de=w.value.year(Me);w.value=qk(de,u.value,h),U.value="month",["month","year","date","week"].includes(q.value)&&($(w.value,!0),await Ot(),Ke())}jt("year")},Y=async Me=>{U.value=Me,await Ot(),Ke()},re=M(()=>n.type==="datetime"||n.type==="datetimerange"),te=M(()=>{const Me=re.value||q.value==="dates",nt=q.value==="years",de=q.value==="months",Pe=U.value==="date",Le=U.value==="year",wt=U.value==="month";return Me&&Pe||nt&&Le||de&&wt}),ge=M(()=>h?n.parsedValue?ut(n.parsedValue)?h(n.parsedValue[0].toDate()):h(n.parsedValue.toDate()):!0:!1),Re=()=>{if(K.value)$(n.parsedValue);else{let Me=n.parsedValue;if(!Me){const nt=It(g).locale(u.value),de=Xe();Me=nt.year(de.year()).month(de.month()).date(de.date())}w.value=Me,$(Me)}},$e=M(()=>h?h(It().locale(u.value).toDate()):!1),Z=()=>{const nt=It().locale(u.value).toDate();O.value=!0,(!h||!h(nt))&&D(nt)&&(w.value=It().locale(u.value),$(w.value))},ce=M(()=>n.timeFormat||eW(n.format)),Te=M(()=>n.dateFormat||JH(n.format)),Ie=M(()=>{if(A.value)return A.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(ce.value)}),ae=M(()=>{if(P.value)return P.value;if(!(!n.parsedValue&&!y.value))return(n.parsedValue||w.value).format(Te.value)}),me=F(!1),Ae=()=>{me.value=!0},X=()=>{me.value=!1},ee=Me=>({hour:Me.hour(),minute:Me.minute(),second:Me.second(),year:Me.year(),month:Me.month(),date:Me.date()}),le=(Me,nt,de)=>{const{hour:Pe,minute:Le,second:wt}=ee(Me),tn=n.parsedValue?n.parsedValue.hour(Pe).minute(Le).second(wt):Me;w.value=tn,$(w.value,!0),de||(me.value=nt)},Ce=Me=>{const nt=It(Me,ce.value).locale(u.value);if(nt.isValid()&&D(nt)){const{year:de,month:Pe,date:Le}=ee(w.value);w.value=nt.year(de).month(Pe).date(Le),A.value=null,me.value=!1,$(w.value,!0)}},fe=Me=>{const nt=It(Me,Te.value).locale(u.value);if(nt.isValid()){if(h&&h(nt.toDate()))return;const{hour:de,minute:Pe,second:Le}=ee(w.value);w.value=nt.hour(de).minute(Pe).second(Le),P.value=null,$(w.value,!0)}},Ee=Me=>It.isDayjs(Me)&&Me.isValid()&&(h?!h(Me.toDate()):!0),be=Me=>ut(Me)?Me.map(nt=>nt.format(n.format)):Me.format(n.format),Be=Me=>It(Me,n.format).locale(u.value),Xe=()=>{const Me=It(y.value).locale(u.value);if(!y.value){const nt=x.value;return It().hour(nt.hour()).minute(nt.minute()).second(nt.second()).locale(u.value)}return Me},Ke=async()=>{var Me;["week","month","year","date"].includes(q.value)&&((Me=b.value)==null||Me.focus(),q.value==="week"&&Dt(St.down))},tt=Me=>{const{code:nt}=Me;[St.up,St.down,St.left,St.right,St.home,St.end,St.pageUp,St.pageDown].includes(nt)&&(Dt(nt),Me.stopPropagation(),Me.preventDefault()),[St.enter,St.space,St.numpadEnter].includes(nt)&&P.value===null&&A.value===null&&(Me.preventDefault(),$(w.value,!1))},Dt=Me=>{var nt;const{up:de,down:Pe,left:Le,right:wt,home:tn,end:De,pageUp:xt,pageDown:qt}=St,ln={year:{[de]:-4,[Pe]:4,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setFullYear(bn.getFullYear()+Ze)},month:{[de]:-4,[Pe]:4,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setMonth(bn.getMonth()+Ze)},week:{[de]:-1,[Pe]:1,[Le]:-1,[wt]:1,offset:(bn,Ze)=>bn.setDate(bn.getDate()+Ze*7)},date:{[de]:-7,[Pe]:7,[Le]:-1,[wt]:1,[tn]:bn=>-bn.getDay(),[De]:bn=>-bn.getDay()+6,[xt]:bn=>-new Date(bn.getFullYear(),bn.getMonth(),0).getDate(),[qt]:bn=>new Date(bn.getFullYear(),bn.getMonth()+1,0).getDate(),offset:(bn,Ze)=>bn.setDate(bn.getDate()+Ze)}},nn=w.value.toDate();for(;Math.abs(w.value.diff(nn,"year",!0))<1;){const bn=ln[ie.value];if(!bn)return;if(bn.offset(nn,$t(bn[Me])?bn[Me](nn):(nt=bn[Me])!=null?nt:0),h&&h(nn))break;const Ze=It(nn).locale(u.value);w.value=Ze,e("pick",Ze,!0);break}},jt=Me=>{e("panel-change",w.value.toDate(),Me,U.value)};return Ve(()=>q.value,Me=>{if(["month","year"].includes(Me)){U.value=Me;return}else if(Me==="years"){U.value="year";return}else if(Me==="months"){U.value="month";return}U.value="date"},{immediate:!0}),Ve(()=>U.value,()=>{d==null||d.updatePopper()}),Ve(()=>y.value,Me=>{Me&&(w.value=Xe())},{immediate:!0}),Ve(()=>n.parsedValue,Me=>{if(Me){if(K.value||Array.isArray(Me))return;w.value=Me}else w.value=Xe()},{immediate:!0}),e("set-picker-option",["isValidValue",Ee]),e("set-picker-option",["formatToString",be]),e("set-picker-option",["parseUserInput",Be]),e("set-picker-option",["handleFocusPicker",Ke]),(Me,nt)=>(R(),G("div",{class:j([p(i).b(),p(o).b(),{"has-sidebar":Me.$slots.sidebar||p(oe),"has-time":p(re)}])},[J("div",{class:j(p(i).e("body-wrapper"))},[xe(Me.$slots,"sidebar",{class:j(p(i).e("sidebar"))}),p(oe)?(R(),G("div",{key:0,class:j(p(i).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(f),(de,Pe)=>(R(),G("button",{key:Pe,type:"button",class:j(p(i).e("shortcut")),onClick:Le=>V(de)},je(de.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(i).e("body"))},[p(re)?(R(),G("div",{key:0,class:j(p(o).e("time-header"))},[J("span",{class:j(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectDate"),"model-value":p(ae),size:"small","validate-event":!1,onInput:de=>P.value=de,onChange:fe},null,8,["placeholder","model-value","onInput"])],2),Ht((R(),G("span",{class:j(p(o).e("editor-wrap"))},[B(p(hi),{placeholder:p(l)("el.datepicker.selectTime"),"model-value":p(Ie),size:"small","validate-event":!1,onFocus:Ae,onInput:de=>A.value=de,onChange:Ce},null,8,["placeholder","model-value","onInput"]),B(p(Ow),{visible:me.value,format:p(ce),"parsed-value":w.value,onPick:le},null,8,["visible","format","parsed-value"])],2)),[[p(qc),X]])],2)):_e("v-if",!0),Ht(J("div",{class:j([p(o).e("header"),(U.value==="year"||U.value==="month")&&p(o).e("header--bordered")])},[J("span",{class:j(p(o).e("prev-btn"))},[J("button",{type:"button","aria-label":p(l)("el.datepicker.prevYear"),class:j(["d-arrow-left",p(i).e("icon-btn")]),onClick:de=>I(!1)},[xe(Me.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["aria-label","onClick"]),Ht(J("button",{type:"button","aria-label":p(l)("el.datepicker.prevMonth"),class:j([p(i).e("icon-btn"),"arrow-left"]),onClick:de=>L(!1)},[xe(Me.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["aria-label","onClick"]),[[zn,U.value==="date"]])],2),J("span",{role:"button",class:j(p(o).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:br(de=>Y("year"),["enter"]),onClick:de=>Y("year")},je(p(Q)),43,["onKeydown","onClick"]),Ht(J("span",{role:"button","aria-live":"polite",tabindex:"0",class:j([p(o).e("header-label"),{active:U.value==="month"}]),onKeydown:br(de=>Y("month"),["enter"]),onClick:de=>Y("month")},je(p(l)(`el.datepicker.month${p(C)+1}`)),43,["onKeydown","onClick"]),[[zn,U.value==="date"]]),J("span",{class:j(p(o).e("next-btn"))},[Ht(J("button",{type:"button","aria-label":p(l)("el.datepicker.nextMonth"),class:j([p(i).e("icon-btn"),"arrow-right"]),onClick:de=>L(!0)},[xe(Me.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["aria-label","onClick"]),[[zn,U.value==="date"]]),J("button",{type:"button","aria-label":p(l)("el.datepicker.nextYear"),class:j([p(i).e("icon-btn"),"d-arrow-right"]),onClick:de=>I(!0)},[xe(Me.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[zn,U.value!=="time"]]),J("div",{class:j(p(i).e("content")),onKeydown:tt},[U.value==="date"?(R(),we(Xk,{key:0,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"parsed-value":Me.parsedValue,"disabled-date":p(h),"cell-class-name":p(m),onPick:W},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):_e("v-if",!0),U.value==="year"?(R(),we(Gk,{key:1,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"disabled-date":p(h),"parsed-value":Me.parsedValue,onPick:ke},null,8,["selection-mode","date","disabled-date","parsed-value"])):_e("v-if",!0),U.value==="month"?(R(),we(Zk,{key:2,ref_key:"currentViewRef",ref:b,"selection-mode":p(q),date:w.value,"parsed-value":Me.parsedValue,"disabled-date":p(h),onPick:Se},null,8,["selection-mode","date","parsed-value","disabled-date"])):_e("v-if",!0)],34)],2)],2),Ht(J("div",{class:j(p(i).e("footer"))},[Ht(B(p(lr),{text:"",size:"small",class:j(p(i).e("link-btn")),disabled:p($e),onClick:Z},{default:z(()=>[qe(je(p(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[zn,!p(K)]]),B(p(lr),{plain:"",size:"small",class:j(p(i).e("link-btn")),disabled:p(ge),onClick:Re},{default:z(()=>[qe(je(p(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[zn,p(te)]])],2))}});var INe=Ge(LNe,[["__file","panel-date-pick.vue"]]);const BNe=Ye({...YW,...U$,visible:Boolean}),XW=t=>{const{emit:e}=en(),n=mp(),r=Ji();return o=>{const a=$t(o.value)?o.value():o.value;if(a){e("pick",[It(a[0]).locale(t.value),It(a[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:r,emit:e})}},ZW=(t,{defaultValue:e,leftDate:n,rightDate:r,unit:i,onParsedValueChanged:o})=>{const{emit:a}=en(),{pickerNs:s}=ht(Kx),l=Qe("date-range-picker"),{t:u,lang:c}=kn(),d=XW(c),f=F(),h=F(),m=F({endDate:null,selecting:!1}),g=S=>{m.value=S},y=(S=!1)=>{const x=p(f),C=p(h);im([x,C])&&a("pick",[x,C],S)},b=S=>{m.value.selecting=S,S||(m.value.endDate=null)},w=S=>{if(ut(S)&&S.length===2){const[x,C]=S;f.value=x,n.value=x,h.value=C,o(p(f),p(h))}else O()},O=()=>{const[S,x]=Y$(p(e),{lang:p(c),unit:i,unlinkPanels:t.unlinkPanels});f.value=void 0,h.value=void 0,n.value=S,r.value=x};return Ve(e,S=>{S&&O()},{immediate:!0}),Ve(()=>t.parsedValue,w,{immediate:!0}),{minDate:f,maxDate:h,rangeState:m,lang:c,ppNs:s,drpNs:l,handleChangeRange:g,handleRangeConfirm:y,handleShortcutClick:d,onSelect:b,onReset:w,t:u}},cO="month",FNe=ue({__name:"panel-date-range",props:BNe,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,r=ht("EP_PICKER_BASE"),{disabledDate:i,cellClassName:o,defaultTime:a,clearable:s}=r.props,l=er(r.props,"format"),u=er(r.props,"shortcuts"),c=er(r.props,"defaultValue"),{lang:d}=kn(),f=F(It().locale(d.value)),h=F(It().locale(d.value).add(1,cO)),{minDate:m,maxDate:g,rangeState:y,ppNs:b,drpNs:w,handleChangeRange:O,handleRangeConfirm:S,handleShortcutClick:x,onSelect:C,onReset:E,t:T}=ZW(n,{defaultValue:c,leftDate:f,rightDate:h,unit:cO,onParsedValueChanged:nt});Ve(()=>n.visible,de=>{!de&&y.value.selecting&&(E(n.parsedValue),C(!1))});const P=F({min:null,max:null}),A=F({min:null,max:null}),D=M(()=>`${f.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${f.value.month()+1}`)}`),N=M(()=>`${h.value.year()} ${T("el.datepicker.year")} ${T(`el.datepicker.month${h.value.month()+1}`)}`),$=M(()=>f.value.year()),W=M(()=>f.value.month()),L=M(()=>h.value.year()),I=M(()=>h.value.month()),U=M(()=>!!u.value.length),Q=M(()=>P.value.min!==null?P.value.min:m.value?m.value.format(oe.value):""),V=M(()=>P.value.max!==null?P.value.max:g.value||m.value?(g.value||m.value).format(oe.value):""),q=M(()=>A.value.min!==null?A.value.min:m.value?m.value.format(ie.value):""),K=M(()=>A.value.max!==null?A.value.max:g.value||m.value?(g.value||m.value).format(ie.value):""),ie=M(()=>n.timeFormat||eW(l.value)),oe=M(()=>n.dateFormat||JH(l.value)),Se=de=>im(de)&&(i?!i(de[0].toDate())&&!i(de[1].toDate()):!0),ke=()=>{f.value=f.value.subtract(1,"year"),n.unlinkPanels||(h.value=f.value.add(1,"month")),ce("year")},Y=()=>{f.value=f.value.subtract(1,"month"),n.unlinkPanels||(h.value=f.value.add(1,"month")),ce("month")},re=()=>{n.unlinkPanels?h.value=h.value.add(1,"year"):(f.value=f.value.add(1,"year"),h.value=f.value.add(1,"month")),ce("year")},te=()=>{n.unlinkPanels?h.value=h.value.add(1,"month"):(f.value=f.value.add(1,"month"),h.value=f.value.add(1,"month")),ce("month")},ge=()=>{f.value=f.value.add(1,"year"),ce("year")},Re=()=>{f.value=f.value.add(1,"month"),ce("month")},$e=()=>{h.value=h.value.subtract(1,"year"),ce("year")},Z=()=>{h.value=h.value.subtract(1,"month"),ce("month")},ce=de=>{e("panel-change",[f.value.toDate(),h.value.toDate()],de)},Te=M(()=>{const de=(W.value+1)%12,Pe=W.value+1>=12?1:0;return n.unlinkPanels&&new Date($.value+Pe,de)n.unlinkPanels&&L.value*12+I.value-($.value*12+W.value+1)>=12),ae=M(()=>!(m.value&&g.value&&!y.value.selecting&&im([m.value,g.value]))),me=M(()=>n.type==="datetime"||n.type==="datetimerange"),Ae=(de,Pe)=>{if(!!de)return a?It(a[Pe]||a).locale(d.value).year(de.year()).month(de.month()).date(de.date()):de},X=(de,Pe=!0)=>{const Le=de.minDate,wt=de.maxDate,tn=Ae(Le,0),De=Ae(wt,1);g.value===De&&m.value===tn||(e("calendar-change",[Le.toDate(),wt&&wt.toDate()]),g.value=De,m.value=tn,!(!Pe||me.value)&&S())},ee=F(!1),le=F(!1),Ce=()=>{ee.value=!1},fe=()=>{le.value=!1},Ee=(de,Pe)=>{P.value[Pe]=de;const Le=It(de,oe.value).locale(d.value);if(Le.isValid()){if(i&&i(Le.toDate()))return;Pe==="min"?(f.value=Le,m.value=(m.value||f.value).year(Le.year()).month(Le.month()).date(Le.date()),!n.unlinkPanels&&(!g.value||g.value.isBefore(m.value))&&(h.value=Le.add(1,"month"),g.value=m.value.add(1,"month"))):(h.value=Le,g.value=(g.value||h.value).year(Le.year()).month(Le.month()).date(Le.date()),!n.unlinkPanels&&(!m.value||m.value.isAfter(g.value))&&(f.value=Le.subtract(1,"month"),m.value=g.value.subtract(1,"month")))}},be=(de,Pe)=>{P.value[Pe]=null},Be=(de,Pe)=>{A.value[Pe]=de;const Le=It(de,ie.value).locale(d.value);Le.isValid()&&(Pe==="min"?(ee.value=!0,m.value=(m.value||f.value).hour(Le.hour()).minute(Le.minute()).second(Le.second())):(le.value=!0,g.value=(g.value||h.value).hour(Le.hour()).minute(Le.minute()).second(Le.second()),h.value=g.value))},Xe=(de,Pe)=>{A.value[Pe]=null,Pe==="min"?(f.value=m.value,ee.value=!1,(!g.value||g.value.isBefore(m.value))&&(g.value=m.value)):(h.value=g.value,le.value=!1,g.value&&g.value.isBefore(m.value)&&(m.value=g.value))},Ke=(de,Pe,Le)=>{A.value.min||(de&&(f.value=de,m.value=(m.value||f.value).hour(de.hour()).minute(de.minute()).second(de.second())),Le||(ee.value=Pe),(!g.value||g.value.isBefore(m.value))&&(g.value=m.value,h.value=de))},tt=(de,Pe,Le)=>{A.value.max||(de&&(h.value=de,g.value=(g.value||h.value).hour(de.hour()).minute(de.minute()).second(de.second())),Le||(le.value=Pe),g.value&&g.value.isBefore(m.value)&&(m.value=g.value))},Dt=()=>{f.value=Y$(p(c),{lang:p(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],h.value=f.value.add(1,"month"),g.value=void 0,m.value=void 0,e("pick",null)},jt=de=>ut(de)?de.map(Pe=>Pe.format(l.value)):de.format(l.value),Me=de=>ut(de)?de.map(Pe=>It(Pe,l.value).locale(d.value)):It(de,l.value).locale(d.value);function nt(de,Pe){if(n.unlinkPanels&&Pe){const Le=(de==null?void 0:de.year())||0,wt=(de==null?void 0:de.month())||0,tn=Pe.year(),De=Pe.month();h.value=Le===tn&&wt===De?Pe.add(1,cO):Pe}else h.value=f.value.add(1,cO),Pe&&(h.value=h.value.hour(Pe.hour()).minute(Pe.minute()).second(Pe.second()))}return e("set-picker-option",["isValidValue",Se]),e("set-picker-option",["parseUserInput",Me]),e("set-picker-option",["formatToString",jt]),e("set-picker-option",["handleClear",Dt]),(de,Pe)=>(R(),G("div",{class:j([p(b).b(),p(w).b(),{"has-sidebar":de.$slots.sidebar||p(U),"has-time":p(me)}])},[J("div",{class:j(p(b).e("body-wrapper"))},[xe(de.$slots,"sidebar",{class:j(p(b).e("sidebar"))}),p(U)?(R(),G("div",{key:0,class:j(p(b).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(u),(Le,wt)=>(R(),G("button",{key:wt,type:"button",class:j(p(b).e("shortcut")),onClick:tn=>p(x)(Le)},je(Le.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(b).e("body"))},[p(me)?(R(),G("div",{key:0,class:j(p(w).e("time-header"))},[J("span",{class:j(p(w).e("editors-wrap"))},[J("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startDate"),class:j(p(w).e("editor")),"model-value":p(Q),"validate-event":!1,onInput:Le=>Ee(Le,"min"),onChange:Le=>be(Le,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),Ht((R(),G("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.startTime"),"model-value":p(q),"validate-event":!1,onFocus:Le=>ee.value=!0,onInput:Le=>Be(Le,"min"),onChange:Le=>Xe(Le,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),B(p(Ow),{visible:ee.value,format:p(ie),"datetime-role":"start","parsed-value":f.value,onPick:Ke},null,8,["visible","format","parsed-value"])],2)),[[p(qc),Ce]])],2),J("span",null,[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})]),J("span",{class:j([p(w).e("editors-wrap"),"is-right"])},[J("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endDate"),"model-value":p(V),readonly:!p(m),"validate-event":!1,onInput:Le=>Ee(Le,"max"),onChange:Le=>be(Le,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),Ht((R(),G("span",{class:j(p(w).e("time-picker-wrap"))},[B(p(hi),{size:"small",class:j(p(w).e("editor")),disabled:p(y).selecting,placeholder:p(T)("el.datepicker.endTime"),"model-value":p(K),readonly:!p(m),"validate-event":!1,onFocus:Le=>p(m)&&(le.value=!0),onInput:Le=>Be(Le,"max"),onChange:Le=>Xe(Le,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),B(p(Ow),{"datetime-role":"end",visible:le.value,format:p(ie),"parsed-value":h.value,onPick:tt},null,8,["visible","format","parsed-value"])],2)),[[p(qc),fe]])],2)],2)):_e("v-if",!0),J("div",{class:j([[p(b).e("content"),p(w).e("content")],"is-left"])},[J("div",{class:j(p(w).e("header"))},[J("button",{type:"button",class:j([p(b).e("icon-btn"),"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:ke},[xe(de.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:j([p(b).e("icon-btn"),"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:Y},[xe(de.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["aria-label"]),de.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(Ie),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-right"]),"aria-label":p(T)("el.datepicker.nextYear"),onClick:ge},[xe(de.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),de.unlinkPanels?(R(),G("button",{key:1,type:"button",disabled:!p(Te),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Te)}],"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:Re},[xe(de.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),J("div",null,je(p(D)),1)],2),B(Xk,{"selection-mode":"range",date:f.value,"min-date":p(m),"max-date":p(g),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:X,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),J("div",{class:j([[p(b).e("content"),p(w).e("content")],"is-right"])},[J("div",{class:j(p(w).e("header"))},[de.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(Ie),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Ie)}],"d-arrow-left"]),"aria-label":p(T)("el.datepicker.prevYear"),onClick:$e},[xe(de.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),de.unlinkPanels?(R(),G("button",{key:1,type:"button",disabled:!p(Te),class:j([[p(b).e("icon-btn"),{"is-disabled":!p(Te)}],"arrow-left"]),"aria-label":p(T)("el.datepicker.prevMonth"),onClick:Z},[xe(de.$slots,"prev-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})])],10,["disabled","aria-label"])):_e("v-if",!0),J("button",{type:"button","aria-label":p(T)("el.datepicker.nextYear"),class:j([p(b).e("icon-btn"),"d-arrow-right"]),onClick:re},[xe(de.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["aria-label"]),J("button",{type:"button",class:j([p(b).e("icon-btn"),"arrow-right"]),"aria-label":p(T)("el.datepicker.nextMonth"),onClick:te},[xe(de.$slots,"next-month",{},()=>[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})])],10,["aria-label"]),J("div",null,je(p(N)),1)],2),B(Xk,{"selection-mode":"range",date:h.value,"min-date":p(m),"max-date":p(g),"range-state":p(y),"disabled-date":p(i),"cell-class-name":p(o),onChangerange:p(O),onPick:X,onSelect:p(C)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),p(me)?(R(),G("div",{key:0,class:j(p(b).e("footer"))},[p(s)?(R(),we(p(lr),{key:0,text:"",size:"small",class:j(p(b).e("link-btn")),onClick:Dt},{default:z(()=>[qe(je(p(T)("el.datepicker.clear")),1)]),_:1},8,["class"])):_e("v-if",!0),B(p(lr),{plain:"",size:"small",class:j(p(b).e("link-btn")),disabled:p(ae),onClick:Le=>p(S)(!1)},{default:z(()=>[qe(je(p(T)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):_e("v-if",!0)],2))}});var VNe=Ge(FNe,[["__file","panel-date-range.vue"]]);const jNe=Ye({...U$}),zNe=["pick","set-picker-option","calendar-change"],QNe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:r}=kn(),i=()=>{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")},a=()=>{e.value=e.value.add(1,"year")},s=()=>{n.value=n.value.subtract(1,"year")},l=M(()=>`${e.value.year()} ${r("el.datepicker.year")}`),u=M(()=>`${n.value.year()} ${r("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:i,rightNextYear:o,leftNextYear:a,rightPrevYear:s,leftLabel:l,rightLabel:u,leftYear:c,rightYear:d}},dO="year",HNe=ue({name:"DatePickerMonthRange"}),WNe=ue({...HNe,props:jNe,emits:zNe,setup(t,{emit:e}){const n=t,{lang:r}=kn(),i=ht("EP_PICKER_BASE"),{shortcuts:o,disabledDate:a}=i.props,s=er(i.props,"format"),l=er(i.props,"defaultValue"),u=F(It().locale(r.value)),c=F(It().locale(r.value).add(1,dO)),{minDate:d,maxDate:f,rangeState:h,ppNs:m,drpNs:g,handleChangeRange:y,handleRangeConfirm:b,handleShortcutClick:w,onSelect:O}=ZW(n,{defaultValue:l,leftDate:u,rightDate:c,unit:dO,onParsedValueChanged:Q}),S=M(()=>!!o.length),{leftPrevYear:x,rightNextYear:C,leftNextYear:E,rightPrevYear:T,leftLabel:P,rightLabel:A,leftYear:D,rightYear:N}=QNe({unlinkPanels:er(n,"unlinkPanels"),leftDate:u,rightDate:c}),$=M(()=>n.unlinkPanels&&N.value>D.value+1),W=(V,q=!0)=>{const K=V.minDate,ie=V.maxDate;f.value===ie&&d.value===K||(e("calendar-change",[K.toDate(),ie&&ie.toDate()]),f.value=ie,d.value=K,q&&b())},L=()=>{u.value=Y$(p(l),{lang:p(r),unit:"year",unlinkPanels:n.unlinkPanels})[0],c.value=u.value.add(1,"year"),e("pick",null)},I=V=>ut(V)?V.map(q=>q.format(s.value)):V.format(s.value),U=V=>ut(V)?V.map(q=>It(q,s.value).locale(r.value)):It(V,s.value).locale(r.value);function Q(V,q){if(n.unlinkPanels&&q){const K=(V==null?void 0:V.year())||0,ie=q.year();c.value=K===ie?q.add(1,dO):q}else c.value=u.value.add(1,dO)}return e("set-picker-option",["isValidValue",im]),e("set-picker-option",["formatToString",I]),e("set-picker-option",["parseUserInput",U]),e("set-picker-option",["handleClear",L]),(V,q)=>(R(),G("div",{class:j([p(m).b(),p(g).b(),{"has-sidebar":Boolean(V.$slots.sidebar)||p(S)}])},[J("div",{class:j(p(m).e("body-wrapper"))},[xe(V.$slots,"sidebar",{class:j(p(m).e("sidebar"))}),p(S)?(R(),G("div",{key:0,class:j(p(m).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(o),(K,ie)=>(R(),G("button",{key:ie,type:"button",class:j(p(m).e("shortcut")),onClick:oe=>p(w)(K)},je(K.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(m).e("body"))},[J("div",{class:j([[p(m).e("content"),p(g).e("content")],"is-left"])},[J("div",{class:j(p(g).e("header"))},[J("button",{type:"button",class:j([p(m).e("icon-btn"),"d-arrow-left"]),onClick:p(x)},[xe(V.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["onClick"]),V.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p($),class:j([[p(m).e("icon-btn"),{[p(m).is("disabled")]:!p($)}],"d-arrow-right"]),onClick:p(E)},[xe(V.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("div",null,je(p(P)),1)],2),B(Zk,{"selection-mode":"range",date:u.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:W,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),J("div",{class:j([[p(m).e("content"),p(g).e("content")],"is-right"])},[J("div",{class:j(p(g).e("header"))},[V.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p($),class:j([[p(m).e("icon-btn"),{"is-disabled":!p($)}],"d-arrow-left"]),onClick:p(T)},[xe(V.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("button",{type:"button",class:j([p(m).e("icon-btn"),"d-arrow-right"]),onClick:p(C)},[xe(V.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["onClick"]),J("div",null,je(p(A)),1)],2),B(Zk,{"selection-mode":"range",date:c.value,"min-date":p(d),"max-date":p(f),"range-state":p(h),"disabled-date":p(a),onChangerange:p(y),onPick:W,onSelect:p(O)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var UNe=Ge(WNe,[["__file","panel-month-range.vue"]]);const qNe=Ye({...U$}),YNe=["pick","set-picker-option","calendar-change"],XNe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const r=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},i=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},o=()=>{e.value=e.value.add(10,"year")},a=()=>{n.value=n.value.subtract(10,"year")},s=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:r,rightNextYear:i,leftNextYear:o,rightPrevYear:a,leftLabel:s,rightLabel:l,leftYear:u,rightYear:c}},E8="year",ZNe=ue({name:"DatePickerYearRange"}),GNe=ue({...ZNe,props:qNe,emits:YNe,setup(t,{emit:e}){const n=t,{lang:r}=kn(),i=F(It().locale(r.value)),o=F(i.value.add(10,"year")),{pickerNs:a}=ht(Kx),s=Qe("date-range-picker"),l=M(()=>!!W.length),u=M(()=>[a.b(),s.b(),{"has-sidebar":Boolean(Ji().sidebar)||l.value}]),c=M(()=>({content:[a.e("content"),s.e("content"),"is-left"],arrowLeftBtn:[a.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),{[a.is("disabled")]:!x.value},"d-arrow-right"]})),d=M(()=>({content:[a.e("content"),s.e("content"),"is-right"],arrowLeftBtn:[a.e("icon-btn"),{"is-disabled":!x.value},"d-arrow-left"],arrowRightBtn:[a.e("icon-btn"),"d-arrow-right"]})),f=XW(r),{leftPrevYear:h,rightNextYear:m,leftNextYear:g,rightPrevYear:y,leftLabel:b,rightLabel:w,leftYear:O,rightYear:S}=XNe({unlinkPanels:er(n,"unlinkPanels"),leftDate:i,rightDate:o}),x=M(()=>n.unlinkPanels&&S.value>O.value+1),C=F(),E=F(),T=F({endDate:null,selecting:!1}),P=oe=>{T.value=oe},A=(oe,Se=!0)=>{const ke=oe.minDate,Y=oe.maxDate;E.value===Y&&C.value===ke||(e("calendar-change",[ke.toDate(),Y&&Y.toDate()]),E.value=Y,C.value=ke,Se&&D())},D=(oe=!1)=>{im([C.value,E.value])&&e("pick",[C.value,E.value],oe)},N=oe=>{T.value.selecting=oe,oe||(T.value.endDate=null)},$=ht("EP_PICKER_BASE"),{shortcuts:W,disabledDate:L}=$.props,I=er($.props,"format"),U=er($.props,"defaultValue"),Q=()=>{let oe;if(ut(U.value)){const Se=It(U.value[0]);let ke=It(U.value[1]);return n.unlinkPanels||(ke=Se.add(10,E8)),[Se,ke]}else U.value?oe=It(U.value):oe=It();return oe=oe.locale(r.value),[oe,oe.add(10,E8)]};Ve(()=>U.value,oe=>{if(oe){const Se=Q();i.value=Se[0],o.value=Se[1]}},{immediate:!0}),Ve(()=>n.parsedValue,oe=>{if(oe&&oe.length===2)if(C.value=oe[0],E.value=oe[1],i.value=C.value,n.unlinkPanels&&E.value){const Se=C.value.year(),ke=E.value.year();o.value=Se===ke?E.value.add(10,"year"):E.value}else o.value=i.value.add(10,"year");else{const Se=Q();C.value=void 0,E.value=void 0,i.value=Se[0],o.value=Se[1]}},{immediate:!0});const V=oe=>ut(oe)?oe.map(Se=>It(Se,I.value).locale(r.value)):It(oe,I.value).locale(r.value),q=oe=>ut(oe)?oe.map(Se=>Se.format(I.value)):oe.format(I.value),K=oe=>im(oe)&&(L?!L(oe[0].toDate())&&!L(oe[1].toDate()):!0),ie=()=>{const oe=Q();i.value=oe[0],o.value=oe[1],E.value=void 0,C.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",K]),e("set-picker-option",["parseUserInput",V]),e("set-picker-option",["formatToString",q]),e("set-picker-option",["handleClear",ie]),(oe,Se)=>(R(),G("div",{class:j(p(u))},[J("div",{class:j(p(a).e("body-wrapper"))},[xe(oe.$slots,"sidebar",{class:j(p(a).e("sidebar"))}),p(l)?(R(),G("div",{key:0,class:j(p(a).e("sidebar"))},[(R(!0),G(ct,null,Wt(p(W),(ke,Y)=>(R(),G("button",{key:Y,type:"button",class:j(p(a).e("shortcut")),onClick:re=>p(f)(ke)},je(ke.text),11,["onClick"]))),128))],2)):_e("v-if",!0),J("div",{class:j(p(a).e("body"))},[J("div",{class:j(p(c).content)},[J("div",{class:j(p(s).e("header"))},[J("button",{type:"button",class:j(p(c).arrowLeftBtn),onClick:p(h)},[xe(oe.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["onClick"]),oe.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(x),class:j(p(c).arrowRightBtn),onClick:p(g)},[xe(oe.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("div",null,je(p(b)),1)],2),B(Gk,{"selection-mode":"range",date:i.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(L),onChangerange:P,onPick:A,onSelect:N},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),J("div",{class:j(p(d).content)},[J("div",{class:j(p(s).e("header"))},[oe.unlinkPanels?(R(),G("button",{key:0,type:"button",disabled:!p(x),class:j(p(d).arrowLeftBtn),onClick:p(y)},[xe(oe.$slots,"prev-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(vf))]),_:1})])],10,["disabled","onClick"])):_e("v-if",!0),J("button",{type:"button",class:j(p(d).arrowRightBtn),onClick:p(m)},[xe(oe.$slots,"next-year",{},()=>[B(p(gt),null,{default:z(()=>[B(p(yf))]),_:1})])],10,["onClick"]),J("div",null,je(p(w)),1)],2),B(Gk,{"selection-mode":"range",date:o.value,"min-date":C.value,"max-date":E.value,"range-state":T.value,"disabled-date":p(L),onChangerange:P,onPick:A,onSelect:N},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var KNe=Ge(GNe,[["__file","panel-year-range.vue"]]);const JNe=function(t){switch(t){case"daterange":case"datetimerange":return VNe;case"monthrange":return UNe;case"yearrange":return KNe;default:return INe}};It.extend(mW);It.extend(mNe);It.extend(z$);It.extend(vNe);It.extend(yNe);It.extend(bNe);It.extend(_Ne);It.extend(ONe);var eDe=ue({name:"ElDatePicker",install:null,props:wNe,emits:["update:modelValue"],setup(t,{expose:e,emit:n,slots:r}){const i=Qe("picker-panel");_n("ElPopperOptions",Sn(er(t,"popperOptions"))),_n(Kx,{slots:r,pickerNs:i});const o=F();e({focus:(l=!0)=>{var u;(u=o.value)==null||u.focus(l)},handleOpen:()=>{var l;(l=o.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=o.value)==null||l.handleClose()}});const s=l=>{n("update:modelValue",l)};return()=>{var l;const u=(l=t.format)!=null?l:qAe[t.type]||ag,c=JNe(t.type);return B(rW,gn(t,{format:u,type:t.type,ref:o,"onUpdate:modelValue":s}),{default:d=>B(c,d,{"prev-month":r["prev-month"],"next-month":r["next-month"],"prev-year":r["prev-year"],"next-year":r["next-year"]}),"range-separator":r["range-separator"]})}}});const tDe=Vt(eDe),Z$=Symbol("elDescriptions");var Lv=ue({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:ht(Z$,{})}},render(){var t;const e=eEe(this.cell),n=(((t=this.cell)==null?void 0:t.dirs)||[]).map(y=>{const{dir:b,arg:w,modifiers:O,value:S}=y;return[b,S,w,O]}),{border:r,direction:i}=this.descriptions,o=i==="vertical",a=()=>{var y,b,w;return((w=(b=(y=this.cell)==null?void 0:y.children)==null?void 0:b.label)==null?void 0:w.call(b))||e.label},s=()=>{var y,b,w;return(w=(b=(y=this.cell)==null?void 0:y.children)==null?void 0:b.default)==null?void 0:w.call(b)},l=e.span,u=e.rowspan,c=e.align?`is-${e.align}`:"",d=e.labelAlign?`is-${e.labelAlign}`:c,f=e.className,h=e.labelClassName,m={width:pi(e.width),minWidth:pi(e.minWidth)},g=Qe("descriptions");switch(this.type){case"label":return Ht(Et(this.tag,{style:m,class:[g.e("cell"),g.e("label"),g.is("bordered-label",r),g.is("vertical-label",o),d,h],colSpan:o?l:1,rowspan:o?1:u},a()),n);case"content":return Ht(Et(this.tag,{style:m,class:[g.e("cell"),g.e("content"),g.is("bordered-content",r),g.is("vertical-content",o),c,f],colSpan:o?l:l*2-1,rowspan:o?u*2-1:u},s()),n);default:{const y=a();return Ht(Et("td",{style:m,class:[g.e("cell"),c],colSpan:l,rowspan:u},[Dr(y)?void 0:Et("span",{class:[g.e("label"),h]},y),Et("span",{class:[g.e("content"),f]},s())]),n)}}}});const nDe=Ye({row:{type:Oe(Array),default:()=>[]}}),rDe=ue({name:"ElDescriptionsRow"}),iDe=ue({...rDe,props:nDe,setup(t){const e=ht(Z$,{});return(n,r)=>p(e).direction==="vertical"?(R(),G(ct,{key:0},[J("tr",null,[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),we(p(Lv),{key:`tr1-${o}`,cell:i,tag:"th",type:"label"},null,8,["cell"]))),128))]),J("tr",null,[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),we(p(Lv),{key:`tr2-${o}`,cell:i,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(R(),G("tr",{key:1},[(R(!0),G(ct,null,Wt(n.row,(i,o)=>(R(),G(ct,{key:`tr3-${o}`},[p(e).border?(R(),G(ct,{key:0},[B(p(Lv),{cell:i,tag:"td",type:"label"},null,8,["cell"]),B(p(Lv),{cell:i,tag:"td",type:"content"},null,8,["cell"])],64)):(R(),we(p(Lv),{key:1,cell:i,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var oDe=Ge(iDe,[["__file","descriptions-row.vue"]]);const aDe=Ye({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:Wi,title:{type:String,default:""},extra:{type:String,default:""}}),sDe=ue({name:"ElDescriptions"}),lDe=ue({...sDe,props:aDe,setup(t){const e=t,n=Qe("descriptions"),r=Ni(),i=Ji();_n(Z$,e);const o=M(()=>[n.b(),n.m(r.value)]),a=(l,u,c,d=!1)=>(l.props||(l.props={}),u>c&&(l.props.span=c),d&&(l.props.span=u),l),s=()=>{if(!i.default)return[];const l=Kd(i.default()).filter(m=>{var g;return((g=m==null?void 0:m.type)==null?void 0:g.name)==="ElDescriptionsItem"}),u=[];let c=[],d=e.column,f=0;const h=[];return l.forEach((m,g)=>{var y,b,w;const O=((y=m.props)==null?void 0:y.span)||1,S=((b=m.props)==null?void 0:b.rowspan)||1,x=u.length;if(h[x]||(h[x]=0),S>1)for(let C=1;C0&&(d-=h[x],h[x]=0),gd?d:O),g===l.length-1){const C=e.column-f%e.column;c.push(a(m,C,d,!0)),u.push(c);return}O(R(),G("div",{class:j(p(o))},[l.title||l.extra||l.$slots.title||l.$slots.extra?(R(),G("div",{key:0,class:j(p(n).e("header"))},[J("div",{class:j(p(n).e("title"))},[xe(l.$slots,"title",{},()=>[qe(je(l.title),1)])],2),J("div",{class:j(p(n).e("extra"))},[xe(l.$slots,"extra",{},()=>[qe(je(l.extra),1)])],2)],2)):_e("v-if",!0),J("div",{class:j(p(n).e("body"))},[J("table",{class:j([p(n).e("table"),p(n).is("bordered",l.border)])},[J("tbody",null,[(R(!0),G(ct,null,Wt(s(),(c,d)=>(R(),we(oDe,{key:d,row:c},null,8,["row"]))),128))])],2)],2)],2))}});var uDe=Ge(lDe,[["__file","description.vue"]]);const cDe=Ye({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},align:{type:String,default:"left"},labelAlign:{type:String,default:""},className:{type:String,default:""},labelClassName:{type:String,default:""}}),GW=ue({name:"ElDescriptionsItem",props:cDe}),KW=Vt(uDe,{DescriptionsItem:GW}),JW=ti(GW),dDe=Ye({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:Oe([String,Array,Object])},zIndex:{type:Oe([String,Number])}}),fDe={click:t=>t instanceof MouseEvent},hDe="overlay";var pDe=ue({name:"ElOverlay",props:dDe,emits:fDe,setup(t,{slots:e,emit:n}){const r=Qe(hDe),i=l=>{n("click",l)},{onClick:o,onMousedown:a,onMouseup:s}=E$(t.customMaskEvent?void 0:i);return()=>t.mask?B("div",{class:[r.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:a,onMouseup:s},[xe(e,"default")],Ks.STYLE|Ks.CLASS|Ks.PROPS,["onClick","onMouseup","onMousedown"]):Et("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[xe(e,"default")])}});const G$=pDe,eU=Symbol("dialogInjectionKey"),tU=Ye({center:Boolean,alignCenter:Boolean,closeIcon:{type:fr},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),gDe={close:()=>!0},mDe=ue({name:"ElDialogContent"}),vDe=ue({...mDe,props:tU,emits:gDe,setup(t,{expose:e}){const n=t,{t:r}=kn(),{Close:i}=f$,{dialogRef:o,headerRef:a,bodyId:s,ns:l,style:u}=ht(eU),{focusTrapRef:c}=ht(F$),d=M(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),f=Bx(c,o),h=M(()=>n.draggable),m=M(()=>n.overflow),{resetPosition:g}=UQ(o,a,h,m);return e({resetPosition:g}),(y,b)=>(R(),G("div",{ref:p(f),class:j(p(d)),style:mt(p(u)),tabindex:"-1"},[J("header",{ref_key:"headerRef",ref:a,class:j([p(l).e("header"),{"show-close":y.showClose}])},[xe(y.$slots,"header",{},()=>[J("span",{role:"heading","aria-level":y.ariaLevel,class:j(p(l).e("title"))},je(y.title),11,["aria-level"])]),y.showClose?(R(),G("button",{key:0,"aria-label":p(r)("el.dialog.close"),class:j(p(l).e("headerbtn")),type:"button",onClick:w=>y.$emit("close")},[B(p(gt),{class:j(p(l).e("close"))},{default:z(()=>[(R(),we(un(y.closeIcon||p(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):_e("v-if",!0)],2),J("div",{id:p(s),class:j(p(l).e("body"))},[xe(y.$slots,"default")],10,["id"]),y.$slots.footer?(R(),G("footer",{key:0,class:j(p(l).e("footer"))},[xe(y.$slots,"footer")],2)):_e("v-if",!0)],6))}});var yDe=Ge(vDe,[["__file","dialog-content.vue"]]);const nU=Ye({...tU,appendToBody:Boolean,appendTo:{type:Oe([String,Object]),default:"body"},beforeClose:{type:Oe(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),rU={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Zt]:t=>si(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},iU=(t,e)=>{var n;const i=en().emit,{nextZIndex:o}=Qm();let a="";const s=bo(),l=bo(),u=F(!1),c=F(!1),d=F(!1),f=F((n=t.zIndex)!=null?n:o());let h,m;const g=Wx("namespace",wy),y=M(()=>{const L={},I=`--${g.value}-dialog`;return t.fullscreen||(t.top&&(L[`${I}-margin-top`]=t.top),t.width&&(L[`${I}-width`]=pi(t.width))),L}),b=M(()=>t.alignCenter?{display:"flex"}:{});function w(){i("opened")}function O(){i("closed"),i(Zt,!1),t.destroyOnClose&&(d.value=!1)}function S(){i("close")}function x(){m==null||m(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=Xh(()=>P(),t.openDelay):P()}function C(){h==null||h(),m==null||m(),t.closeDelay&&t.closeDelay>0?{stop:m}=Xh(()=>A(),t.closeDelay):A()}function E(){function L(I){I||(c.value=!0,u.value=!1)}t.beforeClose?t.beforeClose(L):C()}function T(){t.closeOnClickModal&&E()}function P(){!Tn||(u.value=!0)}function A(){u.value=!1}function D(){i("openAutoFocus")}function N(){i("closeAutoFocus")}function $(L){var I;((I=L.detail)==null?void 0:I.focusReason)==="pointer"&&L.preventDefault()}t.lockScroll&&v$(u);function W(){t.closeOnPressEscape&&E()}return Ve(()=>t.modelValue,L=>{L?(c.value=!1,x(),d.value=!0,f.value=Wc(t.zIndex)?o():f.value++,Ot(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):u.value&&C()}),Ve(()=>t.fullscreen,L=>{!e.value||(L?(a=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=a)}),Bt(()=>{t.modelValue&&(u.value=!0,d.value=!0,x())}),{afterEnter:w,afterLeave:O,beforeLeave:S,handleClose:E,onModalClick:T,close:C,doClose:A,onOpenAutoFocus:D,onCloseAutoFocus:N,onCloseRequested:W,onFocusoutPrevented:$,titleId:s,bodyId:l,closed:c,style:y,overlayDialogStyle:b,rendered:d,visible:u,zIndex:f}},bDe=ue({name:"ElDialog",inheritAttrs:!1}),_De=ue({...bDe,props:nU,emits:rU,setup(t,{expose:e}){const n=t,r=Ji();Jd({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(()=>!!r.title));const i=Qe("dialog"),o=F(),a=F(),s=F(),{visible:l,titleId:u,bodyId:c,style:d,overlayDialogStyle:f,rendered:h,zIndex:m,afterEnter:g,afterLeave:y,beforeLeave:b,handleClose:w,onModalClick:O,onOpenAutoFocus:S,onCloseAutoFocus:x,onCloseRequested:C,onFocusoutPrevented:E}=iU(n,o);_n(eU,{dialogRef:o,headerRef:a,bodyId:c,ns:i,rendered:h,style:d});const T=E$(O),P=M(()=>n.draggable&&!n.fullscreen);return e({visible:l,dialogContentRef:s,resetPosition:()=>{var D;(D=s.value)==null||D.resetPosition()}}),(D,N)=>(R(),we(p(Um),{to:D.appendTo,disabled:D.appendTo!=="body"?!1:!D.appendToBody},{default:z(()=>[B(Qi,{name:"dialog-fade",onAfterEnter:p(g),onAfterLeave:p(y),onBeforeLeave:p(b),persisted:""},{default:z(()=>[Ht(B(p(G$),{"custom-mask-event":"",mask:D.modal,"overlay-class":D.modalClass,"z-index":p(m)},{default:z(()=>[J("div",{role:"dialog","aria-modal":"true","aria-label":D.title||void 0,"aria-labelledby":D.title?void 0:p(u),"aria-describedby":p(c),class:j(`${p(i).namespace.value}-overlay-dialog`),style:mt(p(f)),onClick:p(T).onClick,onMousedown:p(T).onMousedown,onMouseup:p(T).onMouseup},[B(p(Mb),{loop:"",trapped:p(l),"focus-start-el":"container",onFocusAfterTrapped:p(S),onFocusAfterReleased:p(x),onFocusoutPrevented:p(E),onReleaseRequested:p(C)},{default:z(()=>[p(h)?(R(),we(yDe,gn({key:0,ref_key:"dialogContentRef",ref:s},D.$attrs,{center:D.center,"align-center":D.alignCenter,"close-icon":D.closeIcon,draggable:p(P),overflow:D.overflow,fullscreen:D.fullscreen,"show-close":D.showClose,title:D.title,"aria-level":D.headerAriaLevel,onClose:p(w)}),ts({header:z(()=>[D.$slots.title?xe(D.$slots,"title",{key:1}):xe(D.$slots,"header",{key:0,close:p(w),titleId:p(u),titleClass:p(i).e("title")})]),default:z(()=>[xe(D.$slots,"default")]),_:2},[D.$slots.footer?{name:"footer",fn:z(()=>[xe(D.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):_e("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[zn,p(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ODe=Ge(_De,[["__file","dialog.vue"]]);const Ma=Vt(ODe),wDe=Ye({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:Oe(String),default:"solid"}}),SDe=ue({name:"ElDivider"}),xDe=ue({...SDe,props:wDe,setup(t){const e=t,n=Qe("divider"),r=M(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(R(),G("div",{class:j([p(n).b(),p(n).m(i.direction)]),style:mt(p(r)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(R(),G("div",{key:0,class:j([p(n).e("text"),p(n).is(i.contentPosition)])},[xe(i.$slots,"default")],2)):_e("v-if",!0)],6))}});var CDe=Ge(xDe,[["__file","divider.vue"]]);const oU=Vt(CDe),EDe=Ye({...nU,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),TDe=rU,kDe=ue({name:"ElDrawer",inheritAttrs:!1}),PDe=ue({...kDe,props:EDe,emits:TDe,setup(t,{expose:e}){const n=t,r=Ji();Jd({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},M(()=>!!r.title));const i=F(),o=F(),a=Qe("drawer"),{t:s}=kn(),{afterEnter:l,afterLeave:u,beforeLeave:c,visible:d,rendered:f,titleId:h,bodyId:m,zIndex:g,onModalClick:y,onOpenAutoFocus:b,onCloseAutoFocus:w,onFocusoutPrevented:O,onCloseRequested:S,handleClose:x}=iU(n,i),C=M(()=>n.direction==="rtl"||n.direction==="ltr"),E=M(()=>pi(n.size));return e({handleClose:x,afterEnter:l,afterLeave:u}),(T,P)=>(R(),we(p(Um),{to:T.appendTo,disabled:T.appendTo!=="body"?!1:!T.appendToBody},{default:z(()=>[B(Qi,{name:p(a).b("fade"),onAfterEnter:p(l),onAfterLeave:p(u),onBeforeLeave:p(c),persisted:""},{default:z(()=>[Ht(B(p(G$),{mask:T.modal,"overlay-class":T.modalClass,"z-index":p(g),onClick:p(y)},{default:z(()=>[B(p(Mb),{loop:"",trapped:p(d),"focus-trap-el":i.value,"focus-start-el":o.value,onFocusAfterTrapped:p(b),onFocusAfterReleased:p(w),onFocusoutPrevented:p(O),onReleaseRequested:p(S)},{default:z(()=>[J("div",gn({ref_key:"drawerRef",ref:i,"aria-modal":"true","aria-label":T.title||void 0,"aria-labelledby":T.title?void 0:p(h),"aria-describedby":p(m)},T.$attrs,{class:[p(a).b(),T.direction,p(d)&&"open"],style:p(C)?"width: "+p(E):"height: "+p(E),role:"dialog",onClick:Pt(()=>{},["stop"])}),[J("span",{ref_key:"focusStartRef",ref:o,class:j(p(a).e("sr-focus")),tabindex:"-1"},null,2),T.withHeader?(R(),G("header",{key:0,class:j(p(a).e("header"))},[T.$slots.title?xe(T.$slots,"title",{key:1},()=>[_e(" DEPRECATED SLOT ")]):xe(T.$slots,"header",{key:0,close:p(x),titleId:p(h),titleClass:p(a).e("title")},()=>[T.$slots.title?_e("v-if",!0):(R(),G("span",{key:0,id:p(h),role:"heading","aria-level":T.headerAriaLevel,class:j(p(a).e("title"))},je(T.title),11,["id","aria-level"]))]),T.showClose?(R(),G("button",{key:2,"aria-label":p(s)("el.drawer.close"),class:j(p(a).e("close-btn")),type:"button",onClick:p(x)},[B(p(gt),{class:j(p(a).e("close"))},{default:z(()=>[B(p(_a))]),_:1},8,["class"])],10,["aria-label","onClick"])):_e("v-if",!0)],2)):_e("v-if",!0),p(f)?(R(),G("div",{key:1,id:p(m),class:j(p(a).e("body"))},[xe(T.$slots,"default")],10,["id"])):_e("v-if",!0),T.$slots.footer?(R(),G("div",{key:2,class:j(p(a).e("footer"))},[xe(T.$slots,"footer")],2)):_e("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[zn,p(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ADe=Ge(PDe,[["__file","drawer.vue"]]);const K$=Vt(ADe),MDe=ue({inheritAttrs:!1});function RDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var $De=Ge(MDe,[["render",RDe],["__file","collection.vue"]]);const NDe=ue({name:"ElCollectionItem",inheritAttrs:!1});function DDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var LDe=Ge(NDe,[["render",DDe],["__file","collection-item.vue"]]);const aU="data-el-collection-item",sU=t=>{const e=`El${t}Collection`,n=`${e}Item`,r=Symbol(e),i=Symbol(n),o={...$De,name:e,setup(){const s=F(null),l=new Map;_n(r,{itemMap:l,getItems:()=>{const c=p(s);if(!c)return[];const d=Array.from(c.querySelectorAll(`[${aU}]`));return[...l.values()].sort((h,m)=>d.indexOf(h.ref)-d.indexOf(m.ref))},collectionRef:s})}},a={...LDe,name:n,setup(s,{attrs:l}){const u=F(null),c=ht(r,void 0);_n(i,{collectionItemRef:u}),Bt(()=>{const d=p(u);d&&c.itemMap.set(d,{ref:d,...l})}),pr(()=>{const d=p(u);c.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:r,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:a}},IDe=Ye({style:{type:Oe([String,Array,Object])},currentTabId:{type:Oe(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Oe(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:BDe,ElCollectionItem:FDe,COLLECTION_INJECTION_KEY:J$,COLLECTION_ITEM_INJECTION_KEY:VDe}=sU("RovingFocusGroup"),eN=Symbol("elRovingFocusGroup"),lU=Symbol("elRovingFocusGroupItem"),jDe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},zDe=(t,e)=>{if(e!=="rtl")return t;switch(t){case St.right:return St.left;case St.left:return St.right;default:return t}},QDe=(t,e,n)=>{const r=zDe(t.key,n);if(!(e==="vertical"&&[St.left,St.right].includes(r))&&!(e==="horizontal"&&[St.up,St.down].includes(r)))return jDe[r]},HDe=(t,e)=>t.map((n,r)=>t[(r+e)%t.length]),tN=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},T8="currentTabIdChange",k8="rovingFocusGroup.entryFocus",WDe={bubbles:!1,cancelable:!0},UDe=ue({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:IDe,emits:[T8,"entryFocus"],setup(t,{emit:e}){var n;const r=F((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),i=F(!1),o=F(!1),a=F(null),{getItems:s}=ht(J$,void 0),l=M(()=>[{outline:"none"},t.style]),u=g=>{e(T8,g)},c=()=>{i.value=!0},d=fi(g=>{var y;(y=t.onMousedown)==null||y.call(t,g)},()=>{o.value=!0}),f=fi(g=>{var y;(y=t.onFocus)==null||y.call(t,g)},g=>{const y=!p(o),{target:b,currentTarget:w}=g;if(b===w&&y&&!p(i)){const O=new Event(k8,WDe);if(w==null||w.dispatchEvent(O),!O.defaultPrevented){const S=s().filter(P=>P.focusable),x=S.find(P=>P.active),C=S.find(P=>P.id===p(r)),T=[x,C,...S].filter(Boolean).map(P=>P.ref);tN(T)}}o.value=!1}),h=fi(g=>{var y;(y=t.onBlur)==null||y.call(t,g)},()=>{i.value=!1}),m=(...g)=>{e("entryFocus",...g)};_n(eN,{currentTabbedId:Mm(r),loop:er(t,"loop"),tabIndex:M(()=>p(i)?-1:0),rovingFocusGroupRef:a,rovingFocusGroupRootStyle:l,orientation:er(t,"orientation"),dir:er(t,"dir"),onItemFocus:u,onItemShiftTab:c,onBlur:h,onFocus:f,onMousedown:d}),Ve(()=>t.currentTabId,g=>{r.value=g!=null?g:null}),sr(a,k8,m)}});function qDe(t,e,n,r,i,o){return xe(t.$slots,"default")}var YDe=Ge(UDe,[["render",qDe],["__file","roving-focus-group-impl.vue"]]);const XDe=ue({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:BDe,ElRovingFocusGroupImpl:YDe}});function ZDe(t,e,n,r,i,o){const a=an("el-roving-focus-group-impl"),s=an("el-focus-group-collection");return R(),we(s,null,{default:z(()=>[B(a,Xl(lf(t.$attrs)),{default:z(()=>[xe(t.$slots,"default")]),_:3},16)]),_:3})}var GDe=Ge(XDe,[["render",ZDe],["__file","roving-focus-group.vue"]]);const KDe=ue({components:{ElRovingFocusCollectionItem:FDe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,loop:r,onItemFocus:i,onItemShiftTab:o}=ht(eN,void 0),{getItems:a}=ht(J$,void 0),s=bo(),l=F(null),u=fi(h=>{e("mousedown",h)},h=>{t.focusable?i(p(s)):h.preventDefault()}),c=fi(h=>{e("focus",h)},()=>{i(p(s))}),d=fi(h=>{e("keydown",h)},h=>{const{key:m,shiftKey:g,target:y,currentTarget:b}=h;if(m===St.tab&&g){o();return}if(y!==b)return;const w=QDe(h);if(w){h.preventDefault();let S=a().filter(x=>x.focusable).map(x=>x.ref);switch(w){case"last":{S.reverse();break}case"prev":case"next":{w==="prev"&&S.reverse();const x=S.indexOf(b);S=r.value?HDe(S,x+1):S.slice(x+1);break}}Ot(()=>{tN(S)})}}),f=M(()=>n.value===p(s));return _n(lU,{rovingFocusGroupItemRef:l,tabIndex:M(()=>p(f)?0:-1),handleMousedown:u,handleFocus:c,handleKeydown:d}),{id:s,handleKeydown:d,handleFocus:c,handleMousedown:u}}});function JDe(t,e,n,r,i,o){const a=an("el-roving-focus-collection-item");return R(),we(a,{id:t.id,focusable:t.focusable,active:t.active},{default:z(()=>[xe(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var eLe=Ge(KDe,[["render",JDe],["__file","roving-focus-item.vue"]]);const E1=Ye({trigger:v0.trigger,effect:{...io.effect,default:"light"},type:{type:Oe(String)},placement:{type:Oe(String),default:"bottom"},popperOptions:{type:Oe(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Oe([Number,String]),default:0},maxHeight:{type:Oe([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:Oe(Object)},teleported:io.teleported}),uU=Ye({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:fr}}),tLe=Ye({onKeydown:{type:Oe(Function)}}),nLe=[St.down,St.pageDown,St.home],cU=[St.up,St.pageUp,St.end],rLe=[...nLe,...cU],{ElCollection:iLe,ElCollectionItem:oLe,COLLECTION_INJECTION_KEY:aLe,COLLECTION_ITEM_INJECTION_KEY:sLe}=sU("Dropdown"),Jx=Symbol("elDropdown"),{ButtonGroup:lLe}=lr,uLe=ue({name:"ElDropdown",components:{ElButton:lr,ElButtonGroup:lLe,ElScrollbar:mu,ElDropdownCollection:iLe,ElTooltip:Ui,ElRovingFocusGroup:GDe,ElOnlyChild:DH,ElIcon:gt,ArrowDown:ld},props:E1,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=en(),r=Qe("dropdown"),{t:i}=kn(),o=F(),a=F(),s=F(null),l=F(null),u=F(null),c=F(null),d=F(!1),f=[St.enter,St.space,St.down],h=M(()=>({maxHeight:pi(t.maxHeight)})),m=M(()=>[r.m(x.value)]),g=M(()=>$o(t.trigger)),y=bo().value,b=M(()=>t.id||y);Ve([o,g],([U,Q],[V])=>{var q,K,ie;(q=V==null?void 0:V.$el)!=null&&q.removeEventListener&&V.$el.removeEventListener("pointerenter",E),(K=U==null?void 0:U.$el)!=null&&K.removeEventListener&&U.$el.removeEventListener("pointerenter",E),((ie=U==null?void 0:U.$el)==null?void 0:ie.addEventListener)&&Q.includes("hover")&&U.$el.addEventListener("pointerenter",E)},{immediate:!0}),pr(()=>{var U,Q;(Q=(U=o.value)==null?void 0:U.$el)!=null&&Q.removeEventListener&&o.value.$el.removeEventListener("pointerenter",E)});function w(){O()}function O(){var U;(U=s.value)==null||U.onClose()}function S(){var U;(U=s.value)==null||U.onOpen()}const x=Ni();function C(...U){e("command",...U)}function E(){var U,Q;(Q=(U=o.value)==null?void 0:U.$el)==null||Q.focus()}function T(){}function P(){const U=p(l);g.value.includes("hover")&&(U==null||U.focus()),c.value=null}function A(U){c.value=U}function D(U){d.value||(U.preventDefault(),U.stopImmediatePropagation())}function N(){e("visible-change",!0)}function $(U){(U==null?void 0:U.type)==="keydown"&&l.value.focus()}function W(){e("visible-change",!1)}return _n(Jx,{contentRef:l,role:M(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:T,onItemLeave:P}),_n("elDropdown",{instance:n,dropdownSize:x,handleClick:w,commandHandler:C,trigger:er(t,"trigger"),hideOnClick:er(t,"hideOnClick")}),{t:i,ns:r,scrollbar:u,wrapStyle:h,dropdownTriggerKls:m,dropdownSize:x,triggerId:b,triggerKeys:f,currentTabId:c,handleCurrentTabIdChange:A,handlerMainButtonClick:U=>{e("click",U)},handleEntryFocus:D,handleClose:O,handleOpen:S,handleBeforeShowTooltip:N,handleShowTooltip:$,handleBeforeHideTooltip:W,onFocusAfterTrapped:U=>{var Q,V;U.preventDefault(),(V=(Q=l.value)==null?void 0:Q.focus)==null||V.call(Q,{preventScroll:!0})},popperRef:s,contentRef:l,triggeringElementRef:o,referenceElementRef:a}}});function cLe(t,e,n,r,i,o){var a;const s=an("el-dropdown-collection"),l=an("el-roving-focus-group"),u=an("el-scrollbar"),c=an("el-only-child"),d=an("el-tooltip"),f=an("el-button"),h=an("arrow-down"),m=an("el-icon"),g=an("el-button-group");return R(),G("div",{class:j([t.ns.b(),t.ns.is("disabled",t.disabled)])},[B(d,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"reference-element":(a=t.referenceElementRef)==null?void 0:a.$el,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":t.triggeringElementRef,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:"",onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},ts({content:z(()=>[B(u,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:z(()=>[B(l,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange,onEntryFocus:t.handleEntryFocus},{default:z(()=>[B(s,null,{default:z(()=>[xe(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:z(()=>[B(c,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:z(()=>[xe(t.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(R(),we(g,{key:0},{default:z(()=>[B(f,gn({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:z(()=>[xe(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),B(f,gn({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:z(()=>[B(m,{class:j(t.ns.e("icon"))},{default:z(()=>[B(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):_e("v-if",!0)],2)}var dLe=Ge(uLe,[["render",cLe],["__file","dropdown.vue"]]);const fLe=ue({name:"DropdownItemImpl",components:{ElIcon:gt},props:uU,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Qe("dropdown"),{role:r}=ht(Jx,void 0),{collectionItemRef:i}=ht(sLe,void 0),{collectionItemRef:o}=ht(VDe,void 0),{rovingFocusGroupItemRef:a,tabIndex:s,handleFocus:l,handleKeydown:u,handleMousedown:c}=ht(lU,void 0),d=Bx(i,o,a),f=M(()=>r.value==="menu"?"menuitem":r.value==="navigation"?"link":"button"),h=fi(m=>{const{code:g}=m;if(g===St.enter||g===St.space)return m.preventDefault(),m.stopImmediatePropagation(),e("clickimpl",m),!0},u);return{ns:n,itemRef:d,dataset:{[aU]:""},role:f,tabIndex:s,handleFocus:l,handleKeydown:h,handleMousedown:c}}});function hLe(t,e,n,r,i,o){const a=an("el-icon");return R(),G(ct,null,[t.divided?(R(),G("li",{key:0,role:"separator",class:j(t.ns.bem("menu","item","divided"))},null,2)):_e("v-if",!0),J("li",gn({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:s=>t.$emit("clickimpl",s),onFocus:t.handleFocus,onKeydown:Pt(t.handleKeydown,["self"]),onMousedown:t.handleMousedown,onPointermove:s=>t.$emit("pointermove",s),onPointerleave:s=>t.$emit("pointerleave",s)}),[t.icon?(R(),we(a,{key:0},{default:z(()=>[(R(),we(un(t.icon)))]),_:1})):_e("v-if",!0),xe(t.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var pLe=Ge(fLe,[["render",hLe],["__file","dropdown-item-impl.vue"]]);const dU=()=>{const t=ht("elDropdown",{}),e=M(()=>t==null?void 0:t.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},gLe=ue({name:"ElDropdownItem",components:{ElDropdownCollectionItem:oLe,ElRovingFocusItem:eLe,ElDropdownItemImpl:pLe},inheritAttrs:!1,props:uU,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:r}=dU(),i=en(),o=F(null),a=M(()=>{var h,m;return(m=(h=p(o))==null?void 0:h.textContent)!=null?m:""}),{onItemEnter:s,onItemLeave:l}=ht(Jx,void 0),u=fi(h=>(e("pointermove",h),h.defaultPrevented),J3(h=>{if(t.disabled){l(h);return}const m=h.currentTarget;m===document.activeElement||m.contains(document.activeElement)||(s(h),h.defaultPrevented||m==null||m.focus())})),c=fi(h=>(e("pointerleave",h),h.defaultPrevented),J3(l)),d=fi(h=>{if(!t.disabled)return e("click",h),h.type!=="keydown"&&h.defaultPrevented},h=>{var m,g,y;if(t.disabled){h.stopImmediatePropagation();return}(m=r==null?void 0:r.hideOnClick)!=null&&m.value&&((g=r.handleClick)==null||g.call(r)),(y=r.commandHandler)==null||y.call(r,t.command,i,h)}),f=M(()=>({...t,...n}));return{handleClick:d,handlePointerMove:u,handlePointerLeave:c,textContent:a,propsAndAttrs:f}}});function mLe(t,e,n,r,i,o){var a;const s=an("el-dropdown-item-impl"),l=an("el-roving-focus-item"),u=an("el-dropdown-collection-item");return R(),we(u,{disabled:t.disabled,"text-value":(a=t.textValue)!=null?a:t.textContent},{default:z(()=>[B(l,{focusable:!t.disabled},{default:z(()=>[B(s,gn(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:z(()=>[xe(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var fU=Ge(gLe,[["render",mLe],["__file","dropdown-item.vue"]]);const vLe=ue({name:"ElDropdownMenu",props:tLe,setup(t){const e=Qe("dropdown"),{_elDropdownSize:n}=dU(),r=n.value,{focusTrapRef:i,onKeydown:o}=ht(F$,void 0),{contentRef:a,role:s,triggerId:l}=ht(Jx,void 0),{collectionRef:u,getItems:c}=ht(aLe,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:f,tabIndex:h,onBlur:m,onFocus:g,onMousedown:y}=ht(eN,void 0),{collectionRef:b}=ht(J$,void 0),w=M(()=>[e.b("menu"),e.bm("menu",r==null?void 0:r.value)]),O=Bx(a,u,i,d,b),S=fi(C=>{var E;(E=t.onKeydown)==null||E.call(t,C)},C=>{const{currentTarget:E,code:T,target:P}=C;if(E.contains(P),St.tab===T&&C.stopImmediatePropagation(),C.preventDefault(),P!==p(a)||!rLe.includes(T))return;const D=c().filter(N=>!N.disabled).map(N=>N.ref);cU.includes(T)&&D.reverse(),tN(D)});return{size:r,rovingFocusGroupRootStyle:f,tabIndex:h,dropdownKls:w,role:s,triggerId:l,dropdownListWrapperRef:O,handleKeydown:C=>{S(C),o(C)},onBlur:m,onFocus:g,onMousedown:y}}});function yLe(t,e,n,r,i,o){return R(),G("ul",{ref:t.dropdownListWrapperRef,class:j(t.dropdownKls),style:mt(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onBlur:t.onBlur,onFocus:t.onFocus,onKeydown:Pt(t.handleKeydown,["self"]),onMousedown:Pt(t.onMousedown,["self"])},[xe(t.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var hU=Ge(vLe,[["render",yLe],["__file","dropdown-menu.vue"]]);const bLe=Vt(dLe,{DropdownItem:fU,DropdownMenu:hU}),_Le=ti(fU),OLe=ti(hU),wLe=ue({name:"ImgEmpty"}),SLe=ue({...wLe,setup(t){const e=Qe("empty"),n=bo();return(r,i)=>(R(),G("svg",{viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[J("defs",null,[J("linearGradient",{id:`linearGradient-1-${p(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("linearGradient",{id:`linearGradient-2-${p(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,["stop-color"]),J("stop",{"stop-color":`var(${p(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,["stop-color"])],8,["id"]),J("rect",{id:`path-3-${p(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,["id"])]),J("g",{id:"Illustrations",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[J("g",{id:"B-type",transform:"translate(-1268.000000, -535.000000)"},[J("g",{id:"Group-2",transform:"translate(1268.000000, 535.000000)"},[J("path",{id:"Oval-Copy-2",d:"M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z",fill:`var(${p(e).cssVarBlockName("fill-color-3")})`},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-14",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) ",points:"13 58 53 58 42 45 2 45"},null,8,["fill"]),J("g",{id:"Group-Copy",transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},[J("polygon",{id:"Rectangle-Copy-10",fill:`var(${p(e).cssVarBlockName("fill-color-7")})`,transform:"translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) ",points:"2.84078316e-14 3 18 3 23 7 5 7"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-11",fill:`var(${p(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,["fill"]),J("rect",{id:"Rectangle-Copy-12",fill:`url(#linearGradient-1-${p(n)})`,transform:"translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) ",x:"38",y:"7",width:"17",height:"36"},null,8,["fill"]),J("polygon",{id:"Rectangle-Copy-13",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) ",points:"24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"},null,8,["fill"])]),J("rect",{id:"Rectangle-Copy-15",fill:`url(#linearGradient-2-${p(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,["fill"]),J("g",{id:"Rectangle-Copy-17",transform:"translate(53.000000, 45.000000)"},[J("use",{id:"Mask",fill:`var(${p(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${p(n)}`},null,8,["fill","xlink:href"]),J("polygon",{id:"Rectangle-Copy",fill:`var(${p(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${p(n)})`,transform:"translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) ",points:"7 0 24 0 20 18 7 16.5"},null,8,["fill","mask"])]),J("polygon",{id:"Rectangle-Copy-18",fill:`var(${p(e).cssVarBlockName("fill-color-2")})`,transform:"translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) ",points:"62 45 79 45 70 58 53 58"},null,8,["fill"])])])])]))}});var xLe=Ge(SLe,[["__file","img-empty.vue"]]);const CLe=Ye({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),ELe=ue({name:"ElEmpty"}),TLe=ue({...ELe,props:CLe,setup(t){const e=t,{t:n}=kn(),r=Qe("empty"),i=M(()=>e.description||n("el.table.emptyText")),o=M(()=>({width:pi(e.imageSize)}));return(a,s)=>(R(),G("div",{class:j(p(r).b())},[J("div",{class:j(p(r).e("image")),style:mt(p(o))},[a.image?(R(),G("img",{key:0,src:a.image,ondragstart:"return false"},null,8,["src"])):xe(a.$slots,"image",{key:1},()=>[B(xLe)])],6),J("div",{class:j(p(r).e("description"))},[a.$slots.description?xe(a.$slots,"description",{key:0}):(R(),G("p",{key:1},je(p(i)),1))],2),a.$slots.default?(R(),G("div",{key:0,class:j(p(r).e("bottom"))},[xe(a.$slots,"default")],2)):_e("v-if",!0)],2))}});var kLe=Ge(TLe,[["__file","empty.vue"]]);const pU=Vt(kLe),PLe=Ye({urlList:{type:Oe(Array),default:()=>Jr([])},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},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Oe(String)}}),ALe={close:()=>!0,switch:t=>kt(t),rotate:t=>kt(t)},MLe=ue({name:"ElImageViewer"}),RLe=ue({...MLe,props:PLe,emits:ALe,setup(t,{expose:e,emit:n}){var r;const i=t,o={CONTAIN:{name:"contain",icon:Bc(zm)},ORIGINAL:{name:"original",icon:Bc(MCe)}},{t:a}=kn(),s=Qe("image-viewer"),{nextZIndex:l}=Qm(),u=F(),c=F([]),d=cse(),f=F(!0),h=F(i.initialIndex),m=Tr(o.CONTAIN),g=F({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),y=F((r=i.zIndex)!=null?r:l()),b=M(()=>{const{urlList:q}=i;return q.length<=1}),w=M(()=>h.value===0),O=M(()=>h.value===i.urlList.length-1),S=M(()=>i.urlList[h.value]),x=M(()=>[s.e("btn"),s.e("prev"),s.is("disabled",!i.infinite&&w.value)]),C=M(()=>[s.e("btn"),s.e("next"),s.is("disabled",!i.infinite&&O.value)]),E=M(()=>{const{scale:q,deg:K,offsetX:ie,offsetY:oe,enableTransition:Se}=g.value;let ke=ie/q,Y=oe/q;const re=K*Math.PI/180,te=Math.cos(re),ge=Math.sin(re);ke=ke*te+Y*ge,Y=Y*te-ie/q*ge;const Re={transform:`scale(${q}) rotate(${K}deg) translate(${ke}px, ${Y}px)`,transition:Se?"transform .3s":""};return m.value.name===o.CONTAIN.name&&(Re.maxWidth=Re.maxHeight="100%"),Re});function T(){A(),n("close")}function P(){const q=Vc(ie=>{switch(ie.code){case St.esc:i.closeOnPressEscape&&T();break;case St.space:L();break;case St.left:U();break;case St.up:V("zoomIn");break;case St.right:Q();break;case St.down:V("zoomOut");break}}),K=Vc(ie=>{const oe=ie.deltaY||ie.deltaX;V(oe<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});d.run(()=>{sr(document,"keydown",q),sr(document,"wheel",K)})}function A(){d.stop()}function D(){f.value=!1}function N(q){f.value=!1,q.target.alt=a("el.image.error")}function $(q){if(f.value||q.button!==0||!u.value)return;g.value.enableTransition=!1;const{offsetX:K,offsetY:ie}=g.value,oe=q.pageX,Se=q.pageY,ke=Vc(re=>{g.value={...g.value,offsetX:K+re.pageX-oe,offsetY:ie+re.pageY-Se}}),Y=sr(document,"mousemove",ke);sr(document,"mouseup",()=>{Y()}),q.preventDefault()}function W(){g.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function L(){if(f.value)return;const q=Yg(o),K=Object.values(o),ie=m.value.name,Se=(K.findIndex(ke=>ke.name===ie)+1)%q.length;m.value=o[q[Se]],W()}function I(q){const K=i.urlList.length;h.value=(q+K)%K}function U(){w.value&&!i.infinite||I(h.value-1)}function Q(){O.value&&!i.infinite||I(h.value+1)}function V(q,K={}){if(f.value)return;const{minScale:ie,maxScale:oe}=i,{zoomRate:Se,rotateDeg:ke,enableTransition:Y}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...K};switch(q){case"zoomOut":g.value.scale>ie&&(g.value.scale=Number.parseFloat((g.value.scale/Se).toFixed(3)));break;case"zoomIn":g.value.scale{Ot(()=>{const q=c.value[0];q!=null&&q.complete||(f.value=!0)})}),Ve(h,q=>{W(),n("switch",q)}),Bt(()=>{var q,K;P(),(K=(q=u.value)==null?void 0:q.focus)==null||K.call(q)}),e({setActiveItem:I}),(q,K)=>(R(),we(p(Um),{to:"body",disabled:!q.teleported},{default:z(()=>[B(Qi,{name:"viewer-fade",appear:""},{default:z(()=>[J("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:j(p(s).e("wrapper")),style:mt({zIndex:y.value})},[J("div",{class:j(p(s).e("mask")),onClick:Pt(ie=>q.hideOnClickModal&&T(),["self"])},null,10,["onClick"]),_e(" CLOSE "),J("span",{class:j([p(s).e("btn"),p(s).e("close")]),onClick:T},[B(p(gt),null,{default:z(()=>[B(p(_a))]),_:1})],2),_e(" ARROW "),p(b)?_e("v-if",!0):(R(),G(ct,{key:0},[J("span",{class:j(p(x)),onClick:U},[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1})],2),J("span",{class:j(p(C)),onClick:Q},[B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})],2)],64)),_e(" ACTIONS "),J("div",{class:j([p(s).e("btn"),p(s).e("actions")])},[J("div",{class:j(p(s).e("actions__inner"))},[B(p(gt),{onClick:ie=>V("zoomOut")},{default:z(()=>[B(p(YCe))]),_:1},8,["onClick"]),B(p(gt),{onClick:ie=>V("zoomIn")},{default:z(()=>[B(p(zQ))]),_:1},8,["onClick"]),J("i",{class:j(p(s).e("actions__divider"))},null,2),B(p(gt),{onClick:L},{default:z(()=>[(R(),we(un(p(m).icon)))]),_:1}),J("i",{class:j(p(s).e("actions__divider"))},null,2),B(p(gt),{onClick:ie=>V("anticlockwise")},{default:z(()=>[B(p(ECe))]),_:1},8,["onClick"]),B(p(gt),{onClick:ie=>V("clockwise")},{default:z(()=>[B(p(jQ))]),_:1},8,["onClick"])],2)],2),_e(" CANVAS "),J("div",{class:j(p(s).e("canvas"))},[(R(!0),G(ct,null,Wt(q.urlList,(ie,oe)=>Ht((R(),G("img",{ref_for:!0,ref:Se=>c.value[oe]=Se,key:ie,src:ie,style:mt(p(E)),class:j(p(s).e("img")),crossorigin:q.crossorigin,onLoad:D,onError:N,onMousedown:$},null,46,["src","crossorigin"])),[[zn,oe===h.value]])),128))],2),xe(q.$slots,"default")],6)]),_:3})]),_:3},8,["disabled"]))}});var $Le=Ge(RLe,[["__file","image-viewer.vue"]]);const gU=Vt($Le),NLe=Ye({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:Oe([String,Object])},previewSrcList:{type:Oe(Array),default:()=>Jr([])},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},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:Oe(String)}}),DLe={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>kt(t),close:()=>!0,show:()=>!0},LLe=ue({name:"ElImage",inheritAttrs:!1}),ILe=ue({...LLe,props:NLe,emits:DLe,setup(t,{emit:e}){const n=t;let r="";const{t:i}=kn(),o=Qe("image"),a=mp(),s=M(()=>Ug(Object.entries(a).filter(([Q])=>/^(data-|on[A-Z])/i.test(Q)||["id","style"].includes(Q)))),l=g$({excludeListeners:!0,excludeKeys:M(()=>Object.keys(s.value))}),u=F(),c=F(!1),d=F(!0),f=F(!1),h=F(),m=F(),g=Tn&&"loading"in HTMLImageElement.prototype;let y,b;const w=M(()=>[o.e("inner"),S.value&&o.e("preview"),d.value&&o.is("loading")]),O=M(()=>{const{fit:Q}=n;return Tn&&Q?{objectFit:Q}:{}}),S=M(()=>{const{previewSrcList:Q}=n;return Array.isArray(Q)&&Q.length>0}),x=M(()=>{const{previewSrcList:Q,initialIndex:V}=n;let q=V;return V>Q.length-1&&(q=0),q}),C=M(()=>n.loading==="eager"?!1:!g&&n.loading==="lazy"||n.lazy),E=()=>{!Tn||(d.value=!0,c.value=!1,u.value=n.src)};function T(Q){d.value=!1,c.value=!1,e("load",Q)}function P(Q){d.value=!1,c.value=!0,e("error",Q)}function A(){sce(h.value,m.value)&&(E(),$())}const D=a7(A,200,!0);async function N(){var Q;if(!Tn)return;await Ot();const{scrollContainer:V}=n;As(V)?m.value=V:At(V)&&V!==""?m.value=(Q=document.querySelector(V))!=null?Q:void 0:h.value&&(m.value=r$(h.value)),m.value&&(y=sr(m,"scroll",D),setTimeout(()=>A(),100))}function $(){!Tn||!m.value||!D||(y==null||y(),m.value=void 0)}function W(Q){if(!!Q.ctrlKey){if(Q.deltaY<0)return Q.preventDefault(),!1;if(Q.deltaY>0)return Q.preventDefault(),!1}}function L(){!S.value||(b=sr("wheel",W,{passive:!1}),r=document.body.style.overflow,document.body.style.overflow="hidden",f.value=!0,e("show"))}function I(){b==null||b(),document.body.style.overflow=r,f.value=!1,e("close")}function U(Q){e("switch",Q)}return Ve(()=>n.src,()=>{C.value?(d.value=!0,c.value=!1,$(),N()):E()}),Bt(()=>{C.value?N():E()}),(Q,V)=>(R(),G("div",gn({ref_key:"container",ref:h},p(s),{class:[p(o).b(),Q.$attrs.class]}),[c.value?xe(Q.$slots,"error",{key:0},()=>[J("div",{class:j(p(o).e("error"))},je(p(i)("el.image.error")),3)]):(R(),G(ct,{key:1},[u.value!==void 0?(R(),G("img",gn({key:0},p(l),{src:u.value,loading:Q.loading,style:p(O),class:p(w),crossorigin:Q.crossorigin,onClick:L,onLoad:T,onError:P}),null,16,["src","loading","crossorigin"])):_e("v-if",!0),d.value?(R(),G("div",{key:1,class:j(p(o).e("wrapper"))},[xe(Q.$slots,"placeholder",{},()=>[J("div",{class:j(p(o).e("placeholder"))},null,2)])],2)):_e("v-if",!0)],64)),p(S)?(R(),G(ct,{key:2},[f.value?(R(),we(p(gU),{key:0,"z-index":Q.zIndex,"initial-index":p(x),infinite:Q.infinite,"zoom-rate":Q.zoomRate,"min-scale":Q.minScale,"max-scale":Q.maxScale,"url-list":Q.previewSrcList,crossorigin:Q.crossorigin,"hide-on-click-modal":Q.hideOnClickModal,teleported:Q.previewTeleported,"close-on-press-escape":Q.closeOnPressEscape,onClose:I,onSwitch:U},{default:z(()=>[Q.$slots.viewer?(R(),G("div",{key:0},[xe(Q.$slots,"viewer")])):_e("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):_e("v-if",!0)],64)):_e("v-if",!0)],16))}});var BLe=Ge(ILe,[["__file","image.vue"]]);const mU=Vt(BLe),FLe=Ye({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Wi,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:t=>t===null||kt(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},...wo(["ariaLabel"])}),VLe={[Lr]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Oa]:t=>kt(t)||Dr(t),[Zt]:t=>kt(t)||Dr(t)},jLe=ue({name:"ElInputNumber"}),zLe=ue({...jLe,props:FLe,emits:VLe,setup(t,{expose:e,emit:n}){const r=t,{t:i}=kn(),o=Qe("input-number"),a=F(),s=Sn({currentValue:r.modelValue,userInput:null}),{formItem:l}=ua(),u=M(()=>kt(r.modelValue)&&r.modelValue<=r.min),c=M(()=>kt(r.modelValue)&&r.modelValue>=r.max),d=M(()=>{const L=b(r.step);return ai(r.precision)?Math.max(b(r.modelValue),L):(L>r.precision,r.precision)}),f=M(()=>r.controls&&r.controlsPosition==="right"),h=Ni(),m=la(),g=M(()=>{if(s.userInput!==null)return s.userInput;let L=s.currentValue;if(Dr(L))return"";if(kt(L)){if(Number.isNaN(L))return"";ai(r.precision)||(L=L.toFixed(r.precision))}return L}),y=(L,I)=>{if(ai(I)&&(I=d.value),I===0)return Math.round(L);let U=String(L);const Q=U.indexOf(".");if(Q===-1||!U.replace(".","").split("")[Q+I])return L;const K=U.length;return U.charAt(K-1)==="5"&&(U=`${U.slice(0,Math.max(0,K-1))}6`),Number.parseFloat(Number(U).toFixed(I))},b=L=>{if(Dr(L))return 0;const I=L.toString(),U=I.indexOf(".");let Q=0;return U!==-1&&(Q=I.length-U-1),Q},w=(L,I=1)=>kt(L)?y(L+r.step*I):s.currentValue,O=()=>{if(r.readonly||m.value||c.value)return;const L=Number(g.value)||0,I=w(L);C(I),n(Oa,s.currentValue),$()},S=()=>{if(r.readonly||m.value||u.value)return;const L=Number(g.value)||0,I=w(L,-1);C(I),n(Oa,s.currentValue),$()},x=(L,I)=>{const{max:U,min:Q,step:V,precision:q,stepStrictly:K,valueOnClear:ie}=r;UU||oeU?U:Q,I&&n(Zt,oe)),oe},C=(L,I=!0)=>{var U;const Q=s.currentValue,V=x(L);if(!I){n(Zt,V);return}Q===V&&L||(s.userInput=null,n(Zt,V),Q!==V&&n(Lr,V,Q),r.validateEvent&&((U=l==null?void 0:l.validate)==null||U.call(l,"change").catch(q=>void 0)),s.currentValue=V)},E=L=>{s.userInput=L;const I=L===""?null:Number(L);n(Oa,I),C(I,!1)},T=L=>{const I=L!==""?Number(L):"";(kt(I)&&!Number.isNaN(I)||L==="")&&C(I),$(),s.userInput=null},P=()=>{var L,I;(I=(L=a.value)==null?void 0:L.focus)==null||I.call(L)},A=()=>{var L,I;(I=(L=a.value)==null?void 0:L.blur)==null||I.call(L)},D=L=>{n("focus",L)},N=L=>{var I;s.userInput=null,n("blur",L),r.validateEvent&&((I=l==null?void 0:l.validate)==null||I.call(l,"blur").catch(U=>void 0))},$=()=>{s.currentValue!==r.modelValue&&(s.currentValue=r.modelValue)},W=L=>{document.activeElement===L.target&&L.preventDefault()};return Ve(()=>r.modelValue,(L,I)=>{const U=x(L,!0);s.userInput===null&&U!==I&&(s.currentValue=U)},{immediate:!0}),Bt(()=>{var L;const{min:I,max:U,modelValue:Q}=r,V=(L=a.value)==null?void 0:L.input;if(V.setAttribute("role","spinbutton"),Number.isFinite(U)?V.setAttribute("aria-valuemax",String(U)):V.removeAttribute("aria-valuemax"),Number.isFinite(I)?V.setAttribute("aria-valuemin",String(I)):V.removeAttribute("aria-valuemin"),V.setAttribute("aria-valuenow",s.currentValue||s.currentValue===0?String(s.currentValue):""),V.setAttribute("aria-disabled",String(m.value)),!kt(Q)&&Q!=null){let q=Number(Q);Number.isNaN(q)&&(q=null),n(Zt,q)}V.addEventListener("wheel",W,{passive:!1})}),Jc(()=>{var L,I;const U=(L=a.value)==null?void 0:L.input;U==null||U.setAttribute("aria-valuenow",`${(I=s.currentValue)!=null?I:""}`)}),e({focus:P,blur:A}),(L,I)=>(R(),G("div",{class:j([p(o).b(),p(o).m(p(h)),p(o).is("disabled",p(m)),p(o).is("without-controls",!L.controls),p(o).is("controls-right",p(f))]),onDragstart:Pt(()=>{},["prevent"])},[L.controls?Ht((R(),G("span",{key:0,role:"button","aria-label":p(i)("el.inputNumber.decrease"),class:j([p(o).e("decrease"),p(o).is("disabled",p(u))]),onKeydown:br(S,["enter"])},[xe(L.$slots,"decrease-icon",{},()=>[B(p(gt),null,{default:z(()=>[p(f)?(R(),we(p(ld),{key:0})):(R(),we(p(mCe),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),S]]):_e("v-if",!0),L.controls?Ht((R(),G("span",{key:1,role:"button","aria-label":p(i)("el.inputNumber.increase"),class:j([p(o).e("increase"),p(o).is("disabled",p(c))]),onKeydown:br(O,["enter"])},[xe(L.$slots,"increase-icon",{},()=>[B(p(gt),null,{default:z(()=>[p(f)?(R(),we(p(o$),{key:0})):(R(),we(p(pw),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[p(_w),O]]):_e("v-if",!0),B(p(hi),{id:L.id,ref_key:"input",ref:a,type:"number",step:L.step,"model-value":p(g),placeholder:L.placeholder,readonly:L.readonly,disabled:p(m),size:p(h),max:L.max,min:L.min,name:L.name,"aria-label":L.ariaLabel,"validate-event":!1,onKeydown:[br(Pt(O,["prevent"]),["up"]),br(Pt(S,["prevent"]),["down"])],onBlur:N,onFocus:D,onInput:E,onChange:T},ts({_:2},[L.$slots.prefix?{name:"prefix",fn:z(()=>[xe(L.$slots,"prefix")])}:void 0,L.$slots.suffix?{name:"suffix",fn:z(()=>[xe(L.$slots,"suffix")])}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var QLe=Ge(zLe,[["__file","input-number.vue"]]);const vU=Vt(QLe),HLe=Ye({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:fr}}),WLe={click:t=>t instanceof MouseEvent},ULe=ue({name:"ElLink"}),qLe=ue({...ULe,props:HLe,emits:WLe,setup(t,{emit:e}){const n=t,r=Qe("link"),i=M(()=>[r.b(),r.m(n.type),r.is("disabled",n.disabled),r.is("underline",n.underline&&!n.disabled)]);function o(a){n.disabled||e("click",a)}return(a,s)=>(R(),G("a",{class:j(p(i)),href:a.disabled||!a.href?void 0:a.href,target:a.disabled||!a.href?void 0:a.target,onClick:o},[a.icon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(a.icon)))]),_:1})):_e("v-if",!0),a.$slots.default?(R(),G("span",{key:1,class:j(p(r).e("inner"))},[xe(a.$slots,"default")],2)):_e("v-if",!0),a.$slots.icon?xe(a.$slots,"icon",{key:2}):_e("v-if",!0)],10,["href","target"]))}});var YLe=Ge(qLe,[["__file","link.vue"]]);const XLe=Vt(YLe);class ZLe{constructor(e,n){this.parent=e,this.domNode=n,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",r=>{let i=!1;switch(r.code){case St.down:{this.gotoSubIndex(this.subIndex+1),i=!0;break}case St.up:{this.gotoSubIndex(this.subIndex-1),i=!0;break}case St.tab:{h1(e,"mouseleave");break}case St.enter:case St.space:{i=!0,r.currentTarget.click();break}}return i&&(r.preventDefault(),r.stopPropagation()),!1})})}}class GLe{constructor(e,n){this.domNode=e,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 ZLe(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{let n=!1;switch(e.code){case St.down:{h1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),n=!0;break}case St.up:{h1(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),n=!0;break}case St.tab:{h1(e.currentTarget,"mouseleave");break}case St.enter:case St.space:{n=!0,e.currentTarget.click();break}}n&&e.preventDefault()})}}class KLe{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(r=>{r.nodeType===1&&new GLe(r,e)})}}const JLe=ue({name:"ElMenuCollapseTransition",setup(){const t=Qe("menu");return{listeners:{onBeforeEnter:n=>n.style.opacity="0.2",onEnter(n,r){rl(n,`${t.namespace.value}-opacity-transition`),n.style.opacity="1",r()},onAfterEnter(n){aa(n,`${t.namespace.value}-opacity-transition`),n.style.opacity=""},onBeforeLeave(n){n.dataset||(n.dataset={}),Ua(n,t.m("collapse"))?(aa(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),rl(n,t.m("collapse"))):(rl(n,t.m("collapse")),n.dataset.oldOverflow=n.style.overflow,n.dataset.scrollWidth=n.clientWidth.toString(),aa(n,t.m("collapse"))),n.style.width=`${n.scrollWidth}px`,n.style.overflow="hidden"},onLeave(n){rl(n,"horizontal-collapse-transition"),n.style.width=`${n.dataset.scrollWidth}px`}}}}});function eIe(t,e,n,r,i,o){return R(),we(Qi,gn({mode:"out-in"},t.listeners),{default:z(()=>[xe(t.$slots,"default")]),_:3},16)}var tIe=Ge(JLe,[["render",eIe],["__file","menu-collapse-transition.vue"]]);function yU(t,e){const n=M(()=>{let i=t.parent;const o=[e.value];for(;i.type.name!=="ElMenu";)i.props.index&&o.unshift(i.props.index),i=i.parent;return o});return{parentMenu:M(()=>{let i=t.parent;for(;i&&!["ElMenu","ElSubMenu"].includes(i.type.name);)i=i.parent;return i}),indexPath:n}}function nIe(t){return M(()=>{const n=t.backgroundColor;return n?new YH(n).shade(20).toString():""})}const bU=(t,e)=>{const n=Qe("menu");return M(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":nIe(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},rIe=Ye({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:fr},expandOpenIcon:{type:fr},collapseCloseIcon:{type:fr},collapseOpenIcon:{type:fr}}),PT="ElSubMenu";var nN=ue({name:PT,props:rIe,setup(t,{slots:e,expose:n}){const r=en(),{indexPath:i,parentMenu:o}=yU(r,M(()=>t.index)),a=Qe("menu"),s=Qe("sub-menu"),l=ht("rootMenu");l||Hi(PT,"can not inject root menu");const u=ht(`subMenu:${o.value.uid}`);u||Hi(PT,"can not inject sub menu");const c=F({}),d=F({});let f;const h=F(!1),m=F(),g=F(null),y=M(()=>T.value==="horizontal"&&w.value?"bottom-start":"right-start"),b=M(()=>T.value==="horizontal"&&w.value||T.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?C.value?t.expandOpenIcon:t.expandCloseIcon:ld:t.collapseCloseIcon&&t.collapseOpenIcon?C.value?t.collapseOpenIcon:t.collapseCloseIcon:ba),w=M(()=>u.level===0),O=M(()=>{const q=t.teleported;return q===void 0?w.value:q}),S=M(()=>l.props.collapse?`${a.namespace.value}-zoom-in-left`:`${a.namespace.value}-zoom-in-top`),x=M(()=>T.value==="horizontal"&&w.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"]),C=M(()=>l.openedMenus.includes(t.index)),E=M(()=>{let q=!1;return Object.values(c.value).forEach(K=>{K.active&&(q=!0)}),Object.values(d.value).forEach(K=>{K.active&&(q=!0)}),q}),T=M(()=>l.props.mode),P=Sn({index:t.index,indexPath:i,active:E}),A=bU(l.props,u.level+1),D=M(()=>{var q;return(q=t.popperOffset)!=null?q:l.props.popperOffset}),N=M(()=>{var q;return(q=t.popperClass)!=null?q:l.props.popperClass}),$=M(()=>{var q;return(q=t.showTimeout)!=null?q:l.props.showTimeout}),W=M(()=>{var q;return(q=t.hideTimeout)!=null?q:l.props.hideTimeout}),L=()=>{var q,K,ie;return(ie=(K=(q=g.value)==null?void 0:q.popperRef)==null?void 0:K.popperInstanceRef)==null?void 0:ie.destroy()},I=q=>{q||L()},U=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:i.value,active:E.value})},Q=(q,K=$.value)=>{var ie;if(q.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==null||f(),{stop:f}=Xh(()=>{l.openMenu(t.index,i.value)},K),O.value&&((ie=o.value.vnode.el)==null||ie.dispatchEvent(new MouseEvent("mouseenter")))}},V=(q=!1)=>{var K;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){u.mouseInChild.value=!1;return}f==null||f(),u.mouseInChild.value=!1,{stop:f}=Xh(()=>!h.value&&l.closeMenu(t.index,i.value),W.value),O.value&&q&&((K=u.handleMouseleave)==null||K.call(u,!0))};Ve(()=>l.props.collapse,q=>I(Boolean(q)));{const q=ie=>{d.value[ie.index]=ie},K=ie=>{delete d.value[ie.index]};_n(`subMenu:${r.uid}`,{addSubMenu:q,removeSubMenu:K,handleMouseleave:V,mouseInChild:h,level:u.level+1})}return n({opened:C}),Bt(()=>{l.addSubMenu(P),u.addSubMenu(P)}),pr(()=>{u.removeSubMenu(P),l.removeSubMenu(P)}),()=>{var q;const K=[(q=e.title)==null?void 0:q.call(e),Et(gt,{class:s.e("icon-arrow"),style:{transform:C.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>At(b.value)?Et(r.appContext.components[b.value]):Et(b.value)})],ie=l.isMenuPopup?Et(Ui,{ref:g,visible:C.value,effect:"light",pure:!0,offset:D.value,showArrow:!1,persistent:!0,popperClass:N.value,placement:y.value,teleported:O.value,fallbackPlacements:x.value,transition:S.value,gpuAcceleration:!1},{content:()=>{var oe;return Et("div",{class:[a.m(T.value),a.m("popup-container"),N.value],onMouseenter:Se=>Q(Se,100),onMouseleave:()=>V(!0),onFocus:Se=>Q(Se,100)},[Et("ul",{class:[a.b(),a.m("popup"),a.m(`popup-${y.value}`)],style:A.value},[(oe=e.default)==null?void 0:oe.call(e)])])},default:()=>Et("div",{class:s.e("title"),onClick:U},K)}):Et(ct,{},[Et("div",{class:s.e("title"),ref:m,onClick:U},K),Et(Xx,{},{default:()=>{var oe;return Ht(Et("ul",{role:"menu",class:[a.b(),a.m("inline")],style:A.value},[(oe=e.default)==null?void 0:oe.call(e)]),[[zn,C.value]])}})]);return Et("li",{class:[s.b(),s.is("active",E.value),s.is("opened",C.value),s.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:C.value,onMouseenter:Q,onMouseleave:()=>V(),onFocus:Q},[ie])}}});const iIe=Ye({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Oe(Array),default:()=>Jr([])},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:fr,default:()=>bCe},popperEffect:{type:Oe(String),default:"dark"},popperClass:String,showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300}}),AT=t=>Array.isArray(t)&&t.every(e=>At(e)),oIe={close:(t,e)=>At(t)&&AT(e),open:(t,e)=>At(t)&&AT(e),select:(t,e,n,r)=>At(t)&&AT(e)&&sn(n)&&(r===void 0||r instanceof Promise)};var aIe=ue({name:"ElMenu",props:iIe,emits:oIe,setup(t,{emit:e,slots:n,expose:r}){const i=en(),o=i.appContext.config.globalProperties.$router,a=F(),s=Qe("menu"),l=Qe("sub-menu"),u=F(-1),c=F(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),d=F(t.defaultActive),f=F({}),h=F({}),m=M(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),g=()=>{const L=d.value&&f.value[d.value];if(!L||t.mode==="horizontal"||t.collapse)return;L.indexPath.forEach(U=>{const Q=h.value[U];Q&&y(U,Q.indexPath)})},y=(L,I)=>{c.value.includes(L)||(t.uniqueOpened&&(c.value=c.value.filter(U=>I.includes(U))),c.value.push(L),e("open",L,I))},b=L=>{const I=c.value.indexOf(L);I!==-1&&c.value.splice(I,1)},w=(L,I)=>{b(L),e("close",L,I)},O=({index:L,indexPath:I})=>{c.value.includes(L)?w(L,I):y(L,I)},S=L=>{(t.mode==="horizontal"||t.collapse)&&(c.value=[]);const{index:I,indexPath:U}=L;if(!(Dr(I)||Dr(U)))if(t.router&&o){const Q=L.route||I,V=o.push(Q).then(q=>(q||(d.value=I),q));e("select",I,U,{index:I,indexPath:U,route:Q},V)}else d.value=I,e("select",I,U,{index:I,indexPath:U})},x=L=>{const I=f.value,U=I[L]||d.value&&I[d.value]||I[t.defaultActive];U?d.value=U.index:d.value=L},C=L=>{const I=getComputedStyle(L),U=Number.parseInt(I.marginLeft,10),Q=Number.parseInt(I.marginRight,10);return L.offsetWidth+U+Q||0},E=()=>{var L,I;if(!a.value)return-1;const U=Array.from((I=(L=a.value)==null?void 0:L.childNodes)!=null?I:[]).filter(ke=>ke.nodeName!=="#comment"&&(ke.nodeName!=="#text"||ke.nodeValue)),Q=64,V=getComputedStyle(a.value),q=Number.parseInt(V.paddingLeft,10),K=Number.parseInt(V.paddingRight,10),ie=a.value.clientWidth-q-K;let oe=0,Se=0;return U.forEach((ke,Y)=>{oe+=C(ke),oe<=ie-Q&&(Se=Y+1)}),Se===U.length?-1:Se},T=L=>h.value[L].indexPath,P=(L,I=33.34)=>{let U;return()=>{U&&clearTimeout(U),U=setTimeout(()=>{L()},I)}};let A=!0;const D=()=>{if(u.value===E())return;const L=()=>{u.value=-1,Ot(()=>{u.value=E()})};A?L():P(L)(),A=!1};Ve(()=>t.defaultActive,L=>{f.value[L]||(d.value=""),x(L)}),Ve(()=>t.collapse,L=>{L&&(c.value=[])}),Ve(f.value,g);let N;Bo(()=>{t.mode==="horizontal"&&t.ellipsis?N=Zr(a,D).stop:N==null||N()});const $=F(!1);{const L=V=>{h.value[V.index]=V},I=V=>{delete h.value[V.index]};_n("rootMenu",Sn({props:t,openedMenus:c,items:f,subMenus:h,activeIndex:d,isMenuPopup:m,addMenuItem:V=>{f.value[V.index]=V},removeMenuItem:V=>{delete f.value[V.index]},addSubMenu:L,removeSubMenu:I,openMenu:y,closeMenu:w,handleMenuItemClick:S,handleSubMenuClick:O})),_n(`subMenu:${i.uid}`,{addSubMenu:L,removeSubMenu:I,mouseInChild:$,level:0})}Bt(()=>{t.mode==="horizontal"&&new KLe(i.vnode.el,s.namespace.value)}),r({open:I=>{const{indexPath:U}=h.value[I];U.forEach(Q=>y(Q,U))},close:b,handleResize:D});const W=bU(t,0);return()=>{var L,I;let U=(I=(L=n.default)==null?void 0:L.call(n))!=null?I:[];const Q=[];if(t.mode==="horizontal"&&a.value){const K=Kd(U),ie=u.value===-1?K:K.slice(0,u.value),oe=u.value===-1?[]:K.slice(u.value);(oe==null?void 0:oe.length)&&t.ellipsis&&(U=ie,Q.push(Et(nN,{index:"sub-menu-more",class:l.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>Et(gt,{class:l.e("icon-more")},{default:()=>Et(t.ellipsisIcon)}),default:()=>oe})))}const V=t.closeOnClickOutside?[[qc,()=>{!c.value.length||$.value||(c.value.forEach(K=>e("close",K,T(K))),c.value=[])}]]:[],q=Ht(Et("ul",{key:String(t.collapse),role:"menubar",ref:a,style:W.value,class:{[s.b()]:!0,[s.m(t.mode)]:!0,[s.m("collapse")]:t.collapse}},[...U,...Q]),V);return t.collapseTransition&&t.mode==="vertical"?Et(tIe,()=>q):q}}});const sIe=Ye({index:{type:Oe([String,null]),default:null},route:{type:Oe([String,Object])},disabled:Boolean}),lIe={click:t=>At(t.index)&&Array.isArray(t.indexPath)},MT="ElMenuItem",uIe=ue({name:MT,components:{ElTooltip:Ui},props:sIe,emits:lIe,setup(t,{emit:e}){const n=en(),r=ht("rootMenu"),i=Qe("menu"),o=Qe("menu-item");r||Hi(MT,"can not inject root menu");const{parentMenu:a,indexPath:s}=yU(n,er(t,"index")),l=ht(`subMenu:${a.value.uid}`);l||Hi(MT,"can not inject sub menu");const u=M(()=>t.index===r.activeIndex),c=Sn({index:t.index,indexPath:s,active:u}),d=()=>{t.disabled||(r.handleMenuItemClick({index:t.index,indexPath:s.value,route:t.route}),e("click",c))};return Bt(()=>{l.addSubMenu(c),r.addMenuItem(c)}),pr(()=>{l.removeSubMenu(c),r.removeMenuItem(c)}),{parentMenu:a,rootMenu:r,active:u,nsMenu:i,nsMenuItem:o,handleClick:d}}});function cIe(t,e,n,r,i,o){const a=an("el-tooltip");return R(),G("li",{class:j([t.nsMenuItem.b(),t.nsMenuItem.is("active",t.active),t.nsMenuItem.is("disabled",t.disabled)]),role:"menuitem",tabindex:"-1",onClick:t.handleClick},[t.parentMenu.type.name==="ElMenu"&&t.rootMenu.props.collapse&&t.$slots.title?(R(),we(a,{key:0,effect:t.rootMenu.props.popperEffect,placement:"right","fallback-placements":["left"],persistent:""},{content:z(()=>[xe(t.$slots,"title")]),default:z(()=>[J("div",{class:j(t.nsMenu.be("tooltip","trigger"))},[xe(t.$slots,"default")],2)]),_:3},8,["effect"])):(R(),G(ct,{key:1},[xe(t.$slots,"default"),xe(t.$slots,"title")],64))],10,["onClick"])}var _U=Ge(uIe,[["render",cIe],["__file","menu-item.vue"]]);const dIe={title:String},fIe="ElMenuItemGroup",hIe=ue({name:fIe,props:dIe,setup(){return{ns:Qe("menu-item-group")}}});function pIe(t,e,n,r,i,o){return R(),G("li",{class:j(t.ns.b())},[J("div",{class:j(t.ns.e("title"))},[t.$slots.title?xe(t.$slots,"title",{key:1}):(R(),G(ct,{key:0},[qe(je(t.title),1)],64))],2),J("ul",null,[xe(t.$slots,"default")])],2)}var OU=Ge(hIe,[["render",pIe],["__file","menu-item-group.vue"]]);const gIe=Vt(aIe,{MenuItem:_U,MenuItemGroup:OU,SubMenu:nN}),mIe=ti(_U),vIe=ti(OU),yIe=ti(nN),bIe=Ye({icon:{type:fr,default:()=>jxe},title:String,content:{type:String,default:""}}),_Ie={back:()=>!0},OIe=ue({name:"ElPageHeader"}),wIe=ue({...OIe,props:bIe,emits:_Ie,setup(t,{emit:e}){const n=Ji(),{t:r}=kn(),i=Qe("page-header"),o=M(()=>[i.b(),{[i.m("has-breadcrumb")]:!!n.breadcrumb,[i.m("has-extra")]:!!n.extra,[i.is("contentful")]:!!n.default}]);function a(){e("back")}return(s,l)=>(R(),G("div",{class:j(p(o))},[s.$slots.breadcrumb?(R(),G("div",{key:0,class:j(p(i).e("breadcrumb"))},[xe(s.$slots,"breadcrumb")],2)):_e("v-if",!0),J("div",{class:j(p(i).e("header"))},[J("div",{class:j(p(i).e("left"))},[J("div",{class:j(p(i).e("back")),role:"button",tabindex:"0",onClick:a},[s.icon||s.$slots.icon?(R(),G("div",{key:0,"aria-label":s.title||p(r)("el.pageHeader.title"),class:j(p(i).e("icon"))},[xe(s.$slots,"icon",{},()=>[s.icon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(s.icon)))]),_:1})):_e("v-if",!0)])],10,["aria-label"])):_e("v-if",!0),J("div",{class:j(p(i).e("title"))},[xe(s.$slots,"title",{},()=>[qe(je(s.title||p(r)("el.pageHeader.title")),1)])],2)],2),B(p(oU),{direction:"vertical"}),J("div",{class:j(p(i).e("content"))},[xe(s.$slots,"content",{},()=>[qe(je(s.content),1)])],2)],2),s.$slots.extra?(R(),G("div",{key:0,class:j(p(i).e("extra"))},[xe(s.$slots,"extra")],2)):_e("v-if",!0)],2),s.$slots.default?(R(),G("div",{key:1,class:j(p(i).e("main"))},[xe(s.$slots,"default")],2)):_e("v-if",!0)],2))}});var SIe=Ge(wIe,[["__file","page-header.vue"]]);const xIe=Vt(SIe),wU=Symbol("elPaginationKey"),CIe=Ye({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:fr}}),EIe={click:t=>t instanceof MouseEvent},TIe=ue({name:"ElPaginationPrev"}),kIe=ue({...TIe,props:CIe,emits:EIe,setup(t){const e=t,{t:n}=kn(),r=M(()=>e.disabled||e.currentPage<=1);return(i,o)=>(R(),G("button",{type:"button",class:"btn-prev",disabled:p(r),"aria-label":i.prevText||p(n)("el.pagination.prev"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.prevText?(R(),G("span",{key:0},je(i.prevText),1)):(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(i.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var PIe=Ge(kIe,[["__file","prev.vue"]]);const AIe=Ye({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:fr}}),MIe=ue({name:"ElPaginationNext"}),RIe=ue({...MIe,props:AIe,emits:["click"],setup(t){const e=t,{t:n}=kn(),r=M(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(R(),G("button",{type:"button",class:"btn-next",disabled:p(r),"aria-label":i.nextText||p(n)("el.pagination.next"),"aria-disabled":p(r),onClick:a=>i.$emit("click",a)},[i.nextText?(R(),G("span",{key:0},je(i.nextText),1)):(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(i.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var $Ie=Ge(RIe,[["__file","next.vue"]]);const SU=Symbol("ElSelectGroup"),Ym=Symbol("ElSelect");function NIe(t,e){const n=ht(Ym),r=ht(SU,{disabled:!1}),i=M(()=>c($o(n.props.modelValue),t.value)),o=M(()=>{var h;if(n.props.multiple){const m=$o((h=n.props.modelValue)!=null?h:[]);return!i.value&&m.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),a=M(()=>t.label||(sn(t.value)?"":t.value)),s=M(()=>t.value||t.label||""),l=M(()=>t.disabled||e.groupDisabled||o.value),u=en(),c=(h=[],m)=>{if(sn(t.value)){const g=n.props.valueKey;return h&&h.some(y=>Bn(Wr(y,g))===Wr(m,g))}else return h&&h.includes(m)},d=()=>{!t.disabled&&!r.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(u.proxy))},f=h=>{const m=new RegExp(n$(h),"i");e.visible=m.test(a.value)||t.created};return Ve(()=>a.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Ve(()=>t.value,(h,m)=>{const{remote:g,valueKey:y}=n.props;if(h!==m&&(n.onOptionDestroy(m,u.proxy),n.onOptionCreate(u.proxy)),!t.created&&!g){if(y&&sn(h)&&sn(m)&&h[y]===m[y])return;n.setSelected()}}),Ve(()=>r.disabled,()=>{e.groupDisabled=r.disabled},{immediate:!0}),{select:n,currentLabel:a,currentValue:s,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:f}}const DIe=ue({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=Qe("select"),n=bo(),r=M(()=>[e.be("dropdown","item"),e.is("disabled",p(s)),e.is("selected",p(a)),e.is("hovering",p(f))]),i=Sn({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c}=NIe(t,i),{visible:d,hover:f}=Ri(i),h=en().proxy;l.onOptionCreate(h),pr(()=>{const g=h.value,{selected:y}=l.states,w=(l.props.multiple?y:[y]).some(O=>O.value===h.value);Ot(()=>{l.states.cachedOptions.get(g)===h&&!w&&l.states.cachedOptions.delete(g)}),l.onOptionDestroy(g,h)});function m(){s.value||l.handleOptionSelect(h)}return{ns:e,id:n,containerKls:r,currentLabel:o,itemSelected:a,isDisabled:s,select:l,hoverItem:u,updateOption:c,visible:d,hover:f,selectOptionClick:m,states:i}}});function LIe(t,e,n,r,i,o){return Ht((R(),G("li",{id:t.id,class:j(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:Pt(t.selectOptionClick,["stop"])},[xe(t.$slots,"default",{},()=>[J("span",null,je(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[zn,t.visible]])}var rN=Ge(DIe,[["render",LIe],["__file","option.vue"]]);const IIe=ue({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=ht(Ym),e=Qe("select"),n=M(()=>t.props.popperClass),r=M(()=>t.props.multiple),i=M(()=>t.props.fitInputWidth),o=F("");function a(){var s;o.value=`${(s=t.selectRef)==null?void 0:s.offsetWidth}px`}return Bt(()=>{a(),Zr(t.selectRef,a)}),{ns:e,minWidth:o,popperClass:n,isMultiple:r,isFitInputWidth:i}}});function BIe(t,e,n,r,i,o){return R(),G("div",{class:j([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:mt({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(R(),G("div",{key:0,class:j(t.ns.be("dropdown","header"))},[xe(t.$slots,"header")],2)):_e("v-if",!0),xe(t.$slots,"default"),t.$slots.footer?(R(),G("div",{key:1,class:j(t.ns.be("dropdown","footer"))},[xe(t.$slots,"footer")],2)):_e("v-if",!0)],6)}var FIe=Ge(IIe,[["render",BIe],["__file","select-dropdown.vue"]]);const VIe=11,jIe=(t,e)=>{const{t:n}=kn(),r=bo(),i=Qe("select"),o=Qe("input"),a=Sn({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),s=F(null),l=F(null),u=F(null),c=F(null),d=F(null),f=F(null),h=F(null),m=F(null),g=F(null),y=F(null),b=F(null),w=F(null),{isComposing:O,handleCompositionStart:S,handleCompositionUpdate:x,handleCompositionEnd:C}=Qx({afterComposition:et=>Ke(et)}),{wrapperRef:E,isFocused:T,handleBlur:P}=Pb(d,{beforeFocus(){return U.value},afterFocus(){t.automaticDropdown&&!A.value&&(A.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(et){var Mt,Vn;return((Mt=u.value)==null?void 0:Mt.isFocusInsideContent(et))||((Vn=c.value)==null?void 0:Vn.isFocusInsideContent(et))},afterBlur(){A.value=!1,a.menuVisibleOnFocus=!1}}),A=F(!1),D=F(),{form:N,formItem:$}=ua(),{inputId:W}=gu(t,{formItemContext:$}),{valueOnClear:L,isEmptyValue:I}=Hx(t),U=M(()=>t.disabled||(N==null?void 0:N.disabled)),Q=M(()=>ut(t.modelValue)?t.modelValue.length>0:!I(t.modelValue)),V=M(()=>t.clearable&&!U.value&&a.inputHovering&&Q.value),q=M(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),K=M(()=>i.is("reverse",q.value&&A.value)),ie=M(()=>($==null?void 0:$.validateState)||""),oe=M(()=>p$[ie.value]),Se=M(()=>t.remote?300:0),ke=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!a.inputValue&&a.options.size===0?!1:t.filterable&&a.inputValue&&a.options.size>0&&Y.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),Y=M(()=>re.value.filter(et=>et.visible).length),re=M(()=>{const et=Array.from(a.options.values()),Mt=[];return a.optionValues.forEach(Vn=>{const zt=et.findIndex(Li=>Li.value===Vn);zt>-1&&Mt.push(et[zt])}),Mt.length>=et.length?Mt:et}),te=M(()=>Array.from(a.cachedOptions.values())),ge=M(()=>{const et=re.value.filter(Mt=>!Mt.created).some(Mt=>Mt.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!et}),Re=()=>{t.filterable&&$t(t.filterMethod)||t.filterable&&t.remote&&$t(t.remoteMethod)||re.value.forEach(et=>{var Mt;(Mt=et.updateOption)==null||Mt.call(et,a.inputValue)})},$e=Ni(),Z=M(()=>["small"].includes($e.value)?"small":"default"),ce=M({get(){return A.value&&ke.value!==!1},set(et){A.value=et}}),Te=M(()=>{if(t.multiple&&!ai(t.modelValue))return $o(t.modelValue).length===0&&!a.inputValue;const et=ut(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||ai(et)?!a.inputValue:!0}),Ie=M(()=>{var et;const Mt=(et=t.placeholder)!=null?et:n("el.select.placeholder");return t.multiple||!Q.value?Mt:a.selectedLabel}),ae=M(()=>nk?null:"mouseenter");Ve(()=>t.modelValue,(et,Mt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",me("")),X(),!so(et,Mt)&&t.validateEvent&&($==null||$.validate("change").catch(Vn=>void 0))},{flush:"post",deep:!0}),Ve(()=>A.value,et=>{et?me(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0),e("visible-change",et)}),Ve(()=>a.options.entries(),()=>{var et;if(!Tn)return;const Mt=((et=s.value)==null?void 0:et.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!ai(t.modelValue)||!Array.from(Mt).includes(document.activeElement))&&X(),t.defaultFirstOption&&(t.filterable||t.remote)&&Y.value&&Ae()},{flush:"post"}),Ve(()=>a.hoveringIndex,et=>{kt(et)&&et>-1?D.value=re.value[et]||{}:D.value={},re.value.forEach(Mt=>{Mt.hover=D.value===Mt})}),Bo(()=>{a.isBeforeHide||Re()});const me=et=>{a.previousQuery===et||O.value||(a.previousQuery=et,t.filterable&&$t(t.filterMethod)?t.filterMethod(et):t.filterable&&t.remote&&$t(t.remoteMethod)&&t.remoteMethod(et),t.defaultFirstOption&&(t.filterable||t.remote)&&Y.value?Ot(Ae):Ot(le))},Ae=()=>{const et=re.value.filter(zt=>zt.visible&&!zt.disabled&&!zt.states.groupDisabled),Mt=et.find(zt=>zt.created),Vn=et[0];a.hoveringIndex=Le(re.value,Mt||Vn)},X=()=>{if(t.multiple)a.selectedLabel="";else{const Mt=ut(t.modelValue)?t.modelValue[0]:t.modelValue,Vn=ee(Mt);a.selectedLabel=Vn.currentLabel,a.selected=[Vn];return}const et=[];ai(t.modelValue)||$o(t.modelValue).forEach(Mt=>{et.push(ee(Mt))}),a.selected=et},ee=et=>{let Mt;const Vn=u1(et).toLowerCase()==="object",zt=u1(et).toLowerCase()==="null",Li=u1(et).toLowerCase()==="undefined";for(let po=a.cachedOptions.size-1;po>=0;po--){const Ei=te.value[po];if(Vn?Wr(Ei.value,t.valueKey)===Wr(et,t.valueKey):Ei.value===et){Mt={value:et,currentLabel:Ei.currentLabel,get isDisabled(){return Ei.isDisabled}};break}}if(Mt)return Mt;const Eo=Vn?et.label:!zt&&!Li?et:"";return{value:et,currentLabel:Eo}},le=()=>{a.hoveringIndex=re.value.findIndex(et=>a.selected.some(Mt=>Er(Mt)===Er(et)))},Ce=()=>{a.selectionWidth=l.value.getBoundingClientRect().width},fe=()=>{a.calculatorWidth=f.value.getBoundingClientRect().width},Ee=()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width},be=()=>{var et,Mt;(Mt=(et=u.value)==null?void 0:et.updatePopper)==null||Mt.call(et)},Be=()=>{var et,Mt;(Mt=(et=c.value)==null?void 0:et.updatePopper)==null||Mt.call(et)},Xe=()=>{a.inputValue.length>0&&!A.value&&(A.value=!0),me(a.inputValue)},Ke=et=>{if(a.inputValue=et.target.value,t.remote)tt();else return Xe()},tt=jo(()=>{Xe()},Se.value),Dt=et=>{so(t.modelValue,et)||e(Lr,et)},jt=et=>kx(et,Mt=>!a.disabledOptions.has(Mt)),Me=et=>{if(!!t.multiple&&et.code!==St.delete&&et.target.value.length<=0){const Mt=$o(t.modelValue).slice(),Vn=jt(Mt);if(Vn<0)return;const zt=Mt[Vn];Mt.splice(Vn,1),e(Zt,Mt),Dt(Mt),e("remove-tag",zt)}},nt=(et,Mt)=>{const Vn=a.selected.indexOf(Mt);if(Vn>-1&&!U.value){const zt=$o(t.modelValue).slice();zt.splice(Vn,1),e(Zt,zt),Dt(zt),e("remove-tag",Mt.value)}et.stopPropagation(),ln()},de=et=>{et.stopPropagation();const Mt=t.multiple?[]:L.value;if(t.multiple)for(const Vn of a.selected)Vn.isDisabled&&Mt.push(Vn.value);e(Zt,Mt),Dt(Mt),a.hoveringIndex=-1,A.value=!1,e("clear"),ln()},Pe=et=>{var Mt;if(t.multiple){const Vn=$o((Mt=t.modelValue)!=null?Mt:[]).slice(),zt=Le(Vn,et.value);zt>-1?Vn.splice(zt,1):(t.multipleLimit<=0||Vn.length{wt(et)})},Le=(et=[],Mt)=>{if(!sn(Mt))return et.indexOf(Mt);const Vn=t.valueKey;let zt=-1;return et.some((Li,Eo)=>Bn(Wr(Li,Vn))===Wr(Mt,Vn)?(zt=Eo,!0):!1),zt},wt=et=>{var Mt,Vn,zt,Li,Eo;const Wo=ut(et)?et[0]:et;let po=null;if(Wo!=null&&Wo.value){const Ei=re.value.filter(Uo=>Uo.value===Wo.value);Ei.length>0&&(po=Ei[0].$el)}if(u.value&&po){const Ei=(Li=(zt=(Vn=(Mt=u.value)==null?void 0:Mt.popperRef)==null?void 0:Vn.contentRef)==null?void 0:zt.querySelector)==null?void 0:Li.call(zt,`.${i.be("dropdown","wrap")}`);Ei&&i$(Ei,po)}(Eo=w.value)==null||Eo.handleScroll()},tn=et=>{a.options.set(et.value,et),a.cachedOptions.set(et.value,et),et.disabled&&a.disabledOptions.set(et.value,et)},De=(et,Mt)=>{a.options.get(et)===Mt&&a.options.delete(et)},xt=M(()=>{var et,Mt;return(Mt=(et=u.value)==null?void 0:et.popperRef)==null?void 0:Mt.contentRef}),qt=()=>{a.isBeforeHide=!1,Ot(()=>wt(a.selected))},ln=()=>{var et;(et=d.value)==null||et.focus()},nn=()=>{var et;if(A.value){A.value=!1,Ot(()=>{var Mt;return(Mt=d.value)==null?void 0:Mt.blur()});return}(et=d.value)==null||et.blur()},bn=et=>{de(et)},Ze=et=>{if(A.value=!1,T.value){const Mt=new FocusEvent("focus",et);Ot(()=>P(Mt))}},Rt=()=>{a.inputValue.length>0?a.inputValue="":A.value=!1},xn=()=>{U.value||(nk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:A.value=!A.value)},fn=()=>{A.value?re.value[a.hoveringIndex]&&Pe(re.value[a.hoveringIndex]):xn()},Er=et=>sn(et.value)?Wr(et.value,t.valueKey):et.value,dr=M(()=>re.value.filter(et=>et.visible).every(et=>et.disabled)),eo=M(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),Pi=M(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Oi=et=>{if(!A.value){A.value=!0;return}if(!(a.options.size===0||a.filteredOptionsCount===0||O.value)&&!dr.value){et==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):et==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Mt=re.value[a.hoveringIndex];(Mt.disabled===!0||Mt.states.groupDisabled===!0||!Mt.visible)&&Oi(et),Ot(()=>wt(D.value))}},Ml=()=>{if(!l.value)return 0;const et=window.getComputedStyle(l.value);return Number.parseFloat(et.gap||"6px")},cs=M(()=>{const et=Ml();return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-et:a.selectionWidth}px`}}),_r=M(()=>({maxWidth:`${a.selectionWidth}px`})),Rl=M(()=>({width:`${Math.max(a.calculatorWidth,VIe)}px`}));return Zr(l,Ce),Zr(f,fe),Zr(g,be),Zr(E,be),Zr(y,Be),Zr(b,Ee),Bt(()=>{X()}),{inputId:W,contentId:r,nsSelect:i,nsInput:o,states:a,isFocused:T,expanded:A,optionsArray:re,hoverOption:D,selectSize:$e,filteredOptionsCount:Y,resetCalculatorWidth:fe,updateTooltip:be,updateTagTooltip:Be,debouncedOnInputChange:tt,onInput:Ke,deletePrevTag:Me,deleteTag:nt,deleteSelected:de,handleOptionSelect:Pe,scrollToOption:wt,hasModelValue:Q,shouldShowPlaceholder:Te,currentPlaceholder:Ie,mouseEnterEventName:ae,showClose:V,iconComponent:q,iconReverse:K,validateState:ie,validateIcon:oe,showNewOption:ge,updateOptions:Re,collapseTagSize:Z,setSelected:X,selectDisabled:U,emptyText:ke,handleCompositionStart:S,handleCompositionUpdate:x,handleCompositionEnd:C,onOptionCreate:tn,onOptionDestroy:De,handleMenuEnter:qt,focus:ln,blur:nn,handleClearClick:bn,handleClickOutside:Ze,handleEsc:Rt,toggleMenu:xn,selectOption:fn,getValueKey:Er,navigateOptions:Oi,dropdownMenuVisible:ce,showTagList:eo,collapseTagList:Pi,tagStyle:cs,collapseTagStyle:_r,inputStyle:Rl,popperRef:xt,inputRef:d,tooltipRef:u,tagTooltipRef:c,calculatorRef:f,prefixRef:h,suffixRef:m,selectRef:s,wrapperRef:E,selectionRef:l,scrollbarRef:w,menuRef:g,tagMenuRef:y,collapseItemRef:b}};var zIe=ue({name:"ElOptions",setup(t,{slots:e}){const n=ht(Ym);let r=[];return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];function l(u){!ut(u)||u.forEach(c=>{var d,f,h,m;const g=(d=(c==null?void 0:c.type)||{})==null?void 0:d.name;g==="ElOptionGroup"?l(!At(c.children)&&!ut(c.children)&&$t((f=c.children)==null?void 0:f.default)?(h=c.children)==null?void 0:h.default():c.children):g==="ElOption"?s.push((m=c.props)==null?void 0:m.value):ut(c.children)&&l(c.children)})}return a.length&&l((o=a[0])==null?void 0:o.children),so(s,r)||(r=s,n&&(n.states.optionValues=s)),a}}});const QIe=Ye({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Wi,effect:{type:Oe(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod: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:io.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:fr,default:Bf},fitInputWidth:Boolean,suffixIcon:{type:fr,default:ld},tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","top-start","right","left"]},appendTo:String,...Wm,...wo(["ariaLabel"])}),P8="ElSelect",HIe=ue({name:P8,componentName:P8,components:{ElSelectMenu:FIe,ElOption:rN,ElOptions:zIe,ElTag:Bs,ElScrollbar:mu,ElTooltip:Ui,ElIcon:gt},directives:{ClickOutside:qc},props:QIe,emits:[Zt,Lr,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const n=M(()=>{const{modelValue:a,multiple:s}=t,l=s?[]:void 0;return ut(a)?s?a:l:s?l:a}),r=Sn({...Ri(t),modelValue:n}),i=jIe(r,e);_n(Ym,Sn({props:r,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected}));const o=M(()=>t.multiple?i.states.selected.map(a=>a.currentLabel):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:o}}});function WIe(t,e,n,r,i,o){const a=an("el-tag"),s=an("el-tooltip"),l=an("el-icon"),u=an("el-option"),c=an("el-options"),d=an("el-scrollbar"),f=an("el-select-menu"),h=dx("click-outside");return Ht((R(),G("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[gy(t.mouseEnterEventName)]:m=>t.states.inputHovering=!0,onMouseleave:m=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"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,onBeforeShow:t.handleMenuEnter,onHide:m=>t.states.isBeforeHide=!1},{default:z(()=>{var m;return[J("div",{ref:"wrapperRef",class:j([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:Pt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),G("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[xe(t.$slots,"prefix")],2)):_e("v-if",!0),J("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?xe(t.$slots,"tag",{key:0},()=>[(R(!0),G(ct,null,Wt(t.showTagList,g=>(R(),G("div",{key:t.getValueKey(g),class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.tagStyle),onClose:y=>t.deleteTag(y,g)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[qe(je(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(R(),we(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:z(()=>[J("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.collapseTagStyle)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))}," + "+je(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:z(()=>[J("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(R(!0),G(ct,null,Wt(t.collapseTagList,g=>(R(),G("div",{key:t.getValueKey(g),class:j(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!g.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:y=>t.deleteTag(y,g)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:g.currentLabel,value:g.value},()=>[qe(je(g.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):_e("v-if",!0)]):_e("v-if",!0),t.selectDisabled?_e("v-if",!0):(R(),G("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Ht(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":g=>t.states.inputValue=g,type:"text",name:t.name,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:mt(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((m=t.hoverOption)==null?void 0:m.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[br(Pt(g=>t.navigateOptions("next"),["stop","prevent"]),["down"]),br(Pt(g=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),br(Pt(t.handleEsc,["stop","prevent"]),["esc"]),br(Pt(t.selectOption,["stop","prevent"]),["enter"]),br(Pt(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:Pt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[JM,t.states.inputValue]]),t.filterable?(R(),G("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:je(t.states.inputValue)},null,10,["textContent"])):_e("v-if",!0)],2)),t.shouldShowPlaceholder?(R(),G("div",{key:2,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?xe(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,je(t.currentPlaceholder),1)]):(R(),G("span",{key:1},je(t.currentPlaceholder),1))],2)):_e("v-if",!0)],2),J("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(R(),we(l,{key:0,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),t.showClose&&t.clearIcon?(R(),we(l,{key:1,class:j([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:z(()=>[(R(),we(un(t.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.validateState&&t.validateIcon?(R(),we(l,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:z(()=>[(R(),we(un(t.validateIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],10,["onClick"])]}),content:z(()=>[B(f,{ref:"menuRef"},{default:z(()=>[t.$slots.header?(R(),G("div",{key:0,class:j(t.nsSelect.be("dropdown","header")),onClick:Pt(()=>{},["stop"])},[xe(t.$slots,"header")],10,["onClick"])):_e("v-if",!0),Ht(B(d,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:j([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:z(()=>[t.showNewOption?(R(),we(u,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):_e("v-if",!0),B(c,null,{default:z(()=>[xe(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[zn,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(R(),G("div",{key:1,class:j(t.nsSelect.be("dropdown","loading"))},[xe(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(R(),G("div",{key:2,class:j(t.nsSelect.be("dropdown","empty"))},[xe(t.$slots,"empty",{},()=>[J("span",null,je(t.emptyText),1)])],2)):_e("v-if",!0),t.$slots.footer?(R(),G("div",{key:3,class:j(t.nsSelect.be("dropdown","footer")),onClick:Pt(()=>{},["stop"])},[xe(t.$slots,"footer")],10,["onClick"])):_e("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","append-to","onBeforeShow","onHide"])],16,["onMouseleave"])),[[h,t.handleClickOutside,t.popperRef]])}var UIe=Ge(HIe,[["render",WIe],["__file","select.vue"]]);const qIe=ue({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Qe("select"),n=F(null),r=en(),i=F([]);_n(SU,Sn({...Ri(t)}));const o=M(()=>i.value.some(u=>u.visible===!0)),a=u=>{var c,d;return((c=u.type)==null?void 0:c.name)==="ElOption"&&!!((d=u.component)!=null&&d.proxy)},s=u=>{const c=$o(u),d=[];return c.forEach(f=>{var h,m;a(f)?d.push(f.component.proxy):(h=f.children)!=null&&h.length?d.push(...s(f.children)):(m=f.component)!=null&&m.subTree&&d.push(...s(f.component.subTree))}),d},l=()=>{i.value=s(r.subTree)};return Bt(()=>{l()}),l7(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function YIe(t,e,n,r,i,o){return Ht((R(),G("ul",{ref:"groupRef",class:j(t.ns.be("group","wrap"))},[J("li",{class:j(t.ns.be("group","title"))},je(t.label),3),J("li",null,[J("ul",{class:j(t.ns.b("group"))},[xe(t.$slots,"default")],2)])],2)),[[zn,t.visible]])}var xU=Ge(qIe,[["render",YIe],["__file","option-group.vue"]]);const Ol=Vt(UIe,{Option:rN,OptionGroup:xU}),Yc=ti(rN),XIe=ti(xU),iN=()=>ht(wU,{}),ZIe=Ye({pageSize:{type:Number,required:!0},pageSizes:{type:Oe(Array),default:()=>Jr([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:cc},appendSizeTo:String}),GIe=ue({name:"ElPaginationSizes"}),KIe=ue({...GIe,props:ZIe,emits:["page-size-change"],setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("pagination"),o=iN(),a=F(n.pageSize);Ve(()=>n.pageSizes,(u,c)=>{if(!so(u,c)&&Array.isArray(u)){const d=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];e("page-size-change",d)}}),Ve(()=>n.pageSize,u=>{a.value=u});const s=M(()=>n.pageSizes);function l(u){var c;u!==a.value&&(a.value=u,(c=o.handleSizeChange)==null||c.call(o,Number(u)))}return(u,c)=>(R(),G("span",{class:j(p(i).e("sizes"))},[B(p(Ol),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:l},{default:z(()=>[(R(!0),G(ct,null,Wt(p(s),d=>(R(),we(p(Yc),{key:d,value:d,label:d+p(r)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported","append-to"])],2))}});var JIe=Ge(KIe,[["__file","sizes.vue"]]);const e3e=Ye({size:{type:String,values:cc}}),t3e=ue({name:"ElPaginationJumper"}),n3e=ue({...t3e,props:e3e,setup(t){const{t:e}=kn(),n=Qe("pagination"),{pageCount:r,disabled:i,currentPage:o,changeEvent:a}=iN(),s=F(),l=M(()=>{var d;return(d=s.value)!=null?d:o==null?void 0:o.value});function u(d){s.value=d?+d:""}function c(d){d=Math.trunc(+d),a==null||a(d),s.value=void 0}return(d,f)=>(R(),G("span",{class:j(p(n).e("jump")),disabled:p(i)},[J("span",{class:j([p(n).e("goto")])},je(p(e)("el.pagination.goto")),3),B(p(hi),{size:d.size,class:j([p(n).e("editor"),p(n).is("in-pagination")]),min:1,max:p(r),disabled:p(i),"model-value":p(l),"validate-event":!1,"aria-label":p(e)("el.pagination.page"),type:"number","onUpdate:modelValue":u,onChange:c},null,8,["size","class","max","disabled","model-value","aria-label"]),J("span",{class:j([p(n).e("classifier")])},je(p(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var r3e=Ge(n3e,[["__file","jumper.vue"]]);const i3e=Ye({total:{type:Number,default:1e3}}),o3e=ue({name:"ElPaginationTotal"}),a3e=ue({...o3e,props:i3e,setup(t){const{t:e}=kn(),n=Qe("pagination"),{disabled:r}=iN();return(i,o)=>(R(),G("span",{class:j(p(n).e("total")),disabled:p(r)},je(p(e)("el.pagination.total",{total:i.total})),11,["disabled"]))}});var s3e=Ge(a3e,[["__file","total.vue"]]);const l3e=Ye({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),u3e=ue({name:"ElPaginationPager"}),c3e=ue({...u3e,props:l3e,emits:["change"],setup(t,{emit:e}){const n=t,r=Qe("pager"),i=Qe("icon"),{t:o}=kn(),a=F(!1),s=F(!1),l=F(!1),u=F(!1),c=F(!1),d=F(!1),f=M(()=>{const S=n.pagerCount,x=(S-1)/2,C=Number(n.currentPage),E=Number(n.pageCount);let T=!1,P=!1;E>S&&(C>S-x&&(T=!0),C["more","btn-quickprev",i.b(),r.is("disabled",n.disabled)]),m=M(()=>["more","btn-quicknext",i.b(),r.is("disabled",n.disabled)]),g=M(()=>n.disabled?-1:0);Bo(()=>{const S=(n.pagerCount-1)/2;a.value=!1,s.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-S&&(a.value=!0),n.currentPageE&&(C=E)),C!==T&&e("change",C)}return(S,x)=>(R(),G("ul",{class:j(p(r).b()),onClick:O,onKeyup:br(w,["enter"])},[S.pageCount>0?(R(),G("li",{key:0,class:j([[p(r).is("active",S.currentPage===1),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":p(o)("el.pagination.currentPage",{pager:1}),tabindex:p(g)}," 1 ",10,["aria-current","aria-label","tabindex"])):_e("v-if",!0),a.value?(R(),G("li",{key:1,class:j(p(h)),tabindex:p(g),"aria-label":p(o)("el.pagination.prevPages",{pager:S.pagerCount-2}),onMouseenter:C=>y(!0),onMouseleave:C=>l.value=!1,onFocus:C=>b(!0),onBlur:C=>c.value=!1},[(l.value||c.value)&&!S.disabled?(R(),we(p(vf),{key:0})):(R(),we(p(Oy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):_e("v-if",!0),(R(!0),G(ct,null,Wt(p(f),C=>(R(),G("li",{key:C,class:j([[p(r).is("active",S.currentPage===C),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===C,"aria-label":p(o)("el.pagination.currentPage",{pager:C}),tabindex:p(g)},je(C),11,["aria-current","aria-label","tabindex"]))),128)),s.value?(R(),G("li",{key:2,class:j(p(m)),tabindex:p(g),"aria-label":p(o)("el.pagination.nextPages",{pager:S.pagerCount-2}),onMouseenter:C=>y(),onMouseleave:C=>u.value=!1,onFocus:C=>b(),onBlur:C=>d.value=!1},[(u.value||d.value)&&!S.disabled?(R(),we(p(yf),{key:0})):(R(),we(p(Oy),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):_e("v-if",!0),S.pageCount>1?(R(),G("li",{key:3,class:j([[p(r).is("active",S.currentPage===S.pageCount),p(r).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":p(o)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:p(g)},je(S.pageCount),11,["aria-current","aria-label","tabindex"])):_e("v-if",!0)],42,["onKeyup"]))}});var d3e=Ge(c3e,[["__file","pager.vue"]]);const ga=t=>typeof t!="number",f3e=Ye({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>kt(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:Oe(Array),default:()=>Jr([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:fr,default:()=>mf},nextText:{type:String,default:""},nextIcon:{type:fr,default:()=>ba},teleported:{type:Boolean,default:!0},small:Boolean,size:Wi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),h3e={"update:current-page":t=>kt(t),"update:page-size":t=>kt(t),"size-change":t=>kt(t),change:(t,e)=>kt(t)&&kt(e),"current-change":t=>kt(t),"prev-click":t=>kt(t),"next-click":t=>kt(t)},A8="ElPagination";var p3e=ue({name:A8,props:f3e,emits:h3e,setup(t,{emit:e,slots:n}){const{t:r}=kn(),i=Qe("pagination"),o=en().vnode.props||{},a=SH(),s=M(()=>{var x;return t.small?"small":(x=t.size)!=null?x:a.value});Jd({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(ga(t.total)&&ga(t.pageCount)||!ga(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(ga(t.pageCount)){if(!ga(t.total)&&!ga(t.pageSize)&&!u)return!1}else if(!u)return!1}return!0}),d=F(ga(t.defaultPageSize)?10:t.defaultPageSize),f=F(ga(t.defaultCurrentPage)?1:t.defaultCurrentPage),h=M({get(){return ga(t.pageSize)?d.value:t.pageSize},set(x){ga(t.pageSize)&&(d.value=x),u&&(e("update:page-size",x),e("size-change",x))}}),m=M(()=>{let x=0;return ga(t.pageCount)?ga(t.total)||(x=Math.max(1,Math.ceil(t.total/h.value))):x=t.pageCount,x}),g=M({get(){return ga(t.currentPage)?f.value:t.currentPage},set(x){let C=x;x<1?C=1:x>m.value&&(C=m.value),ga(t.currentPage)&&(f.value=C),l&&(e("update:current-page",C),e("current-change",C))}});Ve(m,x=>{g.value>x&&(g.value=x)}),Ve([g,h],x=>{e("change",...x)},{flush:"post"});function y(x){g.value=x}function b(x){h.value=x;const C=m.value;g.value>C&&(g.value=C)}function w(){t.disabled||(g.value-=1,e("prev-click",g.value))}function O(){t.disabled||(g.value+=1,e("next-click",g.value))}function S(x,C){x&&(x.props||(x.props={}),x.props.class=[x.props.class,C].join(" "))}return _n(wU,{pageCount:m,disabled:M(()=>t.disabled),currentPage:g,changeEvent:y,handleSizeChange:b}),()=>{var x,C;if(!c.value)return r("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&m.value<=1)return null;const E=[],T=[],P=Et("div",{class:i.e("rightwrapper")},T),A={prev:Et(PIe,{disabled:t.disabled,currentPage:g.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:w}),jumper:Et(r3e,{size:s.value}),pager:Et(d3e,{currentPage:g.value,pageCount:m.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:Et($Ie,{disabled:t.disabled,currentPage:g.value,pageCount:m.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:O}),sizes:Et(JIe,{pageSize:h.value,pageSizes:t.pageSizes,popperClass:t.popperClass,disabled:t.disabled,teleported:t.teleported,size:s.value,appendSizeTo:t.appendSizeTo}),slot:(C=(x=n==null?void 0:n.default)==null?void 0:x.call(n))!=null?C:null,total:Et(s3e,{total:ga(t.total)?0:t.total})},D=t.layout.split(",").map($=>$.trim());let N=!1;return D.forEach($=>{if($==="->"){N=!0;return}N?T.push(A[$]):E.push(A[$])}),S(E[0],i.is("first")),S(E[E.length-1],i.is("last")),N&&T.length>0&&(S(T[0],i.is("first")),S(T[T.length-1],i.is("last")),E.push(P)),Et("div",{class:[i.b(),i.is("background",t.background),i.m(s.value)]},E)}}});const eC=Vt(p3e),g3e=Ye({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:Mk,default:"primary"},cancelButtonType:{type:String,values:Mk,default:"text"},icon:{type:fr,default:()=>xCe},iconColor:{type:String,default:"#f90"},hideIcon:{type:Boolean,default:!1},hideAfter:{type:Number,default:200},teleported:io.teleported,persistent:io.persistent,width:{type:[String,Number],default:150}}),m3e={confirm:t=>t instanceof MouseEvent,cancel:t=>t instanceof MouseEvent},v3e=ue({name:"ElPopconfirm"}),y3e=ue({...v3e,props:g3e,emits:m3e,setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("popconfirm"),o=F(),a=()=>{var f,h;(h=(f=o.value)==null?void 0:f.onClose)==null||h.call(f)},s=M(()=>({width:pi(n.width)})),l=f=>{e("confirm",f),a()},u=f=>{e("cancel",f),a()},c=M(()=>n.confirmButtonText||r("el.popconfirm.confirmButtonText")),d=M(()=>n.cancelButtonText||r("el.popconfirm.cancelButtonText"));return(f,h)=>(R(),we(p(Ui),gn({ref_key:"tooltipRef",ref:o,trigger:"click",effect:"light"},f.$attrs,{"popper-class":`${p(i).namespace.value}-popover`,"popper-style":p(s),teleported:f.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":f.hideAfter,persistent:f.persistent}),{content:z(()=>[J("div",{class:j(p(i).b())},[J("div",{class:j(p(i).e("main"))},[!f.hideIcon&&f.icon?(R(),we(p(gt),{key:0,class:j(p(i).e("icon")),style:mt({color:f.iconColor})},{default:z(()=>[(R(),we(un(f.icon)))]),_:1},8,["class","style"])):_e("v-if",!0),qe(" "+je(f.title),1)],2),J("div",{class:j(p(i).e("action"))},[xe(f.$slots,"actions",{confirm:l,cancel:u},()=>[B(p(lr),{size:"small",type:f.cancelButtonType==="text"?"":f.cancelButtonType,text:f.cancelButtonType==="text",onClick:u},{default:z(()=>[qe(je(p(d)),1)]),_:1},8,["type","text"]),B(p(lr),{size:"small",type:f.confirmButtonType==="text"?"":f.confirmButtonType,text:f.confirmButtonType==="text",onClick:l},{default:z(()=>[qe(je(p(c)),1)]),_:1},8,["type","text"])])],2)],2)]),default:z(()=>[f.$slots.reference?xe(f.$slots,"reference",{key:0}):_e("v-if",!0)]),_:3},16,["popper-class","popper-style","teleported","hide-after","persistent"]))}});var b3e=Ge(y3e,[["__file","popconfirm.vue"]]);const _3e=Vt(b3e),O3e=Ye({trigger:v0.trigger,placement:E1.placement,disabled:v0.disabled,visible:io.visible,transition:io.transition,popperOptions:E1.popperOptions,tabindex:E1.tabindex,content:io.content,popperStyle:io.popperStyle,popperClass:io.popperClass,enterable:{...io.enterable,default:!0},effect:{...io.effect,default:"light"},teleported:io.teleported,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}}),w3e={"update:visible":t=>si(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},S3e="onUpdate:visible",x3e=ue({name:"ElPopover"}),C3e=ue({...x3e,props:O3e,emits:w3e,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>r[S3e]),o=Qe("popover"),a=F(),s=M(()=>{var y;return(y=p(a))==null?void 0:y.popperRef}),l=M(()=>[{width:pi(r.width)},r.popperStyle]),u=M(()=>[o.b(),r.popperClass,{[o.m("plain")]:!!r.content}]),c=M(()=>r.transition===`${o.namespace.value}-fade-in-linear`),d=()=>{var y;(y=a.value)==null||y.hide()},f=()=>{n("before-enter")},h=()=>{n("before-leave")},m=()=>{n("after-enter")},g=()=>{n("update:visible",!1),n("after-leave")};return e({popperRef:s,hide:d}),(y,b)=>(R(),we(p(Ui),gn({ref_key:"tooltipRef",ref:a},y.$attrs,{trigger:y.trigger,placement:y.placement,disabled:y.disabled,visible:y.visible,transition:y.transition,"popper-options":y.popperOptions,tabindex:y.tabindex,content:y.content,offset:y.offset,"show-after":y.showAfter,"hide-after":y.hideAfter,"auto-close":y.autoClose,"show-arrow":y.showArrow,"aria-label":y.title,effect:y.effect,enterable:y.enterable,"popper-class":p(u),"popper-style":p(l),teleported:y.teleported,persistent:y.persistent,"gpu-acceleration":p(c),"onUpdate:visible":p(i),onBeforeShow:f,onBeforeHide:h,onShow:m,onHide:g}),{content:z(()=>[y.title?(R(),G("div",{key:0,class:j(p(o).e("title")),role:"title"},je(y.title),3)):_e("v-if",!0),xe(y.$slots,"default",{},()=>[qe(je(y.content),1)])]),default:z(()=>[y.$slots.reference?xe(y.$slots,"reference",{key:0}):_e("v-if",!0)]),_:3},16,["trigger","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","persistent","gpu-acceleration","onUpdate:visible"]))}});var E3e=Ge(C3e,[["__file","popover.vue"]]);const M8=(t,e)=>{const n=e.arg||e.value,r=n==null?void 0:n.popperRef;r&&(r.triggerRef=t)};var T3e={mounted(t,e){M8(t,e)},updated(t,e){M8(t,e)}};const k3e="popover",CU=ZCe(T3e,k3e),P3e=Vt(E3e,{directive:CU}),A3e=Ye({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:Oe(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Oe([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Oe(Function),default:t=>`${t}%`}}),M3e=ue({name:"ElProgress"}),R3e=ue({...M3e,props:A3e,setup(t){const e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},r=Qe("progress"),i=M(()=>{const O={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},S=w(e.percentage);return S.includes("gradient")?O.background=S:O.backgroundColor=S,O}),o=M(()=>(e.strokeWidth/e.width*100).toFixed(1)),a=M(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),s=M(()=>{const O=a.value,S=e.type==="dashboard";return` M 50 50 m 0 ${S?"":"-"}${O} a ${O} ${O} 0 1 1 0 ${S?"-":""}${O*2} a ${O} ${O} 0 1 1 0 ${S?"":"-"}${O*2} `}),l=M(()=>2*Math.PI*a.value),u=M(()=>e.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*(e.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 O;return e.color?O=w(e.percentage):O=n[e.status]||n.default,O}),m=M(()=>e.status==="warning"?Ix:e.type==="line"?e.status==="success"?a$:Bf:e.status==="success"?Sb:_a),g=M(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),y=M(()=>e.format(e.percentage));function b(O){const S=100/O.length;return O.map((C,E)=>At(C)?{color:C,percentage:(E+1)*S}:C).sort((C,E)=>C.percentage-E.percentage)}const w=O=>{var S;const{color:x}=e;if($t(x))return x(O);if(At(x))return x;{const C=b(x);for(const E of C)if(E.percentage>O)return E.color;return(S=C[C.length-1])==null?void 0:S.color}};return(O,S)=>(R(),G("div",{class:j([p(r).b(),p(r).m(O.type),p(r).is(O.status),{[p(r).m("without-text")]:!O.showText,[p(r).m("text-inside")]:O.textInside}]),role:"progressbar","aria-valuenow":O.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[O.type==="line"?(R(),G("div",{key:0,class:j(p(r).b("bar"))},[J("div",{class:j(p(r).be("bar","outer")),style:mt({height:`${O.strokeWidth}px`})},[J("div",{class:j([p(r).be("bar","inner"),{[p(r).bem("bar","inner","indeterminate")]:O.indeterminate},{[p(r).bem("bar","inner","striped")]:O.striped},{[p(r).bem("bar","inner","striped-flow")]:O.stripedFlow}]),style:mt(p(i))},[(O.showText||O.$slots.default)&&O.textInside?(R(),G("div",{key:0,class:j(p(r).be("bar","innerText"))},[xe(O.$slots,"default",{percentage:O.percentage},()=>[J("span",null,je(p(y)),1)])],2)):_e("v-if",!0)],6)],6)],2)):(R(),G("div",{key:1,class:j(p(r).b("circle")),style:mt({height:`${O.width}px`,width:`${O.width}px`})},[(R(),G("svg",{viewBox:"0 0 100 100"},[J("path",{class:j(p(r).be("circle","track")),d:p(s),stroke:`var(${p(r).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),fill:"none",style:mt(p(d))},null,14,["d","stroke","stroke-linecap","stroke-width"]),J("path",{class:j(p(r).be("circle","path")),d:p(s),stroke:p(h),fill:"none",opacity:O.percentage?1:0,"stroke-linecap":O.strokeLinecap,"stroke-width":p(o),style:mt(p(f))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(O.showText||O.$slots.default)&&!O.textInside?(R(),G("div",{key:2,class:j(p(r).e("text")),style:mt({fontSize:`${p(g)}px`})},[xe(O.$slots,"default",{percentage:O.percentage},()=>[O.status?(R(),we(p(gt),{key:1},{default:z(()=>[(R(),we(un(p(m))))]),_:1})):(R(),G("span",{key:0},je(p(y)),1))])],6)):_e("v-if",!0)],10,["aria-valuenow"]))}});var $3e=Ge(R3e,[["__file","progress.vue"]]);const EU=Vt($3e),N3e=Ye({modelValue:{type:Number,default:0},id:{type:String,default:void 0},lowThreshold:{type:Number,default:2},highThreshold:{type:Number,default:4},max:{type:Number,default:5},colors:{type:Oe([Array,Object]),default:()=>Jr(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:Oe([Array,Object]),default:()=>[J_,J_,J_]},voidIcon:{type:fr,default:()=>FCe},disabledVoidIcon:{type:fr,default:()=>J_},disabled:Boolean,allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Oe(Array),default:()=>Jr(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:Wi,clearable:Boolean,...wo(["ariaLabel"])}),D3e={[Lr]:t=>kt(t),[Zt]:t=>kt(t)},L3e=ue({name:"ElRate"}),I3e=ue({...L3e,props:N3e,emits:D3e,setup(t,{expose:e,emit:n}){const r=t;function i(I,U){const Q=K=>sn(K),V=Object.keys(U).map(K=>+K).filter(K=>{const ie=U[K];return(Q(ie)?ie.excluded:!1)?IK-ie),q=U[V[0]];return Q(q)&&q.value||q}const o=ht(Op,void 0),a=ht(tc,void 0),s=Ni(),l=Qe("rate"),{inputId:u,isLabeledByFormItem:c}=gu(r,{formItemContext:a}),d=F(r.modelValue),f=F(-1),h=F(!0),m=M(()=>[l.b(),l.m(s.value)]),g=M(()=>r.disabled||(o==null?void 0:o.disabled)),y=M(()=>l.cssVarBlock({"void-color":r.voidColor,"disabled-void-color":r.disabledVoidColor,"fill-color":S.value})),b=M(()=>{let I="";return r.showScore?I=r.scoreTemplate.replace(/\{\s*value\s*\}/,g.value?`${r.modelValue}`:`${d.value}`):r.showText&&(I=r.texts[Math.ceil(d.value)-1]),I}),w=M(()=>r.modelValue*100-Math.floor(r.modelValue)*100),O=M(()=>ut(r.colors)?{[r.lowThreshold]:r.colors[0],[r.highThreshold]:{value:r.colors[1],excluded:!0},[r.max]:r.colors[2]}:r.colors),S=M(()=>{const I=i(d.value,O.value);return sn(I)?"":I}),x=M(()=>{let I="";return g.value?I=`${w.value}%`:r.allowHalf&&(I="50%"),{color:S.value,width:I}}),C=M(()=>{let I=ut(r.icons)?[...r.icons]:{...r.icons};return I=Bc(I),ut(I)?{[r.lowThreshold]:I[0],[r.highThreshold]:{value:I[1],excluded:!0},[r.max]:I[2]}:I}),E=M(()=>i(r.modelValue,C.value)),T=M(()=>g.value?At(r.disabledVoidIcon)?r.disabledVoidIcon:Bc(r.disabledVoidIcon):At(r.voidIcon)?r.voidIcon:Bc(r.voidIcon)),P=M(()=>i(d.value,C.value));function A(I){const U=g.value&&w.value>0&&I-1r.modelValue,Q=r.allowHalf&&h.value&&I-.5<=d.value&&I>d.value;return U||Q}function D(I){r.clearable&&I===r.modelValue&&(I=0),n(Zt,I),r.modelValue!==I&&n("change",I)}function N(I){g.value||(r.allowHalf&&h.value?D(d.value):D(I))}function $(I){if(g.value)return;let U=d.value;const Q=I.code;return Q===St.up||Q===St.right?(r.allowHalf?U+=.5:U+=1,I.stopPropagation(),I.preventDefault()):(Q===St.left||Q===St.down)&&(r.allowHalf?U-=.5:U-=1,I.stopPropagation(),I.preventDefault()),U=U<0?0:U,U=U>r.max?r.max:U,n(Zt,U),n("change",U),U}function W(I,U){if(!g.value){if(r.allowHalf&&U){let Q=U.target;Ua(Q,l.e("item"))&&(Q=Q.querySelector(`.${l.e("icon")}`)),(Q.clientWidth===0||Ua(Q,l.e("decimal")))&&(Q=Q.parentNode),h.value=U.offsetX*2<=Q.clientWidth,d.value=h.value?I-.5:I}else d.value=I;f.value=I}}function L(){g.value||(r.allowHalf&&(h.value=r.modelValue!==Math.floor(r.modelValue)),d.value=r.modelValue,f.value=-1)}return Ve(()=>r.modelValue,I=>{d.value=I,h.value=r.modelValue!==Math.floor(r.modelValue)}),r.modelValue||n(Zt,0),e({setCurrentValue:W,resetCurrentValue:L}),(I,U)=>{var Q;return R(),G("div",{id:p(u),class:j([p(m),p(l).is("disabled",p(g))]),role:"slider","aria-label":p(c)?void 0:I.ariaLabel||"rating","aria-labelledby":p(c)?(Q=p(a))==null?void 0:Q.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":p(b)||void 0,"aria-valuemin":"0","aria-valuemax":I.max,tabindex:"0",style:mt(p(y)),onKeydown:$},[(R(!0),G(ct,null,Wt(I.max,(V,q)=>(R(),G("span",{key:q,class:j(p(l).e("item")),onMousemove:K=>W(V,K),onMouseleave:L,onClick:K=>N(V)},[B(p(gt),{class:j([p(l).e("icon"),{hover:f.value===V},p(l).is("active",V<=d.value)])},{default:z(()=>[A(V)?_e("v-if",!0):(R(),G(ct,{key:0},[Ht((R(),we(un(p(P)),null,null,512)),[[zn,V<=d.value]]),Ht((R(),we(un(p(T)),null,null,512)),[[zn,!(V<=d.value)]])],64)),A(V)?(R(),G(ct,{key:1},[(R(),we(un(p(T)),{class:j([p(l).em("decimal","box")])},null,8,["class"])),B(p(gt),{style:mt(p(x)),class:j([p(l).e("icon"),p(l).e("decimal")])},{default:z(()=>[(R(),we(un(p(E))))]),_:1},8,["style","class"])],64)):_e("v-if",!0)]),_:2},1032,["class"])],42,["onMousemove","onClick"]))),128)),I.showText||I.showScore?(R(),G("span",{key:0,class:j(p(l).e("text")),style:mt({color:I.textColor})},je(p(b)),7)):_e("v-if",!0)],46,["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"])}}});var B3e=Ge(I3e,[["__file","rate.vue"]]);const F3e=Vt(B3e),hg={success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},R8={[hg.success]:Zxe,[hg.warning]:Ix,[hg.error]:s$,[hg.info]:u$},V3e=Ye({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["success","warning","info","error"],default:"info"}}),j3e=ue({name:"ElResult"}),z3e=ue({...j3e,props:V3e,setup(t){const e=t,n=Qe("result"),r=M(()=>{const i=e.icon,o=i&&hg[i]?hg[i]:"icon-info",a=R8[o]||R8["icon-info"];return{class:o,component:a}});return(i,o)=>(R(),G("div",{class:j(p(n).b())},[J("div",{class:j(p(n).e("icon"))},[xe(i.$slots,"icon",{},()=>[p(r).component?(R(),we(un(p(r).component),{key:0,class:j(p(r).class)},null,8,["class"])):_e("v-if",!0)])],2),i.title||i.$slots.title?(R(),G("div",{key:0,class:j(p(n).e("title"))},[xe(i.$slots,"title",{},()=>[J("p",null,je(i.title),1)])],2)):_e("v-if",!0),i.subTitle||i.$slots["sub-title"]?(R(),G("div",{key:1,class:j(p(n).e("subtitle"))},[xe(i.$slots,"sub-title",{},()=>[J("p",null,je(i.subTitle),1)])],2)):_e("v-if",!0),i.$slots.extra?(R(),G("div",{key:2,class:j(p(n).e("extra"))},[xe(i.$slots,"extra")],2)):_e("v-if",!0)],2))}});var Q3e=Ge(z3e,[["__file","result.vue"]]);const H3e=Vt(Q3e);var $8=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function W3e(t,e){return!!(t===e||$8(t)&&$8(e))}function U3e(t,e){if(t.length!==e.length)return!1;for(var n=0;n{const e=en().proxy.$props;return M(()=>{const n=(r,i,o)=>({});return e.perfMode?gb(n):q3e(n)})},Kk=50,Sw="itemRendered",xw="scroll",pg="forward",Cw="backward",il="auto",tC="smart",_0="start",ju="center",O0="end",om="horizontal",oN="vertical",Y3e="ltr",Rg="rtl",w0="negative",aN="positive-ascending",sN="positive-descending",X3e={[om]:"left",[oN]:"top"},Z3e=20,G3e={[om]:"deltaX",[oN]:"deltaY"},K3e=({atEndEdge:t,atStartEdge:e,layout:n},r)=>{let i,o=0;const a=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:a,onWheel:l=>{tp(i);const u=l[G3e[n.value]];a(o)&&a(o+u)||(o+=u,nR()||l.preventDefault(),i=gf(()=>{r(o),o=0}))}}},Jk=hu({type:Oe([Number,Function]),required:!0}),eP=hu({type:Number}),tP=hu({type:Number,default:2}),J3e=hu({type:String,values:["ltr","rtl"],default:"ltr"}),nP=hu({type:Number,default:0}),Ew=hu({type:Number,required:!0}),kU=hu({type:String,values:["horizontal","vertical"],default:oN}),PU=Ye({className:{type:String,default:""},containerElement:{type:Oe([String,Object]),default:"div"},data:{type:Oe(Array),default:()=>Jr([])},direction:J3e,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},style:{type:Oe([Object,String,Array])},useIsScrolling:{type:Boolean,default:!1},width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:{type:Boolean,default:!1}}),AU=Ye({cache:tP,estimatedItemSize:eP,layout:kU,initScrollOffset:nP,total:Ew,itemSize:Jk,...PU}),rP={type:Number,default:6},MU={type:Number,default:0},RU={type:Number,default:2},zh=Ye({columnCache:tP,columnWidth:Jk,estimatedColumnWidth:eP,estimatedRowHeight:eP,initScrollLeft:nP,initScrollTop:nP,itemKey:{type:Oe(Function),default:({columnIndex:t,rowIndex:e})=>`${e}:${t}`},rowCache:tP,rowHeight:Jk,totalColumn:Ew,totalRow:Ew,hScrollbarSize:rP,vScrollbarSize:rP,scrollbarStartGap:MU,scrollbarEndGap:RU,role:String,...PU}),$U=Ye({alwaysOn:Boolean,class:String,layout:kU,total:Ew,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:rP,startGap:MU,endGap:RU,visible:Boolean}),Rh=(t,e)=>tt===Y3e||t===Rg||t===om,N8=t=>t===Rg;let Wp=null;function Tw(t=!1){if(Wp===null||t){const e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const r=document.createElement("div"),i=r.style;return i.width="100px",i.height="100px",e.appendChild(r),document.body.appendChild(e),e.scrollLeft>0?Wp=sN:(e.scrollLeft=1,e.scrollLeft===0?Wp=w0:Wp=aN),document.body.removeChild(e),Wp}return Wp}function e4e({move:t,size:e,bar:n},r){const i={},o=`translate${n.axis}(${t}px)`;return i[n.size]=e,i.transform=o,i.msTransform=o,i.webkitTransform=o,r==="horizontal"?i.height="100%":i.width="100%",i}const iP=ue({name:"ElVirtualScrollBar",props:$U,emits:["scroll","start-move","stop-move"],setup(t,{emit:e}){const n=M(()=>t.startGap+t.endGap),r=Qe("virtual-scrollbar"),i=Qe("scrollbar"),o=F(),a=F();let s=null,l=null;const u=Sn({isDragging:!1,traveled:0}),c=M(()=>MH[t.layout]),d=M(()=>t.clientSize-p(n)),f=M(()=>({position:"absolute",width:`${om===t.layout?d.value:t.scrollbarSize}px`,height:`${om===t.layout?t.scrollbarSize:d.value}px`,[X3e[t.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),h=M(()=>{const C=t.ratio,E=t.clientSize;if(C>=100)return Number.POSITIVE_INFINITY;if(C>=50)return C*E/100;const T=E/3;return Math.floor(Math.min(Math.max(C*E,Z3e),T))}),m=M(()=>{if(!Number.isFinite(h.value))return{display:"none"};const C=`${h.value}px`;return e4e({bar:c.value,size:C,move:u.traveled},t.layout)}),g=M(()=>Math.floor(t.clientSize-h.value-p(n))),y=()=>{window.addEventListener("mousemove",S),window.addEventListener("mouseup",O);const C=p(a);!C||(l=document.onselectstart,document.onselectstart=()=>!1,C.addEventListener("touchmove",S,{passive:!0}),C.addEventListener("touchend",O))},b=()=>{window.removeEventListener("mousemove",S),window.removeEventListener("mouseup",O),document.onselectstart=l,l=null;const C=p(a);!C||(C.removeEventListener("touchmove",S),C.removeEventListener("touchend",O))},w=C=>{C.stopImmediatePropagation(),!(C.ctrlKey||[1,2].includes(C.button))&&(u.isDragging=!0,u[c.value.axis]=C.currentTarget[c.value.offset]-(C[c.value.client]-C.currentTarget.getBoundingClientRect()[c.value.direction]),e("start-move"),y())},O=()=>{u.isDragging=!1,u[c.value.axis]=0,e("stop-move"),b()},S=C=>{const{isDragging:E}=u;if(!E||!a.value||!o.value)return;const T=u[c.value.axis];if(!T)return;tp(s);const P=(o.value.getBoundingClientRect()[c.value.direction]-C[c.value.client])*-1,A=a.value[c.value.offset]-T,D=P-A;s=gf(()=>{u.traveled=Math.max(t.startGap,Math.min(D,g.value)),e("scroll",D,g.value)})},x=C=>{const E=Math.abs(C.target.getBoundingClientRect()[c.value.direction]-C[c.value.client]),T=a.value[c.value.offset]/2,P=E-T;u.traveled=Math.max(0,Math.min(P,g.value)),e("scroll",P,g.value)};return Ve(()=>t.scrollFrom,C=>{u.isDragging||(u.traveled=Math.ceil(C*g.value))}),pr(()=>{b()}),()=>Et("div",{role:"presentation",ref:o,class:[r.b(),t.class,(t.alwaysOn||u.isDragging)&&"always-on"],style:f.value,onMousedown:Pt(x,["stop","prevent"]),onTouchstartPrevent:w},Et("div",{ref:a,class:i.e("thumb"),style:m.value,onMousedown:w},[]))}}),NU=({name:t,getOffset:e,getItemSize:n,getItemOffset:r,getEstimatedTotalSize:i,getStartIndexForOffset:o,getStopIndexForStartIndex:a,initCache:s,clearCache:l,validateProps:u})=>ue({name:t!=null?t:"ElVirtualList",props:AU,emits:[Sw,xw],setup(c,{emit:d,expose:f}){u(c);const h=en(),m=Qe("vl"),g=F(s(c,h)),y=TU(),b=F(),w=F(),O=F(),S=F({isScrolling:!1,scrollDir:"forward",scrollOffset:kt(c.initScrollOffset)?c.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:c.scrollbarAlwaysOn}),x=M(()=>{const{total:oe,cache:Se}=c,{isScrolling:ke,scrollDir:Y,scrollOffset:re}=p(S);if(oe===0)return[0,0,0,0];const te=o(c,re,p(g)),ge=a(c,te,re,p(g)),Re=!ke||Y===Cw?Math.max(1,Se):1,$e=!ke||Y===pg?Math.max(1,Se):1;return[Math.max(0,te-Re),Math.max(0,Math.min(oe-1,ge+$e)),te,ge]}),C=M(()=>i(c,p(g))),E=M(()=>S0(c.layout)),T=M(()=>[{position:"relative",[`overflow-${E.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:c.direction,height:kt(c.height)?`${c.height}px`:c.height,width:kt(c.width)?`${c.width}px`:c.width},c.style]),P=M(()=>{const oe=p(C),Se=p(E);return{height:Se?"100%":`${oe}px`,pointerEvents:p(S).isScrolling?"none":void 0,width:Se?`${oe}px`:"100%"}}),A=M(()=>E.value?c.width:c.height),{onWheel:D}=K3e({atStartEdge:M(()=>S.value.scrollOffset<=0),atEndEdge:M(()=>S.value.scrollOffset>=C.value),layout:M(()=>c.layout)},oe=>{var Se,ke;(ke=(Se=O.value).onMouseUp)==null||ke.call(Se),U(Math.min(S.value.scrollOffset+oe,C.value-A.value))});sr(b,"wheel",D,{passive:!1});const N=()=>{const{total:oe}=c;if(oe>0){const[re,te,ge,Re]=p(x);d(Sw,re,te,ge,Re)}const{scrollDir:Se,scrollOffset:ke,updateRequested:Y}=p(S);d(xw,Se,ke,Y)},$=oe=>{const{clientHeight:Se,scrollHeight:ke,scrollTop:Y}=oe.currentTarget,re=p(S);if(re.scrollOffset===Y)return;const te=Math.max(0,Math.min(Y,ke-Se));S.value={...re,isScrolling:!0,scrollDir:Rh(re.scrollOffset,te),scrollOffset:te,updateRequested:!1},Ot(q)},W=oe=>{const{clientWidth:Se,scrollLeft:ke,scrollWidth:Y}=oe.currentTarget,re=p(S);if(re.scrollOffset===ke)return;const{direction:te}=c;let ge=ke;if(te===Rg)switch(Tw()){case w0:{ge=-ke;break}case sN:{ge=Y-Se-ke;break}}ge=Math.max(0,Math.min(ge,Y-Se)),S.value={...re,isScrolling:!0,scrollDir:Rh(re.scrollOffset,ge),scrollOffset:ge,updateRequested:!1},Ot(q)},L=oe=>{p(E)?W(oe):$(oe),N()},I=(oe,Se)=>{const ke=(C.value-A.value)/Se*oe;U(Math.min(C.value-A.value,ke))},U=oe=>{oe=Math.max(oe,0),oe!==p(S).scrollOffset&&(S.value={...p(S),scrollOffset:oe,scrollDir:Rh(p(S).scrollOffset,oe),updateRequested:!0},Ot(q))},Q=(oe,Se=il)=>{const{scrollOffset:ke}=p(S);oe=Math.max(0,Math.min(oe,c.total-1)),U(e(c,oe,Se,ke,p(g)))},V=oe=>{const{direction:Se,itemSize:ke,layout:Y}=c,re=y.value(l&&ke,l&&Y,l&&Se);let te;if(Dn(re,String(oe)))te=re[oe];else{const ge=r(c,oe,p(g)),Re=n(c,oe,p(g)),$e=p(E),Z=Se===Rg,ce=$e?ge:0;re[oe]=te={position:"absolute",left:Z?void 0:`${ce}px`,right:Z?`${ce}px`:void 0,top:$e?0:`${ge}px`,height:$e?"100%":`${Re}px`,width:$e?`${Re}px`:"100%"}}return te},q=()=>{S.value.isScrolling=!1,Ot(()=>{y.value(-1,null,null)})},K=()=>{const oe=b.value;oe&&(oe.scrollTop=0)};Bt(()=>{if(!Tn)return;const{initScrollOffset:oe}=c,Se=p(b);kt(oe)&&Se&&(p(E)?Se.scrollLeft=oe:Se.scrollTop=oe),N()}),Jc(()=>{const{direction:oe,layout:Se}=c,{scrollOffset:ke,updateRequested:Y}=p(S),re=p(b);if(Y&&re)if(Se===om)if(oe===Rg)switch(Tw()){case w0:{re.scrollLeft=-ke;break}case aN:{re.scrollLeft=ke;break}default:{const{clientWidth:te,scrollWidth:ge}=re;re.scrollLeft=ge-te-ke;break}}else re.scrollLeft=ke;else re.scrollTop=ke}),UM(()=>{p(b).scrollTop=p(S).scrollOffset});const ie={ns:m,clientSize:A,estimatedTotalSize:C,windowStyle:T,windowRef:b,innerRef:w,innerStyle:P,itemsToRender:x,scrollbarRef:O,states:S,getItemStyle:V,onScroll:L,onScrollbarScroll:I,onWheel:D,scrollTo:U,scrollToItem:Q,resetScrollTop:K};return f({windowRef:b,innerRef:w,getItemStyleCache:y,scrollTo:U,scrollToItem:Q,resetScrollTop:K,states:S}),ie},render(c){var d;const{$slots:f,className:h,clientSize:m,containerElement:g,data:y,getItemStyle:b,innerElement:w,itemsToRender:O,innerStyle:S,layout:x,total:C,onScroll:E,onScrollbarScroll:T,states:P,useIsScrolling:A,windowStyle:D,ns:N}=c,[$,W]=O,L=un(g),I=un(w),U=[];if(C>0)for(let K=$;K<=W;K++)U.push(Et(ct,{key:K},(d=f.default)==null?void 0:d.call(f,{data:y,index:K,isScrolling:A?P.isScrolling:void 0,style:b(K)})));const Q=[Et(I,{style:S,ref:"innerRef"},At(I)?U:{default:()=>U})],V=Et(iP,{ref:"scrollbarRef",clientSize:m,layout:x,onScroll:T,ratio:m*100/this.estimatedTotalSize,scrollFrom:P.scrollOffset/(this.estimatedTotalSize-m),total:C}),q=Et(L,{class:[N.e("window"),h],style:D,onScroll:E,ref:"windowRef",key:0},At(L)?[Q]:{default:()=>[Q]});return Et("div",{key:0,class:[N.e("wrapper"),P.scrollbarAlwaysOn?"always-on":""]},[q,V])}}),DU=NU({name:"ElFixedSizeList",getItemOffset:({itemSize:t},e)=>e*t,getItemSize:({itemSize:t})=>t,getEstimatedTotalSize:({total:t,itemSize:e})=>e*t,getOffset:({height:t,total:e,itemSize:n,layout:r,width:i},o,a,s)=>{const l=S0(r)?i:t,u=Math.max(0,e*n-l),c=Math.min(u,o*n),d=Math.max(0,(o+1)*n-l);switch(a===tC&&(s>=d-l&&s<=c+l?a=il:a=ju),a){case _0:return c;case O0:return d;case ju:{const f=Math.round(d+(c-d)/2);return fu+Math.floor(l/2)?u:f}case il:default:return s>=d&&s<=c?s:sMath.max(0,Math.min(t-1,Math.floor(n/e))),getStopIndexForStartIndex:({height:t,total:e,itemSize:n,layout:r,width:i},o,a)=>{const s=o*n,l=S0(r)?i:t,u=Math.ceil((l+a-s)/n);return Math.max(0,Math.min(e-1,o+u-1))},initCache(){},clearCache:!0,validateProps(){}}),gg=(t,e,n)=>{const{itemSize:r}=t,{items:i,lastVisitedIndex:o}=n;if(e>o){let a=0;if(o>=0){const s=i[o];a=s.offset+s.size}for(let s=o+1;s<=e;s++){const l=r(s);i[s]={offset:a,size:l},a+=l}n.lastVisitedIndex=e}return i[e]},t4e=(t,e,n)=>{const{items:r,lastVisitedIndex:i}=e;return(i>0?r[i].offset:0)>=n?LU(t,e,0,i,n):n4e(t,e,Math.max(0,i),n)},LU=(t,e,n,r,i)=>{for(;n<=r;){const o=n+Math.floor((r-n)/2),a=gg(t,o,e).offset;if(a===i)return o;ai&&(r=o-1)}return Math.max(0,n-1)},n4e=(t,e,n,r)=>{const{total:i}=t;let o=1;for(;n{let i=0;if(r>=t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},r4e=NU({name:"ElDynamicSizeList",getItemOffset:(t,e,n)=>gg(t,e,n).offset,getItemSize:(t,e,{items:n})=>n[e].size,getEstimatedTotalSize:D8,getOffset:(t,e,n,r,i)=>{const{height:o,layout:a,width:s}=t,l=S0(a)?s:o,u=gg(t,e,i),c=D8(t,i),d=Math.max(0,Math.min(c-l,u.offset)),f=Math.max(0,u.offset-l+u.size);switch(n===tC&&(r>=f-l&&r<=d+l?n=il:n=ju),n){case _0:return d;case O0:return f;case ju:return Math.round(f+(d-f)/2);case il:default:return r>=f&&r<=d?r:rt4e(t,n,e),getStopIndexForStartIndex:(t,e,n,r)=>{const{height:i,total:o,layout:a,width:s}=t,l=S0(a)?s:i,u=gg(t,e,r),c=n+l;let d=u.offset+u.size,f=e;for(;f{var o,a;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,r-1),(o=e.exposed)==null||o.getItemStyleCache(-1),i&&((a=e.proxy)==null||a.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:t})=>{}}),i4e=({atXEndEdge:t,atXStartEdge:e,atYEndEdge:n,atYStartEdge:r},i)=>{let o=null,a=0,s=0;const l=(c,d)=>{const f=c<=0&&e.value||c>=0&&t.value,h=d<=0&&r.value||d>=0&&n.value;return f&&h};return{hasReachedEdge:l,onWheel:c=>{tp(o);let d=c.deltaX,f=c.deltaY;Math.abs(d)>Math.abs(f)?f=0:d=0,c.shiftKey&&f!==0&&(d=f,f=0),!(l(a,s)&&l(a+d,s+f))&&(a+=d,s+=f,c.preventDefault(),o=gf(()=>{i(a,s),a=0,s=0}))}}},IU=({name:t,clearCache:e,getColumnPosition:n,getColumnStartIndexForOffset:r,getColumnStopIndexForStartIndex:i,getEstimatedTotalHeight:o,getEstimatedTotalWidth:a,getColumnOffset:s,getRowOffset:l,getRowPosition:u,getRowStartIndexForOffset:c,getRowStopIndexForStartIndex:d,initCache:f,injectToInstance:h,validateProps:m})=>ue({name:t!=null?t:"ElVirtualList",props:zh,emits:[Sw,xw],setup(g,{emit:y,expose:b,slots:w}){const O=Qe("vl");m(g);const S=en(),x=F(f(g,S));h==null||h(S,x);const C=F(),E=F(),T=F(),P=F(null),A=F({isScrolling:!1,scrollLeft:kt(g.initScrollLeft)?g.initScrollLeft:0,scrollTop:kt(g.initScrollTop)?g.initScrollTop:0,updateRequested:!1,xAxisScrollDir:pg,yAxisScrollDir:pg}),D=TU(),N=M(()=>Number.parseInt(`${g.height}`,10)),$=M(()=>Number.parseInt(`${g.width}`,10)),W=M(()=>{const{totalColumn:me,totalRow:Ae,columnCache:X}=g,{isScrolling:ee,xAxisScrollDir:le,scrollLeft:Ce}=p(A);if(me===0||Ae===0)return[0,0,0,0];const fe=r(g,Ce,p(x)),Ee=i(g,fe,Ce,p(x)),be=!ee||le===Cw?Math.max(1,X):1,Be=!ee||le===pg?Math.max(1,X):1;return[Math.max(0,fe-be),Math.max(0,Math.min(me-1,Ee+Be)),fe,Ee]}),L=M(()=>{const{totalColumn:me,totalRow:Ae,rowCache:X}=g,{isScrolling:ee,yAxisScrollDir:le,scrollTop:Ce}=p(A);if(me===0||Ae===0)return[0,0,0,0];const fe=c(g,Ce,p(x)),Ee=d(g,fe,Ce,p(x)),be=!ee||le===Cw?Math.max(1,X):1,Be=!ee||le===pg?Math.max(1,X):1;return[Math.max(0,fe-be),Math.max(0,Math.min(Ae-1,Ee+Be)),fe,Ee]}),I=M(()=>o(g,p(x))),U=M(()=>a(g,p(x))),Q=M(()=>{var me;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:g.direction,height:kt(g.height)?`${g.height}px`:g.height,width:kt(g.width)?`${g.width}px`:g.width},(me=g.style)!=null?me:{}]}),V=M(()=>{const me=`${p(U)}px`;return{height:`${p(I)}px`,pointerEvents:p(A).isScrolling?"none":void 0,width:me}}),q=()=>{const{totalColumn:me,totalRow:Ae}=g;if(me>0&&Ae>0){const[Ee,be,Be,Xe]=p(W),[Ke,tt,Dt,jt]=p(L);y(Sw,{columnCacheStart:Ee,columnCacheEnd:be,rowCacheStart:Ke,rowCacheEnd:tt,columnVisibleStart:Be,columnVisibleEnd:Xe,rowVisibleStart:Dt,rowVisibleEnd:jt})}const{scrollLeft:X,scrollTop:ee,updateRequested:le,xAxisScrollDir:Ce,yAxisScrollDir:fe}=p(A);y(xw,{xAxisScrollDir:Ce,scrollLeft:X,yAxisScrollDir:fe,scrollTop:ee,updateRequested:le})},K=me=>{const{clientHeight:Ae,clientWidth:X,scrollHeight:ee,scrollLeft:le,scrollTop:Ce,scrollWidth:fe}=me.currentTarget,Ee=p(A);if(Ee.scrollTop===Ce&&Ee.scrollLeft===le)return;let be=le;if(N8(g.direction))switch(Tw()){case w0:be=-le;break;case sN:be=fe-X-le;break}A.value={...Ee,isScrolling:!0,scrollLeft:be,scrollTop:Math.max(0,Math.min(Ce,ee-Ae)),updateRequested:!0,xAxisScrollDir:Rh(Ee.scrollLeft,be),yAxisScrollDir:Rh(Ee.scrollTop,Ce)},Ot(()=>te()),ge(),q()},ie=(me,Ae)=>{const X=p(N),ee=(I.value-X)/Ae*me;ke({scrollTop:Math.min(I.value-X,ee)})},oe=(me,Ae)=>{const X=p($),ee=(U.value-X)/Ae*me;ke({scrollLeft:Math.min(U.value-X,ee)})},{onWheel:Se}=i4e({atXStartEdge:M(()=>A.value.scrollLeft<=0),atXEndEdge:M(()=>A.value.scrollLeft>=U.value-p($)),atYStartEdge:M(()=>A.value.scrollTop<=0),atYEndEdge:M(()=>A.value.scrollTop>=I.value-p(N))},(me,Ae)=>{var X,ee,le,Ce;(ee=(X=E.value)==null?void 0:X.onMouseUp)==null||ee.call(X),(Ce=(le=T.value)==null?void 0:le.onMouseUp)==null||Ce.call(le);const fe=p($),Ee=p(N);ke({scrollLeft:Math.min(A.value.scrollLeft+me,U.value-fe),scrollTop:Math.min(A.value.scrollTop+Ae,I.value-Ee)})});sr(C,"wheel",Se,{passive:!1});const ke=({scrollLeft:me=A.value.scrollLeft,scrollTop:Ae=A.value.scrollTop})=>{me=Math.max(me,0),Ae=Math.max(Ae,0);const X=p(A);Ae===X.scrollTop&&me===X.scrollLeft||(A.value={...X,xAxisScrollDir:Rh(X.scrollLeft,me),yAxisScrollDir:Rh(X.scrollTop,Ae),scrollLeft:me,scrollTop:Ae,updateRequested:!0},Ot(()=>te()),ge(),q())},Y=(me=0,Ae=0,X=il)=>{const ee=p(A);Ae=Math.max(0,Math.min(Ae,g.totalColumn-1)),me=Math.max(0,Math.min(me,g.totalRow-1));const le=IQ(O.namespace.value),Ce=p(x),fe=o(g,Ce),Ee=a(g,Ce);ke({scrollLeft:s(g,Ae,X,ee.scrollLeft,Ce,Ee>g.width?le:0),scrollTop:l(g,me,X,ee.scrollTop,Ce,fe>g.height?le:0)})},re=(me,Ae)=>{const{columnWidth:X,direction:ee,rowHeight:le}=g,Ce=D.value(e&&X,e&&le,e&&ee),fe=`${me},${Ae}`;if(Dn(Ce,fe))return Ce[fe];{const[,Ee]=n(g,Ae,p(x)),be=p(x),Be=N8(ee),[Xe,Ke]=u(g,me,be),[tt]=n(g,Ae,be);return Ce[fe]={position:"absolute",left:Be?void 0:`${Ee}px`,right:Be?`${Ee}px`:void 0,top:`${Ke}px`,height:`${Xe}px`,width:`${tt}px`},Ce[fe]}},te=()=>{A.value.isScrolling=!1,Ot(()=>{D.value(-1,null,null)})};Bt(()=>{if(!Tn)return;const{initScrollLeft:me,initScrollTop:Ae}=g,X=p(C);X&&(kt(me)&&(X.scrollLeft=me),kt(Ae)&&(X.scrollTop=Ae)),q()});const ge=()=>{const{direction:me}=g,{scrollLeft:Ae,scrollTop:X,updateRequested:ee}=p(A),le=p(C);if(ee&&le){if(me===Rg)switch(Tw()){case w0:{le.scrollLeft=-Ae;break}case aN:{le.scrollLeft=Ae;break}default:{const{clientWidth:Ce,scrollWidth:fe}=le;le.scrollLeft=fe-Ce-Ae;break}}else le.scrollLeft=Math.max(0,Ae);le.scrollTop=Math.max(0,X)}},{resetAfterColumnIndex:Re,resetAfterRowIndex:$e,resetAfter:Z}=S.proxy;b({windowRef:C,innerRef:P,getItemStyleCache:D,scrollTo:ke,scrollToItem:Y,states:A,resetAfterColumnIndex:Re,resetAfterRowIndex:$e,resetAfter:Z});const ce=()=>{const{scrollbarAlwaysOn:me,scrollbarStartGap:Ae,scrollbarEndGap:X,totalColumn:ee,totalRow:le}=g,Ce=p($),fe=p(N),Ee=p(U),be=p(I),{scrollLeft:Be,scrollTop:Xe}=p(A),Ke=Et(iP,{ref:E,alwaysOn:me,startGap:Ae,endGap:X,class:O.e("horizontal"),clientSize:Ce,layout:"horizontal",onScroll:oe,ratio:Ce*100/Ee,scrollFrom:Be/(Ee-Ce),total:le,visible:!0}),tt=Et(iP,{ref:T,alwaysOn:me,startGap:Ae,endGap:X,class:O.e("vertical"),clientSize:fe,layout:"vertical",onScroll:ie,ratio:fe*100/be,scrollFrom:Xe/(be-fe),total:ee,visible:!0});return{horizontalScrollbar:Ke,verticalScrollbar:tt}},Te=()=>{var me;const[Ae,X]=p(W),[ee,le]=p(L),{data:Ce,totalColumn:fe,totalRow:Ee,useIsScrolling:be,itemKey:Be}=g,Xe=[];if(Ee>0&&fe>0)for(let Ke=ee;Ke<=le;Ke++)for(let tt=Ae;tt<=X;tt++){const Dt=Be({columnIndex:tt,data:Ce,rowIndex:Ke});Xe.push(Et(ct,{key:Dt},(me=w.default)==null?void 0:me.call(w,{columnIndex:tt,data:Ce,isScrolling:be?p(A).isScrolling:void 0,style:re(Ke,tt),rowIndex:Ke})))}return Xe},Ie=()=>{const me=un(g.innerElement),Ae=Te();return[Et(me,{style:p(V),ref:P},At(me)?Ae:{default:()=>Ae})]};return()=>{const me=un(g.containerElement),{horizontalScrollbar:Ae,verticalScrollbar:X}=ce(),ee=Ie();return Et("div",{key:0,class:O.e("wrapper"),role:g.role},[Et(me,{class:g.className,style:p(Q),onScroll:K,ref:C},At(me)?ee:{default:()=>ee}),Ae,X])}}}),o4e=IU({name:"ElFixedSizeGrid",getColumnPosition:({columnWidth:t},e)=>[t,e*t],getRowPosition:({rowHeight:t},e)=>[t,e*t],getEstimatedTotalHeight:({totalRow:t,rowHeight:e})=>e*t,getEstimatedTotalWidth:({totalColumn:t,columnWidth:e})=>e*t,getColumnOffset:({totalColumn:t,columnWidth:e,width:n},r,i,o,a,s)=>{n=Number(n);const l=Math.max(0,t*e-n),u=Math.min(l,r*e),c=Math.max(0,r*e-n+s+e);switch(i==="smart"&&(o>=c-n&&o<=u+n?i=il:i=ju),i){case _0:return u;case O0:return c;case ju:{const d=Math.round(c+(u-c)/2);return dl+Math.floor(n/2)?l:d}case il:default:return o>=c&&o<=u?o:c>u||o{e=Number(e);const l=Math.max(0,n*t-e),u=Math.min(l,r*t),c=Math.max(0,r*t-e+s+t);switch(i===tC&&(o>=c-e&&o<=u+e?i=il:i=ju),i){case _0:return u;case O0:return c;case ju:{const d=Math.round(c+(u-c)/2);return dl+Math.floor(e/2)?l:d}case il:default:return o>=c&&o<=u?o:c>u||oMath.max(0,Math.min(e-1,Math.floor(n/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:e,width:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},getRowStartIndexForOffset:({rowHeight:t,totalRow:e},n)=>Math.max(0,Math.min(e-1,Math.floor(n/t))),getRowStopIndexForStartIndex:({rowHeight:t,totalRow:e,height:n},r,i)=>{const o=r*t,a=Math.ceil((n+i-o)/t);return Math.max(0,Math.min(e-1,r+a-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:e})=>{}}),{max:kw,min:BU,floor:FU}=Math,a4e={column:"columnWidth",row:"rowHeight"},oP={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Nc=(t,e,n,r)=>{const[i,o,a]=[n[r],t[a4e[r]],n[oP[r]]];if(e>a){let s=0;if(a>=0){const l=i[a];s=l.offset+l.size}for(let l=a+1;l<=e;l++){const u=o(l);i[l]={offset:s,size:u},s+=u}n[oP[r]]=e}return i[e]},VU=(t,e,n,r,i,o)=>{for(;n<=r;){const a=n+FU((r-n)/2),s=Nc(t,a,e,o).offset;if(s===i)return a;s{const o=i==="column"?t.totalColumn:t.totalRow;let a=1;for(;n{const[i,o]=[e[r],e[oP[r]]];return(o>0?i[o].offset:0)>=n?VU(t,e,0,o,n,r):s4e(t,e,kw(0,o),n,r)},jU=({totalRow:t},{estimatedRowHeight:e,lastVisitedRowIndex:n,row:r})=>{let i=0;if(n>=t&&(n=t-1),n>=0){const s=r[n];i=s.offset+s.size}const a=(t-n-1)*e;return i+a},zU=({totalColumn:t},{column:e,estimatedColumnWidth:n,lastVisitedColumnIndex:r})=>{let i=0;if(r>t&&(r=t-1),r>=0){const s=e[r];i=s.offset+s.size}const a=(t-r-1)*n;return i+a},l4e={column:zU,row:jU},I8=(t,e,n,r,i,o,a)=>{const[s,l]=[o==="row"?t.height:t.width,l4e[o]],u=Nc(t,e,i,o),c=l(t,i),d=kw(0,BU(c-s,u.offset)),f=kw(0,u.offset-s+a+u.size);switch(n===tC&&(r>=f-s&&r<=d+s?n=il:n=ju),n){case _0:return d;case O0:return f;case ju:return Math.round(f+(d-f)/2);case il:default:return r>=f&&r<=d?r:f>d||r{const r=Nc(t,e,n,"column");return[r.size,r.offset]},getRowPosition:(t,e,n)=>{const r=Nc(t,e,n,"row");return[r.size,r.offset]},getColumnOffset:(t,e,n,r,i,o)=>I8(t,e,n,r,i,"column",o),getRowOffset:(t,e,n,r,i,o)=>I8(t,e,n,r,i,"row",o),getColumnStartIndexForOffset:(t,e,n)=>L8(t,n,e,"column"),getColumnStopIndexForStartIndex:(t,e,n,r)=>{const i=Nc(t,e,r,"column"),o=n+t.width;let a=i.offset+i.size,s=e;for(;sL8(t,n,e,"row"),getRowStopIndexForStartIndex:(t,e,n,r)=>{const{totalRow:i,height:o}=t,a=Nc(t,e,r,"row"),s=n+o;let l=a.size+a.offset,u=e;for(;u{const n=({columnIndex:o,rowIndex:a},s)=>{var l,u;s=ai(s)?!0:s,kt(o)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,o-1)),kt(a)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,a-1)),(l=t.exposed)==null||l.getItemStyleCache.value(-1,null,null),s&&((u=t.proxy)==null||u.$forceUpdate())},r=(o,a)=>{n({columnIndex:o},a)},i=(o,a)=>{n({rowIndex:o},a)};Object.assign(t.proxy,{resetAfterColumnIndex:r,resetAfterRowIndex:i,resetAfter:n})},initCache:({estimatedColumnWidth:t=Kk,estimatedRowHeight:e=Kk})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:e})=>{}}),c4e=ue({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:Qe("select")}}});function d4e(t,e,n,r,i,o){return R(),G("div",{class:j(t.ns.be("group","title")),style:mt({...t.style,lineHeight:`${t.height}px`})},je(t.item.label),7)}var f4e=Ge(c4e,[["render",d4e],["__file","group-item.vue"]]);function h4e(t,{emit:e}){return{hoverItem:()=>{t.disabled||e("hover",t.index)},selectOptionClick:()=>{t.disabled||e("select",t.item,t.index)}}}const QU={label:"label",value:"value",disabled:"disabled",options:"options"};function nC(t){const e=M(()=>({...QU,...t.props}));return{aliasProps:e,getLabel:a=>Wr(a,e.value.label),getValue:a=>Wr(a,e.value.value),getDisabled:a=>Wr(a,e.value.disabled),getOptions:a=>Wr(a,e.value.options)}}const p4e=Ye({allowCreate:Boolean,autocomplete:{type:Oe(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:fr,default:Bf},effect:{type:Oe(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:Boolean,estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:Function,height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:Oe([Array,String,Number,Boolean,Object])},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:Function,reserveKeyword:{type:Boolean,default:!0},options:{type:Oe(Array),required:!0},placeholder:{type:String},teleported:io.teleported,persistent:{type:Boolean,default:!0},popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})},remote:Boolean,size:Wi,props:{type:Oe(Object),default:()=>QU},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},placement:{type:Oe(String),values:ud,default:"bottom-start"},fallbackPlacements:{type:Oe(Array),default:["bottom-start","top-start","right","left"]},tagType:{...ip.type,default:"info"},tagEffect:{...ip.effect,default:"light"},...Wm,...wo(["ariaLabel"])}),g4e=Ye({data:Array,disabled:Boolean,hovering:Boolean,item:{type:Oe(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),m4e={[Zt]:t=>!0,[Lr]:t=>!0,"remove-tag":t=>!0,"visible-change":t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},v4e={hover:t=>kt(t),select:(t,e)=>!0},lN=Symbol("ElSelectV2Injection"),y4e=ue({props:g4e,emits:v4e,setup(t,{emit:e}){const n=ht(lN),r=Qe("select"),{hoverItem:i,selectOptionClick:o}=h4e(t,{emit:e}),{getLabel:a}=nC(n.props);return{ns:r,hoverItem:i,selectOptionClick:o,getLabel:a}}});function b4e(t,e,n,r,i,o){return R(),G("li",{"aria-selected":t.selected,style:mt(t.style),class:j([t.ns.be("dropdown","item"),t.ns.is("selected",t.selected),t.ns.is("disabled",t.disabled),t.ns.is("created",t.created),t.ns.is("hovering",t.hovering)]),onMouseenter:t.hoverItem,onClick:Pt(t.selectOptionClick,["stop"])},[xe(t.$slots,"default",{item:t.item,index:t.index,disabled:t.disabled},()=>[J("span",null,je(t.getLabel(t.item)),1)])],46,["aria-selected","onMouseenter","onClick"])}var _4e=Ge(y4e,[["render",b4e],["__file","option-item.vue"]]);const O4e={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number};var w4e=ue({name:"ElSelectDropdown",props:O4e,setup(t,{slots:e,expose:n}){const r=ht(lN),i=Qe("select"),{getLabel:o,getValue:a,getDisabled:s}=nC(r.props),l=F([]),u=F(),c=M(()=>t.data.length);Ve(()=>c.value,()=>{var D,N;(N=(D=r.tooltipRef.value).updatePopper)==null||N.call(D)});const d=M(()=>ai(r.props.estimatedOptionHeight)),f=M(()=>d.value?{itemSize:r.props.itemHeight}:{estimatedSize:r.props.estimatedOptionHeight,itemSize:D=>l.value[D]}),h=(D=[],N)=>{const{props:{valueKey:$}}=r;return sn(N)?D&&D.some(W=>Bn(Wr(W,$))===Wr(N,$)):D.includes(N)},m=(D,N)=>{if(sn(N)){const{valueKey:$}=r.props;return Wr(D,$)===Wr(N,$)}else return D===N},g=(D,N)=>r.props.multiple?h(D,a(N)):m(D,a(N)),y=(D,N)=>{const{disabled:$,multiple:W,multipleLimit:L}=r.props;return $||!N&&(W?L>0&&D.length>=L:!1)},b=D=>t.hoveringIndex===D;n({listRef:u,isSized:d,isItemDisabled:y,isItemHovering:b,isItemSelected:g,scrollToItem:D=>{const N=u.value;N&&N.scrollToItem(D)},resetScrollTop:()=>{const D=u.value;D&&D.resetScrollTop()}});const x=D=>{const{index:N,data:$,style:W}=D,L=p(d),{itemSize:I,estimatedSize:U}=p(f),{modelValue:Q}=r.props,{onSelect:V,onHover:q}=r,K=$[N];if(K.type==="Group")return B(f4e,{item:K,style:W,height:L?I:U},null);const ie=g(Q,K),oe=y(Q,ie),Se=b(N);return B(_4e,gn(D,{selected:ie,disabled:s(K)||oe,created:!!K.created,hovering:Se,item:K,onSelect:V,onHover:q}),{default:ke=>{var Y;return((Y=e.default)==null?void 0:Y.call(e,ke))||B("span",null,[o(K)])}})},{onKeyboardNavigate:C,onKeyboardSelect:E}=r,T=()=>{C("forward")},P=()=>{C("backward")},A=D=>{const{code:N}=D,{tab:$,esc:W,down:L,up:I,enter:U}=St;switch(N!==$&&(D.preventDefault(),D.stopPropagation()),N){case $:case W:break;case L:{T();break}case I:{P();break}case U:{E();break}}};return()=>{var D,N,$,W;const{data:L,width:I}=t,{height:U,multiple:Q,scrollbarAlwaysOn:V}=r.props,q=p(d)?DU:r4e;return B("div",{class:[i.b("dropdown"),i.is("multiple",Q)],style:{width:`${I}px`}},[(D=e.header)==null?void 0:D.call(e),((N=e.loading)==null?void 0:N.call(e))||(($=e.empty)==null?void 0:$.call(e))||B(q,gn({ref:u},p(f),{className:i.be("dropdown","list"),scrollbarAlwaysOn:V,data:L,height:U,width:I,total:L.length,onKeydown:A}),{default:K=>B(x,K,null)}),(W=e.footer)==null?void 0:W.call(e)])}}});function S4e(t,e){const{aliasProps:n,getLabel:r,getValue:i}=nC(t),o=F(0),a=F(),s=M(()=>t.allowCreate&&t.filterable);function l(h){const m=g=>r(g)===h;return t.options&&t.options.some(m)||e.createdOptions.some(m)}function u(h){!s.value||(t.multiple&&h.created?o.value++:a.value=h)}function c(h){if(s.value)if(h&&h.length>0){if(l(h))return;const m={[n.value.value]:h,[n.value.label]:h,created:!0,[n.value.disabled]:!1};e.createdOptions.length>=o.value?e.createdOptions[o.value]=m:e.createdOptions.push(m)}else if(t.multiple)e.createdOptions.length=o.value;else{const m=a.value;e.createdOptions.length=0,m&&m.created&&e.createdOptions.push(m)}}function d(h){if(!s.value||!h||!h.created||h.created&&t.reserveKeyword&&e.inputValue===r(h))return;const m=e.createdOptions.findIndex(g=>i(g)===i(h));~m&&(e.createdOptions.splice(m,1),o.value--)}function f(){s.value&&(e.createdOptions.length=0,o.value=0)}return{createNewOption:c,removeNewOption:d,selectNewOption:u,clearAllNewOption:f}}const x4e=11,C4e=(t,e)=>{const{t:n}=kn(),r=Qe("select"),i=Qe("input"),{form:o,formItem:a}=ua(),{inputId:s}=gu(t,{formItemContext:a}),{aliasProps:l,getLabel:u,getValue:c,getDisabled:d,getOptions:f}=nC(t),{valueOnClear:h,isEmptyValue:m}=Hx(t),g=Sn({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),y=F(-1),b=F(),w=F(),O=F(),S=F(),x=F(),C=F(),E=F(),T=F(),P=F(),A=F(),D=F(),{isComposing:N,handleCompositionStart:$,handleCompositionEnd:W,handleCompositionUpdate:L}=Qx({afterComposition:ot=>Li(ot)}),{wrapperRef:I,isFocused:U,handleBlur:Q}=Pb(x,{beforeFocus(){return ie.value},afterFocus(){t.automaticDropdown&&!K.value&&(K.value=!0,g.menuVisibleOnFocus=!0)},beforeBlur(ot){var Nt,rn;return((Nt=O.value)==null?void 0:Nt.isFocusInsideContent(ot))||((rn=S.value)==null?void 0:rn.isFocusInsideContent(ot))},afterBlur(){K.value=!1,g.menuVisibleOnFocus=!1}}),V=F([]),q=F([]),K=F(!1),ie=M(()=>t.disabled||(o==null?void 0:o.disabled)),oe=M(()=>{const ot=q.value.length*t.itemHeight;return ot>t.height?t.height:ot}),Se=M(()=>t.multiple?ut(t.modelValue)&&t.modelValue.length>0:!m(t.modelValue)),ke=M(()=>t.clearable&&!ie.value&&g.inputHovering&&Se.value),Y=M(()=>t.remote&&t.filterable?"":ld),re=M(()=>Y.value&&r.is("reverse",K.value)),te=M(()=>(a==null?void 0:a.validateState)||""),ge=M(()=>{if(!!te.value)return p$[te.value]}),Re=M(()=>t.remote?300:0),$e=M(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!g.inputValue&&V.value.length===0?!1:t.filterable&&g.inputValue&&V.value.length>0&&q.value.length===0?t.noMatchText||n("el.select.noMatch"):V.value.length===0?t.noDataText||n("el.select.noData"):null),Z=ot=>{const Nt=rn=>{if(t.filterable&&$t(t.filterMethod)||t.filterable&&t.remote&&$t(t.remoteMethod))return!0;const se=new RegExp(n$(ot),"i");return ot?se.test(u(rn)||""):!0};return t.loading?[]:[...g.createdOptions,...t.options].reduce((rn,se)=>{const ze=f(se);if(ut(ze)){const pt=ze.filter(Nt);pt.length>0&&rn.push({label:u(se),type:"Group"},...pt)}else(t.remote||Nt(se))&&rn.push(se);return rn},[])},ce=()=>{V.value=Z(""),q.value=Z(g.inputValue)},Te=M(()=>{const ot=new Map;return V.value.forEach((Nt,rn)=>{ot.set(nn(c(Nt)),{option:Nt,index:rn})}),ot}),Ie=M(()=>{const ot=new Map;return q.value.forEach((Nt,rn)=>{ot.set(nn(c(Nt)),{option:Nt,index:rn})}),ot}),ae=M(()=>q.value.every(ot=>d(ot))),me=Ni(),Ae=M(()=>me.value==="small"?"small":"default"),X=()=>{var ot;y.value=((ot=b.value)==null?void 0:ot.offsetWidth)||200},ee=()=>{if(!w.value)return 0;const ot=window.getComputedStyle(w.value);return Number.parseFloat(ot.gap||"6px")},le=M(()=>{const ot=ee();return{maxWidth:`${D.value&&t.maxCollapseTags===1?g.selectionWidth-g.collapseItemWidth-ot:g.selectionWidth}px`}}),Ce=M(()=>({maxWidth:`${g.selectionWidth}px`})),fe=M(()=>({width:`${Math.max(g.calculatorWidth,x4e)}px`})),Ee=M(()=>ut(t.modelValue)?t.modelValue.length===0&&!g.inputValue:t.filterable?!g.inputValue:!0),be=M(()=>{var ot;const Nt=(ot=t.placeholder)!=null?ot:n("el.select.placeholder");return t.multiple||!Se.value?Nt:g.selectedLabel}),Be=M(()=>{var ot,Nt;return(Nt=(ot=O.value)==null?void 0:ot.popperRef)==null?void 0:Nt.contentRef}),Xe=M(()=>{if(t.multiple){const ot=t.modelValue.length;if(t.modelValue.length>0&&Ie.value.has(t.modelValue[ot-1])){const{index:Nt}=Ie.value.get(t.modelValue[ot-1]);return Nt}}else if(t.modelValue&&Ie.value.has(t.modelValue)){const{index:ot}=Ie.value.get(t.modelValue);return ot}return-1}),Ke=M({get(){return K.value&&$e.value!==!1},set(ot){K.value=ot}}),tt=M(()=>t.multiple?t.collapseTags?g.cachedOptions.slice(0,t.maxCollapseTags):g.cachedOptions:[]),Dt=M(()=>t.multiple?t.collapseTags?g.cachedOptions.slice(t.maxCollapseTags):[]:[]),{createNewOption:jt,removeNewOption:Me,selectNewOption:nt,clearAllNewOption:de}=S4e(t,g),Pe=()=>{ie.value||(g.menuVisibleOnFocus?g.menuVisibleOnFocus=!1:K.value=!K.value)},Le=()=>{g.inputValue.length>0&&!K.value&&(K.value=!0),jt(g.inputValue),tn(g.inputValue)},wt=jo(Le,Re.value),tn=ot=>{g.previousQuery===ot||N.value||(g.previousQuery=ot,t.filterable&&$t(t.filterMethod)?t.filterMethod(ot):t.filterable&&t.remote&&$t(t.remoteMethod)&&t.remoteMethod(ot),t.defaultFirstOption&&(t.filterable||t.remote)&&q.value.length?Ot(De):Ot(zt))},De=()=>{const ot=q.value.filter(se=>!se.disabled&&se.type!=="Group"),Nt=ot.find(se=>se.created),rn=ot[0];g.hoveringIndex=ln(q.value,Nt||rn)},xt=ot=>{so(t.modelValue,ot)||e(Lr,ot)},qt=ot=>{e(Zt,ot),xt(ot),g.previousValue=t.multiple?String(ot):ot},ln=(ot=[],Nt)=>{if(!sn(Nt))return ot.indexOf(Nt);const rn=t.valueKey;let se=-1;return ot.some((ze,pt)=>Wr(ze,rn)===Wr(Nt,rn)?(se=pt,!0):!1),se},nn=ot=>sn(ot)?Wr(ot,t.valueKey):ot,bn=()=>{X()},Ze=()=>{g.selectionWidth=w.value.getBoundingClientRect().width},Rt=()=>{g.calculatorWidth=C.value.getBoundingClientRect().width},xn=()=>{g.collapseItemWidth=D.value.getBoundingClientRect().width},fn=()=>{var ot,Nt;(Nt=(ot=O.value)==null?void 0:ot.updatePopper)==null||Nt.call(ot)},Er=()=>{var ot,Nt;(Nt=(ot=S.value)==null?void 0:ot.updatePopper)==null||Nt.call(ot)},dr=ot=>{if(t.multiple){let Nt=t.modelValue.slice();const rn=ln(Nt,c(ot));rn>-1?(Nt=[...Nt.slice(0,rn),...Nt.slice(rn+1)],g.cachedOptions.splice(rn,1),Me(ot)):(t.multipleLimit<=0||Nt.length{let rn=t.modelValue.slice();const se=ln(rn,c(Nt));se>-1&&!ie.value&&(rn=[...t.modelValue.slice(0,se),...t.modelValue.slice(se+1)],g.cachedOptions.splice(se,1),qt(rn),e("remove-tag",c(Nt)),Me(Nt)),ot.stopPropagation(),Pi()},Pi=()=>{var ot;(ot=x.value)==null||ot.focus()},Oi=()=>{var ot;if(K.value){K.value=!1,Ot(()=>{var Nt;return(Nt=x.value)==null?void 0:Nt.blur()});return}(ot=x.value)==null||ot.blur()},Ml=()=>{g.inputValue.length>0?g.inputValue="":K.value=!1},cs=ot=>kx(ot,Nt=>!g.cachedOptions.some(rn=>c(rn)===Nt&&d(rn))),_r=ot=>{if(!!t.multiple&&ot.code!==St.delete&&g.inputValue.length===0){ot.preventDefault();const Nt=t.modelValue.slice(),rn=cs(Nt);if(rn<0)return;const se=Nt[rn];Nt.splice(rn,1);const ze=g.cachedOptions[rn];g.cachedOptions.splice(rn,1),Me(ze),qt(Nt),e("remove-tag",se)}},Rl=()=>{let ot;ut(t.modelValue)?ot=[]:ot=h.value,t.multiple?g.cachedOptions=[]:g.selectedLabel="",K.value=!1,qt(ot),e("clear"),de(),Pi()},et=(ot,Nt=void 0)=>{const rn=q.value;if(!["forward","backward"].includes(ot)||ie.value||rn.length<=0||ae.value||N.value)return;if(!K.value)return Pe();Nt===void 0&&(Nt=g.hoveringIndex);let se=-1;ot==="forward"?(se=Nt+1,se>=rn.length&&(se=0)):ot==="backward"&&(se=Nt-1,(se<0||se>=rn.length)&&(se=rn.length-1));const ze=rn[se];if(d(ze)||ze.type==="Group")return et(ot,se);g.hoveringIndex=se,po(se)},Mt=()=>{if(K.value)~g.hoveringIndex&&q.value[g.hoveringIndex]&&dr(q.value[g.hoveringIndex]);else return Pe()},Vn=ot=>{g.hoveringIndex=ot!=null?ot:-1},zt=()=>{t.multiple?g.hoveringIndex=q.value.findIndex(ot=>t.modelValue.some(Nt=>nn(Nt)===nn(ot))):g.hoveringIndex=q.value.findIndex(ot=>nn(ot)===nn(t.modelValue))},Li=ot=>{if(g.inputValue=ot.target.value,t.remote)wt();else return Le()},Eo=ot=>{if(K.value=!1,U.value){const Nt=new FocusEvent("focus",ot);Q(Nt)}},Wo=()=>(g.isBeforeHide=!1,Ot(()=>{~Xe.value&&po(g.hoveringIndex)})),po=ot=>{P.value.scrollToItem(ot)},Ei=(ot,Nt)=>{const rn=nn(ot);if(Te.value.has(rn)){const{option:se}=Te.value.get(rn);return se}if(Nt&&Nt.length){const se=Nt.find(ze=>nn(c(ze))===rn);if(se)return se}return{[l.value.value]:ot,[l.value.label]:ot}},Uo=(ot=!1)=>{if(t.multiple)if(t.modelValue.length>0){const Nt=g.cachedOptions.slice();g.cachedOptions.length=0,g.previousValue=t.modelValue.toString();for(const rn of t.modelValue){const se=Ei(rn,Nt);g.cachedOptions.push(se)}}else g.cachedOptions=[],g.previousValue=void 0;else if(Se.value){g.previousValue=t.modelValue;const Nt=q.value,rn=Nt.findIndex(se=>nn(c(se))===nn(t.modelValue));~rn?g.selectedLabel=u(Nt[rn]):(!g.selectedLabel||ot)&&(g.selectedLabel=nn(t.modelValue))}else g.selectedLabel="",g.previousValue=void 0;de(),X()};return Ve(K,ot=>{ot?tn(""):(g.inputValue="",g.previousQuery=null,g.isBeforeHide=!0,jt("")),e("visible-change",ot)}),Ve(()=>t.modelValue,(ot,Nt)=>{var rn;(!ot||t.multiple&&ot.toString()!==g.previousValue||!t.multiple&&nn(ot)!==nn(g.previousValue))&&Uo(!0),!so(ot,Nt)&&t.validateEvent&&((rn=a==null?void 0:a.validate)==null||rn.call(a,"change").catch(se=>void 0))},{deep:!0}),Ve(()=>t.options,()=>{const ot=x.value;(!ot||ot&&document.activeElement!==ot)&&Uo()},{deep:!0,flush:"post"}),Ve(()=>q.value,()=>P.value&&Ot(P.value.resetScrollTop)),Bo(()=>{g.isBeforeHide||ce()}),Bo(()=>{const{valueKey:ot,options:Nt}=t,rn=new Map;for(const se of Nt){const ze=c(se);let pt=ze;if(sn(pt)&&(pt=Wr(ze,ot)),rn.get(pt))break;rn.set(pt,!0)}}),Bt(()=>{Uo()}),Zr(b,bn),Zr(w,Ze),Zr(C,Rt),Zr(P,fn),Zr(I,fn),Zr(A,Er),Zr(D,xn),{inputId:s,collapseTagSize:Ae,currentPlaceholder:be,expanded:K,emptyText:$e,popupHeight:oe,debounce:Re,allOptions:V,filteredOptions:q,iconComponent:Y,iconReverse:re,tagStyle:le,collapseTagStyle:Ce,inputStyle:fe,popperSize:y,dropdownMenuVisible:Ke,hasModelValue:Se,shouldShowPlaceholder:Ee,selectDisabled:ie,selectSize:me,showClearBtn:ke,states:g,isFocused:U,nsSelect:r,nsInput:i,calculatorRef:C,inputRef:x,menuRef:P,tagMenuRef:A,tooltipRef:O,tagTooltipRef:S,selectRef:b,wrapperRef:I,selectionRef:w,prefixRef:E,suffixRef:T,collapseItemRef:D,popperRef:Be,validateState:te,validateIcon:ge,showTagList:tt,collapseTagList:Dt,debouncedOnInputChange:wt,deleteTag:eo,getLabel:u,getValue:c,getDisabled:d,getValueKey:nn,handleClear:Rl,handleClickOutside:Eo,handleDel:_r,handleEsc:Ml,focus:Pi,blur:Oi,handleMenuEnter:Wo,handleResize:bn,resetSelectionWidth:Ze,resetCalculatorWidth:Rt,updateTooltip:fn,updateTagTooltip:Er,updateOptions:ce,toggleMenu:Pe,scrollTo:po,onInput:Li,onKeyboardNavigate:et,onKeyboardSelect:Mt,onSelect:dr,onHover:Vn,handleCompositionStart:$,handleCompositionEnd:W,handleCompositionUpdate:L}},E4e=ue({name:"ElSelectV2",components:{ElSelectMenu:w4e,ElTag:Bs,ElTooltip:Ui,ElIcon:gt},directives:{ClickOutside:qc},props:p4e,emits:m4e,setup(t,{emit:e}){const n=M(()=>{const{modelValue:o,multiple:a}=t,s=a?[]:void 0;return ut(o)?a?o:s:a?s:o}),r=C4e(Sn({...Ri(t),modelValue:n}),e);_n(lN,{props:Sn({...Ri(t),height:r.popupHeight,modelValue:n}),expanded:r.expanded,tooltipRef:r.tooltipRef,onSelect:r.onSelect,onHover:r.onHover,onKeyboardNavigate:r.onKeyboardNavigate,onKeyboardSelect:r.onKeyboardSelect});const i=M(()=>t.multiple?r.states.cachedOptions.map(o=>o.label):r.states.selectedLabel);return{...r,modelValue:n,selectedLabel:i}}});function T4e(t,e,n,r,i,o){const a=an("el-tag"),s=an("el-tooltip"),l=an("el-icon"),u=an("el-select-menu"),c=dx("click-outside");return Ht((R(),G("div",{ref:"selectRef",class:j([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:d=>t.states.inputHovering=!0,onMouseleave:d=>t.states.inputHovering=!1},[B(s,{ref:"tooltipRef",visible:t.dropdownMenuVisible,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,placement:t.placement,pure:"",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,trigger:"click",persistent:t.persistent,onBeforeShow:t.handleMenuEnter,onHide:d=>t.states.isBeforeHide=!1},{default:z(()=>[J("div",{ref:"wrapperRef",class:j([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:Pt(t.toggleMenu,["prevent"])},[t.$slots.prefix?(R(),G("div",{key:0,ref:"prefixRef",class:j(t.nsSelect.e("prefix"))},[xe(t.$slots,"prefix")],2)):_e("v-if",!0),J("div",{ref:"selectionRef",class:j([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.modelValue.length)])},[t.multiple?xe(t.$slots,"tag",{key:0},()=>[(R(!0),G(ct,null,Wt(t.showTagList,d=>(R(),G("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:mt(t.tagStyle),onClose:f=>t.deleteTag(f,d)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[qe(je(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.modelValue.length>t.maxCollapseTags?(R(),we(s,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:z(()=>[J("div",{ref:"collapseItemRef",class:j(t.nsSelect.e("selected-item"))},[B(a,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,style:mt(t.collapseTagStyle),"disable-transitions":""},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))}," + "+je(t.modelValue.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:z(()=>[J("div",{ref:"tagMenuRef",class:j(t.nsSelect.e("selection"))},[(R(!0),G(ct,null,Wt(t.collapseTagList,d=>(R(),G("div",{key:t.getValueKey(t.getValue(d)),class:j(t.nsSelect.e("selected-item"))},[B(a,{class:"in-tooltip",closable:!t.selectDisabled&&!t.getDisabled(d),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:f=>t.deleteTag(f,d)},{default:z(()=>[J("span",{class:j(t.nsSelect.e("tags-text"))},[xe(t.$slots,"label",{label:t.getLabel(d),value:t.getValue(d)},()=>[qe(je(t.getLabel(d)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):_e("v-if",!0)]):_e("v-if",!0),t.selectDisabled?_e("v-if",!0):(R(),G("div",{key:1,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Ht(J("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":d=>t.states.inputValue=d,style:mt(t.inputStyle),autocomplete:t.autocomplete,"aria-autocomplete":"list","aria-haspopup":"listbox",autocapitalize:"off","aria-expanded":t.expanded,"aria-label":t.ariaLabel,class:j([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,role:"combobox",readonly:!t.filterable,spellcheck:"false",type:"text",name:t.name,onInput:t.onInput,onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onKeydown:[br(Pt(d=>t.onKeyboardNavigate("backward"),["stop","prevent"]),["up"]),br(Pt(d=>t.onKeyboardNavigate("forward"),["stop","prevent"]),["down"]),br(Pt(t.onKeyboardSelect,["stop","prevent"]),["enter"]),br(Pt(t.handleEsc,["stop","prevent"]),["esc"]),br(Pt(t.handleDel,["stop"]),["delete"])],onClick:Pt(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","autocomplete","aria-expanded","aria-label","disabled","readonly","name","onInput","onCompositionstart","onCompositionupdate","onCompositionend","onKeydown","onClick"]),[[JM,t.states.inputValue]]),t.filterable?(R(),G("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:j(t.nsSelect.e("input-calculator")),textContent:je(t.states.inputValue)},null,10,["textContent"])):_e("v-if",!0)],2)),t.shouldShowPlaceholder?(R(),G("div",{key:2,class:j([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?xe(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[J("span",null,je(t.currentPlaceholder),1)]):(R(),G("span",{key:1},je(t.currentPlaceholder),1))],2)):_e("v-if",!0)],2),J("div",{ref:"suffixRef",class:j(t.nsSelect.e("suffix"))},[t.iconComponent?Ht((R(),we(l,{key:0,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.iconReverse])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])),[[zn,!t.showClearBtn]]):_e("v-if",!0),t.showClearBtn&&t.clearIcon?(R(),we(l,{key:1,class:j([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.nsSelect.e("clear")]),onClick:Pt(t.handleClear,["prevent","stop"])},{default:z(()=>[(R(),we(un(t.clearIcon)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.validateState&&t.validateIcon?(R(),we(l,{key:2,class:j([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:z(()=>[(R(),we(un(t.validateIcon)))]),_:1},8,["class"])):_e("v-if",!0)],2)],10,["onClick"])]),content:z(()=>[B(u,{ref:"menuRef",data:t.filteredOptions,width:t.popperSize,"hovering-index":t.states.hoveringIndex,"scrollbar-always-on":t.scrollbarAlwaysOn},ts({default:z(d=>[xe(t.$slots,"default",Xl(lf(d)))]),_:2},[t.$slots.header?{name:"header",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","header"))},[xe(t.$slots,"header")],2)])}:void 0,t.$slots.loading&&t.loading?{name:"loading",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","loading"))},[xe(t.$slots,"loading")],2)])}:t.loading||t.filteredOptions.length===0?{name:"empty",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","empty"))},[xe(t.$slots,"empty",{},()=>[J("span",null,je(t.emptyText),1)])],2)])}:void 0,t.$slots.footer?{name:"footer",fn:z(()=>[J("div",{class:j(t.nsSelect.be("dropdown","footer"))},[xe(t.$slots,"footer")],2)])}:void 0]),1032,["data","width","hovering-index","scrollbar-always-on"])]),_:3},8,["visible","teleported","popper-class","popper-options","fallback-placements","effect","placement","transition","persistent","onBeforeShow","onHide"])],42,["onMouseenter","onMouseleave"])),[[c,t.handleClickOutside,t.popperRef]])}var k4e=Ge(E4e,[["render",T4e],["__file","select.vue"]]);const P4e=Vt(k4e),A4e=Ye({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),M4e=Ye({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),R4e=ue({name:"ElSkeletonItem"}),$4e=ue({...R4e,props:M4e,setup(t){const e=Qe("skeleton");return(n,r)=>(R(),G("div",{class:j([p(e).e("item"),p(e).e(n.variant)])},[n.variant==="image"?(R(),we(p(OCe),{key:0})):_e("v-if",!0)],2))}});var Pw=Ge($4e,[["__file","skeleton-item.vue"]]);const N4e=ue({name:"ElSkeleton"}),D4e=ue({...N4e,props:A4e,setup(t,{expose:e}){const n=t,r=Qe("skeleton"),i=yTe(er(n,"loading"),n.throttle);return e({uiLoading:i}),(o,a)=>p(i)?(R(),G("div",gn({key:0,class:[p(r).b(),p(r).is("animated",o.animated)]},o.$attrs),[(R(!0),G(ct,null,Wt(o.count,s=>(R(),G(ct,{key:s},[o.loading?xe(o.$slots,"template",{key:s},()=>[B(Pw,{class:j(p(r).is("first")),variant:"p"},null,8,["class"]),(R(!0),G(ct,null,Wt(o.rows,l=>(R(),we(Pw,{key:l,class:j([p(r).e("paragraph"),p(r).is("last",l===o.rows&&o.rows>1)]),variant:"p"},null,8,["class"]))),128))]):_e("v-if",!0)],64))),128))],16)):xe(o.$slots,"default",Xl(gn({key:1},o.$attrs)))}});var L4e=Ge(D4e,[["__file","skeleton.vue"]]);const I4e=Vt(L4e,{SkeletonItem:Pw}),B4e=ti(Pw),HU=Symbol("sliderContextKey"),F4e=Ye({modelValue:{type:Oe([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:Wi,inputSize:Wi,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Oe(Function),default:void 0},disabled:Boolean,range:Boolean,vertical:Boolean,height:String,debounce:{type:Number,default:300},rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Oe(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:ud,default:"top"},marks:{type:Oe(Object)},validateEvent:{type:Boolean,default:!0},...wo(["ariaLabel"])}),RT=t=>kt(t)||ut(t)&&t.every(kt),V4e={[Zt]:RT,[Oa]:RT,[Lr]:RT},j4e=(t,e,n)=>{const r=F();return Bt(async()=>{t.range?(Array.isArray(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]):(typeof t.modelValue!="number"||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),sr(window,"resize",n),await Ot(),n()}),{sliderWrapper:r}},z4e=t=>M(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,r)=>n-r).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]})):[]),Q4e=(t,e,n)=>{const{form:r,formItem:i}=ua(),o=Tr(),a=F(),s=F(),l={firstButton:a,secondButton:s},u=M(()=>t.disabled||(r==null?void 0:r.disabled)||!1),c=M(()=>Math.min(e.firstValue,e.secondValue)),d=M(()=>Math.max(e.firstValue,e.secondValue)),f=M(()=>t.range?`${100*(d.value-c.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),h=M(()=>t.range?`${100*(c.value-t.min)/(t.max-t.min)}%`:"0%"),m=M(()=>t.vertical?{height:t.height}:{}),g=M(()=>t.vertical?{height:f.value,bottom:h.value}:{width:f.value,left:h.value}),y=()=>{o.value&&(e.sliderSize=o.value[`client${t.vertical?"Height":"Width"}`])},b=N=>{const $=t.min+N*(t.max-t.min)/100;if(!t.range)return a;let W;return Math.abs(c.value-$)e.secondValue?"firstButton":"secondButton",l[W]},w=N=>{const $=b(N);return $.value.setPosition(N),$},O=N=>{e.firstValue=N!=null?N:t.min,x(t.range?[c.value,d.value]:N!=null?N:t.min)},S=N=>{e.secondValue=N,t.range&&x([c.value,d.value])},x=N=>{n(Zt,N),n(Oa,N)},C=async()=>{await Ot(),n(Lr,t.range?[c.value,d.value]:t.modelValue)},E=N=>{var $,W,L,I,U,Q;if(u.value||e.dragging)return;y();let V=0;if(t.vertical){const q=(L=(W=($=N.touches)==null?void 0:$.item(0))==null?void 0:W.clientY)!=null?L:N.clientY;V=(o.value.getBoundingClientRect().bottom-q)/e.sliderSize*100}else{const q=(Q=(U=(I=N.touches)==null?void 0:I.item(0))==null?void 0:U.clientX)!=null?Q:N.clientX,K=o.value.getBoundingClientRect().left;V=(q-K)/e.sliderSize*100}if(!(V<0||V>100))return w(V)};return{elFormItem:i,slider:o,firstButton:a,secondButton:s,sliderDisabled:u,minValue:c,maxValue:d,runwayStyle:m,barStyle:g,resetSize:y,setPosition:w,emitChange:C,onSliderWrapperPrevent:N=>{var $,W;((($=l.firstButton.value)==null?void 0:$.dragging)||((W=l.secondButton.value)==null?void 0:W.dragging))&&N.preventDefault()},onSliderClick:N=>{E(N)&&C()},onSliderDown:async N=>{const $=E(N);$&&(await Ot(),$.value.onButtonDown(N))},onSliderMarkerDown:N=>{u.value||e.dragging||w(N)},setFirstValue:O,setSecondValue:S}},{left:H4e,down:W4e,right:U4e,up:q4e,home:Y4e,end:X4e,pageUp:Z4e,pageDown:G4e}=St,K4e=(t,e,n)=>{const r=F(),i=F(!1),o=M(()=>e.value instanceof Function),a=M(()=>o.value&&e.value(t.modelValue)||t.modelValue),s=jo(()=>{n.value&&(i.value=!0)},50),l=jo(()=>{n.value&&(i.value=!1)},50);return{tooltip:r,tooltipVisible:i,formatValue:a,displayTooltip:s,hideTooltip:l}},J4e=(t,e,n)=>{const{disabled:r,min:i,max:o,step:a,showTooltip:s,precision:l,sliderSize:u,formatTooltip:c,emitChange:d,resetSize:f,updateDragging:h}=ht(HU),{tooltip:m,tooltipVisible:g,formatValue:y,displayTooltip:b,hideTooltip:w}=K4e(t,c,s),O=F(),S=M(()=>`${(t.modelValue-i.value)/(o.value-i.value)*100}%`),x=M(()=>t.vertical?{bottom:S.value}:{left:S.value}),C=()=>{e.hovering=!0,b()},E=()=>{e.hovering=!1,e.dragging||w()},T=ie=>{r.value||(ie.preventDefault(),Q(ie),window.addEventListener("mousemove",V),window.addEventListener("touchmove",V),window.addEventListener("mouseup",q),window.addEventListener("touchend",q),window.addEventListener("contextmenu",q),O.value.focus())},P=ie=>{r.value||(e.newPosition=Number.parseFloat(S.value)+ie/(o.value-i.value)*100,K(e.newPosition),d())},A=()=>{P(-a.value)},D=()=>{P(a.value)},N=()=>{P(-a.value*4)},$=()=>{P(a.value*4)},W=()=>{r.value||(K(0),d())},L=()=>{r.value||(K(100),d())},I=ie=>{let oe=!0;[H4e,W4e].includes(ie.key)?A():[U4e,q4e].includes(ie.key)?D():ie.key===Y4e?W():ie.key===X4e?L():ie.key===G4e?N():ie.key===Z4e?$():oe=!1,oe&&ie.preventDefault()},U=ie=>{let oe,Se;return ie.type.startsWith("touch")?(Se=ie.touches[0].clientY,oe=ie.touches[0].clientX):(Se=ie.clientY,oe=ie.clientX),{clientX:oe,clientY:Se}},Q=ie=>{e.dragging=!0,e.isClick=!0;const{clientX:oe,clientY:Se}=U(ie);t.vertical?e.startY=Se:e.startX=oe,e.startPosition=Number.parseFloat(S.value),e.newPosition=e.startPosition},V=ie=>{if(e.dragging){e.isClick=!1,b(),f();let oe;const{clientX:Se,clientY:ke}=U(ie);t.vertical?(e.currentY=ke,oe=(e.startY-e.currentY)/u.value*100):(e.currentX=Se,oe=(e.currentX-e.startX)/u.value*100),e.newPosition=e.startPosition+oe,K(e.newPosition)}},q=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||w(),e.isClick||K(e.newPosition),d()},0),window.removeEventListener("mousemove",V),window.removeEventListener("touchmove",V),window.removeEventListener("mouseup",q),window.removeEventListener("touchend",q),window.removeEventListener("contextmenu",q))},K=async ie=>{if(ie===null||Number.isNaN(+ie))return;ie<0?ie=0:ie>100&&(ie=100);const oe=100/((o.value-i.value)/a.value);let ke=Math.round(ie/oe)*oe*(o.value-i.value)*.01+i.value;ke=Number.parseFloat(ke.toFixed(l.value)),ke!==t.modelValue&&n(Zt,ke),!e.dragging&&t.modelValue!==e.oldValue&&(e.oldValue=t.modelValue),await Ot(),e.dragging&&b(),m.value.updatePopper()};return Ve(()=>e.dragging,ie=>{h(ie)}),sr(O,"touchstart",T,{passive:!1}),{disabled:r,button:O,tooltip:m,tooltipVisible:g,showTooltip:s,wrapperStyle:x,formatValue:y,handleMouseEnter:C,handleMouseLeave:E,onButtonDown:T,onKeyDown:I,setPosition:K}},e5e=(t,e,n,r)=>({stops:M(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const a=(t.max-t.min)/t.step,s=100*t.step/(t.max-t.min),l=Array.from({length:a-1}).map((u,c)=>(c+1)*s);return t.range?l.filter(u=>u<100*(n.value-t.min)/(t.max-t.min)||u>100*(r.value-t.min)/(t.max-t.min)):l.filter(u=>u>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:a=>t.vertical?{bottom:`${a}%`}:{left:`${a}%`}}),t5e=(t,e,n,r,i,o)=>{const a=u=>{i(Zt,u),i(Oa,u)},s=()=>t.range?![n.value,r.value].every((u,c)=>u===e.oldValue[c]):t.modelValue!==e.oldValue,l=()=>{var u,c;t.min>t.max&&Hi("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&Array.isArray(d)?d[1]t.max?a([t.max,t.max]):d[0]t.max?a([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],s()&&(t.validateEvent&&((u=o==null?void 0:o.validate)==null||u.call(o,"change").catch(f=>void 0)),e.oldValue=d.slice())):!t.range&&typeof d=="number"&&!Number.isNaN(d)&&(dt.max?a(t.max):(e.firstValue=d,s()&&(t.validateEvent&&((c=o==null?void 0:o.validate)==null||c.call(o,"change").catch(f=>void 0)),e.oldValue=d)))};l(),Ve(()=>e.dragging,u=>{u||l()}),Ve(()=>t.modelValue,(u,c)=>{e.dragging||Array.isArray(u)&&Array.isArray(c)&&u.every((d,f)=>d===c[f])&&e.firstValue===u[0]&&e.secondValue===u[1]||l()},{deep:!0}),Ve(()=>[t.min,t.max],()=>{l()})},n5e=Ye({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:ud,default:"top"}}),r5e={[Zt]:t=>kt(t)},i5e=ue({name:"ElSliderButton"}),o5e=ue({...i5e,props:n5e,emits:r5e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),o=Sn({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:r.modelValue}),{disabled:a,button:s,tooltip:l,showTooltip:u,tooltipVisible:c,wrapperStyle:d,formatValue:f,handleMouseEnter:h,handleMouseLeave:m,onButtonDown:g,onKeyDown:y,setPosition:b}=J4e(r,o,n),{hovering:w,dragging:O}=Ri(o);return e({onButtonDown:g,onKeyDown:y,setPosition:b,hovering:w,dragging:O}),(S,x)=>(R(),G("div",{ref_key:"button",ref:s,class:j([p(i).e("button-wrapper"),{hover:p(w),dragging:p(O)}]),style:mt(p(d)),tabindex:p(a)?-1:0,onMouseenter:p(h),onMouseleave:p(m),onMousedown:p(g),onFocus:p(h),onBlur:p(m),onKeydown:p(y)},[B(p(Ui),{ref_key:"tooltip",ref:l,visible:p(c),placement:S.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":S.tooltipClass,disabled:!p(u),persistent:""},{content:z(()=>[J("span",null,je(p(f)),1)]),default:z(()=>[J("div",{class:j([p(i).e("button"),{hover:p(w),dragging:p(O)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled"])],46,["tabindex","onMouseenter","onMouseleave","onMousedown","onFocus","onBlur","onKeydown"]))}});var B8=Ge(o5e,[["__file","button.vue"]]);const a5e=Ye({mark:{type:Oe([String,Object]),default:void 0}});var s5e=ue({name:"ElSliderMarker",props:a5e,setup(t){const e=Qe("slider"),n=M(()=>At(t.mark)?t.mark:t.mark.label),r=M(()=>At(t.mark)?void 0:t.mark.style);return()=>Et("div",{class:e.e("marks-text"),style:r.value},n.value)}});const l5e=ue({name:"ElSlider"}),u5e=ue({...l5e,props:F4e,emits:V4e,setup(t,{expose:e,emit:n}){const r=t,i=Qe("slider"),{t:o}=kn(),a=Sn({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:s,slider:l,firstButton:u,secondButton:c,sliderDisabled:d,minValue:f,maxValue:h,runwayStyle:m,barStyle:g,resetSize:y,emitChange:b,onSliderWrapperPrevent:w,onSliderClick:O,onSliderDown:S,onSliderMarkerDown:x,setFirstValue:C,setSecondValue:E}=Q4e(r,a,n),{stops:T,getStopStyle:P}=e5e(r,a,f,h),{inputId:A,isLabeledByFormItem:D}=gu(r,{formItemContext:s}),N=Ni(),$=M(()=>r.inputSize||N.value),W=M(()=>r.ariaLabel||o("el.slider.defaultLabel",{min:r.min,max:r.max})),L=M(()=>r.range?r.rangeStartLabel||o("el.slider.defaultRangeStartLabel"):W.value),I=M(()=>r.formatValueText?r.formatValueText(oe.value):`${oe.value}`),U=M(()=>r.rangeEndLabel||o("el.slider.defaultRangeEndLabel")),Q=M(()=>r.formatValueText?r.formatValueText(Se.value):`${Se.value}`),V=M(()=>[i.b(),i.m(N.value),i.is("vertical",r.vertical),{[i.m("with-input")]:r.showInput}]),q=z4e(r);t5e(r,a,f,h,n,s);const K=M(()=>{const re=[r.min,r.max,r.step].map(te=>{const ge=`${te}`.split(".")[1];return ge?ge.length:0});return Math.max.apply(null,re)}),{sliderWrapper:ie}=j4e(r,a,y),{firstValue:oe,secondValue:Se,sliderSize:ke}=Ri(a),Y=re=>{a.dragging=re};return sr(ie,"touchstart",w,{passive:!1}),sr(ie,"touchmove",w,{passive:!1}),_n(HU,{...Ri(r),sliderSize:ke,disabled:d,precision:K,emitChange:b,resetSize:y,updateDragging:Y}),e({onSliderClick:O}),(re,te)=>{var ge,Re;return R(),G("div",{id:re.range?p(A):void 0,ref_key:"sliderWrapper",ref:ie,class:j(p(V)),role:re.range?"group":void 0,"aria-label":re.range&&!p(D)?p(W):void 0,"aria-labelledby":re.range&&p(D)?(ge=p(s))==null?void 0:ge.labelId:void 0},[J("div",{ref_key:"slider",ref:l,class:j([p(i).e("runway"),{"show-input":re.showInput&&!re.range},p(i).is("disabled",p(d))]),style:mt(p(m)),onMousedown:p(S),onTouchstartPassive:p(S)},[J("div",{class:j(p(i).e("bar")),style:mt(p(g))},null,6),B(B8,{id:re.range?void 0:p(A),ref_key:"firstButton",ref:u,"model-value":p(oe),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":re.range||!p(D)?p(L):void 0,"aria-labelledby":!re.range&&p(D)?(Re=p(s))==null?void 0:Re.labelId:void 0,"aria-valuemin":re.min,"aria-valuemax":re.range?p(Se):re.max,"aria-valuenow":p(oe),"aria-valuetext":p(I),"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(C)},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"]),re.range?(R(),we(B8,{key:0,ref_key:"secondButton",ref:c,"model-value":p(Se),vertical:re.vertical,"tooltip-class":re.tooltipClass,placement:re.placement,role:"slider","aria-label":p(U),"aria-valuemin":p(oe),"aria-valuemax":re.max,"aria-valuenow":p(Se),"aria-valuetext":p(Q),"aria-orientation":re.vertical?"vertical":"horizontal","aria-disabled":p(d),"onUpdate:modelValue":p(E)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):_e("v-if",!0),re.showStops?(R(),G("div",{key:1},[(R(!0),G(ct,null,Wt(p(T),($e,Z)=>(R(),G("div",{key:Z,class:j(p(i).e("stop")),style:mt(p(P)($e))},null,6))),128))])):_e("v-if",!0),p(q).length>0?(R(),G(ct,{key:2},[J("div",null,[(R(!0),G(ct,null,Wt(p(q),($e,Z)=>(R(),G("div",{key:Z,style:mt(p(P)($e.position)),class:j([p(i).e("stop"),p(i).e("marks-stop")])},null,6))),128))]),J("div",{class:j(p(i).e("marks"))},[(R(!0),G(ct,null,Wt(p(q),($e,Z)=>(R(),we(p(s5e),{key:Z,mark:$e.mark,style:mt(p(P)($e.position)),onMousedown:Pt(ce=>p(x)($e.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):_e("v-if",!0)],46,["onMousedown","onTouchstartPassive"]),re.showInput&&!re.range?(R(),we(p(vU),{key:0,ref:"input","model-value":p(oe),class:j(p(i).e("input")),step:re.step,disabled:p(d),controls:re.showInputControls,min:re.min,max:re.max,precision:p(K),debounce:re.debounce,size:p($),"onUpdate:modelValue":p(C),onChange:p(b)},null,8,["model-value","class","step","disabled","controls","min","max","precision","debounce","size","onUpdate:modelValue","onChange"])):_e("v-if",!0)],10,["id","role","aria-label","aria-labelledby"])}}});var c5e=Ge(u5e,[["__file","slider.vue"]]);const d5e=Vt(c5e),f5e=Ye({prefixCls:{type:String}}),F8=ue({name:"ElSpaceItem",props:f5e,setup(t,{slots:e}){const n=Qe("space"),r=M(()=>`${t.prefixCls||n.b()}__item`);return()=>Et("div",{class:r.value},xe(e,"default"))}}),V8={small:8,default:12,large:16};function h5e(t){const e=Qe("space"),n=M(()=>[e.b(),e.m(t.direction),t.class]),r=F(0),i=F(0),o=M(()=>{const s=t.wrap||t.fill?{flexWrap:"wrap"}:{},l={alignItems:t.alignment},u={rowGap:`${i.value}px`,columnGap:`${r.value}px`};return[s,l,u,t.style]}),a=M(()=>t.fill?{flexGrow:1,minWidth:`${t.fillRatio}%`}:{});return Bo(()=>{const{size:s="small",wrap:l,direction:u,fill:c}=t;if(ut(s)){const[d=0,f=0]=s;r.value=d,i.value=f}else{let d;kt(s)?d=s:d=V8[s||"small"]||V8.small,(l||c)&&u==="horizontal"?r.value=i.value=d:u==="horizontal"?(r.value=d,i.value=0):(i.value=d,r.value=0)}}),{classes:n,containerStyle:o,itemStyle:a}}const p5e=Ye({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:Oe([String,Object,Array]),default:""},style:{type:Oe([String,Array,Object]),default:""},alignment:{type:Oe(String),default:"center"},prefixCls:{type:String},spacer:{type:Oe([Object,String,Number,Array]),default:null,validator:t=>Kr(t)||kt(t)||At(t)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:cc,validator:t=>kt(t)||ut(t)&&t.length===2&&t.every(kt)}}),g5e=ue({name:"ElSpace",props:p5e,setup(t,{slots:e}){const{classes:n,containerStyle:r,itemStyle:i}=h5e(t);function o(a,s="",l=[]){const{prefixCls:u}=t;return a.forEach((c,d)=>{_k(c)?ut(c.children)&&c.children.forEach((f,h)=>{_k(f)&&ut(f.children)?o(f.children,`${s+h}-`,l):l.push(B(F8,{style:i.value,prefixCls:u,key:`nested-${s+h}`},{default:()=>[f]},Ks.PROPS|Ks.STYLE,["style","prefixCls"]))}):JCe(c)&&l.push(B(F8,{style:i.value,prefixCls:u,key:`LoopKey${s+d}`},{default:()=>[c]},Ks.PROPS|Ks.STYLE,["style","prefixCls"]))}),l}return()=>{var a;const{spacer:s,direction:l}=t,u=xe(e,"default",{key:0},()=>[]);if(((a=u.children)!=null?a:[]).length===0)return null;if(ut(u.children)){let c=o(u.children);if(s){const d=c.length-1;c=c.reduce((f,h,m)=>{const g=[...f,h];return m!==d&&g.push(B("span",{style:[i.value,l==="vertical"?"width: 100%":null],key:m},[Kr(s)?s:qe(s,Ks.TEXT)],Ks.STYLE)),g},[])}return B("div",{class:n.value,style:r.value},c,Ks.STYLE|Ks.CLASS)}return u.children}}}),m5e=Vt(g5e),v5e=Ye({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:Oe([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:Oe([String,Object,Array])}}),y5e=ue({name:"ElStatistic"}),b5e=ue({...y5e,props:v5e,setup(t,{expose:e}){const n=t,r=Qe("statistic"),i=M(()=>{const{value:o,formatter:a,precision:s,decimalSeparator:l,groupSeparator:u}=n;if($t(a))return a(o);if(!kt(o)||Number.isNaN(o))return o;let[c,d=""]=String(o).split(".");return d=d.padEnd(s,"0").slice(0,s>0?s:0),c=c.replace(/\B(?=(\d{3})+(?!\d))/g,u),[c,d].join(d?l:"")});return e({displayValue:i}),(o,a)=>(R(),G("div",{class:j(p(r).b())},[o.$slots.title||o.title?(R(),G("div",{key:0,class:j(p(r).e("head"))},[xe(o.$slots,"title",{},()=>[qe(je(o.title),1)])],2)):_e("v-if",!0),J("div",{class:j(p(r).e("content"))},[o.$slots.prefix||o.prefix?(R(),G("div",{key:0,class:j(p(r).e("prefix"))},[xe(o.$slots,"prefix",{},()=>[J("span",null,je(o.prefix),1)])],2)):_e("v-if",!0),J("span",{class:j(p(r).e("number")),style:mt(o.valueStyle)},je(p(i)),7),o.$slots.suffix||o.suffix?(R(),G("div",{key:1,class:j(p(r).e("suffix"))},[xe(o.$slots,"suffix",{},()=>[J("span",null,je(o.suffix),1)])],2)):_e("v-if",!0)],2)],2))}});var _5e=Ge(b5e,[["__file","statistic.vue"]]);const WU=Vt(_5e),O5e=Ye({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:Oe([Number,Object]),default:0},valueStyle:{type:Oe([String,Object,Array])}}),w5e={finish:()=>!0,[Lr]:t=>kt(t)},S5e=[["Y",1e3*60*60*24*365],["M",1e3*60*60*24*30],["D",1e3*60*60*24],["H",1e3*60*60],["m",1e3*60],["s",1e3],["S",1]],j8=t=>kt(t)?new Date(t).getTime():t.valueOf(),z8=(t,e)=>{let n=t;const r=/\[([^\]]*)]/g;return S5e.reduce((o,[a,s])=>{const l=new RegExp(`${a}+(?![^\\[\\]]*\\])`,"g");if(l.test(o)){const u=Math.floor(n/s);return n-=u*s,o.replace(l,c=>String(u).padStart(c.length,"0"))}return o},e).replace(r,"$1")},x5e=ue({name:"ElCountdown"}),C5e=ue({...x5e,props:O5e,emits:w5e,setup(t,{expose:e,emit:n}){const r=t;let i;const o=F(0),a=M(()=>z8(o.value,r.format)),s=c=>z8(c,r.format),l=()=>{i&&(tp(i),i=void 0)},u=()=>{const c=j8(r.value),d=()=>{let f=c-Date.now();n("change",f),f<=0?(f=0,l(),n("finish")):i=gf(d),o.value=f};i=gf(d)};return Bt(()=>{o.value=j8(r.value)-Date.now(),Ve(()=>[r.value,r.format],()=>{l(),u()},{immediate:!0})}),pr(()=>{l()}),e({displayValue:a}),(c,d)=>(R(),we(p(WU),{value:o.value,title:c.title,prefix:c.prefix,suffix:c.suffix,"value-style":c.valueStyle,formatter:s},ts({_:2},[Wt(c.$slots,(f,h)=>({name:h,fn:z(()=>[xe(c.$slots,h)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var E5e=Ge(C5e,[["__file","countdown.vue"]]);const T5e=Vt(E5e),k5e=Ye({space:{type:[Number,String],default:""},active:{type:Number,default:0},direction:{type:String,default:"horizontal",values:["horizontal","vertical"]},alignCenter:{type:Boolean},simple:{type:Boolean},finishStatus:{type:String,values:["wait","process","finish","error","success"],default:"finish"},processStatus:{type:String,values:["wait","process","finish","error","success"],default:"process"}}),P5e={[Lr]:(t,e)=>[t,e].every(kt)},A5e=ue({name:"ElSteps"}),M5e=ue({...A5e,props:k5e,emits:P5e,setup(t,{emit:e}){const n=t,r=Qe("steps"),{children:i,addChild:o,removeChild:a}=N$(en(),"ElStep");return Ve(i,()=>{i.value.forEach((s,l)=>{s.setIndex(l)})}),_n("ElSteps",{props:n,steps:i,addStep:o,removeStep:a}),Ve(()=>n.active,(s,l)=>{e(Lr,s,l)}),(s,l)=>(R(),G("div",{class:j([p(r).b(),p(r).m(s.simple?"simple":s.direction)])},[xe(s.$slots,"default")],2))}});var R5e=Ge(M5e,[["__file","steps.vue"]]);const $5e=Ye({title:{type:String,default:""},icon:{type:fr},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),N5e=ue({name:"ElStep"}),D5e=ue({...N5e,props:$5e,setup(t){const e=t,n=Qe("step"),r=F(-1),i=F({}),o=F(""),a=ht("ElSteps"),s=en();Bt(()=>{Ve([()=>a.props.active,()=>a.props.processStatus,()=>a.props.finishStatus],([C])=>{S(C)},{immediate:!0})}),pr(()=>{a.removeStep(x.uid)});const l=M(()=>e.status||o.value),u=M(()=>{const C=a.steps.value[r.value-1];return C?C.currentStatus:"wait"}),c=M(()=>a.props.alignCenter),d=M(()=>a.props.direction==="vertical"),f=M(()=>a.props.simple),h=M(()=>a.steps.value.length),m=M(()=>{var C;return((C=a.steps.value[h.value-1])==null?void 0:C.uid)===(s==null?void 0:s.uid)}),g=M(()=>f.value?"":a.props.space),y=M(()=>[n.b(),n.is(f.value?"simple":a.props.direction),n.is("flex",m.value&&!g.value&&!c.value),n.is("center",c.value&&!d.value&&!f.value)]),b=M(()=>{const C={flexBasis:kt(g.value)?`${g.value}px`:g.value?g.value:`${100/(h.value-(c.value?0:1))}%`};return d.value||m.value&&(C.maxWidth=`${100/h.value}%`),C}),w=C=>{r.value=C},O=C=>{const E=C==="wait",T={transitionDelay:`${E?"-":""}${150*r.value}ms`},P=C===a.props.processStatus||E?0:100;T.borderWidth=P&&!f.value?"1px":0,T[a.props.direction==="vertical"?"height":"width"]=`${P}%`,i.value=T},S=C=>{C>r.value?o.value=a.props.finishStatus:C===r.value&&u.value!=="error"?o.value=a.props.processStatus:o.value="wait";const E=a.steps.value[r.value-1];E&&E.calcProgress(o.value)},x=Sn({uid:s.uid,currentStatus:l,setIndex:w,calcProgress:O});return a.addStep(x),(C,E)=>(R(),G("div",{style:mt(p(b)),class:j(p(y))},[_e(" icon & line "),J("div",{class:j([p(n).e("head"),p(n).is(p(l))])},[p(f)?_e("v-if",!0):(R(),G("div",{key:0,class:j(p(n).e("line"))},[J("i",{class:j(p(n).e("line-inner")),style:mt(i.value)},null,6)],2)),J("div",{class:j([p(n).e("icon"),p(n).is(C.icon||C.$slots.icon?"icon":"text")])},[xe(C.$slots,"icon",{},()=>[C.icon?(R(),we(p(gt),{key:0,class:j(p(n).e("icon-inner"))},{default:z(()=>[(R(),we(un(C.icon)))]),_:1},8,["class"])):p(l)==="success"?(R(),we(p(gt),{key:1,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:z(()=>[B(p(Sb))]),_:1},8,["class"])):p(l)==="error"?(R(),we(p(gt),{key:2,class:j([p(n).e("icon-inner"),p(n).is("status")])},{default:z(()=>[B(p(_a))]),_:1},8,["class"])):p(f)?_e("v-if",!0):(R(),G("div",{key:3,class:j(p(n).e("icon-inner"))},je(r.value+1),3))])],2)],2),_e(" title & description "),J("div",{class:j(p(n).e("main"))},[J("div",{class:j([p(n).e("title"),p(n).is(p(l))])},[xe(C.$slots,"title",{},()=>[qe(je(C.title),1)])],2),p(f)?(R(),G("div",{key:0,class:j(p(n).e("arrow"))},null,2)):(R(),G("div",{key:1,class:j([p(n).e("description"),p(n).is(p(l))])},[xe(C.$slots,"description",{},()=>[qe(je(C.description),1)])],2))],2)],6))}});var UU=Ge(D5e,[["__file","item.vue"]]);const L5e=Vt(R5e,{Step:UU}),I5e=ti(UU),B5e=Ye({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:WQ},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:fr},activeActionIcon:{type:fr},activeIcon:{type:fr},inactiveIcon:{type:fr},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:Oe(Function)},id:String,tabindex:{type:[String,Number]},...wo(["ariaLabel"])}),F5e={[Zt]:t=>si(t)||At(t)||kt(t),[Lr]:t=>si(t)||At(t)||kt(t),[Oa]:t=>si(t)||At(t)||kt(t)},qU="ElSwitch",V5e=ue({name:qU}),j5e=ue({...V5e,props:B5e,emits:F5e,setup(t,{expose:e,emit:n}){const r=t,{formItem:i}=ua(),o=Ni(),a=Qe("switch"),{inputId:s}=gu(r,{formItemContext:i}),l=la(M(()=>r.loading)),u=F(r.modelValue!==!1),c=F(),d=F(),f=M(()=>[a.b(),a.m(o.value),a.is("disabled",l.value),a.is("checked",b.value)]),h=M(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),m=M(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),g=M(()=>({width:pi(r.width)}));Ve(()=>r.modelValue,()=>{u.value=!0});const y=M(()=>u.value?r.modelValue:!1),b=M(()=>y.value===r.activeValue);[r.activeValue,r.inactiveValue].includes(y.value)||(n(Zt,r.inactiveValue),n(Lr,r.inactiveValue),n(Oa,r.inactiveValue)),Ve(b,x=>{var C;c.value.checked=x,r.validateEvent&&((C=i==null?void 0:i.validate)==null||C.call(i,"change").catch(E=>void 0))});const w=()=>{const x=b.value?r.inactiveValue:r.activeValue;n(Zt,x),n(Lr,x),n(Oa,x),Ot(()=>{c.value.checked=b.value})},O=()=>{if(l.value)return;const{beforeChange:x}=r;if(!x){w();return}const C=x();[Jy(C),si(C)].includes(!0)||Hi(qU,"beforeChange must return type `Promise` or `boolean`"),Jy(C)?C.then(T=>{T&&w()}).catch(T=>{}):C&&w()},S=()=>{var x,C;(C=(x=c.value)==null?void 0:x.focus)==null||C.call(x)};return Bt(()=>{c.value.checked=b.value}),e({focus:S,checked:b}),(x,C)=>(R(),G("div",{class:j(p(f)),onClick:Pt(O,["prevent"])},[J("input",{id:p(s),ref_key:"input",ref:c,class:j(p(a).e("input")),type:"checkbox",role:"switch","aria-checked":p(b),"aria-disabled":p(l),"aria-label":x.ariaLabel,name:x.name,"true-value":x.activeValue,"false-value":x.inactiveValue,disabled:p(l),tabindex:x.tabindex,onChange:w,onKeydown:br(O,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!x.inlinePrompt&&(x.inactiveIcon||x.inactiveText)?(R(),G("span",{key:0,class:j(p(h))},[x.inactiveIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.inactiveIcon)))]),_:1})):_e("v-if",!0),!x.inactiveIcon&&x.inactiveText?(R(),G("span",{key:1,"aria-hidden":p(b)},je(x.inactiveText),9,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0),J("span",{ref_key:"core",ref:d,class:j(p(a).e("core")),style:mt(p(g))},[x.inlinePrompt?(R(),G("div",{key:0,class:j(p(a).e("inner"))},[x.activeIcon||x.inactiveIcon?(R(),we(p(gt),{key:0,class:j(p(a).is("icon"))},{default:z(()=>[(R(),we(un(p(b)?x.activeIcon:x.inactiveIcon)))]),_:1},8,["class"])):x.activeText||x.inactiveText?(R(),G("span",{key:1,class:j(p(a).is("text")),"aria-hidden":!p(b)},je(p(b)?x.activeText:x.inactiveText),11,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0),J("div",{class:j(p(a).e("action"))},[x.loading?(R(),we(p(gt),{key:0,class:j(p(a).is("loading"))},{default:z(()=>[B(p(Ku))]),_:1},8,["class"])):p(b)?xe(x.$slots,"active-action",{key:1},()=>[x.activeActionIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.activeActionIcon)))]),_:1})):_e("v-if",!0)]):p(b)?_e("v-if",!0):xe(x.$slots,"inactive-action",{key:2},()=>[x.inactiveActionIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.inactiveActionIcon)))]),_:1})):_e("v-if",!0)])],2)],6),!x.inlinePrompt&&(x.activeIcon||x.activeText)?(R(),G("span",{key:1,class:j(p(m))},[x.activeIcon?(R(),we(p(gt),{key:0},{default:z(()=>[(R(),we(un(x.activeIcon)))]),_:1})):_e("v-if",!0),!x.activeIcon&&x.activeText?(R(),G("span",{key:1,"aria-hidden":!p(b)},je(x.activeText),9,["aria-hidden"])):_e("v-if",!0)],2)):_e("v-if",!0)],10,["onClick"]))}});var z5e=Ge(j5e,[["__file","switch.vue"]]);const Xm=Vt(z5e),$T=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Q5e=function(t,e,n,r,i){if(!e&&!r&&(!i||Array.isArray(i)&&!i.length))return t;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=r?null:function(s,l){return i?(Array.isArray(i)||(i=[i]),i.map(u=>typeof u=="string"?Wr(s,u):u(s,l,t))):(e!=="$key"&&sn(s)&&"$value"in s&&(s=s.$value),[sn(s)?Wr(s,e):s])},a=function(s,l){if(r)return r(s.value,l.value);for(let u=0,c=s.key.length;ul.key[u])return 1}return 0};return t.map((s,l)=>({value:s,index:l,key:o?o(s,l):null})).sort((s,l)=>{let u=a(s,l);return u||(u=s.index-l.index),u*+n}).map(s=>s.value)},YU=function(t,e){let n=null;return t.columns.forEach(r=>{r.id===e&&(n=r)}),n},H5e=function(t,e){let n=null;for(let r=0;r{if(!t)throw new Error("Row is required when get row identity");if(typeof e=="string"){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let r=t;for(const i of n)r=r[i];return`${r}`}else if(typeof e=="function")return e.call(null,t)},$h=function(t,e){const n={};return(t||[]).forEach((r,i)=>{n[ta(r,e)]={row:r,index:i}}),n};function W5e(t,e){const n={};let r;for(r in t)n[r]=t[r];for(r in e)if(Dn(e,r)){const i=e[r];typeof i!="undefined"&&(n[r]=i)}return n}function uN(t){return t===""||t!==void 0&&(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function XU(t){return t===""||t!==void 0&&(t=uN(t),Number.isNaN(t)&&(t=80)),t}function U5e(t){return typeof t=="number"?t:typeof t=="string"?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function q5e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...r)=>e(n(...r)))}function Aw(t,e,n,r,i,o){let a=o!=null?o:0,s=!1;const l=t.indexOf(e),u=l!==-1,c=i==null?void 0:i.call(null,e,o),d=h=>{h==="add"?t.push(e):t.splice(l,1),s=!0},f=h=>{let m=0;const g=(r==null?void 0:r.children)&&h[r.children];return g&&ut(g)&&(m+=g.length,g.forEach(y=>{m+=f(y)})),m};return(!i||c)&&(si(n)?n&&!u?d("add"):!n&&u&&d("remove"):d(u?"remove":"add")),!(r!=null&&r.checkStrictly)&&(r==null?void 0:r.children)&&ut(e[r.children])&&e[r.children].forEach(h=>{Aw(t,h,n!=null?n:!u,r,i,a+1),a+=f(h)+1}),s}function Y5e(t,e,n="children",r="hasChildren"){const i=a=>!(Array.isArray(a)&&a.length);function o(a,s,l){e(a,s,l),s.forEach(u=>{if(u[r]){e(u,null,l+1);return}const c=u[n];i(c)||o(u,c,l+1)})}t.forEach(a=>{if(a[r]){e(a,null,0);return}const s=a[n];i(s)||o(a,s,0)})}let Gs=null;function X5e(t,e,n,r){if((Gs==null?void 0:Gs.trigger)===n)return;Gs==null||Gs();const i=r==null?void 0:r.refs.tableWrapper,o=i==null?void 0:i.dataset.prefix,a={strategy:"fixed",...t.popperOptions},s=B(Ui,{content:e,virtualTriggering:!0,virtualRef:n,appendTo:i,placement:"top",transition:"none",offset:0,hideAfter:0,...t,popperOptions:a,onHide:()=>{Gs==null||Gs()}});s.appContext={...r.appContext,...r};const l=document.createElement("div");uf(s,l),s.component.exposed.onOpen();const u=i==null?void 0:i.querySelector(`.${o}-scrollbar__wrap`);Gs=()=>{uf(null,l),u==null||u.removeEventListener("scroll",Gs),Gs=null},Gs.trigger=n,u==null||u.addEventListener("scroll",Gs)}function ZU(t){return t.children?W9(t.children,ZU):[t]}function H8(t,e){return t+e.colSpan}const GU=(t,e,n,r)=>{let i=0,o=t;const a=n.states.columns.value;if(r){const l=ZU(r[t]);i=a.slice(0,a.indexOf(l[0])).reduce(H8,0),o=i+l.reduce(H8,0)-1}else i=t;let s;switch(e){case"left":o=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right");break;default:o=a.length-n.states.rightFixedLeafColumnsLength.value&&(s="right")}return s?{direction:s,start:i,after:o}:{}},cN=(t,e,n,r,i,o=0)=>{const a=[],{direction:s,start:l,after:u}=GU(e,n,r,i);if(s){const c=s==="left";a.push(`${t}-fixed-column--${s}`),c&&u+o===r.states.fixedLeafColumnsLength.value-1?a.push("is-last-column"):!c&&l-o===r.states.columns.value.length-r.states.rightFixedLeafColumnsLength.value&&a.push("is-first-column")}return a};function W8(t,e){return t+(e.realWidth===null||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const dN=(t,e,n,r)=>{const{direction:i,start:o=0,after:a=0}=GU(t,e,n,r);if(!i)return;const s={},l=i==="left",u=n.states.columns.value;return l?s.left=u.slice(0,o).reduce(W8,0):s.right=u.slice(a+1).reverse().reduce(W8,0),s},am=(t,e)=>{!t||Number.isNaN(t[e])||(t[e]=`${t[e]}px`)};function Z5e(t){const e=en(),n=F(!1),r=F([]);return{updateExpandRows:()=>{const l=t.data.value||[],u=t.rowKey.value;if(n.value)r.value=l.slice();else if(u){const c=$h(r.value,u);r.value=l.reduce((d,f)=>{const h=ta(f,u);return c[h]&&d.push(f),d},[])}else r.value=[]},toggleRowExpansion:(l,u)=>{Aw(r.value,l,u)&&e.emit("expand-change",l,r.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const u=t.data.value||[],c=t.rowKey.value,d=$h(u,c);r.value=l.reduce((f,h)=>{const m=d[h];return m&&f.push(m.row),f},[])},isRowExpanded:l=>{const u=t.rowKey.value;return u?!!$h(r.value,u)[ta(l,u)]:r.value.includes(l)},states:{expandRows:r,defaultExpandAll:n}}}function G5e(t){const e=en(),n=F(null),r=F(null),i=u=>{e.store.assertRowKey(),n.value=u,a(u)},o=()=>{n.value=null},a=u=>{const{data:c,rowKey:d}=t;let f=null;d.value&&(f=(p(c)||[]).find(h=>ta(h,d.value)===u)),r.value=f,e.emit("current-change",r.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:o,setCurrentRowByKey:a,updateCurrentRow:u=>{const c=r.value;if(u&&u!==c){r.value=u,e.emit("current-change",r.value,c);return}!u&&c&&(r.value=null,e.emit("current-change",null,c))},updateCurrentRowData:()=>{const u=t.rowKey.value,c=t.data.value||[],d=r.value;if(!c.includes(d)&&d){if(u){const f=ta(d,u);a(f)}else r.value=null;r.value===null&&e.emit("current-change",null,d)}else n.value&&(a(n.value),o())},states:{_currentRowKey:n,currentRow:r}}}function K5e(t){const e=F([]),n=F({}),r=F(16),i=F(!1),o=F({}),a=F("hasChildren"),s=F("children"),l=F(!1),u=en(),c=M(()=>{if(!t.rowKey.value)return{};const O=t.data.value||[];return f(O)}),d=M(()=>{const O=t.rowKey.value,S=Object.keys(o.value),x={};return S.length&&S.forEach(C=>{if(o.value[C].length){const E={children:[]};o.value[C].forEach(T=>{const P=ta(T,O);E.children.push(P),T[a.value]&&!x[P]&&(x[P]={children:[]})}),x[C]=E}}),x}),f=O=>{const S=t.rowKey.value,x={};return Y5e(O,(C,E,T)=>{const P=ta(C,S);Array.isArray(E)?x[P]={children:E.map(A=>ta(A,S)),level:T}:i.value&&(x[P]={children:[],lazy:!0,level:T})},s.value,a.value),x},h=(O=!1,S=(x=>(x=u.store)==null?void 0:x.states.defaultExpandAll.value)())=>{var x;const C=c.value,E=d.value,T=Object.keys(C),P={};if(T.length){const A=p(n),D=[],N=(W,L)=>{if(O)return e.value?S||e.value.includes(L):!!(S||(W==null?void 0:W.expanded));{const I=S||e.value&&e.value.includes(L);return!!((W==null?void 0:W.expanded)||I)}};T.forEach(W=>{const L=A[W],I={...C[W]};if(I.expanded=N(L,W),I.lazy){const{loaded:U=!1,loading:Q=!1}=L||{};I.loaded=!!U,I.loading=!!Q,D.push(W)}P[W]=I});const $=Object.keys(E);i.value&&$.length&&D.length&&$.forEach(W=>{const L=A[W],I=E[W].children;if(D.includes(W)){if(P[W].children.length!==0)throw new Error("[ElTable]children must be an empty array.");P[W].children=I}else{const{loaded:U=!1,loading:Q=!1}=L||{};P[W]={lazy:!0,loaded:!!U,loading:!!Q,expanded:N(L,W),children:I,level:""}}})}n.value=P,(x=u.store)==null||x.updateTableScrollY()};Ve(()=>e.value,()=>{h(!0)}),Ve(()=>c.value,()=>{h()}),Ve(()=>d.value,()=>{h()});const m=O=>{e.value=O,h()},g=(O,S)=>{u.store.assertRowKey();const x=t.rowKey.value,C=ta(O,x),E=C&&n.value[C];if(C&&E&&"expanded"in E){const T=E.expanded;S=typeof S=="undefined"?!E.expanded:S,n.value[C].expanded=S,T!==S&&u.emit("expand-change",O,S),u.store.updateTableScrollY()}},y=O=>{u.store.assertRowKey();const S=t.rowKey.value,x=ta(O,S),C=n.value[x];i.value&&C&&"loaded"in C&&!C.loaded?b(O,x,C):g(O,void 0)},b=(O,S,x)=>{const{load:C}=u.props;C&&!n.value[S].loaded&&(n.value[S].loading=!0,C(O,x,E=>{if(!Array.isArray(E))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,E.length&&(o.value[S]=E),u.emit("expand-change",O,!0)}))};return{loadData:b,loadOrToggle:y,toggleTreeExpansion:g,updateTreeExpandKeys:m,updateTreeData:h,updateKeyChildren:(O,S)=>{const{lazy:x,rowKey:C}=u.props;if(!!x){if(!C)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[O]&&(o.value[O]=S)}},normalize:f,states:{expandRowKeys:e,treeData:n,indent:r,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:a,childrenColumnName:s,checkStrictly:l}}}const J5e=(t,e)=>{const n=e.sortingColumn;return!n||typeof n.sortable=="string"?t:Q5e(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},T1=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,T1(n.children)):e.push(n)}),e};function e8e(){var t;const e=en(),{size:n}=Ri((t=e.proxy)==null?void 0:t.$props),r=F(null),i=F([]),o=F([]),a=F(!1),s=F([]),l=F([]),u=F([]),c=F([]),d=F([]),f=F([]),h=F([]),m=F([]),g=[],y=F(0),b=F(0),w=F(0),O=F(!1),S=F([]),x=F(!1),C=F(!1),E=F(null),T=F({}),P=F(null),A=F(null),D=F(null),N=F(null),$=F(null);Ve(i,()=>e.state&&Q(!1),{deep:!0});const W=()=>{if(!r.value)throw new Error("[ElTable] prop row-key is required")},L=Me=>{var nt;(nt=Me.children)==null||nt.forEach(de=>{de.fixed=Me.fixed,L(de)})};let I;const U=()=>{s.value.forEach(Le=>{L(Le)}),c.value=s.value.filter(Le=>Le.fixed===!0||Le.fixed==="left"),d.value=s.value.filter(Le=>Le.fixed==="right"),ai(I)&&s.value[0]&&s.value[0].type==="selection"&&(I=Boolean(s.value[0].fixed)),c.value.length>0&&s.value[0]&&s.value[0].type==="selection"&&(s.value[0].fixed?c.value.some(wt=>wt.type!=="selection")?I=void 0:(s.value[0].fixed=I,I||c.value.shift()):(s.value[0].fixed=!0,c.value.unshift(s.value[0])));const Me=s.value.filter(Le=>!Le.fixed);l.value=[].concat(c.value).concat(Me).concat(d.value);const nt=T1(Me),de=T1(c.value),Pe=T1(d.value);y.value=nt.length,b.value=de.length,w.value=Pe.length,u.value=[].concat(de).concat(nt).concat(Pe),a.value=c.value.length>0||d.value.length>0},Q=(Me,nt=!1)=>{Me&&U(),nt?e.state.doLayout():e.state.debouncedUpdateLayout()},V=Me=>S.value.some(nt=>so(nt,Me)),q=()=>{O.value=!1;const Me=S.value;S.value=[],Me.length&&e.emit("selection-change",[])},K=()=>{let Me;if(r.value){Me=[];const nt=$h(S.value,r.value),de=$h(i.value,r.value);for(const Pe in nt)Dn(nt,Pe)&&!de[Pe]&&Me.push(nt[Pe].row)}else Me=S.value.filter(nt=>!i.value.includes(nt));if(Me.length){const nt=S.value.filter(de=>!Me.includes(de));S.value=nt,e.emit("selection-change",nt.slice())}},ie=()=>(S.value||[]).slice(),oe=(Me,nt,de=!0,Pe=!1)=>{var Le,wt,tn,De;const xt={children:(wt=(Le=e==null?void 0:e.store)==null?void 0:Le.states)==null?void 0:wt.childrenColumnName.value,checkStrictly:(De=(tn=e==null?void 0:e.store)==null?void 0:tn.states)==null?void 0:De.checkStrictly.value};if(Aw(S.value,Me,nt,xt,Pe?void 0:E.value)){const ln=(S.value||[]).slice();de&&e.emit("select",ln,Me),e.emit("selection-change",ln)}},Se=()=>{var Me,nt;const de=C.value?!O.value:!(O.value||S.value.length);O.value=de;let Pe=!1,Le=0;const wt=(nt=(Me=e==null?void 0:e.store)==null?void 0:Me.states)==null?void 0:nt.rowKey.value,{childrenColumnName:tn}=e.store.states,De={children:tn.value,checkStrictly:!1};i.value.forEach((xt,qt)=>{const ln=qt+Le;Aw(S.value,xt,de,De,E.value,ln)&&(Pe=!0),Le+=re(ta(xt,wt))}),Pe&&e.emit("selection-change",S.value?S.value.slice():[]),e.emit("select-all",(S.value||[]).slice())},ke=()=>{const Me=$h(S.value,r.value);i.value.forEach(nt=>{const de=ta(nt,r.value),Pe=Me[de];Pe&&(S.value[Pe.index]=nt)})},Y=()=>{var Me;if(((Me=i.value)==null?void 0:Me.length)===0){O.value=!1;return}const{childrenColumnName:nt}=e.store.states,de=r.value?$h(S.value,r.value):void 0;let Pe=0,Le=0;const wt=xt=>de?!!de[ta(xt,r.value)]:S.value.includes(xt),tn=xt=>{var qt;for(const ln of xt){const nn=E.value&&E.value.call(null,ln,Pe);if(wt(ln))Le++;else if(!E.value||nn)return!1;if(Pe++,((qt=ln[nt.value])==null?void 0:qt.length)&&!tn(ln[nt.value]))return!1}return!0},De=tn(i.value||[]);O.value=Le===0?!1:De},re=Me=>{var nt;if(!e||!e.store)return 0;const{treeData:de}=e.store.states;let Pe=0;const Le=(nt=de.value[Me])==null?void 0:nt.children;return Le&&(Pe+=Le.length,Le.forEach(wt=>{Pe+=re(wt)})),Pe},te=(Me,nt)=>{Array.isArray(Me)||(Me=[Me]);const de={};return Me.forEach(Pe=>{T.value[Pe.id]=nt,de[Pe.columnKey||Pe.id]=nt}),de},ge=(Me,nt,de)=>{A.value&&A.value!==Me&&(A.value.order=null),A.value=Me,D.value=nt,N.value=de},Re=()=>{let Me=p(o);Object.keys(T.value).forEach(nt=>{const de=T.value[nt];if(!de||de.length===0)return;const Pe=YU({columns:u.value},nt);Pe&&Pe.filterMethod&&(Me=Me.filter(Le=>de.some(wt=>Pe.filterMethod.call(null,wt,Le,Pe))))}),P.value=Me},$e=()=>{i.value=J5e(P.value,{sortingColumn:A.value,sortProp:D.value,sortOrder:N.value})},Z=(Me=void 0)=>{Me&&Me.filter||Re(),$e()},ce=Me=>{const{tableHeaderRef:nt}=e.refs;if(!nt)return;const de=Object.assign({},nt.filterPanels),Pe=Object.keys(de);if(!!Pe.length)if(typeof Me=="string"&&(Me=[Me]),Array.isArray(Me)){const Le=Me.map(wt=>H5e({columns:u.value},wt));Pe.forEach(wt=>{const tn=Le.find(De=>De.id===wt);tn&&(tn.filteredValue=[])}),e.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else Pe.forEach(Le=>{const wt=u.value.find(tn=>tn.id===Le);wt&&(wt.filteredValue=[])}),T.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Te=()=>{!A.value||(ge(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:Ie,toggleRowExpansion:ae,updateExpandRows:me,states:Ae,isRowExpanded:X}=Z5e({data:i,rowKey:r}),{updateTreeExpandKeys:ee,toggleTreeExpansion:le,updateTreeData:Ce,updateKeyChildren:fe,loadOrToggle:Ee,states:be}=K5e({data:i,rowKey:r}),{updateCurrentRowData:Be,updateCurrentRow:Xe,setCurrentRowKey:Ke,states:tt}=G5e({data:i,rowKey:r});return{assertRowKey:W,updateColumns:U,scheduleLayout:Q,isSelected:V,clearSelection:q,cleanSelection:K,getSelectionRows:ie,toggleRowSelection:oe,_toggleAllSelection:Se,toggleAllSelection:null,updateSelectionByRowKey:ke,updateAllSelected:Y,updateFilters:te,updateCurrentRow:Xe,updateSort:ge,execFilter:Re,execSort:$e,execQuery:Z,clearFilter:ce,clearSort:Te,toggleRowExpansion:ae,setExpandRowKeysAdapter:Me=>{Ie(Me),ee(Me)},setCurrentRowKey:Ke,toggleRowExpansionAdapter:(Me,nt)=>{u.value.some(({type:Pe})=>Pe==="expand")?ae(Me,nt):le(Me,nt)},isRowExpanded:X,updateExpandRows:me,updateCurrentRowData:Be,loadOrToggle:Ee,updateTreeData:Ce,updateKeyChildren:fe,states:{tableSize:n,rowKey:r,data:i,_data:o,isComplex:a,_columns:s,originColumns:l,columns:u,fixedColumns:c,rightFixedColumns:d,leafColumns:f,fixedLeafColumns:h,rightFixedLeafColumns:m,updateOrderFns:g,leafColumnsLength:y,fixedLeafColumnsLength:b,rightFixedLeafColumnsLength:w,isAllSelected:O,selection:S,reserveSelection:x,selectOnIndeterminate:C,selectable:E,filters:T,filteredData:P,sortingColumn:A,sortProp:D,sortOrder:N,hoverRow:$,...Ae,...be,...tt}}}function aP(t,e){return t.map(n=>{var r;return n.id===e.id?e:((r=n.children)!=null&&r.length&&(n.children=aP(n.children,e)),n)})}function sP(t){t.forEach(e=>{var n,r;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(r=e.children)!=null&&r.length&&sP(e.children)}),t.sort((e,n)=>e.no-n.no)}function t8e(){const t=en(),e=e8e();return{ns:Qe("table"),...e,mutations:{setData(a,s){const l=p(a._data)!==s;a.data.value=s,a._data.value=s,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),p(a.reserveSelection)?(t.store.assertRowKey(),t.store.updateSelectionByRowKey()):l?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,s,l,u){const c=p(a._columns);let d=[];l?(l&&!l.children&&(l.children=[]),l.children.push(s),d=aP(c,l)):(c.push(s),d=c),sP(d),a._columns.value=d,a.updateOrderFns.push(u),s.type==="selection"&&(a.selectable.value=s.selectable,a.reserveSelection.value=s.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,s){var l;((l=s.getColumnIndex)==null?void 0:l.call(s))!==s.no&&(sP(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,s,l,u){const c=p(a._columns)||[];if(l)l.children.splice(l.children.findIndex(f=>f.id===s.id),1),Ot(()=>{var f;((f=l.children)==null?void 0:f.length)===0&&delete l.children}),a._columns.value=aP(c,l);else{const f=c.indexOf(s);f>-1&&(c.splice(f,1),a._columns.value=c)}const d=a.updateOrderFns.indexOf(u);d>-1&&a.updateOrderFns.splice(d,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,s){const{prop:l,order:u,init:c}=s;if(l){const d=p(a.columns).find(f=>f.property===l);d&&(d.order=u,t.store.updateSort(d,l,u),t.store.commit("changeSortCondition",{init:c}))}},changeSortCondition(a,s){const{sortingColumn:l,sortProp:u,sortOrder:c}=a,d=p(l),f=p(u),h=p(c);h===null&&(a.sortingColumn.value=null,a.sortProp.value=null);const m={filter:!0};t.store.execQuery(m),(!s||!(s.silent||s.init))&&t.emit("sort-change",{column:d,prop:f,order:h}),t.store.updateTableScrollY()},filterChange(a,s){const{column:l,values:u,silent:c}=s,d=t.store.updateFilters(l,u);t.store.execQuery(),c||t.emit("filter-change",d),t.store.updateTableScrollY()},toggleAllSelection(){t.store.toggleAllSelection()},rowSelectedChanged(a,s){t.store.toggleRowSelection(s),t.store.updateAllSelected()},setHoverRow(a,s){a.hoverRow.value=s},setCurrentRow(a,s){t.store.updateCurrentRow(s)}},commit:function(a,...s){const l=t.store.mutations;if(l[a])l[a].apply(t,[t.store.states].concat(s));else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){Ot(()=>t.layout.updateScrollY.apply(t.layout))}}}const Ty={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data",["treeProps.hasChildren"]:{key:"lazyColumnIdentifier",default:"hasChildren"},["treeProps.children"]:{key:"childrenColumnName",default:"children"},["treeProps.checkStrictly"]:{key:"checkStrictly",default:!1}};function n8e(t,e){if(!t)throw new Error("Table is required.");const n=t8e();return n.toggleAllSelection=jo(n._toggleAllSelection,10),Object.keys(Ty).forEach(r=>{KU(JU(e,r),r,n)}),r8e(n,e),n}function r8e(t,e){Object.keys(Ty).forEach(n=>{Ve(()=>JU(e,n),r=>{KU(r,n,t)})})}function KU(t,e,n){let r=t,i=Ty[e];typeof Ty[e]=="object"&&(i=i.key,r=r||Ty[e].default),n.states[i].value=r}function JU(t,e){if(e.includes(".")){const n=e.split(".");let r=t;return n.forEach(i=>{r=r[i]}),r}else return t[e]}class i8e{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=F(null),this.scrollX=F(!1),this.scrollY=F(!1),this.bodyWidth=F(null),this.fixedWidth=F(null),this.rightFixedWidth=F(null),this.gutterWidth=0;for(const n in e)Dn(e,n)&&(kr(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(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n==null?void 0:n.wrapRef)){let r=!0;const i=this.scrollY.value;return r=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=r,i!==r}return!1}setHeight(e,n="height"){if(!Tn)return;const r=this.table.vnode.el;if(e=U5e(e),this.height.value=Number(e),!r&&(e||e===0))return Ot(()=>this.setHeight(e,n));typeof e=="number"?(r.style[n]=`${e}px`,this.updateElsHeight()):typeof e=="string"&&(r.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(r=>{r.isColumnGroup?e.push.apply(e,r.columns):e.push(r)}),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(){if(!Tn)return;const e=this.fit,n=this.table.vnode.el.clientWidth;let r=0;const i=this.getFlattenColumns(),o=i.filter(l=>typeof l.width!="number");if(i.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),o.length>0&&e){if(i.forEach(l=>{r+=Number(l.width||l.minWidth||80)}),r<=n){this.scrollX.value=!1;const l=n-r;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+l;else{const u=o.reduce((f,h)=>f+Number(h.minWidth||80),0),c=l/u;let d=0;o.forEach((f,h)=>{if(h===0)return;const m=Math.floor(Number(f.minWidth||80)*c);d+=m,f.realWidth=Number(f.minWidth||80)+m}),o[0].realWidth=Number(o[0].minWidth||80)+l-d}}else this.scrollX.value=!0,o.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(r,n),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),r+=l.realWidth}),this.scrollX.value=r>n,this.bodyWidth.value=r;const a=this.store.states.fixedColumns.value;if(a.length>0){let l=0;a.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.fixedWidth.value=l}const s=this.store.states.rightFixedColumns.value;if(s.length>0){let l=0;s.forEach(u=>{l+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=l}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(r=>{var i,o;switch(e){case"columns":(i=r.state)==null||i.onColumnsChange(this);break;case"scrollable":(o=r.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const{CheckboxGroup:o8e}=Is,a8e=ue({name:"ElTableFilterPanel",components:{ElCheckbox:Is,ElCheckboxGroup:o8e,ElScrollbar:mu,ElTooltip:Ui,ElIcon:gt,ArrowDown:ld,ArrowUp:o$},directives:{ClickOutside:qc},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:{type:String}},setup(t){const e=en(),{t:n}=kn(),r=Qe("table-filter"),i=e==null?void 0:e.parent;i.filterPanels.value[t.column.id]||(i.filterPanels.value[t.column.id]=e);const o=F(!1),a=F(null),s=M(()=>t.column&&t.column.filters),l=M(()=>t.column.filterClassName?`${r.b()} ${t.column.filterClassName}`:r.b()),u=M({get:()=>{var x;return(((x=t.column)==null?void 0:x.filteredValue)||[])[0]},set:x=>{c.value&&(typeof x!="undefined"&&x!==null?c.value.splice(0,1,x):c.value.splice(0,1))}}),c=M({get(){return t.column?t.column.filteredValue||[]:[]},set(x){t.column&&t.upDataColumn("filteredValue",x)}}),d=M(()=>t.column?t.column.filterMultiple:!0),f=x=>x.value===u.value,h=()=>{o.value=!1},m=x=>{x.stopPropagation(),o.value=!o.value},g=()=>{o.value=!1},y=()=>{O(c.value),h()},b=()=>{c.value=[],O(c.value),h()},w=x=>{u.value=x,O(typeof x!="undefined"&&x!==null?c.value:[]),h()},O=x=>{t.store.commit("filterChange",{column:t.column,values:x}),t.store.updateAllSelected()};Ve(o,x=>{t.column&&t.upDataColumn("filterOpened",x)},{immediate:!0});const S=M(()=>{var x,C;return(C=(x=a.value)==null?void 0:x.popperRef)==null?void 0:C.contentRef});return{tooltipVisible:o,multiple:d,filterClassName:l,filteredValue:c,filterValue:u,filters:s,handleConfirm:y,handleReset:b,handleSelect:w,isActive:f,t:n,ns:r,showFilterPanel:m,hideFilterPanel:g,popperPaneRef:S,tooltip:a}}});function s8e(t,e,n,r,i,o){const a=an("el-checkbox"),s=an("el-checkbox-group"),l=an("el-scrollbar"),u=an("arrow-up"),c=an("arrow-down"),d=an("el-icon"),f=an("el-tooltip"),h=dx("click-outside");return R(),we(f,{ref:"tooltip",visible:t.tooltipVisible,offset:0,placement:t.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo},{content:z(()=>[t.multiple?(R(),G("div",{key:0},[J("div",{class:j(t.ns.e("content"))},[B(l,{"wrap-class":t.ns.e("wrap")},{default:z(()=>[B(s,{modelValue:t.filteredValue,"onUpdate:modelValue":m=>t.filteredValue=m,class:j(t.ns.e("checkbox-group"))},{default:z(()=>[(R(!0),G(ct,null,Wt(t.filters,m=>(R(),we(a,{key:m.value,value:m.value},{default:z(()=>[qe(je(m.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),J("div",{class:j(t.ns.e("bottom"))},[J("button",{class:j({[t.ns.is("disabled")]:t.filteredValue.length===0}),disabled:t.filteredValue.length===0,type:"button",onClick:t.handleConfirm},je(t.t("el.table.confirmFilter")),11,["disabled","onClick"]),J("button",{type:"button",onClick:t.handleReset},je(t.t("el.table.resetFilter")),9,["onClick"])],2)])):(R(),G("ul",{key:1,class:j(t.ns.e("list"))},[J("li",{class:j([t.ns.e("list-item"),{[t.ns.is("active")]:t.filterValue===void 0||t.filterValue===null}]),onClick:m=>t.handleSelect(null)},je(t.t("el.table.clearFilter")),11,["onClick"]),(R(!0),G(ct,null,Wt(t.filters,m=>(R(),G("li",{key:m.value,class:j([t.ns.e("list-item"),t.ns.is("active",t.isActive(m))]),label:m.value,onClick:g=>t.handleSelect(m.value)},je(m.text),11,["label","onClick"]))),128))],2))]),default:z(()=>[Ht((R(),G("span",{class:j([`${t.ns.namespace.value}-table__column-filter-trigger`,`${t.ns.namespace.value}-none-outline`]),onClick:t.showFilterPanel},[B(d,null,{default:z(()=>[xe(t.$slots,"filter-icon",{},()=>[t.column.filterOpened?(R(),we(u,{key:0})):(R(),we(c,{key:1}))])]),_:3})],10,["onClick"])),[[h,t.hideFilterPanel,t.popperPaneRef]])]),_:3},8,["visible","placement","popper-class","append-to"])}var l8e=Ge(a8e,[["render",s8e],["__file","filter-panel.vue"]]);function eq(t){const e=en();cx(()=>{n.value.addObserver(e)}),Bt(()=>{r(n.value),i(n.value)}),Jc(()=>{r(n.value),i(n.value)}),ed(()=>{n.value.removeObserver(e)});const n=M(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),r=o=>{var a;const s=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col"))||[];if(!s.length)return;const l=o.getFlattenColumns(),u={};l.forEach(c=>{u[c.id]=c});for(let c=0,d=s.length;c{var a,s;const l=((a=t.vnode.el)==null?void 0:a.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let c=0,d=l.length;c{g.stopPropagation()},o=(g,y)=>{!y.filters&&y.sortable?m(g,y,!1):y.filterable&&!y.sortable&&i(g),r==null||r.emit("header-click",y,g)},a=(g,y)=>{r==null||r.emit("header-contextmenu",y,g)},s=F(null),l=F(!1),u=F({}),c=(g,y)=>{if(!!Tn&&!(y.children&&y.children.length>0)&&s.value&&t.border){l.value=!0;const b=r;e("set-drag-visible",!0);const O=(b==null?void 0:b.vnode.el).getBoundingClientRect().left,S=n.vnode.el.querySelector(`th.${y.id}`),x=S.getBoundingClientRect(),C=x.left-O+30;rl(S,"noclick"),u.value={startMouseLeft:g.clientX,startLeft:x.right-O,startColumnLeft:x.left-O,tableLeft:O};const E=b==null?void 0:b.refs.resizeProxy;E.style.left=`${u.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const T=A=>{const D=A.clientX-u.value.startMouseLeft,N=u.value.startLeft+D;E.style.left=`${Math.max(C,N)}px`},P=()=>{if(l.value){const{startColumnLeft:A,startLeft:D}=u.value,$=Number.parseInt(E.style.left,10)-A;y.width=y.realWidth=$,b==null||b.emit("header-dragend",y.width,D-A,y,g),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,s.value=null,u.value={},e("set-drag-visible",!1)}document.removeEventListener("mousemove",T),document.removeEventListener("mouseup",P),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{aa(S,"noclick")},0)};document.addEventListener("mousemove",T),document.addEventListener("mouseup",P)}},d=(g,y)=>{var b;if(y.children&&y.children.length>0)return;const w=g.target;if(!As(w))return;const O=w==null?void 0:w.closest("th");if(!(!y||!y.resizable||!O)&&!l.value&&t.border){const S=O.getBoundingClientRect(),x=document.body.style,C=((b=O.parentNode)==null?void 0:b.lastElementChild)===O;S.width>12&&S.right-g.pageX<8&&!C?(x.cursor="col-resize",Ua(O,"is-sortable")&&(O.style.cursor="col-resize"),s.value=y):l.value||(x.cursor="",Ua(O,"is-sortable")&&(O.style.cursor="pointer"),s.value=null)}},f=()=>{!Tn||(document.body.style.cursor="")},h=({order:g,sortOrders:y})=>{if(g==="")return y[0];const b=y.indexOf(g||null);return y[b>y.length-2?0:b+1]},m=(g,y,b)=>{var w;g.stopPropagation();const O=y.order===b?null:b||h(y),S=(w=g.target)==null?void 0:w.closest("th");if(S&&Ua(S,"noclick")){aa(S,"noclick");return}if(!y.sortable)return;const x=g.currentTarget;if(["ascending","descending"].some(A=>Ua(x,A)&&!y.sortOrders.includes(A)))return;const C=t.store.states;let E=C.sortProp.value,T;const P=C.sortingColumn.value;(P!==y||P===y&&P.order===null)&&(P&&(P.order=null),C.sortingColumn.value=y,E=y.property),O?T=y.order=O:T=y.order=null,C.sortProp.value=E,C.sortOrder.value=T,r==null||r.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:a,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:m,handleFilterClick:i}}function c8e(t){const e=ht(fc),n=Qe("table");return{getHeaderRowStyle:s=>{const l=e==null?void 0:e.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:s}):l},getHeaderRowClass:s=>{const l=[],u=e==null?void 0:e.props.headerRowClassName;return typeof u=="string"?l.push(u):typeof u=="function"&&l.push(u.call(null,{rowIndex:s})),l.join(" ")},getHeaderCellStyle:(s,l,u,c)=>{var d;let f=(d=e==null?void 0:e.props.headerCellStyle)!=null?d:{};typeof f=="function"&&(f=f.call(null,{rowIndex:s,columnIndex:l,row:u,column:c}));const h=dN(l,c.fixed,t.store,u);return am(h,"left"),am(h,"right"),Object.assign({},f,h)},getHeaderCellClass:(s,l,u,c)=>{const d=cN(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==null?void 0:e.props.headerCellClassName;return typeof h=="string"?f.push(h):typeof h=="function"&&f.push(h.call(null,{rowIndex:s,columnIndex:l,row:u,column:c})),f.push(n.e("cell")),f.filter(m=>Boolean(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},nq=t=>{let e=1;const n=(o,a)=>{if(a&&(o.level=a.level+1,e{n(l,o),s+=l.colSpan}),o.colSpan=s}else o.colSpan=1};t.forEach(o=>{o.level=1,n(o,void 0)});const r=[];for(let o=0;o{o.children?(o.rowSpan=1,o.children.forEach(a=>a.isSubColumn=!0)):o.rowSpan=e-o.level+1,r[o.level-1].push(o)}),r};function d8e(t){const e=ht(fc),n=M(()=>nq(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==null||e.store.commit("toggleAllSelection")},columnRows:n}}var f8e=ue({name:"ElTableHeader",components:{ElCheckbox:Is},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String}},setup(t,{emit:e}){const n=en(),r=ht(fc),i=Qe("table"),o=F({}),{onColumnsChange:a,onScrollableChange:s}=eq(r);Bt(async()=>{await Ot(),await Ot();const{prop:C,order:E}=t.defaultSort;r==null||r.store.commit("sort",{prop:C,order:E,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:m}=u8e(t,e),{getHeaderRowStyle:g,getHeaderRowClass:y,getHeaderCellStyle:b,getHeaderCellClass:w}=c8e(t),{isGroup:O,toggleAllSelection:S,columnRows:x}=d8e(t);return n.state={onColumnsChange:a,onScrollableChange:s},n.filterPanels=o,{ns:i,filterPanels:o,onColumnsChange:a,onScrollableChange:s,columnRows:x,getHeaderRowClass:y,getHeaderRowStyle:g,getHeaderCellClass:w,getHeaderCellStyle:b,handleHeaderClick:l,handleHeaderContextMenu:u,handleMouseDown:c,handleMouseMove:d,handleMouseOut:f,handleSortClick:h,handleFilterClick:m,isGroup:O,toggleAllSelection:S}},render(){const{ns:t,isGroup:e,columnRows:n,getHeaderCellStyle:r,getHeaderCellClass:i,getHeaderRowClass:o,getHeaderRowStyle:a,handleHeaderClick:s,handleHeaderContextMenu:l,handleMouseDown:u,handleMouseMove:c,handleSortClick:d,handleMouseOut:f,store:h,$parent:m}=this;let g=1;return Et("thead",{class:{[t.is("group")]:e}},n.map((y,b)=>Et("tr",{class:o(b),key:b,style:a(b)},y.map((w,O)=>(w.rowSpan>g&&(g=w.rowSpan),Et("th",{class:i(b,O,y,w),colspan:w.colSpan,key:`${w.id}-thead`,rowspan:w.rowSpan,style:r(b,O,y,w),onClick:S=>{S.currentTarget.classList.contains("noclick")||s(S,w)},onContextmenu:S=>l(S,w),onMousedown:S=>u(S,w),onMousemove:S=>c(S,w),onMouseout:f},[Et("div",{class:["cell",w.filteredValue&&w.filteredValue.length>0?"highlight":""]},[w.renderHeader?w.renderHeader({column:w,$index:O,store:h,_self:m}):w.label,w.sortable&&Et("span",{onClick:S=>d(S,w),class:"caret-wrapper"},[Et("i",{onClick:S=>d(S,w,"ascending"),class:"sort-caret ascending"}),Et("i",{onClick:S=>d(S,w,"descending"),class:"sort-caret descending"})]),w.filterable&&Et(l8e,{store:h,placement:w.filterPlacement||"bottom-start",appendTo:m.appendFilterPanelTo,column:w,upDataColumn:(S,x)=>{w[S]=x}},{"filter-icon":()=>w.renderFilterIcon?w.renderFilterIcon({filterOpened:w.filterOpened}):null})])]))))))}});function NT(t,e,n=.03){return t-e>n}function h8e(t){const e=ht(fc),n=F(""),r=F(Et("div")),i=(m,g,y)=>{var b;const w=e,O=$T(m);let S;const x=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;O&&(S=Q8({columns:t.store.states.columns.value},O,x),S&&(w==null||w.emit(`cell-${y}`,g,S,O,m))),w==null||w.emit(`row-${y}`,g,S,m)},o=(m,g)=>{i(m,g,"dblclick")},a=(m,g)=>{t.store.commit("setCurrentRow",g),i(m,g,"click")},s=(m,g)=>{i(m,g,"contextmenu")},l=jo(m=>{t.store.commit("setHoverRow",m)},30),u=jo(()=>{t.store.commit("setHoverRow",null)},30),c=m=>{const g=window.getComputedStyle(m,null),y=Number.parseInt(g.paddingLeft,10)||0,b=Number.parseInt(g.paddingRight,10)||0,w=Number.parseInt(g.paddingTop,10)||0,O=Number.parseInt(g.paddingBottom,10)||0;return{left:y,right:b,top:w,bottom:O}},d=(m,g,y)=>{let b=g.target.parentNode;for(;m>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)y(b,"hover-row hover-fixed-row"),m--};return{handleDoubleClick:o,handleClick:a,handleContextMenu:s,handleMouseEnter:l,handleMouseLeave:u,handleCellMouseEnter:(m,g,y)=>{var b;const w=e,O=$T(m),S=(b=w==null?void 0:w.vnode.el)==null?void 0:b.dataset.prefix;if(O){const U=Q8({columns:t.store.states.columns.value},O,S);O.rowSpan>1&&d(O.rowSpan,m,rl);const Q=w.hoverState={cell:O,column:U,row:g};w==null||w.emit("cell-mouse-enter",Q.row,Q.column,Q.cell,m)}if(!y)return;const x=m.target.querySelector(".cell");if(!(Ua(x,`${S}-tooltip`)&&x.childNodes.length))return;const C=document.createRange();C.setStart(x,0),C.setEnd(x,x.childNodes.length);const{width:E,height:T}=C.getBoundingClientRect(),{width:P,height:A}=x.getBoundingClientRect(),{top:D,left:N,right:$,bottom:W}=c(x),L=N+$,I=D+W;(NT(E+L,P)||NT(T+I,A)||NT(x.scrollWidth,P))&&X5e(y,O.innerText||O.textContent,O,w)},handleCellMouseLeave:m=>{const g=$T(m);if(!g)return;g.rowSpan>1&&d(g.rowSpan,m,aa);const y=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,m)},tooltipContent:n,tooltipTrigger:r}}function p8e(t){const e=ht(fc),n=Qe("table");return{getRowStyle:(u,c)=>{const d=e==null?void 0:e.props.rowStyle;return typeof d=="function"?d.call(null,{row:u,rowIndex:c}):d||null},getRowClass:(u,c)=>{const d=[n.e("row")];(e==null?void 0:e.props.highlightCurrentRow)&&u===t.store.states.currentRow.value&&d.push("current-row"),t.stripe&&c%2===1&&d.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return typeof f=="string"?d.push(f):typeof f=="function"&&d.push(f.call(null,{row:u,rowIndex:c})),d},getCellStyle:(u,c,d,f)=>{const h=e==null?void 0:e.props.cellStyle;let m=h!=null?h:{};typeof h=="function"&&(m=h.call(null,{rowIndex:u,columnIndex:c,row:d,column:f}));const g=dN(c,t==null?void 0:t.fixed,t.store);return am(g,"left"),am(g,"right"),Object.assign({},m,g)},getCellClass:(u,c,d,f,h)=>{const m=cN(n.b(),c,t==null?void 0:t.fixed,t.store,void 0,h),g=[f.id,f.align,f.className,...m],y=e==null?void 0:e.props.cellClassName;return typeof y=="string"?g.push(y):typeof y=="function"&&g.push(y.call(null,{rowIndex:u,columnIndex:c,row:d,column:f})),g.push(n.e("cell")),g.filter(b=>Boolean(b)).join(" ")},getSpan:(u,c,d,f)=>{let h=1,m=1;const g=e==null?void 0:e.props.spanMethod;if(typeof g=="function"){const y=g({row:u,column:c,rowIndex:d,columnIndex:f});Array.isArray(y)?(h=y[0],m=y[1]):typeof y=="object"&&(h=y.rowspan,m=y.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 g8e=ue({name:"TableTdWrapper"}),m8e=ue({...g8e,props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(R(),G("td",{colspan:t.colspan,rowspan:t.rowspan},[xe(e.$slots,"default")],8,["colspan","rowspan"]))}});var v8e=Ge(m8e,[["__file","td-wrapper.vue"]]);function y8e(t){const e=ht(fc),n=Qe("table"),{handleDoubleClick:r,handleClick:i,handleContextMenu:o,handleMouseEnter:a,handleMouseLeave:s,handleCellMouseEnter:l,handleCellMouseLeave:u,tooltipContent:c,tooltipTrigger:d}=h8e(t),{getRowStyle:f,getRowClass:h,getCellStyle:m,getCellClass:g,getSpan:y,getColspanRealWidth:b}=p8e(t),w=M(()=>t.store.states.columns.value.findIndex(({type:E})=>E==="default")),O=(E,T)=>{const P=e.props.rowKey;return P?ta(E,P):T},S=(E,T,P,A=!1)=>{const{tooltipEffect:D,tooltipOptions:N,store:$}=t,{indent:W,columns:L}=$.states,I=h(E,T);let U=!0;return P&&(I.push(n.em("row",`level-${P.level}`)),U=P.display),Et("tr",{style:[U?null:{display:"none"},f(E,T)],class:I,key:O(E,T),onDblclick:V=>r(V,E),onClick:V=>i(V,E),onContextmenu:V=>o(V,E),onMouseenter:()=>a(T),onMouseleave:s},L.value.map((V,q)=>{const{rowspan:K,colspan:ie}=y(E,V,T,q);if(!K||!ie)return null;const oe=Object.assign({},V);oe.realWidth=b(L.value,ie,q);const Se={store:t.store,_self:t.context||e,column:oe,row:E,$index:T,cellIndex:q,expanded:A};q===w.value&&P&&(Se.treeNode={indent:P.level*W.value,level:P.level},typeof P.expanded=="boolean"&&(Se.treeNode.expanded=P.expanded,"loading"in P&&(Se.treeNode.loading=P.loading),"noLazyChildren"in P&&(Se.treeNode.noLazyChildren=P.noLazyChildren)));const ke=`${O(E,T)},${q}`,Y=oe.columnKey||oe.rawColumnKey||"",re=V.showOverflowTooltip&&Jh({effect:D},N,V.showOverflowTooltip);return Et(v8e,{style:m(T,q,E,V),class:g(T,q,E,V,ie-1),key:`${Y}${ke}`,rowspan:K,colspan:ie,onMouseenter:te=>l(te,E,re),onMouseleave:u},{default:()=>x(q,V,Se)})}))},x=(E,T,P)=>T.renderCell(P);return{wrappedRowRender:(E,T)=>{const P=t.store,{isRowExpanded:A,assertRowKey:D}=P,{treeData:N,lazyTreeNodeMap:$,childrenColumnName:W,rowKey:L}=P.states,I=P.states.columns.value;if(I.some(({type:Q})=>Q==="expand")){const Q=A(E),V=S(E,T,void 0,Q),q=e.renderExpanded;return Q?q?[[V,Et("tr",{key:`expanded-row__${V.key}`},[Et("td",{colspan:I.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[q({row:E,$index:T,store:P,expanded:Q})])])]]:(console.error("[Element Error]renderExpanded is required."),V):[[V]]}else if(Object.keys(N.value).length){D();const Q=ta(E,L.value);let V=N.value[Q],q=null;V&&(q={expanded:V.expanded,level:V.level,display:!0},typeof V.lazy=="boolean"&&(typeof V.loaded=="boolean"&&V.loaded&&(q.noLazyChildren=!(V.children&&V.children.length)),q.loading=V.loading));const K=[S(E,T,q)];if(V){let ie=0;const oe=(ke,Y)=>{!(ke&&ke.length&&Y)||ke.forEach(re=>{const te={display:Y.display&&Y.expanded,level:Y.level+1,expanded:!1,noLazyChildren:!1,loading:!1},ge=ta(re,L.value);if(ge==null)throw new Error("For nested data item, row-key is required.");if(V={...N.value[ge]},V&&(te.expanded=V.expanded,V.level=V.level||te.level,V.display=!!(V.expanded&&te.display),typeof V.lazy=="boolean"&&(typeof V.loaded=="boolean"&&V.loaded&&(te.noLazyChildren=!(V.children&&V.children.length)),te.loading=V.loading)),ie++,K.push(S(re,T+ie,te)),V){const Re=$.value[ge]||re[W.value];oe(Re,V)}})};V.display=!0;const Se=$.value[Q]||E[W.value];oe(Se,V)}return K}else return S(E,T,void 0)},tooltipContent:c,tooltipTrigger:d}}const b8e={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 _8e=ue({name:"ElTableBody",props:b8e,setup(t){const e=en(),n=ht(fc),r=Qe("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}=y8e(t),{onColumnsChange:s,onScrollableChange:l}=eq(n),u=[];return Ve(t.store.states.hoverRow,(c,d)=>{var f;const h=e==null?void 0:e.vnode.el,m=Array.from((h==null?void 0:h.children)||[]).filter(b=>b==null?void 0:b.classList.contains(`${r.e("row")}`));let g=c;const y=(f=m[g])==null?void 0:f.childNodes;if(y!=null&&y.length){let b=0;Array.from(y).reduce((O,S,x)=>{var C,E;return((C=y[x])==null?void 0:C.colSpan)>1&&(b=(E=y[x])==null?void 0:E.colSpan),S.nodeName!=="TD"&&b===0&&O.push(x),b>0&&b--,O},[]).forEach(O=>{var S;for(g=c;g>0;){const x=(S=m[g-1])==null?void 0:S.childNodes;if(x[O]&&x[O].nodeName==="TD"&&x[O].rowSpan>1){rl(x[O],"hover-cell"),u.push(x[O]);break}g--}})}else u.forEach(b=>aa(b,"hover-cell")),u.length=0;!t.store.states.isComplex.value||!Tn||gf(()=>{const b=m[d],w=m[c];b&&!b.classList.contains("hover-fixed-row")&&aa(b,"hover-row"),w&&rl(w,"hover-row")})}),ed(()=>{var c;(c=Gs)==null||c()}),{ns:r,onColumnsChange:s,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:a}},render(){const{wrappedRowRender:t,store:e}=this,n=e.states.data.value||[];return Et("tbody",{tabIndex:-1},[n.reduce((r,i)=>r.concat(t(i,r.length)),[])])}});function O8e(){const t=ht(fc),e=t==null?void 0:t.store,n=M(()=>e.states.fixedLeafColumnsLength.value),r=M(()=>e.states.rightFixedColumns.value.length),i=M(()=>e.states.columns.value.length),o=M(()=>e.states.fixedColumns.value.length),a=M(()=>e.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:r,columnsCount:i,leftFixedCount:o,rightFixedCount:a,columns:e.states.columns}}function w8e(t){const{columns:e}=O8e(),n=Qe("table");return{getCellClasses:(o,a)=>{const s=o[a],l=[n.e("cell"),s.id,s.align,s.labelClassName,...cN(n.b(),a,s.fixed,t.store)];return s.className&&l.push(s.className),s.children||l.push(n.is("leaf")),l},getCellStyles:(o,a)=>{const s=dN(a,o.fixed,t.store);return am(s,"left"),am(s,"right"),s},columns:e}}var S8e=ue({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{getCellClasses:e,getCellStyles:n,columns:r}=w8e(t);return{ns:Qe("table"),getCellClasses:e,getCellStyles:n,columns:r}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:r,sumText:i}=this,o=this.store.states.data.value;let a=[];return r?a=r({columns:t,data:o}):t.forEach((s,l)=>{if(l===0){a[l]=i;return}const u=o.map(h=>Number(h[s.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?a[l]="":a[l]=u.reduce((h,m)=>{const g=Number(m);return Number.isNaN(+g)?h:Number.parseFloat((h+m).toFixed(Math.min(f,20)))},0)}),Et(Et("tfoot",[Et("tr",{},[...t.map((s,l)=>Et("td",{key:l,colspan:s.colSpan,rowspan:s.rowSpan,class:n(t,l),style:e(s,l)},[Et("div",{class:["cell",s.labelClassName]},[a[l]])]))])]))}});function x8e(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 C8e(t,e,n,r){const i=F(!1),o=F(null),a=F(!1),s=V=>{a.value=V},l=F({width:null,height:null,headerHeight:null}),u=F(!1),c={display:"inline-block",verticalAlign:"middle"},d=F(),f=F(0),h=F(0),m=F(0),g=F(0),y=F(0);Bo(()=>{e.setHeight(t.height)}),Bo(()=>{e.setMaxHeight(t.maxHeight)}),Ve(()=>[t.currentRowKey,n.states.rowKey],([V,q])=>{!p(q)||!p(V)||n.setCurrentRowKey(`${V}`)},{immediate:!0}),Ve(()=>t.data,V=>{r.store.commit("setData",V)},{immediate:!0,deep:!0}),Bo(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{r.store.commit("setHoverRow",null),r.hoverState&&(r.hoverState=null)},w=(V,q)=>{const{pixelX:K,pixelY:ie}=q;Math.abs(K)>=Math.abs(ie)&&(r.refs.bodyWrapper.scrollLeft+=q.pixelX/5)},O=M(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),S=M(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),x=()=>{O.value&&e.updateElsHeight(),e.updateColumnsWidth(),requestAnimationFrame(P)};Bt(async()=>{await Ot(),n.updateColumns(),A(),requestAnimationFrame(x);const V=r.vnode.el,q=r.refs.headerWrapper;t.flexible&&V&&V.parentElement&&(V.parentElement.style.minWidth="0"),l.value={width:d.value=V.offsetWidth,height:V.offsetHeight,headerHeight:t.showHeader&&q?q.offsetHeight:null},n.states.columns.value.forEach(K=>{K.filteredValue&&K.filteredValue.length&&r.store.commit("filterChange",{column:K,values:K.filteredValue,silent:!0})}),r.$ready=!0});const C=(V,q)=>{if(!V)return;const K=Array.from(V.classList).filter(ie=>!ie.startsWith("is-scrolling-"));K.push(e.scrollX.value?q:"is-scrolling-none"),V.className=K.join(" ")},E=V=>{const{tableWrapper:q}=r.refs;C(q,V)},T=V=>{const{tableWrapper:q}=r.refs;return!!(q&&q.classList.contains(V))},P=function(){if(!r.refs.scrollBarRef)return;if(!e.scrollX.value){const Y="is-scrolling-none";T(Y)||E(Y);return}const V=r.refs.scrollBarRef.wrapRef;if(!V)return;const{scrollLeft:q,offsetWidth:K,scrollWidth:ie}=V,{headerWrapper:oe,footerWrapper:Se}=r.refs;oe&&(oe.scrollLeft=q),Se&&(Se.scrollLeft=q);const ke=ie-K-1;q>=ke?E("is-scrolling-right"):E(q===0?"is-scrolling-left":"is-scrolling-middle")},A=()=>{!r.refs.scrollBarRef||(r.refs.scrollBarRef.wrapRef&&sr(r.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),t.fit?Zr(r.vnode.el,D):sr(window,"resize",D),Zr(r.refs.bodyWrapper,()=>{var V,q;D(),(q=(V=r.refs)==null?void 0:V.scrollBarRef)==null||q.update()}))},D=()=>{var V,q,K,ie;const oe=r.vnode.el;if(!r.$ready||!oe)return;let Se=!1;const{width:ke,height:Y,headerHeight:re}=l.value,te=d.value=oe.offsetWidth;ke!==te&&(Se=!0);const ge=oe.offsetHeight;(t.height||O.value)&&Y!==ge&&(Se=!0);const Re=t.tableLayout==="fixed"?r.refs.headerWrapper:(V=r.refs.tableHeaderRef)==null?void 0:V.$el;t.showHeader&&(Re==null?void 0:Re.offsetHeight)!==re&&(Se=!0),f.value=((q=r.refs.tableWrapper)==null?void 0:q.scrollHeight)||0,m.value=(Re==null?void 0:Re.scrollHeight)||0,g.value=((K=r.refs.footerWrapper)==null?void 0:K.offsetHeight)||0,y.value=((ie=r.refs.appendWrapper)==null?void 0:ie.offsetHeight)||0,h.value=f.value-m.value-g.value-y.value,Se&&(l.value={width:te,height:ge,headerHeight:t.showHeader&&(Re==null?void 0:Re.offsetHeight)||0},x())},N=Ni(),$=M(()=>{const{bodyWidth:V,scrollY:q,gutterWidth:K}=e;return V.value?`${V.value-(q.value?K:0)}px`:""}),W=M(()=>t.maxHeight?"fixed":t.tableLayout),L=M(()=>{if(t.data&&t.data.length)return null;let V="100%";t.height&&h.value&&(V=`${h.value}px`);const q=d.value;return{width:q?`${q}px`:"",height:V}}),I=M(()=>t.height?{height:Number.isNaN(Number(t.height))?t.height:`${t.height}px`}:t.maxHeight?{maxHeight:Number.isNaN(Number(t.maxHeight))?t.maxHeight:`${t.maxHeight}px`}:{}),U=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:i,renderExpanded:o,setDragVisible:s,isGroup:u,handleMouseLeave:b,handleHeaderFooterMousewheel:w,tableSize:N,emptyBlockStyle:L,handleFixedMousewheel:(V,q)=>{const K=r.refs.bodyWrapper;if(Math.abs(q.spinY)>0){const ie=K.scrollTop;q.pixelY<0&&ie!==0&&V.preventDefault(),q.pixelY>0&&K.scrollHeight-K.clientHeight>ie&&V.preventDefault(),K.scrollTop+=Math.ceil(q.pixelY/5)}else K.scrollLeft+=Math.ceil(q.pixelX/5)},resizeProxyVisible:a,bodyWidth:$,resizeState:l,doLayout:x,tableBodyStyles:S,tableLayout:W,scrollbarViewStyle:c,tableInnerStyle:I,scrollbarStyle:U}}function E8e(t){const e=F(),n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},a=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{a.forEach(s=>s())}),e.value.observe(i,o)};Bt(()=>{n()}),ed(()=>{var r;(r=e.value)==null||r.disconnect()})}var T8e={data:{type:Array,default:()=>[]},size:Wi,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,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:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0}};function rq(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(i=>i.width===void 0)&&(n=[]);const r=i=>{const o={key:`${t.tableLayout}_${i.id}`,style:{},name:void 0};return e?o.style={width:`${i.width}px`}:o.name=i.id,o};return Et("colgroup",{},n.map(i=>Et("col",r(i))))}rq.props=["columns","tableLayout"];const k8e=()=>{const t=F(),e=(o,a)=>{const s=t.value;s&&s.scrollTo(o,a)},n=(o,a)=>{const s=t.value;s&&kt(a)&&["Top","Left"].includes(o)&&s[`setScroll${o}`](a)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};let P8e=1;const A8e=ue({name:"ElTable",directives:{Mousewheel:aMe},components:{TableHeader:f8e,TableBody:_8e,TableFooter:S8e,ElScrollbar:mu,hColgroup:rq},props:T8e,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"],setup(t){const{t:e}=kn(),n=Qe("table"),r=en();_n(fc,r);const i=n8e(r,t);r.store=i;const o=new i8e({store:r.store,table:r,fit:t.fit,showHeader:t.showHeader});r.layout=o;const a=M(()=>(i.states.data.value||[]).length===0),{setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,sort:g,updateKeyChildren:y}=x8e(i),{isHidden:b,renderExpanded:w,setDragVisible:O,isGroup:S,handleMouseLeave:x,handleHeaderFooterMousewheel:C,tableSize:E,emptyBlockStyle:T,handleFixedMousewheel:P,resizeProxyVisible:A,bodyWidth:D,resizeState:N,doLayout:$,tableBodyStyles:W,tableLayout:L,scrollbarViewStyle:I,tableInnerStyle:U,scrollbarStyle:Q}=C8e(t,o,i,r),{scrollBarRef:V,scrollTo:q,setScrollLeft:K,setScrollTop:ie}=k8e(),oe=jo($,50),Se=`${n.namespace.value}-table_${P8e++}`;r.tableId=Se,r.state={isGroup:S,resizeState:N,doLayout:$,debouncedUpdateLayout:oe};const ke=M(()=>{var te;return(te=t.sumText)!=null?te:e("el.table.sumText")}),Y=M(()=>{var te;return(te=t.emptyText)!=null?te:e("el.table.emptyText")}),re=M(()=>nq(i.states.originColumns.value)[0]);return E8e(r),pr(()=>{oe.cancel()}),{ns:n,layout:o,store:i,columns:re,handleHeaderFooterMousewheel:C,handleMouseLeave:x,tableId:Se,tableSize:E,isHidden:b,isEmpty:a,renderExpanded:w,resizeProxyVisible:A,resizeState:N,isGroup:S,bodyWidth:D,tableBodyStyles:W,emptyBlockStyle:T,debouncedUpdateLayout:oe,handleFixedMousewheel:P,setCurrentRow:s,getSelectionRows:l,toggleRowSelection:u,clearSelection:c,clearFilter:d,toggleAllSelection:f,toggleRowExpansion:h,clearSort:m,doLayout:$,sort:g,updateKeyChildren:y,t:e,setDragVisible:O,context:r,computedSumText:ke,computedEmptyText:Y,tableLayout:L,scrollbarViewStyle:I,tableInnerStyle:U,scrollbarStyle:Q,scrollBarRef:V,scrollTo:q,setScrollLeft:K,setScrollTop:ie}}});function M8e(t,e,n,r,i,o){const a=an("hColgroup"),s=an("table-header"),l=an("table-body"),u=an("table-footer"),c=an("el-scrollbar"),d=dx("mousewheel");return R(),G("div",{ref:"tableWrapper",class:j([{[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:t.handleMouseLeave},[J("div",{class:j(t.ns.e("inner-wrapper")),style:mt(t.tableInnerStyle)},[J("div",{ref:"hiddenColumns",class:"hidden-columns"},[xe(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Ht((R(),G("div",{key:0,ref:"headerWrapper",class:j(t.ns.e("header-wrapper"))},[J("table",{ref:"tableHeader",class:j(t.ns.e("header")),style:mt(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(s,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):_e("v-if",!0),J("div",{ref:"bodyWrapper",class:j(t.ns.e("body-wrapper"))},[B(c,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex},{default:z(()=>[J("table",{ref:"tableBody",class:j(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:mt({width:t.bodyWidth,tableLayout:t.tableLayout})},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(R(),we(s,{key:0,ref:"tableHeaderRef",class:j(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"])):_e("v-if",!0),B(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"?(R(),we(u,{key:1,class:j(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"])):_e("v-if",!0)],6),t.isEmpty?(R(),G("div",{key:0,ref:"emptyBlock",style:mt(t.emptyBlockStyle),class:j(t.ns.e("empty-block"))},[J("span",{class:j(t.ns.e("empty-text"))},[xe(t.$slots,"empty",{},()=>[qe(je(t.computedEmptyText),1)])],2)],6)):_e("v-if",!0),t.$slots.append?(R(),G("div",{key:1,ref:"appendWrapper",class:j(t.ns.e("append-wrapper"))},[xe(t.$slots,"append")],2)):_e("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex"])],2),t.showSummary&&t.tableLayout==="fixed"?Ht((R(),G("div",{key:1,ref:"footerWrapper",class:j(t.ns.e("footer-wrapper"))},[J("table",{class:j(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:mt(t.tableBodyStyles)},[B(a,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),B(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)),[[zn,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):_e("v-if",!0),t.border||t.isGroup?(R(),G("div",{key:2,class:j(t.ns.e("border-left-patch"))},null,2)):_e("v-if",!0)],6),Ht(J("div",{ref:"resizeProxy",class:j(t.ns.e("column-resize-proxy"))},null,2),[[zn,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var R8e=Ge(A8e,[["render",M8e],["__file","table.vue"]]);const $8e={selection:"table-column--selection",expand:"table__expand-column"},N8e={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:""}},D8e=t=>$8e[t]||"",L8e={selection:{renderHeader({store:t,column:e}){function n(){return t.states.data.value&&t.states.data.value.length===0}return Et(Is,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:n,$index:r}){return Et(Is,{disabled:e.selectable?!e.selectable.call(null,t,r):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const r=t.index;return typeof r=="number"?n=e+r:typeof r=="function"&&(n=r(e)),Et("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({row:t,store:e,expanded:n}){const{ns:r}=e,i=[r.e("expand-icon")];return n&&i.push(r.em("expand-icon","expanded")),Et("div",{class:i,onClick:function(a){a.stopPropagation(),e.toggleRowExpansion(t)}},{default:()=>[Et(gt,null,{default:()=>[Et(ba)]})]})},sortable:!1,resizable:!1}};function I8e({row:t,column:e,$index:n}){var r;const i=e.property,o=i&&b1(t,i).value;return e&&e.formatter?e.formatter(t,e,o,n):((r=o==null?void 0:o.toString)==null?void 0:r.call(o))||""}function B8e({row:t,treeNode:e,store:n},r=!1){const{ns:i}=n;if(!e)return r?[Et("span",{class:i.e("placeholder")})]:null;const o=[],a=function(s){s.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(Et("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),typeof e.expanded=="boolean"&&!e.noLazyChildren){const s=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=ba;e.loading&&(l=Ku),o.push(Et("div",{class:s,onClick:a},{default:()=>[Et(gt,{class:{[i.is("loading")]:e.loading}},{default:()=>[Et(l)]})]}))}else o.push(Et("span",{class:i.e("placeholder")}));return o}function U8(t,e){return t.reduce((n,r)=>(n[r]=r,n),e)}function F8e(t,e){const n=en();return{registerComplexWatchers:()=>{const o=["fixed"],a={realWidth:"width",realMinWidth:"minWidth"},s=U8(o,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Ve(()=>e[u],c=>{let d=c;u==="width"&&l==="realWidth"&&(d=uN(c)),u==="minWidth"&&l==="realMinWidth"&&(d=XU(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"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},s=U8(o,a);Object.keys(s).forEach(l=>{const u=a[l];Dn(e,u)&&Ve(()=>e[u],c=>{n.columnConfig.value[l]=c})})}}}function V8e(t,e,n){const r=en(),i=F(""),o=F(!1),a=F(),s=F(),l=Qe("table");Bo(()=>{a.value=t.align?`is-${t.align}`:null,a.value}),Bo(()=>{s.value=t.headerAlign?`is-${t.headerAlign}`:a.value,s.value});const u=M(()=>{let S=r.vnode.vParent||r.parent;for(;S&&!S.tableId&&!S.columnId;)S=S.vnode.vParent||S.parent;return S}),c=M(()=>{const{store:S}=r.parent;if(!S)return!1;const{treeData:x}=S.states,C=x.value;return C&&Object.keys(C).length>0}),d=F(uN(t.width)),f=F(XU(t.minWidth)),h=S=>(d.value&&(S.width=d.value),f.value&&(S.minWidth=f.value),!d.value&&f.value&&(S.width=void 0),S.minWidth||(S.minWidth=80),S.realWidth=Number(S.width===void 0?S.minWidth:S.width),S),m=S=>{const x=S.type,C=L8e[x]||{};Object.keys(C).forEach(T=>{const P=C[T];T!=="className"&&P!==void 0&&(S[T]=P)});const E=D8e(x);if(E){const T=`${p(l.namespace)}-${E}`;S.className=S.className?`${S.className} ${T}`:T}return S},g=S=>{Array.isArray(S)?S.forEach(C=>x(C)):x(S);function x(C){var E;((E=C==null?void 0:C.type)==null?void 0:E.name)==="ElTableColumn"&&(C.vParent=r)}};return{columnId:i,realAlign:a,isSubColumn:o,realHeaderAlign:s,columnOrTableParent:u,setColumnWidth:h,setColumnForcedProps:m,setColumnRenders:S=>{t.renderHeader||S.type!=="selection"&&(S.renderHeader=C=>(r.columnConfig.value.label,xe(e,"header",C,()=>[S.label]))),e["filter-icon"]&&(S.renderFilterIcon=C=>xe(e,"filter-icon",C));let x=S.renderCell;return S.type==="expand"?(S.renderCell=C=>Et("div",{class:"cell"},[x(C)]),n.value.renderExpanded=C=>e.default?e.default(C):e.default):(x=x||I8e,S.renderCell=C=>{let E=null;if(e.default){const $=e.default(C);E=$.some(W=>W.type!==oa)?$:x(C)}else E=x(C);const{columns:T}=n.value.store.states,P=T.value.findIndex($=>$.type==="default"),A=c.value&&C.cellIndex===P,D=B8e(C,A),N={class:"cell",style:{}};return S.showOverflowTooltip&&(N.class=`${N.class} ${p(l.namespace)}-tooltip`,N.style={width:`${(C.column.realWidth||Number(C.column.width))-1}px`}),g(E),Et("div",N,[D,E])}),S},getPropsData:(...S)=>S.reduce((x,C)=>(Array.isArray(C)&&C.forEach(E=>{x[E]=t[E]}),x),{}),getColumnElIndex:(S,x)=>Array.prototype.indexOf.call(S,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",r.columnConfig.value)}}}var j8e={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},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 z8e=1;var iq=ue({name:"ElTableColumn",components:{ElCheckbox:Is},props:j8e,setup(t,{slots:e}){const n=en(),r=F({}),i=M(()=>{let O=n.parent;for(;O&&!O.tableId;)O=O.parent;return O}),{registerNormalWatchers:o,registerComplexWatchers:a}=F8e(i,t),{columnId:s,isSubColumn:l,realHeaderAlign:u,columnOrTableParent:c,setColumnWidth:d,setColumnForcedProps:f,setColumnRenders:h,getPropsData:m,getColumnElIndex:g,realAlign:y,updateColumnOrder:b}=V8e(t,e,i),w=c.value;s.value=`${w.tableId||w.columnId}_column_${z8e++}`,cx(()=>{l.value=i.value!==w;const O=t.type||"default",S=t.sortable===""?!0:t.sortable,x=ai(t.showOverflowTooltip)?w.props.showOverflowTooltip:t.showOverflowTooltip,C={...N8e[O],id:s.value,type:O,property:t.prop||t.property,align:y,headerAlign:u,showOverflowTooltip:x,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:S,index:t.index,rawColumnKey:n.vnode.key};let D=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);D=W5e(C,D),D=q5e(h,d,f)(D),r.value=D,o(),a()}),Bt(()=>{var O;const S=c.value,x=l.value?S.vnode.el.children:(O=S.refs.hiddenColumns)==null?void 0:O.children,C=()=>g(x||[],n.vnode.el);r.value.getColumnIndex=C,C()>-1&&i.value.store.commit("insertColumn",r.value,l.value?S.columnConfig.value:null,b)}),pr(()=>{const O=r.value.getColumnIndex;(O?O():-1)>-1&&i.value.store.commit("removeColumn",r.value,l.value?w.columnConfig.value:null,b)}),n.columnId=s.value,n.columnConfig=r},render(){var t,e,n;try{const r=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),i=[];if(Array.isArray(r))for(const a of r)((n=a.type)==null?void 0:n.name)==="ElTableColumn"||a.shapeFlag&2?i.push(a):a.type===ct&&Array.isArray(a.children)&&a.children.forEach(s=>{(s==null?void 0:s.patchFlag)!==1024&&!At(s==null?void 0:s.children)&&i.push(s)});return Et("div",i)}catch{return Et("div",[])}}});const Rb=Vt(R8e,{TableColumn:iq}),$b=ti(iq);var x0=(t=>(t.ASC="asc",t.DESC="desc",t))(x0||{}),C0=(t=>(t.CENTER="center",t.RIGHT="right",t))(C0||{}),oq=(t=>(t.LEFT="left",t.RIGHT="right",t))(oq||{});const lP={asc:"desc",desc:"asc"},E0=Symbol("placeholder"),Q8e=(t,e,n)=>{var r;const i={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};n||(i.flexShrink=1);const o={...(r=t.style)!=null?r:{},...i,flexBasis:"auto",width:t.width};return e||(t.maxWidth&&(o.maxWidth=t.maxWidth),t.minWidth&&(o.minWidth=t.minWidth)),o};function H8e(t,e,n){const r=M(()=>p(e).map((y,b)=>{var w,O;return{...y,key:(O=(w=y.key)!=null?w:y.dataKey)!=null?O:b}})),i=M(()=>p(r).filter(y=>!y.hidden)),o=M(()=>p(i).filter(y=>y.fixed==="left"||y.fixed===!0)),a=M(()=>p(i).filter(y=>y.fixed==="right")),s=M(()=>p(i).filter(y=>!y.fixed)),l=M(()=>{const y=[];return p(o).forEach(b=>{y.push({...b,placeholderSign:E0})}),p(s).forEach(b=>{y.push(b)}),p(a).forEach(b=>{y.push({...b,placeholderSign:E0})}),y}),u=M(()=>p(o).length||p(a).length),c=M(()=>p(r).reduce((y,b)=>(y[b.key]=Q8e(b,p(n),t.fixed),y),{})),d=M(()=>p(i).reduce((y,b)=>y+b.width,0)),f=y=>p(r).find(b=>b.key===y),h=y=>p(c)[y],m=(y,b)=>{y.width=b};function g(y){var b;const{key:w}=y.currentTarget.dataset;if(!w)return;const{sortState:O,sortBy:S}=t;let x=x0.ASC;sn(O)?x=lP[O[w]]:x=lP[S.order],(b=t.onColumnSort)==null||b.call(t,{column:f(w),key:w,order:x})}return{columns:r,columnsStyles:c,columnsTotalWidth:d,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,hasFixedColumns:u,mainColumns:l,normalColumns:s,visibleColumns:i,getColumn:f,getColumnStyle:h,updateColumnWidth:m,onColumnSorted:g}}const W8e=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:i})=>{const o=F({scrollLeft:0,scrollTop:0});function a(h){var m,g,y;const{scrollTop:b}=h;(m=e.value)==null||m.scrollTo(h),(g=n.value)==null||g.scrollToTop(b),(y=r.value)==null||y.scrollToTop(b)}function s(h){o.value=h,a(h)}function l(h){o.value.scrollTop=h,a(p(o))}function u(h){var m,g;o.value.scrollLeft=h,(g=(m=e.value)==null?void 0:m.scrollTo)==null||g.call(m,p(o))}function c(h){var m;s(h),(m=t.onScroll)==null||m.call(t,h)}function d({scrollTop:h}){const{scrollTop:m}=p(o);h!==m&&l(h)}function f(h,m="auto"){var g;(g=e.value)==null||g.scrollToRow(h,m)}return Ve(()=>p(o).scrollTop,(h,m)=>{h>m&&i()}),{scrollPos:o,scrollTo:s,scrollToLeft:u,scrollToTop:l,scrollToRow:f,onScroll:c,onVerticalScroll:d}},U8e=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:i,ns:o,isScrolling:a})=>{const s=en(),{emit:l}=s,u=Tr(!1),c=F(t.defaultExpandedRowKeys||[]),d=F(-1),f=Tr(null),h=F({}),m=F({}),g=Tr({}),y=Tr({}),b=Tr({}),w=M(()=>kt(t.estimatedRowHeight));function O(A){var D;(D=t.onRowsRendered)==null||D.call(t,A),A.rowCacheEnd>p(d)&&(d.value=A.rowCacheEnd)}function S({hovered:A,rowKey:D}){if(a.value)return;i.vnode.el.querySelectorAll(`[rowkey="${String(D)}"]`).forEach(W=>{A?W.classList.add(o.is("hovered")):W.classList.remove(o.is("hovered"))})}function x({expanded:A,rowData:D,rowIndex:N,rowKey:$}){var W,L;const I=[...p(c)],U=I.indexOf($);A?U===-1&&I.push($):U>-1&&I.splice(U,1),c.value=I,l("update:expandedRowKeys",I),(W=t.onRowExpand)==null||W.call(t,{expanded:A,rowData:D,rowIndex:N,rowKey:$}),(L=t.onExpandedRowsChange)==null||L.call(t,I)}const C=jo(()=>{var A,D,N,$;u.value=!0,h.value={...p(h),...p(m)},E(p(f),!1),m.value={},f.value=null,(A=e.value)==null||A.forceUpdate(),(D=n.value)==null||D.forceUpdate(),(N=r.value)==null||N.forceUpdate(),($=s.proxy)==null||$.$forceUpdate(),u.value=!1},0);function E(A,D=!1){!p(w)||[e,n,r].forEach(N=>{const $=p(N);$&&$.resetAfterRowIndex(A,D)})}function T(A,D,N){const $=p(f);($===null||$>N)&&(f.value=N),m.value[A]=D}function P({rowKey:A,height:D,rowIndex:N},$){$?$===oq.RIGHT?b.value[A]=D:g.value[A]=D:y.value[A]=D;const W=Math.max(...[g,b,y].map(L=>L.value[A]||0));p(h)[A]!==W&&(T(A,W,N),C())}return{expandedRowKeys:c,lastRenderedRowIndex:d,isDynamic:w,isResetting:u,rowHeights:h,resetAfterIndex:E,onRowExpanded:x,onRowHovered:S,onRowsRendered:O,onRowHeightChange:P}},q8e=(t,{expandedRowKeys:e,lastRenderedRowIndex:n,resetAfterIndex:r})=>{const i=F({}),o=M(()=>{const s={},{data:l,rowKey:u}=t,c=p(e);if(!c||!c.length)return l;const d=[],f=new Set;c.forEach(m=>f.add(m));let h=l.slice();for(h.forEach(m=>s[m[u]]=0);h.length>0;){const m=h.shift();d.push(m),f.has(m[u])&&Array.isArray(m.children)&&m.children.length>0&&(h=[...m.children,...h],m.children.forEach(g=>s[g[u]]=s[m[u]]+1))}return i.value=s,d}),a=M(()=>{const{data:s,expandColumnKey:l}=t;return l?p(o):s});return Ve(a,(s,l)=>{s!==l&&(n.value=-1,r(0,!0))}),{data:a,depthMap:i}},Y8e=(t,e)=>t+e,k1=t=>ut(t)?t.reduce(Y8e,0):t,op=(t,e,n={})=>$t(t)?t(e):t!=null?t:n,jd=t=>(["width","maxWidth","minWidth","height"].forEach(e=>{t[e]=pi(t[e])}),t),aq=t=>Kr(t)?e=>Et(t,e):t,X8e=(t,{columnsTotalWidth:e,data:n,fixedColumnsOnLeft:r,fixedColumnsOnRight:i})=>{const o=M(()=>{const{fixed:O,width:S,vScrollbarSize:x}=t,C=S-x;return O?Math.max(Math.round(p(e)),C):C}),a=M(()=>p(o)+t.vScrollbarSize),s=M(()=>{const{height:O=0,maxHeight:S=0,footerHeight:x,hScrollbarSize:C}=t;if(S>0){const E=p(m),T=p(l),A=p(h)+E+T+C;return Math.min(A,S-x)}return O-x}),l=M(()=>{const{rowHeight:O,estimatedRowHeight:S}=t,x=p(n);return kt(S)?x.length*S:x.length*O}),u=M(()=>{const{maxHeight:O}=t,S=p(s);if(kt(O)&&O>0)return S;const x=p(l)+p(h)+p(m);return Math.min(S,x)}),c=O=>O.width,d=M(()=>k1(p(r).map(c))),f=M(()=>k1(p(i).map(c))),h=M(()=>k1(t.headerHeight)),m=M(()=>{var O;return(((O=t.fixedData)==null?void 0:O.length)||0)*t.rowHeight}),g=M(()=>p(s)-p(h)-p(m)),y=M(()=>{const{style:O={},height:S,width:x}=t;return jd({...O,height:S,width:x})}),b=M(()=>jd({height:t.footerHeight})),w=M(()=>({top:pi(p(h)),bottom:pi(t.footerHeight),width:pi(t.width)}));return{bodyWidth:o,fixedTableHeight:u,mainTableHeight:s,leftTableWidth:d,rightTableWidth:f,headerWidth:a,rowsHeight:l,windowHeight:g,footerHeight:b,emptyStyle:w,rootStyle:y,headerHeight:h}},Z8e=t=>{const e=F(),n=F(0),r=F(0);let i;return Bt(()=>{i=Zr(e,([o])=>{const{width:a,height:s}=o.contentRect,{paddingLeft:l,paddingRight:u,paddingTop:c,paddingBottom:d}=getComputedStyle(o.target),f=Number.parseInt(l)||0,h=Number.parseInt(u)||0,m=Number.parseInt(c)||0,g=Number.parseInt(d)||0;n.value=a-f-h,r.value=s-m-g}).stop}),pr(()=>{i==null||i()}),Ve([n,r],([o,a])=>{var s;(s=t.onResize)==null||s.call(t,{width:o,height:a})}),{sizer:e,width:n,height:r}};function G8e(t){const e=F(),n=F(),r=F(),{columns:i,columnsStyles:o,columnsTotalWidth:a,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,hasFixedColumns:u,mainColumns:c,onColumnSorted:d}=H8e(t,er(t,"columns"),er(t,"fixed")),{scrollTo:f,scrollToLeft:h,scrollToTop:m,scrollToRow:g,onScroll:y,onVerticalScroll:b,scrollPos:w}=W8e(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,onMaybeEndReached:ce}),O=Qe("table-v2"),S=en(),x=Tr(!1),{expandedRowKeys:C,lastRenderedRowIndex:E,isDynamic:T,isResetting:P,rowHeights:A,resetAfterIndex:D,onRowExpanded:N,onRowHeightChange:$,onRowHovered:W,onRowsRendered:L}=U8e(t,{mainTableRef:e,leftTableRef:n,rightTableRef:r,tableInstance:S,ns:O,isScrolling:x}),{data:I,depthMap:U}=q8e(t,{expandedRowKeys:C,lastRenderedRowIndex:E,resetAfterIndex:D}),{bodyWidth:Q,fixedTableHeight:V,mainTableHeight:q,leftTableWidth:K,rightTableWidth:ie,headerWidth:oe,rowsHeight:Se,windowHeight:ke,footerHeight:Y,emptyStyle:re,rootStyle:te,headerHeight:ge}=X8e(t,{columnsTotalWidth:a,data:I,fixedColumnsOnLeft:s,fixedColumnsOnRight:l}),Re=F(),$e=M(()=>{const Te=p(I).length===0;return ut(t.fixedData)?t.fixedData.length===0&&Te:Te});function Z(Te){const{estimatedRowHeight:Ie,rowHeight:ae,rowKey:me}=t;return Ie?p(A)[p(I)[Te][me]]||Ie:ae}function ce(){const{onEndReached:Te}=t;if(!Te)return;const{scrollTop:Ie}=p(w),ae=p(Se),me=p(ke),Ae=ae-(Ie+me)+t.hScrollbarSize;p(E)>=0&&ae===Ie+p(q)-p(ge)&&Te(Ae)}return Ve(()=>t.expandedRowKeys,Te=>C.value=Te,{deep:!0}),{columns:i,containerRef:Re,mainTableRef:e,leftTableRef:n,rightTableRef:r,isDynamic:T,isResetting:P,isScrolling:x,hasFixedColumns:u,columnsStyles:o,columnsTotalWidth:a,data:I,expandedRowKeys:C,depthMap:U,fixedColumnsOnLeft:s,fixedColumnsOnRight:l,mainColumns:c,bodyWidth:Q,emptyStyle:re,rootStyle:te,headerWidth:oe,footerHeight:Y,mainTableHeight:q,fixedTableHeight:V,leftTableWidth:K,rightTableWidth:ie,showEmpty:$e,getRowHeight:Z,onColumnSorted:d,onRowHovered:W,onRowExpanded:N,onRowsRendered:L,onRowHeightChange:$,scrollTo:f,scrollToLeft:h,scrollToTop:m,scrollToRow:g,onScroll:y,onVerticalScroll:b}}const fN=Symbol("tableV2"),sq=String,Nb={type:Oe(Array),required:!0},hN={type:Oe(Array)},lq={...hN,required:!0},K8e=String,q8={type:Oe(Array),default:()=>Jr([])},bh={type:Number,required:!0},uq={type:Oe([String,Number,Symbol]),default:"id"},Y8={type:Oe(Object)},Nh=Ye({class:String,columns:Nb,columnsStyles:{type:Oe(Object),required:!0},depth:Number,expandColumnKey:K8e,estimatedRowHeight:{...zh.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:Oe(Function)},onRowHover:{type:Oe(Function)},onRowHeightChange:{type:Oe(Function)},rowData:{type:Oe(Object),required:!0},rowEventHandlers:{type:Oe(Object)},rowIndex:{type:Number,required:!0},rowKey:uq,style:{type:Oe(Object)}}),DT={type:Number,required:!0},pN=Ye({class:String,columns:Nb,fixedHeaderData:{type:Oe(Array)},headerData:{type:Oe(Array),required:!0},headerHeight:{type:Oe([Number,Array]),default:50},rowWidth:DT,rowHeight:{type:Number,default:50},height:DT,width:DT}),P1=Ye({columns:Nb,data:lq,fixedData:hN,estimatedRowHeight:Nh.estimatedRowHeight,width:bh,height:bh,headerWidth:bh,headerHeight:pN.headerHeight,bodyWidth:bh,rowHeight:bh,cache:AU.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:zh.scrollbarAlwaysOn,scrollbarStartGap:zh.scrollbarStartGap,scrollbarEndGap:zh.scrollbarEndGap,class:sq,style:Y8,containerStyle:Y8,getRowHeight:{type:Oe(Function),required:!0},rowKey:Nh.rowKey,onRowsRendered:{type:Oe(Function)},onScroll:{type:Oe(Function)}}),J8e=Ye({cache:P1.cache,estimatedRowHeight:Nh.estimatedRowHeight,rowKey:uq,headerClass:{type:Oe([String,Function])},headerProps:{type:Oe([Object,Function])},headerCellProps:{type:Oe([Object,Function])},headerHeight:pN.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:Oe([String,Function])},rowProps:{type:Oe([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:Oe([Object,Function])},columns:Nb,data:lq,dataGetter:{type:Oe(Function)},fixedData:hN,expandColumnKey:Nh.expandColumnKey,expandedRowKeys:q8,defaultExpandedRowKeys:q8,class:sq,fixed:Boolean,style:{type:Oe(Object)},width:bh,height:bh,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:zh.hScrollbarSize,vScrollbarSize:zh.vScrollbarSize,scrollbarAlwaysOn:$U.alwaysOn,sortBy:{type:Oe(Object),default:()=>({})},sortState:{type:Oe(Object),default:void 0},onColumnSort:{type:Oe(Function)},onExpandedRowsChange:{type:Oe(Function)},onEndReached:{type:Oe(Function)},onRowExpand:Nh.onRowExpand,onScroll:P1.onScroll,onRowsRendered:P1.onRowsRendered,rowEventHandlers:Nh.rowEventHandlers}),gN=(t,{slots:e})=>{var n;const{cellData:r,style:i}=t,o=((n=r==null?void 0:r.toString)==null?void 0:n.call(r))||"",a=xe(e,"default",t,()=>[o]);return B("div",{class:t.class,title:o,style:i},[a])};gN.displayName="ElTableV2Cell";gN.inheritAttrs=!1;const mN=(t,{slots:e})=>xe(e,"default",t,()=>{var n,r;return[B("div",{class:t.class,title:(n=t.column)==null?void 0:n.title},[(r=t.column)==null?void 0:r.title])]});mN.displayName="ElTableV2HeaderCell";mN.inheritAttrs=!1;const eBe=Ye({class:String,columns:Nb,columnsStyles:{type:Oe(Object),required:!0},headerIndex:Number,style:{type:Oe(Object)}}),tBe=ue({name:"ElTableV2HeaderRow",props:eBe,setup(t,{slots:e}){return()=>{const{columns:n,columnsStyles:r,headerIndex:i,style:o}=t;let a=n.map((s,l)=>e.cell({columns:n,column:s,columnIndex:l,headerIndex:i,style:r[s.key]}));return e.header&&(a=e.header({cells:a.map(s=>ut(s)&&s.length===1?s[0]:s),columns:n,headerIndex:i})),B("div",{class:t.class,style:o,role:"row"},[a])}}}),nBe="ElTableV2Header",rBe=ue({name:nBe,props:pN,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),i=F(),o=M(()=>jd({width:t.width,height:t.height})),a=M(()=>jd({width:t.rowWidth,height:t.height})),s=M(()=>$o(p(t.headerHeight))),l=d=>{const f=p(i);Ot(()=>{f!=null&&f.scroll&&f.scroll({left:d})})},u=()=>{const d=r.e("fixed-header-row"),{columns:f,fixedHeaderData:h,rowHeight:m}=t;return h==null?void 0:h.map((g,y)=>{var b;const w=jd({height:m,width:"100%"});return(b=e.fixed)==null?void 0:b.call(e,{class:d,columns:f,rowData:g,rowIndex:-(y+1),style:w})})},c=()=>{const d=r.e("dynamic-header-row"),{columns:f}=t;return p(s).map((h,m)=>{var g;const y=jd({width:"100%",height:h});return(g=e.dynamic)==null?void 0:g.call(e,{class:d,columns:f,headerIndex:m,style:y})})};return n({scrollToLeft:l}),()=>{if(!(t.height<=0))return B("div",{ref:i,class:t.class,style:p(o),role:"rowgroup"},[B("div",{style:p(a),class:r.e("header")},[c(),u()])])}}}),iBe=t=>{const{isScrolling:e}=ht(fN),n=F(!1),r=F(),i=M(()=>kt(t.estimatedRowHeight)&&t.rowIndex>=0),o=(l=!1)=>{const u=p(r);if(!u)return;const{columns:c,onRowHeightChange:d,rowKey:f,rowIndex:h,style:m}=t,{height:g}=u.getBoundingClientRect();n.value=!0,Ot(()=>{if(l||g!==Number.parseInt(m.height)){const y=c[0],b=(y==null?void 0:y.placeholderSign)===E0;d==null||d({rowKey:f,height:g,rowIndex:h},y&&!b&&y.fixed)}})},a=M(()=>{const{rowData:l,rowIndex:u,rowKey:c,onRowHover:d}=t,f=t.rowEventHandlers||{},h={};return Object.entries(f).forEach(([m,g])=>{$t(g)&&(h[m]=y=>{g({event:y,rowData:l,rowIndex:u,rowKey:c})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:m,hovered:g})=>{const y=h[m];h[m]=b=>{d({event:b,hovered:g,rowData:l,rowIndex:u,rowKey:c}),y==null||y(b)}}),h}),s=l=>{const{onRowExpand:u,rowData:c,rowIndex:d,rowKey:f}=t;u==null||u({expanded:l,rowData:c,rowIndex:d,rowKey:f})};return Bt(()=>{p(i)&&o(!0)}),{isScrolling:e,measurable:i,measured:n,rowRef:r,eventHandlers:a,onExpand:s}},oBe="ElTableV2TableRow",aBe=ue({name:oBe,props:Nh,setup(t,{expose:e,slots:n,attrs:r}){const{eventHandlers:i,isScrolling:o,measurable:a,measured:s,rowRef:l,onExpand:u}=iBe(t);return e({onExpand:u}),()=>{const{columns:c,columnsStyles:d,expandColumnKey:f,depth:h,rowData:m,rowIndex:g,style:y}=t;let b=c.map((w,O)=>{const S=ut(m.children)&&m.children.length>0&&w.key===f;return n.cell({column:w,columns:c,columnIndex:O,depth:h,style:d[w.key],rowData:m,rowIndex:g,isScrolling:p(o),expandIconProps:S?{rowData:m,rowIndex:g,onExpand:u}:void 0})});if(n.row&&(b=n.row({cells:b.map(w=>ut(w)&&w.length===1?w[0]:w),style:y,columns:c,depth:h,rowData:m,rowIndex:g,isScrolling:p(o)})),p(a)){const{height:w,...O}=y||{},S=p(s);return B("div",gn({ref:l,class:t.class,style:S?y:O,role:"row"},r,p(i)),[b])}return B("div",gn(r,{ref:l,class:t.class,style:y,role:"row"},p(i)),[b])}}}),sBe=t=>{const{sortOrder:e}=t;return B(gt,{size:14,class:t.class},{default:()=>[e===x0.ASC?B(LCe,null,null):B(NCe,null,null)]})},lBe=t=>{const{expanded:e,expandable:n,onExpand:r,style:i,size:o}=t,a={onClick:n?()=>r(!e):void 0,class:t.class};return B(gt,gn(a,{size:o,style:i}),{default:()=>[B(ba,null,null)]})},uBe="ElTableV2Grid",cBe=t=>{const e=F(),n=F(),r=M(()=>{const{data:g,rowHeight:y,estimatedRowHeight:b}=t;if(!b)return g.length*y}),i=M(()=>{const{fixedData:g,rowHeight:y}=t;return((g==null?void 0:g.length)||0)*y}),o=M(()=>k1(t.headerHeight)),a=M(()=>{const{height:g}=t;return Math.max(0,g-p(o)-p(i))}),s=M(()=>p(o)+p(i)>0),l=({data:g,rowIndex:y})=>g[y][t.rowKey];function u({rowCacheStart:g,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w}){var O;(O=t.onRowsRendered)==null||O.call(t,{rowCacheStart:g,rowCacheEnd:y,rowVisibleStart:b,rowVisibleEnd:w})}function c(g,y){var b;(b=n.value)==null||b.resetAfterRowIndex(g,y)}function d(g,y){const b=p(e),w=p(n);sn(g)?(b==null||b.scrollToLeft(g.scrollLeft),w==null||w.scrollTo(g)):(b==null||b.scrollToLeft(g),w==null||w.scrollTo({scrollLeft:g,scrollTop:y}))}function f(g){var y;(y=p(n))==null||y.scrollTo({scrollTop:g})}function h(g,y){var b;(b=p(n))==null||b.scrollToItem(g,1,y)}function m(){var g,y;(g=p(n))==null||g.$forceUpdate(),(y=p(e))==null||y.$forceUpdate()}return{bodyRef:n,forceUpdate:m,fixedRowHeight:i,gridHeight:a,hasHeader:s,headerHeight:o,headerRef:e,totalHeight:r,itemKey:l,onItemRendered:u,resetAfterRowIndex:c,scrollTo:d,scrollToTop:f,scrollToRow:h}},vN=ue({name:uBe,props:P1,setup(t,{slots:e,expose:n}){const{ns:r}=ht(fN),{bodyRef:i,fixedRowHeight:o,gridHeight:a,hasHeader:s,headerRef:l,headerHeight:u,totalHeight:c,forceUpdate:d,itemKey:f,onItemRendered:h,resetAfterRowIndex:m,scrollTo:g,scrollToTop:y,scrollToRow:b}=cBe(t);n({forceUpdate:d,totalHeight:c,scrollTo:g,scrollToTop:y,scrollToRow:b,resetAfterRowIndex:m});const w=()=>t.bodyWidth;return()=>{const{cache:O,columns:S,data:x,fixedData:C,useIsScrolling:E,scrollbarAlwaysOn:T,scrollbarEndGap:P,scrollbarStartGap:A,style:D,rowHeight:N,bodyWidth:$,estimatedRowHeight:W,headerWidth:L,height:I,width:U,getRowHeight:Q,onScroll:V}=t,q=kt(W),K=q?u4e:o4e,ie=p(u);return B("div",{role:"table",class:[r.e("table"),t.class],style:D},[B(K,{ref:i,data:x,useIsScrolling:E,itemKey:f,columnCache:0,columnWidth:q?w:$,totalColumn:1,totalRow:x.length,rowCache:O,rowHeight:q?Q:N,width:U,height:p(a),class:r.e("body"),role:"rowgroup",scrollbarStartGap:A,scrollbarEndGap:P,scrollbarAlwaysOn:T,onScroll:V,onItemRendered:h,perfMode:!1},{default:oe=>{var Se;const ke=x[oe.rowIndex];return(Se=e.row)==null?void 0:Se.call(e,{...oe,columns:S,rowData:ke})}}),p(s)&&B(rBe,{ref:l,class:r.e("header-wrapper"),columns:S,headerData:x,headerHeight:t.headerHeight,fixedHeaderData:C,rowWidth:L,rowHeight:N,width:U,height:Math.min(ie+p(o),I)},{dynamic:e.header,fixed:e.row})])}}});function dBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const fBe=(t,{slots:e})=>{const{mainTableRef:n,...r}=t;return B(vN,gn({ref:n},r),dBe(e)?e:{default:()=>[e]})};function hBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const pBe=(t,{slots:e})=>{if(!t.columns.length)return;const{leftTableRef:n,...r}=t;return B(vN,gn({ref:n},r),hBe(e)?e:{default:()=>[e]})};function gBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const mBe=(t,{slots:e})=>{if(!t.columns.length)return;const{rightTableRef:n,...r}=t;return B(vN,gn({ref:n},r),gBe(e)?e:{default:()=>[e]})};function vBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const yBe=(t,{slots:e})=>{const{columns:n,columnsStyles:r,depthMap:i,expandColumnKey:o,expandedRowKeys:a,estimatedRowHeight:s,hasFixedColumns:l,rowData:u,rowIndex:c,style:d,isScrolling:f,rowProps:h,rowClass:m,rowKey:g,rowEventHandlers:y,ns:b,onRowHovered:w,onRowExpanded:O}=t,S=op(m,{columns:n,rowData:u,rowIndex:c},""),x=op(h,{columns:n,rowData:u,rowIndex:c}),C=u[g],E=i[C]||0,T=Boolean(o),P=c<0,A=[b.e("row"),S,{[b.e(`row-depth-${E}`)]:T&&c>=0,[b.is("expanded")]:T&&a.includes(C),[b.is("fixed")]:!E&&P,[b.is("customized")]:Boolean(e.row)}],D=l?w:void 0,N={...x,columns:n,columnsStyles:r,class:A,depth:E,expandColumnKey:o,estimatedRowHeight:P?void 0:s,isScrolling:f,rowIndex:c,rowData:u,rowKey:C,rowEventHandlers:y,style:d};return B(aBe,gn(N,{onRowExpand:O,onMouseenter:L=>{D==null||D({hovered:!0,rowKey:C,event:L,rowData:u,rowIndex:c})},onMouseleave:L=>{D==null||D({hovered:!1,rowKey:C,event:L,rowData:u,rowIndex:c})},rowkey:C}),vBe(e)?e:{default:()=>[e]})},uP=({columns:t,column:e,columnIndex:n,depth:r,expandIconProps:i,isScrolling:o,rowData:a,rowIndex:s,style:l,expandedRowKeys:u,ns:c,cellProps:d,expandColumnKey:f,indentSize:h,iconSize:m,rowKey:g},{slots:y})=>{const b=jd(l);if(e.placeholderSign===E0)return B("div",{class:c.em("row-cell","placeholder"),style:b},null);const{cellRenderer:w,dataKey:O,dataGetter:S}=e,x=$t(S)?S({columns:t,column:e,columnIndex:n,rowData:a,rowIndex:s}):Wr(a,O!=null?O:""),C=op(d,{cellData:x,columns:t,column:e,columnIndex:n,rowIndex:s,rowData:a}),E={class:c.e("cell-text"),columns:t,column:e,columnIndex:n,cellData:x,isScrolling:o,rowData:a,rowIndex:s},T=aq(w),P=T?T(E):xe(y,"default",E,()=>[B(gN,E,null)]),A=[c.e("row-cell"),e.class,e.align===C0.CENTER&&c.is("align-center"),e.align===C0.RIGHT&&c.is("align-right")],D=s>=0&&f&&e.key===f,N=s>=0&&u.includes(a[g]);let $;const W=`margin-inline-start: ${r*h}px;`;return D&&(sn(i)?$=B(lBe,gn(i,{class:[c.e("expand-icon"),c.is("expanded",N)],size:m,expanded:N,style:W,expandable:!0}),null):$=B("div",{style:[W,`width: ${m}px; height: ${m}px;`].join(" ")},null)),B("div",gn({class:A,style:b},C,{role:"cell"}),[$,P])};uP.inheritAttrs=!1;function bBe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const _Be=({columns:t,columnsStyles:e,headerIndex:n,style:r,headerClass:i,headerProps:o,ns:a},{slots:s})=>{const l={columns:t,headerIndex:n},u=[a.e("header-row"),op(i,l,""),{[a.is("customized")]:Boolean(s.header)}],c={...op(o,l),columnsStyles:e,class:u,columns:t,headerIndex:n,style:r};return B(tBe,c,bBe(s)?s:{default:()=>[s]})},X8=(t,{slots:e})=>{const{column:n,ns:r,style:i,onColumnSorted:o}=t,a=jd(i);if(n.placeholderSign===E0)return B("div",{class:r.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:s,headerClass:l,sortable:u}=n,c={...t,class:r.e("header-cell-text")},d=aq(s),f=d?d(c):xe(e,"default",c,()=>[B(mN,c,null)]),{sortBy:h,sortState:m,headerCellProps:g}=t;let y,b;if(m){const S=m[n.key];y=Boolean(lP[S]),b=y?S:x0.ASC}else y=n.key===h.key,b=y?h.order:x0.ASC;const w=[r.e("header-cell"),op(l,t,""),n.align===C0.CENTER&&r.is("align-center"),n.align===C0.RIGHT&&r.is("align-right"),u&&r.is("sortable")],O={...op(g,t),onClick:n.sortable?o:void 0,class:w,style:a,["data-key"]:n.key};return B("div",gn(O,{role:"columnheader"}),[f,u&&B(sBe,{class:[r.e("sort-icon"),y&&r.is("sorting")],sortOrder:b},null)])},cq=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};cq.displayName="ElTableV2Footer";const dq=(t,{slots:e})=>{const n=xe(e,"default",{},()=>[B(pU,null,null)]);return B("div",{class:t.class,style:t.style},[n])};dq.displayName="ElTableV2Empty";const fq=(t,{slots:e})=>{var n;return B("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};fq.displayName="ElTableV2Overlay";function Iv(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Kr(t)}const OBe="ElTableV2",wBe=ue({name:OBe,props:J8e,setup(t,{slots:e,expose:n}){const r=Qe("table-v2"),{columnsStyles:i,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,mainColumns:s,mainTableHeight:l,fixedTableHeight:u,leftTableWidth:c,rightTableWidth:d,data:f,depthMap:h,expandedRowKeys:m,hasFixedColumns:g,mainTableRef:y,leftTableRef:b,rightTableRef:w,isDynamic:O,isResetting:S,isScrolling:x,bodyWidth:C,emptyStyle:E,rootStyle:T,headerWidth:P,footerHeight:A,showEmpty:D,scrollTo:N,scrollToLeft:$,scrollToTop:W,scrollToRow:L,getRowHeight:I,onColumnSorted:U,onRowHeightChange:Q,onRowHovered:V,onRowExpanded:q,onRowsRendered:K,onScroll:ie,onVerticalScroll:oe}=G8e(t);return n({scrollTo:N,scrollToLeft:$,scrollToTop:W,scrollToRow:L}),_n(fN,{ns:r,isResetting:S,isScrolling:x}),()=>{const{cache:Se,cellProps:ke,estimatedRowHeight:Y,expandColumnKey:re,fixedData:te,headerHeight:ge,headerClass:Re,headerProps:$e,headerCellProps:Z,sortBy:ce,sortState:Te,rowHeight:Ie,rowClass:ae,rowEventHandlers:me,rowKey:Ae,rowProps:X,scrollbarAlwaysOn:ee,indentSize:le,iconSize:Ce,useIsScrolling:fe,vScrollbarSize:Ee,width:be}=t,Be=p(f),Xe={cache:Se,class:r.e("main"),columns:p(s),data:Be,fixedData:te,estimatedRowHeight:Y,bodyWidth:p(C)+Ee,headerHeight:ge,headerWidth:p(P),height:p(l),mainTableRef:y,rowKey:Ae,rowHeight:Ie,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:fe,width:be,getRowHeight:I,onRowsRendered:K,onScroll:ie},Ke=p(c),tt=p(u),Dt={cache:Se,class:r.e("left"),columns:p(o),data:Be,estimatedRowHeight:Y,leftTableRef:b,rowHeight:Ie,bodyWidth:Ke,headerWidth:Ke,headerHeight:ge,height:tt,rowKey:Ae,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:fe,width:Ke,getRowHeight:I,onScroll:oe},Me=p(d)+Ee,nt={cache:Se,class:r.e("right"),columns:p(a),data:Be,estimatedRowHeight:Y,rightTableRef:w,rowHeight:Ie,bodyWidth:Me,headerWidth:Me,headerHeight:ge,height:tt,rowKey:Ae,scrollbarAlwaysOn:ee,scrollbarStartGap:2,scrollbarEndGap:Ee,width:Me,style:`--${p(r.namespace)}-table-scrollbar-size: ${Ee}px`,useIsScrolling:fe,getRowHeight:I,onScroll:oe},de=p(i),Pe={ns:r,depthMap:p(h),columnsStyles:de,expandColumnKey:re,expandedRowKeys:p(m),estimatedRowHeight:Y,hasFixedColumns:p(g),rowProps:X,rowClass:ae,rowKey:Ae,rowEventHandlers:me,onRowHovered:V,onRowExpanded:q,onRowHeightChange:Q},Le={cellProps:ke,expandColumnKey:re,indentSize:le,iconSize:Ce,rowKey:Ae,expandedRowKeys:p(m),ns:r},wt={ns:r,headerClass:Re,headerProps:$e,columnsStyles:de},tn={ns:r,sortBy:ce,sortState:Te,headerCellProps:Z,onColumnSorted:U},De={row:ln=>B(yBe,gn(ln,Pe),{row:e.row,cell:nn=>{let bn;return e.cell?B(uP,gn(nn,Le,{style:de[nn.column.key]}),Iv(bn=e.cell(nn))?bn:{default:()=>[bn]}):B(uP,gn(nn,Le,{style:de[nn.column.key]}),null)}}),header:ln=>B(_Be,gn(ln,wt),{header:e.header,cell:nn=>{let bn;return e["header-cell"]?B(X8,gn(nn,tn,{style:de[nn.column.key]}),Iv(bn=e["header-cell"](nn))?bn:{default:()=>[bn]}):B(X8,gn(nn,tn,{style:de[nn.column.key]}),null)}})},xt=[t.class,r.b(),r.e("root"),{[r.is("dynamic")]:p(O)}],qt={class:r.e("footer"),style:p(A)};return B("div",{class:xt,style:p(T)},[B(fBe,Xe,Iv(De)?De:{default:()=>[De]}),B(pBe,Dt,Iv(De)?De:{default:()=>[De]}),B(mBe,nt,Iv(De)?De:{default:()=>[De]}),e.footer&&B(cq,qt,{default:e.footer}),p(D)&&B(dq,{class:r.e("empty"),style:p(E)},{default:e.empty}),e.overlay&&B(fq,{class:r.e("overlay")},{default:e.overlay})])}}}),SBe=Ye({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:Oe(Function)}}),xBe=ue({name:"ElAutoResizer",props:SBe,setup(t,{slots:e}){const n=Qe("auto-resizer"),{height:r,width:i,sizer:o}=Z8e(t),a={width:"100%",height:"100%"};return()=>{var s;return B("div",{ref:o,class:n.b(),style:a},[(s=e.default)==null?void 0:s.call(e,{height:r.value,width:i.value})])}}}),CBe=Vt(wBe),EBe=Vt(xBe),rC=Symbol("tabsRootContextKey"),TBe=Ye({tabs:{type:Oe(Array),default:()=>Jr([])}}),hq="ElTabBar",kBe=ue({name:hq}),PBe=ue({...kBe,props:TBe,setup(t,{expose:e}){const n=t,r=en(),i=ht(rC);i||Hi(hq,"");const o=Qe("tabs"),a=F(),s=F(),l=()=>{let h=0,m=0;const g=["top","bottom"].includes(i.props.tabPosition)?"width":"height",y=g==="width"?"x":"y",b=y==="x"?"left":"top";return n.tabs.every(w=>{var O,S;const x=(S=(O=r.parent)==null?void 0:O.refs)==null?void 0:S[`tab-${w.uid}`];if(!x)return!1;if(!w.active)return!0;h=x[`offset${Du(b)}`],m=x[`client${Du(g)}`];const C=window.getComputedStyle(x);return g==="width"&&(m-=Number.parseFloat(C.paddingLeft)+Number.parseFloat(C.paddingRight),h+=Number.parseFloat(C.paddingLeft)),!1}),{[g]:`${m}px`,transform:`translate${Du(y)}(${h}px)`}},u=()=>s.value=l(),c=[],d=()=>{var h;c.forEach(g=>g.stop()),c.length=0;const m=(h=r.parent)==null?void 0:h.refs;if(!!m){for(const g in m)if(g.startsWith("tab-")){const y=m[g];y&&c.push(Zr(y,u))}}};Ve(()=>n.tabs,async()=>{await Ot(),u(),d()},{immediate:!0});const f=Zr(a,()=>u());return pr(()=>{c.forEach(h=>h.stop()),c.length=0,f.stop()}),e({ref:a,update:u}),(h,m)=>(R(),G("div",{ref_key:"barRef",ref:a,class:j([p(o).e("active-bar"),p(o).is(p(i).props.tabPosition)]),style:mt(s.value)},null,6))}});var ABe=Ge(PBe,[["__file","tab-bar.vue"]]);const MBe=Ye({panes:{type:Oe(Array),default:()=>Jr([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),RBe={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},Z8="ElTabNav",$Be=ue({name:Z8,props:MBe,emits:RBe,setup(t,{expose:e,emit:n}){const r=ht(rC);r||Hi(Z8,"");const i=Qe("tabs"),o=que(),a=oce(),s=F(),l=F(),u=F(),c=F(),d=F(!1),f=F(0),h=F(!1),m=F(!0),g=M(()=>["top","bottom"].includes(r.props.tabPosition)?"width":"height"),y=M(()=>({transform:`translate${g.value==="width"?"X":"Y"}(-${f.value}px)`})),b=()=>{if(!s.value)return;const T=s.value[`offset${Du(g.value)}`],P=f.value;if(!P)return;const A=P>T?P-T:0;f.value=A},w=()=>{if(!s.value||!l.value)return;const T=l.value[`offset${Du(g.value)}`],P=s.value[`offset${Du(g.value)}`],A=f.value;if(T-A<=P)return;const D=T-A>P*2?A+P:T-P;f.value=D},O=async()=>{const T=l.value;if(!d.value||!u.value||!s.value||!T)return;await Ot();const P=u.value.querySelector(".is-active");if(!P)return;const A=s.value,D=["top","bottom"].includes(r.props.tabPosition),N=P.getBoundingClientRect(),$=A.getBoundingClientRect(),W=D?T.offsetWidth-$.width:T.offsetHeight-$.height,L=f.value;let I=L;D?(N.left<$.left&&(I=L-($.left-N.left)),N.right>$.right&&(I=L+N.right-$.right)):(N.top<$.top&&(I=L-($.top-N.top)),N.bottom>$.bottom&&(I=L+(N.bottom-$.bottom))),I=Math.max(I,0),f.value=Math.min(I,W)},S=()=>{var T;if(!l.value||!s.value)return;t.stretch&&((T=c.value)==null||T.update());const P=l.value[`offset${Du(g.value)}`],A=s.value[`offset${Du(g.value)}`],D=f.value;A0&&(f.value=0))},x=T=>{const P=T.code,{up:A,down:D,left:N,right:$}=St;if(![A,D,N,$].includes(P))return;const W=Array.from(T.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),L=W.indexOf(T.target);let I;P===N||P===A?L===0?I=W.length-1:I=L-1:L{m.value&&(h.value=!0)},E=()=>h.value=!1;return Ve(o,T=>{T==="hidden"?m.value=!1:T==="visible"&&setTimeout(()=>m.value=!0,50)}),Ve(a,T=>{T?setTimeout(()=>m.value=!0,50):m.value=!1}),Zr(u,S),Bt(()=>setTimeout(()=>O(),0)),Jc(()=>S()),e({scrollToActiveTab:O,removeFocus:E}),()=>{const T=d.value?[B("span",{class:[i.e("nav-prev"),i.is("disabled",!d.value.prev)],onClick:b},[B(gt,null,{default:()=>[B(mf,null,null)]})]),B("span",{class:[i.e("nav-next"),i.is("disabled",!d.value.next)],onClick:w},[B(gt,null,{default:()=>[B(ba,null,null)]})])]:null,P=t.panes.map((A,D)=>{var N,$,W,L;const I=A.uid,U=A.props.disabled,Q=($=(N=A.props.name)!=null?N:A.index)!=null?$:`${D}`,V=!U&&(A.isClosable||t.editable);A.index=`${D}`;const q=V?B(gt,{class:"is-icon-close",onClick:oe=>n("tabRemove",A,oe)},{default:()=>[B(_a,null,null)]}):null,K=((L=(W=A.slots).label)==null?void 0:L.call(W))||A.props.label,ie=!U&&A.active?0:-1;return B("div",{ref:`tab-${I}`,class:[i.e("item"),i.is(r.props.tabPosition),i.is("active",A.active),i.is("disabled",U),i.is("closable",V),i.is("focus",h.value)],id:`tab-${Q}`,key:`tab-${I}`,"aria-controls":`pane-${Q}`,role:"tab","aria-selected":A.active,tabindex:ie,onFocus:()=>C(),onBlur:()=>E(),onClick:oe=>{E(),n("tabClick",A,Q,oe)},onKeydown:oe=>{V&&(oe.code===St.delete||oe.code===St.backspace)&&n("tabRemove",A,oe)}},[K,q])});return B("div",{ref:u,class:[i.e("nav-wrap"),i.is("scrollable",!!d.value),i.is(r.props.tabPosition)]},[T,B("div",{class:i.e("nav-scroll"),ref:s},[B("div",{class:[i.e("nav"),i.is(r.props.tabPosition),i.is("stretch",t.stretch&&["top","bottom"].includes(r.props.tabPosition))],ref:l,style:y.value,role:"tablist",onKeydown:x},[t.type?null:B(ABe,{ref:c,tabs:[...t.panes]},null),P])])])}}}),NBe=Ye({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Oe(Function),default:()=>!0},stretch:Boolean}),LT=t=>At(t)||kt(t),DBe={[Zt]:t=>LT(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>LT(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>LT(t),tabAdd:()=>!0},LBe=ue({name:"ElTabs",props:NBe,emits:DBe,setup(t,{emit:e,slots:n,expose:r}){var i;const o=Qe("tabs"),a=M(()=>["left","right"].includes(t.tabPosition)),{children:s,addChild:l,removeChild:u}=N$(en(),"ElTabPane"),c=F(),d=F((i=t.modelValue)!=null?i:"0"),f=async(b,w=!1)=>{var O,S,x;if(!(d.value===b||ai(b)))try{await((O=t.beforeLeave)==null?void 0:O.call(t,b,d.value))!==!1&&(d.value=b,w&&(e(Zt,b),e("tabChange",b)),(x=(S=c.value)==null?void 0:S.removeFocus)==null||x.call(S))}catch{}},h=(b,w,O)=>{b.props.disabled||(f(w,!0),e("tabClick",b,O))},m=(b,w)=>{b.props.disabled||ai(b.props.name)||(w.stopPropagation(),e("edit",b.props.name,"remove"),e("tabRemove",b.props.name))},g=()=>{e("edit",void 0,"add"),e("tabAdd")};Ve(()=>t.modelValue,b=>f(b)),Ve(d,async()=>{var b;await Ot(),(b=c.value)==null||b.scrollToActiveTab()}),_n(rC,{props:t,currentName:d,registerPane:b=>{s.value.push(b)},sortPane:l,unregisterPane:u}),r({currentName:d});const y=({render:b})=>b();return()=>{const b=n["add-icon"],w=t.editable||t.addable?B("div",{class:[o.e("new-tab"),a.value&&o.e("new-tab-vertical")],tabindex:"0",onClick:g,onKeydown:x=>{x.code===St.enter&&g()}},[b?xe(n,"add-icon"):B(gt,{class:o.is("icon-plus")},{default:()=>[B(pw,null,null)]})]):null,O=B("div",{class:[o.e("header"),a.value&&o.e("header-vertical"),o.is(t.tabPosition)]},[B(y,{render:()=>{const x=s.value.some(C=>C.slots.label);return B($Be,{ref:c,currentName:d.value,editable:t.editable,type:t.type,panes:s.value,stretch:t.stretch,onTabClick:h,onTabRemove:m},{$stable:!x})}},null),w]),S=B("div",{class:o.e("content")},[xe(n,"default")]);return B("div",{class:[o.b(),o.m(t.tabPosition),{[o.m("card")]:t.type==="card",[o.m("border-card")]:t.type==="border-card"}]},[S,O])}}}),IBe=Ye({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),pq="ElTabPane",BBe=ue({name:pq}),FBe=ue({...BBe,props:IBe,setup(t){const e=t,n=en(),r=Ji(),i=ht(rC);i||Hi(pq,"usage: ");const o=Qe("tab-pane"),a=F(),s=M(()=>e.closable||i.props.closable),l=n4(()=>{var h;return i.currentName.value===((h=e.name)!=null?h:a.value)}),u=F(l.value),c=M(()=>{var h;return(h=e.name)!=null?h:a.value}),d=n4(()=>!e.lazy||u.value||l.value);Ve(l,h=>{h&&(u.value=!0)});const f=Sn({uid:n.uid,slots:r,props:e,paneName:c,active:l,index:a,isClosable:s});return i.registerPane(f),Bt(()=>{i.sortPane(f)}),ed(()=>{i.unregisterPane(f.uid)}),(h,m)=>p(d)?Ht((R(),G("div",{key:0,id:`pane-${p(c)}`,class:j(p(o).b()),role:"tabpanel","aria-hidden":!p(l),"aria-labelledby":`tab-${p(c)}`},[xe(h.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[zn,p(l)]]):_e("v-if",!0)}});var gq=Ge(FBe,[["__file","tab-pane.vue"]]);const wp=Vt(LBe,{TabPane:gq}),Sp=ti(gq),VBe=Ye({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:cc,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),jBe=ue({name:"ElText"}),zBe=ue({...jBe,props:VBe,setup(t){const e=t,n=Ni(),r=Qe("text"),i=M(()=>[r.b(),r.m(e.type),r.m(n.value),r.is("truncated",e.truncated),r.is("line-clamp",!ai(e.lineClamp))]);return(o,a)=>(R(),we(un(o.tag),{class:j(p(i)),style:mt({"-webkit-line-clamp":o.lineClamp})},{default:z(()=>[xe(o.$slots,"default")]),_:3},8,["class","style"]))}});var QBe=Ge(zBe,[["__file","text.vue"]]);const iC=Vt(QBe),HBe=Ye({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:Oe(String),default:"light"},clearable:{type:Boolean,default:!0},size:Wi,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:Oe([String,Object]),default:()=>FQ},clearIcon:{type:Oe([String,Object]),default:()=>Bf},...Wm}),Ic=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const r=Number.parseInt(e[1],10),i=t.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:r}}return null},IT=(t,e)=>{const n=Ic(t);if(!n)return-1;const r=Ic(e);if(!r)return-1;const i=n.minutes+n.hours*60,o=r.minutes+r.hours*60;return i===o?0:i>o?1:-1},G8=t=>`${t}`.padStart(2,"0"),sg=t=>`${G8(t.hours)}:${G8(t.minutes)}`,WBe=(t,e)=>{const n=Ic(t);if(!n)return"";const r=Ic(e);if(!r)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=r.minutes,i.hours+=r.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,sg(i)},UBe=ue({name:"ElTimeSelect"}),qBe=ue({...UBe,props:HBe,emits:["change","blur","focus","clear","update:modelValue"],setup(t,{expose:e}){const n=t;It.extend(z$);const{Option:r}=Ol,i=Qe("input"),o=F(),a=la(),{lang:s}=kn(),l=M(()=>n.modelValue),u=M(()=>{const b=Ic(n.start);return b?sg(b):null}),c=M(()=>{const b=Ic(n.end);return b?sg(b):null}),d=M(()=>{const b=Ic(n.step);return b?sg(b):null}),f=M(()=>{const b=Ic(n.minTime||"");return b?sg(b):null}),h=M(()=>{const b=Ic(n.maxTime||"");return b?sg(b):null}),m=M(()=>{const b=[];if(n.start&&n.end&&n.step){let w=u.value,O;for(;w&&c.value&&IT(w,c.value)<=0;)O=It(w,"HH:mm").locale(s.value).format(n.format),b.push({value:O,disabled:IT(w,f.value||"-1:-1")<=0||IT(w,h.value||"100:100")>=0}),w=WBe(w,d.value)}return b});return e({blur:()=>{var b,w;(w=(b=o.value)==null?void 0:b.blur)==null||w.call(b)},focus:()=>{var b,w;(w=(b=o.value)==null?void 0:b.focus)==null||w.call(b)}}),(b,w)=>(R(),we(p(Ol),{ref_key:"select",ref:o,"model-value":p(l),disabled:p(a),clearable:b.clearable,"clear-icon":b.clearIcon,size:b.size,effect:b.effect,placeholder:b.placeholder,"default-first-option":"",filterable:b.editable,"empty-values":b.emptyValues,"value-on-clear":b.valueOnClear,"onUpdate:modelValue":O=>b.$emit("update:modelValue",O),onChange:O=>b.$emit("change",O),onBlur:O=>b.$emit("blur",O),onFocus:O=>b.$emit("focus",O),onClear:()=>b.$emit("clear")},{prefix:z(()=>[b.prefixIcon?(R(),we(p(gt),{key:0,class:j(p(i).e("prefix-icon"))},{default:z(()=>[(R(),we(un(b.prefixIcon)))]),_:1},8,["class"])):_e("v-if",!0)]),default:z(()=>[(R(!0),G(ct,null,Wt(p(m),O=>(R(),we(p(r),{key:O.value,label:O.value,value:O.value,disabled:O.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var YBe=Ge(qBe,[["__file","time-select.vue"]]);const XBe=Vt(YBe),ZBe=ue({name:"ElTimeline",setup(t,{slots:e}){const n=Qe("timeline");return _n("timeline",e),()=>Et("ul",{class:[n.b()]},[xe(e,"default")])}}),GBe=Ye({timestamp:{type:String,default:""},hideTimestamp:Boolean,center:Boolean,placement:{type:String,values:["top","bottom"],default:"bottom"},type:{type:String,values:["primary","success","warning","danger","info"],default:""},color:{type:String,default:""},size:{type:String,values:["normal","large"],default:"normal"},icon:{type:fr},hollow:Boolean}),KBe=ue({name:"ElTimelineItem"}),JBe=ue({...KBe,props:GBe,setup(t){const e=t,n=Qe("timeline-item"),r=M(()=>[n.e("node"),n.em("node",e.size||""),n.em("node",e.type||""),n.is("hollow",e.hollow)]);return(i,o)=>(R(),G("li",{class:j([p(n).b(),{[p(n).e("center")]:i.center}])},[J("div",{class:j(p(n).e("tail"))},null,2),i.$slots.dot?_e("v-if",!0):(R(),G("div",{key:0,class:j(p(r)),style:mt({backgroundColor:i.color})},[i.icon?(R(),we(p(gt),{key:0,class:j(p(n).e("icon"))},{default:z(()=>[(R(),we(un(i.icon)))]),_:1},8,["class"])):_e("v-if",!0)],6)),i.$slots.dot?(R(),G("div",{key:1,class:j(p(n).e("dot"))},[xe(i.$slots,"dot")],2)):_e("v-if",!0),J("div",{class:j(p(n).e("wrapper"))},[!i.hideTimestamp&&i.placement==="top"?(R(),G("div",{key:0,class:j([p(n).e("timestamp"),p(n).is("top")])},je(i.timestamp),3)):_e("v-if",!0),J("div",{class:j(p(n).e("content"))},[xe(i.$slots,"default")],2),!i.hideTimestamp&&i.placement==="bottom"?(R(),G("div",{key:1,class:j([p(n).e("timestamp"),p(n).is("bottom")])},je(i.timestamp),3)):_e("v-if",!0)],2)],2))}});var mq=Ge(JBe,[["__file","timeline-item.vue"]]);const e6e=Vt(ZBe,{TimelineItem:mq}),t6e=ti(mq),vq=Ye({nowrap:Boolean});var yq=(t=>(t.top="top",t.bottom="bottom",t.left="left",t.right="right",t))(yq||{});const n6e=Object.values(yq),yN=Ye({width:{type:Number,default:10},height:{type:Number,default:10},style:{type:Oe(Object),default:null}}),r6e=Ye({side:{type:Oe(String),values:n6e,required:!0}}),i6e=["absolute","fixed"],o6e=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],bN=Ye({arrowPadding:{type:Oe(Number),default:5},effect:{type:Oe(String),default:"light"},contentClass:String,placement:{type:Oe(String),values:o6e,default:"bottom"},reference:{type:Oe(Object),default:null},offset:{type:Number,default:8},strategy:{type:Oe(String),values:i6e,default:"absolute"},showArrow:Boolean,...wo(["ariaLabel"])}),_N=Ye({delayDuration:{type:Number,default:300},defaultOpen:Boolean,open:{type:Boolean,default:void 0},onOpenChange:{type:Oe(Function)},"onUpdate:open":{type:Oe(Function)}}),Up={type:Oe(Function)},ON=Ye({onBlur:Up,onClick:Up,onFocus:Up,onMouseDown:Up,onMouseEnter:Up,onMouseLeave:Up}),a6e=Ye({..._N,...yN,...ON,...bN,alwaysOn:Boolean,fullTransition:Boolean,transitionProps:{type:Oe(Object),default:null},teleported:Boolean,to:{type:Oe(String),default:"body"}}),oC=Symbol("tooltipV2"),bq=Symbol("tooltipV2Content"),BT="tooltip_v2.open",s6e=ue({name:"ElTooltipV2Root"}),l6e=ue({...s6e,props:_N,setup(t,{expose:e}){const n=t,r=F(n.defaultOpen),i=F(null),o=M({get:()=>ep(n.open)?r.value:n.open,set:y=>{var b;r.value=y,(b=n["onUpdate:open"])==null||b.call(n,y)}}),a=M(()=>kt(n.delayDuration)&&n.delayDuration>0),{start:s,stop:l}=Xh(()=>{o.value=!0},M(()=>n.delayDuration),{immediate:!1}),u=Qe("tooltip-v2"),c=bo(),d=()=>{l(),o.value=!0},f=()=>{p(a)?s():d()},h=d,m=()=>{l(),o.value=!1};return Ve(o,y=>{var b;y&&(document.dispatchEvent(new CustomEvent(BT)),h()),(b=n.onOpenChange)==null||b.call(n,y)}),Bt(()=>{document.addEventListener(BT,m)}),pr(()=>{l(),document.removeEventListener(BT,m)}),_n(oC,{contentId:c,triggerRef:i,ns:u,onClose:m,onDelayOpen:f,onOpen:h}),e({onOpen:h,onClose:m}),(y,b)=>xe(y.$slots,"default",{open:p(o)})}});var u6e=Ge(l6e,[["__file","root.vue"]]);const c6e=ue({name:"ElTooltipV2Arrow"}),d6e=ue({...c6e,props:{...yN,...r6e},setup(t){const e=t,{ns:n}=ht(oC),{arrowRef:r}=ht(bq),i=M(()=>{const{style:o,width:a,height:s}=e,l=n.namespace.value;return{[`--${l}-tooltip-v2-arrow-width`]:`${a}px`,[`--${l}-tooltip-v2-arrow-height`]:`${s}px`,[`--${l}-tooltip-v2-arrow-border-width`]:`${a/2}px`,[`--${l}-tooltip-v2-arrow-cover-width`]:a/2-1,...o||{}}});return(o,a)=>(R(),G("span",{ref_key:"arrowRef",ref:r,style:mt(p(i)),class:j(p(n).e("arrow"))},null,6))}});var K8=Ge(d6e,[["__file","arrow.vue"]]);const f6e=Ye({style:{type:Oe([String,Object,Array]),default:()=>({})}}),h6e=ue({name:"ElVisuallyHidden"}),p6e=ue({...h6e,props:f6e,setup(t){const e=t,n=M(()=>[e.style,{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}]);return(r,i)=>(R(),G("span",gn(r.$attrs,{style:p(n)}),[xe(r.$slots,"default")],16))}});var g6e=Ge(p6e,[["__file","visual-hidden.vue"]]);const m6e=ue({name:"ElTooltipV2Content"}),v6e=ue({...m6e,props:{...bN,...vq},setup(t){const e=t,{triggerRef:n,contentId:r}=ht(oC),i=F(e.placement),o=F(e.strategy),a=F(null),{referenceRef:s,contentRef:l,middlewareData:u,x:c,y:d,update:f}=l2e({placement:i,strategy:o,middleware:M(()=>{const O=[bH(e.offset)];return e.showArrow&&O.push(u2e({arrowRef:a})),O})}),h=Qm().nextZIndex(),m=Qe("tooltip-v2"),g=M(()=>i.value.split("-")[0]),y=M(()=>({position:p(o),top:`${p(d)||0}px`,left:`${p(c)||0}px`,zIndex:h})),b=M(()=>{if(!e.showArrow)return{};const{arrow:O}=p(u);return{[`--${m.namespace.value}-tooltip-v2-arrow-x`]:`${O==null?void 0:O.x}px`||"",[`--${m.namespace.value}-tooltip-v2-arrow-y`]:`${O==null?void 0:O.y}px`||""}}),w=M(()=>[m.e("content"),m.is("dark",e.effect==="dark"),m.is(p(o)),e.contentClass]);return Ve(a,()=>f()),Ve(()=>e.placement,O=>i.value=O),Bt(()=>{Ve(()=>e.reference||n.value,O=>{s.value=O||void 0},{immediate:!0})}),_n(bq,{arrowRef:a}),(O,S)=>(R(),G("div",{ref_key:"contentRef",ref:l,style:mt(p(y)),"data-tooltip-v2-root":""},[O.nowrap?_e("v-if",!0):(R(),G("div",{key:0,"data-side":p(g),class:j(p(w))},[xe(O.$slots,"default",{contentStyle:p(y),contentClass:p(w)}),B(p(g6e),{id:p(r),role:"tooltip"},{default:z(()=>[O.ariaLabel?(R(),G(ct,{key:0},[qe(je(O.ariaLabel),1)],64)):xe(O.$slots,"default",{key:1})]),_:3},8,["id"]),xe(O.$slots,"arrow",{style:mt(p(b)),side:p(g)})],10,["data-side"]))],4))}});var J8=Ge(v6e,[["__file","content.vue"]]);const y6e=Ye({setRef:{type:Oe(Function),required:!0},onlyChild:Boolean});var b6e=ue({props:y6e,setup(t,{slots:e}){const n=F(),r=Bx(n,i=>{i?t.setRef(i.nextElementSibling):t.setRef(null)});return()=>{var i;const[o]=((i=e.default)==null?void 0:i.call(e))||[],a=t.onlyChild?tEe(o.children):o.children;return B(ct,{ref:r},[a])}}});const _6e=ue({name:"ElTooltipV2Trigger"}),O6e=ue({..._6e,props:{...vq,...ON},setup(t){const e=t,{onClose:n,onOpen:r,onDelayOpen:i,triggerRef:o,contentId:a}=ht(oC);let s=!1;const l=w=>{o.value=w},u=()=>{s=!1},c=fi(e.onMouseEnter,i),d=fi(e.onMouseLeave,n),f=fi(e.onMouseDown,()=>{n(),s=!0,document.addEventListener("mouseup",u,{once:!0})}),h=fi(e.onFocus,()=>{s||r()}),m=fi(e.onBlur,n),g=fi(e.onClick,w=>{w.detail===0&&n()}),y={blur:m,click:g,focus:h,mousedown:f,mouseenter:c,mouseleave:d},b=(w,O,S)=>{w&&Object.entries(O).forEach(([x,C])=>{w[S](x,C)})};return Ve(o,(w,O)=>{b(w,y,"addEventListener"),b(O,y,"removeEventListener"),w&&w.setAttribute("aria-describedby",a.value)}),pr(()=>{b(o.value,y,"removeEventListener"),document.removeEventListener("mouseup",u)}),(w,O)=>w.nowrap?(R(),we(p(b6e),{key:0,"set-ref":l,"only-child":""},{default:z(()=>[xe(w.$slots,"default")]),_:3})):(R(),G("button",gn({key:1,ref_key:"triggerRef",ref:o},w.$attrs),[xe(w.$slots,"default")],16))}});var w6e=Ge(O6e,[["__file","trigger.vue"]]);const S6e=ue({name:"ElTooltipV2"}),x6e=ue({...S6e,props:a6e,setup(t){const n=Ri(t),r=Sn(vo(n,Object.keys(yN))),i=Sn(vo(n,Object.keys(bN))),o=Sn(vo(n,Object.keys(_N))),a=Sn(vo(n,Object.keys(ON)));return(s,l)=>(R(),we(u6e,Xl(lf(o)),{default:z(({open:u})=>[B(w6e,gn(a,{nowrap:""}),{default:z(()=>[xe(s.$slots,"trigger")]),_:3},16),B(p(Um),{to:s.to,disabled:!s.teleported},{default:z(()=>[s.fullTransition?(R(),we(Qi,Xl(gn({key:0},s.transitionProps)),{default:z(()=>[s.alwaysOn||u?(R(),we(J8,Xl(gn({key:0},i)),{arrow:z(({style:c,side:d})=>[s.showArrow?(R(),we(K8,gn({key:0},r,{style:c,side:d}),null,16,["style","side"])):_e("v-if",!0)]),default:z(()=>[xe(s.$slots,"default")]),_:3},16)):_e("v-if",!0)]),_:2},1040)):(R(),G(ct,{key:1},[s.alwaysOn||u?(R(),we(J8,Xl(gn({key:0},i)),{arrow:z(({style:c,side:d})=>[s.showArrow?(R(),we(K8,gn({key:0},r,{style:c,side:d}),null,16,["style","side"])):_e("v-if",!0)]),default:z(()=>[xe(s.$slots,"default")]),_:3},16)):_e("v-if",!0)],64))]),_:2},1032,["to","disabled"])]),_:3},16))}});var C6e=Ge(x6e,[["__file","tooltip.vue"]]);const E6e=Vt(C6e),_q="left-check-change",Oq="right-check-change",lg=Ye({data:{type:Oe(Array),default:()=>[]},titles:{type:Oe(Array),default:()=>[]},buttonTexts:{type:Oe(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:Oe(Function)},leftDefaultChecked:{type:Oe(Array),default:()=>[]},rightDefaultChecked:{type:Oe(Array),default:()=>[]},renderContent:{type:Oe(Function)},modelValue:{type:Oe(Array),default:()=>[]},format:{type:Oe(Object),default:()=>({})},filterable:Boolean,props:{type:Oe(Object),default:()=>Jr({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),cP=(t,e)=>[t,e].every(ut)||ut(t)&&Dr(e),T6e={[Lr]:(t,e,n)=>[t,n].every(ut)&&["left","right"].includes(e),[Zt]:t=>ut(t),[_q]:cP,[Oq]:cP},dP="checked-change",k6e=Ye({data:lg.data,optionRender:{type:Oe(Function)},placeholder:String,title:String,filterable:Boolean,format:lg.format,filterMethod:lg.filterMethod,defaultChecked:lg.leftDefaultChecked,props:lg.props}),P6e={[dP]:cP},Db=t=>{const e={label:"label",key:"key",disabled:"disabled"};return M(()=>({...e,...t.props}))},A6e=(t,e,n)=>{const r=Db(t),i=M(()=>t.data.filter(c=>$t(t.filterMethod)?t.filterMethod(e.query,c):String(c[r.value.label]||c[r.value.key]).toLowerCase().includes(e.query.toLowerCase()))),o=M(()=>i.value.filter(c=>!c[r.value.disabled])),a=M(()=>{const c=e.checked.length,d=t.data.length,{noChecked:f,hasChecked:h}=t.format;return f&&h?c>0?h.replace(/\${checked}/g,c.toString()).replace(/\${total}/g,d.toString()):f.replace(/\${total}/g,d.toString()):`${c}/${d}`}),s=M(()=>{const c=e.checked.length;return c>0&&c{const c=o.value.map(d=>d[r.value.key]);e.allChecked=c.length>0&&c.every(d=>e.checked.includes(d))},u=c=>{e.checked=c?o.value.map(d=>d[r.value.key]):[]};return Ve(()=>e.checked,(c,d)=>{if(l(),e.checkChangeByUser){const f=c.concat(d).filter(h=>!c.includes(h)||!d.includes(h));n(dP,c,f)}else n(dP,c),e.checkChangeByUser=!0}),Ve(o,()=>{l()}),Ve(()=>t.data,()=>{const c=[],d=i.value.map(f=>f[r.value.key]);e.checked.forEach(f=>{d.includes(f)&&c.push(f)}),e.checkChangeByUser=!1,e.checked=c}),Ve(()=>t.defaultChecked,(c,d)=>{if(d&&c.length===d.length&&c.every(m=>d.includes(m)))return;const f=[],h=o.value.map(m=>m[r.value.key]);c.forEach(m=>{h.includes(m)&&f.push(m)}),e.checkChangeByUser=!1,e.checked=f},{immediate:!0}),{filteredData:i,checkableData:o,checkedSummary:a,isIndeterminate:s,updateAllChecked:l,handleAllCheckedChange:u}},M6e=(t,e)=>({onSourceCheckedChange:(i,o)=>{t.leftChecked=i,o&&e(_q,i,o)},onTargetCheckedChange:(i,o)=>{t.rightChecked=i,o&&e(Oq,i,o)}}),R6e=t=>{const e=Db(t),n=M(()=>t.data.reduce((o,a)=>(o[a[e.value.key]]=a)&&o,{})),r=M(()=>t.data.filter(o=>!t.modelValue.includes(o[e.value.key]))),i=M(()=>t.targetOrder==="original"?t.data.filter(o=>t.modelValue.includes(o[e.value.key])):t.modelValue.reduce((o,a)=>{const s=n.value[a];return s&&o.push(s),o},[]));return{sourceData:r,targetData:i}},$6e=(t,e,n)=>{const r=Db(t),i=(s,l,u)=>{n(Zt,s),n(Lr,s,l,u)};return{addToLeft:()=>{const s=t.modelValue.slice();e.rightChecked.forEach(l=>{const u=s.indexOf(l);u>-1&&s.splice(u,1)}),i(s,"left",e.rightChecked)},addToRight:()=>{let s=t.modelValue.slice();const l=t.data.filter(u=>{const c=u[r.value.key];return e.leftChecked.includes(c)&&!t.modelValue.includes(c)}).map(u=>u[r.value.key]);s=t.targetOrder==="unshift"?l.concat(s):s.concat(l),t.targetOrder==="original"&&(s=t.data.filter(u=>s.includes(u[r.value.key])).map(u=>u[r.value.key])),i(s,"right",e.leftChecked)}}},N6e=ue({name:"ElTransferPanel"}),D6e=ue({...N6e,props:k6e,emits:P6e,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),o=({option:O})=>O,{t:a}=kn(),s=Qe("transfer"),l=Sn({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=Db(r),{filteredData:c,checkedSummary:d,isIndeterminate:f,handleAllCheckedChange:h}=A6e(r,l,n),m=M(()=>!xs(l.query)&&xs(c.value)),g=M(()=>!xs(i.default()[0].children)),{checked:y,allChecked:b,query:w}=Ri(l);return e({query:w}),(O,S)=>(R(),G("div",{class:j(p(s).b("panel"))},[J("p",{class:j(p(s).be("panel","header"))},[B(p(Is),{modelValue:p(b),"onUpdate:modelValue":x=>kr(b)?b.value=x:null,indeterminate:p(f),"validate-event":!1,onChange:p(h)},{default:z(()=>[qe(je(O.title)+" ",1),J("span",null,je(p(d)),1)]),_:1},8,["modelValue","onUpdate:modelValue","indeterminate","onChange"])],2),J("div",{class:j([p(s).be("panel","body"),p(s).is("with-footer",p(g))])},[O.filterable?(R(),we(p(hi),{key:0,modelValue:p(w),"onUpdate:modelValue":x=>kr(w)?w.value=x:null,class:j(p(s).be("panel","filter")),size:"default",placeholder:O.placeholder,"prefix-icon":p(c$),clearable:"","validate-event":!1},null,8,["modelValue","onUpdate:modelValue","class","placeholder","prefix-icon"])):_e("v-if",!0),Ht(B(p(xW),{modelValue:p(y),"onUpdate:modelValue":x=>kr(y)?y.value=x:null,"validate-event":!1,class:j([p(s).is("filterable",O.filterable),p(s).be("panel","list")])},{default:z(()=>[(R(!0),G(ct,null,Wt(p(c),x=>(R(),we(p(Is),{key:x[p(u).key],class:j(p(s).be("panel","item")),value:x[p(u).key],disabled:x[p(u).disabled],"validate-event":!1},{default:z(()=>{var C;return[B(o,{option:(C=O.optionRender)==null?void 0:C.call(O,x)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"]),[[zn,!p(m)&&!p(xs)(O.data)]]),Ht(J("p",{class:j(p(s).be("panel","empty"))},je(p(m)?p(a)("el.transfer.noMatch"):p(a)("el.transfer.noData")),3),[[zn,p(m)||p(xs)(O.data)]])],2),p(g)?(R(),G("p",{key:0,class:j(p(s).be("panel","footer"))},[xe(O.$slots,"default")],2)):_e("v-if",!0)],2))}});var eB=Ge(D6e,[["__file","transfer-panel.vue"]]);const L6e=ue({name:"ElTransfer"}),I6e=ue({...L6e,props:lg,emits:T6e,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),{t:o}=kn(),a=Qe("transfer"),{formItem:s}=ua(),l=Sn({leftChecked:[],rightChecked:[]}),u=Db(r),{sourceData:c,targetData:d}=R6e(r),{onSourceCheckedChange:f,onTargetCheckedChange:h}=M6e(l,n),{addToLeft:m,addToRight:g}=$6e(r,l,n),y=F(),b=F(),w=T=>{switch(T){case"left":y.value.query="";break;case"right":b.value.query="";break}},O=M(()=>r.buttonTexts.length===2),S=M(()=>r.titles[0]||o("el.transfer.titles.0")),x=M(()=>r.titles[1]||o("el.transfer.titles.1")),C=M(()=>r.filterPlaceholder||o("el.transfer.filterPlaceholder"));Ve(()=>r.modelValue,()=>{var T;r.validateEvent&&((T=s==null?void 0:s.validate)==null||T.call(s,"change").catch(P=>void 0))});const E=M(()=>T=>{var P;if(r.renderContent)return r.renderContent(Et,T);const A=(((P=i.default)==null?void 0:P.call(i,{option:T}))||[]).filter(D=>D.type!==oa);return A.length?A:Et("span",T[u.value.label]||T[u.value.key])});return e({clearQuery:w,leftPanel:y,rightPanel:b}),(T,P)=>(R(),G("div",{class:j(p(a).b())},[B(eB,{ref_key:"leftPanel",ref:y,data:p(c),"option-render":p(E),placeholder:p(C),title:p(S),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,"default-checked":T.leftDefaultChecked,props:r.props,onCheckedChange:p(f)},{default:z(()=>[xe(T.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),J("div",{class:j(p(a).e("buttons"))},[B(p(lr),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(xs)(l.rightChecked),onClick:p(m)},{default:z(()=>[B(p(gt),null,{default:z(()=>[B(p(mf))]),_:1}),p(ai)(T.buttonTexts[0])?_e("v-if",!0):(R(),G("span",{key:0},je(T.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),B(p(lr),{type:"primary",class:j([p(a).e("button"),p(a).is("with-texts",p(O))]),disabled:p(xs)(l.leftChecked),onClick:p(g)},{default:z(()=>[p(ai)(T.buttonTexts[1])?_e("v-if",!0):(R(),G("span",{key:0},je(T.buttonTexts[1]),1)),B(p(gt),null,{default:z(()=>[B(p(ba))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),B(eB,{ref_key:"rightPanel",ref:b,data:p(d),"option-render":p(E),placeholder:p(C),filterable:T.filterable,format:T.format,"filter-method":T.filterMethod,title:p(x),"default-checked":T.rightDefaultChecked,props:r.props,onCheckedChange:p(h)},{default:z(()=>[xe(T.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var B6e=Ge(I6e,[["__file","transfer.vue"]]);const F6e=Vt(B6e),$g="$treeNodeId",tB=function(t,e){!e||e[$g]||Object.defineProperty(e,$g,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},wN=function(t,e){return t?e[t]:e[$g]},fP=(t,e,n)=>{const r=t.value.currentNode;n();const i=t.value.currentNode;r!==i&&e("current-change",i?i.data:null,i)},hP=t=>{let e=!0,n=!0,r=!0;for(let i=0,o=t.length;i0&&e.lazy&&e.defaultExpandAll&&!this.isLeafByUser&&this.expand(),Array.isArray(this.data)||tB(this,this.data),!this.data)return;const r=e.defaultExpandedKeys,i=e.key;i&&r&&r.includes(this.key)&&this.expand(null,e.autoExpandParent),i&&e.currentNodeKey!==void 0&&this.key===e.currentNodeKey&&(e.currentNode=this,e.currentNode.isCurrent=!0),e.lazy&&e._initDefaultCheckedNode(this),this.updateLeafState(),this.parent&&(this.level===1||this.parent.expanded===!0)&&(this.canFocus=!0)}setData(e){Array.isArray(e)||tB(this,e),this.data=e,this.childNodes=[];let n;this.level===0&&Array.isArray(this.data)?n=this.data:n=fO(this,"children")||[];for(let r=0,i=n.length;r-1)return e.childNodes[n+1]}return null}get previousSibling(){const e=this.parent;if(e){const n=e.childNodes.indexOf(this);if(n>-1)return n>0?e.childNodes[n-1]:null}return null}contains(e,n=!0){return(this.childNodes||[]).some(r=>r===e||n&&r.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,n,r){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof Qh)){if(!r){const i=this.getChildren(!0);i.includes(e.data)||(typeof n=="undefined"||n<0?i.push(e.data):i.splice(n,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=Sn(new Qh(e)),e instanceof Qh&&e.initialize()}e.level=this.level+1,typeof n=="undefined"||n<0?this.childNodes.push(e):this.childNodes.splice(n,0,e),this.updateLeafState()}insertBefore(e,n){let r;n&&(r=this.childNodes.indexOf(n)),this.insertChild(e,r)}insertAfter(e,n){let r;n&&(r=this.childNodes.indexOf(n),r!==-1&&(r+=1)),this.insertChild(e,r)}removeChild(e){const n=this.getChildren()||[],r=n.indexOf(e.data);r>-1&&n.splice(r,1);const i=this.childNodes.indexOf(e);i>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(i,1)),this.updateLeafState()}removeChildByData(e){let n=null;for(let r=0;r{if(n){let i=this.parent;for(;i.level>0;)i.expanded=!0,i=i.parent}this.expanded=!0,e&&e(),this.childNodes.forEach(i=>{i.canFocus=!0})};this.shouldLoadData()?this.loadData(i=>{Array.isArray(i)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||ty(this),r())}):r()}doCreateChildren(e,n={}){e.forEach(r=>{this.insertChild(Object.assign({data:r},n),void 0,!0)})}collapse(){this.expanded=!1,this.childNodes.forEach(e=>{e.canFocus=!1})}shouldLoadData(){return this.store.lazy===!0&&this.store.load&&!this.loaded}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser!="undefined"){this.isLeaf=this.isLeafByUser;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0;return}this.isLeaf=!1}setChecked(e,n,r,i){if(this.indeterminate=e==="half",this.checked=e===!0,this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const{all:a,allWithoutDisable:s}=hP(this.childNodes);!this.isLeaf&&!a&&s&&(this.checked=!1,e=!1);const l=()=>{if(n){const u=this.childNodes;for(let f=0,h=u.length;f{l(),ty(this)},{checked:e!==!1});return}else l()}const o=this.parent;!o||o.level===0||r||ty(o)}getChildren(e=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const r=this.store.props;let i="children";return r&&(i=r.children||"children"),n[i]===void 0&&(n[i]=null),e&&!n[i]&&(n[i]=[]),n[i]}updateChildren(){const e=this.getChildren()||[],n=this.childNodes.map(o=>o.data),r={},i=[];e.forEach((o,a)=>{const s=o[$g];!!s&&n.findIndex(u=>u[$g]===s)>=0?r[s]={index:a,data:o}:i.push({index:a,data:o})}),this.store.lazy||n.forEach(o=>{r[o[$g]]||this.removeChildByData(o)}),i.forEach(({index:o,data:a})=>{this.insertChild({data:a},o)}),this.updateLeafState()}loadData(e,n={}){if(this.store.lazy===!0&&this.store.load&&!this.loaded&&(!this.loading||Object.keys(n).length)){this.loading=!0;const r=o=>{this.childNodes=[],this.doCreateChildren(o,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,o)},i=()=>{this.loading=!1};this.store.load(this,r,i)}else e&&e.call(this)}eachNode(e){const n=[this];for(;n.length;){const r=n.shift();n.unshift(...r.childNodes),e(r)}}reInitChecked(){this.store.checkStrictly||ty(this)}}class j6e{constructor(e){this.currentNode=null,this.currentNodeKey=null;for(const n in e)Dn(e,n)&&(this[n]=e[n]);this.nodesMap={}}initialize(){if(this.root=new Qh({data:this.data,store:this}),this.root.initialize(),this.lazy&&this.load){const e=this.load;e(this.root,n=>{this.root.doCreateChildren(n),this._initDefaultCheckedNodes()})}else this._initDefaultCheckedNodes()}filter(e){const n=this.filterNodeMethod,r=this.lazy,i=function(o){const a=o.root?o.root.childNodes:o.childNodes;if(a.forEach(s=>{s.visible=n.call(s,e,s.data,s),i(s)}),!o.visible&&a.length){let s=!0;s=!a.some(l=>l.visible),o.root?o.root.visible=s===!1:o.visible=s===!1}!e||o.visible&&!o.isLeaf&&(!r||o.loaded)&&o.expand()};i(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes()):this.root.updateChildren()}getNode(e){if(e instanceof Qh)return e;const n=sn(e)?wN(this.key,e):e;return this.nodesMap[n]||null}insertBefore(e,n){const r=this.getNode(n);r.parent.insertBefore({data:e},r)}insertAfter(e,n){const r=this.getNode(n);r.parent.insertAfter({data:e},r)}remove(e){const n=this.getNode(e);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(e,n){const r=ep(n)?this.root:this.getNode(n);r&&r.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],n=this.nodesMap;e.forEach(r=>{const i=n[r];i&&i.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){(this.defaultCheckedKeys||[]).includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const n=this.key;!e||!e.data||(n?e.key!==void 0&&(this.nodesMap[e.key]=e):this.nodesMap[e.id]=e)}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(r=>{this.deregisterNode(r)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,n=!1){const r=[],i=function(o){(o.root?o.root.childNodes:o.childNodes).forEach(s=>{(s.checked||n&&s.indeterminate)&&(!e||e&&s.isLeaf)&&r.push(s.data),i(s)})};return i(this),r}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const e=[],n=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(o=>{o.indeterminate&&e.push(o.data),n(o)})};return n(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],n=this.nodesMap;for(const r in n)Dn(n,r)&&e.push(n[r]);return e}updateChildren(e,n){const r=this.nodesMap[e];if(!r)return;const i=r.childNodes;for(let o=i.length-1;o>=0;o--){const a=i[o];this.remove(a.data)}for(let o=0,a=n.length;ol.level-u.level),o=Object.create(null),a=Object.keys(r);i.forEach(l=>l.setChecked(!1,!1));const s=l=>{l.childNodes.forEach(u=>{var c;o[u.data[e]]=!0,(c=u.childNodes)!=null&&c.length&&s(u)})};for(let l=0,u=i.length;l{y.isLeaf||y.setChecked(!1,!1),h(y)})};h(c)}}}setCheckedNodes(e,n=!1){const r=this.key,i={};e.forEach(o=>{i[(o||{})[r]]=!0}),this._setCheckedKeys(r,n,i)}setCheckedKeys(e,n=!1){this.defaultCheckedKeys=e;const r=this.key,i={};e.forEach(o=>{i[o]=!0}),this._setCheckedKeys(r,n,i)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(n=>{const r=this.getNode(n);r&&r.expand(null,this.autoExpandParent)})}setChecked(e,n,r){const i=this.getNode(e);i&&i.setChecked(!!n,r)}getCurrentNode(){return this.currentNode}setCurrentNode(e){const n=this.currentNode;n&&(n.isCurrent=!1),this.currentNode=e,this.currentNode.isCurrent=!0}setUserCurrentNode(e,n=!0){const r=e[this.key],i=this.nodesMap[r];this.setCurrentNode(i),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0)}setCurrentNodeKey(e,n=!0){if(e==null){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const r=this.getNode(e);r&&(this.setCurrentNode(r),n&&this.currentNode.level>1&&this.currentNode.parent.expand(null,!0))}}const z6e=ue({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=Qe("tree"),n=ht("NodeInstance"),r=ht("RootTree");return()=>{const i=t.node,{data:o,store:a}=i;return t.renderContent?t.renderContent(Et,{_self:n,node:i,data:o,store:a}):xe(r.ctx.slots,"default",{node:i,data:o},()=>[Et("span",{class:e.be("node","label")},[i.label])])}}});var Q6e=Ge(z6e,[["__file","tree-node-content.vue"]]);function wq(t){const e=ht("TreeNodeMap",null),n={treeNodeExpand:r=>{t.node!==r&&t.node.collapse()},children:[]};return e&&e.children.push(n),_n("TreeNodeMap",n),{broadcastExpanded:r=>{if(!!t.accordion)for(const i of n.children)i.treeNodeExpand(r)}}}const Sq=Symbol("dragEvents");function H6e({props:t,ctx:e,el$:n,dropIndicator$:r,store:i}){const o=Qe("tree"),a=F({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return _n(Sq,{treeNodeDragStart:({event:c,treeNode:d})=>{if(typeof t.allowDrag=="function"&&!t.allowDrag(d.node))return c.preventDefault(),!1;c.dataTransfer.effectAllowed="move";try{c.dataTransfer.setData("text/plain","")}catch{}a.value.draggingNode=d,e.emit("node-drag-start",d.node,c)},treeNodeDragOver:({event:c,treeNode:d})=>{const f=d,h=a.value.dropNode;h&&h.node.id!==f.node.id&&aa(h.$el,o.is("drop-inner"));const m=a.value.draggingNode;if(!m||!f)return;let g=!0,y=!0,b=!0,w=!0;typeof t.allowDrop=="function"&&(g=t.allowDrop(m.node,f.node,"prev"),w=y=t.allowDrop(m.node,f.node,"inner"),b=t.allowDrop(m.node,f.node,"next")),c.dataTransfer.dropEffect=y||g||b?"move":"none",(g||y||b)&&(h==null?void 0:h.node.id)!==f.node.id&&(h&&e.emit("node-drag-leave",m.node,h.node,c),e.emit("node-drag-enter",m.node,f.node,c)),g||y||b?a.value.dropNode=f:a.value.dropNode=null,f.node.nextSibling===m.node&&(b=!1),f.node.previousSibling===m.node&&(g=!1),f.node.contains(m.node,!1)&&(y=!1),(m.node===f.node||m.node.contains(f.node))&&(g=!1,y=!1,b=!1);const O=f.$el.querySelector(`.${o.be("node","content")}`).getBoundingClientRect(),S=n.value.getBoundingClientRect();let x;const C=g?y?.25:b?.45:1:-1,E=b?y?.75:g?.55:0:1;let T=-9999;const P=c.clientY-O.top;PO.height*E?x="after":y?x="inner":x="none";const A=f.$el.querySelector(`.${o.be("node","expand-icon")}`).getBoundingClientRect(),D=r.value;x==="before"?T=A.top-S.top:x==="after"&&(T=A.bottom-S.top),D.style.top=`${T}px`,D.style.left=`${A.right-S.left}px`,x==="inner"?rl(f.$el,o.is("drop-inner")):aa(f.$el,o.is("drop-inner")),a.value.showDropIndicator=x==="before"||x==="after",a.value.allowDrop=a.value.showDropIndicator||w,a.value.dropType=x,e.emit("node-drag-over",m.node,f.node,c)},treeNodeDragEnd:c=>{const{draggingNode:d,dropType:f,dropNode:h}=a.value;if(c.preventDefault(),c.dataTransfer&&(c.dataTransfer.dropEffect="move"),d&&h){const m={data:d.node.data};f!=="none"&&d.node.remove(),f==="before"?h.node.parent.insertBefore(m,h.node):f==="after"?h.node.parent.insertAfter(m,h.node):f==="inner"&&h.node.insertChild(m),f!=="none"&&(i.value.registerNode(m),i.value.key&&d.node.eachNode(g=>{var y;(y=i.value.nodesMap[g.data[i.value.key]])==null||y.setChecked(g.checked,!i.value.checkStrictly)})),aa(h.$el,o.is("drop-inner")),e.emit("node-drag-end",d.node,h.node,f,c),f!=="none"&&e.emit("node-drop",d.node,h.node,f,c)}d&&!h&&e.emit("node-drag-end",d.node,null,f,c),a.value.showDropIndicator=!1,a.value.draggingNode=null,a.value.dropNode=null,a.value.allowDrop=!0}}),{dragState:a}}const W6e=ue({name:"ElTreeNode",components:{ElCollapseTransition:Xx,ElCheckbox:Is,NodeContent:Q6e,ElIcon:gt,Loading:Ku},props:{node:{type:Qh,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:{type:Boolean,default:!1}},emits:["node-expand"],setup(t,e){const n=Qe("tree"),{broadcastExpanded:r}=wq(t),i=ht("RootTree"),o=F(!1),a=F(!1),s=F(null),l=F(null),u=F(null),c=ht(Sq),d=en();_n("NodeInstance",d),t.node.expanded&&(o.value=!0,a.value=!0);const f=i.props.props.children||"children";Ve(()=>{const P=t.node.data[f];return P&&[...P]},()=>{t.node.updateChildren()}),Ve(()=>t.node.indeterminate,P=>{g(t.node.checked,P)}),Ve(()=>t.node.checked,P=>{g(P,t.node.indeterminate)}),Ve(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),Ve(()=>t.node.expanded,P=>{Ot(()=>o.value=P),P&&(a.value=!0)});const h=P=>wN(i.props.nodeKey,P.data),m=P=>{const A=t.props.class;if(!A)return{};let D;if($t(A)){const{data:N}=P;D=A(N,P)}else D=A;return At(D)?{[D]:!0}:D},g=(P,A)=>{(s.value!==P||l.value!==A)&&i.ctx.emit("check-change",t.node.data,P,A),s.value=P,l.value=A},y=P=>{fP(i.store,i.ctx.emit,()=>i.store.value.setCurrentNode(t.node)),i.currentNode.value=t.node,i.props.expandOnClickNode&&w(),i.props.checkOnClickNode&&!t.node.disabled&&O(null,{target:{checked:!t.node.checked}}),i.ctx.emit("node-click",t.node.data,t.node,d,P)},b=P=>{i.instance.vnode.props.onNodeContextmenu&&(P.stopPropagation(),P.preventDefault()),i.ctx.emit("node-contextmenu",P,t.node.data,t.node,d)},w=()=>{t.node.isLeaf||(o.value?(i.ctx.emit("node-collapse",t.node.data,t.node,d),t.node.collapse()):t.node.expand(()=>{e.emit("node-expand",t.node.data,t.node,d)}))},O=(P,A)=>{t.node.setChecked(A.target.checked,!i.props.checkStrictly),Ot(()=>{const D=i.store.value;i.ctx.emit("check",t.node.data,{checkedNodes:D.getCheckedNodes(),checkedKeys:D.getCheckedKeys(),halfCheckedNodes:D.getHalfCheckedNodes(),halfCheckedKeys:D.getHalfCheckedKeys()})})};return{ns:n,node$:u,tree:i,expanded:o,childNodeRendered:a,oldChecked:s,oldIndeterminate:l,getNodeKey:h,getNodeClass:m,handleSelectChange:g,handleClick:y,handleContextMenu:b,handleExpandIconClick:w,handleCheckChange:O,handleChildNodeExpand:(P,A,D)=>{r(A),i.ctx.emit("node-expand",P,A,D)},handleDragStart:P=>{!i.props.draggable||c.treeNodeDragStart({event:P,treeNode:t})},handleDragOver:P=>{P.preventDefault(),i.props.draggable&&c.treeNodeDragOver({event:P,treeNode:{$el:u.value,node:t.node}})},handleDrop:P=>{P.preventDefault()},handleDragEnd:P=>{!i.props.draggable||c.treeNodeDragEnd(P)},CaretRight:BQ}}});function U6e(t,e,n,r,i,o){const a=an("el-icon"),s=an("el-checkbox"),l=an("loading"),u=an("node-content"),c=an("el-tree-node"),d=an("el-collapse-transition");return Ht((R(),G("div",{ref:"node$",class:j([t.ns.b("node"),t.ns.is("expanded",t.expanded),t.ns.is("current",t.node.isCurrent),t.ns.is("hidden",!t.node.visible),t.ns.is("focusable",!t.node.disabled),t.ns.is("checked",!t.node.disabled&&t.node.checked),t.getNodeClass(t.node)]),role:"treeitem",tabindex:"-1","aria-expanded":t.expanded,"aria-disabled":t.node.disabled,"aria-checked":t.node.checked,draggable:t.tree.props.draggable,"data-key":t.getNodeKey(t.node),onClick:Pt(t.handleClick,["stop"]),onContextmenu:t.handleContextMenu,onDragstart:Pt(t.handleDragStart,["stop"]),onDragover:Pt(t.handleDragOver,["stop"]),onDragend:Pt(t.handleDragEnd,["stop"]),onDrop:Pt(t.handleDrop,["stop"])},[J("div",{class:j(t.ns.be("node","content")),style:mt({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(R(),we(a,{key:0,class:j([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:Pt(t.handleExpandIconClick,["stop"])},{default:z(()=>[(R(),we(un(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):_e("v-if",!0),t.showCheckbox?(R(),we(s,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:Pt(()=>{},["stop"]),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onClick","onChange"])):_e("v-if",!0),t.node.loading?(R(),we(a,{key:2,class:j([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:z(()=>[B(l)]),_:1},8,["class"])):_e("v-if",!0),B(u,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),B(d,null,{default:z(()=>[!t.renderAfterExpand||t.childNodeRendered?Ht((R(),G("div",{key:0,class:j(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded},[(R(!0),G(ct,null,Wt(t.node.childNodes,f=>(R(),we(c,{key:t.getNodeKey(f),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:f,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,["aria-expanded"])),[[zn,t.expanded]]):_e("v-if",!0)]),_:1})],42,["aria-expanded","aria-disabled","aria-checked","draggable","data-key","onClick","onContextmenu","onDragstart","onDragover","onDragend","onDrop"])),[[zn,t.node.visible]])}var q6e=Ge(W6e,[["render",U6e],["__file","tree-node.vue"]]);function Y6e({el$:t},e){const n=Qe("tree"),r=Tr([]),i=Tr([]);Bt(()=>{a()}),Jc(()=>{r.value=Array.from(t.value.querySelectorAll("[role=treeitem]")),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"))}),Ve(i,s=>{s.forEach(l=>{l.setAttribute("tabindex","-1")})}),sr(t,"keydown",s=>{const l=s.target;if(!l.className.includes(n.b("node")))return;const u=s.code;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));const c=r.value.indexOf(l);let d;if([St.up,St.down].includes(u)){if(s.preventDefault(),u===St.up){d=c===-1?0:c!==0?c-1:r.value.length-1;const h=d;for(;!e.value.getNode(r.value[d].dataset.key).canFocus;){if(d--,d===h){d=-1;break}d<0&&(d=r.value.length-1)}}else{d=c===-1?0:c=r.value.length&&(d=0)}}d!==-1&&r.value[d].focus()}[St.left,St.right].includes(u)&&(s.preventDefault(),l.click());const f=l.querySelector('[type="checkbox"]');[St.enter,St.space].includes(u)&&f&&(s.preventDefault(),f.click())});const a=()=>{var s;r.value=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),i.value=Array.from(t.value.querySelectorAll("input[type=checkbox]"));const l=t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(l.length){l[0].setAttribute("tabindex","0");return}(s=r.value[0])==null||s.setAttribute("tabindex","0")}}const X6e=ue({name:"ElTree",components:{ElTreeNode:q6e},props:{data:{type:Array,default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkDescendants:{type:Boolean,default:!1},autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:Array,defaultExpandedKeys:Array,currentNodeKey:[String,Number],renderContent:Function,showCheckbox:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},allowDrag:Function,allowDrop:Function,props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:{type:Boolean,default:!1},highlightCurrent:Boolean,load:Function,filterNodeMethod:Function,accordion:Boolean,indent:{type:Number,default:18},icon:{type:fr}},emits:["check-change","current-change","node-click","node-contextmenu","node-collapse","node-expand","check","node-drag-start","node-drag-end","node-drop","node-drag-leave","node-drag-enter","node-drag-over"],setup(t,e){const{t:n}=kn(),r=Qe("tree"),i=ht(Ym,null),o=F(new j6e({key:t.nodeKey,data:t.data,lazy:t.lazy,props:t.props,load:t.load,currentNodeKey:t.currentNodeKey,checkStrictly:t.checkStrictly,checkDescendants:t.checkDescendants,defaultCheckedKeys:t.defaultCheckedKeys,defaultExpandedKeys:t.defaultExpandedKeys,autoExpandParent:t.autoExpandParent,defaultExpandAll:t.defaultExpandAll,filterNodeMethod:t.filterNodeMethod}));o.value.initialize();const a=F(o.value.root),s=F(null),l=F(null),u=F(null),{broadcastExpanded:c}=wq(t),{dragState:d}=H6e({props:t,ctx:e,el$:l,dropIndicator$:u,store:o});Y6e({el$:l},o);const f=M(()=>{const{childNodes:Q}=a.value,V=i?i.hasFilteredOptions!==0:!1;return(!Q||Q.length===0||Q.every(({visible:q})=>!q))&&!V});Ve(()=>t.currentNodeKey,Q=>{o.value.setCurrentNodeKey(Q)}),Ve(()=>t.defaultCheckedKeys,Q=>{o.value.setDefaultCheckedKey(Q)}),Ve(()=>t.defaultExpandedKeys,Q=>{o.value.setDefaultExpandedKeys(Q)}),Ve(()=>t.data,Q=>{o.value.setData(Q)},{deep:!0}),Ve(()=>t.checkStrictly,Q=>{o.value.checkStrictly=Q});const h=Q=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");o.value.filter(Q)},m=Q=>wN(t.nodeKey,Q.data),g=Q=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getNodePath");const V=o.value.getNode(Q);if(!V)return[];const q=[V.data];let K=V.parent;for(;K&&K!==a.value;)q.push(K.data),K=K.parent;return q.reverse()},y=(Q,V)=>o.value.getCheckedNodes(Q,V),b=Q=>o.value.getCheckedKeys(Q),w=()=>{const Q=o.value.getCurrentNode();return Q?Q.data:null},O=()=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in getCurrentKey");const Q=w();return Q?Q[t.nodeKey]:null},S=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedNodes");o.value.setCheckedNodes(Q,V)},x=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCheckedKeys");o.value.setCheckedKeys(Q,V)},C=(Q,V,q)=>{o.value.setChecked(Q,V,q)},E=()=>o.value.getHalfCheckedNodes(),T=()=>o.value.getHalfCheckedKeys(),P=(Q,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentNode");fP(o,e.emit,()=>{c(Q),o.value.setUserCurrentNode(Q,V)})},A=(Q,V=!0)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in setCurrentKey");fP(o,e.emit,()=>{c(),o.value.setCurrentNodeKey(Q,V)})},D=Q=>o.value.getNode(Q),N=Q=>{o.value.remove(Q)},$=(Q,V)=>{o.value.append(Q,V)},W=(Q,V)=>{o.value.insertBefore(Q,V)},L=(Q,V)=>{o.value.insertAfter(Q,V)},I=(Q,V,q)=>{c(V),e.emit("node-expand",Q,V,q)},U=(Q,V)=>{if(!t.nodeKey)throw new Error("[Tree] nodeKey is required in updateKeyChild");o.value.updateChildren(Q,V)};return _n("RootTree",{ctx:e,props:t,store:o,root:a,currentNode:s,instance:en()}),_n(tc,void 0),{ns:r,store:o,root:a,currentNode:s,dragState:d,el$:l,dropIndicator$:u,isEmpty:f,filter:h,getNodeKey:m,getNodePath:g,getCheckedNodes:y,getCheckedKeys:b,getCurrentNode:w,getCurrentKey:O,setCheckedNodes:S,setCheckedKeys:x,setChecked:C,getHalfCheckedNodes:E,getHalfCheckedKeys:T,setCurrentNode:P,setCurrentKey:A,t:n,getNode:D,remove:N,append:$,insertBefore:W,insertAfter:L,handleNodeExpand:I,updateKeyChildren:U}}});function Z6e(t,e,n,r,i,o){const a=an("el-tree-node");return R(),G("div",{ref:"el$",class:j([t.ns.b(),t.ns.is("dragging",!!t.dragState.draggingNode),t.ns.is("drop-not-allow",!t.dragState.allowDrop),t.ns.is("drop-inner",t.dragState.dropType==="inner"),{[t.ns.m("highlight-current")]:t.highlightCurrent}]),role:"tree"},[(R(!0),G(ct,null,Wt(t.root.childNodes,s=>(R(),we(a,{key:t.getNodeKey(s),node:s,props:t.props,accordion:t.accordion,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,"render-content":t.renderContent,onNodeExpand:t.handleNodeExpand},null,8,["node","props","accordion","render-after-expand","show-checkbox","render-content","onNodeExpand"]))),128)),t.isEmpty?(R(),G("div",{key:0,class:j(t.ns.e("empty-block"))},[xe(t.$slots,"empty",{},()=>{var s;return[J("span",{class:j(t.ns.e("empty-text"))},je((s=t.emptyText)!=null?s:t.t("el.tree.emptyText")),3)]})],2)):_e("v-if",!0),Ht(J("div",{ref:"dropIndicator$",class:j(t.ns.e("drop-indicator"))},null,2),[[zn,t.dragState.showDropIndicator]])],2)}var G6e=Ge(X6e,[["render",Z6e],["__file","tree.vue"]]);const T0=Vt(G6e),K6e=(t,{attrs:e,emit:n},{select:r,tree:i,key:o})=>{const a=Qe("tree-select");return Ve(()=>t.data,()=>{t.filterable&&Ot(()=>{var l,u;(u=i.value)==null||u.filter((l=r.value)==null?void 0:l.states.inputValue)})},{flush:"post"}),{...vo(Ri(t),Object.keys(Ol.props)),...e,"onUpdate:modelValue":l=>n(Zt,l),valueKey:o,popperClass:M(()=>{const l=[a.e("popper")];return t.popperClass&&l.push(t.popperClass),l.join(" ")}),filterMethod:(l="")=>{var u;t.filterMethod?t.filterMethod(l):t.remoteMethod?t.remoteMethod(l):(u=i.value)==null||u.filter(l)}}},J6e=ue({extends:Yc,setup(t,e){const n=Yc.setup(t,e);delete n.selectOptionClick;const r=en().proxy;return Ot(()=>{n.select.states.cachedOptions.get(r.value)||n.select.onOptionCreate(r)}),Ve(()=>e.attrs.visible,i=>{n.states.visible=i},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function pP(t){return t||t===0}function SN(t){return Array.isArray(t)&&t.length}function qp(t){return Array.isArray(t)?t:pP(t)?[t]:[]}function A1(t,e,n,r,i){for(let o=0;o{Ve(()=>t.modelValue,()=>{t.showCheckbox&&Ot(()=>{const f=o.value;f&&!so(f.getCheckedKeys(),qp(t.modelValue))&&f.setCheckedKeys(qp(t.modelValue))})},{immediate:!0,deep:!0});const s=M(()=>({value:a.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),l=(f,h)=>{var m;const g=s.value[f];return $t(g)?g(h,(m=o.value)==null?void 0:m.getNode(l("value",h))):h[g]},u=qp(t.modelValue).map(f=>A1(t.data||[],h=>l("value",h)===f,h=>l("children",h),(h,m,g,y)=>y&&l("value",y))).filter(f=>pP(f)),c=M(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const f=[];return M1(t.data.concat(t.cacheData),h=>{const m=l("value",h);f.push({value:m,currentLabel:l("label",h),isDisabled:l("disabled",h)})},h=>l("children",h)),f}),d=()=>{var f;return(f=o.value)==null?void 0:f.getCheckedKeys().filter(h=>{var m;const g=(m=o.value)==null?void 0:m.getNode(h);return!Dr(g)&&xs(g.childNodes)})};return{...vo(Ri(t),Object.keys(T0.props)),...e,nodeKey:a,expandOnClickNode:M(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:M(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(u):u),renderContent:(f,{node:h,data:m,store:g})=>f(J6e,{value:l("value",m),label:l("label",m),disabled:l("disabled",m),visible:h.visible},t.renderContent?()=>t.renderContent(f,{node:h,data:m,store:g}):n.default?()=>n.default({node:h,data:m,store:g}):void 0),filterNodeMethod:(f,h,m)=>t.filterNodeMethod?t.filterNodeMethod(f,h,m):f?new RegExp(n$(f),"i").test(l("label",h)||""):!0,onNodeClick:(f,h,m)=>{var g,y,b,w;if((g=e.onNodeClick)==null||g.call(e,f,h,m),!(t.showCheckbox&&t.checkOnClickNode)){if(!t.showCheckbox&&(t.checkStrictly||h.isLeaf)){if(!l("disabled",f)){const O=(y=i.value)==null?void 0:y.states.options.get(l("value",f));(b=i.value)==null||b.handleOptionSelect(O)}}else t.expandOnClickNode&&m.proxy.handleExpandIconClick();(w=i.value)==null||w.focus()}},onCheck:(f,h)=>{var m;if(!t.showCheckbox)return;const g=l("value",f),y={};M1([o.value.store.root],S=>y[S.key]=S,S=>S.childNodes);const b=h.checkedKeys,w=t.multiple?qp(t.modelValue).filter(S=>!(S in y)&&!b.includes(S)):[],O=w.concat(b);if(t.checkStrictly)r(Zt,t.multiple?O:O.includes(g)?g:void 0);else if(t.multiple){const S=d();r(Zt,w.concat(S))}else{const S=A1([f],E=>!SN(l("children",E))&&!l("disabled",E),E=>l("children",E)),x=S?l("value",S):void 0,C=pP(t.modelValue)&&!!A1([f],E=>l("value",E)===t.modelValue,E=>l("children",E));r(Zt,x===t.modelValue||C?void 0:x)}Ot(()=>{var S;const x=qp(t.modelValue);o.value.setCheckedKeys(x),(S=e.onCheck)==null||S.call(e,f,{checkedKeys:o.value.getCheckedKeys(),checkedNodes:o.value.getCheckedNodes(),halfCheckedKeys:o.value.getHalfCheckedKeys(),halfCheckedNodes:o.value.getHalfCheckedNodes()})}),(m=i.value)==null||m.focus()},onNodeExpand:(f,h,m)=>{var g;(g=e.onNodeExpand)==null||g.call(e,f,h,m),Ot(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&h.checked){const y={},b=o.value.getCheckedKeys();M1([o.value.store.root],S=>y[S.key]=S,S=>S.childNodes);const w=qp(t.modelValue).filter(S=>!(S in y)&&!b.includes(S)),O=d();r(Zt,w.concat(O))}})},cacheOptions:c}};var tFe=ue({props:{data:{type:Array,default:()=>[]}},setup(t){const e=ht(Ym);return Ve(()=>t.data,()=>{var n;t.data.forEach(i=>{e.states.cachedOptions.has(i.value)||e.states.cachedOptions.set(i.value,i)});const r=((n=e.selectRef)==null?void 0:n.querySelectorAll("input"))||[];Tn&&!Array.from(r).includes(document.activeElement)&&e.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const nFe=ue({name:"ElTreeSelect",inheritAttrs:!1,props:{...Ol.props,...T0.props,cacheData:{type:Array,default:()=>[]}},setup(t,e){const{slots:n,expose:r}=e,i=F(),o=F(),a=M(()=>t.nodeKey||t.valueKey||"value"),s=K6e(t,e,{select:i,tree:o,key:a}),{cacheOptions:l,...u}=eFe(t,e,{select:i,tree:o,key:a}),c=Sn({});return r(c),Bt(()=>{Object.assign(c,{...vo(o.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...vo(i.value,["focus","blur"])})}),()=>Et(Ol,Sn({...s,ref:d=>i.value=d}),{...n,default:()=>[Et(tFe,{data:l.value}),Et(T0,Sn({...u,ref:d=>o.value=d}))]})}});var rFe=Ge(nFe,[["__file","tree-select.vue"]]);const iFe=Vt(rFe),xN=Symbol(),oFe={key:-1,level:-1,data:{}};var ny=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t))(ny||{}),gP=(t=>(t.ADD="add",t.DELETE="delete",t))(gP||{});const xq={type:Number,default:26},aFe=Ye({data:{type:Oe(Array),default:()=>Jr([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:Oe(Object),default:()=>Jr({children:"children",label:"label",disabled:"disabled",value:"id"})},highlightCurrent:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},defaultCheckedKeys:{type:Oe(Array),default:()=>Jr([])},checkStrictly:{type:Boolean,default:!1},defaultExpandedKeys:{type:Oe(Array),default:()=>Jr([])},indent:{type:Number,default:16},itemSize:xq,icon:{type:fr},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:{type:Boolean,default:!1},currentNodeKey:{type:Oe([String,Number])},accordion:{type:Boolean,default:!1},filterMethod:{type:Oe(Function)},perfMode:{type:Boolean,default:!0}}),sFe=Ye({node:{type:Oe(Object),default:()=>Jr(oFe)},expanded:{type:Boolean,default:!1},checked:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},showCheckbox:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},current:{type:Boolean,default:!1},hiddenExpandIcon:{type:Boolean,default:!1},itemSize:xq}),lFe=Ye({node:{type:Oe(Object),required:!0}}),Cq="node-click",Eq="node-drop",Tq="node-expand",kq="node-collapse",Pq="current-change",Aq="check",Mq="check-change",Rq="node-contextmenu",uFe={[Cq]:(t,e,n)=>t&&e&&n,[Eq]:(t,e,n)=>t&&e&&n,[Tq]:(t,e)=>t&&e,[kq]:(t,e)=>t&&e,[Pq]:(t,e)=>t&&e,[Aq]:(t,e)=>t&&e,[Mq]:(t,e)=>t&&typeof e=="boolean",[Rq]:(t,e,n)=>t&&e&&n},cFe={click:(t,e)=>!!(t&&e),drop:(t,e)=>!!(t&&e),toggle:t=>!!t,check:(t,e)=>t&&typeof e=="boolean"};function dFe(t,e){const n=F(new Set),r=F(new Set),{emit:i}=en();Ve([()=>e.value,()=>t.defaultCheckedKeys],()=>Ot(()=>{w(t.defaultCheckedKeys)}),{immediate:!0});const o=()=>{if(!e.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:O,maxLevel:S}=e.value,x=n.value,C=new Set;for(let E=S-1;E>=1;--E){const T=O.get(E);!T||T.forEach(P=>{const A=P.children;if(A){let D=!0,N=!1;for(const $ of A){const W=$.key;if(x.has(W))N=!0;else if(C.has(W)){D=!1,N=!0;break}else D=!1}D?x.add(P.key):N?(C.add(P.key),x.delete(P.key)):(x.delete(P.key),C.delete(P.key))}})}r.value=C},a=O=>n.value.has(O.key),s=O=>r.value.has(O.key),l=(O,S,x=!0)=>{const C=n.value,E=(T,P)=>{C[P?gP.ADD:gP.DELETE](T.key);const A=T.children;!t.checkStrictly&&A&&A.forEach(D=>{D.disabled||E(D,P)})};E(O,S),o(),x&&u(O,S)},u=(O,S)=>{const{checkedNodes:x,checkedKeys:C}=m(),{halfCheckedNodes:E,halfCheckedKeys:T}=g();i(Aq,O.data,{checkedKeys:C,checkedNodes:x,halfCheckedKeys:T,halfCheckedNodes:E}),i(Mq,O.data,S)};function c(O=!1){return m(O).checkedKeys}function d(O=!1){return m(O).checkedNodes}function f(){return g().halfCheckedKeys}function h(){return g().halfCheckedNodes}function m(O=!1){const S=[],x=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:C}=e.value;n.value.forEach(E=>{const T=C.get(E);T&&(!O||O&&T.isLeaf)&&(x.push(E),S.push(T.data))})}return{checkedKeys:x,checkedNodes:S}}function g(){const O=[],S=[];if((e==null?void 0:e.value)&&t.showCheckbox){const{treeNodeMap:x}=e.value;r.value.forEach(C=>{const E=x.get(C);E&&(S.push(C),O.push(E.data))})}return{halfCheckedNodes:O,halfCheckedKeys:S}}function y(O){n.value.clear(),r.value.clear(),Ot(()=>{w(O)})}function b(O,S){if((e==null?void 0:e.value)&&t.showCheckbox){const x=e.value.treeNodeMap.get(O);x&&l(x,S,!1)}}function w(O){if(e!=null&&e.value){const{treeNodeMap:S}=e.value;if(t.showCheckbox&&S&&O)for(const x of O){const C=S.get(x);C&&!a(C)&&l(C,!0,!1)}}}return{updateCheckedKeys:o,toggleCheckbox:l,isChecked:a,isIndeterminate:s,getCheckedKeys:c,getCheckedNodes:d,getHalfCheckedKeys:f,getHalfCheckedNodes:h,setChecked:b,setCheckedKeys:y}}function fFe(t,e){const n=F(new Set([])),r=F(new Set([])),i=M(()=>$t(t.filterMethod));function o(s){var l;if(!i.value)return;const u=new Set,c=r.value,d=n.value,f=[],h=((l=e.value)==null?void 0:l.treeNodes)||[],m=t.filterMethod;d.clear();function g(y){y.forEach(b=>{f.push(b),m!=null&&m(s,b.data)?f.forEach(O=>{u.add(O.key)}):b.isLeaf&&d.add(b.key);const w=b.children;if(w&&g(w),!b.isLeaf){if(!u.has(b.key))d.add(b.key);else if(w){let O=!0;for(const S of w)if(!d.has(S.key)){O=!1;break}O?c.add(b.key):c.delete(b.key)}}f.pop()})}return g(h),u}function a(s){return r.value.has(s.key)}return{hiddenExpandIconKeySet:r,hiddenNodeKeySet:n,doFilter:o,isForceHiddenExpandIcon:a}}function hFe(t,e){const n=F(new Set(t.defaultExpandedKeys)),r=F(),i=Tr(),o=F();Ve(()=>t.currentNodeKey,Z=>{r.value=Z},{immediate:!0}),Ve(()=>t.data,Z=>{te(Z)},{immediate:!0});const{isIndeterminate:a,isChecked:s,toggleCheckbox:l,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:m}=dFe(t,i),{doFilter:g,hiddenNodeKeySet:y,isForceHiddenExpandIcon:b}=fFe(t,i),w=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.value)||ny.KEY}),O=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.children)||ny.CHILDREN}),S=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.disabled)||ny.DISABLED}),x=M(()=>{var Z;return((Z=t.props)==null?void 0:Z.label)||ny.LABEL}),C=M(()=>{var Z;const ce=n.value,Te=y.value,Ie=[],ae=((Z=i.value)==null?void 0:Z.treeNodes)||[],me=[];for(let Ae=ae.length-1;Ae>=0;--Ae)me.push(ae[Ae]);for(;me.length;){const Ae=me.pop();if(!Te.has(Ae.key)&&(Ie.push(Ae),Ae.children&&ce.has(Ae.key)))for(let X=Ae.children.length-1;X>=0;--X)me.push(Ae.children[X])}return Ie}),E=M(()=>C.value.length>0);function T(Z){const ce=new Map,Te=new Map;let Ie=1;function ae(Ae,X=1,ee=void 0){var le;const Ce=[];for(const fe of Ae){const Ee=D(fe),be={level:X,key:Ee,data:fe};be.label=$(fe),be.parent=ee;const Be=A(fe);be.disabled=N(fe),be.isLeaf=!Be||Be.length===0,Be&&Be.length&&(be.children=ae(Be,X+1,be)),Ce.push(be),ce.set(Ee,be),Te.has(X)||Te.set(X,[]),(le=Te.get(X))==null||le.push(be)}return X>Ie&&(Ie=X),Ce}const me=ae(Z);return{treeNodeMap:ce,levelTreeNodeMap:Te,maxLevel:Ie,treeNodes:me}}function P(Z){const ce=g(Z);ce&&(n.value=ce)}function A(Z){return Z[O.value]}function D(Z){return Z?Z[w.value]:""}function N(Z){return Z[S.value]}function $(Z){return Z[x.value]}function W(Z){n.value.has(Z.key)?K(Z):q(Z)}function L(Z){const ce=new Set,Te=i.value.treeNodeMap;Z.forEach(Ie=>{let ae=Te.get(Ie);for(;ae&&!ce.has(ae.key);)ce.add(ae.key),ae=ae.parent}),n.value=ce}function I(Z,ce){e(Cq,Z.data,Z,ce),Q(Z),t.expandOnClickNode&&W(Z),t.showCheckbox&&t.checkOnClickNode&&!Z.disabled&&l(Z,!s(Z),!0)}function U(Z,ce){e(Eq,Z.data,Z,ce)}function Q(Z){Se(Z)||(r.value=Z.key,e(Pq,Z.data,Z))}function V(Z,ce){l(Z,ce)}function q(Z){const ce=n.value;if(i.value&&t.accordion){const{treeNodeMap:Te}=i.value;ce.forEach(Ie=>{const ae=Te.get(Ie);Z&&Z.level===(ae==null?void 0:ae.level)&&ce.delete(Ie)})}ce.add(Z.key),e(Tq,Z.data,Z)}function K(Z){n.value.delete(Z.key),e(kq,Z.data,Z)}function ie(Z){return n.value.has(Z.key)}function oe(Z){return!!Z.disabled}function Se(Z){const ce=r.value;return ce!==void 0&&ce===Z.key}function ke(){var Z,ce;if(!!r.value)return(ce=(Z=i.value)==null?void 0:Z.treeNodeMap.get(r.value))==null?void 0:ce.data}function Y(){return r.value}function re(Z){r.value=Z}function te(Z){Ot(()=>i.value=T(Z))}function ge(Z){var ce;const Te=sn(Z)?D(Z):Z;return(ce=i.value)==null?void 0:ce.treeNodeMap.get(Te)}function Re(Z,ce="auto"){const Te=ge(Z);Te&&o.value&&o.value.scrollToItem(C.value.indexOf(Te),ce)}function $e(Z){var ce;(ce=o.value)==null||ce.scrollTo(Z)}return{tree:i,flattenTree:C,isNotEmpty:E,listRef:o,getKey:D,getChildren:A,toggleExpand:W,toggleCheckbox:l,isExpanded:ie,isChecked:s,isIndeterminate:a,isDisabled:oe,isCurrent:Se,isForceHiddenExpandIcon:b,handleNodeClick:I,handleNodeDrop:U,handleNodeCheck:V,getCurrentNode:ke,getCurrentKey:Y,setCurrentKey:re,getCheckedKeys:u,getCheckedNodes:c,getHalfCheckedKeys:d,getHalfCheckedNodes:f,setChecked:h,setCheckedKeys:m,filter:P,setData:te,getNode:ge,expandNode:q,collapseNode:K,setExpandedKeys:L,scrollToNode:Re,scrollTo:$e}}var pFe=ue({name:"ElTreeNodeContent",props:lFe,setup(t){const e=ht(xN),n=Qe("tree");return()=>{const r=t.node,{data:i}=r;return e!=null&&e.ctx.slots.default?e.ctx.slots.default({node:r,data:i}):Et("span",{class:n.be("node","label")},[r==null?void 0:r.label])}}});const gFe=ue({name:"ElTreeNode"}),mFe=ue({...gFe,props:sFe,emits:cFe,setup(t,{emit:e}){const n=t,r=ht(xN),i=Qe("tree"),o=M(()=>{var f;return(f=r==null?void 0:r.props.indent)!=null?f:16}),a=M(()=>{var f;return(f=r==null?void 0:r.props.icon)!=null?f:BQ}),s=f=>{e("click",n.node,f)},l=f=>{e("drop",n.node,f)},u=()=>{e("toggle",n.node)},c=f=>{e("check",n.node,f)},d=f=>{var h,m,g,y;(g=(m=(h=r==null?void 0:r.instance)==null?void 0:h.vnode)==null?void 0:m.props)!=null&&g.onNodeContextmenu&&(f.stopPropagation(),f.preventDefault()),r==null||r.ctx.emit(Rq,f,(y=n.node)==null?void 0:y.data,n.node)};return(f,h)=>{var m,g,y;return R(),G("div",{ref:"node$",class:j([p(i).b("node"),p(i).is("expanded",f.expanded),p(i).is("current",f.current),p(i).is("focusable",!f.disabled),p(i).is("checked",!f.disabled&&f.checked)]),role:"treeitem",tabindex:"-1","aria-expanded":f.expanded,"aria-disabled":f.disabled,"aria-checked":f.checked,"data-key":(m=f.node)==null?void 0:m.key,onClick:Pt(s,["stop"]),onContextmenu:d,onDragover:Pt(()=>{},["prevent"]),onDragenter:Pt(()=>{},["prevent"]),onDrop:Pt(l,["stop"])},[J("div",{class:j(p(i).be("node","content")),style:mt({paddingLeft:`${(f.node.level-1)*p(o)}px`,height:f.itemSize+"px"})},[p(a)?(R(),we(p(gt),{key:0,class:j([p(i).is("leaf",!!((g=f.node)!=null&&g.isLeaf)),p(i).is("hidden",f.hiddenExpandIcon),{expanded:!((y=f.node)!=null&&y.isLeaf)&&f.expanded},p(i).be("node","expand-icon")]),onClick:Pt(u,["stop"])},{default:z(()=>[(R(),we(un(p(a))))]),_:1},8,["class","onClick"])):_e("v-if",!0),f.showCheckbox?(R(),we(p(Is),{key:1,"model-value":f.checked,indeterminate:f.indeterminate,disabled:f.disabled,onChange:c,onClick:Pt(()=>{},["stop"])},null,8,["model-value","indeterminate","disabled","onClick"])):_e("v-if",!0),B(p(pFe),{node:f.node},null,8,["node"])],6)],42,["aria-expanded","aria-disabled","aria-checked","data-key","onClick","onDragover","onDragenter","onDrop"])}}});var vFe=Ge(mFe,[["__file","tree-node.vue"]]);const yFe=ue({name:"ElTreeV2"}),bFe=ue({...yFe,props:aFe,emits:uFe,setup(t,{expose:e,emit:n}){const r=t,i=Ji(),o=M(()=>r.itemSize);_n(xN,{ctx:{emit:n,slots:i},props:r,instance:en()}),_n(tc,void 0);const{t:a}=kn(),s=Qe("tree"),{flattenTree:l,isNotEmpty:u,listRef:c,toggleExpand:d,isExpanded:f,isIndeterminate:h,isChecked:m,isDisabled:g,isCurrent:y,isForceHiddenExpandIcon:b,handleNodeClick:w,handleNodeDrop:O,handleNodeCheck:S,toggleCheckbox:x,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:N,setChecked:$,setCheckedKeys:W,filter:L,setData:I,getNode:U,expandNode:Q,collapseNode:V,setExpandedKeys:q,scrollToNode:K,scrollTo:ie}=hFe(r,n);return e({toggleCheckbox:x,getCurrentNode:C,getCurrentKey:E,setCurrentKey:T,getCheckedKeys:P,getCheckedNodes:A,getHalfCheckedKeys:D,getHalfCheckedNodes:N,setChecked:$,setCheckedKeys:W,filter:L,setData:I,getNode:U,expandNode:Q,collapseNode:V,setExpandedKeys:q,scrollToNode:K,scrollTo:ie}),(oe,Se)=>{var ke;return R(),G("div",{class:j([p(s).b(),{[p(s).m("highlight-current")]:oe.highlightCurrent}]),role:"tree"},[p(u)?(R(),we(p(DU),{key:0,ref_key:"listRef",ref:c,"class-name":p(s).b("virtual-list"),data:p(l),total:p(l).length,height:oe.height,"item-size":p(o),"perf-mode":oe.perfMode},{default:z(({data:Y,index:re,style:te})=>[(R(),we(vFe,{key:Y[re].key,style:mt(te),node:Y[re],expanded:p(f)(Y[re]),"show-checkbox":oe.showCheckbox,checked:p(m)(Y[re]),indeterminate:p(h)(Y[re]),"item-size":p(o),disabled:p(g)(Y[re]),current:p(y)(Y[re]),"hidden-expand-icon":p(b)(Y[re]),onClick:p(w),onToggle:p(d),onCheck:p(S),onDrop:p(O)},null,8,["style","node","expanded","show-checkbox","checked","indeterminate","item-size","disabled","current","hidden-expand-icon","onClick","onToggle","onCheck","onDrop"]))]),_:1},8,["class-name","data","total","height","item-size","perf-mode"])):(R(),G("div",{key:1,class:j(p(s).e("empty-block"))},[J("span",{class:j(p(s).e("empty-text"))},je((ke=oe.emptyText)!=null?ke:p(a)("el.tree.emptyText")),3)],2))],2)}}});var _Fe=Ge(bFe,[["__file","tree.vue"]]);const OFe=Vt(_Fe),$q=Symbol("uploadContextKey"),wFe="ElUpload";class SFe extends Error{constructor(e,n,r,i){super(e),this.name="UploadAjaxError",this.status=n,this.method=r,this.url=i}}function nB(t,e,n){let r;return n.response?r=`${n.response.error||n.response}`:n.responseText?r=`${n.responseText}`:r=`fail to ${e.method} ${t} ${n.status}`,new SFe(r,n.status,e.method,t)}function xFe(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const CFe=t=>{typeof XMLHttpRequest=="undefined"&&Hi(wFe,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const a=o;a.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(a)});const r=new FormData;if(t.data)for(const[o,a]of Object.entries(t.data))ut(a)&&a.length?r.append(o,...a):r.append(o,a);r.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(nB(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(nB(n,t,e));t.onSuccess(xFe(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};if(i instanceof Headers)i.forEach((o,a)=>e.setRequestHeader(a,o));else for(const[o,a]of Object.entries(i))Dr(a)||e.setRequestHeader(o,String(a));return e.send(r),e},Nq=["text","picture","picture-card"];let EFe=1;const mP=()=>Date.now()+EFe++,Dq=Ye({action:{type:String,default:"#"},headers:{type:Oe(Object)},method:{type:String,default:"post"},data:{type:Oe([Object,Function,Promise]),default:()=>Jr({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Oe(Array),default:()=>Jr([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:Nq,default:"text"},httpRequest:{type:Oe(Function),default:CFe},disabled:Boolean,limit:Number}),TFe=Ye({...Dq,beforeUpload:{type:Oe(Function),default:yr},beforeRemove:{type:Oe(Function)},onRemove:{type:Oe(Function),default:yr},onChange:{type:Oe(Function),default:yr},onPreview:{type:Oe(Function),default:yr},onSuccess:{type:Oe(Function),default:yr},onProgress:{type:Oe(Function),default:yr},onError:{type:Oe(Function),default:yr},onExceed:{type:Oe(Function),default:yr},crossorigin:{type:Oe(String)}}),kFe=Ye({files:{type:Oe(Array),default:()=>Jr([])},disabled:{type:Boolean,default:!1},handlePreview:{type:Oe(Function),default:yr},listType:{type:String,values:Nq,default:"text"},crossorigin:{type:Oe(String)}}),PFe={remove:t=>!!t},AFe=ue({name:"ElUploadList"}),MFe=ue({...AFe,props:kFe,emits:PFe,setup(t,{emit:e}){const n=t,{t:r}=kn(),i=Qe("upload"),o=Qe("icon"),a=Qe("list"),s=la(),l=F(!1),u=M(()=>[i.b("list"),i.bm("list",n.listType),i.is("disabled",n.disabled)]),c=d=>{e("remove",d)};return(d,f)=>(R(),we(Kz,{tag:"ul",class:j(p(u)),name:p(a).b()},{default:z(()=>[(R(!0),G(ct,null,Wt(d.files,(h,m)=>(R(),G("li",{key:h.uid||h.name,class:j([p(i).be("list","item"),p(i).is(h.status),{focusing:l.value}]),tabindex:"0",onKeydown:br(g=>!p(s)&&c(h),["delete"]),onFocus:g=>l.value=!0,onBlur:g=>l.value=!1,onClick:g=>l.value=!1},[xe(d.$slots,"default",{file:h,index:m},()=>[d.listType==="picture"||h.status!=="uploading"&&d.listType==="picture-card"?(R(),G("img",{key:0,class:j(p(i).be("list","item-thumbnail")),src:h.url,crossorigin:d.crossorigin,alt:""},null,10,["src","crossorigin"])):_e("v-if",!0),h.status==="uploading"||d.listType!=="picture-card"?(R(),G("div",{key:1,class:j(p(i).be("list","item-info"))},[J("a",{class:j(p(i).be("list","item-name")),onClick:Pt(g=>d.handlePreview(h),["prevent"])},[B(p(gt),{class:j(p(o).m("document"))},{default:z(()=>[B(p(aCe))]),_:1},8,["class"]),J("span",{class:j(p(i).be("list","item-file-name")),title:h.name},je(h.name),11,["title"])],10,["onClick"]),h.status==="uploading"?(R(),we(p(EU),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(h.percentage),style:mt(d.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):_e("v-if",!0)],2)):_e("v-if",!0),J("label",{class:j(p(i).be("list","item-status-label"))},[d.listType==="text"?(R(),we(p(gt),{key:0,class:j([p(o).m("upload-success"),p(o).m("circle-check")])},{default:z(()=>[B(p(a$))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(R(),we(p(gt),{key:1,class:j([p(o).m("upload-success"),p(o).m("check")])},{default:z(()=>[B(p(Sb))]),_:1},8,["class"])):_e("v-if",!0)],2),p(s)?_e("v-if",!0):(R(),we(p(gt),{key:2,class:j(p(o).m("close")),onClick:g=>c(h)},{default:z(()=>[B(p(_a))]),_:2},1032,["class","onClick"])),_e(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),_e(" This is a bug which needs to be fixed "),_e(" TODO: Fix the incorrect navigation interaction "),p(s)?_e("v-if",!0):(R(),G("i",{key:3,class:j(p(o).m("close-tip"))},je(p(r)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(R(),G("span",{key:4,class:j(p(i).be("list","item-actions"))},[J("span",{class:j(p(i).be("list","item-preview")),onClick:g=>d.handlePreview(h)},[B(p(gt),{class:j(p(o).m("zoom-in"))},{default:z(()=>[B(p(zQ))]),_:1},8,["class"])],10,["onClick"]),p(s)?_e("v-if",!0):(R(),G("span",{key:0,class:j(p(i).be("list","item-delete")),onClick:g=>c(h)},[B(p(gt),{class:j(p(o).m("delete"))},{default:z(()=>[B(p(l$))]),_:1},8,["class"])],10,["onClick"]))],2)):_e("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),xe(d.$slots,"append")]),_:3},8,["class","name"]))}});var rB=Ge(MFe,[["__file","upload-list.vue"]]);const RFe=Ye({disabled:{type:Boolean,default:!1}}),$Fe={file:t=>ut(t)},Lq="ElUploadDrag",NFe=ue({name:Lq}),DFe=ue({...NFe,props:RFe,emits:$Fe,setup(t,{emit:e}){ht($q)||Hi(Lq,"usage: ");const r=Qe("upload"),i=F(!1),o=la(),a=l=>{if(o.value)return;i.value=!1,l.stopPropagation();const u=Array.from(l.dataTransfer.files);e("file",u)},s=()=>{o.value||(i.value=!0)};return(l,u)=>(R(),G("div",{class:j([p(r).b("dragger"),p(r).is("dragover",i.value)]),onDrop:Pt(a,["prevent"]),onDragover:Pt(s,["prevent"]),onDragleave:Pt(c=>i.value=!1,["prevent"])},[xe(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var LFe=Ge(DFe,[["__file","upload-dragger.vue"]]);const IFe=Ye({...Dq,beforeUpload:{type:Oe(Function),default:yr},onRemove:{type:Oe(Function),default:yr},onStart:{type:Oe(Function),default:yr},onSuccess:{type:Oe(Function),default:yr},onProgress:{type:Oe(Function),default:yr},onError:{type:Oe(Function),default:yr},onExceed:{type:Oe(Function),default:yr}}),BFe=ue({name:"ElUploadContent",inheritAttrs:!1}),FFe=ue({...BFe,props:IFe,setup(t,{expose:e}){const n=t,r=Qe("upload"),i=la(),o=Tr({}),a=Tr(),s=g=>{if(g.length===0)return;const{autoUpload:y,limit:b,fileList:w,multiple:O,onStart:S,onExceed:x}=n;if(b&&w.length+g.length>b){x(g,w);return}O||(g=g.slice(0,1));for(const C of g){const E=C;E.uid=mP(),S(E),y&&l(E)}},l=async g=>{if(a.value.value="",!n.beforeUpload)return c(g);let y,b={};try{const O=n.data,S=n.beforeUpload(g);b=tw(n.data)?Fn(n.data):n.data,y=await S,tw(n.data)&&so(O,b)&&(b=Fn(n.data))}catch{y=!1}if(y===!1){n.onRemove(g);return}let w=g;y instanceof Blob&&(y instanceof File?w=y:w=new File([y],g.name,{type:g.type})),c(Object.assign(w,{uid:g.uid}),b)},u=async(g,y)=>$t(g)?g(y):g,c=async(g,y)=>{const{headers:b,data:w,method:O,withCredentials:S,name:x,action:C,onProgress:E,onSuccess:T,onError:P,httpRequest:A}=n;try{y=await u(y!=null?y:w,g)}catch{n.onRemove(g);return}const{uid:D}=g,N={headers:b||{},withCredentials:S,file:g,data:y,method:O,filename:x,action:C,onProgress:W=>{E(W,g)},onSuccess:W=>{T(W,g),delete o.value[D]},onError:W=>{P(W,g),delete o.value[D]}},$=A(N);o.value[D]=$,$ instanceof Promise&&$.then(N.onSuccess,N.onError)},d=g=>{const y=g.target.files;!y||s(Array.from(y))},f=()=>{i.value||(a.value.value="",a.value.click())},h=()=>{f()};return e({abort:g=>{Rxe(o.value).filter(g?([b])=>String(g.uid)===b:()=>!0).forEach(([b,w])=>{w instanceof XMLHttpRequest&&w.abort(),delete o.value[b]})},upload:l}),(g,y)=>(R(),G("div",{class:j([p(r).b(),p(r).m(g.listType),p(r).is("drag",g.drag),p(r).is("disabled",p(i))]),tabindex:p(i)?"-1":"0",onClick:f,onKeydown:br(Pt(h,["self"]),["enter","space"])},[g.drag?(R(),we(LFe,{key:0,disabled:p(i),onFile:s},{default:z(()=>[xe(g.$slots,"default")]),_:3},8,["disabled"])):xe(g.$slots,"default",{key:1}),J("input",{ref_key:"inputRef",ref:a,class:j(p(r).e("input")),name:g.name,disabled:p(i),multiple:g.multiple,accept:g.accept,type:"file",onChange:d,onClick:Pt(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var iB=Ge(FFe,[["__file","upload-content.vue"]]);const oB="ElUpload",aB=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},VFe=(t,e)=>{const n=u7(t,"fileList",void 0,{passive:!0}),r=h=>n.value.find(m=>m.uid===h.uid);function i(h){var m;(m=e.value)==null||m.abort(h)}function o(h=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!h.includes(m.status))}function a(h){n.value=n.value.filter(m=>m!==h)}const s=(h,m)=>{const g=r(m);!g||(console.error(h),g.status="fail",a(g),t.onError(h,g,n.value),t.onChange(g,n.value))},l=(h,m)=>{const g=r(m);!g||(t.onProgress(h,g,n.value),g.status="uploading",g.percentage=Math.round(h.percent))},u=(h,m)=>{const g=r(m);!g||(g.status="success",g.response=h,t.onSuccess(h,g,n.value),t.onChange(g,n.value))},c=h=>{Dr(h.uid)&&(h.uid=mP());const m={name:h.name,percentage:0,status:"ready",size:h.size,raw:h,uid:h.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(h)}catch(g){g.message,t.onError(g,m,n.value)}n.value=[...n.value,m],t.onChange(m,n.value)},d=async h=>{const m=h instanceof File?r(h):h;m||Hi(oB,"file to be removed not found");const g=y=>{i(y),a(y),t.onRemove(y,n.value),aB(y)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&g(m):g(m)};function f(){n.value.filter(({status:h})=>h==="ready").forEach(({raw:h})=>{var m;return h&&((m=e.value)==null?void 0:m.upload(h))})}return Ve(()=>t.listType,h=>{h!=="picture-card"&&h!=="picture"||(n.value=n.value.map(m=>{const{raw:g,url:y}=m;if(!y&&g)try{m.url=URL.createObjectURL(g)}catch(b){t.onError(b,m,n.value)}return m}))}),Ve(n,h=>{for(const m of h)m.uid||(m.uid=mP()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:o,handleError:s,handleProgress:l,handleStart:c,handleSuccess:u,handleRemove:d,submit:f,revokeFileObjectURL:aB}},jFe=ue({name:"ElUpload"}),zFe=ue({...jFe,props:TFe,setup(t,{expose:e}){const n=t,r=la(),i=Tr(),{abort:o,submit:a,clearFiles:s,uploadFiles:l,handleStart:u,handleError:c,handleRemove:d,handleSuccess:f,handleProgress:h,revokeFileObjectURL:m}=VFe(n,i),g=M(()=>n.listType==="picture-card"),y=M(()=>({...n,fileList:l.value,onStart:u,onProgress:h,onSuccess:f,onError:c,onRemove:d}));return pr(()=>{l.value.forEach(m)}),_n($q,{accept:er(n,"accept")}),e({abort:o,submit:a,clearFiles:s,handleStart:u,handleRemove:d}),(b,w)=>(R(),G("div",null,[p(g)&&b.showFileList?(R(),we(rB,{key:0,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ts({append:z(()=>[B(iB,gn({ref_key:"uploadRef",ref:i},p(y)),{default:z(()=>[b.$slots.trigger?xe(b.$slots,"trigger",{key:0}):_e("v-if",!0),!b.$slots.trigger&&b.$slots.default?xe(b.$slots,"default",{key:1}):_e("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:z(({file:O,index:S})=>[xe(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):_e("v-if",!0),!p(g)||p(g)&&!b.showFileList?(R(),we(iB,gn({key:1,ref_key:"uploadRef",ref:i},p(y)),{default:z(()=>[b.$slots.trigger?xe(b.$slots,"trigger",{key:0}):_e("v-if",!0),!b.$slots.trigger&&b.$slots.default?xe(b.$slots,"default",{key:1}):_e("v-if",!0)]),_:3},16)):_e("v-if",!0),b.$slots.trigger?xe(b.$slots,"default",{key:2}):_e("v-if",!0),xe(b.$slots,"tip"),!p(g)&&b.showFileList?(R(),we(rB,{key:3,disabled:p(r),"list-type":b.listType,files:p(l),crossorigin:b.crossorigin,"handle-preview":b.onPreview,onRemove:p(d)},ts({_:2},[b.$slots.file?{name:"default",fn:z(({file:O,index:S})=>[xe(b.$slots,"file",{file:O,index:S})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):_e("v-if",!0)]))}});var QFe=Ge(zFe,[["__file","upload.vue"]]);const Iq=Vt(QFe),HFe=Ye({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:Oe([String,Array]),default:"Element Plus"},font:{type:Oe(Object)},gap:{type:Oe(Array),default:()=>[100,100]},offset:{type:Oe(Array)}});function WFe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function UFe(t){return Object.keys(t).map(e=>`${WFe(e)}: ${t[e]};`).join(" ")}function qFe(){return window.devicePixelRatio||1}const YFe=(t,e)=>{let n=!1;return t.removedNodes.length&&e&&(n=Array.from(t.removedNodes).includes(e)),t.type==="attributes"&&t.target===e&&(n=!0),n},Bq=3;function FT(t,e,n=1){const r=document.createElement("canvas"),i=r.getContext("2d"),o=t*n,a=e*n;return r.setAttribute("width",`${o}px`),r.setAttribute("height",`${a}px`),i.save(),[i,r,o,a]}function XFe(){function t(e,n,r,i,o,a,s,l){const[u,c,d,f]=FT(i,o,r);if(e instanceof HTMLImageElement)u.drawImage(e,0,0,d,f);else{const{color:K,fontSize:ie,fontStyle:oe,fontWeight:Se,fontFamily:ke,textAlign:Y,textBaseline:re}=a,te=Number(ie)*r;u.font=`${oe} normal ${Se} ${te}px/${o}px ${ke}`,u.fillStyle=K,u.textAlign=Y,u.textBaseline=re;const ge=Array.isArray(e)?e:[e];ge==null||ge.forEach((Re,$e)=>{u.fillText(Re!=null?Re:"",d/2,$e*(te+Bq*r))})}const h=Math.PI/180*Number(n),m=Math.max(i,o),[g,y,b]=FT(m,m,r);g.translate(b/2,b/2),g.rotate(h),d>0&&f>0&&g.drawImage(c,-d/2,-f/2);function w(K,ie){const oe=K*Math.cos(h)-ie*Math.sin(h),Se=K*Math.sin(h)+ie*Math.cos(h);return[oe,Se]}let O=0,S=0,x=0,C=0;const E=d/2,T=f/2;[[0-E,0-T],[0+E,0-T],[0+E,0+T],[0-E,0+T]].forEach(([K,ie])=>{const[oe,Se]=w(K,ie);O=Math.min(O,oe),S=Math.max(S,oe),x=Math.min(x,Se),C=Math.max(C,Se)});const A=O+b/2,D=x+b/2,N=S-O,$=C-x,W=s*r,L=l*r,I=(N+W)*2,U=$+L,[Q,V]=FT(I,U);function q(K=0,ie=0){Q.drawImage(y,A,D,N,$,K,ie,N,$)}return q(),q(N+W,-$/2-L/2),q(N+W,+$/2+L/2),[V.toDataURL(),I/r,U/r]}return t}const ZFe=ue({name:"ElWatermark"}),GFe=ue({...ZFe,props:HFe,setup(t){const e=t,n={position:"relative"},r=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.color)!=null?D:"rgba(0,0,0,.15)"}),i=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontSize)!=null?D:16}),o=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontWeight)!=null?D:"normal"}),a=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontStyle)!=null?D:"normal"}),s=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.fontFamily)!=null?D:"sans-serif"}),l=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textAlign)!=null?D:"center"}),u=M(()=>{var A,D;return(D=(A=e.font)==null?void 0:A.textBaseline)!=null?D:"hanging"}),c=M(()=>e.gap[0]),d=M(()=>e.gap[1]),f=M(()=>c.value/2),h=M(()=>d.value/2),m=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[0])!=null?D:f.value}),g=M(()=>{var A,D;return(D=(A=e.offset)==null?void 0:A[1])!=null?D:h.value}),y=()=>{const A={zIndex:e.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let D=m.value-f.value,N=g.value-h.value;return D>0&&(A.left=`${D}px`,A.width=`calc(100% - ${D}px)`,D=0),N>0&&(A.top=`${N}px`,A.height=`calc(100% - ${N}px)`,N=0),A.backgroundPosition=`${D}px ${N}px`,A},b=Tr(null),w=Tr(),O=F(!1),S=()=>{w.value&&(w.value.remove(),w.value=void 0)},x=(A,D)=>{var N;b.value&&w.value&&(O.value=!0,w.value.setAttribute("style",UFe({...y(),backgroundImage:`url('${A}')`,backgroundSize:`${Math.floor(D)}px`})),(N=b.value)==null||N.append(w.value),setTimeout(()=>{O.value=!1}))},C=A=>{let D=120,N=64;const $=e.image,W=e.content,L=e.width,I=e.height;if(!$&&A.measureText){A.font=`${Number(i.value)}px ${s.value}`;const U=Array.isArray(W)?W:[W],Q=U.map(V=>{const q=A.measureText(V);return[q.width,q.fontBoundingBoxAscent!==void 0?q.fontBoundingBoxAscent+q.fontBoundingBoxDescent:q.actualBoundingBoxAscent+q.actualBoundingBoxDescent]});D=Math.ceil(Math.max(...Q.map(V=>V[0]))),N=Math.ceil(Math.max(...Q.map(V=>V[1])))*U.length+(U.length-1)*Bq}return[L!=null?L:D,I!=null?I:N]},E=XFe(),T=()=>{const D=document.createElement("canvas").getContext("2d"),N=e.image,$=e.content,W=e.rotate;if(D){w.value||(w.value=document.createElement("div"));const L=qFe(),[I,U]=C(D),Q=V=>{const[q,K]=E(V||"",W,L,I,U,{color:r.value,fontSize:i.value,fontStyle:a.value,fontWeight:o.value,fontFamily:s.value,textAlign:l.value,textBaseline:u.value},c.value,d.value);x(q,K)};if(N){const V=new Image;V.onload=()=>{Q(V)},V.onerror=()=>{Q($)},V.crossOrigin="anonymous",V.referrerPolicy="no-referrer",V.src=N}else Q($)}};return Bt(()=>{T()}),Ve(()=>e,()=>{T()},{deep:!0,flush:"post"}),pr(()=>{S()}),l7(b,A=>{O.value||A.forEach(D=>{YFe(D,w.value)&&(S(),T())})},{attributes:!0,subtree:!0,childList:!0}),(A,D)=>(R(),G("div",{ref_key:"containerRef",ref:b,style:mt([n])},[xe(A.$slots,"default")],4))}});var KFe=Ge(GFe,[["__file","watermark.vue"]]);const JFe=Vt(KFe),eVe=Ye({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:Oe(Object)},targetAreaClickable:{type:Boolean,default:!0}}),tVe=(t,e,n,r,i)=>{const o=F(null),a=()=>{let d;return At(t.value)?d=document.querySelector(t.value):$t(t.value)?d=t.value():d=t.value,d},s=()=>{const d=a();if(!d||!e.value){o.value=null;return}!nVe(d)&&e.value&&d.scrollIntoView(i.value);const{left:f,top:h,width:m,height:g}=d.getBoundingClientRect();o.value={left:f,top:h,width:m,height:g,radius:0}};Bt(()=>{Ve([e,t],()=>{s()},{immediate:!0}),window.addEventListener("resize",s)}),pr(()=>{window.removeEventListener("resize",s)});const l=d=>{var f;return(f=ut(n.value.offset)?n.value.offset[d]:n.value.offset)!=null?f:6},u=M(()=>{var d;if(!o.value)return o.value;const f=l(0),h=l(1),m=((d=n.value)==null?void 0:d.radius)||2;return{left:o.value.left-f,top:o.value.top-h,width:o.value.width+f*2,height:o.value.height+h*2,radius:m}}),c=M(()=>{const d=a();return!r.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var f,h,m,g;return window.DOMRect.fromRect({width:((f=u.value)==null?void 0:f.width)||0,height:((h=u.value)==null?void 0:h.height)||0,x:((m=u.value)==null?void 0:m.left)||0,y:((g=u.value)==null?void 0:g.top)||0})}}});return{mergedPosInfo:u,triggerTarget:c}},aC=Symbol("ElTour");function nVe(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:r,right:i,bottom:o,left:a}=t.getBoundingClientRect();return r>=0&&a>=0&&i<=e&&o<=n}const rVe=(t,e,n,r,i,o,a,s)=>{const l=F(),u=F(),c=F({}),d={x:l,y:u,placement:r,strategy:i,middlewareData:c},f=M(()=>{const b=[bH(p(o)),a2e(),o2e(),iVe()];return p(s)&&p(n)&&b.push(_H({element:p(n)})),b}),h=async()=>{if(!Tn)return;const b=p(t),w=p(e);if(!b||!w)return;const O=await OH(b,w,{placement:p(r),strategy:p(i),middleware:p(f)});Yg(d).forEach(S=>{d[S].value=O[S]})},m=M(()=>{if(!p(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:p(a)};const{overflow:b}=p(c);return{position:p(i),zIndex:p(a),top:p(u)!=null?`${p(u)}px`:"",left:p(l)!=null?`${p(l)}px`:"",maxWidth:b!=null&&b.maxWidth?`${b==null?void 0:b.maxWidth}px`:""}}),g=M(()=>{if(!p(s))return{};const{arrow:b}=p(c);return{left:(b==null?void 0:b.x)!=null?`${b==null?void 0:b.x}px`:"",top:(b==null?void 0:b.y)!=null?`${b==null?void 0:b.y}px`:""}});let y;return Bt(()=>{const b=p(t),w=p(e);b&&w&&(y=r2e(b,w,h)),Bo(()=>{h()})}),pr(()=>{y&&y()}),{update:h,contentStyle:m,arrowStyle:g}},iVe=()=>({name:"overflow",async fn(t){const e=await i2e(t);let n=0;return e.left>0&&(n=e.left),e.right>0&&(n=e.right),{data:{maxWidth:t.rects.floating.width-n}}}}),oVe=ue({name:"ElTourMask",inheritAttrs:!1}),aVe=ue({...oVe,props:eVe,setup(t){const e=t,{ns:n}=ht(aC),r=M(()=>{var s,l;return(l=(s=e.pos)==null?void 0:s.radius)!=null?l:2}),i=M(()=>{const s=r.value,l=`a${s},${s} 0 0 1`;return{topRight:`${l} ${s},${s}`,bottomRight:`${l} ${-s},${s}`,bottomLeft:`${l} ${-s},${-s}`,topLeft:`${l} ${s},${-s}`}}),o=M(()=>{const s=window.innerWidth,l=window.innerHeight,u=i.value,c=`M${s},0 L0,0 L0,${l} L${s},${l} L${s},0 Z`,d=r.value;return e.pos?`${c} M${e.pos.left+d},${e.pos.top} h${e.pos.width-d*2} ${u.topRight} v${e.pos.height-d*2} ${u.bottomRight} h${-e.pos.width+d*2} ${u.bottomLeft} v${-e.pos.height+d*2} ${u.topLeft} z`:c}),a=M(()=>({fill:e.fill,pointerEvents:"auto",cursor:"auto"}));return v$(er(e,"visible"),{ns:n}),(s,l)=>s.visible?(R(),G("div",gn({key:0,class:p(n).e("mask"),style:{position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:s.zIndex,pointerEvents:s.pos&&s.targetAreaClickable?"none":"auto"}},s.$attrs),[(R(),G("svg",{style:{width:"100%",height:"100%"}},[J("path",{class:j(p(n).e("hollow")),style:mt(p(a)),d:p(o)},null,14,["d"])]))],16)):_e("v-if",!0)}});var sVe=Ge(aVe,[["__file","mask.vue"]]);const lVe=["absolute","fixed"],uVe=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],CN=Ye({placement:{type:Oe(String),values:uVe,default:"bottom"},reference:{type:Oe(Object),default:null},strategy:{type:Oe(String),values:lVe,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),cVe={close:()=>!0},dVe=ue({name:"ElTourContent"}),fVe=ue({...dVe,props:CN,emits:cVe,setup(t,{emit:e}){const n=t,r=F(n.placement),i=F(n.strategy),o=F(null),a=F(null);Ve(()=>n.placement,()=>{r.value=n.placement});const{contentStyle:s,arrowStyle:l}=rVe(er(n,"reference"),o,a,r,i,er(n,"offset"),er(n,"zIndex"),er(n,"showArrow")),u=M(()=>r.value.split("-")[0]),{ns:c}=ht(aC),d=()=>{e("close")},f=h=>{h.detail.focusReason==="pointer"&&h.preventDefault()};return(h,m)=>(R(),G("div",{ref_key:"contentRef",ref:o,style:mt(p(s)),class:j(p(c).e("content")),"data-side":p(u),tabindex:"-1"},[B(p(Mb),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":o.value||void 0,onReleaseRequested:d,onFocusoutPrevented:f},{default:z(()=>[xe(h.$slots,"default")]),_:3},8,["focus-trap-el"]),h.showArrow?(R(),G("span",{key:0,ref_key:"arrowRef",ref:a,style:mt(p(l)),class:j(p(c).e("arrow"))},null,6)):_e("v-if",!0)],14,["data-side"]))}});var hVe=Ge(fVe,[["__file","content.vue"]]),pVe=ue({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:e,emit:n}){let r=0;return()=>{var i,o;const a=(i=e.default)==null?void 0:i.call(e),s=[];let l=0;function u(c){!ut(c)||c.forEach(d=>{var f;((f=(d==null?void 0:d.type)||{})==null?void 0:f.name)==="ElTourStep"&&(s.push(d),l+=1)})}return a.length&&u(Kd((o=a[0])==null?void 0:o.children)),r!==l&&(r=l,n("update-total",l)),s.length?s[t.current]:null}}});const gVe=Ye({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:fr},placement:CN.placement,contentStyle:{type:Oe([Object])},mask:{type:Oe([Boolean,Object]),default:!0},gap:{type:Oe(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:Oe([Boolean,Object]),default:()=>({block:"center"})},type:{type:Oe(String)},appendTo:{type:Oe([String,Object]),default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),mVe={[Zt]:t=>si(t),["update:current"]:t=>kt(t),close:t=>kt(t),finish:()=>!0,change:t=>kt(t)},vVe=ue({name:"ElTour"}),yVe=ue({...vVe,props:gVe,emits:mVe,setup(t,{emit:e}){const n=t,r=Qe("tour"),i=F(0),o=F(),a=u7(n,"current",e,{passive:!0}),s=M(()=>{var P;return(P=o.value)==null?void 0:P.target}),l=M(()=>[r.b(),y.value==="primary"?r.m("primary"):""]),u=M(()=>{var P;return((P=o.value)==null?void 0:P.placement)||n.placement}),c=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.contentStyle)!=null?A:n.contentStyle}),d=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.mask)!=null?A:n.mask}),f=M(()=>!!d.value&&n.modelValue),h=M(()=>si(d.value)?void 0:d.value),m=M(()=>{var P,A;return!!s.value&&((A=(P=o.value)==null?void 0:P.showArrow)!=null?A:n.showArrow)}),g=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.scrollIntoViewOptions)!=null?A:n.scrollIntoViewOptions}),y=M(()=>{var P,A;return(A=(P=o.value)==null?void 0:P.type)!=null?A:n.type}),{nextZIndex:b}=Qm(),w=b(),O=M(()=>{var P;return(P=n.zIndex)!=null?P:w}),{mergedPosInfo:S,triggerTarget:x}=tVe(s,er(n,"modelValue"),er(n,"gap"),d,g);Ve(()=>n.modelValue,P=>{P||(a.value=0)});const C=()=>{n.closeOnPressEscape&&(e("update:modelValue",!1),e("close",a.value))},E=P=>{i.value=P},T=Ji();return _n(aC,{currentStep:o,current:a,total:i,showClose:er(n,"showClose"),closeIcon:er(n,"closeIcon"),mergedType:y,ns:r,slots:T,updateModelValue(P){e("update:modelValue",P)},onClose(){e("close",a.value)},onFinish(){e("finish")},onChange(){e("change",a.value)}}),(P,A)=>(R(),G(ct,null,[B(p(Um),{to:P.appendTo},{default:z(()=>{var D,N;return[J("div",gn({class:p(l)},P.$attrs),[B(sVe,{visible:p(f),fill:(D=p(h))==null?void 0:D.color,style:mt((N=p(h))==null?void 0:N.style),pos:p(S),"z-index":p(O),"target-area-clickable":P.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),P.modelValue?(R(),we(hVe,{key:p(a),reference:p(x),placement:p(u),"show-arrow":p(m),"z-index":p(O),style:mt(p(c)),onClose:C},{default:z(()=>[B(p(pVe),{current:p(a),onUpdateTotal:E},{default:z(()=>[xe(P.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):_e("v-if",!0)],16)]}),_:3},8,["to"]),_e(" just for IDE "),_e("v-if",!0)],64))}});var bVe=Ge(yVe,[["__file","tour.vue"]]);const _Ve=Ye({target:{type:Oe([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:fr},showArrow:{type:Boolean,default:void 0},placement:CN.placement,mask:{type:Oe([Boolean,Object]),default:void 0},contentStyle:{type:Oe([Object])},prevButtonProps:{type:Oe(Object)},nextButtonProps:{type:Oe(Object)},scrollIntoViewOptions:{type:Oe([Boolean,Object]),default:void 0},type:{type:Oe(String)}}),OVe={close:()=>!0},wVe=ue({name:"ElTourStep"}),SVe=ue({...wVe,props:_Ve,emits:OVe,setup(t,{emit:e}){const n=t,{Close:r}=f$,{t:i}=kn(),{currentStep:o,current:a,total:s,showClose:l,closeIcon:u,mergedType:c,ns:d,slots:f,updateModelValue:h,onClose:m,onFinish:g,onChange:y}=ht(aC);Ve(n,T=>{o.value=T},{immediate:!0});const b=M(()=>{var T;return(T=n.showClose)!=null?T:l.value}),w=M(()=>{var T,P;return(P=(T=n.closeIcon)!=null?T:u.value)!=null?P:r}),O=T=>{if(!!T)return oQ(T,["children","onClick"])},S=()=>{var T,P;a.value-=1,(T=n.prevButtonProps)!=null&&T.onClick&&((P=n.prevButtonProps)==null||P.onClick()),y()},x=()=>{var T;a.value>=s.value-1?C():a.value+=1,(T=n.nextButtonProps)!=null&&T.onClick&&n.nextButtonProps.onClick(),y()},C=()=>{E(),g()},E=()=>{h(!1),m(),e("close")};return(T,P)=>(R(),G(ct,null,[p(b)?(R(),G("button",{key:0,"aria-label":"Close",class:j(p(d).e("closebtn")),type:"button",onClick:E},[B(p(gt),{class:j(p(d).e("close"))},{default:z(()=>[(R(),we(un(p(w))))]),_:1},8,["class"])],2)):_e("v-if",!0),J("header",{class:j([p(d).e("header"),{"show-close":p(l)}])},[xe(T.$slots,"header",{},()=>[J("span",{role:"heading",class:j(p(d).e("title"))},je(T.title),3)])],2),J("div",{class:j(p(d).e("body"))},[xe(T.$slots,"default",{},()=>[J("span",null,je(T.description),1)])],2),J("footer",{class:j(p(d).e("footer"))},[J("div",{class:j(p(d).b("indicators"))},[p(f).indicators?(R(),we(un(p(f).indicators),{key:0,current:p(a),total:p(s)},null,8,["current","total"])):(R(!0),G(ct,{key:1},Wt(p(s),(A,D)=>(R(),G("span",{key:A,class:j([p(d).b("indicator"),D===p(a)?"is-active":""])},null,2))),128))],2),J("div",{class:j(p(d).b("buttons"))},[p(a)>0?(R(),we(p(lr),gn({key:0,size:"small",type:p(c)},O(T.prevButtonProps),{onClick:S}),{default:z(()=>{var A,D;return[qe(je((D=(A=T.prevButtonProps)==null?void 0:A.children)!=null?D:p(i)("el.tour.previous")),1)]}),_:1},16,["type"])):_e("v-if",!0),p(a)<=p(s)-1?(R(),we(p(lr),gn({key:1,size:"small",type:p(c)==="primary"?"default":"primary"},O(T.nextButtonProps),{onClick:x}),{default:z(()=>{var A,D;return[qe(je((D=(A=T.nextButtonProps)==null?void 0:A.children)!=null?D:p(a)===p(s)-1?p(i)("el.tour.finish"):p(i)("el.tour.next")),1)]}),_:1},16,["type"])):_e("v-if",!0)],2)],2)],64))}});var Fq=Ge(SVe,[["__file","step.vue"]]);const xVe=Vt(bVe,{TourStep:Fq}),CVe=ti(Fq),EVe=Ye({container:{type:Oe([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:Oe(String),default:"default"},direction:{type:Oe(String),default:"vertical"}}),TVe={change:t=>At(t),click:(t,e)=>t instanceof MouseEvent&&(At(e)||ai(e))},Vq=Symbol("anchor"),kVe=ue({name:"ElAnchor"}),PVe=ue({...kVe,props:EVe,emits:TVe,setup(t,{expose:e,emit:n}){const r=t,i=F(""),o=F(null),a=F(null),s=F(),l={};let u=!1,c=0;const d=Qe("anchor"),f=M(()=>[d.b(),r.type==="underline"?d.m("underline"):"",d.m(r.direction)]),h=T=>{l[T.href]=T.el},m=T=>{delete l[T]},g=T=>{i.value!==T&&(i.value=T,n("change",T))};let y=null;const b=T=>{if(!s.value)return;const P=K_(T);if(!P)return;y&&y(),u=!0;const A=v5(P,s.value),D=ok(P,A),N=A.scrollHeight-A.clientHeight,$=Math.min(D-r.offset,N);y=Dxe(s.value,c,$,r.duration,()=>{setTimeout(()=>{u=!1},20)})},w=T=>{T&&(g(T),b(T))},O=(T,P)=>{n("click",T,P),w(P)},S=rEe(()=>{s.value&&(c=y5(s.value));const T=x();u||ai(T)||g(T)}),x=()=>{if(!s.value)return;const T=y5(s.value),P=[];for(const A of Object.keys(l)){const D=K_(A);if(!D)continue;const N=v5(D,s.value),$=ok(D,N);P.push({top:$-r.offset-r.bound,href:A})}P.sort((A,D)=>A.top-D.top);for(let A=0;AT))return D.href}},C=()=>{const T=K_(r.container);!T||Dx(T)?s.value=window:s.value=T};sr(s,"scroll",S);const E=M(()=>{if(!o.value||!a.value||!i.value)return{};const T=l[i.value];if(!T)return{};const P=o.value.getBoundingClientRect(),A=a.value.getBoundingClientRect(),D=T.getBoundingClientRect();return r.direction==="horizontal"?{left:`${D.left-P.left}px`,width:`${D.width}px`,opacity:1}:{top:`${D.top-P.top+(D.height-A.height)/2}px`,opacity:1}});return Bt(()=>{C();const T=decodeURIComponent(window.location.hash);K_(T)?w(T):S()}),Ve(()=>r.container,()=>{C()}),_n(Vq,{ns:d,direction:r.direction,currentAnchor:i,addLink:h,removeLink:m,handleClick:O}),e({scrollTo:w}),(T,P)=>(R(),G("div",{ref_key:"anchorRef",ref:o,class:j(p(f))},[T.marker?(R(),G("div",{key:0,ref_key:"markerRef",ref:a,class:j(p(d).e("marker")),style:mt(p(E))},null,6)):_e("v-if",!0),J("div",{class:j(p(d).e("list"))},[xe(T.$slots,"default")],2)],2))}});var AVe=Ge(PVe,[["__file","anchor.vue"]]);const MVe=Ye({title:String,href:String}),RVe=ue({name:"ElAnchorLink"}),$Ve=ue({...RVe,props:MVe,setup(t){const e=t,n=F(null),{ns:r,direction:i,currentAnchor:o,addLink:a,removeLink:s,handleClick:l}=ht(Vq),u=M(()=>[r.e("link"),r.is("active",o.value===e.href)]),c=d=>{l(d,e.href)};return Ve(()=>e.href,(d,f)=>{Ot(()=>{f&&s(f),d&&a({href:d,el:n.value})})}),Bt(()=>{const{href:d}=e;d&&a({href:d,el:n.value})}),pr(()=>{const{href:d}=e;d&&s(d)}),(d,f)=>(R(),G("div",{class:j(p(r).e("item"))},[J("a",{ref_key:"linkRef",ref:n,class:j(p(u)),href:d.href,onClick:c},[xe(d.$slots,"default",{},()=>[qe(je(d.title),1)])],10,["href"]),d.$slots["sub-link"]&&p(i)==="vertical"?(R(),G("div",{key:0,class:j(p(r).e("list"))},[xe(d.$slots,"sub-link")],2)):_e("v-if",!0)],2))}});var jq=Ge($Ve,[["__file","anchor-link.vue"]]);const NVe=Vt(AVe,{AnchorLink:jq}),DVe=ti(jq),LVe=Ye({options:{type:Oe(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},block:Boolean,size:Wi,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...wo(["ariaLabel"])}),IVe={[Zt]:t=>At(t)||kt(t)||si(t),[Lr]:t=>At(t)||kt(t)||si(t)},BVe=ue({name:"ElSegmented"}),FVe=ue({...BVe,props:LVe,emits:IVe,setup(t,{emit:e}){const n=t,r=Qe("segmented"),i=bo(),o=Ni(),a=la(),{formItem:s}=ua(),{inputId:l,isLabeledByFormItem:u}=gu(n,{formItemContext:s}),c=F(null),d=Hue(),f=Sn({isInit:!1,width:0,translateX:0,focusVisible:!1}),h=P=>{const A=m(P);e(Zt,A),e(Lr,A)},m=P=>sn(P)?P.value:P,g=P=>sn(P)?P.label:P,y=P=>!!(a.value||(sn(P)?P.disabled:!1)),b=P=>n.modelValue===m(P),w=P=>n.options.find(A=>m(A)===P),O=P=>[r.e("item"),r.is("selected",b(P)),r.is("disabled",y(P))],S=()=>{if(!c.value)return;const P=c.value.querySelector(".is-selected"),A=c.value.querySelector(".is-selected input");if(!P||!A){f.width=0,f.translateX=0,f.focusVisible=!1;return}const D=P.getBoundingClientRect();f.isInit=!0,f.width=D.width,f.translateX=P.offsetLeft;try{f.focusVisible=A.matches(":focus-visible")}catch{}},x=M(()=>[r.b(),r.m(o.value),r.is("block",n.block)]),C=M(()=>({width:`${f.width}px`,transform:`translateX(${f.translateX}px)`,display:f.isInit?"block":"none"})),E=M(()=>[r.e("item-selected"),r.is("disabled",y(w(n.modelValue))),r.is("focus-visible",f.focusVisible)]),T=M(()=>n.name||i.value);return Zr(c,S),Ve(d,S),Ve(()=>n.modelValue,()=>{var P;S(),n.validateEvent&&((P=s==null?void 0:s.validate)==null||P.call(s,"change").catch(A=>void 0))},{flush:"post"}),(P,A)=>P.options.length?(R(),G("div",{key:0,id:p(l),ref_key:"segmentedRef",ref:c,class:j(p(x)),role:"radiogroup","aria-label":p(u)?void 0:P.ariaLabel||"segmented","aria-labelledby":p(u)?p(s).labelId:void 0},[J("div",{class:j(p(r).e("group"))},[J("div",{style:mt(p(C)),class:j(p(E))},null,6),(R(!0),G(ct,null,Wt(P.options,(D,N)=>(R(),G("label",{key:N,class:j(O(D))},[J("input",{class:j(p(r).e("item-input")),type:"radio",name:p(T),disabled:y(D),checked:b(D),onChange:$=>h(D)},null,42,["name","disabled","checked","onChange"]),J("div",{class:j(p(r).e("item-label"))},[xe(P.$slots,"default",{item:D},()=>[qe(je(g(D)),1)])],2)],2))),128))],2)],10,["id","aria-label","aria-labelledby"])):_e("v-if",!0)}});var VVe=Ge(FVe,[["__file","segmented.vue"]]);const jVe=Vt(VVe),zVe=(t,e)=>{const n=t.toLowerCase();return(e.label||e.value).toLowerCase().includes(n)},QVe=(t,e,n)=>{const{selectionEnd:r}=t;if(r===null)return;const i=t.value,o=$o(e);let a=-1,s;for(let l=r-1;l>=0;--l){const u=i[l];if(u===n||u===` `||u==="\r"){a=l;continue}if(o.includes(u)){const c=a===-1?r:a;s={pattern:i.slice(l+1,c),start:l+1,end:c,prefix:u,prefixIndex:l,splitIndex:a,selectionEnd:r};break}}return s},HVe=(t,e={debug:!1,useSelectionEnd:!1})=>{const n=t.selectionStart!==null?t.selectionStart:0,r=t.selectionEnd!==null?t.selectionEnd:0,i=e.useSelectionEnd?r:n,o=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"];if(e.debug){const f=document.querySelector("#input-textarea-caret-position-mirror-div");f!=null&&f.parentNode&&f.parentNode.removeChild(f)}const a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);const s=a.style,l=window.getComputedStyle(t),u=t.nodeName==="INPUT";s.whiteSpace=u?"nowrap":"pre-wrap",u||(s.wordWrap="break-word"),s.position="absolute",e.debug||(s.visibility="hidden"),o.forEach(f=>{if(u&&f==="lineHeight")if(l.boxSizing==="border-box"){const h=Number.parseInt(l.height),m=Number.parseInt(l.paddingTop)+Number.parseInt(l.paddingBottom)+Number.parseInt(l.borderTopWidth)+Number.parseInt(l.borderBottomWidth),g=m+Number.parseInt(l.lineHeight);h>g?s.lineHeight=`${h-m}px`:h===g?s.lineHeight=l.lineHeight:s.lineHeight="0"}else s.lineHeight=l.height;else s[f]=l[f]}),nR()?t.scrollHeight>Number.parseInt(l.height)&&(s.overflowY="scroll"):s.overflow="hidden",a.textContent=t.value.slice(0,Math.max(0,i)),u&&a.textContent&&(a.textContent=a.textContent.replace(/\s/g,"\xA0"));const c=document.createElement("span");c.textContent=t.value.slice(Math.max(0,i))||".",c.style.position="relative",c.style.left=`${-t.scrollLeft}px`,c.style.top=`${-t.scrollTop}px`,a.appendChild(c);const d={top:c.offsetTop+Number.parseInt(l.borderTopWidth),left:c.offsetLeft+Number.parseInt(l.borderLeftWidth),height:Number.parseInt(l.fontSize)*1.5};return e.debug?c.style.backgroundColor="#aaa":document.body.removeChild(a),d.left>=t.clientWidth&&(d.left=t.clientWidth),d},WVe=Ye({...L$,options:{type:Oe(Array),default:()=>[]},prefix:{type:Oe([String,Array]),default:"@",validator:t=>At(t)?t.length===1:t.every(e=>At(e)&&e.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:Oe([Boolean,Function]),default:()=>zVe,validator:t=>t===!1?!0:$t(t)},placement:{type:Oe(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:Oe(Function)},modelValue:String,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:Oe(Object),default:()=>({})}}),UVe={[Zt]:t=>At(t),search:(t,e)=>At(t)&&At(e),select:(t,e)=>At(t.value)&&At(e),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},qVe=Ye({options:{type:Oe(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),YVe={select:t=>At(t.value)},XVe=ue({name:"ElMentionDropdown"}),ZVe=ue({...XVe,props:qVe,emits:YVe,setup(t,{expose:e,emit:n}){const r=t,i=Qe("mention"),{t:o}=kn(),a=F(-1),s=F(),l=F(),u=F(),c=(O,S)=>[i.be("dropdown","item"),i.is("hovering",a.value===S),i.is("disabled",O.disabled||r.disabled)],d=O=>{O.disabled||r.disabled||n("select",O)},f=O=>{a.value=O},h=M(()=>r.disabled||r.options.every(O=>O.disabled)),m=M(()=>r.options[a.value]),g=()=>{!m.value||n("select",m.value)},y=O=>{const{options:S}=r;if(S.length===0||h.value)return;O==="next"?(a.value++,a.value===S.length&&(a.value=0)):O==="prev"&&(a.value--,a.value<0&&(a.value=S.length-1));const x=S[a.value];if(x.disabled){y(O);return}Ot(()=>b(x))},b=O=>{var S,x,C,E;const{options:T}=r,P=T.findIndex(D=>D.value===O.value),A=(S=l.value)==null?void 0:S[P];if(A){const D=(C=(x=u.value)==null?void 0:x.querySelector)==null?void 0:C.call(x,`.${i.be("dropdown","wrap")}`);D&&i$(D,A)}(E=s.value)==null||E.handleScroll()};return Ve(()=>r.options,()=>{h.value||r.options.length===0?a.value=-1:a.value=0},{immediate:!0}),e({hoveringIndex:a,navigateOptions:y,selectHoverOption:g,hoverOption:m}),(O,S)=>(R(),G("div",{ref_key:"dropdownRef",ref:u,class:j(p(i).b("dropdown"))},[O.$slots.header?(R(),G("div",{key:0,class:j(p(i).be("dropdown","header"))},[xe(O.$slots,"header")],2)):_e("v-if",!0),Ht(B(p(mu),{id:O.contentId,ref_key:"scrollbarRef",ref:s,tag:"ul","wrap-class":p(i).be("dropdown","wrap"),"view-class":p(i).be("dropdown","list"),role:"listbox","aria-label":O.ariaLabel,"aria-orientation":"vertical"},{default:z(()=>[(R(!0),G(ct,null,Wt(O.options,(x,C)=>(R(),G("li",{id:`${O.contentId}-${C}`,ref_for:!0,ref_key:"optionRefs",ref:l,key:x.value,class:j(c(x,C)),role:"option","aria-disabled":x.disabled||O.disabled||void 0,"aria-selected":a.value===C,onMouseenter:E=>f(C),onClick:Pt(E=>d(x),["stop"])},[xe(O.$slots,"label",{item:x,index:C},()=>{var E;return[J("span",null,je((E=x.label)!=null?E:x.value),1)]})],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"]))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[zn,O.options.length>0&&!O.loading]]),O.loading?(R(),G("div",{key:1,class:j(p(i).be("dropdown","loading"))},[xe(O.$slots,"loading",{},()=>[qe(je(p(o)("el.mention.loading")),1)])],2)):_e("v-if",!0),O.$slots.footer?(R(),G("div",{key:2,class:j(p(i).be("dropdown","footer"))},[xe(O.$slots,"footer")],2)):_e("v-if",!0)],2))}});var GVe=Ge(ZVe,[["__file","mention-dropdown.vue"]]);const KVe=ue({name:"ElMention",inheritAttrs:!1}),JVe=ue({...KVe,props:WVe,emits:UVe,setup(t,{expose:e,emit:n}){const r=t,i=M(()=>vo(r,Object.keys(L$))),o=Qe("mention"),a=la(),s=bo(),l=F(),u=F(),c=F(),d=F(!1),f=F(),h=F(),m=M(()=>r.showArrow?r.placement:`${r.placement}-start`),g=M(()=>r.showArrow?["bottom","top"]:["bottom-start","top-start"]),y=M(()=>{const{filterOption:N,options:$}=r;return!h.value||!N?$:$.filter(W=>N(h.value.pattern,W))}),b=M(()=>d.value&&(!!y.value.length||r.loading)),w=M(()=>{var N;return`${s.value}-${(N=c.value)==null?void 0:N.hoveringIndex}`}),O=N=>{n("update:modelValue",N),P()},S=N=>{var $,W,L,I;if("key"in N&&!(($=l.value)!=null&&$.isComposing)){if(["ArrowLeft","ArrowRight"].includes(N.key))P();else if(["ArrowUp","ArrowDown"].includes(N.key)){if(!d.value)return;N.preventDefault();const U=N.key==="ArrowUp"?"prev":"next";(W=c.value)==null||W.navigateOptions(U)}else if(["Enter"].includes(N.key)){if(!d.value)return;N.preventDefault(),(L=c.value)!=null&&L.hoverOption?(I=c.value)==null||I.selectHoverOption():d.value=!1}else if(["Escape"].includes(N.key)){if(!d.value)return;N.preventDefault(),d.value=!1}else if(["Backspace"].includes(N.key)&&r.whole&&h.value){const{splitIndex:U,selectionEnd:Q,pattern:V,prefixIndex:q,prefix:K}=h.value,ie=T();if(!ie)return;const oe=ie.value,Se=r.options.find(Y=>Y.value===V);if(($t(r.checkIsWhole)?r.checkIsWhole(V,K):Se)&&U!==-1&&U+1===Q){N.preventDefault();const Y=oe.slice(0,q)+oe.slice(U+1);n(Zt,Y);const re=q;Ot(()=>{ie.selectionStart=re,ie.selectionEnd=re,D()})}}}},{wrapperRef:x}=Pb(l,{beforeFocus(){return a.value},afterFocus(){P()},beforeBlur(N){var $;return($=u.value)==null?void 0:$.isFocusInsideContent(N)},afterBlur(){d.value=!1}}),C=()=>{P()},E=N=>{if(!h.value)return;const $=T();if(!$)return;const W=$.value,{split:L}=r,I=W.slice(h.value.end),U=I.startsWith(L),Q=`${N.value}${U?"":L}`,V=W.slice(0,h.value.start)+Q+I;n(Zt,V),n("select",N,h.value.prefix);const q=h.value.start+Q.length+(U?1:0);Ot(()=>{$.selectionStart=q,$.selectionEnd=q,$.focus(),D()})},T=()=>{var N,$;return r.type==="textarea"?(N=l.value)==null?void 0:N.textarea:($=l.value)==null?void 0:$.input},P=()=>{setTimeout(()=>{A(),D(),Ot(()=>{var N;return(N=u.value)==null?void 0:N.updatePopper()})},0)},A=()=>{const N=T();if(!N)return;const $=HVe(N),W=N.getBoundingClientRect(),L=l.value.$el.getBoundingClientRect();f.value={position:"absolute",width:0,height:`${$.height}px`,left:`${$.left+W.left-L.left}px`,top:`${$.top+W.top-L.top}px`}},D=()=>{const N=T();if(document.activeElement!==N){d.value=!1;return}const{prefix:$,split:W}=r;if(h.value=QVe(N,$,W),h.value&&h.value.splitIndex===-1){d.value=!0,n("search",h.value.pattern,h.value.prefix);return}d.value=!1};return e({input:l,tooltip:u,dropdownVisible:b}),(N,$)=>(R(),G("div",{ref_key:"wrapperRef",ref:x,class:j(p(o).b())},[B(p(hi),gn(gn(p(i),N.$attrs),{ref_key:"elInputRef",ref:l,"model-value":N.modelValue,disabled:p(a),role:p(b)?"combobox":void 0,"aria-activedescendant":p(b)?p(w)||"":void 0,"aria-controls":p(b)?p(s):void 0,"aria-expanded":p(b)||void 0,"aria-label":N.ariaLabel,"aria-autocomplete":p(b)?"none":void 0,"aria-haspopup":p(b)?"listbox":void 0,onInput:O,onKeydown:S,onMousedown:C}),ts({_:2},[Wt(N.$slots,(W,L)=>({name:L,fn:z(I=>[xe(N.$slots,L,Xl(lf(I)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),B(p(Ui),{ref_key:"tooltipRef",ref:u,visible:p(b),"popper-class":[p(o).e("popper"),N.popperClass],"popper-options":N.popperOptions,placement:p(m),"fallback-placements":p(g),effect:"light",pure:"",offset:N.offset,"show-arrow":N.showArrow},{default:z(()=>[J("div",{style:mt(f.value)},null,4)]),content:z(()=>{var W;return[B(GVe,{ref_key:"dropdownRef",ref:c,options:p(y),disabled:p(a),loading:N.loading,"content-id":p(s),"aria-label":N.ariaLabel,onSelect:E,onClick:Pt((W=l.value)==null?void 0:W.focus,["stop"])},ts({_:2},[Wt(N.$slots,(L,I)=>({name:I,fn:z(U=>[xe(N.$slots,I,Xl(lf(U)))])}))]),1032,["options","disabled","loading","content-id","aria-label","onClick"])]}),_:3},8,["visible","popper-class","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var eje=Ge(JVe,[["__file","mention.vue"]]);const tje=Vt(eje);var nje=[C2e,kH,KPe,EBe,iAe,dAe,QH,SAe,xAe,lr,ZH,$Me,BMe,ZMe,GMe,GRe,$W,r$e,Is,dRe,xW,ho,Zx,Gx,Xx,J$e,EH,dNe,fNe,hNe,pNe,gNe,tDe,KW,JW,Ma,oU,K$,bLe,_Le,OLe,pU,El,Tl,gt,mU,gU,hi,vU,XLe,gIe,mIe,vIe,yIe,xIe,eC,_3e,P3e,VH,EU,MW,xRe,SRe,F3e,H3e,fo,mu,Ol,Yc,XIe,P4e,I4e,B4e,d5e,m5e,WU,T5e,L5e,I5e,Xm,Rb,$b,CBe,wp,Sp,Bs,iC,pMe,XBe,e6e,t6e,Ui,E6e,F6e,T0,iFe,OFe,Iq,JFe,xVe,CVe,NVe,DVe,jVe,tje];const Js="ElInfiniteScroll",rje=50,ije=200,oje=0,aje={delay:{type:Number,default:ije},distance:{type:Number,default:oje},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},EN=(t,e)=>Object.entries(aje).reduce((n,[r,i])=>{var o,a;const{type:s,default:l}=i,u=t.getAttribute(`infinite-scroll-${r}`);let c=(a=(o=e[u])!=null?o:u)!=null?a:l;return c=c==="false"?!1:c,c=s(c),n[r]=Number.isNaN(c)?l:c,n},{}),zq=t=>{const{observer:e}=t[Js];e&&(e.disconnect(),delete t[Js].observer)},sje=(t,e)=>{const{container:n,containerEl:r,instance:i,observer:o,lastScrollTop:a}=t[Js],{disabled:s,distance:l}=EN(t,i),{clientHeight:u,scrollHeight:c,scrollTop:d}=r,f=d-a;if(t[Js].lastScrollTop=d,o||s||f<0)return;let h=!1;if(n===t)h=c-(u+d)<=l;else{const{clientTop:m,scrollHeight:g}=t,y=ok(t,r);h=d+u>=y+m+g-l}h&&e.call(i)};function VT(t,e){const{containerEl:n,instance:r}=t[Js],{disabled:i}=EN(t,r);i||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?e.call(r):zq(t))}const lje={async mounted(t,e){const{instance:n,value:r}=e;$t(r)||Hi(Js,"'v-infinite-scroll' binding value must be a function"),await Ot();const{delay:i,immediate:o}=EN(t,n),a=r$(t,!0),s=a===window?document.documentElement:a,l=Vc(sje.bind(null,t,r),i);if(!!a){if(t[Js]={instance:n,container:a,containerEl:s,delay:i,cb:r,onScroll:l,lastScrollTop:s.scrollTop},o){const u=new MutationObserver(Vc(VT.bind(null,t,r),rje));t[Js].observer=u,u.observe(t,{childList:!0,subtree:!0}),VT(t,r)}a.addEventListener("scroll",l)}},unmounted(t){if(!t[Js])return;const{container:e,onScroll:n}=t[Js];e==null||e.removeEventListener("scroll",n),zq(t)},async updated(t){if(!t[Js])await Ot();else{const{containerEl:e,cb:n,observer:r}=t[Js];e.clientHeight&&r&&VT(t,n)}}},vP=lje;vP.install=t=>{t.directive("InfiniteScroll",vP)};const uje=vP;function cje(t){let e;const n=F(!1),r=Sn({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(f){r.text=f}function o(){const f=r.parent,h=d.ns;if(!f.vLoadingAddClassList){let m=f.getAttribute("loading-number");m=Number.parseInt(m)-1,m?f.setAttribute("loading-number",m.toString()):(aa(f,h.bm("parent","relative")),f.removeAttribute("loading-number")),aa(f,h.bm("parent","hidden"))}a(),c.unmount()}function a(){var f,h;(h=(f=d.$el)==null?void 0:f.parentNode)==null||h.removeChild(d.$el)}function s(){var f;t.beforeClose&&!t.beforeClose()||(n.value=!0,clearTimeout(e),e=setTimeout(l,400),r.visible=!1,(f=t.closed)==null||f.call(t))}function l(){if(!n.value)return;const f=r.parent;n.value=!1,f.vLoadingAddClassList=void 0,o()}const u=ue({name:"ElLoading",setup(f,{expose:h}){const{ns:m,zIndex:g}=Ux("loading");return h({ns:m,zIndex:g}),()=>{const y=r.spinner||r.svg,b=Et("svg",{class:"circular",viewBox:r.svgViewBox?r.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[Et("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),w=r.text?Et("p",{class:m.b("text")},[r.text]):void 0;return Et(Qi,{name:m.b("fade"),onAfterLeave:l},{default:z(()=>[Ht(B("div",{style:{backgroundColor:r.background||""},class:[m.b("mask"),r.customClass,r.fullscreen?"is-fullscreen":""]},[Et("div",{class:m.b("spinner")},[b,w])]),[[zn,r.visible]])])})}}}),c=px(u),d=c.mount(document.createElement("div"));return{...Ri(r),setText:i,removeElLoadingChild:a,close:s,handleAfterLeave:l,vm:d,get $el(){return d.$el}}}let hO;const yP=function(t={}){if(!Tn)return;const e=dje(t);if(e.fullscreen&&hO)return hO;const n=cje({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(hO=void 0)}});fje(e,e.parent,n),sB(e,e.parent,n),e.parent.vLoadingAddClassList=()=>sB(e,e.parent,n);let r=e.parent.getAttribute("loading-number");return r?r=`${Number.parseInt(r)+1}`:r="1",e.parent.setAttribute("loading-number",r),e.parent.appendChild(n.$el),Ot(()=>n.visible.value=e.visible),e.fullscreen&&(hO=n),n},dje=t=>{var e,n,r,i;let o;return At(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:(r=t.lock)!=null?r:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,beforeClose:t.beforeClose,closed:t.closed,target:o}},fje=async(t,e,n)=>{const{nextZIndex:r}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=Id(document.body,"position"),n.originalOverflow.value=Id(document.body,"overflow"),i.zIndex=r();else if(t.parent===document.body){n.originalPosition.value=Id(document.body,"position"),await Ot();for(const o of["top","left"]){const a=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[a]+document.documentElement[a]-Number.parseInt(Id(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Id(e,"position");for(const[o,a]of Object.entries(i))n.$el.style[o]=a},sB=(t,e,n)=>{const r=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?aa(e,r.bm("parent","relative")):rl(e,r.bm("parent","relative")),t.fullscreen&&t.lock?rl(e,r.bm("parent","hidden")):aa(e,r.bm("parent","hidden"))},R1=Symbol("ElLoading"),lB=(t,e)=>{var n,r,i,o;const a=e.instance,s=f=>sn(e.value)?e.value[f]:void 0,l=f=>{const h=At(f)&&(a==null?void 0:a[f])||f;return h&&F(h)},u=f=>l(s(f)||t.getAttribute(`element-loading-${Mf(f)}`)),c=(n=s("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:(r=s("target"))!=null?r:c?void 0:t,body:(i=s("body"))!=null?i:e.modifiers.body,lock:(o=s("lock"))!=null?o:e.modifiers.lock};t[R1]={options:d,instance:yP(d)}},hje=(t,e)=>{for(const n of Object.keys(e))kr(e[n])&&(e[n].value=t[n])},bP={mounted(t,e){e.value&&lB(t,e)},updated(t,e){const n=t[R1];e.oldValue!==e.value&&(e.value&&!e.oldValue?lB(t,e):e.value&&e.oldValue?sn(e.value)&&hje(e.value,n.options):n==null||n.instance.close())},unmounted(t){var e;(e=t[R1])==null||e.instance.close(),t[R1]=null}},pje={install(t){t.directive("loading",bP),t.config.globalProperties.$loading=yP},directive:bP,service:yP},Qq=["success","info","warning","error"],Go=Jr({customClass:"",center:!1,dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,zIndex:0,grouping:!1,repeatNum:1,appendTo:Tn?document.body:void 0}),gje=Ye({customClass:{type:String,default:Go.customClass},center:{type:Boolean,default:Go.center},dangerouslyUseHTMLString:{type:Boolean,default:Go.dangerouslyUseHTMLString},duration:{type:Number,default:Go.duration},icon:{type:fr,default:Go.icon},id:{type:String,default:Go.id},message:{type:Oe([String,Object,Function]),default:Go.message},onClose:{type:Oe(Function),default:Go.onClose},showClose:{type:Boolean,default:Go.showClose},type:{type:String,values:Qq,default:Go.type},plain:{type:Boolean,default:Go.plain},offset:{type:Number,default:Go.offset},zIndex:{type:Number,default:Go.zIndex},grouping:{type:Boolean,default:Go.grouping},repeatNum:{type:Number,default:Go.repeatNum}}),mje={destroy:()=>!0},Gl=fz([]),vje=t=>{const e=Gl.findIndex(i=>i.id===t),n=Gl[e];let r;return e>0&&(r=Gl[e-1]),{current:n,prev:r}},yje=t=>{const{prev:e}=vje(t);return e?e.vm.exposed.bottom.value:0},bje=(t,e)=>Gl.findIndex(r=>r.id===t)>0?16:e,_je=ue({name:"ElMessage"}),Oje=ue({..._je,props:gje,emits:mje,setup(t,{expose:e}){const n=t,{Close:r}=h$,{ns:i,zIndex:o}=Ux("message"),{currentZIndex:a,nextZIndex:s}=o,l=F(),u=F(!1),c=F(0);let d;const f=M(()=>n.type?n.type==="error"?"danger":n.type:"info"),h=M(()=>{const E=n.type;return{[i.bm("icon",E)]:E&&bf[E]}}),m=M(()=>n.icon||bf[n.type]||""),g=M(()=>yje(n.id)),y=M(()=>bje(n.id,n.offset)+g.value),b=M(()=>c.value+y.value),w=M(()=>({top:`${y.value}px`,zIndex:a.value}));function O(){n.duration!==0&&({stop:d}=Xh(()=>{x()},n.duration))}function S(){d==null||d()}function x(){u.value=!1}function C({code:E}){E===St.esc&&x()}return Bt(()=>{O(),s(),u.value=!0}),Ve(()=>n.repeatNum,()=>{S(),O()}),sr(document,"keydown",C),Zr(l,()=>{c.value=l.value.getBoundingClientRect().height}),e({visible:u,bottom:b,close:x}),(E,T)=>(R(),we(Qi,{name:p(i).b("fade"),onBeforeLeave:E.onClose,onAfterLeave:P=>E.$emit("destroy"),persisted:""},{default:z(()=>[Ht(J("div",{id:E.id,ref_key:"messageRef",ref:l,class:j([p(i).b(),{[p(i).m(E.type)]:E.type},p(i).is("center",E.center),p(i).is("closable",E.showClose),p(i).is("plain",E.plain),E.customClass]),style:mt(p(w)),role:"alert",onMouseenter:S,onMouseleave:O},[E.repeatNum>1?(R(),we(p(QH),{key:0,value:E.repeatNum,type:p(f),class:j(p(i).e("badge"))},null,8,["value","type","class"])):_e("v-if",!0),p(m)?(R(),we(p(gt),{key:1,class:j([p(i).e("icon"),p(h)])},{default:z(()=>[(R(),we(un(p(m))))]),_:1},8,["class"])):_e("v-if",!0),xe(E.$slots,"default",{},()=>[E.dangerouslyUseHTMLString?(R(),G(ct,{key:1},[_e(" Caution here, message could've been compromised, never use user's input as message "),J("p",{class:j(p(i).e("content")),innerHTML:E.message},null,10,["innerHTML"])],2112)):(R(),G("p",{key:0,class:j(p(i).e("content"))},je(E.message),3))]),E.showClose?(R(),we(p(gt),{key:2,class:j(p(i).e("closeBtn")),onClick:Pt(x,["stop"])},{default:z(()=>[B(p(r))]),_:1},8,["class","onClick"])):_e("v-if",!0)],46,["id"]),[[zn,u.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var wje=Ge(Oje,[["__file","message.vue"]]);let Sje=1;const Hq=t=>{const e=!t||At(t)||Kr(t)||$t(t)?{message:t}:t,n={...Go,...e};if(!n.appendTo)n.appendTo=document.body;else if(At(n.appendTo)){let r=document.querySelector(n.appendTo);As(r)||(r=document.body),n.appendTo=r}return si(Ql.grouping)&&!n.grouping&&(n.grouping=Ql.grouping),kt(Ql.duration)&&n.duration===3e3&&(n.duration=Ql.duration),kt(Ql.offset)&&n.offset===16&&(n.offset=Ql.offset),si(Ql.showClose)&&!n.showClose&&(n.showClose=Ql.showClose),n},xje=t=>{const e=Gl.indexOf(t);if(e===-1)return;Gl.splice(e,1);const{handler:n}=t;n.close()},Cje=({appendTo:t,...e},n)=>{const r=`message_${Sje++}`,i=e.onClose,o=document.createElement("div"),a={...e,id:r,onClose:()=>{i==null||i(),xje(c)},onDestroy:()=>{uf(null,o)}},s=B(wje,a,$t(a.message)||Kr(a.message)?{default:$t(a.message)?a.message:()=>a.message}:null);s.appContext=n||sm._context,uf(s,o),t.appendChild(o.firstElementChild);const l=s.component,c={id:r,vnode:s,vm:l,handler:{close:()=>{l.exposed.visible.value=!1}},props:s.component.props};return c},sm=(t={},e)=>{if(!Tn)return{close:()=>{}};const n=Hq(t);if(n.grouping&&Gl.length){const i=Gl.find(({vnode:o})=>{var a;return((a=o.props)==null?void 0:a.message)===n.message});if(i)return i.props.repeatNum+=1,i.props.type=n.type,i.handler}if(kt(Ql.max)&&Gl.length>=Ql.max)return{close:()=>{}};const r=Cje(n,e);return Gl.push(r),r.handler};Qq.forEach(t=>{sm[t]=(e={},n)=>{const r=Hq(e);return sm({...r,type:t},n)}});function Eje(t){for(const e of Gl)(!t||t===e.props.type)&&e.handler.close()}sm.closeAll=Eje;sm._context=null;const Vr=HQ(sm,"$message"),Tje=ue({name:"ElMessageBox",directives:{TrapFocus:JAe},components:{ElButton:lr,ElFocusTrap:Mb,ElInput:hi,ElOverlay:G$,ElIcon:gt,...h$},inheritAttrs:!1,props:{buttonSize:{type:String,validator:WQ},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:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:r,ns:i,size:o}=Ux("message-box",M(()=>t.buttonSize)),{t:a}=n,{nextZIndex:s}=r,l=F(!1),u=Sn({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Bc(Ku),cancelButtonLoadingIcon:Bc(Ku),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:s()}),c=M(()=>{const I=u.type;return{[i.bm("icon",I)]:I&&bf[I]}}),d=bo(),f=bo(),h=M(()=>u.icon||bf[u.type]||""),m=M(()=>!!u.message),g=F(),y=F(),b=F(),w=F(),O=F(),S=M(()=>u.confirmButtonClass);Ve(()=>u.inputValue,async I=>{await Ot(),t.boxType==="prompt"&&I!==null&&N()},{immediate:!0}),Ve(()=>l.value,I=>{var U,Q;I&&(t.boxType!=="prompt"&&(u.autofocus?b.value=(Q=(U=O.value)==null?void 0:U.$el)!=null?Q:g.value:b.value=g.value),u.zIndex=s()),t.boxType==="prompt"&&(I?Ot().then(()=>{var V;w.value&&w.value.$el&&(u.autofocus?b.value=(V=$())!=null?V:g.value:b.value=g.value)}):(u.editorErrorMessage="",u.validateError=!1))});const x=M(()=>t.draggable),C=M(()=>t.overflow);UQ(g,y,x,C),Bt(async()=>{await Ot(),t.closeOnHashChange&&window.addEventListener("hashchange",E)}),pr(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",E)});function E(){!l.value||(l.value=!1,Ot(()=>{u.action&&e("action",u.action)}))}const T=()=>{t.closeOnClickModal&&D(u.distinguishCancelAndClose?"close":"cancel")},P=E$(T),A=I=>{if(u.inputType!=="textarea")return I.preventDefault(),D("confirm")},D=I=>{var U;t.boxType==="prompt"&&I==="confirm"&&!N()||(u.action=I,u.beforeClose?(U=u.beforeClose)==null||U.call(u,I,u,E):E())},N=()=>{if(t.boxType==="prompt"){const I=u.inputPattern;if(I&&!I.test(u.inputValue||""))return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;const U=u.inputValidator;if(typeof U=="function"){const Q=U(u.inputValue);if(Q===!1)return u.editorErrorMessage=u.inputErrorMessage||a("el.messagebox.error"),u.validateError=!0,!1;if(typeof Q=="string")return u.editorErrorMessage=Q,u.validateError=!0,!1}}return u.editorErrorMessage="",u.validateError=!1,!0},$=()=>{const I=w.value.$refs;return I.input||I.textarea},W=()=>{D("close")},L=()=>{t.closeOnPressEscape&&W()};return t.lockScroll&&v$(l),{...Ri(u),ns:i,overlayEvent:P,visible:l,hasMessage:m,typeClass:c,contentId:d,inputId:f,btnSize:o,iconComponent:h,confirmButtonClasses:S,rootRef:g,focusStartRef:b,headerRef:y,inputRef:w,confirmRef:O,doClose:E,handleClose:W,onCloseRequested:L,handleWrapperClick:T,handleInputEnter:A,handleAction:D,t:a}}});function kje(t,e,n,r,i,o){const a=an("el-icon"),s=an("close"),l=an("el-input"),u=an("el-button"),c=an("el-focus-trap"),d=an("el-overlay");return R(),we(Qi,{name:"fade-in-linear",onAfterLeave:f=>t.$emit("vanish"),persisted:""},{default:z(()=>[Ht(B(d,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:z(()=>[J("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:j(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[B(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:z(()=>[J("div",{ref:"rootRef",class:j([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:mt(t.customStyle),tabindex:"-1",onClick:Pt(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(R(),G("div",{key:0,ref:"headerRef",class:j([t.ns.e("header"),{"show-close":t.showClose}])},[J("div",{class:j(t.ns.e("title"))},[t.iconComponent&&t.center?(R(),we(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),J("span",null,je(t.title),1)],2),t.showClose?(R(),G("button",{key:0,type:"button",class:j(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:br(Pt(f=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[B(a,{class:j(t.ns.e("close"))},{default:z(()=>[B(s)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):_e("v-if",!0)],2)):_e("v-if",!0),J("div",{id:t.contentId,class:j(t.ns.e("content"))},[J("div",{class:j(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(R(),we(a,{key:0,class:j([t.ns.e("status"),t.typeClass])},{default:z(()=>[(R(),we(un(t.iconComponent)))]),_:1},8,["class"])):_e("v-if",!0),t.hasMessage?(R(),G("div",{key:1,class:j(t.ns.e("message"))},[xe(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(R(),we(un(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(R(),we(un(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:z(()=>[qe(je(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):_e("v-if",!0)],2),Ht(J("div",{class:j(t.ns.e("input"))},[B(l,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":f=>t.inputValue=f,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:j({invalid:t.validateError}),onKeydown:br(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),J("div",{class:j(t.ns.e("errormsg")),style:mt({visibility:t.editorErrorMessage?"visible":"hidden"})},je(t.editorErrorMessage),7)],2),[[zn,t.showInput]])],10,["id"]),J("div",{class:j(t.ns.e("btns"))},[t.showCancelButton?(R(),we(u,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:j([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:f=>t.handleAction("cancel"),onKeydown:br(Pt(f=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:z(()=>[qe(je(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):_e("v-if",!0),Ht(B(u,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:j([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:f=>t.handleAction("confirm"),onKeydown:br(Pt(f=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:z(()=>[qe(je(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[zn,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[zn,t.visible]])]),_:3},8,["onAfterLeave"])}var Pje=Ge(Tje,[["render",kje],["__file","index.vue"]]);const k0=new Map,Aje=t=>{let e=document.body;return t.appendTo&&(At(t.appendTo)&&(e=document.querySelector(t.appendTo)),As(t.appendTo)&&(e=t.appendTo),As(e)||(e=document.body)),e},Mje=(t,e,n=null)=>{const r=B(Pje,t,$t(t.message)||Kr(t.message)?{default:$t(t.message)?t.message:()=>t.message}:null);return r.appContext=n,uf(r,e),Aje(t).appendChild(e.firstElementChild),r.component},Rje=()=>document.createElement("div"),$je=(t,e)=>{const n=Rje();t.onVanish=()=>{uf(null,n),k0.delete(i)},t.onAction=o=>{const a=k0.get(i);let s;t.showInput?s={value:i.inputValue,action:o}:s=o,t.callback?t.callback(s,r.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?a.reject("close"):a.reject("cancel"):a.resolve(s)};const r=Mje(t,n,e),i=r.proxy;for(const o in t)Dn(t,o)&&!Dn(i.$props,o)&&(i[o]=t[o]);return i.visible=!0,i};function Zm(t,e=null){if(!Tn)return Promise.reject();let n;return At(t)||Kr(t)?t={message:t}:n=t.callback,new Promise((r,i)=>{const o=$je(t,e!=null?e:Zm._context);k0.set(o,{options:t,callback:n,resolve:r,reject:i})})}const Nje=["alert","confirm","prompt"],Dje={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Nje.forEach(t=>{Zm[t]=Lje(t)});function Lje(t){return(e,n,r,i)=>{let o="";return sn(n)?(r=n,o=""):ai(n)?o="":o=n,Zm(Object.assign({title:o,message:e,type:"",...Dje[t]},r,{boxType:t}),i)}}Zm.close=()=>{k0.forEach((t,e)=>{e.doClose()}),k0.clear()};Zm._context=null;const Td=Zm;Td.install=t=>{Td._context=t._context,t.config.globalProperties.$msgbox=Td,t.config.globalProperties.$messageBox=Td,t.config.globalProperties.$alert=Td.alert,t.config.globalProperties.$confirm=Td.confirm,t.config.globalProperties.$prompt=Td.prompt};const Mw=Td,Wq=["success","info","warning","error"],Ije=Ye({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:fr},id:{type:String,default:""},message:{type:Oe([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:Oe(Function),default:()=>{}},onClose:{type:Oe(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:[...Wq,""],default:""},zIndex:Number}),Bje={destroy:()=>!0},Fje=ue({name:"ElNotification"}),Vje=ue({...Fje,props:Ije,emits:Bje,setup(t,{expose:e}){const n=t,{ns:r,zIndex:i}=Ux("notification"),{nextZIndex:o,currentZIndex:a}=i,{Close:s}=f$,l=F(!1);let u;const c=M(()=>{const O=n.type;return O&&bf[n.type]?r.m(O):""}),d=M(()=>n.type&&bf[n.type]||n.icon),f=M(()=>n.position.endsWith("right")?"right":"left"),h=M(()=>n.position.startsWith("top")?"top":"bottom"),m=M(()=>{var O;return{[h.value]:`${n.offset}px`,zIndex:(O=n.zIndex)!=null?O:a.value}});function g(){n.duration>0&&({stop:u}=Xh(()=>{l.value&&b()},n.duration))}function y(){u==null||u()}function b(){l.value=!1}function w({code:O}){O===St.delete||O===St.backspace?y():O===St.esc?l.value&&b():g()}return Bt(()=>{g(),o(),l.value=!0}),sr(document,"keydown",w),e({visible:l,close:b}),(O,S)=>(R(),we(Qi,{name:p(r).b("fade"),onBeforeLeave:O.onClose,onAfterLeave:x=>O.$emit("destroy"),persisted:""},{default:z(()=>[Ht(J("div",{id:O.id,class:j([p(r).b(),O.customClass,p(f)]),style:mt(p(m)),role:"alert",onMouseenter:y,onMouseleave:g,onClick:O.onClick},[p(d)?(R(),we(p(gt),{key:0,class:j([p(r).e("icon"),p(c)])},{default:z(()=>[(R(),we(un(p(d))))]),_:1},8,["class"])):_e("v-if",!0),J("div",{class:j(p(r).e("group"))},[J("h2",{class:j(p(r).e("title")),textContent:je(O.title)},null,10,["textContent"]),Ht(J("div",{class:j(p(r).e("content")),style:mt(O.title?void 0:{margin:0})},[xe(O.$slots,"default",{},()=>[O.dangerouslyUseHTMLString?(R(),G(ct,{key:1},[_e(" Caution here, message could've been compromised, never use user's input as message "),J("p",{innerHTML:O.message},null,8,["innerHTML"])],2112)):(R(),G("p",{key:0},je(O.message),1))])],6),[[zn,O.message]]),O.showClose?(R(),we(p(gt),{key:0,class:j(p(r).e("closeBtn")),onClick:Pt(b,["stop"])},{default:z(()=>[B(p(s))]),_:1},8,["class","onClick"])):_e("v-if",!0)],2)],46,["id","onClick"]),[[zn,l.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var jje=Ge(Vje,[["__file","notification.vue"]]);const Rw={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},_P=16;let zje=1;const lm=function(t={},e=null){if(!Tn)return{close:()=>{}};(typeof t=="string"||Kr(t))&&(t={message:t});const n=t.position||"top-right";let r=t.offset||0;Rw[n].forEach(({vm:c})=>{var d;r+=(((d=c.el)==null?void 0:d.offsetHeight)||0)+_P}),r+=_P;const i=`notification_${zje++}`,o=t.onClose,a={...t,offset:r,id:i,onClose:()=>{Qje(i,n,o)}};let s=document.body;As(t.appendTo)?s=t.appendTo:At(t.appendTo)&&(s=document.querySelector(t.appendTo)),As(s)||(s=document.body);const l=document.createElement("div"),u=B(jje,a,Kr(a.message)?{default:()=>a.message}:null);return u.appContext=e!=null?e:lm._context,u.props.onDestroy=()=>{uf(null,l)},uf(u,l),Rw[n].push({vm:u}),s.appendChild(l.firstElementChild),{close:()=>{u.component.exposed.visible.value=!1}}};Wq.forEach(t=>{lm[t]=(e={})=>((typeof e=="string"||Kr(e))&&(e={message:e}),lm({...e,type:t}))});function Qje(t,e,n){const r=Rw[e],i=r.findIndex(({vm:u})=>{var c;return((c=u.component)==null?void 0:c.props.id)===t});if(i===-1)return;const{vm:o}=r[i];if(!o)return;n==null||n(o);const a=o.el.offsetHeight,s=e.split("-")[0];r.splice(i,1);const l=r.length;if(!(l<1))for(let u=i;u{e.component.exposed.visible.value=!1})}lm.closeAll=Hje;lm._context=null;const Wje=HQ(lm,"$notify");var Uje=[uje,pje,Vr,Mw,Wje,CU],qje=b2e([...nje,...Uje]),Uq={name:"zh-cn",el:{breadcrumb:{label:"\u9762\u5305\u5C51"},colorpicker:{confirm:"\u786E\u5B9A",clear:"\u6E05\u7A7A",defaultLabel:"\u989C\u8272\u9009\u62E9\u5668",description:"\u5F53\u524D\u989C\u8272 {color}\uFF0C\u6309 Enter \u952E\u9009\u62E9\u65B0\u989C\u8272",alphaLabel:"\u9009\u62E9\u900F\u660E\u5EA6\u7684\u503C"},datepicker:{now:"\u6B64\u523B",today:"\u4ECA\u5929",cancel:"\u53D6\u6D88",clear:"\u6E05\u7A7A",confirm:"\u786E\u5B9A",dateTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u65E5\u671F",monthTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u6708\u4EFD",yearTablePrompt:"\u4F7F\u7528\u65B9\u5411\u952E\u4E0E Enter \u952E\u53EF\u9009\u62E9\u5E74\u4EFD",selectedDate:"\u5DF2\u9009\u65E5\u671F",selectDate:"\u9009\u62E9\u65E5\u671F",selectTime:"\u9009\u62E9\u65F6\u95F4",startDate:"\u5F00\u59CB\u65E5\u671F",startTime:"\u5F00\u59CB\u65F6\u95F4",endDate:"\u7ED3\u675F\u65E5\u671F",endTime:"\u7ED3\u675F\u65F6\u95F4",prevYear:"\u524D\u4E00\u5E74",nextYear:"\u540E\u4E00\u5E74",prevMonth:"\u4E0A\u4E2A\u6708",nextMonth:"\u4E0B\u4E2A\u6708",year:"\u5E74",month1:"1 \u6708",month2:"2 \u6708",month3:"3 \u6708",month4:"4 \u6708",month5:"5 \u6708",month6:"6 \u6708",month7:"7 \u6708",month8:"8 \u6708",month9:"9 \u6708",month10:"10 \u6708",month11:"11 \u6708",month12:"12 \u6708",weeks:{sun:"\u65E5",mon:"\u4E00",tue:"\u4E8C",wed:"\u4E09",thu:"\u56DB",fri:"\u4E94",sat:"\u516D"},weeksFull:{sun:"\u661F\u671F\u65E5",mon:"\u661F\u671F\u4E00",tue:"\u661F\u671F\u4E8C",wed:"\u661F\u671F\u4E09",thu:"\u661F\u671F\u56DB",fri:"\u661F\u671F\u4E94",sat:"\u661F\u671F\u516D"},months:{jan:"\u4E00\u6708",feb:"\u4E8C\u6708",mar:"\u4E09\u6708",apr:"\u56DB\u6708",may:"\u4E94\u6708",jun:"\u516D\u6708",jul:"\u4E03\u6708",aug:"\u516B\u6708",sep:"\u4E5D\u6708",oct:"\u5341\u6708",nov:"\u5341\u4E00\u6708",dec:"\u5341\u4E8C\u6708"}},inputNumber:{decrease:"\u51CF\u5C11\u6570\u503C",increase:"\u589E\u52A0\u6570\u503C"},select:{loading:"\u52A0\u8F7D\u4E2D",noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",placeholder:"\u8BF7\u9009\u62E9"},dropdown:{toggleDropdown:"\u5207\u6362\u4E0B\u62C9\u9009\u9879"},mention:{loading:"\u52A0\u8F7D\u4E2D"},cascader:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",loading:"\u52A0\u8F7D\u4E2D",placeholder:"\u8BF7\u9009\u62E9",noData:"\u6682\u65E0\u6570\u636E"},pagination:{goto:"\u524D\u5F80",pagesize:"\u6761/\u9875",total:"\u5171 {total} \u6761",pageClassifier:"\u9875",page:"\u9875",prev:"\u4E0A\u4E00\u9875",next:"\u4E0B\u4E00\u9875",currentPage:"\u7B2C {pager} \u9875",prevPages:"\u5411\u524D {pager} \u9875",nextPages:"\u5411\u540E {pager} \u9875",deprecationWarning:"\u4F60\u4F7F\u7528\u4E86\u4E00\u4E9B\u5DF2\u88AB\u5E9F\u5F03\u7684\u7528\u6CD5\uFF0C\u8BF7\u53C2\u8003 el-pagination \u7684\u5B98\u65B9\u6587\u6863"},dialog:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},drawer:{close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},messagebox:{title:"\u63D0\u793A",confirm:"\u786E\u5B9A",cancel:"\u53D6\u6D88",error:"\u8F93\u5165\u7684\u6570\u636E\u4E0D\u5408\u6CD5!",close:"\u5173\u95ED\u6B64\u5BF9\u8BDD\u6846"},upload:{deleteTip:"\u6309 delete \u952E\u53EF\u5220\u9664",delete:"\u5220\u9664",preview:"\u67E5\u770B\u56FE\u7247",continue:"\u7EE7\u7EED\u4E0A\u4F20"},slider:{defaultLabel:"\u6ED1\u5757\u4ECB\u4E8E {min} \u81F3 {max}",defaultRangeStartLabel:"\u9009\u62E9\u8D77\u59CB\u503C",defaultRangeEndLabel:"\u9009\u62E9\u7ED3\u675F\u503C"},table:{emptyText:"\u6682\u65E0\u6570\u636E",confirmFilter:"\u7B5B\u9009",resetFilter:"\u91CD\u7F6E",clearFilter:"\u5168\u90E8",sumText:"\u5408\u8BA1"},tour:{next:"\u4E0B\u4E00\u6B65",previous:"\u4E0A\u4E00\u6B65",finish:"\u7ED3\u675F\u5BFC\u89C8"},tree:{emptyText:"\u6682\u65E0\u6570\u636E"},transfer:{noMatch:"\u65E0\u5339\u914D\u6570\u636E",noData:"\u65E0\u6570\u636E",titles:["\u5217\u8868 1","\u5217\u8868 2"],filterPlaceholder:"\u8BF7\u8F93\u5165\u641C\u7D22\u5185\u5BB9",noCheckedFormat:"\u5171 {total} \u9879",hasCheckedFormat:"\u5DF2\u9009 {checked}/{total} \u9879"},image:{error:"\u52A0\u8F7D\u5931\u8D25"},pageHeader:{title:"\u8FD4\u56DE"},popconfirm:{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88"},carousel:{leftArrow:"\u4E0A\u4E00\u5F20\u5E7B\u706F\u7247",rightArrow:"\u4E0B\u4E00\u5F20\u5E7B\u706F\u7247",indicator:"\u5E7B\u706F\u7247\u5207\u6362\u81F3\u7D22\u5F15 {index}"}}},sC,rr,qq,_h,uB,Yq,OP,TN,wP,SP,P0={},Xq=[],Yje=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,lC=Array.isArray;function zd(t,e){for(var n in e)t[n]=e[n];return t}function Zq(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function Gt(t,e,n){var r,i,o,a={};for(o in e)o=="key"?r=e[o]:o=="ref"?i=e[o]:a[o]=e[o];if(arguments.length>2&&(a.children=arguments.length>3?sC.call(arguments,2):n),typeof t=="function"&&t.defaultProps!=null)for(o in t.defaultProps)a[o]===void 0&&(a[o]=t.defaultProps[o]);return $1(t,a,r,i,null)}function $1(t,e,n,r,i){var o={type:t,props:e,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i==null?++qq:i,__i:-1,__u:0};return i==null&&rr.vnode!=null&&rr.vnode(o),o}function uC(){return{current:null}}function um(t){return t.children}function ur(t,e){this.props=t,this.context=e}function cm(t,e){if(e==null)return t.__?cm(t.__,t.__i+1):null;for(var n;ee&&_h.sort(OP));$w.__r=0}function Kq(t,e,n,r,i,o,a,s,l,u,c){var d,f,h,m,g,y=r&&r.__k||Xq,b=e.length;for(n.__d=l,Xje(n,e,y),l=n.__d,d=0;d0?$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=t,i.__b=t.__b+1,o=null,(s=i.__i=Zje(i,n,a,c))!==-1&&(c--,(o=n[s])&&(o.__u|=131072)),o==null||o.__v===null?(s==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):s!==a&&(s==a-1?d--:s==a+1?d++:(s>a?d--:d++,i.__u|=65536))):i=t.__k[r]=null;if(c)for(r=0;r(l!=null&&(131072&l.__u)==0?1:0))for(;a>=0||s=0){if((l=e[a])&&(131072&l.__u)==0&&i==l.key&&o===l.type)return a;a--}if(s=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}}}function mg(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function NN(){for(var t=[],e=0;e2&&Bv("box");var n=ug(e);return new Uh(t,mO(n),n.name,!0,n.equals)},array:function(t,e){arguments.length>2&&Bv("array");var n=ug(e);return i7e(t,mO(n),n.name)},map:function(t,e){arguments.length>2&&Bv("map");var n=ug(e);return new BN(t,mO(n),n.name)},set:function(t,e){arguments.length>2&&Bv("set");var n=ug(e);return new PY(t,mO(n),n.name)},object:function(t,e,n){typeof arguments[1]=="string"&&Bv("object");var r=ug(n);if(r.proxy===!1)return AP({},t,e,r);var i=SY(r),o=AP({},void 0,void 0,r),a=t7e(o);return xY(a,t,e,i),a},ref:sY,shallow:vze,deep:DN,struct:yze},at=bze;Object.keys(hB).forEach(function(t){return at[t]=hB[t]});function Bv(t){Rr("Expected one or two arguments to observable."+t+". Did you accidentally try to use observable."+t+" as decorator?")}var Bw=oY(!1,function(t,e,n,r,i){var o=n.get,a=n.set,s=i[0]||{};FN(t).addComputedProp(t,e,Lw({get:o,set:a,context:t},s))}),_ze=Bw({equals:dm.structural}),Gr=function(e,n,r){if(typeof n=="string"||e!==null&&typeof e=="object"&&arguments.length===1)return Bw.apply(null,arguments);var i=typeof n=="object"?n:{};return i.get=e,i.set=typeof n=="function"?n:i.set,i.name=i.name||e.name||"",new hm(i)};Gr.struct=_ze;var Nr;(function(t){t[t.NOT_TRACKING=-1]="NOT_TRACKING",t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.POSSIBLY_STALE=1]="POSSIBLY_STALE",t[t.STALE=2]="STALE"})(Nr||(Nr={}));var Uu;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Uu||(Uu={}));var Fw=function(){function t(e){this.cause=e}return t}();function iy(t){return t instanceof Fw}function CP(t){switch(t.dependenciesState){case Nr.UP_TO_DATE:return!1;case Nr.NOT_TRACKING:case Nr.STALE:return!0;case Nr.POSSIBLY_STALE:{for(var e=LN(!0),n=tv(),r=t.observing,i=r.length,o=0;o0;dn.computationDepth>0&&e&&Rr(!1),!dn.allowStateChanges&&(e||dn.enforceActions==="strict")&&Rr(!1)}function lY(t,e,n){var r=LN(!0);cY(t),t.newObserving=new Array(t.observing.length+100),t.unboundDepsCount=0,t.runId=++dn.runId;var i=dn.trackingDerivation;dn.trackingDerivation=t;var o;if(dn.disableErrorBoundaries===!0)o=e.call(n);else try{o=e.call(n)}catch(a){o=new Fw(a)}return dn.trackingDerivation=i,Oze(t),ky(r),o}function Oze(t){for(var e=t.observing,n=t.observing=t.newObserving,r=Nr.UP_TO_DATE,i=0,o=t.unboundDepsCount,a=0;ar&&(r=s.dependenciesState)}for(n.length=i,t.newObserving=null,o=e.length;o--;){var s=e[o];s.diffValue===0&&hY(s,t),s.diffValue=0}for(;i--;){var s=n[i];s.diffValue===1&&(s.diffValue=0,kze(s,t))}r!==Nr.UP_TO_DATE&&(t.dependenciesState=r,t.onBecomeStale())}function EP(t){var e=t.observing;t.observing=[];for(var n=e.length;n--;)hY(e[n],t);t.dependenciesState=Nr.NOT_TRACKING}function uY(t){var e=tv();try{return t()}finally{tf(e)}}function tv(){var t=dn.trackingDerivation;return dn.trackingDerivation=null,t}function tf(t){dn.trackingDerivation=t}function LN(t){var e=dn.allowStateReads;return dn.allowStateReads=t,e}function ky(t){dn.allowStateReads=t}function cY(t){if(t.dependenciesState!==Nr.UP_TO_DATE){t.dependenciesState=Nr.UP_TO_DATE;for(var e=t.observing,n=e.length;n--;)e[n].lowestObserverState=Nr.UP_TO_DATE}}var Vw=0,wze=1,pB=Object.getOwnPropertyDescriptor(function(){},"name");pB&&pB.configurable;function Wh(t,e,n){var r=function(){return dY(t,e,n||this,arguments)};return r.isMobxAction=!0,r}function dY(t,e,n,r){var i=Sze();try{return e.apply(n,r)}catch(o){throw i.error=o,o}finally{xze(i)}}function Sze(t,e,n){var r=Ka(),i=0,o=tv();tu();var a=fC(!0),s=LN(!0),l={prevDerivation:o,prevAllowStateChanges:a,prevAllowStateReads:s,notifySpy:r,startTime:i,actionId:wze++,parentActionId:Vw};return Vw=l.actionId,l}function xze(t){Vw!==t.actionId&&Rr("invalid action stack. did you forget to finish an action?"),Vw=t.parentActionId,t.error!==void 0&&(dn.suppressReactionErrors=!0),hC(t.prevAllowStateChanges),ky(t.prevAllowStateReads),nu(),tf(t.prevDerivation),t.notifySpy,dn.suppressReactionErrors=!1}function fC(t){var e=dn.allowStateChanges;return dn.allowStateChanges=t,e}function hC(t){dn.allowStateChanges=t}var Uh=function(t){cze(e,t);function e(n,r,i,o,a){i===void 0&&(i="ObservableValue@"+rs()),o===void 0&&(o=!0),a===void 0&&(a=dm.default);var s=t.call(this,i)||this;return s.enhancer=r,s.name=i,s.equals=a,s.hasUnreportedChange=!1,s.value=r(n,void 0,i),o&&Ka(),s}return e.prototype.dehanceValue=function(n){return this.dehancer!==void 0?this.dehancer(n):n},e.prototype.set=function(n){var r=this.value;if(n=this.prepareNewValue(n),n!==dn.UNCHANGED){var i=Ka();this.setNewValue(n)}},e.prototype.prepareNewValue=function(n){if(fm(this),qu(this)){var r=Yu(this,{object:this,type:"update",newValue:n});if(!r)return dn.UNCHANGED;n=r.newValue}return n=this.enhancer(n,this.value,this.name),this.equals(this.value,n)?dn.UNCHANGED:n},e.prototype.setNewValue=function(n){var r=this.value;this.value=n,this.reportChanged(),ru(this)&&iu(this,{type:"update",object:this,newValue:n,oldValue:r})},e.prototype.get=function(){return this.reportObserved(),this.dehanceValue(this.value)},e.prototype.intercept=function(n){return Bb(this,n)},e.prototype.observe=function(n,r){return r&&n({object:this,type:"update",newValue:this.value,oldValue:void 0}),Fb(this,n)},e.prototype.toJSON=function(){return this.get()},e.prototype.toString=function(){return this.name+"["+this.value+"]"},e.prototype.valueOf=function(){return iY(this.get())},e.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},e}(ev),Cze=Vf("ObservableValue",Uh),hm=function(){function t(e){this.dependenciesState=Nr.NOT_TRACKING,this.observing=[],this.newObserving=null,this.isBeingObserved=!1,this.isPendingUnobservation=!1,this.observers=new Set,this.diffValue=0,this.runId=0,this.lastAccessedBy=0,this.lowestObserverState=Nr.UP_TO_DATE,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.value=new Fw(null),this.isComputing=!1,this.isRunningSetter=!1,this.isTracing=Uu.NONE,Hh(e.get,"missing option for computed: get"),this.derivation=e.get,this.name=e.name||"ComputedValue@"+rs(),e.set&&(this.setter=Wh(this.name+"-setter",e.set)),this.equals=e.equals||(e.compareStructural||e.struct?dm.structural:dm.default),this.scope=e.context,this.requiresReaction=!!e.requiresReaction,this.keepAlive=!!e.keepAlive}return t.prototype.onBecomeStale=function(){Mze(this)},t.prototype.onBecomeObserved=function(){this.onBecomeObservedListeners&&this.onBecomeObservedListeners.forEach(function(e){return e()})},t.prototype.onBecomeUnobserved=function(){this.onBecomeUnobservedListeners&&this.onBecomeUnobservedListeners.forEach(function(e){return e()})},t.prototype.get=function(){this.isComputing&&Rr("Cycle detected in computation "+this.name+": "+this.derivation),dn.inBatch===0&&this.observers.size===0&&!this.keepAlive?CP(this)&&(this.warnAboutUntrackedRead(),tu(),this.value=this.computeValue(!1),nu()):(gY(this),CP(this)&&this.trackAndCompute()&&Aze(this));var e=this.value;if(iy(e))throw e.cause;return e},t.prototype.peek=function(){var e=this.computeValue(!1);if(iy(e))throw e.cause;return e},t.prototype.set=function(e){if(this.setter){Hh(!this.isRunningSetter,"The setter of computed value '"+this.name+"' is trying to update itself. Did you intend to update an _observable_ value, instead of the computed property?"),this.isRunningSetter=!0;try{this.setter.call(this.scope,e)}finally{this.isRunningSetter=!1}}else Hh(!1,!1)},t.prototype.trackAndCompute=function(){var e=this.value,n=this.dependenciesState===Nr.NOT_TRACKING,r=this.computeValue(!0),i=n||iy(e)||iy(r)||!this.equals(e,r);return i&&(this.value=r),i},t.prototype.computeValue=function(e){this.isComputing=!0,dn.computationDepth++;var n;if(e)n=lY(this,this.derivation,this.scope);else if(dn.disableErrorBoundaries===!0)n=this.derivation.call(this.scope);else try{n=this.derivation.call(this.scope)}catch(r){n=new Fw(r)}return dn.computationDepth--,this.isComputing=!1,n},t.prototype.suspend=function(){this.keepAlive||(EP(this),this.value=void 0)},t.prototype.observe=function(e,n){var r=this,i=!0,o=void 0;return Fze(function(){var a=r.get();if(!i||n){var s=tv();e({type:"update",object:r,newValue:a,oldValue:o}),tf(s)}i=!1,o=a})},t.prototype.warnAboutUntrackedRead=function(){},t.prototype.toJSON=function(){return this.get()},t.prototype.toString=function(){return this.name+"["+this.derivation.toString()+"]"},t.prototype.valueOf=function(){return iY(this.get())},t.prototype[Symbol.toPrimitive]=function(){return this.valueOf()},t}(),pm=Vf("ComputedValue",hm),N1=function(){function t(){this.version=5,this.UNCHANGED={},this.trackingDerivation=null,this.computationDepth=0,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!0,this.allowStateReads=!0,this.enforceActions=!1,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.computedConfigurable=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1}return t}(),Eze={};function TP(){return typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Eze}var D1=!0,fY=!1,dn=function(){var t=TP();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(D1=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new N1().version&&(D1=!1),D1?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new N1):(setTimeout(function(){fY||Rr("There are multiple, different versions of MobX active. Make sure MobX is loaded only once or use `configure({ isolateGlobalState: true })`")},1),new N1)}();function Tze(){(dn.pendingReactions.length||dn.inBatch||dn.isRunningReactions)&&Rr("isolateGlobalState should be called before MobX is running any reactions"),fY=!0,D1&&(--TP().__mobxInstanceCount===0&&(TP().__mobxGlobals=void 0),dn=new N1)}function kP(){return dn}function kze(t,e){t.observers.add(e),t.lowestObserverState>e.dependenciesState&&(t.lowestObserverState=e.dependenciesState)}function hY(t,e){t.observers.delete(e),t.observers.size===0&&pY(t)}function pY(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,dn.pendingUnobservations.push(t))}function tu(){dn.inBatch++}function nu(){if(--dn.inBatch===0){yY();for(var t=dn.pendingUnobservations,e=0;e0&&pY(t),!1)}function Pze(t){t.lowestObserverState!==Nr.STALE&&(t.lowestObserverState=Nr.STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.UP_TO_DATE&&(e.isTracing!==Uu.NONE&&mY(e,t),e.onBecomeStale()),e.dependenciesState=Nr.STALE}))}function Aze(t){t.lowestObserverState!==Nr.STALE&&(t.lowestObserverState=Nr.STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.POSSIBLY_STALE?e.dependenciesState=Nr.STALE:e.dependenciesState===Nr.UP_TO_DATE&&(t.lowestObserverState=Nr.UP_TO_DATE)}))}function Mze(t){t.lowestObserverState===Nr.UP_TO_DATE&&(t.lowestObserverState=Nr.POSSIBLY_STALE,t.observers.forEach(function(e){e.dependenciesState===Nr.UP_TO_DATE&&(e.dependenciesState=Nr.POSSIBLY_STALE,e.isTracing!==Uu.NONE&&mY(e,t),e.onBecomeStale())}))}function mY(t,e){if(console.log("[mobx.trace] '"+t.name+"' is invalidated due to a change in: '"+e.name+"'"),t.isTracing===Uu.BREAK){var n=[];vY(Hze(t),n,1),new Function(`debugger; /* Tracing '`+t.name+`' You are entering this break point because derivation '`+t.name+"' is being traced and '"+e.name+`' is now forcing it to update. Just follow the stacktrace you should now see in the devtools to see precisely what piece of your code is causing this update The stackframe you are looking for is at least ~6-8 stack-frames up. `+(t instanceof hm?t.derivation.toString().replace(/[*]\//g,"/"):"")+` The dependencies for this derivation are: `+n.join(` `)+` */ `)()}}function vY(t,e,n){if(e.length>=1e3){e.push("(and many more)");return}e.push(""+new Array(n).join(" ")+t.name),t.dependencies&&t.dependencies.forEach(function(r){return vY(r,e,n+1)})}var A0=function(){function t(e,n,r,i){e===void 0&&(e="Reaction@"+rs()),i===void 0&&(i=!1),this.name=e,this.onInvalidate=n,this.errorHandler=r,this.requiresObservable=i,this.observing=[],this.newObserving=[],this.dependenciesState=Nr.NOT_TRACKING,this.diffValue=0,this.runId=0,this.unboundDepsCount=0,this.__mapid="#"+rs(),this.isDisposed=!1,this._isScheduled=!1,this._isTrackPending=!1,this._isRunning=!1,this.isTracing=Uu.NONE}return t.prototype.onBecomeStale=function(){this.schedule()},t.prototype.schedule=function(){this._isScheduled||(this._isScheduled=!0,dn.pendingReactions.push(this),yY())},t.prototype.isScheduled=function(){return this._isScheduled},t.prototype.runReaction=function(){if(!this.isDisposed){if(tu(),this._isScheduled=!1,CP(this)){this._isTrackPending=!0;try{this.onInvalidate(),this._isTrackPending&&Ka()}catch(e){this.reportExceptionInDerivation(e)}}nu()}},t.prototype.track=function(e){if(!this.isDisposed){tu(),this._isRunning=!0;var n=lY(this,e,void 0);this._isRunning=!1,this._isTrackPending=!1,this.isDisposed&&EP(this),iy(n)&&this.reportExceptionInDerivation(n.cause),nu()}},t.prototype.reportExceptionInDerivation=function(e){var n=this;if(this.errorHandler){this.errorHandler(e,this);return}if(dn.disableErrorBoundaries)throw e;var r="[mobx] Encountered an uncaught exception that was thrown by a reaction or observer component, in: '"+this+"'";dn.suppressReactionErrors?console.warn("[mobx] (error in reaction '"+this.name+"' suppressed, fix error of causing action below)"):console.error(r,e),dn.globalReactionErrorHandlers.forEach(function(i){return i(e,n)})},t.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._isRunning||(tu(),EP(this),nu()))},t.prototype.getDisposer=function(){var e=this.dispose.bind(this);return e[Ln]=this,e},t.prototype.toString=function(){return"Reaction["+this.name+"]"},t.prototype.trace=function(e){e===void 0&&(e=!1),Kze(this,e)},t}(),gB=100,PP=function(t){return t()};function yY(){dn.inBatch>0||dn.isRunningReactions||PP(Rze)}function Rze(){dn.isRunningReactions=!0;for(var t=dn.pendingReactions,e=0;t.length>0;){++e===gB&&(console.error("Reaction doesn't converge to a stable state after "+gB+" iterations."+(" Probably there is a cycle in the reactive function: "+t[0])),t.splice(0));for(var n=t.splice(0),r=0,i=n.length;r",e);if(arguments.length===2&&typeof n=="function")return Wh(e,n);if(arguments.length===1&&typeof e=="string")return mB(e);if(i===!0)Km(e,n,Wh(e.name||n,r.value,this));else return mB(n).apply(null,arguments)};it.bound=Ize;function Bze(t,e){var n=typeof t=="string"?t:t.name||"",r=typeof t=="function"?t:e;return dY(n,r,this,void 0)}function jT(t,e,n){Km(t,e,Wh(e,n.bind(t)))}function Fze(t,e){e===void 0&&(e=AN);var n=e&&e.name||t.name||"Autorun@"+rs(),r=!e.scheduler&&!e.delay,i;if(r)i=new A0(n,function(){this.track(s)},e.onError,e.requiresObservable);else{var o=bY(e),a=!1;i=new A0(n,function(){a||(a=!0,o(function(){a=!1,i.isDisposed||i.track(s)}))},e.onError,e.requiresObservable)}function s(){t(i)}return i.schedule(),i.getDisposer()}var Vze=function(t){return t()};function bY(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Vze}function _Y(t,e,n){n===void 0&&(n=AN);var r=n.name||"Reaction@"+rs(),i=it(r,n.onError?jze(n.onError,e):e),o=!n.scheduler&&!n.delay,a=bY(n),s=!0,l=!1,u,c=n.compareStructural?dm.structural:n.equals||dm.default,d=new A0(r,function(){s||o?f():l||(l=!0,a(f))},n.onError,n.requiresObservable);function f(){if(l=!1,!d.isDisposed){var h=!1;d.track(function(){var m=t(d);h=s||!c(u,m),u=m}),s&&n.fireImmediately&&i(u,d),!s&&h===!0&&i(u,d),s&&(s=!1)}}return d.schedule(),d.getDisposer()}function jze(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function zze(t,e,n){return wY("onBecomeObserved",t,e,n)}function OY(t,e,n){return wY("onBecomeUnobserved",t,e,n)}function wY(t,e,n,r){var i=typeof r=="function"?Xc(e,n):Xc(e),o=typeof r=="function"?r:n,a=t+"Listeners";i[a]?i[a].add(o):i[a]=new Set([o]);var s=i[t];return typeof s!="function"?Rr(!1):function(){var l=i[a];l&&(l.delete(o),l.size===0&&delete i[a])}}function Qze(t){var e=t.enforceActions,n=t.computedRequiresReaction,r=t.computedConfigurable,i=t.disableErrorBoundaries,o=t.reactionScheduler,a=t.reactionRequiresObservable,s=t.observableRequiresReaction;if(t.isolateGlobalState===!0&&Tze(),e!==void 0){var l=void 0;switch(e){case!0:case"observed":l=!0;break;case!1:case"never":l=!1;break;case"strict":case"always":l="strict";break;default:Rr("Invalid value for 'enforceActions': '"+e+"', expected 'never', 'always' or 'observed'")}dn.enforceActions=l,dn.allowStateChanges=!(l===!0||l==="strict")}n!==void 0&&(dn.computedRequiresReaction=!!n),a!==void 0&&(dn.reactionRequiresObservable=!!a),s!==void 0&&(dn.observableRequiresReaction=!!s,dn.allowStateReads=!dn.observableRequiresReaction),r!==void 0&&(dn.computedConfigurable=!!r),i!==void 0&&(i===!0&&console.warn("WARNING: Debug feature only. MobX will NOT recover from errors when `disableErrorBoundaries` is enabled."),dn.disableErrorBoundaries=!!i),o&&$ze(o)}function AP(t,e,n,r){r=ug(r);var i=SY(r);return ap(t),FN(t,r.name,i.enhancer),e&&xY(t,e,n,i),t}function SY(t){return t.defaultDecorator||(t.deep===!1?sY:DN)}function xY(t,e,n,r){var i,o,a,s;tu();try{var a=oze(e);try{for(var l=Lu(a),u=l.next();!u.done;u=l.next()){var s=u.value,c=Object.getOwnPropertyDescriptor(e,s),d=n&&s in n?n[s]:c.get?Bw:r,f=d(t,s,c,!0);f&&Object.defineProperty(t,s,f)}}catch(m){i={error:m}}finally{try{u&&!u.done&&(o=l.return)&&o.call(l)}finally{if(i)throw i.error}}}finally{nu()}}function Hze(t,e){return CY(Xc(t,e))}function CY(t){var e={name:t.name};return t.observing&&t.observing.length>0&&(e.dependencies=tze(t.observing).map(CY)),e}function EY(t,e){if(t==null)return!1;if(e!==void 0){if(Sl(t)===!1||!t[Ln].values.has(e))return!1;var n=Xc(t,e);return pm(n)}return pm(t)}function Wze(t){return arguments.length>1?Rr(!1):EY(t)}function vB(t,e){return typeof e!="string"?Rr(!1):EY(t,e)}function Uze(t,e){return t==null?!1:e!==void 0?Sl(t)?t[Ln].values.has(e):!1:Sl(t)||!!t[Ln]||RN(t)||jw(t)||pm(t)}function gm(t){return arguments.length!==1&&Rr(!1),Uze(t)}function mm(t){return Sl(t)?t[Ln].getKeys():ls(t)||wl(t)?Array.from(t.keys()):hc(t)?t.map(function(e,n){return n}):Rr(!1)}function qze(t){return Sl(t)?mm(t).map(function(e){return t[e]}):ls(t)?mm(t).map(function(e){return t.get(e)}):wl(t)?Array.from(t.values()):hc(t)?t.slice():Rr(!1)}function Yze(t){return Sl(t)?mm(t).map(function(e){return[e,t[e]]}):ls(t)?mm(t).map(function(e){return[e,t.get(e)]}):wl(t)?Array.from(t.entries()):hc(t)?t.map(function(e,n){return[n,e]}):Rr(!1)}function IN(t,e,n){if(arguments.length===2&&!wl(t)){tu();var r=e;try{for(var i in r)IN(t,i,r[i])}finally{nu()}return}if(Sl(t)){var o=t[Ln],a=o.values.get(e);a?o.write(e,n):o.addObservableProp(e,n,o.defaultEnhancer)}else if(ls(t))t.set(e,n);else if(wl(t))t.add(e);else if(hc(t))typeof e!="number"&&(e=parseInt(e,10)),Hh(e>=0,"Not a valid index: '"+e+"'"),tu(),e>=t.length&&(t.length=e+1),t[e]=n,nu();else return Rr(!1)}function TY(t,e,n,r){return typeof n=="function"?Zze(t,e,n,r):Xze(t,e,n)}function Xze(t,e,n){return Vb(t).observe(e,n)}function Zze(t,e,n,r){return Vb(t,e).observe(n,r)}var Gze={detectCycles:!0,exportMapsAsObjects:!0,recurseEverything:!1};function Yp(t,e,n,r){return r.detectCycles&&t.set(e,n),n}function kd(t,e,n){if(!e.recurseEverything&&!gm(t)||typeof t!="object")return t;if(t===null)return null;if(t instanceof Date)return t;if(Cze(t))return kd(t.get(),e,n);gm(t)&&mm(t);var r=e.detectCycles===!0;if(r&&t!==null&&n.has(t))return n.get(t);if(hc(t)||Array.isArray(t)){var i=Yp(n,t,[],e),o=t.map(function(h){return kd(h,e,n)});i.length=o.length;for(var a=0,s=o.length;a0}function Bb(t,e){var n=t.interceptors||(t.interceptors=[]);return n.push(e),nY(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function Yu(t,e){var n=tv();try{for(var r=NN(t.interceptors||[]),i=0,o=r.length;i0}function Fb(t,e){var n=t.changeListeners||(t.changeListeners=[]);return n.push(e),nY(function(){var r=n.indexOf(e);r!==-1&&n.splice(r,1)})}function iu(t,e){var n=tv(),r=t.changeListeners;if(!!r){r=r.slice();for(var i=0,o=r.length;i0?e.map(this.dehancer):e},t.prototype.intercept=function(e){return Bb(this,e)},t.prototype.observe=function(e,n){return n===void 0&&(n=!1),n&&e({object:this.proxy,type:"splice",index:0,added:this.values.slice(),addedCount:this.values.length,removed:[],removedCount:0}),Fb(this,e)},t.prototype.getArrayLength=function(){return this.atom.reportObserved(),this.values.length},t.prototype.setArrayLength=function(e){if(typeof e!="number"||e<0)throw new Error("[mobx.array] Out of range: "+e);var n=this.values.length;if(e!==n)if(e>n){for(var r=new Array(e-n),i=0;io?e=o:e<0&&(e=Math.max(0,o+e)),arguments.length===1?n=o-e:n==null?n=0:n=Math.max(0,Math.min(n,o-e)),r===void 0&&(r=Dw),qu(this)){var a=Yu(this,{object:this.proxy,type:"splice",index:e,removedCount:n,added:r});if(!a)return Dw;n=a.removedCount,r=a.added}r=r.length===0?r:r.map(function(l){return i.enhancer(l,void 0)});var s=this.spliceItemsIntoValues(e,n,r);return(n!==0||r.length!==0)&&this.notifyArraySplice(e,r,s),this.dehanceValues(s)},t.prototype.spliceItemsIntoValues=function(e,n,r){var i;if(r.length-1?(this.splice(n,1),!0):!1},get:function(t){var e=this[Ln];if(e){if(t=0&&n++;break}t=xB(t),e=xB(e);var s=a==="[object Array]";if(!s){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(typeof l=="function"&&l instanceof l&&typeof u=="function"&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),r=r||[],i=i||[];for(var c=r.length;c--;)if(r[c]===t)return i[c]===e;if(r.push(t),i.push(e),s){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!MP(t[c],e[c],n-1,r,i))return!1}else{var d=Object.keys(t),f=void 0;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(f7e(e,f)&&MP(t[f],e[f],n-1,r,i)))return!1}return r.pop(),i.pop(),!0}function xB(t){return hc(t)?t.slice():Jm(t)||ls(t)||Lb(t)||wl(t)?Array.from(t.entries()):t}function f7e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function zw(t){return t[Symbol.iterator]=h7e,t}function h7e(){return this}if(typeof Proxy=="undefined"||typeof Symbol=="undefined")throw new Error("[mobx] MobX 5+ requires Proxy and Symbol objects. If your environment doesn't support Symbol or Proxy objects, please downgrade to MobX 4. For React Native Android, consider upgrading JSCore.");(function(){function t(){}if(t.name!=="testCodeMinification"&&!1)var e})();typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Nze,extras:{getDebugName:d7e},$mobx:Ln});function p7e(t){return!(t.prototype&&t.prototype.render)&&!ur.isPrototypeOf(t)}function MY(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.prefix,r=n===void 0?"":n,i=e.suffix,o=i===void 0?"":i,a=t.displayName||t.name||t.constructor&&t.constructor.name||"";return r+a+o}var CB=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RY=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},$Y=function(){function t(e,n){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:!1,r=t[e],i=LY[e],o=r?n===!0?function(){i.apply(this,arguments),r.apply(this,arguments)}:function(){r.apply(this,arguments),i.apply(this,arguments)}:i;t[e]=o}function kB(t,e){if(t==null||e==null||(typeof t=="undefined"?"undefined":CB(t))!=="object"||(typeof e=="undefined"?"undefined":CB(e))!=="object")return t!==e;var n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(var r=void 0,i=n.length-1;r=n[i];i--)if(e[r]!==t[r])return!0;return!1}var LY={componentWillMount:function(){var e=this,n=MY(this),r=!1,i=!1;function o(d){var f=this[d],h=$N("reactive "+d);Object.defineProperty(this,d,{configurable:!0,enumerable:!0,get:function(){return h.reportObserved(),f},set:function(g){!i&&kB(f,g)?(f=g,r=!0,h.reportChanged(),r=!1):f=g}})}o.call(this,"props"),o.call(this,"state");var a=this.render.bind(this),s=null,l=!1,u=function(){return s=new A0(n+".render()",function(){if(!l&&(l=!0,typeof e.componentWillReact=="function"&&e.componentWillReact(),e.__$mobxIsUnmounted!==!0)){var f=!0;try{i=!0,r||ur.prototype.forceUpdate.call(e),f=!1}finally{i=!1,f&&s.dispose()}}}),s.reactComponent=e,c.$mobx=s,e.render=c,c(e.props,e.state,e.context)},c=function(f,h,m){l=!1;var g=void 0,y=void 0;if(s.track(function(){try{y=v7e(!1,a,f,h,m)}catch(b){g=b}}),g)throw g;return y};this.render=u},componentWillUnmount:function(){this.render.$mobx&&this.render.$mobx.dispose(),this.__$mobxIsUnmounted=!0},componentDidMount:function(){},componentDidUpdate:function(){},shouldComponentUpdate:function(e,n){return this.state!==n?!0:kB(this.props,e)}};function jN(t){if(arguments.length>1&&EB.warn('Mobx observer: Using observer to inject stores is not supported. Use `@connect(["store1", "store2"]) ComponentClass instead or preferably, use `@inject("store1", "store2") @observer ComponentClass` or `inject("store1", "store2")(observer(componentClass))``'),t.isMobxInjector===!0&&EB.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),p7e(t)){var e,n;return jN((n=e=function(i){NY(o,i);function o(){return RY(this,o),DY(this,(o.__proto__||Object.getPrototypeOf(o)).apply(this,arguments))}return $Y(o,[{key:"render",value:function(){return t.call(this,this.props,this.context)}}]),o}(ur),e.displayName=MY(t),n))}if(!t)throw new Error("Please pass a valid component to 'observer'");var r=t.prototype||t;return y7e(r),t.isMobXReactObserver=!0,t}function y7e(t){TB(t,"componentWillMount",!0),TB(t,"componentDidMount"),t.shouldComponentUpdate||(t.shouldComponentUpdate=LY.shouldComponentUpdate)}var b7e=jN(function(t){var e=t.children;return e[0]()});b7e.displayName="Observer";var _7e=typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function O7e(t,e){return e={exports:{}},t(e,e.exports),e.exports}O7e(function(t,e){(function(n,r){t.exports=r()})(_7e,function(){var n={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i=Object.defineProperty,o=Object.getOwnPropertyNames,a=Object.getOwnPropertySymbols,s=Object.getOwnPropertyDescriptor,l=Object.getPrototypeOf,u=l&&l(Object);return function c(d,f,h){if(typeof f!="string"){if(u){var m=l(f);m&&m!==u&&c(d,m,h)}var g=o(f);a&&(g=g.concat(a(f)));for(var y=0;y1?Gt("div",null," ",i," "):i[0]}},{key:"getChildContext",value:function(){var r={},i=this.context.mobxStores;if(i)for(var o in i)r[o]=i[o];for(var a in this.props)!PB[a]&&a!=="suppressChangedStoreWarning"&&(r[a]=this.props[a]);return{mobxStores:r}}},{key:"componentWillReceiveProps",value:function(r){if(Object.keys(r).length!==Object.keys(this.props).length&&AB.warn("MobX Provider: The set of provided stores has changed. Please avoid changing stores as the change might not propagate to all children"),!r.suppressChangedStoreWarning)for(var i in r)!PB[i]&&this.props[i]!==r[i]&&AB.warn("MobX Provider: Provided store '"+i+"' has changed. Please avoid replacing stores as the change might not propagate to all children")}}]),e})(ur);if(!ur)throw new Error("mobx-preact requires Preact to be available");var Ru,zT,MB,IY=[],Ao=rr,RB=Ao.__b,$B=Ao.__r,NB=Ao.diffed,DB=Ao.__c,LB=Ao.unmount,IB=Ao.__;function w7e(){for(var t;t=IY.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(L1),t.__H.__h.forEach(RP),t.__H.__h=[]}catch(e){t.__H.__h=[],Ao.__e(e,t.__v)}}Ao.__b=function(t){Ru=null,RB&&RB(t)},Ao.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),IB&&IB(t,e)},Ao.__r=function(t){$B&&$B(t);var e=(Ru=t.__c).__H;e&&(zT===Ru?(e.__h=[],Ru.__h=[],e.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0})):(e.__h.forEach(L1),e.__h.forEach(RP),e.__h=[])),zT=Ru},Ao.diffed=function(t){NB&&NB(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(IY.push(e)!==1&&MB===Ao.requestAnimationFrame||((MB=Ao.requestAnimationFrame)||S7e)(w7e)),e.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0})),zT=Ru=null},Ao.__c=function(t,e){e.some(function(n){try{n.__h.forEach(L1),n.__h=n.__h.filter(function(r){return!r.__||RP(r)})}catch(r){e.some(function(i){i.__h&&(i.__h=[])}),e=[],Ao.__e(r,n.__v)}}),DB&&DB(t,e)},Ao.unmount=function(t){LB&&LB(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{L1(r)}catch(i){e=i}}),n.__H=void 0,e&&Ao.__e(e,n.__v))};var BB=typeof requestAnimationFrame=="function";function S7e(t){var e,n=function(){clearTimeout(r),BB&&cancelAnimationFrame(e),setTimeout(t)},r=setTimeout(n,100);BB&&(e=requestAnimationFrame(n))}function L1(t){var e=Ru,n=t.__c;typeof n=="function"&&(t.__c=void 0,n()),Ru=e}function RP(t){var e=Ru;t.__c=t.__(),Ru=e}function FB(t,e){for(var n in t)if(n!=="__source"&&!(n in e))return!0;for(var r in e)if(r!=="__source"&&t[r]!==e[r])return!0;return!1}function VB(t,e){this.props=t,this.context=e}(VB.prototype=new ur).isPureReactComponent=!0,VB.prototype.shouldComponentUpdate=function(t,e){return FB(this.props,t)||FB(this.state,e)};var jB=rr.__b;rr.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),jB&&jB(t)};var x7e=rr.__e;rr.__e=function(t,e,n,r){if(t.then){for(var i,o=e;o=o.__;)if((i=o.__c)&&i.__c)return e.__e==null&&(e.__e=n.__e,e.__k=n.__k),i.__c(t,e)}x7e(t,e,n,r)};var zB=rr.unmount;function BY(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),t.__c.__H=null),(t=function(r,i){for(var o in i)r[o]=i[o];return r}({},t)).__c!=null&&(t.__c.__P===n&&(t.__c.__P=e),t.__c=null),t.__k=t.__k&&t.__k.map(function(r){return BY(r,e,n)})),t}function FY(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(r){return FY(r,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function QT(){this.__u=0,this.t=null,this.__b=null}function VY(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function bO(){this.u=null,this.o=null}rr.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),zB&&zB(t)},(QT.prototype=new ur).__c=function(t,e){var n=e.__c,r=this;r.t==null&&(r.t=[]),r.t.push(n);var i=VY(r.__v),o=!1,a=function(){o||(o=!0,n.__R=null,i?i(s):s())};n.__R=a;var s=function(){if(!--r.__u){if(r.state.__a){var l=r.state.__a;r.__v.__k[0]=FY(l,l.__c.__P,l.__c.__O)}var u;for(r.setState({__a:r.__b=null});u=r.t.pop();)u.forceUpdate()}};r.__u++||32&e.__u||r.setState({__a:r.__b=r.__v.__k[0]}),t.then(a,a)},QT.prototype.componentWillUnmount=function(){this.t=[]},QT.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=BY(this.__b,n,r.__O=r.__P)}this.__b=null}var i=e.__a&&Gt(um,null,t.fallback);return i&&(i.__u&=-33),[Gt(um,null,e.__a?null:t.children),i]};var QB=function(t,e,n){if(++n[1]===n[0]&&t.o.delete(e),t.props.revealOrder&&(t.props.revealOrder[0]!=="t"||!t.o.size))for(n=t.u;n;){for(;n.length>3;)n.pop()();if(n[1]b.step||Math.abs(b.sumDeltaY)>b.step)){var x=b.sumDeltaX%b.step,C=b.sumDeltaY%b.step,E=b.sumDeltaX-x,T=b.sumDeltaY-C;b.sumDeltaX=x,b.sumDeltaY=C;var P=(O=b.model)===null||O===void 0?void 0:O.getData();b.isDragging||((S=b.eventCenter)===null||S===void 0||S.emit(pn["".concat(b.eventType,"_DRAGSTART")],{e:w,data:b.data||P}),b.onDragStart({event:w})),b.isDragging=!0,Promise.resolve().then(function(){var A,D;b.onDragging({deltaX:E,deltaY:T,event:w}),(A=b.eventCenter)===null||A===void 0||A.emit(pn["".concat(b.eventType,"_MOUSEMOVE")],{deltaX:E,deltaY:T,e:w,data:b.data||P}),(D=b.eventCenter)===null||D===void 0||D.emit(pn["".concat(b.eventType,"_DRAG")],{e:w,data:b.data||P})})}},this.handleMouseUp=function(w){var O=window.document;b.isStartDragging=!1,b.isStopPropagation&&w.stopPropagation(),Promise.resolve().then(function(){var S,x,C;O.removeEventListener("mousemove",b.handleMouseMove,!1),O.removeEventListener("mouseup",b.handleMouseUp,!1);var E=(S=b.model)===null||S===void 0?void 0:S.getData();(x=b.eventCenter)===null||x===void 0||x.emit(pn["".concat(b.eventType,"_MOUSEUP")],{e:w,data:b.data||E}),b.isDragging&&(b.isDragging=!1,b.onDragEnd({event:w}),(C=b.eventCenter)===null||C===void 0||C.emit(pn["".concat(b.eventType,"_DROP")],{e:w,data:b.data||E}))})},this.cancelDrag=function(){var w=window==null?void 0:window.document;w.removeEventListener("mousemove",b.handleMouseMove,!1),w.removeEventListener("mouseup",b.handleMouseUp,!1),b.onDragEnd({event:void 0}),b.isDragging=!1},this.destroy=function(){b.isStartDragging&&b.cancelDrag()},this.onDragStart=r,this.onDragging=o,this.onDragEnd=s,this.step=f,this.isStopPropagation=m,this.eventType=u,this.eventCenter=c,this.model=g,this.data=y}return t.prototype.setStep=function(e){this.step=e},t.prototype.setModel=function(e){this.model=e},t}(),Q7e=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{x:e-r/2,y:n-i/2,x1:e+r/2,y1:n+i/2}},H7e=function(t){var e=t.startPoint,n=t.endPoint,r=(e.x+n.x)/2,i=(e.y+n.y)/2,o=Math.abs(e.x-n.x)+10,a=Math.abs(e.y-n.y)+10;return{x:r-o/2,y:i-a/2,x1:r+o/2,y1:i+a/2}},W7e=function(t){var e=t.points,n=sp(e),r=N0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},U7e=function(t){var e=t.path,n=zN(e),r=N0(n,8),i=r.x,o=r.y,a=r.width,s=r.height;return{x:i-a/2,y:o-s/2,x1:i+a/2,y1:o+s/2}},q7e=function(t){if(t.modelType===Kn.LINE_EDGE)return H7e(t);if(t.modelType===Kn.POLYLINE_EDGE)return W7e(t);if(t.modelType===Kn.BEZIER_EDGE)return U7e(t)},Y7e=function(t,e,n,r){var i=(e.y-t.y)*(r.x-n.x)-(t.x-e.x)*(n.y-r.y);if(i===0)return!1;var o=((e.x-t.x)*(r.x-n.x)*(n.y-t.y)+(e.y-t.y)*(r.x-n.x)*t.x-(r.y-n.y)*(e.x-t.x)*n.x)/i,a=-((e.y-t.y)*(r.y-n.y)*(n.x-t.x)+(e.x-t.x)*(r.y-n.y)*t.y-(r.x-n.x)*(e.y-t.y)*n.y)/i;return(o-t.x)*(o-e.x)<=0&&(a-t.y)*(a-e.y)<=0&&(o-n.x)*(o-r.x)<=0&&(a-n.y)*(a-r.y)<=0?{x:o,y:a}:!1},R0=function(t,e,n){var r=t.x,i=t.y,o=e.x,a=e.y,s=n.x,l=n.y,u=(l-a)/(s-o),c=a-u*o;return(r>=o&&r<=s||r<=o&&r>=s)&&(i>=a&&i<=l||i<=a&&i>=l)&&Math.abs(i-u*r-c)=e.x?(a.leftX=e.x+u*Math.sin(s+l),a.leftY=e.y-u*Math.cos(s+l),a.rightX=e.x-u*Math.sin(s-l),a.rightY=e.y+u*Math.cos(s-l)):(a.leftX=e.x-u*Math.sin(s+l),a.leftY=e.y+u*Math.cos(s+l),a.rightX=e.x+u*Math.sin(s-l),a.rightY=e.y-u*Math.cos(s-l)):o==="end"&&(n.x>=e.x?(a.leftX=n.x+u*Math.sin(s-l),a.leftY=n.y-u*Math.cos(s-l),a.rightX=n.x-u*Math.sin(s+l),a.rightY=n.y+u*Math.cos(s+l)):(a.leftX=n.x-u*Math.sin(s-l),a.leftY=n.y+u*Math.cos(s-l),a.rightX=n.x+u*Math.sin(s+l),a.rightY=n.y-u*Math.cos(s+l))),a},vg=globalThis&&globalThis.__assign||function(){return vg=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Hd=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;rr/e.height?di.HORIZONTAL:di.VERTICAL},Hw=function(t,e,n){var r=Z7e(n,e);return r===di.HORIZONTAL?{x:n.x>t.centerX?t.maxX:t.minX,y:n.y}:{x:n.x,y:n.y>t.centerY?t.maxY:t.minY}},ZB=function(t,e){var n=Math.min(t.minX,e.minX),r=Math.min(t.minY,e.minY),i=Math.max(t.maxX,e.maxX),o=Math.max(t.maxY,e.maxY);return{x:(n+i)/2,y:(r+o)/2,centerX:(n+i)/2,centerY:(r+o)/2,minX:n,minY:r,maxX:i,maxY:o,height:o-r,width:i-n}},N0=function(t,e){t===void 0&&(t=[]);var n=[],r=[];t.forEach(function(c){n.push(c.x),r.push(c.y)});var i=Math.min.apply(Math,Hd([],ol(n),!1)),o=Math.max.apply(Math,Hd([],ol(n),!1)),a=Math.min.apply(Math,Hd([],ol(r),!1)),s=Math.max.apply(Math,Hd([],ol(r),!1)),l=o-i,u=s-a;return e&&(l+=e,u+=e),{centerX:(i+o)/2,centerY:(a+s)/2,maxX:o,maxY:s,minX:i,minY:a,x:(i+o)/2,y:(a+s)/2,height:u,width:l}},Ww=function(t){var e=t.minX,n=t.minY,r=t.maxX,i=t.maxY;return[{x:e,y:n},{x:r,y:n},{x:r,y:i},{x:e,y:i}]},OO=function(t,e){var n=t.x,r=t.y;return ne.maxX||re.maxY},G7e=function(t,e){return et.maxX?[]:[{x:e,y:t.minY},{x:e,y:t.maxY}]},K7e=function(t,e){return et.maxY?[]:[{x:t.minX,y:e},{x:t.maxX,y:e}]},J7e=function(t,e){return Hd(Hd([],ol(G7e(t,e.x)),!1),ol(K7e(t,e.y)),!1)},NP=function(t,e){return Math.abs(t.x-e.x)+Math.abs(t.y-e.y)},e9e=function(t,e){var n=-2,r=0;return e.forEach(function(i){i&&(t.x===i.x&&(r+=n),t.y===i.y&&(r+=n))}),r},GB=function(t,e,n,r,i){return NP(t,e)+NP(t,n)+e9e(t,[e,n,r,i])},jY=function(t,e,n,r,i){i||(i=0),t.unshift(e[r]),n[r]&&n[r]!==r&&i<=100&&jY(t,e,n,n[r],i+1)},t9e=function(t,e){var n=t.indexOf(e);n>-1&&t.splice(n,1)},oy=function(t,e,n,r){var i=e.x-t.x,o=e.y-t.y,a=r.x-n.x,s=r.y-n.y,l=(-o*(t.x-n.x)+i*(t.y-n.y))/(-a*o+i*s),u=(a*(t.y-n.y)-s*(t.x-n.x))/(-a*o+i*s);return l>=0&&l<=1&&u>=0&&u<=1},KB=function(t,e,n){if(n.width===0&&n.height===0)return!1;var r=ol(Ww(n),4),i=r[0],o=r[1],a=r[2],s=r[3];return oy(t,e,i,o)||oy(t,e,i,s)||oy(t,e,o,a)||oy(t,e,a,s)},n9e=function(t,e,n,r){var i=[];return t.forEach(function(o){o!==e&&(o.x===e.x||o.y===e.y)&&!KB(o,e,n)&&!KB(o,e,r)&&i.push(o)}),$P(i)},r9e=function(t,e,n,r,i,o,a){var s=[],l=[e],u={},c={},d={};e.id&&(c[e.id]=0,d[e.id]=GB(e,n,e));var f={};t.forEach(function(g){g.id&&(f[g.id]=g)});for(var h=function(){var g,y=1/0;if(l.forEach(function(w){w.id&&d[w.id]=c[w.id])return;u[w.id]=g.id,c[w.id]=O,d[w.id]=c[w.id]+GB(w,n,e,o,a)}})};l.length;){var m=h();if(typeof m=="object")return m.value}return[e,n]},JB=function(t){return ja(t)},zY=function(t){for(var e=1;e2&&(b=zY(b)),$P(b)},i9e=function(t){if(t.length===1){var e=ol(t,1),n=e[0];return[n,n]}else{for(var r=t[0],i=t[1],o=Kl(r.x,r.y,i.x,i.y),a=1;ao&&(o=u,r=s,i=l)}return[r,i]}},t6=function(t,e,n){var r=Wd(t,n),i=Wd(e,n);return r&&i},n6=function(t,e,n){var r=Wd(t,n),i=Wd(e,n),o=r&&i,a=r||i;return!o&&a},r6=function(t,e,n){for(var r=void 0,i=ja(n),o=Ww(i),a=0;a=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=2}return e},a9e=function(t){var e=t.start,n=t.end,r;if(e.x===n.x&&e.y===n.y)r="";else{var i={start:e,end:n,offset:10,verticalLength:5},o=$0(vg(vg({},i),{type:"start"})),a=$0(vg(vg({},i),{type:"end"}));r="M".concat(o.leftX," ").concat(o.leftY,` L`).concat(o.rightX," ").concat(o.rightY,` L`).concat(a.rightX," ").concat(a.rightY,` L`).concat(a.leftX," ").concat(a.leftY," z")}return{d:r,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},o6=function(t){var e=t.start,n=t.end,r=t.sourceNode,i=t.targetNode,o=t.offset,a=ja(r),s=ja(i),l=Qw(a,o),u=Qw(s,o),c=Hw(l,a,e),d=Hw(u,s,n);return{sNext:c,ePre:d}},zN=function(t){var e=t.replace(/M/g,"").replace(/C/g,",").split(","),n=wO(e[0]),r=wO(e[1]),i=wO(e[2]),o=wO(e[3]);return[n,r,i,o]},wO=function(t){var e=ol(t.replace(/(^\s*)/g,"").split(" "),2),n=e[0],r=e[1];return{x:+n,y:+r}},a6=function(t,e){var n=ol(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=q9e(r,i,o,a,e);return[s,t[3]]},HY=function(t,e){for(var n=t.x,r=t.y,i=sp(e),o=Number.MAX_SAFE_INTEGER,a,s=[],l=0;li?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Xp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},SO=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},WT=function(t,e,n){var r=HT(t,2),i=r[0],o=r[1],a=HT(e,2),s=a[0],l=a[1],u=HT(n,2),c=u[0],d=u[1];return i>s&&il&&o=0?i:-i},e}(UY),DP=function(t){QN(e,t);function e(n,r){var i=t.call(this,n,r,1)||this;return Object.setPrototypeOf(i,e.prototype),i}return e.prototype.toString=function(){return"Point"},e}(UY),pC=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Zp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},UT=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;i--){var o=n[i],a=g9e(t,o);if(a){var s=o.getTargetAnchor(t);if(s){var l={node:o,anchorIndex:s.index,anchor:s.anchor};(!r||h9e(o,r.node,e))&&(r=l)}}}return r},h9e=function(t,e,n){return t.zIndex>e.zIndex?!0:n.nodesMap[t.id].index>n.nodesMap[e.id].index},p9e=function(t,e){for(var n=LP(e),r,i=Number.MAX_SAFE_INTEGER,o=0;o=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},g9e=function(t,e){var n=!1,r=5,i=ja(e);return t.x>=i.minX-r&&t.x<=i.maxX+r&&t.y>=i.minY-r&&t.y<=i.maxY+r&&(n=!0),n},ja=function(t){var e=t.x,n=t.y,r=t.width,i=t.height;return{minX:e-r/2,minY:n-i/2,maxX:e+r/2,maxY:n+i/2,x:e,y:n,width:r,height:i,centerX:e,centerY:n}},m9e=function(t){var e=t,n=e.x,r=e.y,i=e.width,o=e.height,a=e.radius;return[{x:n-i/2+a,y:r-o/2+a,r:a},{x:n+i/2-a,y:r-o/2+a,r:a},{x:n-i/2+a,y:r+o/2-a,r:a},{x:n+i/2-a,y:r+o/2-a,r:a}]},u6=function(t,e,n){var r=m9e(n),i,o=Number.MAX_SAFE_INTEGER;return r.forEach(function(a){var s=Kl(t.x,t.y,a.x,a.y);su.minX&&t.xu.minY&&t.yc.x&&(d=c,f=u);var h={x:t.x,y:t.y};if(d.x===f.x&&e===di.HORIZONTAL&&(h={x:d.x,y:t.y}),d.y===f.y&&e===di.VERTICAL&&(h={x:t.x,y:d.y}),d.x!==f.x&&d.y!==f.y){var m=(f.y-d.y)/(f.x-d.x),g=(d.x*f.y-f.x*d.y)/(d.x-f.x);e===di.HORIZONTAL?h={x:(t.y-g)/m,y:t.y}:e===di.VERTICAL&&(h={x:t.x,y:m*t.x+g})}var y=R0(h,u,c);if(y){var b=Kl(h.x,h.y,t.x,t.y);bt.x?i=t.x+n/2:e.xt.y?o=t.y+r/2:e.y1?e.forEach(function(s){var l=document.createElement("div");l.textContent=s,o.appendChild(l)}):o.textContent=e[0],document.body.appendChild(o);var a=o.clientHeight;return document.body.removeChild(o),a},h6=function(t){var e=t.rows,n=t.rowsLength,r=t.fontSize,i=0;return e&&e.forEach(function(o){var a=QY(o);i=a>i?a:i}),{width:Math.ceil(i/2)*r+r/4,height:n*(r+2)+r/4}},Xw=function(t){return typeof t!="object"?{isAllPass:!!t,msg:t?"":"\u4E0D\u5141\u8BB8\u8FDE\u63A5"}:t};let CO;const y9e=new Uint8Array(16);function b9e(){if(!CO&&(CO=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!CO))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return CO(y9e)}const Po=[];for(let t=0;t<256;++t)Po.push((t+256).toString(16).slice(1));function _9e(t,e=0){return Po[t[e+0]]+Po[t[e+1]]+Po[t[e+2]]+Po[t[e+3]]+"-"+Po[t[e+4]]+Po[t[e+5]]+"-"+Po[t[e+6]]+Po[t[e+7]]+"-"+Po[t[e+8]]+Po[t[e+9]]+"-"+Po[t[e+10]]+Po[t[e+11]]+Po[t[e+12]]+Po[t[e+13]]+Po[t[e+14]]+Po[t[e+15]]}const O9e=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var p6={randomUUID:O9e};function BP(t,e,n){if(p6.randomUUID&&!e&&!t)return p6.randomUUID();t=t||{};const r=t.random||(t.rng||b9e)();if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,e){n=n||0;for(let i=0;i<16;++i)e[n+i]=r[i];return e}return _9e(r)}var nf=function(){return BP()},Py=new Map,YY=function(t){var e=nf();function n(){t();var i=Py.get(e);if(i){var o=window.requestAnimationFrame(n);Py.set(e,o)}}var r=window.requestAnimationFrame(n);return Py.set(e,r),e},Zw=function(t){var e=Py.get(t);e&&(window.cancelAnimationFrame(e),Py.delete(t))},D0=globalThis&&globalThis.__assign||function(){return D0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function XY(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.value,a=t.fontSize,s=a===void 0?12:a,l=t.fill,u=l===void 0?"currentColor":l,c=t.overflowMode,d=c===void 0?"default":c,f=t.textWidth,h=f===void 0?void 0:f,m=t.model,g={x:n,y:i,fill:u,fontSize:s,textAnchor:"middle",dominantBaseline:"central"};if(jn(Gu(t),function(x){var C=w9e(x,2),E=C[0],T=C[1];typeof T!="object"&&(g[E]=T)}),o){var y=String(o).split(/[\r\n]/g),b=y.length;if(d!=="default"){var w=m.BaseType,O=m.modelType;if(w===Si.NODE&&O!==Kn.TEXT_NODE||w===Si.EDGE&&h)return S9e(t)}if(b>1){var S=y.map(function(x,C){var E=s+2,T=(C-(b-1)/2)*E;return rt("tspan",{className:"lf-text-tspan",x:n,y:i+T,children:x})});return rt("text",D0({},g,{children:S}))}return rt("text",D0({},g,{children:o}))}return null}function S9e(t){var e=t.x,n=t.y,r=t.value,i=t.model,o=t.textWidth,a=t.fontSize,s=a===void 0?12:a,l=t.lineHeight,u=t.fontFamily,c=u===void 0?"":u,d=t.wrapPadding,f=d===void 0?"0, 0":d,h=t.overflowMode,m=i.width,g=i.height,y=i.textHeight,b=o||m,w=String(r).split(/[\r\n]/g),O=w.length,S=qY({rows:w,style:{fontSize:"".concat(s,"px"),width:"".concat(b,"px"),fontFamily:c,lineHeight:l,padding:f},rowsLength:O,className:"lf-get-text-height"}),x=g>S?g:S;y&&(x=y);var C=h==="ellipsis";return C&&(x=s+2),rt("g",{children:rt("foreignObject",{width:b,height:x,x:e-b/2,y:n-x/2,style:{overflow:"visible",textAlign:"left"},children:rt("div",{className:"lf-node-text-auto-wrap",style:{minHeight:x,width:b,padding:f},children:rt("div",{className:C?"lf-node-text-ellipsis-content":"lf-node-text-auto-wrap-content",title:C?w.join(""):"",style:D0({},t),children:w.map(function(E){return rt("div",{className:"lf-node-text--auto-wrap-inner",children:E})})})})})})}var FP=globalThis&&globalThis.__assign||function(){return FP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function ym(t){var e={x1:10,y1:10,x2:20,y2:20,stroke:"black"};return jn(Gu(t),function(n){var r=x9e(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("line",FP({},e))}var VP=globalThis&&globalThis.__assign||function(){return VP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function al(t){var e=t.x,n=t.y,r=t.width,i=t.height,o=t.className,a=t.strokeWidth,s=t.radius,l=s===void 0?0:s,u=e-r/2,c=n-i/2,d={};return d["stroke-width"]=a,jn(Gu(t),function(f){var h=C9e(f,2),m=h[0],g=h[1];typeof g!="object"&&(d[m]=g)}),o?d.className="lf-basic-shape ".concat(o):d.className="lf-basic-shape",l&&(d.rx=l,d.ry=l),d.x=u,d.y=c,rt("rect",VP({},d))}var jP=globalThis&&globalThis.__assign||function(){return jP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function L0(t){var e={d:""};return jn(Gu(t),function(n){var r=E9e(n,2),i=r[0],o=r[1];(i==="style"||typeof o!="object")&&(e[i]=o)}),rt("path",jP({},e))}var zP=globalThis&&globalThis.__assign||function(){return zP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function bm(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.r,a=o===void 0?4:o,s=t.className,l={cx:n,cy:i,r:a,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return jn(Gu(t),function(u){var c=T9e(u,2),d=c[0],f=c[1];typeof f!="object"&&(l[d]=f)}),s?l.className="lf-basic-shape ".concat(s):l.className="lf-basic-shape",rt("circle",zP({},l))}var QP=globalThis&&globalThis.__assign||function(){return QP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function P9e(t){var e=t.x,n=e===void 0?0:e,r=t.y,i=r===void 0?0:r,o=t.rx,a=o===void 0?4:o,s=t.ry,l=s===void 0?4:s,u=t.className,c={cx:n,cy:i,rx:a,ry:l,fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1};return jn(Gu(t),function(d){var f=k9e(d,2),h=f[0],m=f[1];typeof m!="object"&&(c[h]=m)}),u?c.className="lf-basic-shape ".concat(u):c.className="lf-basic-shape",rt("ellipse",QP({},c))}var HP=globalThis&&globalThis.__assign||function(){return HP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function HN(t){var e=t.points,n=e===void 0?[]:e,r=t.className,i={fill:"transparent",fillOpacity:1,strokeWidth:1,stroke:"#000",strokeOpacity:1,points:""};return jn(Gu(t),function(o){var a=A9e(o,2),s=a[0],l=a[1];typeof l!="object"&&(i[s]=l)}),r?i.classNmae="lf-basic-shape ".concat(r):i.className="lf-basic-shape",i.points=n.map(function(o){return o.join(",")}).join(" "),rt("polygon",HP({},i))}var WP=globalThis&&globalThis.__assign||function(){return WP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o};function R9e(t){var e=t.className,n={points:"",fill:"none"};return jn(Gu(t),function(r){var i=M9e(r,2),o=i[0],a=i[1];(o==="style"||typeof a!="object")&&(n[o]=a)}),e&&(n.className="".concat(e)),rt("polyline",WP({},n))}var ZY=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),I0=globalThis&&globalThis.__assign||function(){return I0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Qr;(function(t){t[t.LEFT_TOP=0]="LEFT_TOP",t[t.RIGHT_TOP=1]="RIGHT_TOP",t[t.RIGHT_BOTTOM=2]="RIGHT_BOTTOM",t[t.LEFT_BOTTOM=3]="LEFT_BOTTOM"})(Qr||(Qr={}));var D9e=function(t){ZY(e,t);function e(n){var r=t.call(this)||this;r.updateEdgePointByAnchors=function(){var s=r.nodeModel,l=s.id,u=s.anchors,c=r.graphModel.getNodeEdges(l);jn(c,function(d){if(d.sourceNodeId===l){var f=hf(u,function(h){return h.id===d.sourceAnchorId});f&&d.updateStartPoint({x:f.x,y:f.y})}else if(d.targetNodeId===l){var f=hf(u,function(m){return m.id===d.targetAnchorId});f&&d.updateEndPoint({x:f.x,y:f.y})}})},r.triggerResizeEvent=function(s,l,u,c,d,f){r.graphModel.eventCenter.emit(pn.NODE_RESIZE,{preData:s,data:l,deltaX:u,deltaY:c,index:d,model:f})},r.recalcResizeInfo=function(s,l,u,c,d){u===void 0&&(u=1),c===void 0&&(c=!1),d===void 0&&(d=!1);var f=Fn(l),h=f.deltaX,m=f.deltaY,g=f.width,y=f.height,b=f.PCTResizeInfo;if(b){var w=4,O=0,S=0;switch(s){case Qr.LEFT_TOP:S=(h*-1-m)/w;break;case Qr.RIGHT_TOP:S=(h-m)/w;break;case Qr.RIGHT_BOTTOM:S=(h+m)/w;break;case Qr.LEFT_BOTTOM:S=(h*-1+m)/w;break}S!==0&&(O=Math.round(S/b.ResizeBasis.basisHeight*1e5)/1e3),b.ResizePCT.widthPCT=Math.max(Math.min(b.ResizePCT.widthPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit),b.ResizePCT.heightPCT=Math.max(Math.min(b.ResizePCT.heightPCT+O,b.ScaleLimit.maxScaleLimit),b.ScaleLimit.minScaleLimit);var x=Math.round(b.ResizePCT.widthPCT*b.ResizeBasis.basisWidth/100),C=Math.round(b.ResizePCT.heightPCT*b.ResizeBasis.basisHeight/100);switch(s){case Qr.LEFT_TOP:h=g-x,m=y-C;break;case Qr.RIGHT_TOP:h=x-g,m=y-C;break;case Qr.RIGHT_BOTTOM:h=x-g,m=C-y;break;case Qr.LEFT_BOTTOM:h=g-x,m=C-y;break}return f}switch(s){case Qr.LEFT_TOP:f.width=c?g:g-h*u,f.height=d?y:y-m*u;break;case Qr.RIGHT_TOP:f.width=c?g:g+h*u,f.height=d?y:y-m*u;break;case Qr.RIGHT_BOTTOM:f.width=c?g:g+h*u,f.height=d?y:y+m*u;break;case Qr.LEFT_BOTTOM:f.width=c?g:g-h*u,f.height=d?y:y+m*u;break}return f},r.resizeNode=function(s){var l=s.deltaX,u=s.deltaY,c=r.index,d=r.props,f=d.model,h=d.graphModel,m=d.x,g=d.y;GY({x:m,y:g,deltaX:l,deltaY:u,index:c,nodeModel:f,graphModel:h,cancelCallback:function(){r.dragHandler.cancelDrag()}})},r.onDragging=function(s){var l=s.deltaX,u=s.deltaY,c=r.graphModel.transformModel,d=N9e(c.fixDeltaXY(l,u),2),f=d[0],h=d[1];r.resizeNode({deltaX:f,deltaY:h})},r.onDragEnd=function(){var s=r.nodeModel.x,l=r.nodeModel.y;r.nodeModel.moveTo(s,l),r.updateEdgePointByAnchors()};var i=n.index,o=n.model,a=n.graphModel;return r.index=i,r.nodeModel=o,r.graphModel=a,r.dragHandler=new kl({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:a.gridSize}),r}return e.prototype.componentWillUnmount=function(){this.dragHandler.destroy()},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.direction,a=n.model,s=a.getResizeControlStyle(),l=s.width,u=s.height,c=$9e(s,["width","height"]);return rt("g",{className:"lf-resize-control lf-resize-control-".concat(o),children:[rt(al,I0({className:"lf-resize-control-content",x:r,y:i,width:l!=null?l:7,height:u!=null?u:7},c)),rt(al,{className:"lf-resize-control-content",x:r,y:i,width:25,height:25,fill:"transparent",stroke:"transparent",onMouseDown:this.dragHandler.handleMouseDown})]})},e}(ur),L9e=function(t){ZY(e,t);function e(){return t.call(this)||this}return e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=ja(r),a=o.minX,s=o.minY,l=o.maxX,u=o.maxY,c=[{index:Qr.LEFT_TOP,direction:"nw",x:a,y:s},{index:Qr.RIGHT_TOP,direction:"ne",x:l,y:s},{index:Qr.RIGHT_BOTTOM,direction:"se",x:l,y:u},{index:Qr.LEFT_BOTTOM,direction:"sw",x:a,y:u}];return Ca(c,function(d){return rt(D9e,I0({},d,{model:r,graphModel:i}))})},e.prototype.getResizeOutline=function(){var n=this.props.model,r=n.x,i=n.y,o=n.width,a=n.height,s=n.getResizeOutlineStyle();return rt(al,I0({},s,{x:r,y:i,width:o,height:a}))},e.prototype.render=function(){return rt("g",{className:"lf-resize-control-group",children:[this.getResizeOutline(),this.getResizeControl()]})},e}(ur);function I9e(t,e){var n=t.x,r=t.y,i=e.x,o=e.y,a={x:n+(i-n)/2,y:r+(o-r)/2};return a}function ay(t,e,n){var r=B9e(n),i=t.x-e.x,o=t.y-e.y,a=i*Math.cos(r)-o*Math.sin(r)+e.x,s=i*Math.sin(r)+o*Math.cos(r)+e.y;return{x:a,y:s}}function B9e(t){return t*Math.PI/180}function F9e(t){return t/Math.PI*180}function V9e(t,e,n,r,i,o,a,s,l){s===void 0&&(s=!1),l===void 0&&(l=!1);var u=e.deltaX,c=e.deltaY,d=e.width,f=e.height,h=F9e(n),m={x:r,y:i},g={x:o,y:a},y=ay(m,g,h),b={x:y.x+u,y:y.y+c},w=H9e(y,b,g,h,s,l,d,f),O=w.width,S=w.height,x=w.center;return e.width=O*t,e.height=S*t,e.deltaX=(x.x-g.x)*2,e.deltaY=(x.y-g.y)*2,e}var j9e=function(t,e,n,r,i,o,a,s,l,u){n===void 0&&(n=1),r===void 0&&(r=!1),i===void 0&&(i=!1),o===void 0&&(o=0);var c=Fn(e),d=c.deltaX,f=c.deltaY,h=c.width,m=c.height,g=c.PCTResizeInfo;if(g){var y=4,b=0,w=0;switch(t){case Qr.LEFT_TOP:w=(d*-1-f)/y;break;case Qr.RIGHT_TOP:w=(d-f)/y;break;case Qr.RIGHT_BOTTOM:w=(d+f)/y;break;case Qr.LEFT_BOTTOM:w=(d*-1+f)/y;break}w!==0&&(b=Math.round(w/g.ResizeBasis.basisHeight*1e5)/1e3),g.ResizePCT.widthPCT=Math.max(Math.min(g.ResizePCT.widthPCT+b,g.ScaleLimit.maxScaleLimit),g.ScaleLimit.minScaleLimit),g.ResizePCT.heightPCT=Math.max(Math.min(g.ResizePCT.heightPCT+b,g.ScaleLimit.maxScaleLimit),g.ScaleLimit.minScaleLimit);var O=Math.round(g.ResizePCT.widthPCT*g.ResizeBasis.basisWidth/100),S=Math.round(g.ResizePCT.heightPCT*g.ResizeBasis.basisHeight/100);switch(t){case Qr.LEFT_TOP:d=h-O,f=m-S;break;case Qr.RIGHT_TOP:d=O-h,f=m-S;break;case Qr.RIGHT_BOTTOM:d=O-h,f=S-m;break;case Qr.LEFT_BOTTOM:d=h-O,f=S-m;break}return c}if(o%(2*Math.PI)!==0&&a!==void 0&&s!==void 0)return V9e(n,c,o,a,s,l,u,r,i);switch(t){case Qr.LEFT_TOP:c.width=r?h:h-d*n,c.height=i?m:m-f*n;break;case Qr.RIGHT_TOP:c.width=r?h:h+d*n,c.height=i?m:m-f*n;break;case Qr.RIGHT_BOTTOM:c.width=r?h:h+d*n,c.height=i?m:m+f*n;break;case Qr.LEFT_BOTTOM:c.width=r?h:h-d*n,c.height=i?m:m+f*n;break}return c},z9e=function(t,e){var n=t.id,r=t.anchors,i=e.getNodeEdges(n);jn(i,function(o){if(o.sourceNodeId===n){var a=hf(r,function(s){return s.id===o.sourceAnchorId});a&&o.updateStartPoint({x:a.x,y:a.y})}else if(o.targetNodeId===n){var a=hf(r,function(l){return l.id===o.targetAnchorId});a&&o.updateEndPoint({x:a.x,y:a.y})}})},Q9e=function(t,e,n,r,i,o,a){a.eventCenter.emit(pn.NODE_RESIZE,{preData:t,data:e,deltaX:n,deltaY:r,index:i,model:o})},GY=function(t){var e=t.x,n=t.y,r=t.deltaX,i=t.deltaY,o=t.index,a=t.nodeModel,s=t.graphModel,l=t.cancelCallback,u=a.r,c=a.rx,d=a.ry,f=a.width,h=a.height,m=a.PCTResizeInfo,g=a.minWidth,y=a.minHeight,b=a.maxWidth,w=a.maxHeight,O=a.rotate,S=a.x,x=a.y,C=g===b,E=y===w,T={width:u||c||f,height:u||d||h,deltaX:r,deltaY:i,PCTResizeInfo:m},P=u||c&&d?1/2:1,A=e,D=n,N=j9e(o,T,P,C,E,O,A,D,S,x);if(N.widthb||N.heightw){l==null||l();return}(O%(2*Math.PI)==0||m||A===void 0||D===void 0)&&(N.deltaX=C?0:N.deltaX,N.deltaY=E?0:N.deltaY);var $=a.getData(),W=a.resize(N);$.x===W.x&&$.y===W.y||(z9e(a,s),Q9e($,W,r,i,o,a,s))};function H9e(t,e,n,r,i,o,a,s){i===void 0&&(i=!1),o===void 0&&(o=!1);var l={x:n.x-(t.x-n.x),y:n.y-(t.y-n.y)},u=I9e(l,e),c=ay(e,u,-r),d=ay(l,u,-r);if(i){var f=Math.abs(c.x-d.x),h=f-a;u.x>c.x?u.x=u.x+h/2:u.x=u.x-h/2}if(o){var m=Math.abs(c.y-d.y),g=m-s;u.y>c.y?u.y=u.y+g/2:u.y=u.y-g/2}if(i||o){var y=ay(d,u,r),b=y.x-l.x,w=y.y-l.y;u.x=u.x-b,u.y=u.y-w,d=ay(l,u,-r),c={x:u.x-(d.x-u.x),y:u.y-(d.y-u.y)}}var O=Math.abs(c.x-d.x),S=Math.abs(c.y-d.y);return i&&(O=a),o&&(S=s),{width:O,height:S,center:u}}var W9e=100,U9e={x:1,y:0,z:0};function q9e(t,e,n,r,i){for(var o=function(h){if(h<0||h>1)throw new RangeError('The value range of parameter "t" is [0,1]');return{x:t.x*Math.pow(1-h,3)+3*e.x*h*Math.pow(1-h,2)+3*n.x*Math.pow(h,2)*(1-h)+r.x*Math.pow(h,3),y:t.y*Math.pow(1-h,3)+3*e.y*h*Math.pow(1-h,2)+3*n.y*Math.pow(h,2)*(1-h)+r.y*Math.pow(h,3)}},a=0,s=2,l=r.x,u=r.y,c=r;a=0?r:-r}function g6(t){var e=Math.hypot(t.x,t.y);return{x:t.x/e,y:t.y/e,z:0}}function G9e(t){return Z9e(U9e,t)}function K9e(t){return t*(180/Math.PI)}var J9e={baseNode:{fill:"#fff",stroke:"#000",strokeWidth:2},baseEdge:{stroke:"#000",strokeWidth:2},rect:{},circle:{},diamond:{},ellipse:{},polygon:{},text:{color:"#000",stroke:"none",fontSize:12,background:{fill:"transparent"}},anchor:{stroke:"#000",fill:"#fff",r:4,hover:{r:10,fill:"#949494",fillOpacity:.5,stroke:"#949494"}},anchorLine:{stroke:"#000",strokeWidth:2,strokeDasharray:"3,2"},nodeText:{color:"#000",overflowMode:"default",fontSize:12,lineHeight:1.2},edgeText:{textWidth:100,overflowMode:"default",fontSize:12,background:{fill:"#fff"}},line:{},polyline:{},bezier:{fill:"none",adjustLine:{stroke:"#949494"},adjustAnchor:{r:4,fill:"#949494",fillOpacity:1,stroke:"#949494"}},arrow:{offset:10,verticalLength:5},snapline:{stroke:"#949494",strokeWidth:1},edgeAdjust:{r:4,fill:"#fff",stroke:"#949494",strokeWidth:2},outline:{fill:"transparent",stroke:"#949494",strokeDasharray:"3,3",hover:{stroke:"#949494"}},edgeAnimation:{stroke:"red",strokeDasharray:"10,10",strokeDashoffset:"100%",animationName:"lf_animate_dash",animationDuration:"20s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"normal"},rotateControl:{stroke:"#000",fill:"#fff",strokeWidth:1.5},resizeControl:{width:7,height:7,fill:"#fff",stroke:"#000"},resizeOutline:{fill:"none",stroke:"transparent",strokeWidth:1,strokeDasharray:"3,3"}},KY=function(t){var e=Fn(J9e);return t&&(e=Jh(e,t)),e},eQe=KY,tQe=1e3,nQe=999,WN=function(){return++tQe},rQe=function(){return--nQe},Fi=globalThis&&globalThis.__assign||function(){return Fi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vC=function(){function t(e,n){var r;this.BaseType=Si.EDGE,this.id="",this.type="",this.sourceNodeId="",this.targetNodeId="",this.textMode=hl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this.points="",this.pointsList=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.isAnimation=!1,this.isShowAdjustPoint=!1,this.zIndex=0,this.state=Cr.DEFAULT,this.modelType=Kn.EDGE,this.customTextPosition=!1,this.style={},this.arrowConfig={markerEnd:"url(#marker-end-".concat(this.id,")"),markerStart:"url(#marker-start-".concat(this.id,")")},this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initEdgeData(e),this.setAttributes()}return t.prototype.initEdgeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||nf()}this.arrowConfig.markerEnd="url(#marker-end-".concat(e.id,")"),this.arrowConfig.markerStart="url(#marker-start-".concat(e.id,")");var o=this.graphModel.editConfigModel.adjustEdgeStartAndEnd;this.isShowAdjustPoint=o,$r(this,s9e(e));var a=this.graphModel.overlapMode;a===Yl.INCREASE&&(this.zIndex=e.zIndex||WN()),this.setAnchors(),this.initPoints(),this.formatText(e)},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.getEdgeStyle=function(){return Fi(Fi({},this.graphModel.theme.baseEdge),this.style)},t.prototype.getAdjustPointStyle=function(){return Fi({},this.graphModel.theme.edgeAdjust)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.edgeText;return Fn(e)},t.prototype.getEdgeAnimationStyle=function(){var e=this.graphModel.theme.edgeAnimation;return Fn(e)},t.prototype.getArrowStyle=function(){var e=this.getEdgeStyle(),n=this.getEdgeAnimationStyle(),r=this.graphModel.theme.arrow,i=this.isAnimation?n.stroke:e.stroke;return Fi(Fi(Fi({},e),{fill:i,stroke:i}),r)},t.prototype.getOutlineStyle=function(){var e=this.graphModel,n=e.theme.outline;return Fn(n)},t.prototype.getTextPosition=function(){return{x:0,y:0}},Object.defineProperty(t.prototype,"sourceNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.sourceNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"targetNode",{get:function(){var e,n;return(n=(e=this.graphModel)===null||e===void 0?void 0:e.nodesMap[this.targetNodeId])===null||n===void 0?void 0:n.model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textPosition",{get:function(){return this.getTextPosition()},enumerable:!1,configurable:!0}),t.prototype.getBeginAnchor=function(e,n,r){var i,o,a=LP(e);if(r){if(i=hf(a,function(s){return s.id===r}),i)return i;console.warn("\u672A\u5728\u8282\u70B9\u4E0A\u627E\u5230\u6307\u5B9A\u7684\u8D77\u70B9\u951A\u70B9".concat(r,"\uFF0C\u5DF2\u4F7F\u7528\u9ED8\u8BA4\u951A\u70B9\u4F5C\u4E3A\u8D77\u70B9"))}return a.forEach(function(s){var l=s6(s,n);(o===void 0||l=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},UP=function(t){iQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.BEZIER_EDGE,i.path="",i.initEdgeData(n),i.setAttributes(),i}return e.prototype.initEdgeData=function(n){this.offset=100,t.prototype.initEdgeData.call(this,n)},e.prototype.getEdgeStyle=function(){var n=this.graphModel.theme.bezier,r=t.prototype.getEdgeStyle.call(this),i=this.properties.style,o=i===void 0?{}:i;return Oh(Oh(Oh({},r),Fn(n)),Fn(o))},e.prototype.getTextPosition=function(){if(this.pointsList&&this.pointsList.length>0){var n=0,r=0;return this.pointsList.forEach(function(i){var o=i.x,a=i.y;n+=o,r+=a}),{x:n/this.pointsList.length,y:r/this.pointsList.length}}return{x:(this.startPoint.x+this.endPoint.x)/2,y:(this.startPoint.y+this.endPoint.y)/2}},e.prototype.getData=function(){var n=t.prototype.getData.call(this),r=this.pointsList.map(function(i){var o=i.x,a=i.y;return{x:o,y:a}});return Oh(Oh({},n),{pointsList:r})},e.prototype.getControls=function(){var n=this.startPoint,r=this.endPoint,i=o6({start:n,end:r,sourceNode:this.sourceNode,targetNode:this.targetNode,offset:this.offset});return i},e.prototype.getPath=function(n){var r=qT(n,4),i=r[0],o=r[1],a=r[2],s=r[3];return"M ".concat(i.x," ").concat(i.y,` C `).concat(o.x," ").concat(o.y,`, `).concat(a.x," ").concat(a.y,`, `).concat(s.x," ").concat(s.y)},e.prototype.initPoints=function(){this.pointsList.length>0?this.path=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=this.getControls(),r=n.sNext,i=n.ePre;this.updatePath(r,i)},e.prototype.updatePath=function(n,r){n=Fn(n),r=Fn(r);var i={x:this.startPoint.x,y:this.startPoint.y},o={x:this.endPoint.x,y:this.endPoint.y};if(!n||!r){var a=this.getControls();n=a.sNext,r=a.ePre}this.pointsList=[i,n,r,o],this.path=this.getPath(this.pointsList)},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r;var i=qT(this.pointsList,3),o=i[1],a=i[2];o.x+=n,o.y+=r,this.updatePath(o,a)},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r;var i=qT(this.pointsList,3),o=i[1],a=i[2];a.x+=n,a.y+=r,this.updatePath(o,a)},e.prototype.updateAdjustAnchor=function(n,r){var i;r==="sNext"?this.pointsList[1]=n:r==="ePre"&&(this.pointsList[2]=n),this.path=this.getPath(this.pointsList),!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition))},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode,s=o6({start:r,end:i,sourceNode:o,targetNode:a,offset:this.offset}),l=s.sNext,u=s.ePre;this.pointsList=[r,l,u,i],this.initPoints()},Bl([at],e.prototype,"path",void 0),Bl([it],e.prototype,"initPoints",null),Bl([it],e.prototype,"updatePoints",null),Bl([it],e.prototype,"updateStartPoint",null),Bl([it],e.prototype,"updateEndPoint",null),Bl([it],e.prototype,"moveStartPoint",null),Bl([it],e.prototype,"moveEndPoint",null),Bl([it],e.prototype,"updateAdjustAnchor",null),Bl([it],e.prototype,"getAdjustStart",null),Bl([it],e.prototype,"getAdjustEnd",null),Bl([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(vC),oQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ay=globalThis&&globalThis.__assign||function(){return Ay=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},aQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},y6=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},lQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;rl)&&(a=l,o=s)}),o},e.prototype.getCrossPoint=function(n,r,i){var o;return n===di.HORIZONTAL?o={x:i.x,y:r.y}:n===di.VERTICAL&&(o={x:r.x,y:i.y}),o},e.prototype.removeCrossPoints=function(n,r,i){var o=i.map(function(b){return b});if(n===1){var a=o[n],s=o[r],l=o[n-1],u=t6(l,a,this.sourceNode);if(u){var c=n6(a,s,this.sourceNode);if(c){var d=r6(a,s,this.sourceNode);d&&(o[n]=d,o.splice(n-1,1),n--,r--)}}else{var f=this.sourceNode.anchors;f.forEach(function(b){if(b.x===l.x&&b.x===a.x||b.y===l.y&&b.y===a.y){var w=Kl(b.x,b.y,a.x,a.y),O=Kl(l.x,l.y,a.x,a.y);w0?this.points=this.getPath(this.pointsList):this.updatePoints()},e.prototype.updatePoints=function(){var n=e6({x:this.startPoint.x,y:this.startPoint.y},{x:this.endPoint.x,y:this.endPoint.y},this.sourceNode,this.targetNode,this.offset||0);this.pointsList=n,this.points=n.map(function(r){return"".concat(r.x,",").concat(r.y)}).join(" ")},e.prototype.updateStartPoint=function(n){this.startPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveStartPoint=function(n,r){this.startPoint.x+=n,this.startPoint.y+=r,this.updatePoints()},e.prototype.updateEndPoint=function(n){this.endPoint=Object.assign({},n),this.updatePoints()},e.prototype.moveEndPoint=function(n,r){this.endPoint.x+=n,this.endPoint.y+=r,this.updatePoints()},e.prototype.updatePointsList=function(n,r){this.pointsList.forEach(function(a){a.x+=n,a.y+=r});var i=this.pointsList[0];this.startPoint=Object.assign({},i);var o=this.pointsList[this.pointsList.length-1];this.endPoint=Object.assign({},o),this.initPoints()},e.prototype.dragAppendStart=function(){this.draggingPointList=this.pointsList.map(function(n){return n})},e.prototype.dragAppendSimple=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList,d=c;return u===di.HORIZONTAL?(c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y},d=this.pointsList.map(function(f){return f})):u===di.VERTICAL&&(c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y},d=this.pointsList.map(function(f){return f})),this.updatePointsAfterDrag(d),this.draggingPointList=d,!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition)),{start:$r({},c[s]),end:$r({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppend=function(n,r){var i;this.isDragging=!0;var o=n.start,a=n.end,s=n.startIndex,l=n.endIndex,u=n.direction,c=this.pointsList;if(u===di.HORIZONTAL){c[s]={x:o.x,y:o.y+r.y},c[l]={x:a.x,y:a.y+r.y};var d=this.pointsList.map(function(y){return y});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x,y:o.y+r.y},h=Wd(f,this.sourceNode);if(!h){var m=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,m,d)}}if(l===this.pointsList.length-1){var g={x:a.x,y:a.y+r.y},h=Wd(g,this.targetNode);if(!h){var m=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",g,m,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}else if(u===di.VERTICAL){c[s]={x:o.x+r.x,y:o.y},c[l]={x:a.x+r.x,y:a.y};var d=this.pointsList.map(function(b){return b});if(s!==0&&l!==this.pointsList.length-1&&(d=this.removeCrossPoints(s,l,d)),s===0){var f={x:o.x+r.x,y:o.y},h=Wd(f,this.sourceNode);if(!h){var m=this.sourceNode.anchors;d=this.getDraggingPoints(u,"start",f,m,d)}}if(l===this.pointsList.length-1){var g={x:a.x+r.x,y:a.y},h=Wd(g,this.targetNode);if(!h){var m=this.targetNode.anchors;d=this.getDraggingPoints(u,"end",g,m,d)}}this.updatePointsAfterDrag(d),this.draggingPointList=d}return!((i=this.text)===null||i===void 0)&&i.value&&this.setText($r({},this.text,this.textPosition)),{start:$r({},c[s]),end:$r({},c[l]),startIndex:s,endIndex:l,direction:u}},e.prototype.dragAppendEnd=function(){if(this.draggingPointList){var n=zY(sp(this.points));this.pointsList=n.map(function(o){return o}),this.draggingPointList=[];var r=n[0];this.startPoint=$r({},r);var i=n[n.length-1];this.endPoint=$r({},i)}this.isDragging=!1},e.prototype.updatePointsAfterDrag=function(n){var r=this.updateCrossPoints(n);this.points=r.map(function(i){return"".concat(i.x,",").concat(i.y)}).join(" ")},e.prototype.getAdjustStart=function(){return this.pointsList[0]||this.startPoint},e.prototype.getAdjustEnd=function(){var n=this.pointsList;return n[n.length-1]||this.endPoint},e.prototype.updateAfterAdjustStartAndEnd=function(n){var r=n.startPoint,i=n.endPoint,o=n.sourceNode,a=n.targetNode;this.pointsList=e6({x:r.x,y:r.y},{x:i.x,y:i.y},o,a,this.offset||0),this.initPoints()},Zo([at],e.prototype,"dbClickPosition",void 0),Zo([it],e.prototype,"initPoints",null),Zo([it],e.prototype,"updatePoints",null),Zo([it],e.prototype,"updateStartPoint",null),Zo([it],e.prototype,"moveStartPoint",null),Zo([it],e.prototype,"updateEndPoint",null),Zo([it],e.prototype,"moveEndPoint",null),Zo([it],e.prototype,"updatePointsList",null),Zo([it],e.prototype,"dragAppendStart",null),Zo([it],e.prototype,"dragAppendSimple",null),Zo([it],e.prototype,"dragAppend",null),Zo([it],e.prototype,"dragAppendEnd",null),Zo([it],e.prototype,"updatePointsAfterDrag",null),Zo([it],e.prototype,"getAdjustStart",null),Zo([it],e.prototype,"getAdjustEnd",null),Zo([it],e.prototype,"updateAfterAdjustStartAndEnd",null),e}(vC),ro=globalThis&&globalThis.__assign||function(){return ro=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},b6=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},uQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jf=function(){function t(e,n){var r;this.BaseType=Si.NODE,this.id="",this.type="",this.x=0,this.y=0,this.textMode=hl.TEXT,this.text={value:"",x:0,y:0,draggable:!1,editable:!0},this._width=100,this._height=80,this.minWidth=30,this.minHeight=30,this.maxWidth=2e3,this.maxHeight=2e3,this.anchorsOffset=[],this.virtual=!1,this.isSelected=!1,this.isHovered=!1,this.isShowAnchor=!1,this.isDragging=!1,this.isHitable=!0,this.isHittable=!0,this.draggable=!0,this.visible=!0,this.rotatable=!0,this.resizable=!0,this.zIndex=1,this.state=Cr.DEFAULT,this.autoToFront=!0,this.style={},this._rotate=0,this.modelType=Kn.NODE,this.additionStateData={},this.targetRules=[],this.sourceRules=[],this.moveRules=[],this.resizeRules=[],this.hasSetTargetRules=!1,this.hasSetSourceRules=!1,this.graphModel=n,this.properties=(r=e.properties)!==null&&r!==void 0?r:{},this.initNodeData(e),this.setAttributes()}return Object.defineProperty(t.prototype,"width",{get:function(){return this._width},set:function(e){this._width=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},set:function(e){this._height=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rotate",{get:function(){return this._rotate},set:function(e){this._rotate=e;var n=this,r=n.x,i=r===void 0?0:r,o=n.y,a=o===void 0?0:o;this.transform=new mC(-i,-a).rotate(e).translate(i,a).toString()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"incoming",{get:function(){return{nodes:this.graphModel.getNodeIncomingNode(this.id),edges:this.graphModel.getNodeIncomingEdge(this.id)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"outgoing",{get:function(){return{nodes:this.graphModel.getNodeOutgoingNode(this.id),edges:this.graphModel.getNodeOutgoingEdge(this.id)}},enumerable:!1,configurable:!0}),t.prototype.initNodeData=function(e){if(e.properties||(e.properties={}),!e.id){var n=this.graphModel.idGenerator,r=n&&n(e.type),i=this.createId();e.id=i||r||nf()}this.formatText(e),$r(this,v9e(e));var o=this.graphModel.overlapMode;o===Yl.INCREASE&&(this.zIndex=e.zIndex||WN())},t.prototype.setAttributes=function(){},t.prototype.createId=function(){return null},t.prototype.setTextMode=function(e){this.textMode=e},t.prototype.formatText=function(e){var n,r,i,o=this.graphModel.editConfigModel,a=o.nodeTextDraggable,s=o.nodeTextEdit,l=e.x,u=e.y,c=e.text,d={value:"",x:l,y:u,draggable:a,editable:s};c&&(typeof c=="string"?d.value=c:(d=ro(ro({},d),{x:(n=c.x)!==null&&n!==void 0?n:l,y:(r=c.y)!==null&&r!==void 0?r:u,value:(i=c.value)!==null&&i!==void 0?i:""}),Wc(c.draggable)||(d.draggable=c.draggable),Wc(c.editable)||(d.editable=c.editable))),e.text=d},t.prototype.resize=function(e){var n=e.width,r=e.height,i=e.deltaX,o=e.deltaY,a=this.isAllowResizeNode(i,o,n,r);return a?(this.move(i/2,o/2),this.width=n,this.height=r,this.setProperties({width:n,height:r}),this.getData()):this.getData()},t.prototype.proportionalResize=function(){},t.prototype.getData=function(){var e=this.text,n=e.x,r=e.y,i=e.value,o=this.properties;gm(o)&&(o=Hl(o)),Dr(o.width)&&(o.width=this.width),Dr(o.height)&&(o.height=this.height);var a={id:this.id,type:this.type,x:this.x,y:this.y,properties:o};return this.rotate&&(a.rotate=this.rotate),this.graphModel.overlapMode===Yl.INCREASE&&(a.zIndex=this.zIndex),i&&(a.text={x:n,y:r,value:i}),a},t.prototype.getHistoryData=function(){return this.getData()},t.prototype.getProperties=function(){return Hl(this.properties)},t.prototype.getOuterGAttributes=function(){return{className:""}},t.prototype.getNodeStyle=function(){return ro(ro({},this.graphModel.theme.baseNode),this.style)},t.prototype.getTextStyle=function(){var e=this.graphModel.theme.nodeText,n=this.properties.textStyle,r=n===void 0?{}:n;return ro(ro({},Fn(e)),Fn(r))},t.prototype.getRotateControlStyle=function(){var e=this.graphModel.theme.rotateControl;return Fn(e)},t.prototype.getResizeControlStyle=function(){var e=this.graphModel.theme.resizeControl;return Fn(e)},t.prototype.getResizeOutlineStyle=function(){var e=this.graphModel.theme.resizeOutline;return Fn(e)},t.prototype.getAnchorStyle=function(e){var n=this.graphModel.theme.anchor;return Fn(n)},t.prototype.getAnchorLineStyle=function(e){var n=this.graphModel.theme.anchorLine;return Fn(n)},t.prototype.getOutlineStyle=function(){var e=this.graphModel.theme.outline;return Fn(e)},t.prototype.isAllowConnectedAsSource=function(e,n,r,i){var o=this.hasSetSourceRules?this.sourceRules:this.getConnectedSourceRules();this.hasSetSourceRules=!0;for(var a=!0,s="",l=0;l0?n.map(function(a,s){return a.length?(a=a,{id:"".concat(r,"_").concat(s),x:i+a[0],y:o+a[1]}):(a=a,ro(ro({},a),{x:i+a.x,y:o+a.y,id:a.id||"".concat(r,"_").concat(s)}))}):this.getDefaultAnchor()},t.prototype.getDefaultAnchor=function(){return[]},t.prototype.getTargetAnchor=function(e){return p9e(e,this)},t.prototype.getBounds=function(){return{minX:this.x-this.width/2,minY:this.y-this.height/2,maxX:this.x+this.width/2,maxY:this.y+this.height/2}},Object.defineProperty(t.prototype,"anchors",{get:function(){var e=this.getAnchorsByOffset(),n=this,r=n.x,i=n.y,o=n.rotate;return e.forEach(function(a){var s=a.x,l=a.y,u=uQe(new gC([s,l,1]).translate(-r,-i).rotate(o).translate(r,i)[0],2),c=u[0],d=u[1];a.x=c,a.y=d}),e},enumerable:!1,configurable:!0}),t.prototype.getAnchorInfo=function(e){if(!Dr(e))for(var n=0;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Gw=function(t){cQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.CIRCLE_NODE,i.r=50,i.initNodeData(n),i.setAttributes(),i}return Object.defineProperty(e.prototype,"width",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.r*2},enumerable:!1,configurable:!0}),e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties.r;n&&(this.r=n)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.circle,i=this.properties.style,o=i===void 0?{}:i;return Ry(Ry(Ry({},n),Fn(r)),Fn(o))},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.r;return[{x:r,y:i-o,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+o,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.deltaX,o=n.deltaY;return this.move(i/2,o/2),this.r=r,this.setProperties({r}),this.getData()},YT([at],e.prototype,"r",void 0),YT([Gr],e.prototype,"width",null),YT([Gr],e.prototype,"height",null),e}(jf),dQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),$y=globalThis&&globalThis.__assign||function(){return $y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},EO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qP=function(t){dQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.DIAMOND_NODE,i.rx=30,i.ry=50,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.diamond,i=this.properties.style,o=i===void 0?{}:i;return $y($y($y({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"points",{get:function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[[r,i-a],[r+o,i],[r,i+a],[r-o,i]]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pointsPosition",{get:function(){return Ca(this.points,function(n){var r=EO(n,2),i=r[0],o=r[1];return{x:i,y:o}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return jn(this.points,function(i){var o=EO(i,1),a=o[0];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return jn(this.points,function(i){var o=EO(i,2),a=o[1];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this;return Ca(this.points,function(r,i){var o=EO(r,2),a=o[0],s=o[1];return{x:a,y:s,id:"".concat(n.id,"_").concat(i)}})},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},Gp([at],e.prototype,"rx",void 0),Gp([at],e.prototype,"ry",void 0),Gp([Gr],e.prototype,"points",null),Gp([Gr],e.prototype,"pointsPosition",null),Gp([Gr],e.prototype,"width",null),Gp([Gr],e.prototype,"height",null),e}(jf),fQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ny=globalThis&&globalThis.__assign||function(){return Ny=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},YP=function(t){fQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.ELLIPSE_NODE,i.rx=30,i.ry=45,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.rx,i=n.ry;r&&(this.rx=r),i&&(this.ry=i)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.ellipse,i=this.properties.style,o=i===void 0?{}:i;return Ny(Ny(Ny({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"width",{get:function(){return this.rx*2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.ry*2},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.rx,a=n.ry;return[{x:r,y:i-a,id:"".concat(this.id,"_0")},{x:r+o,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a,id:"".concat(this.id,"_2")},{x:r-o,y:i,id:"".concat(this.id,"_3")}]},e.prototype.resize=function(n){var r=n.width,i=n.height,o=n.deltaX,a=n.deltaY;return this.move(o/2,a/2),this.rx=r,this.ry=i,this.setProperties({rx:r,ry:i}),this.getData()},TO([at],e.prototype,"rx",void 0),TO([at],e.prototype,"ry",void 0),TO([Gr],e.prototype,"width",null),TO([Gr],e.prototype,"height",null),e}(jf),hQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Dy=globalThis&&globalThis.__assign||function(){return Dy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},PO=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Kw=function(t){hQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.POLYGON_NODE,i.points=[[50,0],[100,50],[50,100],[0,50]],i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.points,i=n.width,o=n.height,a=r||this.points;this.points=c9e(a,i,o)},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.polygon,i=this.properties.style,o=i===void 0?{}:i;return Dy(Dy(Dy({},n),Fn(r)),Fn(o))},Object.defineProperty(e.prototype,"pointsPosition",{get:function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return this.points.map(function(s){return{x:s[0]+r-o/2,y:s[1]+i-a/2}})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=PO(i,1),a=o[0];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){var n=Number.MAX_SAFE_INTEGER,r=Number.MIN_SAFE_INTEGER;return this.points.forEach(function(i){var o=PO(i,2),a=o[1];ar&&(r=a)}),r-n},enumerable:!1,configurable:!0}),e.prototype.getDefaultAnchor=function(){var n=this,r=this,i=r.x,o=r.y,a=r.width,s=r.height,l=r.points;return l.map(function(u,c){var d=PO(u,2),f=d[0],h=d[1];return{x:i+f-a/2,y:o+h-s/2,id:"".concat(n.id,"_").concat(c)}})},e.prototype.resize=function(n){var r=this,i=n.width,o=n.height,a=n.deltaX,s=n.deltaY;this.move(a/2,s/2);var l=Ca(this.points,function(u){var c=PO(u,2),d=c[0],f=c[1];return[d*i/r.width,f*o/r.height]});return this.points=l,this.properties.points=l,this.getData()},kO([at],e.prototype,"points",void 0),kO([Gr],e.prototype,"pointsPosition",null),kO([Gr],e.prototype,"width",null),kO([Gr],e.prototype,"height",null),e}(jf),pQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ly=globalThis&&globalThis.__assign||function(){return Ly=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},lp=function(t){pQe(e,t);function e(n,r){var i=t.call(this,n,r)||this;return i.modelType=Kn.RECT_NODE,i.radius=0,i.initNodeData(n),i.setAttributes(),i}return e.prototype.setAttributes=function(){t.prototype.setAttributes.call(this);var n=this.properties,r=n.width,i=n.height,o=n.radius;Dr(r)||(this.width=r),Dr(i)||(this.height=i),Dr(o)||(this.radius=o)},e.prototype.getDefaultAnchor=function(){var n=this,r=n.x,i=n.y,o=n.width,a=n.height;return[{x:r,y:i-a/2,id:"".concat(this.id,"_0")},{x:r+o/2,y:i,id:"".concat(this.id,"_1")},{x:r,y:i+a/2,id:"".concat(this.id,"_2")},{x:r-o/2,y:i,id:"".concat(this.id,"_3")}]},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this),r=this.graphModel.theme.rect,i=this.properties.style,o=i===void 0?{}:i;return Ly(Ly(Ly({},n),Fn(r)),Fn(o))},gQe([at],e.prototype,"radius",void 0),e}(jf),mQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Iy=globalThis&&globalThis.__assign||function(){return Iy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yQe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},_Qe={stopZoomGraph:!1,stopScrollGraph:!1,stopMoveGraph:!1,adjustEdge:!1,adjustEdgeStartAndEnd:!1,adjustNodePosition:!1,hideAnchors:!0,allowRotate:!1,allowResize:!1,nodeSelectedOutline:!0,textEdit:!1,nodeTextEdit:!1,edgeTextEdit:!1,textDraggable:!1,nodeTextDraggable:!1,edgeTextDraggable:!1},AO=["isSilentMode","stopZoomGraph","stopScrollGraph","stopMoveGraph","snapGrid","adjustEdge","adjustEdgeMiddle","adjustEdgeStartAndEnd","adjustEdgeStart","adjustEdgeEnd","adjustNodePosition","hideAnchors","allowRotate","allowResize","autoExpand","hoverOutline","nodeSelectedOutline","edgeSelectedOutline","textEdit","nodeTextEdit","edgeTextEdit","textDraggable","nodeTextDraggable","edgeTextDraggable","multipleSelectKey","textMode","nodeTextMode","edgeTextMode","nodeTextMultiple","edgeTextMultiple","nodeTextVertical","edgeTextVertical"],OQe=function(){function t(e){this.isSilentMode=!1,this.stopZoomGraph=!1,this.stopMoveGraph=!1,this.stopScrollGraph=!1,this.snapGrid=!1,this.textMode=hl.TEXT,this.textEdit=!0,this.textDraggable=!1,this.nodeTextEdit=!0,this.nodeTextDraggable=!1,this.nodeTextMultiple=!1,this.nodeTextVertical=!1,this.nodeTextMode=hl.TEXT,this.edgeTextMode=hl.TEXT,this.edgeTextEdit=!0,this.edgeTextDraggable=!1,this.edgeTextMultiple=!1,this.edgeTextVertical=!1,this.hideAnchors=!1,this.allowRotate=!1,this.allowResize=!1,this.hoverOutline=!0,this.nodeSelectedOutline=!0,this.adjustNodePosition=!0,this.autoExpand=!1,this.adjustEdge=!0,this.adjustEdgeMiddle=!1,this.adjustEdgeStartAndEnd=!1,this.adjustEdgeStart=!1,this.adjustEdgeEnd=!1,this.edgeSelectedOutline=!0,this.multipleSelectKey="",$r(this,this.computeConfig(e))}return t.prototype.updateEditConfig=function(e){var n=this.computeConfig(e);$r(this,n)},t.prototype.computeConfig=function(e){var n=e.isSilentMode,r=e.textDraggable,i=e.textMode,o=e.textEdit,a=e.adjustEdgeStartAndEnd,s={};if(n===!1&&$r(s,this.stagedConfig),n===!0&&n!==this.isSilentMode){var l=vo(_Qe,AO);this.stagedConfig=vo(this,AO),$r(s,l)}Wc(o)||$r(s,{nodeTextEdit:o,edgeTextEdit:o}),Wc(r)||$r(s,{nodeTextDraggable:r,edgeTextDraggable:r}),i&&$r(s,{nodeTextMode:i,edgeTextMode:i}),fw(a)&&$r(s,{adjustEdgeStart:a,adjustEdgeEnd:a});var u=vo(e,AO);return $r(s,u)},t.prototype.updateTextMode=function(e){this.textMode=e,this.edgeTextMode=e,this.nodeTextMode=e},t.prototype.getConfig=function(){return vo(this,AO)},Pr([at],t.prototype,"isSilentMode",void 0),Pr([at],t.prototype,"stopZoomGraph",void 0),Pr([at],t.prototype,"stopMoveGraph",void 0),Pr([at],t.prototype,"stopScrollGraph",void 0),Pr([at],t.prototype,"snapGrid",void 0),Pr([at],t.prototype,"textMode",void 0),Pr([at],t.prototype,"textEdit",void 0),Pr([at],t.prototype,"textDraggable",void 0),Pr([at],t.prototype,"nodeTextEdit",void 0),Pr([at],t.prototype,"nodeTextDraggable",void 0),Pr([at],t.prototype,"nodeTextMultiple",void 0),Pr([at],t.prototype,"nodeTextVertical",void 0),Pr([at],t.prototype,"nodeTextMode",void 0),Pr([at],t.prototype,"edgeTextMode",void 0),Pr([at],t.prototype,"edgeTextEdit",void 0),Pr([at],t.prototype,"edgeTextDraggable",void 0),Pr([at],t.prototype,"edgeTextMultiple",void 0),Pr([at],t.prototype,"edgeTextVertical",void 0),Pr([at],t.prototype,"hideAnchors",void 0),Pr([at],t.prototype,"allowRotate",void 0),Pr([at],t.prototype,"allowResize",void 0),Pr([at],t.prototype,"hoverOutline",void 0),Pr([at],t.prototype,"nodeSelectedOutline",void 0),Pr([at],t.prototype,"adjustNodePosition",void 0),Pr([at],t.prototype,"autoExpand",void 0),Pr([at],t.prototype,"adjustEdge",void 0),Pr([at],t.prototype,"adjustEdgeMiddle",void 0),Pr([at],t.prototype,"adjustEdgeStartAndEnd",void 0),Pr([at],t.prototype,"adjustEdgeStart",void 0),Pr([at],t.prototype,"adjustEdgeEnd",void 0),Pr([at],t.prototype,"edgeSelectedOutline",void 0),Pr([it],t.prototype,"updateEditConfig",null),Pr([it],t.prototype,"updateTextMode",null),t}(),wQe="*",SQe=function(){function t(){this._events={}}return t.prototype.on=function(e,n,r){var i=this;e==null||e.split(",").forEach(function(o){o=o.trim(),i._events[o]||(i._events[o]=[]),i._events[o].push({callback:n,once:!!r})})},t.prototype.once=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){i=i.trim(),r.on(i,n,!0)})},t.prototype.emit=function(e,n){var r=this;e==null||e.split(",").forEach(function(i){var o=r._events[i]||[],a=r._events[wQe]||[],s=function(l){for(var u=l.length,c=0;c=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},EQe=function(t){xQe(e,t);function e(n){var r=t.call(this)||this;r.stepScrollX=0,r.stepScrollY=0,r.onDragging=function(s){var l=s.deltaX,u=s.deltaY;r.setState({isDragging:!0});var c=r.props.graphModel,d=c.transformModel,f=c.editConfigModel;f.stopMoveGraph!==!0&&d.translate(l,u)},r.onDragEnd=function(){r.setState({isDragging:!1})},r.zoomHandler=function(s){var l=r.props,u=l.graphModel,c=u.editConfigModel,d=u.transformModel,f=u.gridSize,h=l.graphModel,m=s.deltaX,g=s.deltaY,y=c.stopScrollGraph,b=c.stopZoomGraph;if(!y&&!s.ctrlKey&&!s.metaKey){if(s.preventDefault(),r.stepScrollX+=m,r.stepScrollY+=g,Math.abs(r.stepScrollX)>=f){var w=r.stepScrollX%f,O=r.stepScrollX-w;d.translate(-O*d.SCALE_X,0),r.stepScrollX=w}if(Math.abs(r.stepScrollY)>=f){var S=r.stepScrollY%f,x=r.stepScrollY-S;d.translate(0,-x*d.SCALE_Y),r.stepScrollY=S}return}if(!b){s.preventDefault();var C=h.getPointByClient({x:s.clientX,y:s.clientY}),E=C.canvasOverlayPosition,T=E.x,P=E.y;d.zoom(s.deltaY<0,[T,P])}},r.clickHandler=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){var u=r.props.graphModel,c=u.selectElements;c.size>0&&u.clearSelectElements(),u.eventCenter.emit(pn.BLANK_CLICK,{e:s})}},r.handleContextMenu=function(s){var l=s.target;if(l.getAttribute("name")==="canvas-overlay"){s.preventDefault();var u=r.props.graphModel,c=u.getPointByClient({x:s.clientX,y:s.clientY});u.eventCenter.emit(pn.BLANK_CONTEXTMENU,{e:s,position:c})}},r.mouseDownHandler=function(s){var l=r.props.graphModel,u=l.eventCenter,c=l.editConfigModel,d=l.transformModel.SCALE_X,f=l.gridSize,h=c.adjustEdge,m=c.adjustNodePosition,g=c.stopMoveGraph,y=s.target,b=!h&&!m;(y.getAttribute("name")==="canvas-overlay"||b)&&(g!==!0?(r.stepDrag.setStep(f*d),r.stepDrag.handleMouseDown(s)):u.emit(pn.BLANK_MOUSEDOWN,{e:s}),r.clickHandler(s))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter;return r.stepDrag=new kl({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"BLANK",isStopPropagation:!1,eventCenter:a,model:void 0}),r.state={isDragging:!1},r}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props,o=i.children,a=i.dnd,s=this.state.isDragging;return rt("svg",ZP({xmlns:"http://www.w3.org/2000/svg",width:"100%",height:"100%",name:"canvas-overlay",onWheel:this.zoomHandler,onMouseDown:this.mouseDownHandler,onContextMenu:this.handleContextMenu,className:s?"lf-canvas-overlay lf-dragging":"lf-canvas-overlay lf-drag-able"},a.eventMap(),{children:rt("g",{transform:r,children:o})}))},e=CQe([Ea],e),e}(ur),JY=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),F0=globalThis&&globalThis.__assign||function(){return F0=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},kQe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},w6=function(t){JY(e,t);function e(){var n=t.call(this)||this;return n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.bezierModel,l=o.type,u=a.getPointByClient({x:i.clientX,y:i.clientY}).canvasOverlayPosition,c=u.x,d=u.y;s.updateAdjustAnchor({x:c,y:d},l),a.eventCenter.emit(pn.EDGE_ADJUST,{data:s.getData()})},n.onDragEnd=function(){var r=n.props.bezierModel;r.isDragging=!1},n.dragHandler=new kl({onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.render=function(){var n=this,r=this.props.position,i=r.x,o=r.y,a=this.props.bezierModel,s=a.getEdgeStyle().adjustAnchor;return rt(bm,F0({className:"lf-bezier-adjust-anchor",x:i,y:o},s,{onMouseDown:function(l){n.dragHandler.handleMouseDown(l)}}))},e}(ur),PQe=function(t){JY(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getBezierAdjust=function(n,r){var i=n.path,o=n.id,a=zN(i),s=kQe(a,4),l=s[0],u=s[1],c=s[2],d=s[3],f=n.getEdgeStyle().adjustLine,h=[];return h.push(rt(ym,F0({x1:l.x,y1:l.y,x2:u.x,y2:u.y},f))),h.push(rt(w6,{position:u,bezierModel:n,graphModel:r,type:"sNext"},"".concat(o,"_ePre"))),h.push(rt(ym,F0({x1:d.x,y1:d.y,x2:c.x,y2:c.y},f))),h.push(rt(w6,{position:c,bezierModel:n,graphModel:r,type:"ePre"},"".concat(o,"_sNext"))),h},e.prototype.selectedBezierEdge=function(){for(var n=this.props.graphModel,r=n.edges,i=[],o=0;o=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},RQe=function(t){AQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.background;return rt("div",{className:"lf-background",children:rt("div",{style:_i(n)?n:{},className:"lf-background-area"})})},e=MQe([Ea],e),e}(ur),$Qe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),NQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Jw=function(t){$Qe(e,t);function e(n){var r=t.call(this,n)||this;return r.id=nf(),r.gridOptions=r.props.graphModel.grid,r}return e.prototype.renderDot=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?2:u,d=Math.min(Math.max(2,c),o/4),f=a?1:0;return rt("g",{fill:l,opacity:f,children:[rt("circle",{cx:0,cy:0,r:d/2}),rt("circle",{cx:0,cy:o,r:d/2}),rt("circle",{cx:o,cy:0,r:d/2}),rt("circle",{cx:o,cy:o,r:d/2})]})},e.prototype.renderMesh=function(){var n=this.gridOptions,r=n.config,i=n.size,o=i===void 0?1:i,a=n.visible,s=r!=null?r:{},l=s.color,u=s.thickness,c=u===void 0?1:u,d=Math.min(Math.max(1,c),o/2),f="M 0 0 H ".concat(o," V ").concat(o," H 0 Z"),h=a?1:0;return rt("path",{d:f,stroke:l,strokeWidth:d/2,opacity:h,fill:"transparent"})},e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=this.gridOptions,i=r.type,o=r.size,a=o===void 0?1:o,s=n.SCALE_X,l=n.SKEW_Y,u=n.SKEW_X,c=n.SCALE_Y,d=n.TRANSLATE_X,f=n.TRANSLATE_Y,h=[s,l,u,c,d,f].join(","),m="matrix(".concat(h,")");return rt("div",{className:"lf-grid",children:rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",children:[rt("defs",{children:rt("pattern",{id:this.id,patternUnits:"userSpaceOnUse",patternTransform:m,x:"0",y:"0",width:a,height:a,children:[i==="dot"&&this.renderDot(),i==="mesh"&&this.renderMesh()]})}),rt("rect",{width:"100%",height:"100%",fill:"url(#".concat(this.id,")")})]})})},e=NQe([Ea],e),e}(ur);(function(t){t.defaultProps={size:j7e,visible:!0,type:"dot",config:{color:"#ababab",thickness:1}};function e(n){var r=Fn(t.defaultProps);return typeof n=="number"?$r(r,{size:n}):typeof n=="boolean"?$r(r,{visible:n}):$r(r,n)}t.getGridOptions=e})(Jw||(Jw={}));var DQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),LQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},IQe=function(t){DQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.graphModel.transformModel,r=n.getTransformStyle().transform,i=this.props.children;return rt("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:"100%",height:"100%",className:"modification-overlay",children:rt("g",{transform:r,children:i})})},e=LQe([Ea],e),e}(ur),BQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ad=globalThis&&globalThis.__assign||function(){return Ad=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},VQe=function(t){BQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getNodesOutline=function(){var n=this.props.graphModel,r=n.nodes,i=n.editConfigModel,o=i.hoverOutline,a=i.nodeSelectedOutline,s=[];return r.forEach(function(l){if(l.isHovered||l.isSelected){var u=l.isHovered,c=l.isSelected,d=l.x,f=l.y,h=l.width,m=l.height;if(a&&c||o&&u){var g=l.getOutlineStyle(),y={};if(Object.keys(g).forEach(function(w){w!=="hover"&&(y[w]=g[w])}),u){var b=g.hover;y=Ad(Ad({},y),b)}s.push(rt(al,Ad({transform:l.transform,className:"lf-outline-node",x:d,y:f,width:h+10,height:m+10},y)))}}}),s},e.prototype.getEdgeOutline=function(){for(var n=this.props.graphModel,r=n.edges,i=n.editConfigModel,o=i.edgeSelectedOutline,a=i.hoverOutline,s=[],l=0;l=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},QQe=function(t){jQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.render=function(){var n=this.props.snaplineModel,r=n!=null?n:{},i=r.position,o=r.isShowHorizontal,a=r.isShowVertical,s=n==null?void 0:n.getStyle(),l=i!=null?i:{},u=l.x,c=u===void 0?0:u,d=l.y,f=d===void 0?0:d,h=Md(Md({x1:-1e5,y1:f,x2:1e5,y2:f},s),{stroke:o?s==null?void 0:s.stroke:"none"}),m=Md(Md({x1:c,y1:-1e5,x2:c,y2:1e5},s),{stroke:a?s==null?void 0:s.stroke:"none"});return rt("g",{className:"lf-snapline",children:[rt(ym,Md({},h)),rt(ym,Md({},m))]})},e=zQe([Ea],e),e}(ur),HQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),WQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},UQe=function(t){HQe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.componentDidMount=function(){this.triggerToolRender()},e.prototype.componentDidUpdate=function(){this.triggerToolRender()},e.prototype.getTools=function(){var n=this.props,r=n.tool,i=n.graphModel,o=i.textEditElement,a=r.getTools(),s=a.map(function(l){return Gt(l,{textEditElement:o,graphModel:i,lf:r.instance})});return r.components=s,s},e.prototype.triggerToolRender=function(){var n=this.props,r=n.tool,i=n.graphModel,o=document.querySelector("#ToolOverlay_".concat(i.flowId)),a=r.getInstance();a.components.forEach(function(s){return s(a,o)}),a.components=[]},e.prototype.render=function(){var n=this.props.graphModel;return rt("div",{className:"lf-tool-overlay",id:"ToolOverlay_".concat(n.flowId),children:this.getTools()})},e=WQe([Ea],e),e}(ur),Rd=globalThis&&globalThis.__assign||function(){return Rd=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},qQe=globalThis&&globalThis.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},mo=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Xs=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XQe=function(){function t(e){this.isShowHorizontal=!1,this.isShowVertical=!1,this.position={x:0,y:0},this.graphModel=e}return t.prototype.getStyle=function(){return wh({},this.graphModel.theme.snapline)},t.prototype.getCenterSnapLine=function(e,n){for(var r=e.x,i=e.y,o=!1,a=!1,s=0;s=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},Kp=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ZQe={false:[-1/0,-1/0,1/0,1/0],true:[-1/0,-1/0,1/0,1/0],vertical:[-1/0,0,1/0,0],horizontal:[0,-1/0,0,1/0]},GQe=function(){function t(e,n){this.MINI_SCALE_SIZE=.2,this.MAX_SCALE_SIZE=16,this.SCALE_X=1,this.SKEW_Y=0,this.SKEW_X=0,this.SCALE_Y=1,this.TRANSLATE_X=0,this.TRANSLATE_Y=0,this.ZOOM_SIZE=.04,this.translateLimitMinX=-1/0,this.translateLimitMinY=-1/0,this.translateLimitMaxX=1/0,this.translateLimitMaxY=1/0,this.eventCenter=e;var r=n.stopMoveGraph,i=r===void 0?!1:r;this.updateTranslateLimits(i)}return t.prototype.setZoomMiniSize=function(e){this.MINI_SCALE_SIZE=e},t.prototype.setZoomMaxSize=function(e){this.MAX_SCALE_SIZE=e},t.prototype.HtmlPointToCanvasPoint=function(e){var n=Kp(e,2),r=n[0],i=n[1];return[(r-this.TRANSLATE_X)/this.SCALE_X,(i-this.TRANSLATE_Y)/this.SCALE_Y]},t.prototype.CanvasPointToHtmlPoint=function(e){var n=Kp(e,2),r=n[0],i=n[1];return[r*this.SCALE_X+this.TRANSLATE_X,i*this.SCALE_Y+this.TRANSLATE_Y]},t.prototype.moveCanvasPointByHtml=function(e,n,r){var i=Kp(e,2),o=i[0],a=i[1];return[o+n/this.SCALE_X,a+r/this.SCALE_Y]},t.prototype.fixDeltaXY=function(e,n){return[e/this.SCALE_X,n/this.SCALE_Y]},t.prototype.getTransformStyle=function(){var e=[this.SCALE_X,this.SKEW_Y,this.SKEW_X,this.SCALE_Y,this.TRANSLATE_X,this.TRANSLATE_Y].join(",");return{transform:"matrix(".concat(e,")")}},t.prototype.zoom=function(e,n){e===void 0&&(e=!1);var r=this.SCALE_X,i=this.SCALE_Y;return typeof e=="number"?(r=e,i=e):e?(r+=this.ZOOM_SIZE,i+=this.ZOOM_SIZE):(r-=this.ZOOM_SIZE,i-=this.ZOOM_SIZE),rthis.MAX_SCALE_SIZE?"".concat(this.SCALE_X*100,"%"):(n&&(this.TRANSLATE_X-=(r-this.SCALE_X)*n[0],this.TRANSLATE_Y-=(i-this.SCALE_Y)*n[1]),this.SCALE_X=r,this.SCALE_Y=i,this.emitGraphTransform("zoom"),"".concat(this.SCALE_X*100,"%"))},t.prototype.emitGraphTransform=function(e){this.eventCenter.emit(pn.GRAPH_TRANSFORM,{type:e,transform:{SCALE_X:this.SCALE_X,SKEW_Y:this.SKEW_Y,SKEW_X:this.SKEW_X,SCALE_Y:this.SCALE_Y,TRANSLATE_X:this.TRANSLATE_X,TRANSLATE_Y:this.TRANSLATE_Y}})},t.prototype.resetZoom=function(){this.SCALE_X=1,this.SCALE_Y=1,this.emitGraphTransform("resetZoom")},t.prototype.translate=function(e,n){this.TRANSLATE_X+e<=this.translateLimitMaxX&&this.TRANSLATE_X+e>=this.translateLimitMinX&&(this.TRANSLATE_X+=e),this.TRANSLATE_Y+n<=this.translateLimitMaxY&&this.TRANSLATE_Y+n>=this.translateLimitMinY&&(this.TRANSLATE_Y+=n),this.emitGraphTransform("translate")},t.prototype.focusOn=function(e,n,r,i){var o=Kp(this.CanvasPointToHtmlPoint([e,n]),2),a=o[0],s=o[1],l=Kp([r/2-a,i/2-s],2),u=l[0],c=l[1];this.TRANSLATE_X+=u,this.TRANSLATE_Y+=c,this.emitGraphTransform("focusOn")},t.prototype.updateTranslateLimits=function(e){var n;n=Kp(Array.isArray(e)&&e.length===4?e:ZQe[e.toString()],4),this.translateLimitMinX=n[0],this.translateLimitMinY=n[1],this.translateLimitMaxX=n[2],this.translateLimitMaxY=n[3]},Fl([at],t.prototype,"SCALE_X",void 0),Fl([at],t.prototype,"SKEW_Y",void 0),Fl([at],t.prototype,"SKEW_X",void 0),Fl([at],t.prototype,"SCALE_Y",void 0),Fl([at],t.prototype,"TRANSLATE_X",void 0),Fl([at],t.prototype,"TRANSLATE_Y",void 0),Fl([at],t.prototype,"ZOOM_SIZE",void 0),Fl([it],t.prototype,"zoom",null),Fl([it],t.prototype,"resetZoom",null),Fl([it],t.prototype,"translate",null),Fl([it],t.prototype,"focusOn",null),t}(),KQe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),JQe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},eHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},oHe=function(t){rHe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(r){var i=r.event,o=n.props,a=o.anchorData,s=o.nodeModel,l=o.graphModel;l.selectNodeById(s.id),s.autoToFront&&l.toFront(s.id),l.eventCenter.emit(pn.ANCHOR_DRAGSTART,{data:a,e:i,nodeModel:s}),n.setState({startX:a.x,startY:a.y,endX:a.x,endY:a.y})},n.onDragging=function(r){var i=r.event,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=a.transformModel,c=a.eventCenter,d=a.width,f=a.height,h=a.editConfigModel,m=h.autoExpand,g=h.stopMoveGraph;if(!!i){var y=i.clientX,b=i.clientY,w=a.getPointByClient({x:y,y:b}),O=w.domOverlayPosition,S=O.x,x=O.y,C=w.canvasOverlayPosition,E=C.x,T=C.y;n.t&&Zw(n.t);var P=[],A=10;S<10?P=[A,0]:S+10>d?P=[-A,0]:x<10?P=[0,A]:x+10>f&&(P=[0,-A]),n.setState({endX:E,endY:T,dragging:!0}),n.moveAnchorEnd(E,T),P.length>0&&!g&&m&&(n.t=YY(function(){var D=iHe(P,2),N=D[0],$=D[1];u.translate(N,$);var W=n.state,L=W.endX,I=W.endY;n.setState({endX:L-N,endY:I-$}),n.moveAnchorEnd(L-N,I-$)})),c.emit(pn.ANCHOR_DRAG,{data:l,e:i,nodeModel:s})}},n.onDragEnd=function(r){var i=r.event;n.t&&Zw(n.t);var o=n.checkEnd(i);n.setState({startX:0,startY:0,endX:0,endY:0,dragging:!1}),n.sourceRuleResults.clear(),n.targetRuleResults.clear();var a=n.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData;s.eventCenter.emit(pn.ANCHOR_DRAGEND,{data:u,e:i,nodeModel:l,edgeModel:o!=null?o:void 0})},n.checkEnd=function(r){var i,o=n.props,a=o.graphModel,s=o.nodeModel,l=o.anchorData,u=l.x,c=l.y,d=l.id,f=n.state,h=f.endX,m=f.endY,g=f.dragging,y=Yw({x:h,y:m},a);if(n.preTargetNode&&n.preTargetNode.state!==Cr.DEFAULT&&n.preTargetNode.setElementState(Cr.DEFAULT),!!g&&y&&y.node){var b=y.node,w=y.anchor.id,O="".concat(s.id,"_").concat(b.id,"_").concat(w,"_").concat(d),S=n.sourceRuleResults.get(O)||{},x=S.isAllPass,C=S.msg,E=n.targetRuleResults.get(O)||{},T=E.isAllPass,P=E.msg;if(x&&T){b.setElementState(Cr.DEFAULT);var A=a.getNodeModelById(y.node.id),D=(i=a.edgeGenerator)===null||i===void 0?void 0:i.call(a,s.getData(),A==null?void 0:A.getData()),N=a.addEdge(Au(Au({},D),{sourceNodeId:s.id,sourceAnchorId:d,startPoint:{x:u,y:c},targetNodeId:y.node.id,targetAnchorId:y.anchor.id,endPoint:{x:y.anchor.x,y:y.anchor.y}})),$=n.props.anchorData;return a.eventCenter.emit(pn.ANCHOR_DROP,{data:$,e:r,nodeModel:s,edgeModel:N}),N}var W=b.getData();return a.eventCenter.emit(pn.CONNECTION_NOT_ALLOWED,{data:W,msg:P||C||"\u4E0D\u5141\u8BB8\u6DFB\u52A0\u8FDE\u7EBF"}),null}},n.sourceRuleResults=new Map,n.targetRuleResults=new Map,n.state={startX:0,startY:0,endX:0,endY:0,dragging:!1},n.dragHandler=new kl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd}),n}return e.prototype.getAnchorShape=function(){var n=this.props,r=n.anchorData,i=n.style,o=n.node,a=o.getAnchorShape(r);if(a)return a;var s=r.x,l=r.y,u=Au(Au({},i),i==null?void 0:i.hover);return rt("g",{children:[rt(bm,Au({className:"lf-node-anchor-hover"},u,{x:s,y:l})),rt(bm,Au({className:"lf-node-anchor"},i,{x:s,y:l}))]})},Object.defineProperty(e.prototype,"customTrajectory",{get:function(){var n=this.props.graphModel.customTrajectory;return n},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"relateEdges",{get:function(){var n=this.props,r=n.graphModel,i=r.getAnchorIncomingEdge,o=r.getAnchorOutgoingEdge,a=n.anchorData.id;return{incomingEdgeList:i(a),outgoingEdgeList:o(a)}},enumerable:!1,configurable:!0}),e.prototype.moveAnchorEnd=function(n,r){var i,o,a=this.props,s=a.graphModel,l=a.nodeModel,u=a.anchorData,c=Yw({x:n,y:r},s);if(c){var d=c.node,f=c.anchor.id;if(this.preTargetNode&&this.preTargetNode!==c.node&&this.preTargetNode.setElementState(Cr.DEFAULT),u.id===f)return;this.preTargetNode=d;var h="".concat(l.id,"_").concat(d.id,"_").concat(f,"_").concat(u.id);if(!this.targetRuleResults.has(h)){var m=c.anchor,g=l.isAllowConnectedAsSource(d,u,m),y=d.isAllowConnectedAsTarget(l,u,m);this.sourceRuleResults.set(h,Xw(g)),this.targetRuleResults.set(h,Xw(y))}var b=((i=this.sourceRuleResults.get(h))!==null&&i!==void 0?i:{}).isAllPass,w=((o=this.targetRuleResults.get(h))!==null&&o!==void 0?o:{}).isAllPass;b&&w?d.setElementState(Cr.ALLOW_CONNECT):d.setElementState(Cr.NOT_ALLOW_CONNECT)}else this.preTargetNode&&this.preTargetNode.state!==Cr.DEFAULT&&this.preTargetNode.setElementState(Cr.DEFAULT)},e.prototype.isShowLine=function(){var n=this.state,r=n.startX,i=n.startY,o=n.endX,a=n.endY,s=Kl(r,i,o,a);return s>10},e.prototype.render=function(){var n=this,r=this.state,i=r.startX,o=r.startY,a=r.endX,s=r.endY,l=this.props,u=l.anchorData.edgeAddable,c=l.edgeStyle;return rt("g",{className:"lf-anchor",children:[rt("g",{onMouseDown:function(d){u!==!1&&n.dragHandler.handleMouseDown(d)},children:this.getAnchorShape()}),this.isShowLine()&&(this.customTrajectory?this.customTrajectory(Au({sourcePoint:{x:i,y:o},targetPoint:{x:a,y:s}},c)):rt(ym,Au({x1:i,y1:o,x2:a,y2:s},c,{"pointer-events":"none"})))]})},e}(ur),aHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),GP=globalThis&&globalThis.__assign||function(){return GP=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},tX=function(t){lHe(e,t);function e(n){var r=t.call(this)||this;r.mouseDownHandler=function(o){var a=r.props,s=a.draggable,l=a.model,u=a.graphModel,c=u.editConfigModel.nodeTextDraggable;(s!=null?s:c)&&(o.stopPropagation(),r.stepperDrag.model=l,r.stepperDrag.handleMouseDown(o))},r.onDragging=function(o){var a=o.deltaX,s=o.deltaY,l=r.props,u=l.model,c=l.graphModel.transformModel;if(a||s){var d=uHe(c.fixDeltaXY(a,s),2),f=d[0],h=d[1];u.moveText(f,h)}},r.dbClickHandler=function(){var o=r.props,a=o.editable,s=o.graphModel.eventCenter,l=o.model;a&&l.setElementState(Cr.TEXT_EDIT),s.emit(pn.TEXT_DBCLICK,{data:l.text,model:l})};var i=n.draggable;return r.stepperDrag=new kl({onDragging:r.onDragging,step:1,eventType:"TEXT",isStopPropagation:i}),r}return e.prototype.getShape=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=r.text,s=a.value,l=a.x,u=a.y,c=a.editable,d=a.draggable,f={x:l,y:u,className:"",value:s},h=r.getTextStyle(),m=o.nodeTextDraggable||d;return rt(XY,JP({},f,h,{className:KP({"lf-element-text":c,"lf-text-draggable":!c&&m,"lf-text-disabled":!c&&!m}),model:r}))},e.prototype.render=function(){var n=this.props.model.text;if(n)return rt("g",{onMouseDown:this.mouseDownHandler,onDblClick:this.dbClickHandler,children:this.getShape()})},e}(ur),cHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jl=globalThis&&globalThis.__assign||function(){return jl=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},dHe=function(t){cHe(e,t);function e(n){var r=t.call(this,n)||this;return r.setHoverOn=function(){r.setState({isHovered:!0})},r.setHoverOff=function(){r.setState({isHovered:!1})},r.state={isHovered:!1},r}return e.prototype.getBackground=function(){var n=this.state.isHovered,r=this.props.model,i=r.text,o=r.getTextStyle(),a=o.background||{};if(n&&o.hover&&o.hover.background&&(a=jl(jl({},a),o.hover.background)),(i==null?void 0:i.value)&&(a==null?void 0:a.fill)!=="transparent"){var s=o.fontSize,l=o.textWidth,u=o.lineHeight,c=o.overflowMode,d=a.wrapPadding,f=i==null?void 0:i.value.split(/[\r\n]/g),h=f.length,m=i.x,g=i.y,y={};if(c==="autoWrap"&&l){var b=qY({rows:f,style:{fontSize:"".concat(s,"px"),width:"".concat(l,"px"),lineHeight:u,padding:d},rowsLength:h,className:"lf-get-text-height"});y=jl(jl({},a),{x:m,y:g,width:l,height:b})}else{var w=u9e({rows:f,rowsLength:h,fontSize:s}),O=w.width,S=w.height;if(c==="ellipsis"&&(O=l,S=s+2),typeof a.wrapPadding=="string"){var x=a.wrapPadding.split(",").filter(function(V){return V.trim()}).map(function(V){return parseFloat(V.trim())});if(x.length>0&&x.length<=4){if(x.length===1){var C=MO(x,1),E=C[0];x=[E,E,E,E]}else if(x.length===2){var T=MO(x,2),P=T[0],A=T[1];x=[P,A,P,A]}else if(x.length===3){var D=MO(x,3),N=D[0],A=D[1],$=D[2];x=[N,A,$,A]}var W=MO(x,4),L=W[0],I=W[1],U=W[2],Q=W[3];O+=I+Q,S+=L+U,m=m+(I-Q)/2,g=g+(U-L)/2}}y=jl(jl({},a),{x:m-1,y:g-1,width:O,height:S})}return rt(al,jl({},y))}return null},e.prototype.getShape=function(){var n=this.props.model,r=n.text,i=r.x,o=r.y,a=r.value;if(!a)return null;var s=n.getTextStyle(),l=jl({x:i,y:o,value:a,model:n,className:"lf-element-text"},s);return rt("g",{className:"lf-line-text",onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,children:[this.getBackground(),rt(XY,jl({},l))]})},e}(tX),fHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eS=globalThis&&globalThis.__assign||function(){return eS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zf=function(t){fHe(e,t);function e(n){var r=t.call(this)||this;r.onDragStart=function(l){var u=l.event,c=r.props,d=c.model,f=c.graphModel;if(u){var h=f.getPointByClient({x:u.clientX,y:u.clientY}).canvasOverlayPosition,m=h.x,g=h.y;r.moveOffset={dx:d.x-m,dy:d.y-g}}},r.onDragging=function(l){var u,c,d,f,h=l.event,m=r.props,g=m.model,y=m.graphModel,b=y.editConfigModel,w=b.stopMoveGraph,O=b.autoExpand,S=b.snapGrid,x=y.transformModel,C=y.selectNodes,E=y.width,T=y.height,P=y.gridSize;g.isDragging=!0;var A=h,D=A.clientX,N=A.clientY,$=y.getPointByClient({x:D,y:N}).canvasOverlayPosition,W=$.x,L=$.y,I=RO(x.CanvasPointToHtmlPoint([W,L]),2),U=I[0],Q=I[1];if(W=W+((c=(u=r.moveOffset)===null||u===void 0?void 0:u.dx)!==null&&c!==void 0?c:0),L=L+((f=(d=r.moveOffset)===null||d===void 0?void 0:d.dy)!==null&&f!==void 0?f:0),W=vm(W,P,S),L=vm(L,P,S),!E||!T){y.moveNode2Coordinate(g.id,W,L);return}var V=U<0||Q<0||U>E||Q>T;if(!(O&&!w&&V)){var q=RO(x.CanvasPointToHtmlPoint([W-g.width/2,L-g.height/2]),2),K=q[0],ie=q[1],oe=RO(x.CanvasPointToHtmlPoint([W+g.width/2,L+g.height/2]),2),Se=oe[0],ke=oe[1],Y=Math.max(P,20),re=[];K<0?re=[Y,0]:Se>y.width?re=[-Y,0]:ie<0?re=[0,Y]:ke>y.height&&(re=[0,-Y]),r.t&&Zw(r.t),g.transform=new mC(-W,-L).rotate(g.rotate).translate(W,L).toString();var te=C.map(function(ge){return ge.id});te.indexOf(g.id)===-1&&(te=[g.id]),re.length>0&&!w&&O?r.t=YY(function(){var ge=RO(re,2),Re=ge[0],$e=ge[1];x.translate(Re!=null?Re:0,$e!=null?$e:0);var Z=-(Re!=null?Re:0)/x.SCALE_X,ce=-($e!=null?$e:0)/x.SCALE_X;y.moveNodes(te,Z,ce)}):y.moveNodes(te,W-g.x,L-g.y)}},r.onDragEnd=function(){r.t&&Zw(r.t);var l=r.props.model;l.isDragging=!1},r.onMouseOut=function(l){F7e()&&r.setHoverOff(l)},r.handleMouseUp=function(){var l=r.props.model;r.mouseUpDrag=l.isDragging},r.handleClick=function(l){var u=r.mouseUpDrag===!1;if(!!r.startTime){var c=r.props,d=c.model,f=c.graphModel;if(!!u){var h=d.getData(),m=f.getPointByClient({x:l.clientX,y:l.clientY}),g={data:h,e:l,position:m,isSelected:!1,isMultiple:!1},y=l.button===2,b=l.detail===2;if(!y){var w=f.editConfigModel,O=WY(l,w);g.isMultiple=O,d.isSelected&&!b&&O?(g.isSelected=!1,d.setSelected(!1)):(f.selectNodeById(d.id,O),g.isSelected=!0,w.isSilentMode||r.toFront()),b?(w.nodeTextEdit&&d.text.editable&&w.textMode===hl.TEXT&&(d.setSelected(!1),f.setElementStateById(d.id,Cr.TEXT_EDIT)),f.eventCenter.emit(pn.NODE_DBCLICK,g)):(f.eventCenter.emit(pn.ELEMENT_CLICK,g),f.eventCenter.emit(pn.NODE_CLICK,g))}}}},r.handleContextMenu=function(l){l.preventDefault();var u=r.props,c=u.model,d=u.graphModel,f=d.editConfigModel,h=c.getData(),m=d.getPointByClient({x:l.clientX,y:l.clientY});d.setElementStateById(c.id,Cr.SHOW_MENU,m.domOverlayPosition),c.isSelected||d.selectNodeById(c.id),d.eventCenter.emit(pn.NODE_CONTEXTMENU,{data:h,e:l,position:m}),f.isSilentMode||r.toFront()},r.handleMouseDown=function(l){var u=r.props,c=u.model,d=u.graphModel;r.startTime=new Date().getTime();var f=d.editConfigModel;f.adjustNodePosition&&c.draggable&&r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.handleFocus=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(pn.NODE_FOCUS,{data:u.getData()})},r.handleBlur=function(){var l=r.props,u=l.model,c=l.graphModel;c.eventCenter.emit(pn.NODE_BLUR,{data:u.getData()})},r.setHoverOn=function(l){var u=r.props,c=u.model,d=u.graphModel;if(!c.isHovered){var f=c.getData();c.setHovered(!0),d.eventCenter.emit(pn.NODE_MOUSEENTER,{data:f,e:l})}},r.setHoverOff=function(l){var u=r.props,c=u.model,d=u.graphModel,f=c.getData();!c.isHovered||(c.setHovered(!1),d.eventCenter.emit(pn.NODE_MOUSELEAVE,{data:f,e:l}))};var i=n.graphModel,o=i.gridSize,a=i.eventCenter,s=n.model;return r.stepDrag=new kl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:o,eventType:"NODE",isStopPropagation:!1,eventCenter:a,model:s}),r.modelDisposer=_Y(function(){return r.props},function(l){l&&l.model&&r.stepDrag.setModel(l.model)}),r}return e.prototype.componentWillUnmount=function(){this.modelDisposer&&this.modelDisposer(),this.render.$mobx&&this.render.$mobx.dispose()},e.prototype.componentDidMount=function(){},e.prototype.componentDidUpdate=function(){},e.prototype.getAnchorShape=function(n){return null},e.prototype.getAnchors=function(){var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.isSelected,s=i.isHitable,l=i.isDragging,u=i.isShowAnchor;return s&&(a||u)&&!l?Ca(i.anchors,function(c,d){var f=i.getAnchorLineStyle(c),h=i.getAnchorStyle(c);return rt(oHe,{anchorData:c,node:n,style:h,edgeStyle:f,anchorIndex:d,nodeModel:i,graphModel:o,setHoverOff:n.setHoverOff})}):[]},e.prototype.getRotateControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowRotate,l=r.isSelected,u=r.isHitable,c=r.rotatable,d=r.isHovered,f=s&&c,h=r.getRotateControlStyle();if(!a&&u&&(l||d)&&f)return rt(sHe,{graphModel:i,nodeModel:r,eventCenter:i.eventCenter,style:h})},e.prototype.getResizeControl=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.isSilentMode,s=o.allowResize,l=r.isSelected,u=r.isHitable,c=r.resizable,d=r.isHovered,f=s&&c,h=r.getResizeControlStyle();return!a&&u&&(l||d)&&f?rt(L9e,{style:h,model:r,graphModel:i}):null},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.nodeTextMode!==hl.TEXT||i.state===Cr.TEXT_EDIT)return null;if(i.text){var s=!1;return a.nodeTextDraggable&&i.text.draggable&&(s=!0),rt(tX,{editable:a.nodeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getStateClassName=function(){var n=this.props.model,r=n.state,i=n.isDragging,o=n.isSelected,a="lf-node";switch(r){case Cr.ALLOW_CONNECT:a+=" lf-node-allow";break;case Cr.NOT_ALLOW_CONNECT:a+=" lf-node-not-allow";break;default:a+=" lf-node-default";break}return i&&(a+=" lf-dragging"),o&&(a+=" lf-node-selected"),a},e.prototype.toFront=function(){var n=this.props,r=n.model,i=n.graphModel;r.autoToFront&&i.toFront(r.id)},e.prototype.render=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.hideAnchors,s=o.adjustNodePosition,l=o.allowRotate,u=o.allowResize,c=i.gridSize,d=i.transformModel.SCALE_X,f=r.isHitable,h=r.draggable,m=r.transform,g=r.getOuterGAttributes(),y=g.className,b=y===void 0?"":y,w=hHe(g,["className"]),O=rt("g",{className:"lf-node-content",children:[rt("g",{transform:m,children:[this.getShape(),this.getText(),l&&this.getRotateControl(),u&&this.getResizeControl()]}),!a&&this.getAnchors()]}),S;return f?(s&&h&&this.stepDrag.setStep(c*d),S=rt("g",eS({className:"".concat(this.getStateClassName()," ").concat(b),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,onMouseOut:this.onMouseOut,onContextMenu:this.handleContextMenu,onFocus:this.handleFocus,onBlur:this.handleBlur},w,{children:O}))):S=rt("g",eS({className:"".concat(this.getStateClassName()," ").concat(b)},w,{children:O})),S},e.isObserved=!1,e}(ur),pHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),eA=globalThis&&globalThis.__assign||function(){return eA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},$u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})($u||($u={}));var x6=function(t){SHe(e,t);function e(n){var r=t.call(this)||this;r.handleMouseDown=function(l){r.stepDrag&&r.stepDrag.handleMouseDown(l)},r.onDragStart=function(){var l=r.props,u=l.x,c=l.y,d=l.edgeModel,f=d.startPoint,h=d.endPoint,m=d.pointsList;r.oldEdge={startPoint:f,endPoint:h,pointsList:m},r.setState({endX:u,endY:c,dragging:!0})},r.onDragging=function(l){var u=l.deltaX,c=l.deltaY,d=r.state,f=d.endX,h=d.endY,m=r.props,g=m.graphModel,y=m.type,b=g.transformModel,w=g.editConfigModel,O=CHe(b.moveCanvasPointByHtml([f,h],u,c),2),S=O[0],x=O[1];r.setState({endX:S,endY:x,dragging:!0});var C=r.props.edgeModel,E=Yw({x:f,y:h},g);if(E&&E.node&&r.isAllowAdjust(E).pass){var T=C.startPoint,P=C.endPoint,A=C.sourceNode,D=C.targetNode,N=y===$u.SOURCE?{startPoint:{x:E.anchor.x,y:E.anchor.y},endPoint:{x:P.x,y:P.y},sourceNode:E.node,targetNode:D}:{startPoint:{x:T.x,y:T.y},endPoint:{x:E.anchor.x,y:E.anchor.y},sourceNode:A,targetNode:E.node};C.updateAfterAdjustStartAndEnd(N)}else y===$u.SOURCE?C.updateStartPoint({x:S,y:x}):C.updateEndPoint({x:S,y:x});C.text.value&&w.adjustEdge&&C.setText(Object.assign({},C.text,C.textPosition))},r.onDragEnd=function(l){var u,c,d,f=l.event;try{r.setState({dragging:!1});var h=r.props,m=h.graphModel,g=h.edgeModel,y=h.type,b=r.state,w=b.endX,O=b.endY,S=b.dragging,x=Yw({x:w,y:O},m);if(!S)return;var C=!1,E=void 0;if(x&&x.node){var T=r.isAllowAdjust(x),P=T.pass,A=T.msg,D=T.newTargetNode;if(P){var N=g.getData(),$=N.text,W=N.sourceAnchorId,L=W===void 0?"":W,I=N.targetAnchorId,U=I===void 0?"":I,Q=xHe(N,["text","sourceAnchorId","targetAnchorId"]);if(E=zl(zl({sourceAnchorId:L,targetAnchorId:U},Q),{text:($==null?void 0:$.value)||""}),y===$u.SOURCE){var V=m.getNodeModelById(x.node.id),q=m.getNodeModelById(g.targetNodeId),K=(u=m.edgeGenerator)===null||u===void 0?void 0:u.call(m,V==null?void 0:V.getData(),q==null?void 0:q.getData(),E);E=zl(zl({},K),{sourceNodeId:x.node.id,sourceAnchorId:x.anchor.id,startPoint:{x:x.anchor.x,y:x.anchor.y},targetNodeId:g.targetNodeId,endPoint:zl({},g.endPoint)}),g.sourceNodeId===x.node.id&&g.sourceAnchorId===x.anchor.id&&(C=!0)}else if(y===$u.TARGET){var V=m.getNodeModelById(g.sourceNodeId),q=m.getNodeModelById(x.node.id),K=(c=m.edgeGenerator)===null||c===void 0?void 0:c.call(m,V==null?void 0:V.getData(),q==null?void 0:q.getData(),E);E=zl(zl({},K),{sourceNodeId:g.sourceNodeId,startPoint:zl({},g.startPoint),targetNodeId:x.node.id,targetAnchorId:x.anchor.id,endPoint:{x:x.anchor.x,y:x.anchor.y}}),g.targetNodeId===x.node.id&&g.targetAnchorId===x.anchor.id&&(C=!0)}}else{C=!0;var ie=D.getData();m.eventCenter.emit(pn.CONNECTION_NOT_ALLOWED,{data:ie,msg:A})}}else C=!0;if(C)r.recoveryEdge();else{var oe=g.getData();m.deleteEdgeById(g.id);var Se=m.addEdge(zl({},E));m.eventCenter.emit(pn.EDGE_EXCHANGE_NODE,{data:{newEdge:Se.getData(),oldEdge:oe}})}(d=r.preTargetNode)===null||d===void 0||d.setElementState(Cr.DEFAULT)}finally{var m=r.props.graphModel;m.eventCenter.emit(pn.ADJUST_POINT_DRAGEND,{e:f,data:r.stepDragData})}},r.recoveryEdge=function(){var l=r.props.edgeModel,u=r.oldEdge,c=u.startPoint,d=u.endPoint,f=u.pointsList;l.updateStartPoint(c),l.updateEndPoint(d),l.modelType!==Kn.LINE_EDGE&&(l.pointsList=f!=null?f:[],l.initPoints())},r.getAdjustPointStyle=function(){var l=r.props.graphModel.theme,u=l.edgeAdjust;return u},r.state={dragging:!1,endX:0,endY:0},r.targetRuleResults=new Map,r.sourceRuleResults=new Map;var i=n.type,o=n.edgeModel,a=n.graphModel,s=a.eventCenter;return r.stepDragData={type:i,edgeData:o.getData()},r.stepDrag=new kl({onDragStart:r.onDragStart,onDragging:r.onDragging,onDragEnd:r.onDragEnd,eventType:"ADJUST_POINT",isStopPropagation:!1,eventCenter:s,data:r.stepDragData}),r}return e.prototype.isAllowAdjust=function(n){var r=this.props,i=r.edgeModel,o=i.id,a=i.sourceNode,s=i.targetNode,l=i.sourceAnchorId,u=i.targetAnchorId,c=r.type,d,f,h,m;if(c===$u.SOURCE?(d=n.node,f=s,h=n.anchor,m=s.getAnchorInfo(u)):(d=a,f=n.node,m=n.anchor,h=a.getAnchorInfo(l)),this.preTargetNode&&this.preTargetNode!==n.node&&this.preTargetNode.setElementState(Cr.DEFAULT),this.preTargetNode=n.node,m.id===h.id)return{pass:!1,msg:"",newTargetNode:f};var g="".concat(d.id,"_").concat(f.id,"_").concat(h.id,"_").concat(m.id);if(!this.targetRuleResults.has(g)){var y=d.isAllowConnectedAsSource(f,h,m,o),b=f.isAllowConnectedAsTarget(d,h,m,o);this.sourceRuleResults.set(g,Xw(y)),this.targetRuleResults.set(g,Xw(b))}var w=this.sourceRuleResults.get(g),O=w.isAllPass,S=w.msg,x=this.targetRuleResults.get(g),C=x.isAllPass,E=x.msg,T=O&&C?Cr.ALLOW_CONNECT:Cr.NOT_ALLOW_CONNECT;return c===$u.SOURCE?d.setElementState(T):f.setElementState(T),{pass:O&&C,msg:E||S,newTargetNode:f}},e.prototype.render=function(){var n=this.props,r=n.x,i=n.y,o=n.getAdjustPointShape,a=n.edgeModel,s=this.state.dragging;return rt("g",{pointerEvents:s?"none":"",onMouseDown:this.handleMouseDown,children:s?"":o(r,i,a)})},e}(ur),EHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),lA=globalThis&&globalThis.__assign||function(){return lA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yC=function(t){THe(e,t);function e(){var n=t.call(this)||this;return n.textRef=uC(),n.handleHover=function(r,i){var o=n.props,a=o.model,s=o.graphModel.eventCenter;a.setHovered(r);var l=r?pn.EDGE_MOUSEENTER:pn.EDGE_MOUSELEAVE,u=a.getData();s.emit(l,{data:u,e:i})},n.setHoverOn=function(r){var i=n.props.model.isHovered;i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOn(),n.handleHover(!0,r))},n.setHoverOff=function(r){var i=n.props.model.isHovered;!i||(n.textRef&&n.textRef.current&&n.textRef.current.setHoverOff(),n.handleHover(!1,r))},n.handleContextMenu=function(r){r.preventDefault(),n.contextMenuTime=new Date().getTime(),n.clickTimer&&clearTimeout(n.clickTimer);var i=n.props,o=i.model,a=i.graphModel,s=a.editConfigModel,l=a.getPointByClient({x:r.clientX,y:r.clientY});a.setElementStateById(o.id,Cr.SHOW_MENU,l.domOverlayPosition),s.isSilentMode||n.toFront(),o.isSelected||a.selectEdgeById(o.id);var u=o==null?void 0:o.getData();a.eventCenter.emit(pn.EDGE_CONTEXTMENU,{data:u,e:r,position:l})},n.handleMouseDown=function(r){r.stopPropagation(),n.startTime=new Date().getTime()},n.handleMouseUp=function(){var r=n.props.model;n.mouseUpDrag=r.isDragging},n.handleClick=function(r){if(!!n.startTime&&!n.mouseUpDrag){var i=r.button===2;if(!i){var o=r.detail===2,a=n.props,s=a.model,l=a.graphModel,u=s==null?void 0:s.getData(),c=l.getPointByClient({x:r.clientX,y:r.clientY});if(o){var d=l.editConfigModel,f=l.textEditElement,h=s.id,m=s.text,g=s.modelType;if(f&&f.id===h&&l.setElementStateById(h,Cr.DEFAULT),d.edgeTextEdit&&m.editable&&(s.setSelected(!1),l.setElementStateById(h,Cr.TEXT_EDIT)),g===Kn.POLYLINE_EDGE){var y=s,b=l.getPointByClient({x:r.x,y:r.y}).canvasOverlayPosition,w=b.x,O=b.y;y.dbClickPosition=HY({x:w,y:O},y.points)}l.eventCenter.emit(pn.EDGE_DBCLICK,{data:u,e:r,position:c})}else l.eventCenter.emit(pn.ELEMENT_CLICK,{data:u,e:r,position:c}),l.eventCenter.emit(pn.EDGE_CLICK,{data:u,e:r,position:c});var S=l.editConfigModel;l.selectEdgeById(s.id,WY(r,S)),S.isSilentMode||n.toFront()}}},n.handleFocus=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(pn.EDGE_FOCUS,{data:i.getData()})},n.handleBlur=function(){var r=n.props,i=r.model,o=r.graphModel;o.eventCenter.emit(pn.EDGE_BLUR,{data:i.getData()})},n}return e.prototype.getShape=function(){return rt("g",{children:this.getEdge()})},e.prototype.getTextStyle=function(){},e.prototype.getText=function(){var n,r=this.props,i=r.model,o=r.graphModel,a=o.editConfigModel;if(a.edgeTextMode!==hl.TEXT||i.state===Cr.TEXT_EDIT)return null;if(i.text){var s=!1;return a.edgeTextDraggable&&i.text.draggable&&(s=!0),rt(dHe,{ref:this.textRef,editable:a.edgeTextEdit&&((n=i.text.editable)!==null&&n!==void 0?n:!0),model:i,graphModel:o,draggable:s})}return null},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint,o=n.isSelected,a=this.state.hover;return{start:r,end:i,hover:a,isSelected:o}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.startPoint,i=n.endPoint;return[r,i]},e.prototype.getArrowStyle=function(){return console.error("getArrowStyle is deprecated in 1.2.0, please use model.getArrowStyle"),null},e.prototype.getArrow=function(){var n=this.props.model,r=n.id,i=n.getArrowStyle(),o=i.refY,a=o===void 0?0:o,s=i.refX,l=s===void 0?2:s,u=kHe(this.getLastTwoPoints(),2),c=u[0],d=u[1],f="auto";return c!==null&&d!==null&&(f=K9e(G9e({x:d.x-c.x,y:d.y-c.y,z:0}))),rt("g",{children:rt("defs",{children:[rt("marker",{id:"marker-start-".concat(r),refX:-l,refY:a,overflow:"visible",orient:"auto",markerUnits:"userSpaceOnUse",children:this.getStartArrow()}),rt("marker",{id:"marker-end-".concat(r),refX:l,refY:a,overflow:"visible",orient:f,markerUnits:"userSpaceOnUse",children:this.getEndArrow()})]})})},e.prototype.getStartArrow=function(){return rt("path",{})},e.prototype.getEndArrow=function(){var n=this.props.model,r=n.getArrowStyle(),i=r.stroke,o=r.strokeWidth,a=r.offset,s=r.verticalLength;return rt("path",{stroke:i,fill:i,strokeWidth:o,transform:"rotate(180)",d:"M 0 0 L ".concat(a," -").concat(s," L ").concat(a," ").concat(s," Z")})},e.prototype.getAdjustPointShape=function(n,r,i){var o=i.getAdjustPointStyle();return rt(bm,Fy({className:"lf-edge-adjust-point"},o,{x:n,y:r}))},e.prototype.getAdjustPoints=function(){var n=this.props,r=n.model,i=n.graphModel,o=i.editConfigModel,a=o.adjustEdgeStartAndEnd,s=o.adjustEdgeStart,l=o.adjustEdgeEnd,u=r.getAdjustStart(),c=r.getAdjustEnd();return rt("g",{children:[a&&s&&rt(x6,Fy({type:$u.SOURCE},u,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i})),a&&l&&rt(x6,Fy({type:$u.TARGET},c,{getAdjustPointShape:this.getAdjustPointShape,edgeModel:r,graphModel:i}))]})},e.prototype.getAnimation=function(){console.error("getAnimation is deprecated in 1.2.0, please use model.getEdgeAnimationStyle")},e.prototype.getAppendWidth=function(){return rt("g",{})},e.prototype.getAppend=function(){return rt("g",{className:"lf-edge-append",children:this.getAppendWidth()})},e.prototype.getEdge=function(){return null},e.prototype.toFront=function(){var n=this.props,r=n.graphModel,i=n.model;r.toFront(i.id)},e.prototype.render=function(){var n=this.props.model,r=n.isSelected,i=n.isHitable,o=n.isShowAdjustPoint;return rt("g",{children:[rt("g",{className:["lf-edge",!i&&"pointer-none",r&&"lf-edge-selected"].filter(Boolean).join(" "),onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onContextMenu:this.handleContextMenu,onMouseOver:this.setHoverOn,onMouseEnter:this.setHoverOn,onMouseLeave:this.setHoverOff,onFocus:this.handleFocus,onBlur:this.handleBlur,children:[this.getShape(),this.getAppend(),this.getText(),this.getArrow()]}),o&&r?this.getAdjustPoints():""]})},e.isObserved=!1,e}(ur),PHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),uA=globalThis&&globalThis.__assign||function(){return uA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},cA=function(t){PHe(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getEdge=function(){var n=this.props.model,r=n.getEdgeStyle(),i=n,o=i.path,a=i.isAnimation,s=i.arrowConfig,l=n.getEdgeAnimationStyle(),u=l.strokeDasharray,c=l.stroke,d=l.strokeDashoffset,f=l.animationName,h=l.animationDuration,m=l.animationIterationCount,g=l.animationTimingFunction,y=l.animationDirection;return rt(L0,uA({d:o},r,s,a?{strokeDasharray:u,stroke:c,style:{strokeDashoffset:d,animationName:f,animationDuration:h,animationIterationCount:m,animationTimingFunction:g,animationDirection:y}}:{}))},e.prototype.getAppendWidth=function(){var n=this.props.model.path;return rt(L0,{d:n,strokeWidth:10,stroke:"transparent",fill:"none"})},e.prototype.getArrowInfo=function(){var n=this.props.model,r=this.state.hover,i=n.isSelected,o=n.getArrowStyle().offset,a=n.pointsList.map(function(d){return{x:d.x,y:d.y}}),s=AHe(a6(a,o),2),l=s[0],u=s[1],c={start:l,end:u,hover:r,isSelected:i};return c},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.getArrowStyle().offset,i=n.pointsList.map(function(o){return{x:o.x,y:o.y}});return a6(i,r)},e}(yC),MHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),dA=globalThis&&globalThis.__assign||function(){return dA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},V0=function(t){RHe(e,t);function e(){var n=t.call(this)||this;return n.onDragStart=function(){var r=n.props.model;r.dragAppendStart(),n.isShowAdjustPointTemp=r.isShowAdjustPoint,r.isShowAdjustPoint=!1},n.onDragging=function(r){var i=r.deltaX,o=r.deltaY,a=n.props,s=a.model,l=a.graphModel;n.isDragging=!0;var u=l.transformModel,c=l.editConfigModel,d=$He(u.fixDeltaXY(i,o),2),f=d[0],h=d[1],m=s,g=c.adjustEdgeMiddle;g?n.appendInfo=m.dragAppendSimple(n.appendInfo,{x:f,y:h}):n.appendInfo=m.dragAppend(n.appendInfo,{x:f,y:h})},n.onDragEnd=function(){var r,i=n.props,o=i.model,a=i.graphModel.eventCenter,s=o;s.dragAppendEnd(),n.isDragging=!1,s.isShowAdjustPoint=(r=n.isShowAdjustPointTemp)!==null&&r!==void 0?r:!1,n.appendInfo=void 0,a.emit(pn.EDGE_ADJUST,{data:s.getData()})},n.beforeDragStart=function(r,i){i.draggable&&n.drag.handleMouseDown(r),n.appendInfo=i},n.drag=new kl({onDragStart:n.onDragStart,onDragging:n.onDragging,onDragEnd:n.onDragEnd,isStopPropagation:!1}),n}return e.prototype.getEdge=function(){var n=this.props.model,r=n.points,i=n.isAnimation,o=n.arrowConfig,a=n.getEdgeStyle(),s=n.getEdgeAnimationStyle(),l=s.strokeDasharray,u=s.stroke,c=s.strokeDashoffset,d=s.animationName,f=s.animationDuration,h=s.animationIterationCount,m=s.animationTimingFunction,g=s.animationDirection;return rt(R9e,Sh({points:r},a,o,i?{strokeDasharray:l,stroke:u,style:{strokeDashoffset:c,animationName:d,animationDuration:f,animationIterationCount:h,animationTimingFunction:m,animationDirection:g}}:{}))},e.prototype.getArrowInfo=function(){var n=this.props.model,r=n.points,i=n.isSelected,o=this.state.hover,a=sp(r),s=a[0],l=a[0];return a.length>=2&&(s=a[a.length-2],l=a[a.length-1]),{start:s,end:l,hover:o,isSelected:i}},e.prototype.getLastTwoPoints=function(){var n=this.props.model,r=n.points,i=sp(r),o=i[0],a=i[0];return i.length>=2&&(o=i[i.length-2],a=i[i.length-1]),[o,a]},e.prototype.getAppendAttributes=function(n){var r=n.start,i=n.end,o;if(r.x===i.x&&r.y===i.y)o="";else{var a={start:r,end:i,offset:10,verticalLength:5},s=$0(Sh(Sh({},a),{type:"start"})),l=$0(Sh(Sh({},a),{type:"end"}));o="M".concat(s.leftX," ").concat(s.leftY,` L`).concat(s.rightX," ").concat(s.rightY,` L`).concat(l.rightX," ").concat(l.rightY,` L`).concat(l.leftX," ").concat(l.leftY," z")}return{d:o,fill:"transparent",stroke:"transparent",strokeWidth:1,strokeDasharray:"4, 4"}},e.prototype.getAppendShape=function(n){var r=this.getAppendAttributes(n),i=r.d,o=r.strokeWidth,a=r.fill,s=r.strokeDasharray,l=r.stroke;return rt(L0,{d:i,fill:a,strokeWidth:o,stroke:l,strokeDasharray:s})},e.prototype.getAppendWidth=function(){for(var n=this,r=this.props,i=r.model,o=r.graphModel,a=i.pointsList,s=i.draggable,l=[],u=a.length,c=function(h){var m="lf-polyline-append",g={start:{x:a[h].x,y:a[h].y},end:{x:a[h+1].x,y:a[h+1].y},startIndex:h,endIndex:h+1,direction:di.HORIZONTAL,draggable:!0},y=rt("g",{className:m,children:d.getAppendShape(g)}),b=o.editConfigModel,w=b.adjustEdge,O=b.adjustEdgeMiddle;if(w&&s){var S=g.startIndex,x=g.endIndex,C=O&&(S===0||x===u-1);g.draggable=!C,g.start.x===g.end.x?(g.draggable&&(m+="-ew-resize"),g.direction=di.VERTICAL):g.start.y===g.end.y&&(g.draggable&&(m+="-ns-resize"),g.direction=di.HORIZONTAL),y=rt("g",{className:d.isDragging?"lf-dragging":"lf-drag-able",onMouseDown:function(E){return n.beforeDragStart(E,g)},children:rt("g",{className:m,children:d.getAppendShape(g)})})}l.push(y)},d=this,f=0;f=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},BHe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},FHe=function(t){LHe(e,t);function e(n){var r=t.call(this,n)||this;return r.ref=uC(),r.__prevText={type:"",text:"",id:""},r.keyupHandler=function(i){var o=r.props.graphModel.textEditElement;i.key==="Enter"&&i.altKey&&(o==null||o.setElementState(Cr.DEFAULT))},r.inputHandler=function(i){var o=i.target.innerText,a=r.props.graphModel.textEditElement;a&&(r.__prevText={type:a.type,text:o.replace(/(\r\n)+$|(\n)+$/,""),id:a.id})},r.keydownHandler=function(i){i.stopPropagation()},r.state={style:{left:0,top:0}},r}return e.getDerivedStateFromProps=function(n){var r,i=n.textEditElement,o=n.graphModel,a=o.transformModel,s=o.theme,l=s.inputText,u;if(i){if(!(!((r=i.text)===null||r===void 0)&&r.value)&&i.BaseType===Si.EDGE){var c=i.text,d=i.textPosition,f=d.x,h=d.y;c.x=f,c.y=h,i.setText(c)}var m={resize:"auto",whiteSpace:"normal",wordBreak:"break-all"};if(i.BaseType===Si.EDGE){var g=s.edgeText,y=g.overflowMode,b=g.lineHeight,w=g.wrapPadding,O=g.textWidth;O&&y==="autoWrap"&&(u=$c($c({},m),{width:O,minWidth:O,lineHeight:b,padding:w}))}else if(i.BaseType===Si.NODE){var S=s.nodeText,y=S.overflowMode,b=S.lineHeight,w=S.wrapPadding,O=S.textWidth,x=i.width,C=i.modelType,E=i.textWidth,T=E||O||x;(C!==Kn.TEXT_NODE&&y==="autoWrap"||C===Kn.TEXT_NODE&&O)&&(u=$c($c({},m),{width:T,minWidth:T,lineHeight:b,padding:w}))}var P=i.text,A=P.x,D=P.y,N=BHe(a.CanvasPointToHtmlPoint([A,D]),2),$=N[0],W=N[1];return{style:$c($c({left:$,top:W},u),l)}}return null},e.prototype.componentDidUpdate=function(){var n=this.props.graphModel;if(this.ref.current&&(this.ref.current.focus(),this.placeCaretAtEnd(this.ref.current)),this.__prevText.id!==""){var r=this.__prevText,i=r.text,o=r.id;n.updateText(o,i),n.eventCenter.emit(pn.TEXT_UPDATE,{data:$c({},this.__prevText)}),this.__prevText.id="",this.__prevText.text="",this.__prevText.type=""}},e.prototype.placeCaretAtEnd=function(n){if(window.getSelection!==void 0&&document.createRange!==void 0){var r=document.createRange();r.selectNodeContents(n),r.collapse(!1);var i=window.getSelection();i==null||i.removeAllRanges(),i==null||i.addRange(r)}},e.prototype.render=function(){var n,r=this.props.graphModel.textEditElement,i=this.state.style;return r?rt("div",{contentEditable:!0,className:"lf-text-input",style:i,ref:this.ref,onKeyUp:this.keyupHandler,onKeyDown:this.keydownHandler,onKeyPress:this.keydownHandler,onInput:this.inputHandler,children:(n=r.text)===null||n===void 0?void 0:n.value},r.id):null},e.toolName="text-edit-tool",e=IHe([Ea],e),e}(ur),VHe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),jHe=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},XT=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},zHe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},HHe=[FHe,QHe],WHe=function(){function t(e){var n=this;this.toolMap=new Map,this.disabledToolMap=new Map,this.instance=e,jn(HHe,function(o){n.isDisabled(o.toolName)||n.registerTool(o.toolName,o)});var r=e.graphModel,i=r.eventCenter;i.on("".concat(pn.GRAPH_TRANSFORM,",").concat(pn.NODE_CLICK,",").concat(pn.BLANK_CLICK," "),function(){var o,a=r.textEditElement,s=r.editConfigModel,l=s.edgeTextEdit,u=s.nodeTextEdit;(l||u)&&a&&((o=r.textEditElement)===null||o===void 0||o.setElementState(Cr.DEFAULT))})}return t.prototype.isDisabled=function(e){var n;return((n=this.instance.options.disabledTools)===null||n===void 0?void 0:n.indexOf(e))!==-1},t.prototype.registerTool=function(e,n){this.toolMap.set(e,n)},t.prototype.disableTool=function(e){var n=this.toolMap.get(e);if(n)return this.disabledToolMap.set(e,n),this.toolMap.delete(e),!0;throw new Error("\u7981\u7528\u5931\u8D25\uFF0C\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.enableTool=function(e){var n=this.disabledToolMap.get(e);if(n)return this.toolMap.set(e,n),this.disabledToolMap.delete(e),!0;throw new Error("\u4E0D\u5B58\u5728\u540D\u4E3A ${tool} \u7684\u5DE5\u5177")},t.prototype.getTools=function(){return Array.from(this.toolMap.values())},t.prototype.getInstance=function(){return this.instance},t.prototype.destroy=function(){this.toolMap.clear(),this.disabledToolMap.clear()},ZT([at],t.prototype,"toolMap",void 0),ZT([it],t.prototype,"disableTool",null),ZT([it],t.prototype,"enableTool",null),t}();function UHe(t){throw new Error("[mobx-utils] "+t)}function iS(t,e){e===void 0&&(e="Illegal state"),t||UHe(e)}var nX=function(t){return t&&t!==Object.prototype&&Object.getOwnPropertyNames(t).concat(nX(Object.getPrototypeOf(t))||[])},qHe=function(t){var e=nX(t),n=e.filter(function(r,i){return e.indexOf(r)===i});return n},YHe=function(t){return qHe(t).filter(function(e){return e!=="constructor"&&!~e.indexOf("__")})},rX="pending",oS="fulfilled",UN="rejected";function XHe(t){switch(this.state){case rX:return t.pending&&t.pending(this.value);case UN:return t.rejected&&t.rejected(this.value);case oS:return t.fulfilled?t.fulfilled(this.value):this.value}}function E6(t,e){if(iS(arguments.length<=2,"fromPromise expects up to two arguments"),iS(typeof t=="function"||typeof t=="object"&&t&&typeof t.then=="function","Please pass a promise or function to fromPromise"),t.isPromiseBasedObservable===!0)return t;typeof t=="function"&&(t=new Promise(t));var n=t;t.then(it("observableFromPromise-resolve",function(i){n.value=i,n.state=oS}),it("observableFromPromise-reject",function(i){n.value=i,n.state=UN})),n.isPromiseBasedObservable=!0,n.case=XHe;var r=e&&e.state===oS?e.value:void 0;return AP(n,{value:r,state:rX},{},{deep:!1}),n}(function(t){t.reject=it("fromPromise.reject",function(n){var r=t(Promise.reject(n));return r.state=UN,r.value=n,r});function e(n){n===void 0&&(n=void 0);var r=t(Promise.resolve(n));return r.state=oS,r.value=n,r}t.resolve=it("fromPromise.resolve",e)})(E6||(E6={}));var $O=function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o};(function(){function t(e,n){var r=this;Bze(function(){r.current=n,r.subscription=e.subscribe(r)})}return t.prototype.dispose=function(){this.subscription&&this.subscription.unsubscribe()},t.prototype.next=function(e){this.current=e},t.prototype.complete=function(){this.dispose()},t.prototype.error=function(e){this.current=e,this.dispose()},$O([at.ref],t.prototype,"current",void 0),$O([it.bound],t.prototype,"next",null),$O([it.bound],t.prototype,"complete",null),$O([it.bound],t.prototype,"error",null),t})();var aS=function(){return aS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},ZHe=["model","reset","submit","isDirty","isPropertyDirty","resetProperty"];(function(){function t(e){var n=this;this.model=e,this.localValues=at.map({}),this.localComputedValues=at.map({}),this.isPropertyDirty=function(r){return n.localValues.has(r)},iS(Sl(e),"createViewModel expects an observable object"),YHe(e).forEach(function(r){if(!(r===Ln||r==="__mobxDidRunLazyInitializers")){if(iS(ZHe.indexOf(r)===-1,"The propertyname "+r+" is reserved and cannot be used with viewModels"),vB(e,r)){var i=Vb(e,r).derivation;n.localComputedValues.set(r,Gr(i.bind(n)))}var o=Object.getOwnPropertyDescriptor(e,r),a=o?{enumerable:o.enumerable}:{};Object.defineProperty(n,r,aS(aS({},a),{configurable:!0,get:function(){return vB(e,r)?n.localComputedValues.get(r).get():n.isPropertyDirty(r)?n.localValues.get(r):n.model[r]},set:it(function(s){s!==n.model[r]?n.localValues.set(r,s):n.localValues.delete(r)})}))}})}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return this.localValues.size>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"changedValues",{get:function(){return this.localValues.toJS()},enumerable:!1,configurable:!0}),t.prototype.submit=function(){var e=this;mm(this.localValues).forEach(function(n){var r=e.localValues.get(n),i=e.model[n];hc(i)?i.replace(r):ls(i)?(i.clear(),i.merge(r)):Wze(r)||(e.model[n]=r)}),this.localValues.clear()},t.prototype.reset=function(){this.localValues.clear()},t.prototype.resetProperty=function(e){this.localValues.delete(e)},Vv([Gr],t.prototype,"isDirty",null),Vv([Gr],t.prototype,"changedValues",null),Vv([it.bound],t.prototype,"submit",null),Vv([it.bound],t.prototype,"reset",null),Vv([it.bound],t.prototype,"resetProperty",null),t})();function GT(t){if(!t)return"ROOT";for(var e=[];t.parent;)e.push(t.path),t=t.parent;return e.reverse().join("/")}function KT(t){return Sl(t)||hc(t)||ls(t)}function GHe(t,e){var n=new WeakMap;function r(s){var l=n.get(s.object);i(s,l),e(s,GT(l),t)}function i(s,l){switch(s.type){case"add":o(s.newValue,l,s.name);break;case"update":a(s.oldValue),o(s.newValue,l,s.name||""+s.index);break;case"remove":case"delete":a(s.oldValue);break;case"splice":s.removed.map(a),s.added.forEach(function(d,f){return o(d,l,""+(s.index+f))});for(var u=s.index+s.addedCount;uthis.maxSize&&this.undos.shift())},t.prototype.undoAble=function(){return this.undos.length>1},t.prototype.undo=function(){if(!!this.undoAble()){var e=this.undos.pop();this.redos.push(e);var n=this.undos.pop();return this.curData=Fn(n),n}},t.prototype.redoAble=function(){return this.redos.length>0},t.prototype.redo=function(){if(!!this.redoAble()){var e=this.redos.pop();return this.curData=Fn(e),e}},t.prototype.watch=function(e){var n=this;this.stopWatch&&this.stopWatch(),this.undos.push(e.modelToGraphData()),this.stopWatch=GHe(e,jo(function(){var r=e.modelToHistoryData();r&&n.add(fA({},r))},this.waitTime))},t.prototype.destroy=function(){this.undos=[],this.redos=[],this.curData=null,this.stopWatch&&this.stopWatch()},t}(),iX={exports:{}};(function(t){(function(e,n,r){if(!e)return;for(var i={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},o={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},a={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},s={option:"alt",command:"meta",return:"enter",escape:"esc",plus:"+",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},l,u=1;u<20;++u)i[111+u]="f"+u;for(u=0;u<=9;++u)i[u+96]=u.toString();function c(E,T,P){if(E.addEventListener){E.addEventListener(T,P,!1);return}E.attachEvent("on"+T,P)}function d(E){if(E.type=="keypress"){var T=String.fromCharCode(E.which);return E.shiftKey||(T=T.toLowerCase()),T}return i[E.which]?i[E.which]:o[E.which]?o[E.which]:String.fromCharCode(E.which).toLowerCase()}function f(E,T){return E.sort().join(",")===T.sort().join(",")}function h(E){var T=[];return E.shiftKey&&T.push("shift"),E.altKey&&T.push("alt"),E.ctrlKey&&T.push("ctrl"),E.metaKey&&T.push("meta"),T}function m(E){if(E.preventDefault){E.preventDefault();return}E.returnValue=!1}function g(E){if(E.stopPropagation){E.stopPropagation();return}E.cancelBubble=!0}function y(E){return E=="shift"||E=="ctrl"||E=="alt"||E=="meta"}function b(){if(!l){l={};for(var E in i)E>95&&E<112||i.hasOwnProperty(E)&&(l[i[E]]=E)}return l}function w(E,T,P){return P||(P=b()[E]?"keydown":"keypress"),P=="keypress"&&T.length&&(P="keydown"),P}function O(E){return E==="+"?["+"]:(E=E.replace(/\+{2}/g,"+plus"),E.split("+"))}function S(E,T){var P,A,D,N=[];for(P=O(E),D=0;D1){V(K,Y,ie,oe);return}re=S(K,oe),T._callbacks[re.key]=T._callbacks[re.key]||[],L(re.key,re.modifiers,{type:re.action},Se,K,ke),T._callbacks[re.key][Se?"unshift":"push"]({callback:ie,modifiers:re.modifiers,action:re.action,seq:Se,level:ke,combo:K})}T._bindMultiple=function(K,ie,oe){for(var Se=0;Se-1||x(T,P.target))return!1;if("composedPath"in E&&typeof E.composedPath=="function"){var A=E.composedPath()[0];A!==E.target&&(T=A)}return T.tagName=="INPUT"||T.tagName=="SELECT"||T.tagName=="TEXTAREA"||T.isContentEditable},C.prototype.handleKey=function(){var E=this;return E._handleKey.apply(E,arguments)},C.addKeycodes=function(E){for(var T in E)E.hasOwnProperty(T)&&(i[T]=E[T]);l=null},C.init=function(){var E=C(n);for(var T in E)T.charAt(0)!=="_"&&(C[T]=function(P){return function(){return E[P].apply(E,arguments)}}(T))},C.init(),e.Mousetrap=C,t.exports&&(t.exports=C),typeof r=="function"&&r.amd&&r(function(){return C})})(typeof window!="undefined"?window:null,typeof window!="undefined"?document:null)})(iX);var eWe=iX.exports,Ud=globalThis&&globalThis.__assign||function(){return Ud=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&t.pointsList.forEach(function(n){n.x+=e,n.y+=e}),VR(t.text)||(t.text.x+=e,t.text.y+=e),t}function nWe(t,e){var n=t.x,r=t.y,i=t.text,o=i?{x:i.x+e,y:i.y+e,value:i.value}:void 0;return Ud(Ud({},t),{id:"",x:n+e,y:r+e,text:o})}function rWe(t,e){var n=t.startPoint,r=t.endPoint,i=t.pointsList,o=t.text,a=tWe(t,["startPoint","endPoint","pointsList","text"]);a.id="";var s={x:n.x+e,y:n.y+e},l={x:r.x+e,y:r.y+e},u=Ca(i,function(d){return{x:d.x+e,y:d.y+e}}),c=o?Ud(Ud({},o),{x:o.x+e,y:o.y+e}):void 0;return Ud(Ud({},a),{startPoint:s,endPoint:l,pointsList:u,text:c})}var Jp=40,NO=40;function iWe(t,e){var n=t.keyboard,r=n.options.keyboard;n.on(["cmd + c","ctrl + c"],function(){if(NO=Jp,!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=t.options.guards,o=e.getSelectElements(!1),a=i&&i.beforeClone?i.beforeClone(o):!0;return!a||o.nodes.length===0&&o.edges.length===0?(Su=null,!0):(Su=o,Su.nodes.forEach(function(s){return T6(s,Jp)}),Su.edges.forEach(function(s){return k6(s,Jp)}),!1)}),n.on(["cmd + v","ctrl + v"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;if(Su&&(Su.nodes||Su.edges)){t.clearSelectElements();var i=t.addElements(Su,NO);if(!i)return!0;i.nodes.forEach(function(o){return t.selectElementById(o.id,!0)}),i.edges.forEach(function(o){return t.selectElementById(o.id,!0)}),Su.nodes.forEach(function(o){return T6(o,Jp)}),Su.edges.forEach(function(o){return k6(o,Jp)}),NO=NO+Jp}return!1}),n.on(["cmd + z","ctrl + z"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.undo(),!1)}),n.on(["cmd + y","ctrl + y"],function(){return!(r!=null&&r.enabled)||e.textEditElement?!0:(t.redo(),!1)}),n.on(["backspace"],function(){if(!(r!=null&&r.enabled)||e.textEditElement)return!0;var i=e.getSelectElements(!0);return t.clearSelectElements(),i.edges.forEach(function(o){return o.id&&t.deleteEdge(o.id)}),i.nodes.forEach(function(o){return o.id&&t.deleteNode(o.id)}),!1})}var oWe=function(){function t(e){e.keyboard||(e.keyboard={enabled:!1}),this.options=e;var n=e.lf;this.target=n.container,this.mousetrap=new eWe(this.target),e.keyboard.enabled&&!n.options.isSilentMode&&this.enable(!0)}return t.prototype.initShortcuts=function(){var e=this,n,r=((n=this.options.keyboard)!==null&&n!==void 0?n:{}).shortcuts;if(r)if(Qn(r))r.forEach(function(s){var l=s.keys,u=s.callback,c=s.action;return e.on(l,u,c)});else{var i=r.keys,o=r.callback,a=r.action;this.on(i,o,a)}},t.prototype.on=function(e,n,r){this.mousetrap.bind(this.getKeys(e),n,r)},Object.defineProperty(t.prototype,"disabled",{get:function(){var e,n;return((n=(e=this.options)===null||e===void 0?void 0:e.keyboard)===null||n===void 0?void 0:n.enabled)!==!0},enumerable:!1,configurable:!0}),t.prototype.off=function(e,n){this.mousetrap.unbind(this.getKeys(e),n)},t.prototype.enable=function(e){(this.disabled||e)&&(this.options.keyboard&&(this.options.keyboard.enabled=!0),this.target instanceof HTMLElement&&(this.target.setAttribute("tabindex","-1"),this.target.style.outline="none"))},t.prototype.disable=function(){this.disabled||(this.options.keyboard&&(this.options.keyboard.enabled=!1),this.target instanceof HTMLElement&&this.target.removeAttribute("tabindex"))},t.prototype.destroy=function(){this.mousetrap.reset()},t.prototype.getKeys=function(e){var n=this;return(Array.isArray(e)?e:[e]).map(function(r){return n.formatKey(r)})},t.prototype.formatKey=function(e){return e.toLowerCase().replace(/\s/g,"").replace("delete","del").replace("cmd","command")},t}(),$d=globalThis&&globalThis.__assign||function(){return $d=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},JT=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r");var i="";if(e==="#text")return uh+r+t;if(e==="#cdata-section")return uh+r+"";if(e==="#comment")return uh+r+"";if("".concat(e).charAt(0)==="-")return" "+e.substring(1)+'="'+dWe(t)+'"';if(Array.isArray(t))t.forEach(function(l){i+=I1(l,e,n+1)});else if(fX(t)==="[object Object]"){var o=Object.keys(t),a="",s="";i+=(n===0?"":uh+r)+"<"+e,o.forEach(function(l){l.charAt(0)==="-"?a+=I1(t[l],l,n+1):s+=I1(t[l],l,n+1)}),i+=a+(s!==""?">".concat(s).concat(uh+r,""):" />")}else i+=uh+r+"<".concat(e,">").concat(t.toString(),"");return i}function fWe(t){var e="";for(var n in t)e+=I1(t[n],n,0);return e}var Ra=function(){};Ra.ObjTree=function(){return this};Ra.ObjTree.VERSION="0.23";Ra.ObjTree.prototype.xmlDecl=` `;Ra.ObjTree.prototype.attr_prefix="-";Ra.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e)return this.parseDOM(e)};Ra.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};Ra.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e":typeof o=="object"&&o.constructor==Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" "+i.substring(1)+'="'+this.xml_escape(o)+'"'}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<"+t+a+`> `+s+" `:s="<"+t+a+">"+s+" `:s="<"+t+a+` /> `),s};Ra.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r":typeof i=="object"&&i.constructor==Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};Ra.ObjTree.prototype.scalar_to_xml=function(t,e){return t=="#text"?this.xml_escape(e):"<"+t+">"+this.xml_escape(e)+" `};Ra.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,'"')};var hWe=function(t){return new Ra.ObjTree().parseXML(t)},pWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),gA=globalThis&&globalThis.__assign||function(){return gA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},nc;(function(t){t.START="bpmn:startEvent",t.END="bpmn:endEvent",t.GATEWAY="bpmn:exclusiveGateway",t.USER="bpmn:userTask",t.SYSTEM="bpmn:serviceTask",t.FLOW="bpmn:sequenceFlow"})(nc||(nc={}));var hX=["-name","-id","bpmn:incoming","bpmn:outgoing","-sourceRef","-targetRef"],D6=["properties","startPoint","endPoint","pointsList"];function L6(t){var e=t?D6.concat(t):D6;return function(n){function r(i){var o={};return typeof i=="string"?i:Array.isArray(i)?i.map(function(a){return r(a)}):(Object.entries(i).forEach(function(a){var s=bC(a,2),l=s[0],u=s[1];typeof u!="object"?l.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(l)?o[l]=u:o["-".concat(l)]=u:e.includes(l)?o["-".concat(l)]=r(u):o[l]=r(u)}),o)}return r(n)}}function cS(t){var e={};return Object.entries(t).forEach(function(n){var r=bC(n,2),i=r[0],o=r[1];i.indexOf("-")===0?e[i.substring(1)]=uS(o):typeof o=="string"?e[i]=o:Object.prototype.toString.call(o)==="[object Object]"?e[i]=cS(o):Array.isArray(o)?e[i]=o.map(function(a){return cS(a)}):e[i]=o}),e}function gWe(t,e,n){var r=new Map;e.nodes.forEach(function(o){var a,s={"-id":o.id};if(!((a=o.text)===null||a===void 0)&&a.value&&(s["-name"]=o.text.value),o.properties){var l=L6(n)(o.properties);Object.assign(s,l)}r.set(o.id,s),t[o.type]?Array.isArray(t[o.type])?t[o.type].push(s):t[o.type]=[t[o.type],s]:t[o.type]=s});var i=e.edges.map(function(o){var a,s,l=r.get(o.targetNodeId);l["bpmn:incoming"]?Array.isArray(l["bpmn:incoming"])?l["bpmn:incoming"].push(o.id):l["bpmn:incoming"]=[l["bpmn:incoming"],o.id]:l["bpmn:incoming"]=o.id;var u={"-id":o.id,"-sourceRef":o.sourceNodeId,"-targetRef":o.targetNodeId};if(!((a=o.text)===null||a===void 0)&&a.value&&(u["-name"]=(s=o.text)===null||s===void 0?void 0:s.value),o.properties){var c=L6(n)(o.properties);Object.assign(u,c)}return u});e.edges.forEach(function(o){var a=r.get(o.sourceNodeId);a["bpmn:outgoing"]?Array.isArray(a["bpmn:outgoing"])?a["bpmn:outgoing"].push(o.id):a["bpmn:outgoing"]=[a["bpmn:outgoing"],o.id]:a["bpmn:outgoing"]=o.id}),t[nc.FLOW]=i}function mWe(t,e){t["bpmndi:BPMNEdge"]=e.edges.map(function(n){var r,i=n.id,o=n.pointsList.map(function(s){var l=s.x,u=s.y;return{"-x":l,"-y":u}}),a={"-id":"".concat(i,"_di"),"-bpmnElement":i,"di:waypoint":o};return!((r=n.text)===null||r===void 0)&&r.value&&(a["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),a}),t["bpmndi:BPMNShape"]=e.nodes.map(function(n){var r,i=n.id,o=100,a=80,s=n.x,l=n.y,u=Qf.shapeConfigMap.get(n.type);u&&(o=u.width,a=u.height),s-=o/2,l-=a/2;var c={"-id":"".concat(i,"_di"),"-bpmnElement":i,"dc:Bounds":{"-x":s,"-y":l,"-width":o,"-height":a}};return!((r=n.text)===null||r===void 0)&&r.value&&(c["bpmndi:BPMNLabel"]={"dc:Bounds":{"-x":n.text.x-n.text.value.length*10/2,"-y":n.text.y-7,"-width":n.text.value.length*10,"-height":14}}),c})}function vWe(t){var e=[],n=[],r=t["bpmn:definitions"];if(r){var i=r["bpmn:process"];Object.keys(i).forEach(function(o){if(o.indexOf("bpmn:")===0){var a=i[o];if(o===nc.FLOW){var s=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];n=bWe(a,s)}else{var l=r["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];e=e.concat(yWe(a,l,o))}}})}return{nodes:e,edges:n}}function yWe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=I6(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=I6(i,n,t);r.push(o)}return r}function I6(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-name"],a=Qf.shapeConfigMap.get(e);a&&(r+=a.width/2,i+=a.height/2);var s;Object.entries(n).forEach(function(d){var f=bC(d,2),h=f[0],m=f[1];hX.indexOf(h)===-1&&(s||(s={}),s[h]=m)}),s&&(s=cS(s));var l;if(o&&(l={x:r,y:i,value:o},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var u=t["bpmndi:BPMNLabel"]["dc:Bounds"];l.x=Number(u["-x"])+Number(u["-width"])/2,l.y=Number(u["-y"])+Number(u["-height"])/2}var c={id:t["-bpmnElement"],type:e,x:r,y:i,properties:s};return l&&(c.text=l),c}function bWe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(B6(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(B6(r,t))}return n}function B6(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(` `).forEach(function(l){o0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},CWe=kl,EWe=function(t){SWe(e,t);function e(n){var r=t.call(this)||this;return r.updatePosition=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y;r.nodeModel.x=l+o/2,r.nodeModel.y=u+a/2,r.nodeModel.moveText(o/2,a/2)},r.getResize=function(i){var o=i.index,a=i.deltaX,s=i.deltaY,l=i.width,u=i.height,c=i.PCTResizeInfo,d=i.pct,f=d===void 0?1:d,h=i.freezeWidth,m=h===void 0?!1:h,g=i.freezeHeight,y=g===void 0?!1:g,b={width:l,height:u,deltaX:a,deltaY:s};if(c){var w=4,O=0,S=0;switch(o){case 0:S=(a*-1-s)/w;break;case 1:S=(a-s)/w;break;case 2:S=(a+s)/w;break;case 3:S=(a*-1+s)/w;break}S!==0&&(O=Math.round(S/c.ResizeBasis.basisHeight*1e5)/1e3),c.ResizePCT.widthPCT=Math.max(Math.min(c.ResizePCT.widthPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit),c.ResizePCT.heightPCT=Math.max(Math.min(c.ResizePCT.heightPCT+O,c.ScaleLimit.maxScaleLimit),c.ScaleLimit.minScaleLimit);var x=Math.round(c.ResizePCT.widthPCT*c.ResizeBasis.basisWidth/100),C=Math.round(c.ResizePCT.heightPCT*c.ResizeBasis.basisHeight/100);switch(o){case 0:a=l-x,s=u-C;break;case 1:a=x-l,s=u-C;break;case 2:a=x-l,s=C-u;break;case 3:a=l-x,s=C-u;break}return b.width=x,b.height=C,b.deltaX=a/f,b.deltaY=s/f,b}switch(o){case 0:b.width=m?l:l-a*f,b.height=y?u:u-s*f;break;case 1:b.width=m?l:l+a*f,b.height=y?u:u-s*f;break;case 2:b.width=m?l:l+a*f,b.height=y?u:u+s*f;break;case 3:b.width=m?l:l-a*f,b.height=y?u:u+s*f;break}return b},r.updateEdgePointByAnchors=function(){var i=r.nodeModel,o=i.id,a=i.anchors,s=r.getNodeEdges(o);s.sourceEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.sourceAnchorId});u&&l.updateStartPoint({x:u.x,y:u.y})}),s.targetEdges.forEach(function(l){var u=a.find(function(c){return c.id===l.targetAnchorId});u&&l.updateEndPoint({x:u.x,y:u.y})})},r.updateRect=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.x,u=s.y,c=s.width,d=s.height,f=s.radius,h=s.PCTResizeInfo,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=r.index,S=g===b,x=y===w,C=r.getResize({index:O,deltaX:o,deltaY:a,width:c,height:d,PCTResizeInfo:h,pct:1,freezeWidth:S,freezeHeight:x});if(C.widthb||C.heightw){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:S?0:C.deltaX,deltaY:x?0:C.deltaY}),r.nodeModel.width=C.width,r.nodeModel.height=C.height,r.nodeModel.setProperties({nodeSize:{width:C.width,height:C.height}});var E={x:l,y:u,width:c,height:d,radius:f},T={x:r.nodeModel.x,y:r.nodeModel.y,width:r.nodeModel.width,height:r.nodeModel.height,radius:f};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:E,afterNode:T})},r.updateEllipse=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=g===b,S=y===w,x=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.widthb/2||E.heightw/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:xh(xh({},T),{rx:l,ry:u}),afterNode:P})},r.updateDiamond=function(i){var o=i.deltaX,a=i.deltaY,s=r.nodeModel,l=s.rx,u=s.ry,c=s.x,d=s.y,f=s.PCTResizeInfo,h=r.index,m=r.nodeModel,g=m.minWidth,y=m.minHeight,b=m.maxWidth,w=m.maxHeight,O=g===b,S=y===w,x=l,C=u,E=r.getResize({index:h,deltaX:o,deltaY:a,width:x,height:C,PCTResizeInfo:f,pct:1/2,freezeWidth:O,freezeHeight:S});if(E.widthb/2||E.heightw/2){r.dragHandler.cancelDrag();return}r.updatePosition({deltaX:O?0:E.deltaX,deltaY:S?0:E.deltaY}),r.nodeModel.rx=E.width,r.nodeModel.ry=E.height,r.nodeModel.setProperties({nodeSize:{rx:E.width,ry:E.height}});var T={x:c,y:d,rx:l,ry:u},P={rx:E.width,ry:E.height,x:r.nodeModel.x,y:r.nodeModel.y};r.updateEdgePointByAnchors(),r.eventEmit({deltaX:o,deltaY:a,beforeNode:T,afterNode:P})},r.eventEmit=function(i){var o=i.deltaX,a=i.deltaY,s=i.beforeNode,l=i.afterNode,u=r.nodeModel,c=u.id,d=u.modelType,f=u.type,h=xh({id:c,modelType:d,type:f},s),m=xh({id:c,modelType:d,type:f},l);r.graphModel.eventCenter.emit("node:resize",{preData:h,data:m,deltaX:o,deltaY:a,index:r.index,model:r.nodeModel})},r.onDragging=function(i){var o,a=i.deltaX,s=i.deltaY,l=r.graphModel.transformModel,u=r.nodeModel.modelType;o=xWe(l.fixDeltaXY(a,s),2),a=o[0],s=o[1],u===Kn.RECT_NODE||u===Kn.HTML_NODE?r.updateRect({deltaX:a,deltaY:s}):u===Kn.ELLIPSE_NODE?r.updateEllipse({deltaX:a,deltaY:s}):u===Kn.DIAMOND_NODE&&r.updateDiamond({deltaX:a,deltaY:s})},r.onDragEnd=function(){var i=r.graphModel.gridSize,o=i===void 0?1:i,a=o*Math.round(r.nodeModel.x/o),s=o*Math.round(r.nodeModel.y/o);r.nodeModel.moveTo(a,s),r.updateEdgePointByAnchors()},r.index=n.index,r.nodeModel=n.model,r.graphModel=n.graphModel,r.dragHandler=new CWe({onDragging:r.onDragging,onDragEnd:r.onDragEnd,step:1}),r}return e.prototype.getNodeEdges=function(n){for(var r=this.graphModel,i=r.edges,o=[],a=[],s=0;s0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},dh=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=this.x-this.width/2&&o<=this.x+this.width/2&&i>=this.y-this.height/2&&a<=this.y+this.height/2},e.prototype.isAllowMoveTo=function(n){var r=n.minX,i=n.minY,o=n.maxX,a=n.maxY;return{x:r>=this.x-this.width/2&&o<=this.x+this.width/2,y:i>=this.y-this.height/2&&a<=this.y+this.height/2}},e.prototype.setAllowAppendChild=function(n){this.setProperty("groupAddable",n)},e.prototype.addChild=function(n){this.children.add(n),this.graphModel.eventCenter.emit("group:add-node",{data:this.getData()})},e.prototype.removeChild=function(n){this.children.delete(n),this.graphModel.eventCenter.emit("group:remove-node",{data:this.getData()})},e.prototype.getAddableOutlineStyle=function(){return{stroke:"#FEB663",strokeWidth:2,strokeDasharray:"4 4",fill:"transparent"}},e.prototype.getData=function(){var n=this,r=t.prototype.getData.call(this);r.children=[],console.log("this.children",this.children),this.children.forEach(function(o){var a=n.graphModel.getNodeModelById(o);a&&!a.virtual&&r.children.push(o)});var i=r.properties;return i==null||delete i.groupAddable,i==null||delete i.isFolded,r},e.prototype.getHistoryData=function(){var n=t.prototype.getData.call(this);n.children=dh([],ch(this.children),!1),n.isGroup=!0;var r=n.properties;return r==null||delete r.groupAddable,r!=null&&r.isFolded&&(n.x=n.x+this.unfoldedWidth/2-this.foldedWidth/2,n.y=n.y+this.unfoldedHeight/2-this.foldedHeight/2),n},e.prototype.isAllowAppendIn=function(n){return console.info("_nodeData",n),!0},e.prototype.toBack=function(){this.zIndex--},e})(kWe);(function(t){yX(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.getControlGroup=function(){var n=this.props.model,r=n.resizable,i=n.properties;return r&&!i.isFolded?t.prototype.getControlGroup.call(this):null},e.prototype.getAddableShape=function(){var n=this.props.model,r=n.width,i=n.height,o=n.x,a=n.y,s=n.radius,l=n.properties,u=n.getAddableOutlineStyle;if(!l.groupAddable)return null;var c=this.props.model.getNodeStyle().strokeWidth,d=c===void 0?0:c,f=u(),h=r+d+8,m=i+d+8;return Gt("rect",fS(fS({},f),{width:h,height:m,x:o-h/2,y:a-m/2,rx:s,ry:s}))},e.prototype.getFoldIcon=function(){var n=this.props.model,r=n.x-n.width/2+5,i=n.y-n.height/2+5;if(!n.foldable)return null;var o=Gt("path",{fill:"none",stroke:"#818281",strokeWidth:2,"pointer-events":"none",d:n.properties.isFolded?"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," M").concat(r+7,",").concat(i+2," ").concat(r+7,",").concat(i+10):"M ".concat(r+3,",").concat(i+6," ").concat(r+11,",").concat(i+6," ")});return Gt("g",{},[Gt("rect",{height:12,width:14,rx:2,ry:2,strokeWidth:1,fill:"#F4F5F6",stroke:"#CECECE",cursor:"pointer",x:n.x-n.width/2+5,y:n.y-n.height/2+5,onClick:function(){n.foldGroup(!n.properties.isFolded)}}),o])},e.prototype.getResizeShape=function(){return Gt("g",{},[this.getAddableShape(),t.prototype.getResizeShape.call(this),this.getFoldIcon()])},e})(PWe);var Y6=globalThis&&globalThis.__assign||function(){return Y6=Object.assign||function(t){for(var e,n=1,r=arguments.length;n `;$a.ObjTree.prototype.attr_prefix="-";$a.ObjTree.prototype.parseXML=function(t){var e;if(window.DOMParser){var n=new DOMParser,r=n.parseFromString(t,"application/xml");if(!r)return;e=r.documentElement}else window.ActiveXObject&&(n=new ActiveXObject("Microsoft.XMLDOM"),n.async=!1,n.loadXML(t),e=n.documentElement);if(!!e){var i=this.parseDOM(e);return i}};$a.ObjTree.prototype.parseHTTP=function(t,e,n){var r={};for(var i in e)r[i]=e[i];if(r.method||(typeof r.postBody=="undefined"&&typeof r.postbody=="undefined"&&typeof r.parameters=="undefined"?r.method="get":r.method="post"),n){r.asynchronous=!0;var o=this,a=n,s=r.onComplete;r.onComplete=function(c){var d;c&&c.responseXML&&c.responseXML.documentElement&&(d=o.parseDOM(c.responseXML.documentElement)),a(d,c),s&&s(c)}}else r.asynchronous=!1;var l;if(typeof HTTP!="undefined"&&HTTP.Request){r.uri=t;var u=new HTTP.Request(r);u&&(l=u.transport)}else if(typeof Ajax!="undefined"&&Ajax.Request){var u=new Ajax.Request(t,r);u&&(l=u.transport)}if(n)return l;if(l&&l.responseXML&&l.responseXML.documentElement)return this.parseDOM(l.responseXML.documentElement)};$a.ObjTree.prototype.parseDOM=function(t){if(!!t){if(this.__force_array={},this.force_array)for(var e=0;e"):typeof o=="object"&&o.constructor===Array?n[n.length]=this.array_to_xml(i,o):typeof o=="object"?n[n.length]=this.hash_to_xml(i,o):n[n.length]=this.scalar_to_xml(i,o):r[r.length]=" ".concat(i.substring(1),'="').concat(this.xml_escape(o),'"')}var a=r.join(""),s=n.join("");return typeof t=="undefined"||t==null||(n.length>0?s.match(/\n/)?s="<".concat(t).concat(a,`> `).concat(s," `):s="<".concat(t).concat(a,">").concat(s," `):s="<".concat(t).concat(a,` /> `)),s};$a.ObjTree.prototype.array_to_xml=function(t,e){for(var n=[],r=0;r"):typeof i=="object"&&i.constructor===Array?n[n.length]=this.array_to_xml(t,i):typeof i=="object"?n[n.length]=this.hash_to_xml(t,i):n[n.length]=this.scalar_to_xml(t,i)}return n.join("")};$a.ObjTree.prototype.scalar_to_xml=function(t,e){return t==="#text"?this.xml_escape(e):"<".concat(t,">").concat(this.xml_escape(e)," `)};$a.ObjTree.prototype.xml_escape=function(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,'"')};var RWe=function(t){return new $a.ObjTree().parseXML(t)};function bX(t){return Object.prototype.toString.call(t)}function aF(t){return" ".repeat(t)}function pS(t){return bX(t)==="[object Object]"?Object.keys(t).reduce(function(e,n){var r=n;return n.charAt(0)==="-"&&(r=n.substring(1)),e[r]=pS(t[n]),e},{}):Array.isArray(t)?t.map(function(e){return pS(e)}):t}function $We(t){var e=t;try{typeof e!="string"&&(e=JSON.parse(t))}catch{e=JSON.stringify(pS(t)).replace(/"/g,"'")}return e}var sF=` `;function B1(t,e,n){var r=aF(n),i="",o=sF+r;if(e==="-json")return"";if(e==="#text")return o+t;if(e==="#cdata-section")return"".concat(o,"");if(e==="#comment")return"".concat(o,"");if("".concat(e).charAt(0)==="-")return" ".concat(e.substring(1),'="').concat($We(t),'"');if(Array.isArray(t))i+=t.map(function(u){return B1(u,e,n+1)}).join("");else if(bX(t)==="[object Object]"){var a=Object.keys(t),s="",l=t["-json"]?sF+aF(n+1)+t["-json"]:"";i+="".concat(n===0?"":o,"<").concat(e),a.forEach(function(u){u.charAt(0)==="-"?s+=B1(t[u],u,n+1):l+=B1(t[u],u,n+1)}),i+=s+(l!==""?">".concat(l).concat(o,""):" />")}else i+="".concat(o,"<").concat(e,">").concat(t.toString(),"");return i}function NWe(t){var e="";for(var n in t)e+=B1(t[n],n,0);return e}var DWe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),vA=globalThis&&globalThis.__assign||function(){return vA=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},Ko=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},Wl=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r")}:{json:''.concat(r,"")}:{json:""}}},"bpmn:timerEventDefinition":{out:function(t){var e=t.properties,n=e.timerType,r=e.timerValue,i=e.definitionId,o=function(){return"').concat(r,"")};return{json:'".concat(o(),""):"/>")}},in:function(t,e){var n,r,i,o,a=t,s=e["-id"],l="",u="";try{for(var c=qN(Object.keys(e)),d=c.next();!d.done;d=c.next()){var f=d.value;f.includes("bpmn:")&&(i=Ko(f.split(":"),2),l=i[1],u=(o=e[f])===null||o===void 0?void 0:o["#text"])}}catch(h){n={error:h}}finally{try{d&&!d.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}return{"-definitionId":s,"-definitionType":a,"-timerType":l,"-timerValue":u}}},"bpmn:conditionExpression":{in:function(t,e){var n,r="",i="";return e["#cdata-section"]?(i="cdata",r=((n=/^\$\{(.*)\}$/g.exec(e["#cdata-section"]))===null||n===void 0?void 0:n[1])||""):e["#text"]&&(i="normal",r=e["#text"]),{"-condition":r,"-expressionType":i}}}};function IWe(t){var e=t!=null?t:{},n=e.retainedAttrsFields,r=e.excludeFields,i=e.transformer,o=new Set(Wl(Wl([],Ko(LWe),!1),Ko(n||[]),!1)),a={in:new Set(Wl(Wl([],Ko(gS.in),!1),Ko((r==null?void 0:r.in)||[]),!1)),out:new Set(Wl(Wl([],Ko(gS.out),!1),Ko((r==null?void 0:r.out)||[]),!1))};return nl=OX(nl,i),function(s){var l=s.nodes,u=s.edges;function c(d,f){var h,m;if((d==null?void 0:d.flag)!==1){var g;if((g=nl[d.type])&&g.out){var y=g.out(d),b=Object.keys(y);b.length>0&&b.forEach(function(P){d[P]=y[P]})}d!=null&&d.children&&(d.children=d.children.map(function(P){var A=l.find(function(D){return D.id===P})||u.find(function(D){return D.id===P});return A||{}}));var w={};if(typeof d=="string")return d;if(Array.isArray(d))return d.map(function(P){return c(P,"")}).filter(function(P){return P!=null});try{for(var O=qN(Object.entries(d)),S=O.next();!S.done;S=O.next()){var x=Ko(S.value,2),C=x[0],E=x[1];if((E==null?void 0:E.flag)===1)return;var T=[f,C].filter(function(P){return P}).join(".");a.out.has(T)||(typeof E!="object"?C.indexOf("-")===0||["#text","#cdata-section","#comment"].includes(C)?w[C]=E:w["-".concat(C)]=E:o.has(T)?w["-".concat(C)]=c(E,T):w[C]=c(E,T))}}catch(P){h={error:P}}finally{try{S&&!S.done&&(m=O.return)&&m.call(O)}finally{if(h)throw h.error}}return w}}return c(s,"")}}function mS(t){var e,n,r={};try{for(var i=qN(Object.entries(t)),o=i.next();!o.done;o=i.next()){var a=Ko(o.value,2),s=a[0],l=a[1];s.indexOf("-")===0?r[s.substring(1)]=pS(l):typeof l=="string"?r[s]=l:Object.prototype.toString.call(l)==="[object Object]"?r[s]=mS(l):Array.isArray(l)?r[s]=l.map(function(u){return mS(u)}):r[s]=l}}catch(u){e={error:u}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}return r}function BWe(t,e,n){var r,i=new Map,o=IWe(n)(e);o.nodes.forEach(function(s){var l=s["-id"],u=s["-type"],c=s.text,d=s.children,f=lF(s,["-id","-type","text","children"]),h={"-id":l};c!=null&&c["-value"]&&(h["-name"]=c["-value"]),f["-json"]&&(h["-json"]=f["-json"]),f["-properties"]&&Object.assign(h,f["-properties"]),d&&(h.children=d),t[u]||(t[u]=[]),t[u].push(h),i.set(l,h)});var a=o.edges.map(function(s){var l=s["-id"],u=s["-sourceNodeId"],c=s["-targetNodeId"],d=s.text,f=lF(s,["-id","-sourceNodeId","-targetNodeId","text"]),h=i.get(c);h["bpmn:incoming"]||(h["bpmn:incoming"]=[]),h["bpmn:incoming"].push(l);var m={"-id":l,"-sourceRef":u,"-targetRef":c};return d!=null&&d["-value"]&&(m["-name"]=d["-value"]),f["-json"]&&(m["-json"]=f["-json"]),f["-properties"]&&Object.assign(m,f["-properties"]),m});return e.edges.forEach(function(s){var l=s.sourceNodeId,u=s.id,c=i.get(l);c["bpmn:outgoing"]||(c["bpmn:outgoing"]=[]),c["bpmn:outgoing"].push(u)}),(r=t["bpmn:subProcess"])===null||r===void 0||r.forEach(function(s){var l={"bpmn:incoming":new Set,"bpmn:outgoing":new Set},u=[];s.children.forEach(function(g){var y,b=i.get(g["-id"]);["bpmn:incoming","bpmn:outgoing"].forEach(function(O){b[O]&&b[O].forEach(function(S){l[O].add(S)})});var w=(y=t[g["-type"]])===null||y===void 0?void 0:y.findIndex(function(O){return O["-id"]===g["-id"]});w>=0&&t[g["-type"]].splice(w,1),i.delete(g["-id"]),s[g["-type"]]||(s[g["-type"]]=[]),s[g["-type"]].push(b)});var c=l["bpmn:incoming"],d=l["bpmn:outgoing"];d.forEach(function(g){c.has(g)&&u.push(g)});for(var f=function(g){var y=a.findIndex(function(b){return b["-id"]===u[g]});y>=0?(s["bpmn:sequenceFlow"]||(s["bpmn:sequenceFlow"]=[]),s["bpmn:sequenceFlow"].push(a[y]),a.splice(y,1)):g++,h=g},h,m=0;m0&&S.forEach(function(x){Reflect.set(g,x,O[x])})}})};function m(g){i.set(g["-id"],g),Array.isArray(g)?g.forEach(function(y){m(y)}):typeof g=="object"&&h(g)}m(c[f])},function(f){if(f.indexOf("bpmn:")===0){var h=c[f];if(f==="bpmn:sequenceFlow"){var m=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNEdge"];r=QWe(h,m)}else{var g=u["bpmndi:BPMNDiagram"]["bpmndi:BPMNPlane"]["bpmndi:BPMNShape"];if(f==="bpmn:boundaryEvent"){var y=c[f],b=function(w){var O=w["-attachedToRef"],S=i.get(O);S["-boundaryEvents"]||(S["-boundaryEvents"]=[]),S["-boundaryEvents"].push(w["-id"])};Array.isArray(y)?y.forEach(function(w){b(w)}):b(y)}n=n.concat(zWe(h,g,f))}}}])}var d=function(f,h,m){Object.keys(f).forEach(function(g){var y=m?"".concat(m,".").concat(g):g;h.has(y)?delete f[g]:typeof f[g]=="object"&&d(f[g],h,y)})};return n.forEach(function(f){var h,m;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var g=(m=e==null?void 0:e.mapping)===null||m===void 0?void 0:m.in,y=f.type;g[y]&&(f.type=g[y])}d(f,l.in,"")}),r.forEach(function(f){var h,m;if(!((h=e==null?void 0:e.mapping)===null||h===void 0)&&h.in){var g=(m=e==null?void 0:e.mapping)===null||m===void 0?void 0:m.in,y=f.type;g[y]&&(f.type=g[y])}d(f,l.in,"")}),{nodes:n,edges:r}}function zWe(t,e,n){var r=[];if(Array.isArray(t))t.forEach(function(a){var s;Array.isArray(e)?s=e.find(function(u){return u["-bpmnElement"]===a["-id"]}):s=e;var l=uF(s,n,a);r.push(l)});else{var i=void 0;Array.isArray(e)?i=e.find(function(a){return a["-bpmnElement"]===t["-id"]}):i=e;var o=uF(i,n,t);r.push(o)}return r}function uF(t,e,n){var r=Number(t["dc:Bounds"]["-x"]),i=Number(t["dc:Bounds"]["-y"]),o=n["-children"],a=n["-name"],s=us.shapeConfigMap.get(e);s&&(r+=s.width/2,i+=s.height/2);var l={};Object.entries(n).forEach(function(f){var h=Ko(f,2),m=h[0],g=h[1];_X.includes(m)||(l[m]=g)}),l=mS(l);var u;if(a&&(u={x:r,y:i,value:a},t["bpmndi:BPMNLabel"]&&t["bpmndi:BPMNLabel"]["dc:Bounds"])){var c=t["bpmndi:BPMNLabel"]["dc:Bounds"];u.x=Number(c["-x"])+Number(c["-width"])/2,u.y=Number(c["-y"])+Number(c["-height"])/2}var d={id:t["-bpmnElement"],type:e,x:r,y:i,properties:l};return o&&(d.children=o),u&&(d.text=u),d}function QWe(t,e){var n=[];if(Array.isArray(t))t.forEach(function(i){var o;Array.isArray(e)?o=e.find(function(a){return a["-bpmnElement"]===i["-id"]}):o=e,n.push(cF(o,i))});else{var r=void 0;Array.isArray(e)?r=e.find(function(i){return i["-bpmnElement"]===t["-id"]}):r=e,n.push(cF(r,t))}return n}function cF(t,e){var n,r=e["-name"]?"".concat(e["-name"]):"";if(r){var i=t["bpmndi:BPMNLabel"]["dc:Bounds"],o=0;r.split(` `).forEach(function(u){o0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},qWe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},eg=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},jv=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r=a-l/2&&i<=a+l/2&&r>=s-u/2&&o<=s+u/2}function rUe(t,e,n,r){var i=t.minX,o=t.minY,a=t.maxX,s=t.maxY,l=e.x,u=e.y,c=e.width,d=e.height,f=i+c/2,h=o+d/2,m=a-c/2,g=s-d/2;return{x:l+n>=f&&l+n<=m,y:u+r>=h&&u+r<=g}}var bS=globalThis&&globalThis.__assign||function(){return bS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},ng=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;riUe){var c=i.lf.graphModel.nodes;i.topGroupZIndex=LO;var d=SQ(Jv(c,function(y){return!!y.isGroup}),"zIndex"),f=0;jn(d,function(y){y.zIndex!==f&&(i.topGroupZIndex++,f=y.zIndex),y.setZIndex(i.topGroupZIndex)})}if(s&&l)if(u!=null&&u.isGroup){var h=u.children;jn(Array.from(h),function(y){var b=i.lf.getNodeModelById(y);b==null||b.setSelected(!1)})}else{var m=i.nodeGroupMap.get(a.id);if(m){var g=i.lf.getNodeModelById(m);g!=null&&g.isSelected&&(u==null||u.setSelected(!1))}}},this.onNodeMove=function(o){var a=o.deltaX,s=o.deltaY,l=o.data,u=l.id,c=l.x,d=l.y,f=l.properties;if(!!f){var h=f.width,m=f.height,g=i.nodeGroupMap.get(u);if(!!g){var y=i.lf.getNodeModelById(g);if(!(!y||!y.isRestrict||!y.autoResize)){var b=c+a/2,w=d+s/2,O=b-h/2,S=w-m/2,x=b+h/2,C=w+m/2,E=!1,T=y.getBounds(),P=Object.assign({},T);if(OP.maxX&&(P.maxX=x,E=!0),C>P.maxY&&(P.maxY=C,E=!0),!!E){var A=P.minX+(P.maxX-P.minX)/2,D=P.minY+(P.maxY-P.minY)/2,N=P.maxX-P.minX,$=P.maxY-P.minY;y.moveTo(A,D),y.width=N,y.height=$}}}}},this.onGraphRendered=function(o){var a=o.data;console.log("data",a),jn(a.nodes,function(s){s.children&&jn(s.children,function(l){i.nodeGroupMap.set(l,s.id)})}),i.calibrateTopGroupZIndex(a.nodes)},n.register(YN),this.lf=n,$r(this,r),this.init()}return t.prototype.getGroupByNodeId=function(e){var n=this.nodeGroupMap.get(e);if(n)return this.lf.getNodeModelById(n)},t.prototype.getGroupByBounds=function(e,n){var r=this.lf.graphModel.nodes,i=Jv(r,function(l){return!!l.isGroup&&nUe(e,l)&&l.id!==n.id}),o=i.length;if(o<=1)return i[0];for(var a=i[o-1],s=o-2;s>=0;s--)i[s].zIndex>a.zIndex&&(a=i[s]);return a},t.prototype.sendNodeToFront=function(e){var n=this;if(!(!e||!e.isGroup)&&(this.topGroupZIndex++,e.setZIndex(this.topGroupZIndex),e.children)){var r=e.children;jn(Array.from(r),function(i){var o=n.lf.getNodeModelById(i);n.sendNodeToFront(o)})}},t.prototype.getMaxZIndex=function(e){var n=this,r=LO;if(e.isGroup&&(r=Math.max(r,e.zIndex)),e.children){var i=e.children;jn(Array.from(i),function(o){var a=n.lf.getNodeModelById(o);if(a!=null&&a.isGroup){var s=n.getMaxZIndex(a);r=Math.max(r,s)}})}return r},t.prototype.calibrateTopGroupZIndex=function(e){var n=this,r=LO;if(jn(e,function(s){var l=n.lf.getNodeModelById(s.id);if(l){var u=n.getMaxZIndex(l);u>r&&(r=u)}}),!(this.topGroupZIndex>=r)){var i=this.lf.graphModel.nodes,o=Jv(i,function(s){return!!s.isGroup}),a=this.topGroupZIndex;jn(o,function(s){s.zIndex>a&&(a=s.zIndex)}),this.topGroupZIndex=a}},t.prototype.removeChildrenInGroupNodeData=function(e){var n,r=Fn(e);return delete r.children,!((n=r.properties)===null||n===void 0)&&n.children&&delete r.properties.children,r},t.prototype.initGroupChildNodes=function(e,n,r,i){var o=this,a=[],s=[],l=[];jn(Array.from(n),function(d){var f=o.lf.getNodeModelById(d);if(f){var h=f.children,m=f.getData(),g=pn.NODE_GROUP_COPY||"node:group-copy-add",y=nWe(o.removeChildrenInGroupNodeData(m),i),b=o.lf.addNode(y,g);if(r.addChild(b.id),e[d]=b.id,a.push(b),l.push.apply(l,ng([],tg(ng(ng([],tg(b.incoming.edges),!1),tg(b.outgoing.edges),!1)),!1)),h instanceof Set){var w=o.initGroupChildNodes(e,h,b,i),O=w.childNodes,S=w.edgesData;a.push.apply(a,ng([],tg(O),!1)),s.push.apply(s,ng([],tg(S),!1))}}}),console.log("allRelatedEdges -->>",l);var u=Jv(l,function(d){return qg(e,d.sourceNodeId)&&qg(e,d.targetNodeId)}),c=Ca(u,function(d){return d.getData()});return{childNodes:a,edgesData:s.concat(c)}},t.prototype.createEdge=function(e,n,r){var i,o,a=e.sourceNodeId,s=e.targetNodeId,l=(i=n[a])!==null&&i!==void 0?i:a,u=(o=n[s])!==null&&o!==void 0?o:s,c=Fn(e);return e.id&&typeof e.text=="object"&&e.text!==null&&(c=rWe(e,r)),this.lf.graphModel.addEdge(bS(bS({},c),{sourceNodeId:l,targetNodeId:u}))},t.prototype.checkGroupBoundsWithChildren=function(e,n,r,i,o){if(e.children)for(var a=e.children,s=e.x,l=e.y,u=s+n/2,c=l+r/2,d=u-i/2,f=c-o/2,h=u+i/2,m=c+o/2,g=Array.from(a),y=0;y=C&&m>=E;if(!T)return!1}}return!0},t.prototype.init=function(){var e=this,n=this.lf,r=n.graphModel;r.addNodeMoveRules(function(i,o,a){if(i.isGroup)return!0;var s=e.nodeGroupMap.get(i.id),l=e.lf.getNodeModelById(s);if(l&&l.isRestrict){if(l.autoResize)return!0;var u=l.getBounds();return rUe(u,i,o,a)}return!0}),r.addNodeResizeRules(function(i,o,a,s,l){return i.isGroup&&i.isRestrict?e.checkGroupBoundsWithChildren(i,o,a,s,l):!0}),r.dynamicGroup=this,n.on("node:add,node:drop,node:dnd-add",this.addNodeToGroup),n.on("node:delete",this.removeNodeFromGroup),n.on("node:drag,node:dnd-drag",this.setActiveGroup),n.on("node:click",this.onNodeSelect),n.on("node:mousemove",this.onNodeMove),n.on("graph:rendered",this.onGraphRendered),n.on("graph:updated",function(i){var o=i.data;return console.log("data",o)}),n.on("group:add-node",function(i){var o=i.data;return console.log("group:add-node",o)}),n.addElements=function(i,o){var a=i.nodes,s=i.edges;o===void 0&&(o=40);var l={},u={nodes:[],edges:[]},c=[];return jn(a,function(d){var f,h,m=d.id,g=(h=(f=d.properties)===null||f===void 0?void 0:f.children)!==null&&h!==void 0?h:d.children,y=n.addNode(e.removeChildrenInGroupNodeData(d));if(m&&(l[m]=y.id),u.nodes.push(y),y.isGroup){var b=e.initGroupChildNodes(l,g,y,o).edgesData;c.push.apply(c,ng([],tg(b),!1))}}),jn(c,function(d){e.createEdge(d,l,o)}),console.log("selectedEdges --->>>",s),jn(s,function(d){u.edges.push(e.createEdge(d,l,o))}),u},this.render()},t.prototype.render=function(){},t.prototype.destroy=function(){this.lf.off("node:add,node:drop,node:dnd-add",this.addNodeToGroup),this.lf.off("node:delete",this.removeNodeFromGroup),this.lf.off("node:drag,node:dnd-drag",this.setActiveGroup),this.lf.off("node:click",this.onNodeSelect),this.lf.off("node:mousemove",this.onNodeMove),this.lf.off("graph:rendered",this.onGraphRendered)},t.pluginName="dynamicGroup",t}(),fF;(function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"})(fF||(fF={}));globalThis&&globalThis.__read;globalThis&&globalThis.__spreadArray;var aUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),zy=globalThis&&globalThis.__assign||function(){return zy=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},lUe=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},uUe=function(t){aUe(e,t);function e(n){var r=t.call(this,n)||this;r.textRef=uC(),r.setHoverOn=function(){var l=r.props.element;l.isDragging||r.state.isHovered||(r.setState({isHovered:!0}),l.setHovered(!0))},r.setHoverOff=function(){var l=r.props.element;!r.state.isHovered||(r.setState({isHovered:!1}),l.setHovered(!1))},r.handleMouseDown=function(l){var u,c=r.props,d=c.label,f=c.graphModel,h=f.editConfigModel.nodeTextDraggable;((u=d.draggable)!==null&&u!==void 0?u:h)&&!r.state.isDragging&&!r.state.isEditing&&r.stepDrag.handleMouseDown(l)},r.handleMouseUp=function(l){r.state.isDragging&&r.stepDrag.handleMouseUp(l)},r.handleDragging=function(l){var u=l.deltaX,c=l.deltaY;r.state.isDragging||r.setState({isDragging:!0});var d=r.props,f=d.label,h=d.graphModel,m=h.transformModel,g=lUe(m.fixDeltaXY(u,c),2),y=g[0],b=g[1];r.setElementModelLabelInfo({x:f.x+y,y:f.y+b}),h.eventCenter.emit("label:drag",{data:f.getData(),model:f})},r.handleDragEnd=function(){r.setState({isDragging:!1})},r.handleClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;d.setSelected(!r.state.isSelected),r.setState({isSelected:!r.state.isSelected}),r.setElementModelLabelInfo({isSelected:!0}),f.eventCenter.emit("label:click",{data:c.getData(),e:l,model:d})},r.handleDbClick=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel;if(f.eventCenter.emit("label:dblclick",{data:c.getData(),e:l,model:d}),!c.editable){d.setSelected(!0);return}if(d.setSelected(),d.setElementState(Cr.TEXT_EDIT),r.setState({isEditing:!0}),r.textRef.current){r.textRef.current.contentEditable="true",r.textRef.current.focus();var h=document.createRange(),m=window.getSelection();h.selectNodeContents(r.textRef.current),h.collapse(!1),m==null||m.removeAllRanges(),m==null||m.addRange(h)}},r.handleBlur=function(l){var u=r.props,c=u.label,d=u.element,f=u.graphModel.eventCenter;f.emit("label:blur",{e:l,model:d,data:c.getData(),element:r.textRef.current}),r.setState({isDragging:!1,isHovered:!1,isSelected:!1})},r.handleInput=function(l){var u=r.props,c=u.label,d=u.graphModel;d.eventCenter.emit("label:input",{e:l,data:c.getData()})},r.reCalcLabelSize=function(){};var i=n.label,o=n.graphModel,a=o.gridSize,s=o.eventCenter;return r.stepDrag=new kl({onDragging:r.handleDragging,onDragEnd:r.handleDragEnd,step:a,eventType:"LABEL",model:i,eventCenter:s}),r.state={isEditing:!1,isHovered:!1,isDragging:!1,isSelected:!1},r}return e.prototype.setElementModelLabelInfo=function(n){var r=this.props,i=r.label,o=r.element,a=r.graphModel,s=o.properties._label,l=s,u=DR(l,function(f){return f.id===i.id}),c=l[u];l[u]=zy(zy({},c),n);var d=a.getElement(o.id);d==null||d.setProperty("_label",l)},e.prototype.componentDidMount=function(){var n=this,r=this.props,i=r.label,o=r.element,a=r.graphModel;a.eventCenter.on("blank:click,node:click,edge:click,label:click",function(s){var l,u,c,d,f=s.data;if(((f==null?void 0:f.type)!=="label"||f.type==="label"&&f.id!==i.id||n.state.isSelected)&&n.setState({isSelected:!1}),((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.state.isEditing){n.setState({isEditing:!1});var h=(u=(l=n.textRef.current)===null||l===void 0?void 0:l.innerText)!==null&&u!==void 0?u:"",m=(d=(c=n.textRef.current)===null||c===void 0?void 0:c.innerHTML)!==null&&d!==void 0?d:"";n.setElementModelLabelInfo({value:h,content:m,isSelected:!1}),o.setElementState(Cr.DEFAULT)}((f==null?void 0:f.type)!=="label"||f.type=="label"&&f.id!==i.id)&&n.textRef.current&&(n.textRef.current.contentEditable="false")})},e.prototype.componentDidUpdate=function(){},e.prototype.componentWillUnmount=function(){var n=this.props.graphModel;n.eventCenter.off("blank:click,node:click,edge:click")},e.prototype.render=function(){var n,r=this.props,i=r.label,o=r.element,a=r.graphModel,s=this.state,l=s.isDragging,u=s.isHovered,c=s.isSelected,d=s.isEditing,f=a.transformModel,h=f.getTransformStyle().transform,m=i.id,g=i.x,y=i.y,b=i.zIndex,w=i.vertical,O=i.style,S=i.rotate,x=i.content,C=i.labelWidth,E=i.textOverflowMode,T=C!=null?C:o.BaseType==="node"?o.width-20:80,P={left:"".concat(g-T/2,"px"),top:"".concat(y-10,"px"),width:"".concat(T,"px"),height:"20px",zIndex:b!=null?b:1,transform:S?"".concat(h," rotate(").concat(S,"deg)"):"".concat(h," rotate(").concat(w?-.25:0,"turn)")};return rt("div",{id:"element-container-".concat(m),className:KP("lf-label-editor-container"),style:P,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onClick:this.handleClick,onDblClick:this.handleDbClick,onBlur:this.handleBlur,onMouseEnter:this.setHoverOn,onMouseOver:this.setHoverOn,onMouseLeave:this.setHoverOff,children:rt("div",{ref:this.textRef,id:"editor-container-".concat(m),className:KP("lf-label-editor",(n={"lf-label-editor-dragging":l,"lf-label-editor-editing":d,"lf-label-editor-hover":!d&&(u||c)},n["lf-label-editor-".concat(E)]=!d,n)),onInput:this.handleInput,style:zy({maxWidth:"".concat(T,"px"),boxSizing:"border-box",display:"inline-block",background:d||o.BaseType==="edge"?"#fff":"transparent"},O),dangerouslySetInnerHTML:{__html:x}})})},e=sUe([Ea],e),e}(ur),Zs=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},cUe=nf,dUe=function(){function t(e,n,r){var i;this.type="label",this.content="",this.value="",this.style={},this.vertical=!1,this.editable=!0,this.draggable=!0,this.textOverflowMode="default",this.element=n,this.graphModel=r,this.id=(i=e.id)!==null&&i!==void 0?i:cUe(),this.initLabelData(e)}return t.prototype.initLabelData=function(e){$r(this,e)},t.prototype.getData=function(){return{id:this.id,x:this.x,y:this.y,type:"label",content:this.content,value:this.value,rotate:this.rotate,style:Hl(this.style),draggable:this.draggable,editable:this.editable,labelWidth:this.labelWidth,textOverflowMode:this.textOverflowMode,vertical:this.vertical}},Zs([at],t.prototype,"x",void 0),Zs([at],t.prototype,"y",void 0),Zs([at],t.prototype,"content",void 0),Zs([at],t.prototype,"value",void 0),Zs([at],t.prototype,"rotate",void 0),Zs([at],t.prototype,"style",void 0),Zs([at],t.prototype,"zIndex",void 0),Zs([at],t.prototype,"vertical",void 0),Zs([at],t.prototype,"editable",void 0),Zs([at],t.prototype,"draggable",void 0),Zs([at],t.prototype,"labelWidth",void 0),Zs([at],t.prototype,"textOverflowMode",void 0),t}(),wX={exports:{}};(function(t){/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */"classList"in document.createElement("_")||function(e){if("Element"in e){var n="classList",r="prototype",i=e.Element[r],o=Object,a=String[r].trim||function(){return this.replace(/^\s+|\s+$/g,"")},s=Array[r].indexOf||function(m){for(var g=0,y=this.length;g1?T:this.data.length),P,this.encoding)},u.toString=function(){return"[object Blob]"},u.close=function(){this.size=0,delete this.data},a}(e);e.Blob=function(i,o){var a=o&&o.type||"",s=new n;if(i)for(var l=0,u=i.length;l-1,isMac:n.navigator.platform.toUpperCase().indexOf("MAC")>=0,keyCode:{BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,SPACE:32,DELETE:46,K:75,M:77,V:86},isMetaCtrlKey:function(l){return!!(s.isMac&&l.metaKey||!s.isMac&&l.ctrlKey)},isKey:function(l,u){var c=s.getKeyCode(l);return Array.isArray(u)===!1?c===u:u.indexOf(c)!==-1},getKeyCode:function(l){var u=l.which;return u===null&&(u=l.charCode!==null?l.charCode:l.keyCode),u},blockContainerElementNames:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","li","ol","address","article","aside","audio","canvas","dd","dl","dt","fieldset","figcaption","figure","footer","form","header","hgroup","main","nav","noscript","output","section","video","table","thead","tbody","tfoot","tr","th","td"],emptyElementNames:["br","col","colgroup","hr","img","input","source","wbr"],extend:function(){var u=[!0].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},defaults:function(){var u=[!1].concat(Array.prototype.slice.call(arguments));return r.apply(this,u)},createLink:function(l,u,c,d){var f=l.createElement("a");return s.moveTextRangeIntoElement(u[0],u[u.length-1],f),f.setAttribute("href",c),d&&(d==="_blank"&&f.setAttribute("rel","noopener noreferrer"),f.setAttribute("target",d)),f},findOrCreateMatchingTextNodes:function(l,u,c){for(var d=l.createTreeWalker(u,NodeFilter.SHOW_ALL,null,!1),f=[],h=0,m=!1,g=null,y=null;(g=d.nextNode())!==null;)if(!(g.nodeType>3))if(g.nodeType===3){if(!m&&c.startc.end+1)throw new Error("PerformLinking overshot the target!");m&&f.push(y||g),h+=g.nodeValue.length,y!==null&&(h+=y.nodeValue.length,d.nextNode()),y=null}else g.tagName.toLowerCase()==="img"&&(!m&&c.start<=h&&(m=!0),m&&f.push(g));return f},splitStartNodeIfNeeded:function(l,u,c){return u!==c?l.splitText(u-c):null},splitEndNodeIfNeeded:function(l,u,c,d){var f,h;f=d+l.nodeValue.length+(u?u.nodeValue.length:0)-1,h=c-d-(u?l.nodeValue.length:0),f>=c&&d!==f&&h!==0&&(u||l).splitText(h)},splitByBlockElements:function(l){if(l.nodeType!==3&&l.nodeType!==1)return[];var u=[],c=e.util.blockContainerElementNames.join(",");if(l.nodeType===3||l.querySelectorAll(c).length===0)return[l];for(var d=0;d0)break;h=m.nextNode()}return h},findPreviousSibling:function(l){if(!l||s.isMediumEditorElement(l))return!1;for(var u=l.previousSibling;!u&&!s.isMediumEditorElement(l.parentNode);)l=l.parentNode,u=l.previousSibling;return u},isDescendant:function(u,c,d){if(!u||!c)return!1;if(u===c)return!!d;if(u.nodeType!==1)return!1;if(i||c.nodeType!==3)return u.contains(c);for(var f=c.parentNode;f!==null;){if(f===u)return!0;f=f.parentNode}return!1},isElement:function(u){return!!(u&&u.nodeType===1)},throttle:function(l,u){var c=50,d,f,h,m=null,g=0,y=function(){g=Date.now(),m=null,h=l.apply(d,f),m||(d=f=null)};return!u&&u!==0&&(u=c),function(){var b=Date.now(),w=u-(b-g);return d=this,f=arguments,w<=0||w>u?(m&&(clearTimeout(m),m=null),g=b,h=l.apply(d,f),m||(d=f=null)):m||(m=setTimeout(y,w)),h}},traverseUp:function(l,u){if(!l)return!1;do{if(l.nodeType===1){if(u(l))return l;if(s.isMediumEditorElement(l))return!1}l=l.parentNode}while(l);return!1},htmlEntities:function(l){return String(l).replace(/&/g,"&").replace(//g,">").replace(/"/g,""")},insertHTMLCommand:function(l,u){var c,d,f,h,m,g,y,b=!1,w=["insertHTML",!1,u];if(!e.util.isEdge&&l.queryCommandSupported("insertHTML"))try{return l.execCommand.apply(l,w)}catch{}if(c=l.getSelection(),c.rangeCount){if(d=c.getRangeAt(0),y=d.commonAncestorContainer,s.isMediumEditorElement(y)&&!y.firstChild)d.selectNode(y.appendChild(l.createTextNode("")));else if(y.nodeType===3&&d.startOffset===0&&d.endOffset===y.nodeValue.length||y.nodeType!==3&&y.innerHTML===d.toString()){for(;!s.isMediumEditorElement(y)&&y.parentNode&&y.parentNode.childNodes.length===1&&!s.isMediumEditorElement(y.parentNode);)y=y.parentNode;d.selectNode(y)}for(d.deleteContents(),f=l.createElement("div"),f.innerHTML=u,h=l.createDocumentFragment();f.firstChild;)m=f.firstChild,g=h.appendChild(m);d.insertNode(h),g&&(d=d.cloneRange(),d.setStartAfter(g),d.collapse(!0),e.selection.selectRange(l,d)),b=!0}return l.execCommand.callListeners&&l.execCommand.callListeners(w,b),b},execFormatBlock:function(l,u){var c=s.getTopBlockContainer(e.selection.getSelectionStart(l)),d;if(u==="blockquote"){if(c&&(d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return s.isBlockContainer(f)})))return l.execCommand("outdent",!1,null);if(s.isIE)return l.execCommand("indent",!1,u)}if(c&&u===c.nodeName.toLowerCase()&&(u="p"),s.isIE&&(u="<"+u+">"),c&&c.nodeName.toLowerCase()==="blockquote"){if(s.isIE&&u==="

")return l.execCommand("outdent",!1,u);if((s.isFF||s.isEdge)&&u==="p")return d=Array.prototype.slice.call(c.childNodes),d.some(function(f){return!s.isBlockContainer(f)})&&l.execCommand("formatBlock",!1,u),l.execCommand("outdent",!1,u)}return l.execCommand("formatBlock",!1,u)},setTargetBlank:function(l,u){var c,d=u||!1;if(l.nodeName.toLowerCase()==="a")l.target="_blank",l.rel="noopener noreferrer";else for(l=l.getElementsByTagName("a"),c=0;cd?(f=f.parentNode,c-=1):(h=h.parentNode,d-=1);for(;f!==h;)f=f.parentNode,h=h.parentNode;return f},isElementAtBeginningOfBlock:function(l){for(var u,c;!s.isBlockContainer(l)&&!s.isMediumEditorElement(l);){for(c=l;c=c.previousSibling;)if(u=c.nodeType===3?c.nodeValue:c.textContent,u.length>0)return!1;l=l.parentNode}return!0},isMediumEditorElement:function(l){return l&&l.getAttribute&&!!l.getAttribute("data-medium-editor-element")},getContainerEditorElement:function(l){return s.traverseUp(l,function(u){return s.isMediumEditorElement(u)})},isBlockContainer:function(l){return l&&l.nodeType!==3&&s.blockContainerElementNames.indexOf(l.nodeName.toLowerCase())!==-1},getClosestBlockContainer:function(l){return s.traverseUp(l,function(u){return s.isBlockContainer(u)||s.isMediumEditorElement(u)})},getTopBlockContainer:function(l){var u=s.isBlockContainer(l)?l:!1;return s.traverseUp(l,function(c){return s.isBlockContainer(c)&&(u=c),!u&&s.isMediumEditorElement(c)?(u=c,!0):!1}),u},getFirstSelectableLeafNode:function(l){for(;l&&l.firstChild;)l=l.firstChild;if(l=s.traverseUp(l,function(c){return s.emptyElementNames.indexOf(c.nodeName.toLowerCase())===-1}),l.nodeName.toLowerCase()==="table"){var u=l.querySelector("th, td");u&&(l=u)}return l},getFirstTextNode:function(l){return s.warn("getFirstTextNode is deprecated and will be removed in version 6.0.0"),s._getFirstTextNode(l)},_getFirstTextNode:function(l){if(l.nodeType===3)return l;for(var u=0;u0){var l=s.getRangeAt(0),u=l.cloneRange(),c;u.selectNodeContents(i),u.setEnd(l.startContainer,l.startOffset),c=u.toString().length,a={start:c,end:c+l.toString().length},this.doesRangeStartWithImages(l,o)&&(a.startsWithImage=!0);var d=this.getTrailingImageCount(i,a,l.endContainer,l.endOffset);if(d&&(a.trailingImageCount=d),c!==0){var f=this.getIndexRelativeToAdjacentEmptyBlocks(o,i,l.startContainer,l.startOffset);f!==-1&&(a.emptyBlocksIndex=f)}}return a},importSelection:function(i,o,a,s){if(!(!i||!o)){var l=a.createRange();l.setStart(o,0),l.collapse(!0);var u=o,c=[],d=0,f=!1,h=!1,m=0,g=!1,y,b=!1,w=null;for((s||i.startsWithImage||typeof i.emptyBlocksIndex!="undefined")&&(b=!0);!g&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=d+u.length,!f&&i.start>=d&&i.start<=y&&(b||i.start=d&&i.end<=y&&(i.trailingImageCount?h=!0:(l.setEnd(u,i.end-d),g=!0)),d=y;else{if(i.trailingImageCount&&h&&(u.nodeName.toLowerCase()==="img"&&m++,m===i.trailingImageCount)){for(var O=0;u.parentNode.childNodes[O]!==u;)O++;l.setEnd(u.parentNode,O+1),g=!0}if(!g&&u.nodeType===1)for(var S=u.childNodes.length-1;S>=0;)c.push(u.childNodes[S]),S-=1}g||(u=c.pop())}!f&&w&&(l.setStart(w,w.length),l.setEnd(w,w.length)),typeof i.emptyBlocksIndex!="undefined"&&(l=this.importSelectionMoveCursorPastBlocks(a,o,i.emptyBlocksIndex,l)),s&&(l=this.importSelectionMoveCursorPastAnchor(i,l)),this.selectRange(a,l)}},importSelectionMoveCursorPastAnchor:function(i,o){var a=function(d){return d.nodeName.toLowerCase()==="a"};if(i.start===i.end&&o.startContainer.nodeType===3&&o.startOffset===o.startContainer.nodeValue.length&&e.util.traverseUp(o.startContainer,a)){for(var s=o.startContainer,l=o.startContainer.parentNode;l!==null&&l.nodeName.toLowerCase()!=="a";)l.childNodes[l.childNodes.length-1]!==s?l=null:(s=l,l=l.parentNode);if(l!==null&&l.nodeName.toLowerCase()==="a"){for(var u=null,c=0;u===null&&c0)break;return d||(d=c),s.setStart(e.util.getFirstSelectableLeafNode(d),0),s},getIndexRelativeToAdjacentEmptyBlocks:function(i,o,a,s){if(a.textContent.length>0&&s>0)return-1;var l=a;if(l.nodeType!==3&&(l=a.childNodes[s]),l){if(!e.util.isElementAtBeginningOfBlock(l))return-1;var u=e.util.findPreviousSibling(l);if(u){if(u.nodeValue)return-1}else return-1}for(var c=e.util.getClosestBlockContainer(a),d=i.createTreeWalker(o,NodeFilter.SHOW_ELEMENT,n,!1),f=0;d.nextNode();){var h=d.currentNode.textContent==="";if((h||f>0)&&(f+=1),d.currentNode===c)return f;h||(f=0)}return f},doesRangeStartWithImages:function(i,o){if(i.startOffset!==0||i.startContainer.nodeType!==1)return!1;if(i.startContainer.nodeName.toLowerCase()==="img")return!0;var a=i.startContainer.querySelector("img");if(!a)return!1;for(var s=o.createTreeWalker(i.startContainer,NodeFilter.SHOW_ALL,null,!1);s.nextNode();){var l=s.currentNode;if(l===a)break;if(l.nodeValue)return!1}return!0},getTrailingImageCount:function(i,o,a,s){if(s===0||a.nodeType!==1||a.nodeName.toLowerCase()!=="img"&&!a.querySelector("img"))return 0;for(var l=a.childNodes[s-1];l.hasChildNodes();)l=l.lastChild;for(var u=i,c=[],d=0,f=!1,h=!1,m=!1,g,y=0;!m&&u;){if(u.nodeType>3){u=c.pop();continue}if(u.nodeType===3&&!h)y=0,g=d+u.length,!f&&o.start>=d&&o.start<=g&&(f=!0),f&&o.end>=d&&o.end<=g&&(h=!0),d=g;else if(u.nodeName.toLowerCase()==="img"&&y++,u===l)m=!0;else if(u.nodeType===1)for(var b=u.childNodes.length-1;b>=0;)c.push(u.childNodes[b]),b-=1;m||(u=c.pop())}return y},selectionContainsContent:function(i){var o=i.getSelection();if(!o||o.isCollapsed||!o.rangeCount)return!1;if(o.toString().trim()!=="")return!0;var a=this.getSelectedParentElement(o.getRangeAt(0));return!!(a&&(a.nodeName.toLowerCase()==="img"||a.nodeType===1&&a.querySelector("img")))},selectionInContentEditableFalse:function(i){var o,a=this.findMatchingSelectionParent(function(s){var l=s&&s.getAttribute("contenteditable");return l==="true"&&(o=!0),s.nodeName!=="#text"&&l==="false"},i);return!o&&a},getSelectionHtml:function(o){var a,s="",l=o.getSelection(),u,c;if(l.rangeCount){for(c=o.createElement("div"),a=0,u=l.rangeCount;a-1?[i]:i,Array.prototype.forEach.call(i,function(c){c.addEventListener(o,a,s),this.events.push([c,o,a,s])}.bind(this))},detachDOMEvent:function(i,o,a,s){var l,u,c=this.base.options.contentWindow,d=this.base.options.ownerDocument;i&&(i=e.util.isElement(i)||[c,d].indexOf(i)>-1?[i]:i,Array.prototype.forEach.call(i,function(f){l=this.indexOfListener(f,o,a,s),l!==-1&&(u=this.events.splice(l,1)[0],u[0].removeEventListener(u[1],u[2],u[3]))}.bind(this)))},indexOfListener:function(i,o,a,s){var l,u,c;for(l=0,u=this.events.length;l0&&(i=o.indexOf(r.nodeName.toLowerCase())!==-1),!i&&this.style&&(a=this.style.value.split("|"),s=this.window.getComputedStyle(r,null).getPropertyValue(this.style.prop),a.forEach(function(l){this.knownState||(i=s.indexOf(l)!==-1,(i||this.style.prop!=="text-decoration")&&(this.knownState=i))},this)),i)}});n.isBuiltInButton=function(r){return typeof r=="string"&&e.extensions.button.prototype.defaults.hasOwnProperty(r)},e.extensions.button=n}(),function(){e.extensions.button.prototype.defaults={bold:{name:"bold",action:"bold",aria:"bold",tagNames:["b","strong"],style:{prop:"font-weight",value:"700|bold"},useQueryState:!0,contentDefault:"B",contentFA:''},italic:{name:"italic",action:"italic",aria:"italic",tagNames:["i","em"],style:{prop:"font-style",value:"italic"},useQueryState:!0,contentDefault:"I",contentFA:''},underline:{name:"underline",action:"underline",aria:"underline",tagNames:["u"],style:{prop:"text-decoration",value:"underline"},useQueryState:!0,contentDefault:"U",contentFA:''},strikethrough:{name:"strikethrough",action:"strikethrough",aria:"strike through",tagNames:["strike"],style:{prop:"text-decoration",value:"line-through"},useQueryState:!0,contentDefault:"A",contentFA:''},superscript:{name:"superscript",action:"superscript",aria:"superscript",tagNames:["sup"],contentDefault:"x1",contentFA:''},subscript:{name:"subscript",action:"subscript",aria:"subscript",tagNames:["sub"],contentDefault:"x1",contentFA:''},image:{name:"image",action:"image",aria:"image",tagNames:["img"],contentDefault:"image",contentFA:''},html:{name:"html",action:"html",aria:"evaluate html",tagNames:["iframe","object"],contentDefault:"html",contentFA:''},orderedlist:{name:"orderedlist",action:"insertorderedlist",aria:"ordered list",tagNames:["ol"],useQueryState:!0,contentDefault:"1.",contentFA:''},unorderedlist:{name:"unorderedlist",action:"insertunorderedlist",aria:"unordered list",tagNames:["ul"],useQueryState:!0,contentDefault:"",contentFA:''},indent:{name:"indent",action:"indent",aria:"indent",tagNames:[],contentDefault:"",contentFA:''},outdent:{name:"outdent",action:"outdent",aria:"outdent",tagNames:[],contentDefault:"",contentFA:''},justifyCenter:{name:"justifyCenter",action:"justifyCenter",aria:"center justify",tagNames:[],style:{prop:"text-align",value:"center"},contentDefault:"C",contentFA:''},justifyFull:{name:"justifyFull",action:"justifyFull",aria:"full justify",tagNames:[],style:{prop:"text-align",value:"justify"},contentDefault:"J",contentFA:''},justifyLeft:{name:"justifyLeft",action:"justifyLeft",aria:"left justify",tagNames:[],style:{prop:"text-align",value:"left"},contentDefault:"L",contentFA:''},justifyRight:{name:"justifyRight",action:"justifyRight",aria:"right justify",tagNames:[],style:{prop:"text-align",value:"right"},contentDefault:"R",contentFA:''},removeFormat:{name:"removeFormat",aria:"remove formatting",action:"removeFormat",contentDefault:"X",contentFA:''},quote:{name:"quote",action:"append-blockquote",aria:"blockquote",tagNames:["blockquote"],contentDefault:"",contentFA:''},pre:{name:"pre",action:"append-pre",aria:"preformatted text",tagNames:["pre"],contentDefault:"0101",contentFA:''},h1:{name:"h1",action:"append-h1",aria:"header type one",tagNames:["h1"],contentDefault:"H1",contentFA:'1'},h2:{name:"h2",action:"append-h2",aria:"header type two",tagNames:["h2"],contentDefault:"H2",contentFA:'2'},h3:{name:"h3",action:"append-h3",aria:"header type three",tagNames:["h3"],contentDefault:"H3",contentFA:'3'},h4:{name:"h4",action:"append-h4",aria:"header type four",tagNames:["h4"],contentDefault:"H4",contentFA:'4'},h5:{name:"h5",action:"append-h5",aria:"header type five",tagNames:["h5"],contentDefault:"H5",contentFA:'5'},h6:{name:"h6",action:"append-h6",aria:"header type six",tagNames:["h6"],contentDefault:"H6",contentFA:'6'}}}(),function(){var n=e.extensions.button.extend({init:function(){e.extensions.button.prototype.init.apply(this,arguments)},formSaveLabel:"✓",formCloseLabel:"×",activeClass:"medium-editor-toolbar-form-active",hasForm:!0,getForm:function(){},isDisplayed:function(){return this.hasForm?this.getForm().classList.contains(this.activeClass):!1},showForm:function(){this.hasForm&&this.getForm().classList.add(this.activeClass)},hideForm:function(){this.hasForm&&this.getForm().classList.remove(this.activeClass)},showToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.showToolbarDefaultActions()},hideToolbarDefaultActions:function(){var r=this.base.getExtensionByName("toolbar");r&&r.hideToolbarDefaultActions()},setToolbarPosition:function(){var r=this.base.getExtensionByName("toolbar");r&&r.setToolbarPosition()}});e.extensions.form=n}(),function(){var n=e.extensions.form.extend({customClassOption:null,customClassOptionText:"Button",linkValidation:!1,placeholderText:"Paste or type a link",targetCheckbox:!1,targetCheckboxText:"Open in new window",name:"anchor",action:"createLink",aria:"link",tagNames:["a"],contentDefault:"#",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this))},handleClick:function(r){r.preventDefault(),r.stopPropagation();var i=e.selection.getSelectionRange(this.document);return i.startContainer.nodeName.toLowerCase()==="a"||i.endContainer.nodeName.toLowerCase()==="a"||e.util.getClosestTag(e.selection.getSelectedParentElement(i),"a")?this.execAction("unlink"):(this.isDisplayed()||this.showForm(),!1)},handleKeydown:function(r){e.util.isKey(r,e.util.keyCode.K)&&e.util.isMetaCtrlKey(r)&&!r.shiftKey&&this.handleClick(r)},getForm:function(){return this.form||(this.form=this.createForm()),this.form},getTemplate:function(){var r=[''];return r.push('',this.getEditorOption("buttonLabels")==="fontawesome"?'':this.formSaveLabel,""),r.push('',this.getEditorOption("buttonLabels")==="fontawesome"?'':this.formCloseLabel,""),this.targetCheckbox&&r.push('

','','","
"),this.customClassOption&&r.push('
','',"","
"),r.join("")},isDisplayed:function(){return e.extensions.form.prototype.isDisplayed.apply(this)},hideForm:function(){e.extensions.form.prototype.hideForm.apply(this),this.getInput().value=""},showForm:function(r){var i=this.getInput(),o=this.getAnchorTargetCheckbox(),a=this.getAnchorButtonCheckbox();if(r=r||{value:""},typeof r=="string"&&(r={value:r}),this.base.saveSelection(),this.hideToolbarDefaultActions(),e.extensions.form.prototype.showForm.apply(this),this.setToolbarPosition(),i.value=r.value,i.focus(),o&&(o.checked=r.target==="_blank"),a){var s=r.buttonClass?r.buttonClass.split(" "):[];a.checked=s.indexOf(this.customClassOption)!==-1}},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},getFormOpts:function(){var r=this.getAnchorTargetCheckbox(),i=this.getAnchorButtonCheckbox(),o={value:this.getInput().value.trim()};return this.linkValidation&&(o.value=this.checkLinkFormat(o.value)),o.target="_self",r&&r.checked&&(o.target="_blank"),i&&i.checked&&(o.buttonClass=this.customClassOption),o},doFormSave:function(){var r=this.getFormOpts();this.completeFormSave(r)},completeFormSave:function(r){this.base.restoreSelection(),this.execAction(this.action,r),this.base.checkSelection()},ensureEncodedUri:function(r){return r===decodeURI(r)?encodeURI(r):r},ensureEncodedUriComponent:function(r){return r===decodeURIComponent(r)?encodeURIComponent(r):r},ensureEncodedParam:function(r){var i=r.split("="),o=i[0],a=i[1];return o+(a===void 0?"":"="+this.ensureEncodedUriComponent(a))},ensureEncodedQuery:function(r){return r.split("&").map(this.ensureEncodedParam.bind(this)).join("&")},checkLinkFormat:function(r){var i=/^([a-z]+:)?\/\/|^(mailto|tel|maps):|^\#/i,o=i.test(r),a="",s=/^\+?\s?\(?(?:\d\s?\-?\)?){3,20}$/,l=r.match(/^(.*?)(?:\?(.*?))?(?:#(.*))?$/),u=l[1],c=l[2],d=l[3];if(s.test(r))return"tel:"+r;if(!o){var f=u.split("/")[0];(f.match(/.+(\.|:).+/)||f==="localhost")&&(a="http://")}return a+this.ensureEncodedUri(u)+(c===void 0?"":"?"+this.ensureEncodedQuery(c))+(d===void 0?"":"#"+d)},doFormCancel:function(){this.base.restoreSelection(),this.base.checkSelection()},attachFormEvents:function(r){var i=r.querySelector(".medium-editor-toolbar-close"),o=r.querySelector(".medium-editor-toolbar-save"),a=r.querySelector(".medium-editor-toolbar-input");this.on(r,"click",this.handleFormClick.bind(this)),this.on(a,"keyup",this.handleTextboxKeyup.bind(this)),this.on(i,"click",this.handleCloseClick.bind(this)),this.on(o,"click",this.handleSaveClick.bind(this),!0)},createForm:function(){var r=this.document,i=r.createElement("div");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-anchor-"+this.getEditorId(),i.innerHTML=this.getTemplate(),this.attachFormEvents(i),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},getAnchorTargetCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-target")},getAnchorButtonCheckbox:function(){return this.getForm().querySelector(".medium-editor-toolbar-anchor-button")},handleTextboxKeyup:function(r){if(r.keyCode===e.util.keyCode.ENTER){r.preventDefault(),this.doFormSave();return}r.keyCode===e.util.keyCode.ESCAPE&&(r.preventDefault(),this.doFormCancel())},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.anchor=n}(),function(){var n=e.Extension.extend({name:"anchor-preview",hideDelay:500,previewValueSelector:"a",showWhenToolbarIsVisible:!1,showOnEmptyLinks:!0,init:function(){this.anchorPreview=this.createPreview(),this.getEditorOption("elementsContainer").appendChild(this.anchorPreview),this.attachToEditables()},getInteractionElements:function(){return this.getPreviewElement()},getPreviewElement:function(){return this.anchorPreview},createPreview:function(){var r=this.document.createElement("div");return r.id="medium-editor-anchor-preview-"+this.getEditorId(),r.className="medium-editor-anchor-preview",r.innerHTML=this.getTemplate(),this.on(r,"click",this.handleClick.bind(this)),r},getTemplate:function(){return'
'},destroy:function(){this.anchorPreview&&(this.anchorPreview.parentNode&&this.anchorPreview.parentNode.removeChild(this.anchorPreview),delete this.anchorPreview)},hidePreview:function(){this.anchorPreview&&this.anchorPreview.classList.remove("medium-editor-anchor-preview-active"),this.activeAnchor=null},showPreview:function(r){return this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||r.getAttribute("data-disable-preview")?!0:(this.previewValueSelector&&(this.anchorPreview.querySelector(this.previewValueSelector).textContent=r.attributes.href.value,this.anchorPreview.querySelector(this.previewValueSelector).href=r.attributes.href.value),this.anchorPreview.classList.add("medium-toolbar-arrow-over"),this.anchorPreview.classList.remove("medium-toolbar-arrow-under"),this.anchorPreview.classList.contains("medium-editor-anchor-preview-active")||this.anchorPreview.classList.add("medium-editor-anchor-preview-active"),this.activeAnchor=r,this.positionPreview(),this.attachPreviewHandlers(),this)},positionPreview:function(r){r=r||this.activeAnchor;var i=this.window.innerWidth,o=this.anchorPreview.offsetHeight,a=r.getBoundingClientRect(),s=this.diffLeft,l=this.diffTop,u=this.getEditorOption("elementsContainer"),c=["absolute","fixed"].indexOf(window.getComputedStyle(u).getPropertyValue("position"))>-1,d={},f,h,m,g,y;f=this.anchorPreview.offsetWidth/2;var b=this.base.getExtensionByName("toolbar");b&&(s=b.diffLeft,l=b.diffTop),h=s-f,c?(g=u.getBoundingClientRect(),["top","left"].forEach(function(w){d[w]=a[w]-g[w]}),d.width=a.width,d.height=a.height,a=d,i=g.width,y=u.scrollTop):y=this.window.pageYOffset,m=a.left+a.width/2,y+=o+a.top+a.height-l-this.anchorPreview.offsetHeight,this.anchorPreview.style.top=Math.round(y)+"px",this.anchorPreview.style.right="initial",mthis.hideDelay&&this.detachPreviewHandlers()},detachPreviewHandlers:function(){clearInterval(this.intervalTimer),this.instanceHandlePreviewMouseover&&(this.off(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.activeAnchor&&(this.off(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.off(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout))),this.hidePreview(),this.hovering=this.instanceHandlePreviewMouseover=this.instanceHandlePreviewMouseout=null},attachPreviewHandlers:function(){this.lastOver=new Date().getTime(),this.hovering=!0,this.instanceHandlePreviewMouseover=this.handlePreviewMouseover.bind(this),this.instanceHandlePreviewMouseout=this.handlePreviewMouseout.bind(this),this.intervalTimer=setInterval(this.updatePreview.bind(this),200),this.on(this.anchorPreview,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.anchorPreview,"mouseout",this.instanceHandlePreviewMouseout),this.on(this.activeAnchor,"mouseover",this.instanceHandlePreviewMouseover),this.on(this.activeAnchor,"mouseout",this.instanceHandlePreviewMouseout)}});e.extensions.anchorPreview=n}(),function(){var n,r,i,o,a;n=[" "," ",` `,"\r","\xA0","\u2000","\u2001","\u2002","\u2003","\u2028","\u2029"],r="com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|ja|sk|sl|sm|sn|so|sr|ss|st|su|sv|sx|sy|sz|tc|td|tf|tg|th|tj|tk|tl|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw",i="(((?:(https?://|ftps?://|nntp://)|www\\d{0,3}[.]|[a-z0-9.\\-]+[.]("+r+")\\/)\\S+(?:[^\\s`!\\[\\]{};:'\".,?\xAB\xBB\u201C\u201D\u2018\u2019])))|(([a-z0-9\\-]+\\.)?[a-z0-9\\-]+\\.("+r+"))",o=new RegExp("^("+r+")$","i"),a=new RegExp(i,"gi");function s(u){return!e.util.getClosestTag(u,"a")}var l=e.Extension.extend({init:function(){e.Extension.prototype.init.apply(this,arguments),this.disableEventHandling=!1,this.subscribe("editableKeypress",this.onKeypress.bind(this)),this.subscribe("editableBlur",this.onBlur.bind(this)),this.document.execCommand("AutoUrlDetect",!1,!1)},isLastInstance:function(){for(var u=0,c=0;c0&&g!==null;)h=d.currentNode,m=h.nodeValue,m.length>c?(g=h.splitText(m.length-c),c=0):(g=d.previousNode(),c-=m.length);return g},performLinkingWithinElement:function(u){for(var c=this.findLinkableText(u),d=!1,f=0;f1;)f.appendChild(d.childNodes[1])}});e.extensions.autoLink=l}(),function(){var n="medium-editor-dragover";function r(o){var a=e.util.getContainerEditorElement(o),s=Array.prototype.slice.call(a.parentElement.querySelectorAll("."+n));s.forEach(function(l){l.classList.remove(n)})}var i=e.Extension.extend({name:"fileDragging",allowedTypes:["image"],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableDrag",this.handleDrag.bind(this)),this.subscribe("editableDrop",this.handleDrop.bind(this))},handleDrag:function(o){o.preventDefault(),o.dataTransfer.dropEffect="copy";var a=o.target.classList?o.target:o.target.parentElement;r(a),o.type==="dragover"&&a.classList.add(n)},handleDrop:function(o){o.preventDefault(),o.stopPropagation(),this.base.selectElement(o.target);var a=this.base.exportSelection();a.start=a.end,this.base.importSelection(a),o.dataTransfer.files&&Array.prototype.slice.call(o.dataTransfer.files).forEach(function(s){this.isAllowedFile(s)&&s.type.match("image")&&this.insertImageFile(s)},this),r(o.target)},isAllowedFile:function(o){return this.allowedTypes.some(function(a){return!!o.type.match(a)})},insertImageFile:function(o){if(typeof FileReader=="function"){var a=new FileReader;a.readAsDataURL(o),a.addEventListener("load",function(s){var l=this.document.createElement("img");l.src=s.target.result,e.util.insertHTMLCommand(this.document,l.outerHTML)}.bind(this))}}});e.extensions.fileDragging=i}(),function(){var n=e.Extension.extend({name:"keyboard-commands",commands:[{command:"bold",key:"B",meta:!0,shift:!1,alt:!1},{command:"italic",key:"I",meta:!0,shift:!1,alt:!1},{command:"underline",key:"U",meta:!0,shift:!1,alt:!1}],init:function(){e.Extension.prototype.init.apply(this,arguments),this.subscribe("editableKeydown",this.handleKeydown.bind(this)),this.keys={},this.commands.forEach(function(r){var i=r.key.charCodeAt(0);this.keys[i]||(this.keys[i]=[]),this.keys[i].push(r)},this)},handleKeydown:function(r){var i=e.util.getKeyCode(r);if(!!this.keys[i]){var o=e.util.isMetaCtrlKey(r),a=!!r.shiftKey,s=!!r.altKey;this.keys[i].forEach(function(l){l.meta===o&&l.shift===a&&(l.alt===s||l.alt===void 0)&&(r.preventDefault(),r.stopPropagation(),typeof l.command=="function"?l.command.apply(this):l.command!==!1&&this.execAction(l.command))},this)}}});e.extensions.keyboardCommands=n}(),function(){var n=e.extensions.form.extend({name:"fontname",action:"fontName",aria:"change font name",contentDefault:"±",contentFA:'',fonts:["","Arial","Verdana","Times New Roman"],init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontName")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getSelect().value=""},showForm:function(r){var i=this.getSelect();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontName(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("select"),a=r.createElement("a"),s=r.createElement("a"),l;i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontname-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this));for(var u=0;u
':"✓",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"×",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getSelect:function(){return this.getForm().querySelector("select.medium-editor-toolbar-select")},clearFontName:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("face")&&r.removeAttribute("face")})},handleFontChange:function(){var r=this.getSelect().value;r===""?this.clearFontName():this.execAction("fontName",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontName=n}(),function(){var n=e.extensions.form.extend({name:"fontsize",action:"fontSize",aria:"increase/decrease font size",contentDefault:"±",contentFA:'',init:function(){e.extensions.form.prototype.init.apply(this,arguments)},handleClick:function(r){if(r.preventDefault(),r.stopPropagation(),!this.isDisplayed()){var i=this.document.queryCommandValue("fontSize")+"";this.showForm(i)}return!1},getForm:function(){return this.form||(this.form=this.createForm()),this.form},isDisplayed:function(){return this.getForm().style.display==="block"},hideForm:function(){this.getForm().style.display="none",this.getInput().value=""},showForm:function(r){var i=this.getInput();this.base.saveSelection(),this.hideToolbarDefaultActions(),this.getForm().style.display="block",this.setToolbarPosition(),i.value=r||"",i.focus()},destroy:function(){if(!this.form)return!1;this.form.parentNode&&this.form.parentNode.removeChild(this.form),delete this.form},doFormSave:function(){this.base.restoreSelection(),this.base.checkSelection()},doFormCancel:function(){this.base.restoreSelection(),this.clearFontSize(),this.base.checkSelection()},createForm:function(){var r=this.document,i=r.createElement("div"),o=r.createElement("input"),a=r.createElement("a"),s=r.createElement("a");return i.className="medium-editor-toolbar-form",i.id="medium-editor-toolbar-form-fontsize-"+this.getEditorId(),this.on(i,"click",this.handleFormClick.bind(this)),o.setAttribute("type","range"),o.setAttribute("min","1"),o.setAttribute("max","7"),o.className="medium-editor-toolbar-input",i.appendChild(o),this.on(o,"change",this.handleSliderChange.bind(this)),s.setAttribute("href","#"),s.className="medium-editor-toobar-save",s.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"✓",i.appendChild(s),this.on(s,"click",this.handleSaveClick.bind(this),!0),a.setAttribute("href","#"),a.className="medium-editor-toobar-close",a.innerHTML=this.getEditorOption("buttonLabels")==="fontawesome"?'':"×",i.appendChild(a),this.on(a,"click",this.handleCloseClick.bind(this)),i},getInput:function(){return this.getForm().querySelector("input.medium-editor-toolbar-input")},clearFontSize:function(){e.selection.getSelectedElements(this.document).forEach(function(r){r.nodeName.toLowerCase()==="font"&&r.hasAttribute("size")&&r.removeAttribute("size")})},handleSliderChange:function(){var r=this.getInput().value;r==="4"?this.clearFontSize():this.execAction("fontSize",{value:r})},handleFormClick:function(r){r.stopPropagation()},handleSaveClick:function(r){r.preventDefault(),this.doFormSave()},handleCloseClick:function(r){r.preventDefault(),this.doFormCancel()}});e.extensions.fontSize=n}(),function(){var n="%ME_PASTEBIN%",r=null,i=null,o=function(u){u.stopPropagation()};function a(){return[[new RegExp(/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g),""],[new RegExp(/|/g),""],[new RegExp(/
$/i),""],[new RegExp(/<[^>]*docs-internal-guid[^>]*>/gi),""],[new RegExp(/<\/b>(]*>)?$/gi),""],[new RegExp(/\s+<\/span>/g)," "],[new RegExp(/
/g),"
"],[new RegExp(/]*(font-style:italic;font-weight:(bold|700)|font-weight:(bold|700);font-style:italic)[^>]*>/gi),''],[new RegExp(/]*font-style:italic[^>]*>/gi),''],[new RegExp(/]*font-weight:(bold|700)[^>]*>/gi),''],[new RegExp(/<(\/?)(i|b|a)>/gi),"<$1$2>"],[new RegExp(/<a(?:(?!href).)+href=(?:"|”|“|"|“|”)(((?!"|”|“|"|“|”).)*)(?:"|”|“|"|“|”)(?:(?!>).)*>/gi),''],[new RegExp(/<\/p>\n+/gi),"

"],[new RegExp(/\n+

/gi),""],[new RegExp(/(((?!/gi),"$1"]]}function s(u,c,d){var f=u.clipboardData||c.clipboardData||d.dataTransfer,h={};if(!f)return h;if(f.getData){var m=f.getData("Text");m&&m.length>0&&(h["text/plain"]=m)}if(f.types)for(var g=0;g1)for(m=0;m"+e.util.htmlEntities(f[m])+"

");else h=e.util.htmlEntities(f[0]);e.util.insertHTMLCommand(this.document,h)}},handlePasteBinPaste:function(u){if(u.defaultPrevented){this.removePasteBin();return}var c=s(u,this.window,this.document),d=c["text/html"],f=c["text/plain"],h=i;if(!this.cleanPastedHTML||d){u.preventDefault(),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h);return}setTimeout(function(){this.cleanPastedHTML&&(d=this.getPasteBinHtml()),this.removePasteBin(),this.doPaste(d,f,h),this.trigger("editablePaste",{currentTarget:h,target:h},h)}.bind(this),0)},handleKeydown:function(u,c){!(e.util.isKey(u,e.util.keyCode.V)&&e.util.isMetaCtrlKey(u))||(u.stopImmediatePropagation(),this.removePasteBin(),this.createPasteBin(c))},createPasteBin:function(u){var c,d=e.selection.getSelectionRange(this.document),f=this.window.pageYOffset;i=u,d&&(c=d.getClientRects(),c.length?f+=c[0].top:d.startContainer.getBoundingClientRect!==void 0?f+=d.startContainer.getBoundingClientRect().top:f+=d.getBoundingClientRect().top),r=d;var h=this.document.createElement("div");h.id=this.pasteBinId="medium-editor-pastebin-"+ +Date.now(),h.setAttribute("style","border: 1px red solid; position: absolute; top: "+f+"px; width: 10px; height: 10px; overflow: hidden; opacity: 0"),h.setAttribute("contentEditable",!0),h.innerHTML=n,this.document.body.appendChild(h),this.on(h,"focus",o),this.on(h,"focusin",o),this.on(h,"focusout",o),h.focus(),e.selection.selectNode(h,this.document),this.boundHandlePaste||(this.boundHandlePaste=this.handlePasteBinPaste.bind(this)),this.on(h,"paste",this.boundHandlePaste)},removePasteBin:function(){r!==null&&(e.selection.selectRange(this.document,r),r=null),i!==null&&(i=null);var u=this.getPasteBin();!u||u&&(this.off(u,"focus",o),this.off(u,"focusin",o),this.off(u,"focusout",o),this.off(u,"paste",this.boundHandlePaste),u.parentElement.removeChild(u))},getPasteBin:function(){return this.document.getElementById(this.pasteBinId)},getPasteBinHtml:function(){var u=this.getPasteBin();if(!u||u.firstChild&&u.firstChild.id==="mcepastebin")return!1;var c=u.innerHTML;return!c||c===n?!1:c},cleanPaste:function(u){var c,d,f,h,m=/"+u.split("

").join("

")+"

",d=f.querySelectorAll("a,p,div,br"),c=0;c"+d.innerHTML+"
":f.innerHTML=d.innerHTML,d.parentNode.replaceChild(f,d);for(h=u.querySelectorAll("span"),c=0;c0&&(a[0].classList.add(this.firstButtonClass),a[a.length-1].classList.add(this.lastButtonClass)),r},destroy:function(){this.toolbar&&(this.toolbar.parentNode&&this.toolbar.parentNode.removeChild(this.toolbar),delete this.toolbar)},getInteractionElements:function(){return this.getToolbarElement()},getToolbarElement:function(){return this.toolbar||(this.toolbar=this.createToolbar()),this.toolbar},getToolbarActionsElement:function(){return this.getToolbarElement().querySelector(".medium-editor-toolbar-actions")},initThrottledMethods:function(){this.throttledPositionToolbar=e.util.throttle(function(){this.base.isActive&&this.positionToolbarIfShown()}.bind(this))},attachEventHandlers:function(){this.subscribe("blur",this.handleBlur.bind(this)),this.subscribe("focus",this.handleFocus.bind(this)),this.subscribe("editableClick",this.handleEditableClick.bind(this)),this.subscribe("editableKeyup",this.handleEditableKeyup.bind(this)),this.on(this.document.documentElement,"mouseup",this.handleDocumentMouseup.bind(this)),this.static&&this.sticky&&this.on(this.window,"scroll",this.handleWindowScroll.bind(this),!0),this.on(this.window,"resize",this.handleWindowResize.bind(this))},handleWindowScroll:function(){this.positionToolbarIfShown()},handleWindowResize:function(){this.throttledPositionToolbar()},handleDocumentMouseup:function(r){if(r&&r.target&&e.util.isDescendant(this.getToolbarElement(),r.target))return!1;this.checkState()},handleEditableClick:function(){setTimeout(function(){this.checkState()}.bind(this),0)},handleEditableKeyup:function(){this.checkState()},handleBlur:function(){clearTimeout(this.hideTimeout),clearTimeout(this.delayShowTimeout),this.hideTimeout=setTimeout(function(){this.hideToolbar()}.bind(this),1)},handleFocus:function(){this.checkState()},isDisplayed:function(){return this.getToolbarElement().classList.contains("medium-editor-toolbar-active")},showToolbar:function(){clearTimeout(this.hideTimeout),this.isDisplayed()||(this.getToolbarElement().classList.add("medium-editor-toolbar-active"),this.trigger("showToolbar",{},this.base.getFocusedElement()))},hideToolbar:function(){this.isDisplayed()&&(this.getToolbarElement().classList.remove("medium-editor-toolbar-active"),this.trigger("hideToolbar",{},this.base.getFocusedElement()))},isToolbarDefaultActionsDisplayed:function(){return this.getToolbarActionsElement().style.display==="block"},hideToolbarDefaultActions:function(){this.isToolbarDefaultActionsDisplayed()&&(this.getToolbarActionsElement().style.display="none")},showToolbarDefaultActions:function(){this.hideExtensionForms(),this.isToolbarDefaultActionsDisplayed()||(this.getToolbarActionsElement().style.display="block"),this.delayShowTimeout=this.base.delay(function(){this.showToolbar()}.bind(this))},hideExtensionForms:function(){this.forEachExtension(function(r){r.hasForm&&r.isDisplayed()&&r.hideForm()})},multipleBlockElementsSelected:function(){var r=/<[^\/>][^>]*><\/[^>]+>/gim,i=new RegExp("<("+e.util.blockContainerElementNames.join("|")+")[^>]*>","g"),o=e.selection.getSelectionHtml(this.document).replace(r,""),a=o.match(i);return!!a&&a.length>1},modifySelection:function(){var r=this.window.getSelection(),i=r.getRangeAt(0);if(this.standardizeSelectionStart&&i.startContainer.nodeValue&&i.startOffset===i.startContainer.nodeValue.length){var o=e.util.findAdjacentTextNodeWithContent(e.selection.getSelectionElement(this.window),i.startContainer,this.document);if(o){for(var a=0;o.nodeValue.substr(a,1).trim().length===0;)a=a+1;i=e.selection.select(this.document,o,a,i.endContainer,i.endOffset)}}},checkState:function(){if(!this.base.preventSelectionUpdates){if(!this.base.getFocusedElement()||e.selection.selectionInContentEditableFalse(this.window))return this.hideToolbar();var r=e.selection.getSelectionElement(this.window);if(!r||this.getEditorElements().indexOf(r)===-1||r.getAttribute("data-disable-toolbar"))return this.hideToolbar();if(this.updateOnEmptySelection&&this.static)return this.showAndUpdateToolbar();if(!e.selection.selectionContainsContent(this.document)||this.allowMultiParagraphSelection===!1&&this.multipleBlockElementsSelected())return this.hideToolbar();this.showAndUpdateToolbar()}},showAndUpdateToolbar:function(){this.modifySelection(),this.setToolbarButtonStates(),this.trigger("positionToolbar",{},this.base.getFocusedElement()),this.showToolbarDefaultActions(),this.setToolbarPosition()},setToolbarButtonStates:function(){this.forEachExtension(function(r){typeof r.isActive=="function"&&typeof r.setInactive=="function"&&r.setInactive()}),this.checkActiveButtons()},checkActiveButtons:function(){var r=[],i=null,o=e.selection.getSelectionRange(this.document),a,s=function(l){typeof l.checkState=="function"?l.checkState(a):typeof l.isActive=="function"&&typeof l.isAlreadyApplied=="function"&&typeof l.setActive=="function"&&!l.isActive()&&l.isAlreadyApplied(a)&&l.setActive()};if(!!o&&(this.forEachExtension(function(l){if(typeof l.queryCommandState=="function"&&(i=l.queryCommandState(),i!==null)){i&&typeof l.setActive=="function"&&l.setActive();return}r.push(l)}),a=e.selection.getSelectedParentElement(o),!!this.getEditorElements().some(function(l){return e.util.isDescendant(l,a,!0)})))for(;a&&(r.forEach(s),!e.util.isMediumEditorElement(a));)a=a.parentNode},positionToolbarIfShown:function(){this.isDisplayed()&&this.setToolbarPosition()},setToolbarPosition:function(){var r=this.base.getFocusedElement(),i=this.window.getSelection();if(!r)return this;(this.static||!i.isCollapsed)&&(this.showToolbar(),this.relativeContainer||(this.static?this.positionStaticToolbar(r):this.positionToolbar(i)),this.trigger("positionedToolbar",{},this.base.getFocusedElement()))},positionStaticToolbar:function(r){this.getToolbarElement().style.left="0";var i=this.document.documentElement&&this.document.documentElement.scrollTop||this.document.body.scrollTop,o=this.window.innerWidth,a=this.getToolbarElement(),s=r.getBoundingClientRect(),l=s.top+i,u=s.left+s.width/2,c=a.offsetHeight,d=a.offsetWidth,f=d/2,h;switch(this.sticky?i>l+r.offsetHeight-c-this.stickyTopOffset?(a.style.top=l+r.offsetHeight-c+"px",a.classList.remove("medium-editor-sticky-toolbar")):i>l-c-this.stickyTopOffset?(a.classList.add("medium-editor-sticky-toolbar"),a.style.top=this.stickyTopOffset+"px"):(a.classList.remove("medium-editor-sticky-toolbar"),a.style.top=l-c+"px"):a.style.top=l-c+"px",this.align){case"left":h=s.left;break;case"right":h=s.right-d;break;case"center":h=u-f;break}h<0?h=0:h+d>o&&(h=o-Math.ceil(d)-1),a.style.left=h+"px"},positionToolbar:function(r){this.getToolbarElement().style.left="0",this.getToolbarElement().style.right="initial";var i=r.getRangeAt(0),o=i.getBoundingClientRect();(!o||o.height===0&&o.width===0&&i.startContainer===i.endContainer)&&(i.startContainer.nodeType===1&&i.startContainer.querySelector("img")?o=i.startContainer.querySelector("img").getBoundingClientRect():o=i.startContainer.getBoundingClientRect());var a=this.window.innerWidth,s=this.getToolbarElement(),l=s.offsetHeight,u=s.offsetWidth,c=u/2,d=50,f=this.diffLeft-c,h=this.getEditorOption("elementsContainer"),m=["absolute","fixed"].indexOf(window.getComputedStyle(h).getPropertyValue("position"))>-1,g={},y={},b,w;m?(w=h.getBoundingClientRect(),["top","left"].forEach(function(O){y[O]=o[O]-w[O]}),y.width=o.width,y.height=o.height,o=y,a=w.width,g.top=h.scrollTop):g.top=this.window.pageYOffset,b=o.left+o.width/2,g.top+=o.top-l,o.top'),s.onload=function(){var u=this.document.getElementById(l);u&&(u.removeAttribute("id"),u.removeAttribute("class"),u.src=s.result)}.bind(this)}}.bind(this))),r.target.classList.remove(i)}});e.extensions.imageDragging=n}(),function(){function n($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L=W.textContent,I=e.selection.getCaretOffsets(W);(L[I.left-1]===void 0||L[I.left-1].trim()===""||L[I.left]!==void 0&&L[I.left].trim()==="")&&$.preventDefault()}function r($,W){if(this.options.disableReturn||W.getAttribute("data-disable-return"))$.preventDefault();else if(this.options.disableDoubleReturn||W.getAttribute("data-disable-double-return")){var L=e.selection.getSelectionStart(this.options.ownerDocument);(L&&L.textContent.trim()===""&&L.nodeName.toLowerCase()!=="li"||L.previousElementSibling&&L.previousElementSibling.nodeName.toLowerCase()!=="br"&&L.previousElementSibling.textContent.trim()==="")&&$.preventDefault()}}function i($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L=W&&W.nodeName.toLowerCase();L==="pre"&&($.preventDefault(),e.util.insertHTMLCommand(this.options.ownerDocument," ")),e.util.isListItem(W)&&($.preventDefault(),$.shiftKey?this.options.ownerDocument.execCommand("outdent",!1,null):this.options.ownerDocument.execCommand("indent",!1,null))}function o($){var W,L=e.selection.getSelectionStart(this.options.ownerDocument),I=L.nodeName.toLowerCase(),U=/^(\s+|)?$/i,Q=/h\d/i;e.util.isKey($,[e.util.keyCode.BACKSPACE,e.util.keyCode.ENTER])&&L.previousElementSibling&&Q.test(I)&&e.selection.getCaretOffsets(L).left===0?e.util.isKey($,e.util.keyCode.BACKSPACE)&&U.test(L.previousElementSibling.innerHTML)?(L.previousElementSibling.parentNode.removeChild(L.previousElementSibling),$.preventDefault()):!this.options.disableDoubleReturn&&e.util.isKey($,e.util.keyCode.ENTER)&&(W=this.options.ownerDocument.createElement("p"),W.innerHTML="
",L.previousElementSibling.parentNode.insertBefore(W,L),$.preventDefault()):e.util.isKey($,e.util.keyCode.DELETE)&&L.nextElementSibling&&L.previousElementSibling&&!Q.test(I)&&U.test(L.innerHTML)&&Q.test(L.nextElementSibling.nodeName.toLowerCase())?(e.selection.moveCursor(this.options.ownerDocument,L.nextElementSibling),L.previousElementSibling.parentNode.removeChild(L),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&I==="li"&&U.test(L.innerHTML)&&!L.previousElementSibling&&!L.parentElement.previousElementSibling&&L.nextElementSibling&&L.nextElementSibling.nodeName.toLowerCase()==="li"?(W=this.options.ownerDocument.createElement("p"),W.innerHTML="
",L.parentElement.parentElement.insertBefore(W,L.parentElement),e.selection.moveCursor(this.options.ownerDocument,W),L.parentElement.removeChild(L),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&e.util.getClosestTag(L,"blockquote")!==!1&&e.selection.getCaretOffsets(L).left===0?($.preventDefault(),e.util.execFormatBlock(this.options.ownerDocument,"p")):e.util.isKey($,e.util.keyCode.ENTER)&&e.util.getClosestTag(L,"blockquote")!==!1&&e.selection.getCaretOffsets(L).right===0?(W=this.options.ownerDocument.createElement("p"),W.innerHTML="
",L.parentElement.insertBefore(W,L.nextSibling),e.selection.moveCursor(this.options.ownerDocument,W),$.preventDefault()):e.util.isKey($,e.util.keyCode.BACKSPACE)&&e.util.isMediumEditorElement(L.parentElement)&&!L.previousElementSibling&&L.nextElementSibling&&U.test(L.innerHTML)&&($.preventDefault(),e.selection.moveCursor(this.options.ownerDocument,L.nextSibling),L.parentElement.removeChild(L))}function a($){var W=e.selection.getSelectionStart(this.options.ownerDocument),L;!W||(e.util.isMediumEditorElement(W)&&W.children.length===0&&!e.util.isBlockContainer(W)&&this.options.ownerDocument.execCommand("formatBlock",!1,"p"),e.util.isKey($,e.util.keyCode.ENTER)&&!e.util.isListItem(W)&&!e.util.isBlockContainer(W)&&(L=W.nodeName.toLowerCase(),L==="a"?this.options.ownerDocument.execCommand("unlink",!1,null):!$.shiftKey&&!$.ctrlKey&&this.options.ownerDocument.execCommand("formatBlock",!1,"p")))}function s($,W){var L=W.parentNode.querySelector('textarea[medium-editor-textarea-id="'+W.getAttribute("medium-editor-textarea-id")+'"]');L&&(L.value=W.innerHTML.trim())}function l($){$._mediumEditors||($._mediumEditors=[null]),this.id||(this.id=$._mediumEditors.length),$._mediumEditors[this.id]=this}function u($){!$._mediumEditors||!$._mediumEditors[this.id]||($._mediumEditors[this.id]=null)}function c($,W,L){var I=[];if($||($=[]),typeof $=="string"&&($=W.querySelectorAll($)),e.util.isElement($)&&($=[$]),L)for(var U=0;U<$.length;U++){var Q=$[U];e.util.isElement(Q)&&!Q.getAttribute("data-medium-editor-element")&&!Q.getAttribute("medium-editor-textarea-id")&&I.push(Q)}else I=Array.prototype.slice.apply($);return I}function d($){var W=$.parentNode.querySelector('textarea[medium-editor-textarea-id="'+$.getAttribute("medium-editor-textarea-id")+'"]');W&&(W.classList.remove("medium-editor-hidden"),W.removeAttribute("medium-editor-textarea-id")),$.parentNode&&$.parentNode.removeChild($)}function f($,W){return Object.keys(W).forEach(function(L){$[L]===void 0&&($[L]=W[L])}),$}function h($,W,L){var I={window:L.options.contentWindow,document:L.options.ownerDocument,base:L};return $=f($,I),typeof $.init=="function"&&$.init(),$.name||($.name=W),$}function m(){return this.elements.every(function($){return!!$.getAttribute("data-disable-toolbar")})?!1:this.options.toolbar!==!1}function g(){return m.call(this)?this.options.anchorPreview!==!1:!1}function y(){return this.options.placeholder!==!1}function b(){return this.options.autoLink!==!1}function w(){return this.options.imageDragging!==!1}function O(){return this.options.keyboardCommands!==!1}function S(){return!this.options.extensions.imageDragging}function x($){for(var W=this.options.ownerDocument.createElement("div"),L=Date.now(),I="medium-editor-"+L,U=$.attributes;this.options.ownerDocument.getElementById(I);)L++,I="medium-editor-"+L;W.className=$.className,W.id=I,W.innerHTML=$.value,$.setAttribute("medium-editor-textarea-id",I);for(var Q=0,V=U.length;Q=0&&(L=e.selection.exportSelection($,this.options.ownerDocument)),L!==null&&W!==0&&(L.editableElementIndex=W),L},saveSelection:function(){this.selectionState=this.exportSelection()},importSelection:function($,W){if(!!$){var L=this.elements[$.editableElementIndex||0];e.selection.importSelection($,L,this.options.ownerDocument,W)}},restoreSelection:function(){this.importSelection(this.selectionState)},createLink:function($){var W=e.selection.getSelectionElement(this.options.contentWindow),L={},I;if(this.elements.indexOf(W)!==-1){try{if(this.events.disableCustomEvent("editableInput"),$.url&&e.util.deprecated(".url option for createLink",".value","6.0.0"),I=$.url||$.value,I&&I.trim().length>0){var U=this.options.contentWindow.getSelection();if(U){var Q=U.getRangeAt(0),V=Q.commonAncestorContainer,q,K,ie,oe;if(Q.endContainer.nodeType===3&&Q.startContainer.nodeType!==3&&Q.startOffset===0&&Q.startContainer.firstChild===Q.endContainer&&(V=Q.endContainer),K=e.util.getClosestBlockContainer(Q.startContainer),ie=e.util.getClosestBlockContainer(Q.endContainer),V.nodeType!==3&&V.textContent.length!==0&&K===ie){var Se=K||W,ke=this.options.ownerDocument.createDocumentFragment();this.execAction("unlink"),q=this.exportSelection(),ke.appendChild(Se.cloneNode(!0)),W===Se?e.selection.select(this.options.ownerDocument,Se.firstChild,0,Se.lastChild,Se.lastChild.nodeType===3?Se.lastChild.nodeValue.length:Se.lastChild.childNodes.length):e.selection.select(this.options.ownerDocument,Se,0,Se,Se.childNodes.length);var Y=this.exportSelection();oe=e.util.findOrCreateMatchingTextNodes(this.options.ownerDocument,ke,{start:q.start-Y.start,end:q.end-Y.start,editableElementIndex:q.editableElementIndex}),oe.length===0&&(ke=this.options.ownerDocument.createDocumentFragment(),ke.appendChild(V.cloneNode(!0)),oe=[ke.firstChild.firstChild,ke.firstChild.lastChild]),e.util.createLink(this.options.ownerDocument,oe,I.trim());var re=(ke.firstChild.innerHTML.match(/^\s+/)||[""])[0].length;e.util.insertHTMLCommand(this.options.ownerDocument,ke.firstChild.innerHTML.replace(/^\s+/,"")),q.start-=re,q.end-=re,this.importSelection(q)}else this.options.ownerDocument.execCommand("createLink",!1,I);this.options.targetBlank||$.target==="_blank"?e.util.setTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I):e.util.removeTargetBlank(e.selection.getSelectionStart(this.options.ownerDocument),I),$.buttonClass&&e.util.addClassToAnchors(e.selection.getSelectionStart(this.options.ownerDocument),$.buttonClass)}}if(this.options.targetBlank||$.target==="_blank"||$.buttonClass){L=this.options.ownerDocument.createEvent("HTMLEvents"),L.initEvent("input",!0,!0,this.options.contentWindow);for(var te=0,ge=this.elements.length;te1?r[1]:"";return{major:parseInt(i[0],10),minor:parseInt(i[1],10),revision:parseInt(i[2],10),preRelease:o,toString:function(){return[i[0],i[1],i[2]].join(".")+(o?"-"+o:"")}}},e.version=e.parseVersionString.call(this,"5.23.3"),e}())})(wX);var _S=wX.exports;/*! * vanilla-picker v2.12.3 * https://vanilla-picker.js.org * * Copyright 2017-2024 Andreas Borgen (https://github.com/Sphinxxxx), Adam Brooks (https://github.com/dissimulate) * Released under the ISC license. */var XN=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},ZN=function(){function t(e,n){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var hUe=function(){function t(e,n,r,i){XN(this,t);var o=this;function a(l){if(l.startsWith("hsl")){var u=l.match(/([\-\d\.e]+)/g).map(Number),c=IO(u,4),d=c[0],f=c[1],h=c[2],m=c[3];m===void 0&&(m=1),d/=360,f/=100,h/=100,o.hsla=[d,f,h,m]}else if(l.startsWith("rgb")){var g=l.match(/([\-\d\.e]+)/g).map(Number),y=IO(g,4),b=y[0],w=y[1],O=y[2],S=y[3];S===void 0&&(S=1),o.rgba=[b,w,O,S]}else l.startsWith("#")?o.rgba=t.hexToRgb(l):o.rgba=t.nameToRgb(l)||t.hexToRgb(l)}if(e!==void 0)if(Array.isArray(e))this.rgba=e;else if(r===void 0){var s=e&&""+e;s&&a(s.toLowerCase())}else this.rgba=[e,n,r,i===void 0?1:i]}return ZN(t,[{key:"printRGB",value:function(n){var r=n?this.rgba:this.rgba.slice(0,3),i=r.map(function(o,a){return hF(o,a===3?3:0)});return n?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function(n){var r=[360,100,100,1],i=["","%","%",""],o=n?this.hsla:this.hsla.slice(0,3),a=o.map(function(s,l){return hF(s*r[l],l===3?3:1)+i[l]});return n?"hsla("+a+")":"hsl("+a+")"}},{key:"printHex",value:function(n){var r=this.hex;return n?r:r.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(n){n.length===3&&(n[3]=1),this._rgba=n,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(n){n.length===3&&(n[3]=1),this._hsla=n,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){var n=this.rgba,r=n.map(function(i,o){return o<3?i.toString(16):Math.round(i*255).toString(16)});return"#"+r.map(function(i){return i.padStart(2,"0")}).join("")},set:function(n){this.rgba=t.hexToRgb(n)}}],[{key:"hexToRgb",value:function(n){var r=(n.startsWith("#")?n.slice(1):n).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!r.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+n);var i=r.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(o){return parseInt(o,16)});return i[3]=i[3]/255,i}},{key:"nameToRgb",value:function(n){var r=n.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=fUe[r];return i===void 0?i:t.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(n){var r=IO(n,4),i=r[0],o=r[1],a=r[2],s=r[3];i/=255,o/=255,a/=255;var l=Math.max(i,o,a),u=Math.min(i,o,a),c=void 0,d=void 0,f=(l+u)/2;if(l===u)c=d=0;else{var h=l-u;switch(d=f>.5?h/(2-l-u):h/(l+u),l){case i:c=(o-a)/h+(o1&&(w-=1),w<.16666666666666666?y+(b-y)*6*w:w<.5?b:w<.6666666666666666?y+(b-y)*(.6666666666666666-w)*6:y},f=a<.5?a*(1+o):a+o-a*o,h=2*a-f;l=d(h,f,i+1/3),u=d(h,f,i),c=d(h,f,i-1/3)}var m=[l*255,u*255,c*255].map(Math.round);return m[3]=s,m}}]),t}(),pUe=function(){function t(){XN(this,t),this._events=[]}return ZN(t,[{key:"add",value:function(n,r,i){n.addEventListener(r,i,!1),this._events.push({target:n,type:r,handler:i})}},{key:"remove",value:function(n,r,i){this._events=this._events.filter(function(o){var a=!0;return n&&n!==o.target&&(a=!1),r&&r!==o.type&&(a=!1),i&&i!==o.handler&&(a=!1),a&&t._doRemove(o.target,o.type,o.handler),!a})}},{key:"destroy",value:function(){this._events.forEach(function(n){return t._doRemove(n.target,n.type,n.handler)}),this._events=[]}}],[{key:"_doRemove",value:function(n,r,i){n.removeEventListener(r,i,!1)}}]),t}();function gUe(t){var e=document.createElement("div");return e.innerHTML=t,e.firstElementChild}function n2(t,e,n){var r=!1;function i(l,u,c){return Math.max(u,Math.min(l,c))}function o(l,u,c){if(c&&(r=!0),!!r){l.preventDefault();var d=e.getBoundingClientRect(),f=d.width,h=d.height,m=u.clientX,g=u.clientY,y=i(m-d.left,0,f),b=i(g-d.top,0,h);n(y/f,b/h)}}function a(l,u){var c=l.buttons===void 0?l.which:l.buttons;c===1?o(l,l,u):r=!1}function s(l,u){l.touches.length===1?o(l,l.touches[0],u):r=!1}t.add(e,"mousedown",function(l){a(l,!0)}),t.add(e,"touchstart",function(l){s(l,!0)}),t.add(window,"mousemove",a),t.add(e,"touchmove",s),t.add(window,"mouseup",function(l){r=!1}),t.add(e,"touchend",function(l){r=!1}),t.add(e,"touchcancel",function(l){r=!1})}var mUe=`linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em, linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em`,vUe=360,SX="keydown",BO="mousedown",r2="focusin";function xu(t,e){return(e||document).querySelector(t)}function xX(t){t.preventDefault(),t.stopPropagation()}function i2(t,e,n,r,i){t.add(e,SX,function(o){n.indexOf(o.key)>=0&&(i&&xX(o),r(o))})}var CX=function(){function t(e){XN(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new pUe,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return ZN(t,[{key:"setOptions",value:function(n){var r=this;if(!n)return;var i=this.settings;function o(u,c,d){for(var f in u)d&&d.indexOf(f)>=0||(c[f]=u[f])}if(n instanceof HTMLElement)i.parent=n;else{i.parent&&n.parent&&i.parent!==n.parent&&(this._events.remove(i.parent),this._popupInited=!1),o(n,i),n.onChange&&(this.onChange=n.onChange),n.onDone&&(this.onDone=n.onDone),n.onOpen&&(this.onOpen=n.onOpen),n.onClose&&(this.onClose=n.onClose);var a=n.color||n.colour;a&&this._setColor(a)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var l=function(c){return r.openHandler(c)};this._events.add(s,"click",l),i2(this._events,s,[" ","Spacebar","Enter"],l),this._popupInited=!0}else n.parent&&!i.popup&&this.show()}},{key:"openHandler",value:function(n){if(this.show()){n&&n.preventDefault(),this.settings.parent.style.pointerEvents="none";var r=n&&n.type===SX?this._domEdit:this.domElement;setTimeout(function(){return r.focus()},100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(n){var r=n&&n.type,i=!1;if(!n)i=!0;else if(r===BO||r===r2){var o=(this.__containedEvent||0)+100;n.timeStamp>o&&(i=!0)}else xX(n),i=!0;i&&this.hide()&&(this.settings.parent.style.pointerEvents="",r!==BO&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(n,r){this.closeHandler(),this.setOptions(n),r&&this.openHandler()}},{key:"setColor",value:function(n,r){this._setColor(n,{silent:r})}},{key:"_setColor",value:function(n,r){if(typeof n=="string"&&(n=n.trim()),!!n){r=r||{};var i=void 0;try{i=new hUe(n)}catch(a){if(r.failSilently)return;throw a}if(!this.settings.alpha){var o=i.hsla;o[3]=1,i.hsla=o}this.colour=this.color=i,this._setHSLA(null,null,null,null,r)}}},{key:"setColour",value:function(n,r){this.setColor(n,r)}},{key:"show",value:function(){var n=this.settings.parent;if(!n)return!1;if(this.domElement){var r=this._toggleDOM(!0);return this._setPosition(),r}var i=this.settings.template||'
',o=gUe(i);return this.domElement=o,this._domH=xu(".picker_hue",o),this._domSL=xu(".picker_sl",o),this._domA=xu(".picker_alpha",o),this._domEdit=xu(".picker_editor input",o),this._domSample=xu(".picker_sample",o),this._domOkay=xu(".picker_done button",o),this._domCancel=xu(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup(function(){return o.classList.add("popup")}),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var n=this,r=this,i=this.domElement,o=this._events;function a(u,c,d){o.add(u,c,d)}a(i,"click",function(u){return u.preventDefault()}),n2(o,this._domH,function(u,c){return r._setHSLA(u)}),n2(o,this._domSL,function(u,c){return r._setHSLA(null,u,1-c)}),this.settings.alpha&&n2(o,this._domA,function(u,c){return r._setHSLA(null,null,null,1-c)});var s=this._domEdit;a(s,"input",function(u){r._setColor(this.value,{fromEditor:!0,failSilently:!0})}),a(s,"focus",function(u){var c=this;c.selectionStart===c.selectionEnd&&c.select()}),this._ifPopup(function(){var u=function(f){return n.closeHandler(f)};a(window,BO,u),a(window,r2,u),i2(o,i,["Esc","Escape"],u);var c=function(f){n.__containedEvent=f.timeStamp};a(i,BO,c),a(i,r2,c),a(n._domCancel,"click",u)});var l=function(c){n._ifPopup(function(){return n.closeHandler(c)}),n.onDone&&n.onDone(n.colour)};a(this._domOkay,"click",l),i2(o,i,["Enter"],l)}},{key:"_setPosition",value:function(){var n=this.settings.parent,r=this.domElement;n!==r.parentNode&&n.appendChild(r),this._ifPopup(function(i){getComputedStyle(n).position==="static"&&(n.style.position="relative");var o=i===!0?"popup_right":"popup_"+i;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(a){a===o?r.classList.add(a):r.classList.remove(a)}),r.classList.add(o)})}},{key:"_setHSLA",value:function(n,r,i,o,a){a=a||{};var s=this.colour,l=s.hsla;[n,r,i,o].forEach(function(u,c){(u||u===0)&&(l[c]=u)}),s.hsla=l,this._updateUI(a),this.onChange&&!a.silent&&this.onChange(s)}},{key:"_updateUI",value:function(n){if(!this.domElement)return;n=n||{};var r=this.colour,i=r.hsla,o="hsl("+i[0]*vUe+", 100%, 50%)",a=r.hslString,s=r.hslaString,l=this._domH,u=this._domSL,c=this._domA,d=xu(".picker_selector",l),f=xu(".picker_selector",u),h=xu(".picker_selector",c);function m(C,E,T){E.style.left=T*100+"%"}function g(C,E,T){E.style.top=T*100+"%"}m(l,d,i[0]),this._domSL.style.backgroundColor=this._domH.style.color=o,m(u,f,i[1]),g(u,f,1-i[2]),u.style.color=a,g(c,h,1-i[3]);var y=a,b=y.replace("hsl","hsla").replace(")",", 0)"),w="linear-gradient("+[y,b]+")";if(this._domA.style.background=w+", "+mUe,!n.fromEditor){var O=this.settings.editorFormat,S=this.settings.alpha,x=void 0;switch(O){case"rgb":x=r.printRGB(S);break;case"hsl":x=r.printHSL(S);break;default:x=r.printHex(S)}this._domEdit.value=x}this._domSample.style.color=s}},{key:"_ifPopup",value:function(n,r){this.settings.parent&&this.settings.popup?n&&n(this.settings.popup):r&&r()}},{key:"_toggleDOM",value:function(n){var r=this.domElement;if(!r)return!1;var i=n?"":"none",o=r.style.display!==i;return o&&(r.style.display=i),o}}]),t}();{var o2=document.createElement("style");o2.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(o2),CX.StyleElement=o2}var GN={exports:{}};(function(t,e){(function(n,r){t.exports=n()})(function(){var n="object",r="function",i="undefined",o=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],a=["setStart","setStartBefore","setStartAfter","setEnd","setEndBefore","setEndAfter","collapse","selectNode","selectNodeContents","compareBoundaryPoints","deleteContents","extractContents","cloneContents","insertNode","surroundContents","cloneRange","toString","detach"],s=["boundingHeight","boundingLeft","boundingTop","boundingWidth","htmlText","text"],l=["collapse","compareEndPoints","duplicate","moveToElementText","parentElement","select","setEndPoint","getBoundingClientRect"];function u(Y,re){var te=typeof Y[re];return te==r||!!(te==n&&Y[re])||te=="unknown"}function c(Y,re){return!!(typeof Y[re]==n&&Y[re])}function d(Y,re){return typeof Y[re]!=i}function f(Y){return function(re,te){for(var ge=te.length;ge--;)if(!Y(re,te[ge]))return!1;return!0}}var h=f(u),m=f(c),g=f(d);function y(Y){return Y&&h(Y,l)&&g(Y,s)}function b(Y){return c(Y,"body")?Y.body:Y.getElementsByTagName("body")[0]}var w=[].forEach?function(Y,re){Y.forEach(re)}:function(Y,re){for(var te=0,ge=Y.length;teRt?(dr.node=fn,dr.offset-=Rt):dr.node==Ze.parentNode&&dr.offset>ae(Ze)&&++dr.offset;return fn}function Be(Ze){if(Ze.nodeType==9)return Ze;if(typeof Ze.ownerDocument!=te)return Ze.ownerDocument;if(typeof Ze.document!=te)return Ze.document;if(Ze.parentNode)return Be(Ze.parentNode);throw re.createError("getDocument: no document found for node")}function Xe(Ze){var Rt=Be(Ze);if(typeof Rt.defaultView!=te)return Rt.defaultView;if(typeof Rt.parentWindow!=te)return Rt.parentWindow;throw re.createError("Cannot get a window object for node")}function Ke(Ze){if(typeof Ze.contentDocument!=te)return Ze.contentDocument;if(typeof Ze.contentWindow!=te)return Ze.contentWindow.document;throw re.createError("getIframeDocument: No Document object found for iframe element")}function tt(Ze){if(typeof Ze.contentWindow!=te)return Ze.contentWindow;if(typeof Ze.contentDocument!=te)return Ze.contentDocument.defaultView;throw re.createError("getIframeWindow: No Window object found for iframe element")}function Dt(Ze){return Ze&&ge.isHostMethod(Ze,"setTimeout")&&ge.isHostObject(Ze,"document")}function jt(Ze,Rt,xn){var fn;if(Ze?ge.isHostProperty(Ze,"nodeType")?fn=Ze.nodeType==1&&Ze.tagName.toLowerCase()=="iframe"?Ke(Ze):Be(Ze):Dt(Ze)&&(fn=Ze.document):fn=document,!fn)throw Rt.createError(xn+"(): Parameter must be a Window object or DOM node");return fn}function Me(Ze){for(var Rt;Rt=Ze.parentNode;)Ze=Rt;return Ze}function nt(Ze,Rt,xn,fn){var Er,dr,eo,Pi,Oi;if(Ze==xn)return Rt===fn?0:Rt",de=Pe(Rt),Y.features.crashyTextNodes=de})();function Le(Ze){if(!Ze)return"[No node]";if(de&&Pe(Ze))return"[Broken node]";if(Ce(Ze))return'"'+Ze.data+'"';if(Ze.nodeType==1){var Rt=Ze.id?' id="'+Ze.id+'"':"";return"<"+Ze.nodeName+Rt+">[index:"+ae(Ze)+",length:"+Ze.childNodes.length+"]["+(Ze.innerHTML||"[innerHTML not supported]").slice(0,25)+"]"}return Ze.nodeName}function wt(Ze){for(var Rt=Be(Ze).createDocumentFragment(),xn;xn=Ze.firstChild;)Rt.appendChild(xn);return Rt}var tn;typeof window.getComputedStyle!=te?tn=function(Ze,Rt){return Xe(Ze).getComputedStyle(Ze,null)[Rt]}:typeof document.documentElement.currentStyle!=te?tn=function(Ze,Rt){return Ze.currentStyle?Ze.currentStyle[Rt]:""}:re.fail("No means of obtaining computed style properties found");function De(Ze,Rt,xn){var fn=Re(Ze),Er=Ze.createElement("div");Er.contentEditable=""+!!xn,Rt&&(Er.innerHTML=Rt);var dr=fn.firstChild;return dr?fn.insertBefore(Er,dr):fn.appendChild(Er),Er}function xt(Ze){return Ze.parentNode.removeChild(Ze)}function qt(Ze){this.root=Ze,this._next=Ze}qt.prototype={_current:null,hasNext:function(){return!!this._next},next:function(){var Ze=this._current=this._next,Rt,xn;if(this._current)if(Rt=Ze.firstChild,Rt)this._next=Rt;else{for(xn=null;Ze!==this.root&&!(xn=Ze.nextSibling);)Ze=Ze.parentNode;this._next=xn}return this._current},detach:function(){this._current=this._next=this.root=null}};function ln(Ze){return new qt(Ze)}function nn(Ze,Rt){this.node=Ze,this.offset=Rt}nn.prototype={equals:function(Ze){return!!Ze&&this.node===Ze.node&&this.offset==Ze.offset},inspect:function(){return"[DomPosition("+Le(this.node)+":"+this.offset+")]"},toString:function(){return this.inspect()}};function bn(Ze){this.code=this[Ze],this.codeName=Ze,this.message="DOMException: "+this.codeName}bn.prototype={INDEX_SIZE_ERR:1,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INVALID_STATE_ERR:11,INVALID_NODE_TYPE_ERR:24},bn.prototype.toString=function(){return this.message},Y.dom={arrayContains:ce,isHtmlNamespace:Te,parentElement:Ie,getNodeIndex:ae,getNodeLength:me,getCommonAncestor:Ae,isAncestorOf:X,isOrIsAncestorOf:ee,getClosestAncestorIn:le,isCharacterDataNode:Ce,isTextOrCommentNode:fe,insertAfter:Ee,splitDataNode:be,getDocument:Be,getWindow:Xe,getIframeWindow:tt,getIframeDocument:Ke,getBody:Re,isWindow:Dt,getContentDocument:jt,getRootContainer:Me,comparePoints:nt,isBrokenNode:Pe,inspectNode:Le,getComputedStyleProperty:tn,createTestElement:De,removeNode:xt,fragmentFromNodeChildren:wt,createIterator:ln,DomPosition:nn},Y.DOMException=bn}),C.createCoreModule("DomRange",["DomUtil"],function(Y,re){var te=Y.dom,ge=Y.util,Re=te.DomPosition,$e=Y.DOMException,Z=te.isCharacterDataNode,ce=te.getNodeIndex,Te=te.isOrIsAncestorOf,Ie=te.getDocument,ae=te.comparePoints,me=te.splitDataNode,Ae=te.getClosestAncestorIn,X=te.getNodeLength,ee=te.arrayContains,le=te.getRootContainer,Ce=Y.features.crashyTextNodes,fe=te.removeNode;function Ee(ve,We){return ve.nodeType!=3&&(Te(ve,We.startContainer)||Te(ve,We.endContainer))}function be(ve){return ve.document||Ie(ve.startContainer)}function Be(ve){return le(ve.startContainer)}function Xe(ve){return new Re(ve.parentNode,ce(ve))}function Ke(ve){return new Re(ve.parentNode,ce(ve)+1)}function tt(ve,We,_t){var Lt=ve.nodeType==11?ve.firstChild:ve;return Z(We)?_t==We.length?te.insertAfter(ve,We):We.parentNode.insertBefore(ve,_t==0?We:me(We,_t)):_t>=We.childNodes.length?We.appendChild(ve):We.insertBefore(ve,We.childNodes[_t]),Lt}function Dt(ve,We,_t){if(_r(ve),_r(We),be(We)!=be(ve))throw new $e("WRONG_DOCUMENT_ERR");var Lt=ae(ve.startContainer,ve.startOffset,We.endContainer,We.endOffset),mn=ae(ve.endContainer,ve.endOffset,We.startContainer,We.startOffset);return _t?Lt<=0&&mn>=0:Lt<0&&mn>0}function jt(ve){for(var We,_t,Lt=be(ve.range).createDocumentFragment(),mn;_t=ve.next();){if(We=ve.isPartiallySelectedSubtree(),_t=_t.cloneNode(!We),We&&(mn=ve.getSubtreeIterator(),_t.appendChild(jt(mn)),mn.detach()),_t.nodeType==10)throw new $e("HIERARCHY_REQUEST_ERR");Lt.appendChild(_t)}return Lt}function Me(ve,We,_t){var Lt,mn;_t=_t||{stop:!1};for(var ir,Tt;ir=ve.next();)if(ve.isPartiallySelectedSubtree()){if(We(ir)===!1){_t.stop=!0;return}else if(Tt=ve.getSubtreeIterator(),Me(Tt,We,_t),Tt.detach(),_t.stop)return}else for(Lt=te.createIterator(ir);mn=Lt.next();)if(We(mn)===!1){_t.stop=!0;return}}function nt(ve){for(var We;ve.next();)ve.isPartiallySelectedSubtree()?(We=ve.getSubtreeIterator(),nt(We),We.detach()):ve.remove()}function de(ve){for(var We,_t=be(ve.range).createDocumentFragment(),Lt;We=ve.next();){if(ve.isPartiallySelectedSubtree()?(We=We.cloneNode(!1),Lt=ve.getSubtreeIterator(),We.appendChild(de(Lt)),Lt.detach()):ve.remove(),We.nodeType==10)throw new $e("HIERARCHY_REQUEST_ERR");_t.appendChild(We)}return _t}function Pe(ve,We,_t){var Lt=!!(We&&We.length),mn,ir=!!_t;Lt&&(mn=new RegExp("^("+We.join("|")+")$"));var Tt=[];return Me(new wt(ve,!1),function(on){if(!(Lt&&!mn.test(on.nodeType))&&!(ir&&!_t(on))){var wn=ve.startContainer;if(!(on==wn&&Z(wn)&&ve.startOffset==wn.length)){var Zn=ve.endContainer;on==Zn&&Z(Zn)&&ve.endOffset==0||Tt.push(on)}}}),Tt}function Le(ve){var We=typeof ve.getName=="undefined"?"Range":ve.getName();return"["+We+"("+te.inspectNode(ve.startContainer)+":"+ve.startOffset+", "+te.inspectNode(ve.endContainer)+":"+ve.endOffset+")]"}function wt(ve,We){if(this.range=ve,this.clonePartiallySelectedTextNodes=We,!ve.collapsed){this.sc=ve.startContainer,this.so=ve.startOffset,this.ec=ve.endContainer,this.eo=ve.endOffset;var _t=ve.commonAncestorContainer;this.sc===this.ec&&Z(this.sc)?(this.isSingleCharacterDataNode=!0,this._first=this._last=this._next=this.sc):(this._first=this._next=this.sc===_t&&!Z(this.sc)?this.sc.childNodes[this.so]:Ae(this.sc,_t,!0),this._last=this.ec===_t&&!Z(this.ec)?this.ec.childNodes[this.eo-1]:Ae(this.ec,_t,!0))}}wt.prototype={_current:null,_next:null,_first:null,_last:null,isSingleCharacterDataNode:!1,reset:function(){this._current=null,this._next=this._first},hasNext:function(){return!!this._next},next:function(){var ve=this._current=this._next;return ve&&(this._next=ve!==this._last?ve.nextSibling:null,Z(ve)&&this.clonePartiallySelectedTextNodes&&(ve===this.ec&&(ve=ve.cloneNode(!0)).deleteData(this.eo,ve.length-this.eo),this._current===this.sc&&(ve=ve.cloneNode(!0)).deleteData(0,this.so))),ve},remove:function(){var ve=this._current,We,_t;Z(ve)&&(ve===this.sc||ve===this.ec)?(We=ve===this.sc?this.so:0,_t=ve===this.ec?this.eo:ve.length,We!=_t&&ve.deleteData(We,_t-We)):ve.parentNode&&fe(ve)},isPartiallySelectedSubtree:function(){var ve=this._current;return Ee(ve,this.range)},getSubtreeIterator:function(){var ve;if(this.isSingleCharacterDataNode)ve=this.range.cloneRange(),ve.collapse(!1);else{ve=new Ti(be(this.range));var We=this._current,_t=We,Lt=0,mn=We,ir=X(We);Te(We,this.sc)&&(_t=this.sc,Lt=this.so),Te(We,this.ec)&&(mn=this.ec,ir=this.eo),gr(ve,_t,Lt,mn,ir)}return new wt(ve,this.clonePartiallySelectedTextNodes)},detach:function(){this.range=this._current=this._next=this._first=this._last=this.sc=this.so=this.ec=this.eo=null}};var tn=[1,3,4,5,7,8,10],De=[2,9,11],xt=[5,6,10,12],qt=[1,3,4,5,7,8,10,11],ln=[1,3,4,5,7,8];function nn(ve){return function(We,_t){for(var Lt,mn=_t?We:We.parentNode;mn;){if(Lt=mn.nodeType,ee(ve,Lt))return mn;mn=mn.parentNode}return null}}var bn=nn([9,11]),Ze=nn(xt),Rt=nn([6,10,12]),xn=nn([1]);function fn(ve,We){if(Rt(ve,We))throw new $e("INVALID_NODE_TYPE_ERR")}function Er(ve,We){if(!ee(We,ve.nodeType))throw new $e("INVALID_NODE_TYPE_ERR")}function dr(ve,We){if(We<0||We>(Z(ve)?ve.length:ve.childNodes.length))throw new $e("INDEX_SIZE_ERR")}function eo(ve,We){if(bn(ve,!0)!==bn(We,!0))throw new $e("WRONG_DOCUMENT_ERR")}function Pi(ve){if(Ze(ve,!0))throw new $e("NO_MODIFICATION_ALLOWED_ERR")}function Oi(ve,We){if(!ve)throw new $e(We)}function Ml(ve,We){return We<=(Z(ve)?ve.length:ve.childNodes.length)}function cs(ve){return!!ve.startContainer&&!!ve.endContainer&&!(Ce&&(te.isBrokenNode(ve.startContainer)||te.isBrokenNode(ve.endContainer)))&&le(ve.startContainer)==le(ve.endContainer)&&Ml(ve.startContainer,ve.startOffset)&&Ml(ve.endContainer,ve.endOffset)}function _r(ve){if(!cs(ve))throw new Error("Range error: Range is not valid. This usually happens after DOM mutation. Range: ("+ve.inspect()+")")}var Rl=document.createElement("style"),et=!1;try{Rl.innerHTML="x",et=Rl.firstChild.nodeType==3}catch{}Y.features.htmlParsingConforms=et;var Mt=et?function(ve){var We=this.startContainer,_t=Ie(We);if(!We)throw new $e("INVALID_STATE_ERR");var Lt=null;return We.nodeType==1?Lt=We:Z(We)&&(Lt=te.parentElement(We)),Lt===null||Lt.nodeName=="HTML"&&te.isHtmlNamespace(Ie(Lt).documentElement)&&te.isHtmlNamespace(Lt)?Lt=_t.createElement("body"):Lt=Lt.cloneNode(!1),Lt.innerHTML=ve,te.fragmentFromNodeChildren(Lt)}:function(ve){var We=be(this),_t=We.createElement("body");return _t.innerHTML=ve,te.fragmentFromNodeChildren(_t)};function Vn(ve,We){_r(ve);var _t=ve.startContainer,Lt=ve.startOffset,mn=ve.endContainer,ir=ve.endOffset,Tt=_t===mn;Z(mn)&&ir>0&&ir0&&Lt<_t.length&&(_t=me(_t,Lt,We),Tt?(ir-=Lt,mn=_t):mn==_t.parentNode&&ir>=ce(_t)&&ir++,Lt=0),ve.setStartAndEnd(_t,Lt,mn,ir)}function zt(ve){_r(ve);var We=ve.commonAncestorContainer.parentNode.cloneNode(!1);return We.appendChild(ve.cloneContents()),We.innerHTML}var Li=["startContainer","startOffset","endContainer","endOffset","collapsed","commonAncestorContainer"],Eo=0,Wo=1,po=2,Ei=3,Uo=0,ot=1,Nt=2,rn=3;ge.extend(Y.rangePrototype,{compareBoundaryPoints:function(ve,We){_r(this),eo(this.startContainer,We.startContainer);var _t,Lt,mn,ir,Tt=ve==Ei||ve==Eo?"start":"end",on=ve==Wo||ve==Eo?"start":"end";return _t=this[Tt+"Container"],Lt=this[Tt+"Offset"],mn=We[on+"Container"],ir=We[on+"Offset"],ae(_t,Lt,mn,ir)},insertNode:function(ve){if(_r(this),Er(ve,qt),Pi(this.startContainer),Te(ve,this.startContainer))throw new $e("HIERARCHY_REQUEST_ERR");var We=tt(ve,this.startContainer,this.startOffset);this.setStartBefore(We)},cloneContents:function(){_r(this);var ve,We;if(this.collapsed)return be(this).createDocumentFragment();if(this.startContainer===this.endContainer&&Z(this.startContainer))return ve=this.startContainer.cloneNode(!0),ve.data=ve.data.slice(this.startOffset,this.endOffset),We=be(this).createDocumentFragment(),We.appendChild(ve),We;var _t=new wt(this,!0);return ve=jt(_t),_t.detach(),ve},canSurroundContents:function(){_r(this),Pi(this.startContainer),Pi(this.endContainer);var ve=new wt(this,!0),We=ve._first&&Ee(ve._first,this)||ve._last&&Ee(ve._last,this);return ve.detach(),!We},surroundContents:function(ve){if(Er(ve,ln),!this.canSurroundContents())throw new $e("INVALID_STATE_ERR");var We=this.extractContents();if(ve.hasChildNodes())for(;ve.lastChild;)ve.removeChild(ve.lastChild);tt(ve,this.startContainer,this.startOffset),ve.appendChild(We),this.selectNode(ve)},cloneRange:function(){_r(this);for(var ve=new Ti(be(this)),We=Li.length,_t;We--;)_t=Li[We],ve[_t]=this[_t];return ve},toString:function(){_r(this);var ve=this.startContainer;if(ve===this.endContainer&&Z(ve))return ve.nodeType==3||ve.nodeType==4?ve.data.slice(this.startOffset,this.endOffset):"";var We=[],_t=new wt(this,!0);return Me(_t,function(Lt){(Lt.nodeType==3||Lt.nodeType==4)&&We.push(Lt.data)}),_t.detach(),We.join("")},compareNode:function(ve){_r(this);var We=ve.parentNode,_t=ce(ve);if(!We)throw new $e("NOT_FOUND_ERR");var Lt=this.comparePoint(We,_t),mn=this.comparePoint(We,_t+1);return Lt<0?mn>0?Nt:Uo:mn>0?ot:rn},comparePoint:function(ve,We){return _r(this),Oi(ve,"HIERARCHY_REQUEST_ERR"),eo(ve,this.startContainer),ae(ve,We,this.startContainer,this.startOffset)<0?-1:ae(ve,We,this.endContainer,this.endOffset)>0?1:0},createContextualFragment:Mt,toHtml:function(){return zt(this)},intersectsNode:function(ve,We){if(_r(this),le(ve)!=Be(this))return!1;var _t=ve.parentNode,Lt=ce(ve);if(!_t)return!0;var mn=ae(_t,Lt,this.endContainer,this.endOffset),ir=ae(_t,Lt+1,this.startContainer,this.startOffset);return We?mn<=0&&ir>=0:mn<0&&ir>0},isPointInRange:function(ve,We){return _r(this),Oi(ve,"HIERARCHY_REQUEST_ERR"),eo(ve,this.startContainer),ae(ve,We,this.startContainer,this.startOffset)>=0&&ae(ve,We,this.endContainer,this.endOffset)<=0},intersectsRange:function(ve){return Dt(this,ve,!1)},intersectsOrTouchesRange:function(ve){return Dt(this,ve,!0)},intersection:function(ve){if(this.intersectsRange(ve)){var We=ae(this.startContainer,this.startOffset,ve.startContainer,ve.startOffset),_t=ae(this.endContainer,this.endOffset,ve.endContainer,ve.endOffset),Lt=this.cloneRange();return We==-1&&Lt.setStart(ve.startContainer,ve.startOffset),_t==1&&Lt.setEnd(ve.endContainer,ve.endOffset),Lt}return null},union:function(ve){if(this.intersectsOrTouchesRange(ve)){var We=this.cloneRange();return ae(ve.startContainer,ve.startOffset,this.startContainer,this.startOffset)==-1&&We.setStart(ve.startContainer,ve.startOffset),ae(ve.endContainer,ve.endOffset,this.endContainer,this.endOffset)==1&&We.setEnd(ve.endContainer,ve.endOffset),We}else throw new $e("Ranges do not intersect")},containsNode:function(ve,We){return We?this.intersectsNode(ve,!1):this.compareNode(ve)==rn},containsNodeContents:function(ve){return this.comparePoint(ve,0)>=0&&this.comparePoint(ve,X(ve))<=0},containsRange:function(ve){var We=this.intersection(ve);return We!==null&&ve.equals(We)},containsNodeText:function(ve){var We=this.cloneRange();We.selectNode(ve);var _t=We.getNodes([3]);if(_t.length>0){We.setStart(_t[0],0);var Lt=_t.pop();return We.setEnd(Lt,Lt.length),this.containsRange(We)}else return this.containsNodeContents(ve)},getNodes:function(ve,We){return _r(this),Pe(this,ve,We)},getDocument:function(){return be(this)},collapseBefore:function(ve){this.setEndBefore(ve),this.collapse(!1)},collapseAfter:function(ve){this.setStartAfter(ve),this.collapse(!0)},getBookmark:function(ve){var We=be(this),_t=Y.createRange(We);ve=ve||te.getBody(We),_t.selectNodeContents(ve);var Lt=this.intersection(_t),mn=0,ir=0;return Lt&&(_t.setEnd(Lt.startContainer,Lt.startOffset),mn=_t.toString().length,ir=mn+Lt.toString().length),{start:mn,end:ir,containerNode:ve}},moveToBookmark:function(ve){var We=ve.containerNode,_t=0;this.setStart(We,0),this.collapse(!0);for(var Lt=[We],mn,ir=!1,Tt=!1,on,wn,Zn;!Tt&&(mn=Lt.pop());)if(mn.nodeType==3)on=_t+mn.length,!ir&&ve.start>=_t&&ve.start<=on&&(this.setStart(mn,ve.start-_t),ir=!0),ir&&ve.end>=_t&&ve.end<=on&&(this.setEnd(mn,ve.end-_t),Tt=!0),_t=on;else for(Zn=mn.childNodes,wn=Zn.length;wn--;)Lt.push(Zn[wn])},getName:function(){return"DomRange"},equals:function(ve){return Ti.rangesEqual(this,ve)},isValid:function(){return cs(this)},inspect:function(){return Le(this)},detach:function(){}});function se(ve){ve.START_TO_START=Eo,ve.START_TO_END=Wo,ve.END_TO_END=po,ve.END_TO_START=Ei,ve.NODE_BEFORE=Uo,ve.NODE_AFTER=ot,ve.NODE_BEFORE_AND_AFTER=Nt,ve.NODE_INSIDE=rn}function ze(ve){se(ve),se(ve.prototype)}function pt(ve,We){return function(){_r(this);var _t=this.startContainer,Lt=this.startOffset,mn=this.commonAncestorContainer,ir=new wt(this,!0),Tt,on;_t!==mn&&(Tt=Ae(_t,mn,!0),on=Ke(Tt),_t=on.node,Lt=on.offset),Me(ir,Pi),ir.reset();var wn=ve(ir);return ir.detach(),We(this,_t,Lt,_t,Lt),wn}}function Yt(ve,We){function _t(Tt,on){return function(wn){Er(wn,tn),Er(le(wn),De);var Zn=(Tt?Xe:Ke)(wn);(on?Lt:mn)(this,Zn.node,Zn.offset)}}function Lt(Tt,on,wn){var Zn=Tt.endContainer,Yi=Tt.endOffset;(on!==Tt.startContainer||wn!==Tt.startOffset)&&((le(on)!=le(Zn)||ae(on,wn,Zn,Yi)==1)&&(Zn=on,Yi=wn),We(Tt,on,wn,Zn,Yi))}function mn(Tt,on,wn){var Zn=Tt.startContainer,Yi=Tt.startOffset;(on!==Tt.endContainer||wn!==Tt.endOffset)&&((le(on)!=le(Zn)||ae(on,wn,Zn,Yi)==-1)&&(Zn=on,Yi=wn),We(Tt,Zn,Yi,on,wn))}var ir=function(){};ir.prototype=Y.rangePrototype,ve.prototype=new ir,ge.extend(ve.prototype,{setStart:function(Tt,on){fn(Tt,!0),dr(Tt,on),Lt(this,Tt,on)},setEnd:function(Tt,on){fn(Tt,!0),dr(Tt,on),mn(this,Tt,on)},setStartAndEnd:function(){var Tt=arguments,on=Tt[0],wn=Tt[1],Zn=on,Yi=wn;switch(Tt.length){case 3:Yi=Tt[2];break;case 4:Zn=Tt[2],Yi=Tt[3];break}fn(on,!0),dr(on,wn),fn(Zn,!0),dr(Zn,Yi),We(this,on,wn,Zn,Yi)},setBoundary:function(Tt,on,wn){this["set"+(wn?"Start":"End")](Tt,on)},setStartBefore:_t(!0,!0),setStartAfter:_t(!1,!0),setEndBefore:_t(!0,!1),setEndAfter:_t(!1,!1),collapse:function(Tt){_r(this),Tt?We(this,this.startContainer,this.startOffset,this.startContainer,this.startOffset):We(this,this.endContainer,this.endOffset,this.endContainer,this.endOffset)},selectNodeContents:function(Tt){fn(Tt,!0),We(this,Tt,0,Tt,X(Tt))},selectNode:function(Tt){fn(Tt,!1),Er(Tt,tn);var on=Xe(Tt),wn=Ke(Tt);We(this,on.node,on.offset,wn.node,wn.offset)},extractContents:pt(de,We),deleteContents:pt(nt,We),canSurroundContents:function(){_r(this),Pi(this.startContainer),Pi(this.endContainer);var Tt=new wt(this,!0),on=Tt._first&&Ee(Tt._first,this)||Tt._last&&Ee(Tt._last,this);return Tt.detach(),!on},splitBoundaries:function(){Vn(this)},splitBoundariesPreservingPositions:function(Tt){Vn(this,Tt)},normalizeBoundaries:function(){_r(this);var Tt=this.startContainer,on=this.startOffset,wn=this.endContainer,Zn=this.endOffset,Yi=function(qo){var ds=qo.nextSibling;ds&&ds.nodeType==qo.nodeType&&(wn=qo,Zn=qo.length,qo.appendData(ds.data),fe(ds))},fv=function(qo){var ds=qo.previousSibling;if(ds&&ds.nodeType==qo.nodeType){Tt=qo;var pv=qo.length;if(on=ds.length,qo.insertData(0,ds.data),fe(ds),Tt==wn)Zn+=on,wn=Tt;else if(wn==qo.parentNode){var Tp=ce(qo);Zn==Tp?(wn=qo,Zn=pv):Zn>Tp&&Zn--}}},hv=!0,da;if(Z(wn))Zn==wn.length?Yi(wn):Zn==0&&(da=wn.previousSibling,da&&da.nodeType==wn.nodeType&&(Zn=da.length,Tt==wn&&(hv=!1),da.appendData(wn.data),fe(wn),wn=da));else{if(Zn>0){var Ep=wn.childNodes[Zn-1];Ep&&Z(Ep)&&Yi(Ep)}hv=!this.collapsed}if(hv){if(Z(Tt))on==0?fv(Tt):on==Tt.length&&(da=Tt.nextSibling,da&&da.nodeType==Tt.nodeType&&(wn==da&&(wn=Tt,Zn+=Tt.length),Tt.appendData(da.data),fe(da)));else if(on1,Yt=[],Rn=Ke(se),gr=0;gr=36)De=!1;else{var Lt=We.cloneRange();We.setStart(ve,0),Lt.setEnd(ve,3),Lt.setStart(ve,2),se.addRange(We),se.addRange(Lt),De=se.rangeCount==2}}for(Re.removeNode(Ti),se.removeAllRanges(),gr=0;gr1)Li(this,se);else{this.removeAllRanges();for(var ze=0,pt=se.length;ze1?Li(this,se):ze&&this.addRange(se[0])};else return re.fail("No means of selecting a Range or TextRange was found"),!1;zt.getRangeAt=function(se){if(se<0||se>=this.rangeCount)throw new Ie("INDEX_SIZE_ERR");return this._ranges[se].cloneRange()};var Wo;if(jt)Wo=function(se){var ze;Y.isSelectionValid(se.win)?ze=se.docSelection.createRange():(ze=Ce(se.win.document).createTextRange(),ze.collapse(!0)),se.docSelection.type==ee?Oi(se):eo(ze)?Pi(se,ze):Rt(se)};else if(Z(Me,"getRangeAt")&&typeof Me.rangeCount==ge)Wo=function(se){if(ln&&Dt&&se.docSelection.type==ee)Oi(se);else if(se._ranges.length=se.rangeCount=se.nativeSelection.rangeCount,se.rangeCount){for(var ze=0,pt=se.rangeCount;ze(Re.isCharacterDataNode(se)?se.length:se.childNodes.length))throw new Ie("INDEX_SIZE_ERR")}zt.collapse=function(se,ze){Uo(this,se);var pt=Y.createRange(se);pt.collapseToPoint(se,ze),this.setSingleRange(pt),this.isCollapsed=!0},zt.collapseToStart=function(){if(this.rangeCount){var se=this._ranges[0];this.collapse(se.startContainer,se.startOffset)}else throw new Ie("INVALID_STATE_ERR")},zt.collapseToEnd=function(){if(this.rangeCount){var se=this._ranges[this.rangeCount-1];this.collapse(se.endContainer,se.endOffset)}else throw new Ie("INVALID_STATE_ERR")},zt.selectAllChildren=function(se){Uo(this,se);var ze=Y.createRange(se);ze.selectNodeContents(se),this.setSingleRange(ze)},wt?zt.setBaseAndExtent=function(se,ze,pt,Yt){this.nativeSelection.setBaseAndExtent(se,ze,pt,Yt),this.refresh()}:Le&&(zt.setBaseAndExtent=function(se,ze,pt,Yt){ot(se,ze),ot(pt,Yt),Uo(this,se),Uo(this,pt);var Rn=Y.createRange(node),gr=Re.comparePoints(se,ze,pt,Yt)==-1;gr?Rn.setStartAndEnd(pt,Yt,se,ze):Rn.setStartAndEnd(se,ze,pt,Yt),this.setSingleRange(Rn,gr)}),zt.deleteFromDocument=function(){if(ln&&Dt&&this.docSelection.type==ee){for(var se=this.docSelection.createRange(),ze;se.length;)ze=se.item(0),se.remove(ze),Re.removeNode(ze);this.refresh()}else if(this.rangeCount){var pt=this.getAllRanges();if(pt.length){this.removeAllRanges();for(var Yt=0,Rn=pt.length;Yt0)return Y.WrappedTextRange.rangeToTextRange(this.getRangeAt(0));throw re.createError("getNativeTextRange: selection contains no range")}});function rn(se){var ze=[],pt=new ae(se.anchorNode,se.anchorOffset),Yt=new ae(se.focusNode,se.focusOffset),Rn=typeof se.getName=="function"?se.getName():"Selection";if(typeof se.rangeCount!="undefined")for(var gr=0,Ti=se.rangeCount;grfe&&++Xe,Ee==ee&&(be==le||be==le+1)&&(Be=Ce,Xe+=fe-le),Ee==ee&&be>le+1&&--Xe,X.node=Be,X.offset=Xe}function P(X,ee,le){X.node==ee&&X.offset>le&&--X.offset}function A(X,ee,le,Ce){le==-1&&(le=ee.childNodes.length);var fe=X.parentNode,Ee=o.getNodeIndex(X);u(Ce,function(be){T(be,fe,Ee,ee,le)}),ee.childNodes.length==le?ee.appendChild(X):ee.insertBefore(X,ee.childNodes[le])}function D(X,ee){var le=X.parentNode,Ce=o.getNodeIndex(X);u(ee,function(fe){P(fe,le,Ce)}),o.removeNode(X)}function N(X,ee,le,Ce,fe){for(var Ee,be=[];Ee=X.firstChild;)A(Ee,ee,le++,fe),be.push(Ee);return Ce&&D(X,fe),be}function $(X,ee){return N(X,X.parentNode,o.getNodeIndex(X),!0,ee)}function W(X,ee){var le=X.cloneRange();le.selectNodeContents(ee);var Ce=le.intersection(X),fe=Ce?Ce.toString():"";return fe!=""}function L(X){for(var ee=X.getNodes([3]),le=0,Ce;(Ce=ee[le])&&!W(X,Ce);)++le;for(var fe=ee.length-1;(Ce=ee[fe])&&!W(X,Ce);)--fe;return ee.slice(le,fe+1)}function I(X,ee){if(X.attributes.length!=ee.attributes.length)return!1;for(var le=0,Ce=X.attributes.length,fe,Ee,be;le0&&ee1){var Ce=o.getNodeIndex(le),fe=[],Ee=0,be;u(ee,function(Be,Xe){be=Be.parentNode,Xe>0&&(be.removeChild(Be),be.hasChildNodes()||o.removeNode(be),X&&u(X,function(Ke){Ke.node==Be&&(Ke.node=le,Ke.offset+=Ee),Ke.node==be&&Ke.offset>Ce&&(--Ke.offset,Ke.offset==Ce+1&&XeColor",aria:"Color Picker",action:"colorPicker",init:function(){var t=this;pF.init(),_S.extensions.button.prototype.init.call(this),this.colorPicker=new CX({parent:this.button,color:"#000",onDone:function(e){t.coloredText&&t.coloredText.isAppliedToSelection()&&t.coloredText.undoToSelection(),t.coloredText=pF.createClassApplier("colored",{elementTagName:"span",elementProperties:{style:{color:e.hex}},normalize:!0}),t.coloredText.toggleSelection(),t.base.checkContentChanged(),t.setInactive()}})},getButton:function(){return this.button},handleClick:function(){this.setActive(),this.colorPicker.show()},isAlreadyApplied:function(t){return t.nodeName.toLowerCase()==="mark"},isActive:function(){return this.button.classList.contains("medium-editor-button-active")},setInactive:function(){this.button.classList.remove("medium-editor-button-active")},setActive:function(){this.button.classList.add("medium-editor-button-active")}}),bUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),_Ue=globalThis&&globalThis.__decorate||function(t,e,n,r){var i=arguments.length,o=i<3?e:r===null?r=Object.getOwnPropertyDescriptor(e,n):r,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(a=t[s])&&(o=(i<3?a(o):i>3?a(e,n,o):a(e,n))||o);return i>3&&o&&Object.defineProperty(e,n,o),o},vF=globalThis&&globalThis.__read||function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var r=n.call(t),i,o=[],a;try{for(;(e===void 0||e-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},yF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0?this.editor.addElements(".lf-label-editor"):((n=this.editor)===null||n===void 0||n.destroy(),this.editor=new _S(".lf-label-editor",Jh(gF,{autoLink:!0,extensions:{colorPicker:new mF}})))},e.prototype.componentWillUnmount=function(){var n;(n=this.editor)===null||n===void 0||n.destroy()},e.prototype.getLabels=function(){var n=this,r=this.props,i=r.lf.extension,o=r.graphModel,a=yF(yF([],vF(o.nodes),!1),vF(o.edges),!1),s=i.label;if(s){var l=[];return jn(a,function(u){var c,d,f=u.getData(),h=(d=(c=f.properties)===null||c===void 0?void 0:c._label)!==null&&d!==void 0?d:[];jn(h,function(m){var g=n.labelMap,y=new dUe(m,u,o);g.set(y.id,y),l.push(rt(uUe,{label:y,element:u,graphModel:o},y.id))})}),l}return null},e.prototype.render=function(){return rt("foreignObject",{id:"lf-label-overlay",class:"lf-label-overlay",children:this.getLabels()})},e.toolName="label-edit-tool",e=_Ue([Ea],e),e})(ur);var bF=globalThis&&globalThis.__assign||function(){return bF=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},wUe=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.removeRotateControl=function(e){for(var n=e.childNodes,r=e.childNodes&&e.childNodes.length,i=0;i-1&&(e.removeChild(e.childNodes[i]),r--,i--)}},t.prototype.getSnapshot=function(e,n){return Pc(this,void 0,void 0,function(){var r,i,o,a,s=this;return Ac(this,function(l){switch(l.label){case 0:return r=this.lf.graphModel.getPartial(),i=(n!=null?n:{}).partial,o=i===void 0?r:i,a=this.lf.getEditConfig(),this.lf.updateEditConfig({isSilentMode:!0,stopScrollGraph:!0,stopMoveGraph:!0}),r===o?[3,1]:(this.lf.graphModel.setPartial(o),this.lf.graphModel.eventCenter.once("graph:updated",function(){return Pc(s,void 0,void 0,function(){return Ac(this,function(u){switch(u.label){case 0:return[4,this.snapshot(e,n)];case 1:return u.sent(),this.lf.graphModel.setPartial(r),[2]}})})}),[3,3]);case 1:return[4,this.snapshot(e,n)];case 2:l.sent(),l.label=3;case 3:return this.lf.updateEditConfig(a),[2]}})})},t.prototype.snapshot=function(e,n){return Pc(this,void 0,void 0,function(){var r,i,o,a,s,l,u,c,d,f=this;return Ac(this,function(h){switch(h.label){case 0:return r=n!=null?n:{},i=r.fileType,o=i===void 0?"png":i,a=r.quality,this.fileName="".concat(e!=null?e:"logic-flow.".concat(Date.now()),".").concat(o),s=this.getSvgRootElement(this.lf),[4,a2(s)];case 1:return h.sent(),o==="svg"?(l=this.cloneSvg(s),u=new XMLSerializer().serializeToString(l),c=new Blob([u],{type:"image/svg+xml;charset=utf-8"}),d=URL.createObjectURL(c),this.triggerDownload(d)):this.getCanvasData(s,n!=null?n:{}).then(function(m){var g=m.toDataURL("image/".concat(o),a).replace("image/".concat(o),"image/octet-stream");f.triggerDownload(g)}),[2]}})})},t.prototype.getSnapshotBase64=function(e,n){return Pc(this,void 0,void 0,function(){var r,i=this;return Ac(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,a2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){var l=s.toDataURL("image/".concat(n!=null?n:"png"));a({data:l,width:s.width,height:s.height})})})]}})})},t.prototype.getSnapshotBlob=function(e,n){return Pc(this,void 0,void 0,function(){var r,i=this;return Ac(this,function(o){switch(o.label){case 0:return r=this.getSvgRootElement(this.lf),[4,a2(r)];case 1:return o.sent(),[2,new Promise(function(a){i.getCanvasData(r,{backgroundColor:e}).then(function(s){s.toBlob(function(l){a({data:l,width:s.width,height:s.height})},"image/".concat(n!=null?n:"png"))})})]}})})},t.prototype.getClassRules=function(){var e="";if(this.useGlobalRules)for(var n=document.styleSheets,r=0;r-1;try{U?createImageBitmap(A,{resizeWidth:r&&i?Qv(T,r,i).width:T.width,resizeHeight:r&&i?Qv(T,r,i).height:T.height}).then(function(Q){P==null||P.drawImage(Q,s/u,s/u),W(r&&i?Qv(T,r,i):T)}):(P==null||P.drawImage(A,s/u,s/u),W(r&&i?Qv(T,r,i):T))}catch{P==null||P.drawImage(A,s/u,s/u),W(r&&i?Qv(T,r,i):T)}};var L="data:image/svg+xml;charset=utf-8,".concat(new XMLSerializer().serializeToString(l)),I=L.replace(/\n/g,"").replace(/\t/g,"").replace(/#/g,"%23");A.src=I})]})})},t.prototype.cloneSvg=function(e,n){var r=this,i;n===void 0&&(n=!0);var o=e.cloneNode(!0),a=o.lastChild,s=(i=a==null?void 0:a.childNodes)===null||i===void 0?void 0:i.length;if(s)for(var l=0;l=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},CUe=function(){function t(e){var n=e.lf,r=e.LogicFlow,i=e.options,o=this;this.width=200,this.height=150,this.scale=1,this.translateX=0,this.translateY=0,this.showEdge=!1,this.viewPortTop=0,this.viewPortLeft=0,this.viewPortWidth=150,this.viewPortHeight=75,this.isShow=!1,this.isShowHeader=!1,this.isShowCloseIcon=!1,this.headerTitle="\u5BFC\u822A",this.disabledPlugins=["miniMap","control","selectionSelect"],this.onGraphResize=function(){o.updateViewPortBounds(),o.isShow&&o.updateViewPort()},this.render=function(s,l){o.container=l,o.lf.on("history:change",function(){o.isShow&&o.setView()}),o.lf.on("graph:transform",function(){o.isShow&&o.setView(!1)})},this.show=function(s,l){o.isShow||(o.createMiniMap(s,l),o.setView()),o.isShow=!0},this.hide=function(){o.isShow&&(o.removeMiniMap(),o.lf.emit("miniMap:close",{})),o.isShow=!1},this.updatePosition=function(s){if(typeof s=="object")(s.left!==void 0||s.right!==void 0)&&(o.leftPosition=s.left,o.rightPosition=s.right),(s.top!==void 0||s.bottom!==void 0)&&(o.topPosition=s.top,o.bottomPosition=s.bottom);else switch(s){case"left-top":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=0,o.bottomPosition=void 0;break;case"right-top":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=0,o.bottomPosition=void 0;break;case"left-bottom":o.leftPosition=0,o.rightPosition=void 0,o.topPosition=void 0,o.bottomPosition=0;break;case"right-bottom":o.leftPosition=void 0,o.rightPosition=0,o.topPosition=void 0,o.bottomPosition=0;break}o.updateMiniMapPosition()},this.reset=function(){o.lf.resetTranslate(),o.lf.resetZoom()},this.setShowEdge=function(s){o.showEdge!==s&&(o.showEdge=s,o.setView())},this.startDrag=function(s){document.addEventListener("mousemove",o.drag),document.addEventListener("mouseup",o.drop);var l=s.x,u=s.y;o.startPosition={x:l,y:u}},this.drag=function(s){var l=s.x,u=s.y,c=(l-o.startPosition.x)/o.scale,d=(u-o.startPosition.y)/o.scale,f=o.viewPortLeft+c+o.viewPortWidth/o.scale/2,h=o.viewPortTop+d+o.viewPortHeight/o.scale/2;o.startPosition={x:l,y:u},o.lf.focusOn({coordinate:{x:f,y:h}})},this.drop=function(){document.removeEventListener("mousemove",o.drag),document.removeEventListener("mouseup",o.drop)},this.mapClick=function(s){var l=s.offsetX,u=s.offsetY,c=o.translateX+l/o.scale,d=o.translateY+u/o.scale;o.lf.focusOn({coordinate:{x:c,y:d}})},this.lf=n,this.LFCtor=r,i&&this.setOption(i),this.viewPortWidth=n.graphModel.width,this.viewPortHeight=n.graphModel.height;var a={left:0,right:this.viewPortWidth,top:0,bottom:this.viewPortHeight};this.bounds=a,this.elementAreaBounds=a,this.viewPortBounds=a,this.initMiniMap(),n.on("graph:resize",this.onGraphResize)}return t.prototype.setOption=function(e){var n=e.width,r=n===void 0?150:n,i=e.height,o=i===void 0?220:i,a=e.showEdge,s=a===void 0?!1:a,l=e.isShowHeader,u=l===void 0?!1:l,c=e.isShowCloseIcon,d=c===void 0?!1:c,f=e.leftPosition,h=e.topPosition,m=e.rightPosition,g=m===void 0?0:m,y=e.bottomPosition,b=y===void 0?0:y,w=e.headerTitle,O=w===void 0?"\u5BFC\u822A":w;this.width=r,this.height=o,this.showEdge=s,this.isShowHeader=u,this.isShowCloseIcon=d,this.leftPosition=f,this.rightPosition=f!==void 0?void 0:g,this.topPosition=h,this.bottomPosition=h!==void 0?void 0:b,this.headerTitle=O},t.prototype.initMiniMap=function(){var e=document.createElement("div");e.className="lf-mini-map-graph",e.style.width="".concat(this.width,"px"),e.style.height="".concat(this.height,"px"),this.lfMap=new this.LFCtor({container:e,grid:!1,isSilentMode:!0,stopZoomGraph:!0,stopScrollGraph:!0,stopMoveGraph:!1,history:!1,snapline:!1,disabledPlugins:this.disabledPlugins}),this.miniMapWrap=e,this.createViewPort(),e.addEventListener("click",this.mapClick)},t.prototype.createMiniMap=function(e,n){var r,i=document.createElement("div");this.miniMapContainer=i,i.appendChild(this.miniMapWrap),i.style.position="absolute",(e!==void 0||n!==void 0)&&(this.leftPosition=e||0,this.topPosition=n||0,this.rightPosition=void 0,this.bottomPosition=void 0),this.updateMiniMapPosition(),i.className="lf-mini-map",this.isShowCloseIcon||i.classList.add("lf-mini-map-no-close-icon"),this.isShowHeader||i.classList.add("lf-mini-map-no-header"),(r=this.container)===null||r===void 0||r.appendChild(i),this.miniMapWrap.appendChild(this.viewport);var o=document.createElement("div");o.className="lf-mini-map-header",o.innerText=this.headerTitle,i.appendChild(o);var a=document.createElement("span");a.className="lf-mini-map-close",a.addEventListener("click",this.hide),i.appendChild(a)},t.prototype.updateMiniMapPosition=function(){if(this.miniMapContainer){var e=this.miniMapContainer.style;this.rightPosition!==void 0?(e.right="".concat(this.rightPosition,"px"),e.left=""):(e.left="".concat(this.leftPosition,"px"),e.right=""),this.bottomPosition!==void 0?(e.bottom="".concat(this.bottomPosition,"px"),e.top=""):(e.top="".concat(this.topPosition,"px"),e.bottom="")}},t.prototype.removeMiniMap=function(){var e;this.miniMapContainer&&((e=this.container)===null||e===void 0||e.removeChild(this.miniMapContainer))},t.prototype.updateBounds=function(e){e&&this.updateElementAreaBounds(e),this.updateViewPortBounds(),this.bounds={left:Math.min(this.elementAreaBounds.left,this.viewPortBounds.left),right:Math.max(this.elementAreaBounds.right,this.viewPortBounds.right),top:Math.min(this.elementAreaBounds.top,this.viewPortBounds.top),bottom:Math.max(this.elementAreaBounds.bottom,this.viewPortBounds.bottom)}},t.prototype.updateElementAreaBounds=function(e){var n={left:0,right:0,top:0,bottom:0},r=e.nodes;r&&r.length>0&&r.forEach(function(i){var o,a,s=i.x,l=i.y,u=(o=i.width)!==null&&o!==void 0?o:200,c=(a=i.height)!==null&&a!==void 0?a:200,d=s-u/2,f=s+u/2,h=l-c/2,m=l+c/2;n.left=Math.min(d,n.left),n.right=Math.max(f,n.right),n.top=Math.min(h,n.top),n.bottom=Math.max(m,n.bottom)}),this.elementAreaBounds=n},t.prototype.updateViewPortBounds=function(){var e=this.lf.getTransform(),n=e.TRANSLATE_X,r=e.TRANSLATE_Y,i=e.SCALE_X,o=e.SCALE_Y,a=this.lf.graphModel,s=a.width,l=a.height;this.viewPortBounds={left:-n/i,right:(-n+s)/i,top:-r/o,bottom:(-r+l)/o}},t.prototype.resetData=function(e){var n=e.nodes,r=e.edges;return n.forEach(function(i){i.text=void 0}),this.showEdge&&r.forEach(function(i){i.text=void 0}),{nodes:n,edges:this.showEdge?r:[]}},t.prototype.setView=function(e){var n,r;if(e===void 0&&(e=!0),e){var i=this.lf.getGraphRawData(),o=this.resetData(i),a=this.lf.viewMap,s=this.lf.graphModel.modelMap,l=this.lfMap.viewMap;try{for(var u=xUe(a.keys()),c=u.next();!c.done;c=u.next()){var d=c.value;l.has(d)||this.lfMap.register({type:d,view:a.get(d),model:s.get(d)})}}catch(P){n={error:P}}finally{try{c&&!c.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.lfMap.render(o),this.updateBounds(o)}else this.updateBounds();var f=this.bounds,h=f.left,m=f.top,g=f.right,y=f.bottom,b=g-h,w=y-m,O=this.width/b,S=this.height/w,x=Math.min(O,S);this.scale=x;var C=h-(this.width/x-b)/2,E=m-(this.height/x-w)/2;if(this.lfMap.graphModel.transformModel.translate(-C+this.translateX,-E+this.translateY),this.translateX=C,this.translateY=E,this.miniMapWrap.firstChild){var T=this.miniMapWrap.firstChild.style;T.pointerEvents="none",T.transform="matrix(".concat(x,", 0, 0, ").concat(x,", 0, 0)"),T.transformOrigin="left top",T.height="".concat(this.height/x,"px"),T.width="".concat(this.width/x,"px"),this.updateViewPort()}},t.prototype.updateViewPort=function(){var e=this.viewport.style,n=this.lf.getTransform(),r=n.TRANSLATE_X,i=n.TRANSLATE_Y,o=n.SCALE_X,a=n.SCALE_Y,s=this.lf.graphModel,l=s.width,u=s.height;this.viewPortLeft=-r/o,this.viewPortTop=-i/a,this.viewPortWidth=l/o*this.scale,this.viewPortHeight=u/a*this.scale,e.width="".concat(this.viewPortWidth,"px"),e.height="".concat(this.viewPortHeight,"px"),e.left="".concat((this.viewPortLeft-this.translateX)*this.scale,"px"),e.top="".concat((this.viewPortTop-this.translateY)*this.scale,"px")},t.prototype.createViewPort=function(){var e=document.createElement("div");e.className="lf-minimap-viewport",e.addEventListener("mousedown",this.startDrag),e.addEventListener("click",function(n){n.stopPropagation()}),this.viewport=e},t.prototype.destroy=function(){this.lf.off("graph:resize",this.onGraphResize)},t.pluginName="miniMap",t}(),EUe=function(){function t(e){var n=e.lf,r=this;this.disabled=!0,this.isDefaultStopMoveGraph=!1,this.isWholeNode=!0,this.isWholeEdge=!0,this.draw=function(o){var a=r.lf.getPointByClient(o.clientX,o.clientY).domOverlayPosition,s=a.x,l=a.y;if(r.endPoint={x:s,y:l},r.startPoint){var u=r.startPoint,c=u.x,d=u.y,f=c,h=d,m=s-c,g=l-d;s0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},TUe={tr:"tl",lb:"tl",tl:"tr",rb:"tr",br:"bl",lt:"bl",bl:"br",rt:"br"};function kUe(t){for(var e=t,n=1;ne[1]?"t":"b":t[1]===e[1]&&(o=t[0]>e[0]?"l":"r"),e[0]===n[0]?a=e[1]>n[1]?"t":"b":e[1]===n[1]&&(a=e[0]>n[0]?"l":"r");var s=Math.min(Math.hypot(e[0]-t[0],e[1]-t[1])/2,Math.hypot(n[0]-e[0],n[1]-e[1])/2,r)||1/5*r,l="".concat(o).concat(a),u=TUe[l]||"-",c="L ".concat(t[0]," ").concat(t[1]);if(u==="-")c+="L ".concat(e[0]," ").concat(e[1]," L ").concat(n[0]," ").concat(n[1]);else{var d=Qy(PUe(e,l,u,s),2),f=d[0],h=d[1];f&&h&&(c+="L ".concat(f[0]," ").concat(f[1]," Q ").concat(e[0]," ").concat(e[1]," ").concat(h[0]," ").concat(h[1]),i=Qy(h,2),e[0]=i[0],e[1]=i[1])}return c}function MUe(t,e){var n=0,r="";if(t.length===2)r+="M".concat(t[n][0]," ").concat(t[n++][1]," L ").concat(t[n][0]," ").concat(t[n][1]);else{for(r+="M".concat(t[n][0]," ").concat(t[n++][1]);n+10)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o},EF=globalThis&&globalThis.__spreadArray||function(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,o;r1&&setTimeout(function(){var i;n.updatePointsByNodes(((i=n.properties)===null||i===void 0?void 0:i.node_selection_ids)||[])})},e.prototype.getNodeStyle=function(){var n=t.prototype.getNodeStyle.call(this);return n.stroke=this.properties.strokeColor||"#008000",n.strokeDasharray="10 5",n},e.prototype.getDefaultAnchor=function(){return[]},e.prototype.updatePoints=function(n){this.points=n},e.prototype.updateCoordinate=function(n){var r=n.x,i=n.y;this.x=r,this.y=i},e.prototype.updatePointsByNodes=function(n){var r=this,i=[],o=1/0,a=1/0,s=-1/0,l=-1/0;n.forEach(function(u){var c=r.graphModel.getNodeModelById(u);if(!!c){var d=c.width,f=c.height,h=c.x,m=c.y;o=Math.min(o,h-d/2-r.d),a=Math.min(a,m-f/2-r.d),s=Math.max(s,h+d/2+r.d),l=Math.max(l,m+f/2+r.d)}}),i.push([o,a],[s,a],[s,l],[o,l]),![o,a,s,l].some(function(u){return Math.abs(u)===1/0})&&(this.updatePoints(i),this.updateCoordinate({x:(s+o)/2,y:(l+a)/2}))},e.prototype.resize=function(n){var r;this.isResize=!0;for(var i=n.width,o=n.height,a={x:i/this.width,y:o/this.height},s=(this.properties.node_selection_ids||[]).slice(),l=[],u=new Set;s.length;){var c=s.shift(),d=(r=this.graphModel.nodesMap[c])===null||r===void 0?void 0:r.model;if(!!d){if(!F1(d)){l.push(d);continue}u.has(d.id)||(u.add(d.id),s.push.apply(s,EF([],CF(d.properties.node_selection_ids||[]),!1)))}}var f={x:this.x-this.width/2,y:this.y-this.height/2},h=t.prototype.resize.call(this,n),m={x:this.x-this.width/2,y:this.y-this.height/2};return l.forEach(function(g){g.width=g.width*a.x,g.height=g.height*a.y;var y=(g.x-f.x)*a.x+m.x-g.x,b=(g.y-f.y)*a.y+m.y-g.y;g.move(y,b,!0)}),this.isResize=!1,h},e}(Kw),yA="node-selection";(function(){function t(e){var n=e.lf;this.selectNodes=[],this.d=10,this.lf=n,n.register({type:yA,view:RUe,model:$Ue})}return Object.defineProperty(t.prototype,"selectNodesIds",{get:function(){return this.selectNodes.map(function(e){return e.id})},enumerable:!1,configurable:!0}),t.prototype.addNodeSelection=function(){var e=this.lf.addNode({type:"node-selection",text:"",properties:{node_selection_ids:this.selectNodesIds},x:0,y:0});e.updatePointsByNodes(this.selectNodesIds)},t.prototype.updateNodeSelection=function(){var e,n=this.getNodeSelection();!n||(this.lf.setProperties(n.id,{node_selection_ids:this.selectNodesIds}),(e=this.lf.getNodeModelById(n.id))===null||e===void 0||e.updatePointsByNodes(this.selectNodesIds))},t.prototype.getNodeSelection=function(){var e=this,n=this.selectNodesIds,r=this.lf.getGraphRawData(),i=n.filter(function(o){return o!==e.currentClickNode.id});return r.nodes.find(function(o){if(o.type==="node-selection"){var a=Wr(o,"properties.node_selection_ids",[]);return i.every(function(s){return a.includes(s)})}return!1})},t.prototype.onNodeChange=function(e,n){var r=e.graphModel.nodes.filter(function(i){if(!F1(i))return!1;var o=i.properties.node_selection_ids||[];return o.includes(n.id)});Promise.resolve().then(function(){r.forEach(function(i){i.updatePointsByNodes(i.properties.node_selection_ids||[])})})},t.prototype.render=function(e){var n=this;this.lf=e,e.on("node:click",function(r){var i;if(!(!r.e.shiftKey||r.data.type===yA)){n.currentClickNode=r.data;var o=!1;n.selectNodesIds.includes(r.data.id)&&((i=n.lf.getNodeModelById(r.data.id))===null||i===void 0||i.setSelected(!1),o=!0);var a=e.getSelectElements(!0).nodes;n.selectNodes=a,n.selectNodes.length===1?o?n.updateNodeSelection():n.addNodeSelection():n.selectNodes.length>1&&n.updateNodeSelection()}}),e.graphModel.addNodeMoveRules(function(r,i,o){if(n.onNodeChange(e,r),F1(r)&&!r.isResize){var a=r.properties.node_selection_ids||[];return e.graphModel.moveNodes(a,i,o,!0),!0}return!0}),e.graphModel.addNodeResizeRules(function(r){return F1(r)||n.onNodeChange(e,r),!0})},t.pluginName="node-selection",t})();var F1=function(t){return!!(t&&t.type===yA)},NUe=globalThis&&globalThis.__extends||function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(r[o]=i[o])},t(e,n)};return function(e,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),wS=globalThis&&globalThis.__assign||function(){return wS=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{s.id&&s.id!==e.id&&i.push({value:s.id,label:s.name})})}catch{}finally{n.component.options=i}return i}const _m={category:{endpoints:{label:"\u8F93\u5165\u7AEF",background:"#A6BBCFFF",nodeType:"endpoint-node"},filter:{label:"\u8FC7\u6EE4\u5668",background:"#f1e861",nodeType:"simple-node"},transform:{label:"\u8F6C\u6362\u5668",background:"#79cef1",nodeType:"simple-node"},action:{label:"\u52A8\u4F5C",background:"#f1928f",nodeType:"simple-node"},external:{label:"\u5916\u90E8\u7684",background:"#fbc766",nodeType:"simple-node"},ai:{label:"AI",background:"#7cbaf8",nodeType:"simple-node"},ci:{label:"CI/CD",background:"#9ec9c9",nodeType:"simple-node"},iot:{label:"IoT",background:"#FFA500",nodeType:"simple-node"},flow:{label:"\u5B50\u89C4\u5219\u94FE",background:"#E6E0F8FF",nodeType:"simple-node"}},component:{endpoints:{"endpoint/mqtt":{notInput:!0,label:"MQTT",icon:Mn+"/images/endpoint/mqtt.svg",desc:"
  • MQTT\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u8FDE\u63A5MQTT Server\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
",server:{label:"MQTT Server\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QOS",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/net":{notInput:!0,label:"TCP/UDP",icon:Mn+"/images/endpoint/net.svg",desc:"
  • TCP/UDP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
  • \u542F\u52A8TCP/UPD\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u8DEF\u7531\u6570\u636E\u89E6\u53D1\u89C4\u5219\u94FE\u3002
",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335"},readTimeout:{label:"\u8BFB\u8D85\u65F6(\u5355\u4F4D\u79D2)",desc:""},encode:{label:"\u7F16\u7801",desc:"\u628A\u5B57\u8282\u6D41\u8F6C\u6362\u6210hex/base64\uFF0C\u9ED8\u8BA4\u4E0D\u8F6C\u6362",rules:[],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,clearable:!0,options:[{label:"\u65E0",value:"none"},{label:"hex",value:"hex"},{label:"base64",value:"base64"}]}},router:{from:{path:{label:"\u8DEF\u7531\u6B63\u5219\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u901A\u8FC7\u6B63\u5219\u8868\u8FBE\u5F0F\u5339\u914D\u6EE1\u8DB3\u6761\u4EF6\u7684\u6570\u636E\u89E6\u53D1\uFF0C*\u8868\u793A\u5339\u914D\u6240\u6709"}}}},"endpoint/http":{notInput:!0,label:"HTTP",icon:Mn+"/images/endpoint/http.svg",desc:"
  • HTTP\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
  • \u542F\u52A8HTTP\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002
",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/v1/msg"}}}},"endpoint/ws":{notInput:!0,label:"Websocket",icon:Mn+"/images/endpoint/websocket.svg",desc:"
  • Websocket\u670D\u52A1\u5668\u63A5\u5165\u7AEF\u3002
  • \u542F\u52A8Websocket\u670D\u52A1\u5668\uFF0C\u5904\u7406\u8DEF\u7531\u7ED9\u5B9AURL\u8BF7\u6C42\uFF0C\u628A\u8BF7\u6C42\u6570\u636E\u8DEF\u8DEF\u7531\u5230\u89C4\u5219\u94FE\u3002
",server:{label:"\u76D1\u542C\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: :6335",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},allowCors:{label:"\u662F\u5426\u5141\u8BB8\u8DE8\u57DF"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"https\u4F7F\u7528"},router:{from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5BA2\u6237\u7AEF\u8BF7\u6C42\u8BE5URL\u89E6\u53D1\uFF0C\u5982:/api/ms/ws "}}}},"endpoint/schedule":{notInput:!0,label:"\u5B9A\u65F6\u8C03\u5EA6",icon:Mn+"/images/endpoint/schedule.svg",desc:"
  • \u5B9A\u65F6\u8C03\u5EA6\u63A5\u5165\u7AEF
  • \u901A\u8FC7\u8DEF\u7531\u7ED9\u5B9ACron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\u89C4\u5219\u94FE
",router:{from:{path:{label:"cron\u8868\u8FBE\u5F0F",rules:[{required:!0,message:"\u8BF7\u8F93\u5165cron\u8868\u8FBE\u5F0F\u5982: */10 * * * * *"}],desc:"\u901A\u8FC7cron\u8868\u8FBE\u5F0F\u5468\u671F\u89E6\u53D1\uFF0C\u5982: */10 * * * * *"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/kafka":{notInput:!0,label:"Kafka",icon:"/images/endpoint/kafka.svg",desc:"
  • Kafka\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u8FDE\u63A5Kafka\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4sagoo"},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/nats":{notInput:!0,label:"Nats",icon:Mn+"/images/endpoint/nats.svg",desc:"
  • Nats\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u8FDE\u63A5Nats\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u4E3B\u9898\u89E6\u53D1\u89C4\u5219\u94FE
",server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},router:{from:{path:{label:"\u8BA2\u9605\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8BA2\u9605\u4E3B\u9898\u6570\u636E\u89E6\u53D1\uFF0C\u4F8B\u5982: devices/msg"}}}},"endpoint/redis":{notInput:!0,label:"Redis",icon:Mn+"/images/endpoint/redis.svg",desc:"
  • Redis\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8BA2\u9605\u901A\u9053\u89E6\u53D1\u89C4\u5219\u94FE
",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},router:{from:{path:{label:"\u8BA2\u9605Redis\u901A\u9053",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u901A\u9053\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/redis/stream":{notInput:!0,label:"Redis\u6D41",icon:Mn+"/images/endpoint/redis_stream.svg",desc:"
  • Redis Steam\u63A5\u5165\u7AEF
  • \u8FDE\u63A5Redis\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u6D41\u540D\u79F0\u89E6\u53D1\u89C4\u5219\u94FE
",server:{label:"Redis\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:6379",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},groupId:{label:"\u6D88\u8D39\u8005\u7EC4ID",desc:"\u9ED8\u8BA4rulego"},router:{from:{path:{label:"\u8BA2\u9605\u6D41\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u591A\u4E2A\u6D41\u4E0E\u9017\u53F7\u5206\u5272\uFF0C\u4F8B\u5982: devices/msg,devices/msg2"}}}},"endpoint/rabbitmq":{notInput:!0,label:"RabbitMQ",icon:Mn+"/images/endpoint/rabbitmq.svg",desc:"
  • rabbitmq\u8BA2\u9605\u63A5\u5165\u7AEF
  • \u652F\u6301AMQP\u534F\u8BAE
  • \u8FDE\u63A5rabbitmq\u670D\u52A1\u5668\uFF0C\u901A\u8FC7\u8BA2\u9605\u8DEF\u7531\u7ED9\u5B9A\u8DEF\u7531\u952E\u89E6\u53D1\u89C4\u5219\u94FE
  • \u5982\u679C\u4EA4\u6362\u673A\u4E0D\u5B58\u5728\u5219\u81EA\u52A8\u58F0\u660E
",server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"direct/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""},router:{from:{path:{label:"\u8DEF\u7531\u952E",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""}}}},"endpoint/mysql_cdc":{notInput:!0,label:"MYSQL CDC",icon:Mn+"/images/endpoint/mysql_cdc.svg",desc:"
  • \u76D1\u542Cmysql\u8868\u6570\u636E\u53D8\u5316\u89E6\u53D1\u3002
  • ",server:{label:"MYSQL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:3306"},user:{label:"\u7528\u6237\u540D"},password:{label:"\u5BC6\u7801",desc:""},fromOldest:{label:"\u662F\u5426\u5168\u91CF\u540C\u6B65",desc:"\u5F00\u542F\u540E\uFF0C\u6BCF\u6B21\u91CD\u542F\u670D\u52A1\u90FD\u4F1A\u4ECE\u7B2C\u4E00\u884C\u5F00\u59CB\u540C\u6B65\u6570\u636E\uFF0C\u5426\u5219\u53EA\u540C\u6B65\u589E\u91CF\u6570\u636E"},dbs:{label:"\u76D1\u542C\u6570\u636E\u5E93\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest"},includeTables:{label:"\u5305\u542B\u8868\u540D\uFF0C\u5982\u679C\u7A7A\u5219\u5305\u542B\u6240\u6709\u8868",desc:"\u5982\uFF1Atest.users\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1A.*\\.canal\u6216test.*"},excludeTables:{label:"\u6392\u9664\u8868\u540D",desc:"\u5982\uFF1Amysql.component\uFF0C\u652F\u6301\u6B63\u5219\u8868\u8FBE\u5F0F\uFF0C\u5982\uFF1Amysql\\..*"},executionPath:{label:"mysqldump\u6267\u884C\u8DEF\u5F84",desc:"\u5982\uFF1Amysqldump\u6216\u8005/usr/bin/mysqldump"},charset:{label:"\u5B57\u7B26\u96C6",desc:"\u5982\uFF1Autf8"},flavor:{label:"\u6570\u636E\u5E93\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"mariadb",value:"mariadb"}]}},heartbeat:{label:"\u5FC3\u8DF3\u65F6\u95F4\uFF0C\u5355\u4F4D\u79D2"},readTimeout:{label:"\u8BFB\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2"},router:{from:{path:{label:"\u8DEF\u7531\u8868\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u6839\u636E\u8868\u540D\u8DEF\u7531\uFF0C\u8868\u540D\u683C\u5F0F\uFF1AdbName.tableName\uFF0C\u5982:test.users\u3002*\u8868\u793A\u6240\u6709\u8868"},processors:{hide:!0}},to:{processors:{hide:!0}}}},"endpoint/sagoo/devicein":{notInput:!0,label:"\u8BBE\u5907\u6570\u636E",icon:Mn+"/images/devicein.svg",desc:"\u7528\u4E8E\u83B7\u53D6\u8BBE\u5907\u6570\u636E\u3002",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},antiShake:{label:"\u542F\u7528\u9632\u6296",desc:""},antiShakeMs:{label:"\u9632\u6296\u65F6\u95F4",desc:"\u5355\u4F4D\uFF1A\u79D2"},antiShakeNum:{label:"\u9632\u6296\u6B21\u6570",desc:""},processFirstItem:{label:"\u9996\u6761\u6570\u636E\u7ACB\u5373\u5904\u7406",desc:""},router:{from:{path:{label:"\u89E6\u53D1\u7C7B\u578B",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",options:[{label:"\u5C5E\u6027\u4E0A\u62A5",value:"reportAttribute"},{label:"\u4E8B\u4EF6\u4E0A\u62A5",value:"reportEvent"}]}}}},"endpoint/opcua":{notInput:!0,label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",desc:"
    • \u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"endpoint/grpc/stream":{label:"gRPC\u6D41",icon:"/images/grpc.svg",desc:'
    • \u63A5\u6536gRPC\u670D\u52A1\u5668\u63A8\u9001\u6570\u636E\uFF0C\u5E76\u8F6C\u53D1\u5230\u89C4\u5219\u94FE\u5904\u7406
    \u5E2E\u52A9\u6587\u6863',server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9(\u5141\u8BB8\u7A7A)",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}',component:{type:"textarea"}},headers:{label:"\u8BF7\u6C42\u5934",desc:""},checkInterval:{label:"\u670D\u52A1\u68C0\u67E5\u95F4\u9694,\u5355\u4F4D:\u6BEB\u79D2",desc:""},router:{hide:!0}}},nodes:{comment:{notInput:!0,notOutput:!0,label:"\u6CE8\u91CA",icon:Mn+"/images/comment.svg",desc:"\u628A\u8282\u70B9\u540D\u79F0\u4F5C\u4E3A\u6CE8\u91CA\u5185\u5BB9\u663E\u793A\u5728\u753B\u5E03\u4E0A",nodeType:"comment-node"},delay:{label:"\u5EF6\u8FDF",icon:Mn+"/images/delay.svg",desc:"",periodInSeconds:{label:"\u5EF6\u8FDF\u65F6\u95F4(\u79D2)",desc:""},maxPendingMsgs:{label:"\u6700\u5927\u5141\u8BB8\u6302\u8D77\u6D88\u606F\u7684\u6570\u91CF",desc:"\u5982\u679C\u542F\u7528\u8986\u76D6\u6A21\u5F0F\uFF0C\u8BE5\u53C2\u6570\u5931\u6548"},periodInSecondsPattern:{label:"\u5EF6\u8FDF\u65F6\u95F4\u8868\u8FBE\u5F0F(\u79D2)",desc:"\u901A\u8FC7 ${metadata.key} \u4ECE\u5143\u6570\u636E\u53D8\u91CF\u4E2D\u83B7\u53D6\u6216\u8005\u901A\u8FC7 ${msg.key} \u4ECE\u6D88\u606F\u8D1F\u8377\u4E2D\u83B7\u53D6\uFF0C\u5EF6\u8FDF\u65F6\u95F4\uFF0C\u5982\u679C\u8BE5\u503C\u6709\u503C\uFF0C\u4F18\u5148\u53D6\u8BE5\u503C\u3002"},overwrite:{label:"\u8986\u76D6\u6A21\u5F0F",desc:"\u5982\u679C\u542F\u7528\uFF0C\u5468\u671F\u5185\u53EA\u5141\u8BB8\u6302\u8D77\u4E00\u6761\u6D88\u606F\uFF0C\u65B0\u6D88\u606F\u4F1A\u8986\u76D6\u4E0A\u4E00\u6761\u6D88\u606F"}},log:{label:"\u65E5\u5FD7",icon:Mn+"/images/log.svg",desc:"
    • \u8BB0\u5F55\u65E5\u5FD7
    • \u4F7F\u7528JavaScript\u811A\u672C\u5BF9\u6D88\u606F\u8FDB\u884C\u683C\u5F0F\u5316\u540E\u8BB0\u5F55\u5230\u65E5\u5FD7\u6587\u4EF6\u4E2D
    ",jsScript:{label:"function String(msg, metadata, msgType) {",desc:"}"}},for:{label:"for",icon:Mn+"/images/for.svg",desc:"
    • \u904D\u5386\u7EC4\u4EF6
    • \u7528\u4E8E\u904D\u5386\u6570\u7EC4\uFF0C\u5207\u7247\u548C\u7ED3\u6784\u4F53\uFF0C\u4E5F\u7528\u4E8E\u91CD\u590D\u6267\u884C\u4ECE\u6307\u5B9A\u8282\u70B9\u5F00\u59CB\u7684\u94FE\u6216\u5B50\u89C4\u5219\u94FE
    ",range:{label:"\u8FED\u4EE3\u503C\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.items;1..3;\u5982\u679C\u7A7A\u5219\u904D\u5386\u6574\u4E2Amsg"},do:{label:"\u5904\u7406\u8282\u70B9ID",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5904\u7406\u94FE\u7684\u8D77\u59CB\u8282\u70B9ID",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,loadData:FO}},mode:{label:"\u6267\u884C\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u540C\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:0},{label:"\u540C\u6B65\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:1},{label:"\u540C\u6B65\u8986\u76D6\u6267\u884C\u7ED3\u679C",value:2},{label:"\u5F02\u6B65\u4E0D\u5408\u5E76\u6267\u884C\u7ED3\u679C",value:3}]}}},functions:{label:"\u51FD\u6570",desc:"
    • \u6267\u884C\u81EA\u5B9A\u4E49\u5904\u7406\u51FD\u6570
    • \u7528\u4E8E\u8F7B\u91CF\u7EA7\u81EA\u5B9A\u4E49\u8282\u70B9\u5B9E\u73B0\uFF0C\u8BA9\u4F60\u7684Golang\u81EA\u5B9A\u4E49\u51FD\u6570\u79D2\u53D8\u7EC4\u4EF6
    ",functionName:{label:"\u51FD\u6570\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"",component:{type:"select",filterable:!0,allowCreate:!0,placeholder:"\u8BF7\u9009\u62E9\u6216\u8005\u8F93\u5165\u51FD\u6570\u540D"}}},dbClient:{label:"\u6570\u636E\u5E93",icon:Mn+"/images/db.svg",desc:"
    • \u6570\u636E\u5E93\u5BA2\u6237\u7AEF
    • \u901A\u8FC7\u6807\u51C6sql\u63A5\u53E3\u5BF9\u6570\u636E\u5E93\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C
    ",sql:{label:"SQL\u8BED\u53E5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u6216\u8005 ${msg.key}\u53D8\u91CF\uFF0CSQL\u53C2\u6570\u5141\u8BB8\u4F7F\u7528 ? \u5360\u4F4D\u7B26"},params:{label:"\u5360\u4F4D\u7B26\u53C2\u6570\u5217\u8868",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},getOne:{label:"\u8FD4\u56DE\u4E00\u6761\u8BB0\u5F55",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},driverName:{label:"\u6570\u636E\u5E93\u9A71\u52A8\u540D\u79F0",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"mysql\u6216postgres\uFF0C\u5982\u9700\u5176\u4ED6\u6570\u636E\u5E93\u7C7B\u578B\u9700\u5F15\u5165\u5BF9\u5E94\u6570\u636E\u5E93\u9A71\u52A8",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"mysql",value:"mysql"},{label:"postgres",value:"postgres"}]}},dsn:{label:"\u6570\u636E\u5E93\u8FDE\u63A5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"Mysql\u914D\u7F6E\u793A\u4F8B: username:password@tcp(127.0.0.1:3306)/db Postgres\u914D\u7F6E\u793A\u4F8B\uFF1Apostgres://username:password@127.0.0.1:5432/db?sslmode=disable",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}}},mqttClient:{label:"MQTT",icon:Mn+"/images/mqtt.svg",desc:"
    • mqtt\u5BA2\u6237\u7AEF
    • \u5F80mqtt broker \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E
    ",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"MQTT \u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: 127.0.0.1:1883 \u3002\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},maxReconnectInterval:{label:"\u91CD\u8FDE\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2",desc:""},qOS:{label:"QoS",desc:""},clientID:{label:"\u5BA2\u6237\u7AEFID",desc:""},cleanSession:{label:"\u6E05\u9664\u4F1A\u8BDD",desc:""},cAFile:{label:"\u8BC1\u4E66\u9881\u53D1\u673A\u6784(CA)\u6587\u4EF6",desc:""},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6",desc:""},certKeyFile:{label:"\u8BC1\u4E66\u5BC6\u94A5\u6587\u4EF6",desc:""}},restApiCall:{label:"REST",icon:Mn+"/images/rest.svg",desc:"
    • \u8C03\u7528rest api\u5BA2\u6237\u7AEF
    • \u8C03\u7528\u5916\u90E8REST\u670D\u52A1
    ",restEndpointUrlPattern:{label:"HTTP URL\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},requestMethod:{label:"\u8BF7\u6C42\u65B9\u6CD5",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"POST",value:"POST"},{label:"GET",value:"GET"},{label:"DELETE",value:"DELETE"},{label:"PUT",value:"PUT"},{label:"PATCH",value:"PATCH"},{label:"HEAD",value:"HEAD"}]},desc:"POST/GET/DELETE/PUT/PATCH/HEAD"},withoutRequestBody:{label:"\u4E0D\u4F20\u8F93request body",desc:"\u4E0D\u628A\u6D88\u606F\u8D1F\u8377\u4F20\u8F93\u7ED9\u914D\u7F6E\u7684\u670D\u52A1\u5730\u5740"},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},readTimeoutMs:{label:"\u8D85\u65F6\uFF0C\u5355\u4F4D\u6BEB\u79D2\u3002\u9ED8\u8BA4:0",desc:"0\u4EE3\u8868\u4E0D\u8D85\u65F6"},insecureSkipVerify:{label:"\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1",desc:"\u81EA\u7B7E\u8BC1\u4E66\u9700\u8981\u6253\u5F00\u7981\u7528\u8BC1\u4E66\u9A8C\u8BC1"},maxParallelRequestsCount:{label:"\u6700\u5927\u5E76\u53D1\u5927\u5C0F",desc:"0\u4EE3\u8868\u4E0D\u9650\u5236"},enableProxy:{label:"\u5F00\u542F\u4EE3\u7406",desc:""},useSystemProxyProperties:{label:"\u4F7F\u7528\u7CFB\u7EDF\u4EE3\u7406\u914D\u7F6E",desc:""},proxyScheme:{label:"\u4EE3\u7406\u534F\u8BAE",desc:""},proxyHost:{label:"\u4EE3\u7406\u4E3B\u673A",desc:""},proxyPort:{label:"\u4EE3\u7406\u7AEF\u53E3",desc:""},proxyUser:{label:"\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u5BC6\u7801",desc:""}},sendEmail:{label:"\u53D1\u90AE\u4EF6",icon:Mn+"/images/email.svg",desc:"
    • \u53D1\u9001\u90AE\u4EF6
    ",smtpHost:{label:"SMTP \u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},smtpPort:{label:"SMTP \u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"\u7528\u6237\u540D",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},password:{label:"\u6388\u6743\u7801",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},enableTls:{label:"\u662F\u5426\u5F00\u542FTLS",desc:""},email:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"",from:{label:"\u53D1\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},to:{label:"\u6536\u4EF6\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},cc:{label:"\u6284\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},bcc:{label:"\u5BC6\u9001\u4EBA\u90AE\u7BB1",desc:"\u591A\u4E2A\u4E0E`,`\u9694\u5F00"},subject:{label:"\u90AE\u4EF6\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},body:{label:"\u90AE\u4EF6\u5185\u5BB9",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6,\u5355\u4F4D\u79D2\u3002\u9ED8\u8BA4:10",desc:""}},ssh:{label:"SSH",icon:Mn+"/images/ssh.svg",desc:"
    • \u901A\u8FC7ssh\u8FDC\u7A0B\u767B\u5F55
    • \u6267\u884CShell\u811A\u672C
    ",host:{label:"ssh\u4E3B\u673A\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},port:{label:"ssh\u4E3B\u673A\u7AEF\u53E3",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},username:{label:"ssh\u767B\u5F55\u7528\u6237\u540D",desc:""},password:{label:"ssh\u767B\u5F55\u5BC6\u7801",desc:""},cmd:{label:"shell\u547D\u4EE4",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},fieldFilter:{label:"\u5B57\u6BB5\u8FC7\u6EE4",desc:"
    • \u5B57\u6BB5\u8FC7\u6EE4\u5668
    • \u53EF\u4EE5\u5BF9msg\u548Cmetadata\u5B57\u6BB5\u8FDB\u884C\u8FC7\u6EE4
    ",checkAllKeys:{label:"\u662F\u5426\u6EE1\u8DB3\u9700\u8981\u6240\u6709\u5B57\u6BB5key\u5B58\u5728",desc:""},dataNames:{label:"msg data\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"},metadataNames:{label:"metadata\u5B57\u6BB5key",desc:"\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00"}},jsFilter:{label:"js\u8FC7\u6EE4",icon:Mn+"/images/jsFilter.svg",desc:"
    • \u811A\u672C\u8FC7\u6EE4\u5668
    • \u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4
    ",jsScript:{label:"function Filter(msg, metadata, msgType) {",desc:"}"}},jsSwitch:{label:"js\u8DEF\u7531",desc:"
    • \u811A\u672C\u8DEF\u7531
    • \u6267\u884C\u5DF2\u914D\u7F6E\u7684JS\u811A\u672C
    ",jsScript:{label:"function Switch(msg, metadata, msgType) {",desc:"}"}},msgTypeSwitch:{label:"\u6D88\u606F\u8DEF\u7531",icon:Mn+"/images/msgTypeSwitch.svg",desc:"
    • \u6D88\u606F\u8DEF\u7531
    • \u6839\u636E\u4F20\u5165\u7684\u6D88\u606F\u7C7B\u578B\uFF08msgType\uFF09\u8DEF\u7531\u5230\u4E00\u4E2A\u6216\u591A\u4E2A\u8F93\u51FA\u94FE
    ",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprFilter:{label:"\u8868\u8FBE\u5F0F\u8FC7\u6EE4",icon:Mn+"/images/exp.svg",desc:"
    • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8FC7\u6EE4\u6D88\u606F
    • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
    • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
    • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
    • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
    ",expr:{label:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.temperature>50\uFF0C\u8FD4\u56DE\u503C\u5FC5\u987B\u662F\u5E03\u5C14\u7C7B\u578B",rules:[{required:!0,message:"\u8FC7\u6EE4\u8868\u8FBE\u5F0F\u662F\u5FC5\u987B\u7684"}]}},switch:{label:"\u6761\u4EF6\u5206\u652F",icon:Mn+"/images/msgTypeSwitch.svg",desc:"
    • \u6761\u4EF6\u5206\u652F\u8282\u70B9
    • \u4F9D\u6B21\u5339\u914Dcase\u8868\u8FBE\u5F0F
    ",cases:{label:"\u6761\u4EF6\u5217\u8868",desc:"\u4F9D\u6B21\u5339\u914D\u6761\u4EF6\u5217\u8868\uFF0C\u5982\u679C\u5339\u914D\u5230\u6839\u636E\u8DEF\u7531\u6267\u884C\u540E\u7EED\u8282\u70B9\uFF0C\u5982\u679C\u6CA1\u6709\u5339\u914D\u5230\u5219\u6267\u884CDefault\u94FE",component:{type:"switchNode"}},relationTypeDynamics:!0},exprTransform:{label:"\u8868\u8FBE\u5F0F\u8F6C\u6362",icon:Mn+"/images/exp.svg",desc:"
    • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684msg
    • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
    • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
    • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
    • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
    ",expr:{label:"\u8F6C\u6362\u8868\u8FBE\u5F0F",desc:"\u4F8B\u5982:msg.name\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\u5219\u4F18\u5148\u4F7F\u7528\u8BE5\u5B57\u6BB5\u3002"},mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868\uFF08\u521B\u5EFA\u65B0\u7684Msg\uFF09",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u8BE5\u5B57\u6BB5\u6709\u503C\uFF0C\u6839\u636E\u6307\u5B9A\u7684\u5B57\u6BB5\u548C\u8F6C\u6362\u8868\u8FBE\u5F0F\u521B\u5EFA\u65B0\u7684Msg"}},metadataTransform:{label:"\u5143\u6570\u636E\u8F6C\u6362",icon:Mn+"/images/metadata.svg",desc:"
    • \u4F7F\u7528expr\u8868\u8FBE\u5F0F\u8F6C\u6362\u6216\u8005\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E
    • \u901A\u8FC7`msg`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u4F53\u3002\u4F8B\u5982 `msg.temperature`
    • \u901A\u8FC7`metadata`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u5143\u6570\u636E\u3002\u4F8B\u5982 `metadata.customerName`
    • \u901A\u8FC7`type`\u53D8\u91CF\u8BBF\u95EE\u6D88\u606F\u7C7B\u578B
    • \u901A\u8FC7`dataType`\u53D8\u91CF\u8BBF\u95EE\u6570\u636E\u7C7B\u578B
    ",mapping:{label:"\u5B57\u6BB5-\u8868\u8FBE\u5F0F\u6620\u5C04\u5217\u8868",desc:"Key:\u5B57\u6BB5\u540D,Value:\u8F6C\u6362\u8868\u8FBE\u5F0F\u3002\u5982\u679C\u4E0D\u662F\u8868\u8FBE\u5F0F\uFF0C\u4F7F\u7528\u5355\u5F15\u53F7\uFF0C\u5982\uFF1A'xx'"},isNew:{label:"\u662F\u5426\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868",desc:"true:\u521B\u5EFA\u65B0\u7684\u5143\u6570\u636E\u5217\u8868,false:\u66F4\u65B0\u5BF9\u5E94\u7684\u5143\u6570\u636Ekey"}},jsTransform:{label:"js\u8F6C\u6362",desc:"
    • \u811A\u672C\u8F6C\u6362\u5668
    • \u53EF\u4EE5\u4F7F\u7528JavaScript\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A
    ",jsScript:{label:"function Transform(msg, metadata, msgType) {",desc:"}"}},net:{label:"TCP/UDP",icon:Mn+"/images/net.svg",desc:"
    • TCP/UDP\u5BA2\u6237\u7AEF
    • \u628Amsg\u53D1\u9001\u5230\u6307\u5B9A\u534F\u8BAE\u7F51\u7EDC\u670D\u52A1\u5668
    • \u652F\u6301\u534F\u8BAE\uFF1Atcp\u3001udp\u3001ip4:1\u3001ip6:ipv6-icmp\u3001ip6:58\u3001unix\u3001unixgram\uFF0C\u4EE5\u53CAnet\u5305\u652F\u6301\u7684\u534F\u8BAE\u7C7B\u578B
    ",protocol:{label:"\u534F\u8BAE",desc:"tcp/udp",rules:[{required:!0,message:"\u534F\u8BAE\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"TCP",value:"tcp"},{label:"UDP",value:"udp"}]}},server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B:127.0.0.1:6335"},connectTimeout:{label:"\u8FDE\u63A5\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA460"},heartbeatInterval:{label:"\u5FC3\u8DF3\u95F4\u9694\uFF0C\u5355\u4F4D\u79D2\uFF0C0\u4E0D\u53D1\u9001\u5FC3\u8DF3"}},flow:{label:"\u5B50\u89C4\u5219\u94FE",desc:"",targetId:{label:"\u5B50\u89C4\u5219\u94FEID",desc:"",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:async function(t,e,n,r){var i;if(!r){let o=[];try{let a=await fetch(((i=t.getEditorSetting())==null?void 0:i.url)+"/api/v1/rules?root=false").then(s=>s.json());a==null||a.items.forEach(s=>{o.push({value:s.ruleChain.id,label:s.ruleChain.name})})}catch{}finally{n.component.options=o}}}}},extend:{label:"\u7EE7\u627F\u6A21\u5F0F",desc:"\u5982\u679C\u5F00\u542F\uFF0C\u4E0D\u5408\u5E76\u5B50\u89C4\u5219\u94FE\u8F93\u51FA\u5173\u7CFB\u548C\u6D88\u606F",rules:[{required:!0,message:"\u5B50\u89C4\u5219\u94FEID\u662F\u5FC5\u987B\u7684"}]}},ref:{label:"\u8282\u70B9\u5F15\u7528",icon:Mn+"/images/ref.svg",relationTypeAllowCreate:!0,relationTypes:[{label:"\u6210\u529F",value:"Success"},{label:"\u5931\u8D25",value:"Failure"},{label:"\u771F",value:"True"},{label:"\u5047",value:"False"}],desc:"
    • \u8282\u70B9\u5F15\u7528
    • \u5F15\u7528\u6307\u5B9A\u89C4\u5219\u94FE\u6216\u8005\u5F53\u524D\u89C4\u5219\u94FE\u8282\u70B9\uFF0C\u7528\u4E8E\u8282\u70B9\u590D\u7528
    ",targetId:{label:"\u8282\u70B9ID",desc:"\u5F15\u7528\u672C\u89C4\u5219\u94FE\u4E2D\u7684\u5176\u4ED6\u8282\u70B9",rules:[{required:!0,message:"\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,loadData:FO}}},groupFilter:{label:"\u8FC7\u6EE4\u5668\u7EC4",icon:Mn+"/images/groupFilter.svg",desc:"
    • \u8FC7\u6EE4\u5668\u8282\u70B9\u7EC4
    • \u628A\u591A\u4E2AFilter\u8282\u70B9\u7EC4\u6210\u4E00\u4E2A\u5206\u7EC4
    ",allMatches:{label:"\u662F\u5426\u9700\u8981\u5168\u5339\u914D",desc:""},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:FO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},groupAction:{label:"\u8282\u70B9\u7EC4",desc:"
    • \u5F02\u6B65\u6267\u884C\u591A\u4E2A\u8282\u70B9\uFF0C\u628A\u6240\u6709\u8282\u70B9\u7ED3\u679C\u5408\u5E76\uFF0C\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
    • \u5982\u679C\u5339\u914D\u5230\u6307\u5B9A\u6570\u91CF\u8282\u70B9\u90FD\u662F\u6307\u5B9A\u5173\u7CFB\u7C7B\u578B\uFF0C\u5219\u628A\u6570\u636E\u5230`Success`\u94FE, \u5426\u5219\u53D1\u5230`Failure`\u94FE
    ",icon:Mn+"/images/groupAction.svg",matchRelationType:{label:"\u5339\u914D\u5173\u7CFB\uFF0C\u9ED8\u8BA4Success",desc:""},matchNum:{label:"\u5339\u914D\u6EE1\u8DB3\u8282\u70B9\u6570\u91CF\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u8868\u793A\u6240\u6709\u8282\u70B9\u90FD\u6EE1\u8DB3\u6307\u5B9A\u5173\u7CFB"},nodeIds:{label:"\u7EC4\u5185\u8282\u70B9ID\u5217\u8868",desc:"",rules:[{required:!0,message:"\u7EC4\u5185\u8282\u70B9ID\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!1,multiple:!0,loadData:FO}},timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},iterator:{label:"\u8FED\u4EE3\u5668",desc:"
    • \u5F03\u7528\uFF0C\u4F7F\u7528for\u7EC4\u4EF6\u4EE3\u66FF
    • \u904D\u5386msg\u6216\u8005msg\u4E2D\u6307\u5B9A\u5B57\u6BB5item\u503C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u904D\u5386\u5B57\u6BB5\u503C\u5FC5\u987B\u662F`\u6570\u7EC4`\u6216\u8005`{key:value}`\u7C7B\u578B
    • \u5982\u679Citem\u6EE1\u8DB3jsScript\uFF0C\u5219\u4F1A\u628Aitem\u6570\u636E\u901A\u8FC7`True`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\uFF0C\u5426\u5219\u901A\u8FC7`False`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
    • \u5982\u679C\u627E\u4E0D\u5230\u6307\u5B9A\u5B57\u6BB5\u3001js\u811A\u672C\u6267\u884C\u5931\u8D25\u6216\u8005\u904D\u5386\u7684\u5BF9\u8C61\u4E0D\u662F `\u6570\u7EC4`\u6216\u8005`{key:value}`\uFF0C\u5219\u4F1A\u628A\u9519\u8BEF\u4FE1\u606F\u901A\u8FC7`Failure`\u94FE\u53D1\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
    • \u904D\u5386\u7ED3\u675F\u540E\uFF0C\u901A\u8FC7`Success`\u94FE\u628A\u539F\u59CBmsg\u53D1\u9001\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9
    ",icon:Mn+"/images/iterator.svg",fieldName:{label:"\u904D\u5386\u5B57\u6BB5",desc:"\u5982\u679C\u7A7A\uFF0C\u904D\u5386\u6574\u4E2Amsg\uFF0C\u652F\u6301\u5D4C\u5957\u65B9\u5F0F\u83B7\u53D6msg\u5B57\u6BB5\u503C\uFF0C\u4F8B\u5982items.value\u3001items"},jsScript:{label:"function Filter(item,index,metadata) {",desc:"} \u5339\u914Ditem\u7684js\u811A\u672C\uFF0C\u53EF\u9009\uFF0C\u5982\u679C\u7A7A\u5219\u904D\u5386\u6240\u6709item"}},join:{label:"\u5408\u5E76",desc:"
    • \u5408\u5E76\u591A\u4E2A\u5F02\u6B65\u8282\u70B9\u6267\u884C\u7ED3\u679C
    ",icon:Mn+"/images/join.svg",timeout:{label:"\u7EC4\u5185\u6267\u884C\u8D85\u65F6\uFF0C\u5355\u4F4D\u79D2\uFF0C\u9ED8\u8BA40",desc:"\u9ED8\u8BA40\uFF0C\u4EE3\u8868\u4E0D\u8D85\u65F6"}},fork:{label:"\u5E76\u884C\u7F51\u5173",desc:"
    • \u628A\u6D41\u5206\u6210\u591A\u4E2A\u5E76\u884C\u6267\u884C\u7684\u8DEF\u5F84
    ",icon:Mn+"/images/fork.svg"},"text/template":{label:"\u6A21\u677F\u8F6C\u6362",icon:Mn+"/images/template.svg",desc:"",template:{label:"\u6A21\u677F\u5185\u5BB9\u6216\u8005\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u662F\u6A21\u677F\u6587\u4EF6\u8DEF\u5F84\u4F7F\u7528file:\u5F00\u5934",component:{type:"codeEditor"}}},exec:{label:"\u547D\u4EE4\u884C",icon:Mn+"/images/ssh.svg",desc:"
    • \u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4
    ",cmd:{label:"\u6267\u884C\u547D\u4EE4",desc:"",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"x/redisClient":{label:"Redis",icon:Mn+"/images/redis.svg",desc:"
    • redis\u5BA2\u6237\u7AEF
    • \u53EF\u4EE5\u6267\u884Credis\u547D\u4EE4
    ",server:{label:"redis\u670D\u52A1\u5668\u5730\u5740",desc:"",rules:[{required:!0,message:"redis\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},password:{label:"\u5BC6\u7801",desc:""},poolSize:{label:"\u8FDE\u63A5\u6C60\u5927\u5C0F",desc:""},db:{label:"\u6570\u636E\u5E93\u7F16\u53F7",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"},{type:"integer",required:!0,message:"\u5FC5\u987B\u662F\u6574\u578B"}],desc:"\u9ED8\u8BA40"},cmd:{label:"\u6267\u884C\u547D\u4EE4\uFF0C\u4F8B\u5982SET/GET/DEL/HMSET/HMGET",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377",rules:[{required:!0,message:"\u6267\u884C\u547D\u4EE4\u662F\u5FC5\u987B\u7684"}]},paramsExpr:{label:"\u547D\u4EE4\u52A8\u6001\u53C2\u6570",desc:'\u652F\u6301Expr\u8868\u8FBE\u5F0F\u3002\u5982:["myhash2", "field1", "value1"]\uFF0C\u6216\u8005\u901A\u8FC7\u53D8\u91CF\u53D6\u503C\u5982:msg\u8868\u793A\u53D6\u6D88\u606F\u8D1F\u8377\u3002\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u548C\u547D\u4EE4\u9759\u6001\u53C2\u6570\uFF0C\u4F18\u5148\u53D6\u547D\u4EE4\u52A8\u6001\u53C2\u6570\u503C\u3002'},params:{label:"\u547D\u4EE4\u9759\u6001\u53C2\u6570",desc:"\u652F\u6301${metadata.key}\u5360\u4F4D\u7B26\u8BFB\u53D6metadata\u5143\u6570\u636E\uFF0C\u652F\u6301${msg.key}\u5360\u4F4D\u7B26\u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9Akey\u6570\u636E\uFF0C\u652F\u6301${data}\u83B7\u53D6\u6D88\u606F\u539F\u59CB\u8D1F\u8377"}},"x/luaFilter":{label:"Lua\u811A\u672C\u8FC7\u6EE4",icon:Mn+"/images/lua.svg",desc:"
    • \u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8FC7\u6EE4\u3002\u6839\u636E\u811A\u672C\u8FD4\u56DE\u503C\u8DEF\u7531\u5230True\u6216\u8005False\u94FE\u3002
    • \u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C
    ",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/luaTransform":{label:"Lua\u811A\u672C\u8F6C\u6362",icon:Mn+"/images/lua.svg",desc:"
    • lua\u811A\u672C\u8F6C\u6362\u5668\u3002\u53EF\u4EE5\u4F7F\u7528Lua\u811A\u672C\u5BF9msg\u3001metadata\u3001msgType\u8FDB\u884C\u8F6C\u6362\u6216\u589E\u5F3A\u3002
    • \u4E5F\u53EF\u4EE5\u4F7F\u7528lua\u811A\u672C\uFF0C\u8FDB\u884C\u4F8B\u5982\uFF1A\u52A0\u89E3\u5BC6\u3001I/O\u3001\u7F51\u7EDC\u3001\u6587\u4EF6\u7B49\u9AD8\u7EA7\u64CD\u4F5C
    ",script:{label:"\u811A\u672C\u51FD\u6570\u4F53\u6216\u8005\u662F\u811A\u672C\u6587\u4EF6\u8DEF\u5F84",desc:"\u53EA\u9700\u8981\u63D0\u4F9B\u51FD\u6570\u4F53\u5185\u5BB9\uFF0C\u5982\u679C\u662F\u6587\u4EF6\u8DEF\u5F84\uFF0C\u5219\u9700\u8981\u63D0\u4F9B\u5B8C\u6574\u7684\u811A\u672C\u51FD\u6570"}},"x/natsClient":{label:"NATS",icon:Mn+"/images/nats.svg",desc:"
    • nats\u5BA2\u6237\u7AEF
    • \u5F80nats server \u6307\u5B9A\u4E3B\u9898\u53D1\u5E03\u5F53\u524D\u6D88\u606F\u6570\u636E
    ",topic:{label:"\u53D1\u5E03\u4E3B\u9898",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},server:{label:"NATS\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: nats://127.0.0.1:4222",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""}},"x/rabbitmqClient":{label:"RabbitMQ",icon:Mn+"/images/rabbitmq.svg",desc:'
    • \u53D1\u6D88\u606F\u8D1F\u8377\u53D1\u9001\u5230rabbitmq\u961F\u5217
    • \u652F\u6301AMQP\u534F\u8BAE
    • \u5E2E\u52A9\u6587\u6863
    ',server:{label:"\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u683C\u5F0F:amqp://[\u7528\u6237\u540D:\u5BC6\u7801]@host/[\u865A\u62DF\u673A\u540D\u79F0]",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},key:{label:"\u8DEF\u7531\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},exchange:{label:"\u4EA4\u6362\u673A\u540D\u79F0",desc:""},exchangeType:{label:"\u4EA4\u6362\u673A\u7C7B\u578B",desc:"\u53EF\u9009\u7C7B\u578B\uFF1Adirect/fanout/headers/topic"},durable:{label:"\u662F\u5426\u6301\u4E45\u5316",desc:""},autoDelete:{label:"\u662F\u5426\u81EA\u52A8\u5220\u9664",desc:""}},"x/opengeminiWrite":{label:"opengemini\u5199",icon:Mn+"/images/opengemini-write.svg",desc:"
    • opengemini\u5199\u5BA2\u6237\u7AEF
    • \u628A\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u5199\u5165 OpenGemini \u670D\u52A1\u5668
    ",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"}},"x/opengeminiQuery":{label:"opengemini\u8BFB",icon:Mn+"/images/opengemini.svg",desc:"
    • opengemini\u8BFB\u5BA2\u6237\u7AEF
    • \u4ECEOpenGemini\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E
    ",server:{label:"opengemini\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3\uFF0C\u591A\u4E2A\u670D\u52A1\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u6570\u636E\u5E93\u662F\u5FC5\u987B\u7684"}]},username:{label:"\u7528\u6237\u540D",desc:""},password:{label:"\u5BC6\u7801",desc:""},token:{label:"Token",desc:"\u5982\u679CToken\u4E0D\u4E3A\u7A7A\uFF0C\u4F7F\u7528Token\u8BA4\u8BC1"},command:{label:"\u67E5\u8BE2\u8BED\u53E5",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u4F8B\u5982\uFF1A${metadata.key}\u3001${msg.key}",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]}},"x/grpcClient":{label:"gRPC \u5BA2\u6237\u7AEF",icon:Mn+"/images/grpc.svg",desc:"
    • \u52A8\u6001\u8C03\u7528gRPC\u670D\u52A1
    • <
    ",server:{label:"gRPC\u670D\u52A1\u5730\u5740",desc:"\u683C\u5F0F: \u4E3B\u673A\u540D:\u7AEF\u53E3",rules:[{required:!0,message:"\u670D\u52A1\u5730\u5740\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},service:{label:"\u670D\u52A1\u540D\u79F0",desc:"\u793A\u4F8B\uFF1Ahelloworld.Greeter\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u670D\u52A1\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},method:{label:"\u65B9\u6CD5\u540D\u79F0",desc:"\u793A\u4F8B\uFF1ASayHello\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u65B9\u6CD5\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},request:{label:"\u8BF7\u6C42\u53C2\u6570\u5185\u5BB9",desc:'\u793A\u4F8B\uFF1A{"name":"lala"}\u3002\u5982\u679C\u7A7A\uFF0C\u5219\u4F7F\u7528\u5F53\u524D\u6D88\u606F\u8D1F\u8377\u3002\u53C2\u6570\u4F7F\u7528JSON\u7F16\u7801\uFF0C\u5FC5\u987B\u548Cservice/method\u8981\u6C42\u4E00\u81F4\u3002\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF'},headers:{label:"\u8BF7\u6C42\u5934",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF"}},"x/mongodbClient":{label:"MongoDB",icon:Mn+"/images/mongodb.svg",desc:"
    • MongoDB \u5BA2\u6237\u7AEF
    • \u53EF\u4EE5\u5BF9MongoDB\u8FDB\u884C\u589E\u5220\u4FEE\u6539\u67E5\u64CD\u4F5C
    ",server:{label:"MongoDB\u670D\u52A1\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u5141\u8BB8\u9009\u62E9\u8FDE\u63A5\u6C60\u8FDB\u884C\u8FDE\u63A5",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},database:{label:"\u6570\u636E\u5E93",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},collection:{label:"\u96C6\u5408",desc:"\u5141\u8BB8\u4F7F\u7528 ${} \u5360\u4F4D\u7B26\u53D8\u91CF",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},opType:{label:"\u64CD\u4F5C\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u63D2\u5165",value:"INSERT"},{label:"\u67E5\u8BE2",value:"QUERY"},{label:"\u66F4\u65B0",value:"UPDATE"},{label:"\u5220\u9664",value:"DELETE"}]},rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},filter:{label:"\u8FC7\u6EE4\u6761\u4EF6",desc:'\u67E5\u8BE2\u662F\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"age"": {"$gte": 18 }\u3002'},doc:{label:"\u66F4\u65B0/\u63D2\u5165\u6587\u6863",desc:'\u67E5\u8BE2\u6216\u8005\u5220\u9664\u53EF\u4E3A\u7A7A\u3002\u5141\u8BB8Expr\u8868\u8FBE\u5F0F\uFF0C\u793A\u4F8B\uFF1A{"name":"test","age":18}\u3002'},one:{label:"\u662F\u5426\u64CD\u4F5C1\u6761\u8BB0\u5F55",desc:""}},"x/kafkaProducer":{label:"Kafka",icon:"/images/kafka.svg",desc:"
    • Kafka\u751F\u4EA7\u8005\u7EC4\u4EF6\u3002\u7528\u4E8E\u5C06\u6D88\u606F\u53D1\u5E03\u5230Kafka\u6307\u5B9A\u4E3B\u9898\u3002
    ",server:{label:"kafka\u670D\u52A1\u5668\u5730\u5740",desc:"\u591A\u4E2A\u670D\u52A1\u5668\u5730\u5740\u7528\u9017\u53F7\u9694\u5F00\uFF0C\u5982: 127.0.0.1:9092,127.0.0.2:9092",rules:[{required:!0,message:"\u670D\u52A1\u5668\u5730\u5740\u662F\u5FC5\u987B\u7684"}]},topic:{label:"\u53D1\u5E03\u4E3B\u9898",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362",rules:[{required:!0,message:"\u4E3B\u9898\u662F\u5FC5\u987B\u7684"}]},key:{label:"\u5206\u533A\u952E",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},partition:{label:"\u5206\u533A\u7F16\u53F7",desc:""}},"ai/createImage":{label:"AI\u56FE\u50CF\u751F\u6210",icon:"/images/generate-image.svg",desc:'',url:{label:"API\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"dall-e-3",value:"dall-e-3"},{label:"dall-e-2",value:"dall-e-2"}]}},prompt:{label:"\u56FE\u50CF\u751F\u6210\u7684\u63D0\u793A",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"textarea"}},n:{label:"\u751F\u6210\u56FE\u50CF\u7684\u6570\u91CF",desc:"",component:{type:"slider",showInput:!0,showTooltip:!0,min:1,max:10,step:1}},responseFormat:{label:"\u54CD\u5E94\u683C\u5F0F",desc:"\u9ED8\u8BA4:url",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"url",value:"url"},{label:"b64_json",value:"b64_json"}]}},quality:{label:"\u56FE\u50CF\u8D28\u91CF",desc:"\u9ED8\u8BA4:standard",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"standard",value:"standard"},{label:"hd",value:"hd"}]}},size:{label:"\u56FE\u50CF\u5C3A\u5BF8",desc:"\u9ED8\u8BA4:1024x1024",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"256x256",value:"256x256"},{label:"512x512",value:"512x512"},{label:"1024x1024",value:"1024x1024"},{label:"1792x1024",value:"1792x1024"},{label:"1024x1792",value:"1024x1792"}]}},style:{label:"\u56FE\u50CF\u98CE\u683C",desc:"\u9ED8\u8BA4:vivid",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"vivid",value:"vivid"},{label:"natural",value:"natural"}]}}},"ai/llm":{label:"AI\u6587\u672C\u751F\u6210",icon:"/images/generate-text.svg",desc:'',url:{label:"API\u5730\u5740",desc:""},key:{label:"\u6388\u6743\u79D8\u94A5",desc:""},model:{label:"\u6A21\u578B",desc:"\u5141\u8BB8\u624B\u52A8\u8F93\u5165\u6A21\u578B",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"DeepSeek-R1-Distill-Qwen-32B",value:"DeepSeek-R1-Distill-Qwen-32B"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"Qwen2-7B-Instruct",value:"Qwen2-7B-Instruct"},{label:"Qwen2-VL-72B",value:"Qwen2-VL-72B"},{label:"o1-mini",value:"o1-mini"},{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]}},systemPrompt:{label:"\u7CFB\u7EDF\u63D0\u793A",desc:"\u7528\u4E8E\u9884\u5148\u5B9A\u4E49\u6A21\u578B\u7684\u57FA\u7840\u884C\u4E3A\u6846\u67B6\u548C\u54CD\u5E94\u98CE\u683C\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF",component:{type:"textarea"}},messages:{label:"\u4E0A\u4E0B\u6587/\u7528\u6237\u6D88\u606F\u5217\u8868",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"table",options:[{name:"role",label:"\u89D2\u8272",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",multiple:!1,options:[{label:"USER",value:"user"},{label:"ASSISTANT",value:"assistant"}]}},{name:"content",label:"\u6D88\u606F\u5185\u5BB9",type:"string",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"USER\u89D2\u8272\uFF1A\u5411\u6A21\u578B\u63D0\u4F9B\u6307\u4EE4\u3001\u67E5\u8BE2\u6216\u4EFB\u4F55\u57FA\u4E8E\u6587\u672C\u7684\u8F93\u5165\u3002 ASSISTANT\u89D2\u8272\uFF1A\u57FA\u4E8E\u7528\u6237\u6D88\u606F\u7684\u6A21\u578B\u56DE\u590D",component:{type:"textarea"}}]}},images:{label:"\u89C6\u89C9",desc:"\u56FE\u50CFURL\u5217\u8868\uFF0C\u5927\u6A21\u578B\u5C06\u6839\u636E\u56FE\u50CF\u5185\u5BB9\u7684\u7406\u89E3\u56DE\u7B54\u7528\u6237\u95EE\u9898\u3002\u8BE5\u529F\u80FD\u9700\u8981\u5927\u6A21\u578Bapi\u652F\u6301(Qwen2-VL-72B\u652F\u6301\u89C6\u89C9)\u3002\u53EF\u4EE5\u4F7F\u7528${} \u5360\u4F4D\u7B26\u53D8\u91CF"},params:{label:"\u5927\u6A21\u578B\u53C2\u6570",desc:"",temperature:{label:"\u6E29\u5EA6",desc:"\u91C7\u6837\u6E29\u5EA6\u63A7\u5236\u8F93\u51FA\u7684\u968F\u673A\u6027\u3002\u6E29\u5EA6\u503C\u5728 [0.0, 2.0] \u8303\u56F4\u5185\uFF0C\u503C\u8D8A\u9AD8\uFF0C\u8F93\u51FA\u8D8A\u968F\u673A\u548C\u521B\u9020\u6027\uFF1B\u503C\u8D8A\u4F4E\uFF0C\u8F93\u51FA\u8D8A\u7A33\u5B9A\u3002",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:2,step:.1}},topP:{label:"Top P",desc:"\u901A\u8FC7\u6838\u5FC3\u91C7\u6837\u63A7\u5236\u591A\u6837\u6027\uFF1A0.5\u8868\u793A\u8003\u8651\u4E86\u4E00\u534A\u7684\u6240\u6709\u53EF\u80FD\u6027\u52A0\u6743\u9009\u9879\u3002\u53D6\u503C\u8303\u56F4\uFF1A[0.0, 1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},presencePenalty:{label:"\u5B58\u5728\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u5DF2\u6709\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},frequencyPenalty:{label:"\u9891\u7387\u60E9\u7F5A",desc:"\u5BF9\u6587\u672C\u4E2D\u51FA\u73B0\u7684\u6807\u8BB0\u7684\u5BF9\u6570\u6982\u7387\u65BD\u52A0\u60E9\u7F5A\u3002\u53D6\u503C\u8303\u56F4[0.0,1.0]",component:{type:"slider",showInput:!0,showTooltip:!0,min:0,max:1,step:.1}},maxTokens:{label:"\u6700\u5927\u8F93\u51FA\u957F\u5EA6",desc:"",component:{type:"input-number",min:0,max:1e6,step:10}},stop:{label:"\u6A21\u578B\u505C\u6B62\u8F93\u51FA\u7684\u6807\u8BB0",desc:""},responseFormat:{label:"\u8F93\u51FA\u7ED3\u679C\u7684\u683C\u5F0F",desc:"\u53D6\u503C\uFF1Atext\u3001json_object\u3001json_schema\u3002\u9ED8\u8BA4\u4E3A text\u3002",component:{type:"select",multiple:!1,options:[{label:"text",value:"text"},{label:"json_object",value:"json_object"},{label:"json_schema",value:"json_schema"}]}},jsonSchema:{label:"JSON Schema",desc:"",component:{type:"codeEditor"}},keepThink:{label:"\u662F\u5426\u4FDD\u7559\u8F93\u51FA\u601D\u8003\u8FC7\u7A0B",desc:"\u53EA\u5BF9text\u54CD\u5E94\u683C\u5F0F\u751F\u6548"}}},"ci/exec":{label:"\u547D\u4EE4\u884C",icon:Mn+"/images/ssh.svg",desc:"
    • \u53EA\u6267\u884C\u7CFB\u7EDF\u767D\u540D\u5355\u7684\u547D\u4EE4
    ",command:{label:"\u6267\u884C\u547D\u4EE4",desc:""},args:{label:"\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"},log:{label:"\u6253\u5370\u6807\u51C6\u8F93\u51FA",desc:""},replaceData:{label:"\u66FF\u6362Data",desc:"\u628AData\u66FF\u6362\u4E3A\u6807\u51C6\u8F93\u51FA\uFF0C\u9ED8\u8BA4\u4E3Afalse"}},"ci/gitClone":{label:"Git\u62C9\u53D6",icon:Mn+"/images/git.svg",desc:"
    • git\u514B\u9686\u6216\u8005\u62C9\u53D6\u4ED3\u5E93\u4EE3\u7801
    ",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u514B\u9686\u5230\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},reference:{label:"\u5F15\u7528\u540D\u79F0",desc:"\u53EF\u4EE5\u662F\u5206\u652F\u540D\u3001\u6807\u7B7E\u540D\u5B8C\u6574\u5F15\u7528\u540D\u3002\u4F8B\u5982\uFF1Arefs/heads/main\u3002\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2Dref\u503C"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406URL",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitPush":{label:"Git\u63A8\u9001",icon:Mn+"/images/git-push.svg",desc:"
    • git\u63A8\u9001
    ",repository:{label:"\u4ED3\u5E93\u5730\u5740",desc:"\u793A\u4F8B:https://github.com/sagoo-cloud/sagooiot.git"},directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},refSpecs:{label:"\u672C\u5730\u5206\u652F\u4E0E\u8FDC\u7A0B\u5206\u652F\u6620\u5C04\u5173\u7CFB",desc:"\u4F8B\u5982\uFF1Arefs/heads/your-branch:refs/heads/your-branch\uFF0C\u591A\u4E2A\u6620\u5C04\u5173\u7CFB\u4E0E\u9017\u53F7\u9694\u5F00"},authType:{label:"\u8BA4\u8BC1\u7C7B\u578B",desc:"\u53EF\u4EE5\u662F:ssh/password/token"},authUser:{label:"\u7528\u6237\u540D",desc:""},authPassword:{label:"\u5BC6\u7801\u6216 token",desc:"\u5BC6\u7801\u6216 token"},authPemFile:{label:"\u79D8\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:""},proxyUrl:{label:"\u4EE3\u7406\u5730\u5740",desc:""},proxyUsername:{label:"\u4EE3\u7406\u7528\u6237\u540D",desc:""},proxyPassword:{label:"\u4EE3\u7406\u5BC6\u7801",desc:""}},"ci/gitCommit":{label:"Git\u63D0\u4EA4",icon:Mn+"/images/git-commit.svg",desc:'
    • git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},pattern:{label:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F",desc:"\u5FC5\u987B\u5F53\u524D\u5DE5\u4F5C\u533A\u76F8\u5BF9\u76EE\u5F55\u3002\u4F8B\u5982\uFF1A/example/*.go",rules:[{required:!0,message:"\u6DFB\u52A0\u7684\u6587\u4EF6\u5339\u914D\u6A21\u5F0F\u662F\u5FC5\u987B\u7684"}]},message:{label:"Git\u63D0\u4EA4",desc:"",rules:[{required:!0,message:"\u63D0\u4EA4\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/gitCreateTag":{label:"Git\u521B\u5EFA\u6807\u7B7E",icon:Mn+"/images/git-tag.svg",desc:'
    • git\u63D0\u4EA4\uFF0C\u5982\u679C\u6587\u4EF6\u6CA1\u53D8\u66F4\u5219\u8F6C\u53D1\u5230\u5931\u8D25\u94FE
    • \u5E2E\u52A9\u6587\u6863
    ',directory:{label:"\u672C\u5730\u76EE\u5F55",desc:"\u9ED8\u8BA4\u53D6\u5143\u6570\u636E\u4E2DworkDir\u503C"},tag:{label:"\u6807\u7B7E\u540D\u79F0",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u540D\u79F0\u662F\u5FC5\u987B\u7684"}]},message:{label:"\u6807\u7B7E\u6D88\u606F",desc:"",rules:[{required:!0,message:"\u6807\u7B7E\u6D88\u606F\u662F\u5FC5\u987B\u7684"}]},signature:{label:"\u4F5C\u8005\u4FE1\u606F",desc:"",authorName:{label:"\u4F5C\u8005\u540D\u79F0",desc:""},authorEmail:{label:"\u4F5C\u8005\u90AE\u7BB1",desc:""}}},"ci/ps":{label:"\u670D\u52A1\u5668\u6307\u6807",icon:Mn+"/images/ps.svg",desc:'\u7528\u4E8E\u76D1\u63A7\u670D\u52A1\u5668CPU\u3001\u5185\u5B58\u3001\u78C1\u76D8\u7B49\u6307\u6807\u3002\u5E2E\u52A9\u6587\u6863',options:{label:"\u6307\u6807\u5217\u8868",desc:"\u5982\u679C\u4E3A\u7A7A\uFF0C\u5219\u67E5\u8BE2\u6240\u6709\u6307\u6807",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!0,options:[{label:"\u4E3B\u673A\u4FE1\u606F",value:"host/info"},{label:"CPU\u4FE1\u606F",value:"cpu/info"},{label:"\u865A\u62DF\u5185\u5B58\u4FE1\u606F",value:"mem/virtualMemory"},{label:"\u4EA4\u6362\u5185\u5B58\u4FE1\u606F",value:"mem/swapMemory"},{label:"\u78C1\u76D8\u4F7F\u7528\u60C5\u51B5",value:"disk/usage"},{label:"\u78C1\u76D8IO\u8BA1\u6570\u5668\u4FE1\u606F",value:"disk/ioCounters"},{label:"\u7F51\u7EDCIO\u8BA1\u6570\u5668\u4FE1\u606F",value:"net/ioCounters"},{label:"\u7F51\u7EDC\u63A5\u53E3\u4FE1\u606F",value:"net/interfaces"}],placeholder:"\u8BF7\u9009\u62E9\u67E5\u8BE2\u6307\u6807"}}},"action/sagoo/deviceaction":{label:"\u8BBE\u5907\u52A8\u4F5C",icon:Mn+"/images/deviceaction.svg",desc:"\u7528\u4E8E\u6267\u884C\u8BBE\u5907\u7684\u64CD\u4F5C",productKey:{label:"\u9009\u62E9\u4EA7\u54C1",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",optionApi:"/product/list",autoGetData:!0,resDataKey:"product",resDataLabelKey:"name",resDataValueKey:"key",onChangeGetDataKey:"deviceKey",filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u4EA7\u54C1",multiple:!1,options:[]}},deviceKey:{label:"\u9009\u62E9\u8BBE\u5907",desc:"",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],component:{type:"select",autoGetData:!1,optionApi:"/product/device/list",resDataKey:"device",getDataByKey:"productKey",resDataLabelKey:"name",resDataValueKey:"key",apiParams:{productKey:""},filterable:!0,allowCreate:!1,placeholder:"\u8BF7\u9009\u62E9\u8BBE\u5907",multiple:!1,options:[],defineOptions:[{label:"\u5168\u90E8",value:"all"}]}},triggerType:{label:"\u64CD\u4F5C\u7C7B\u578B",desc:"",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u8BBE\u5907\u529F\u80FD\u8C03\u7528",value:"functionCall"},{label:"\u83B7\u53D6\u8BBE\u5907\u5C5E\u6027",value:"getProperties"},{label:"\u8BBE\u7F6E\u8BBE\u5907\u5C5E\u6027",value:"setProperties"}],placeholder:"\u8BF7\u9009\u62E9\u64CD\u4F5C\u7C7B\u578B"}},funcKey:{label:"\u529F\u80FD\u6807\u8BC6",desc:"\u5E73\u53F0\u8BBE\u7F6E\u7684\u529F\u80FD\u7684Key"},parameter:{label:"\u8BF7\u6C42\u53C2\u6570",desc:"\u53EF\u4EE5\u4F7F\u7528 ${metadata.key} \u8BFB\u53D6\u5143\u6570\u636E\u4E2D\u7684\u53D8\u91CF\u6216\u8005\u4F7F\u7528 ${msg.key} \u8BFB\u53D6\u6D88\u606F\u8D1F\u8377\u4E2D\u7684\u53D8\u91CF\u8FDB\u884C\u66FF\u6362"}},"x/opcuaRead":{label:"OPC_UA\u8BFB",icon:"/images/opcua_read.svg",category:"external",desc:"
    • \u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcuaWrite":{label:"OPC_UA\u5199",icon:"/images/opcua_write.svg",category:"external",desc:"
    • \u628A\u6D88\u606F\u8D1F\u8377\u70B9\u4F4D\u6570\u636E\u5217\u8868\uFF0C\u5199\u5165OPCUA\u670D\u52A1\u5668\u3002
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}}},"x/opcua":{label:"OPC_UA\u8BA2\u9605",icon:"/images/endpoint/opcua.svg",category:"external",notInput:!0,nodeType:"endpoint-node",desc:"
    • \u5B9A\u65F6\u4ECEOPCUA\u670D\u52A1\u5668\u8BFB\u53D6\u6570\u636E\u3002
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u793A\u4F8B: opc.tcp://localhost:4840",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},interval:{label:"\u8BFB\u4EFB\u52A1\u65F6\u95F4\u914D\u7F6E",desc:"\u793A\u4F8B: @every 1m (\u6BCF\u96941\u5206\u949F) 0 0 0 * * * (\u51CC\u666812\u70B9\u89E6\u53D1)",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},nodeIds:{label:"\u8282\u70B9ID\u5217\u8868",desc:"\u793A\u4F8B:ns=3;i=1003",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},auth:{label:"\u6388\u6743\u65B9\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"\u533F\u540D",value:"anonymous"},{label:"\u7528\u6237\u540D",value:"username"},{label:"\u8BC1\u4E66",value:"certificate"}]}},username:{label:"\u7528\u6237\u540D",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},password:{label:"\u5BC6\u7801",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u7528\u6237\u540D\u9700\u8981\u586B\u5199"},certFile:{label:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},certKeyFile:{label:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84",desc:"\u5982\u679C\u6388\u6743\u65B9\u5F0F\u662F\u8BC1\u4E66\u9700\u8981\u586B\u5199"},mode:{label:"\u6A21\u5F0F",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Sign",value:"sign"},{label:"Signandencrypt",value:"signandencrypt"}]}},policy:{label:"\u7B56\u7565",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"Auto",value:"auto"},{label:"None",value:"none"},{label:"Basic128Rsa15",value:"Basic128Rsa15"},{label:"Basic256",value:"Basic256"},{label:"Basic256Sha256",value:"Basic256Sha256"},{label:"Aes128_Sha256_RsaOaep",value:"Aes128_Sha256_RsaOaep"},{label:"Aes256_Sha256_RsaPss",value:"Aes256_Sha256_RsaPss"}]}},router:{hide:!0}},"x/modbus":{label:"Modbus\u8BFB\u5199",icon:"/images/modbus.svg",category:"external",desc:"
    • \u83B7\u53D6\u6D88\u606F\u8D1F\u8377\u6307\u5B9A\u8282\u70B9\u5217\u8868\u70B9\u4F4D\u6570\u636E\uFF0C\u5E76\u901A\u8FC7Success\u94FE\u8F6C\u5230\u4E0B\u4E00\u4E2A\u8282\u70B9\u3002
    • \u5E2E\u52A9\u6587\u6863
    ",server:{label:"\u670D\u52A1\u5668\u5730\u5740",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u670D\u52A1\u5668\u5730\u5740\uFF0C\u683C\u5F0F\u4E3A\uFF1A:// \u793A\u4F8B: tcp://hostname-or-ip-address:502; rtu:///dev/ttyUSB0",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1}},cmd:{label:"Modbus\u65B9\u6CD5\u540D\u79F0",desc:"Modbus\u547D\u4EE4\u540D\u79F0",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u8BFB\u53D6\u7EBF\u5708\u72B6\u6001",value:"ReadCoils"},{label:"\u8BFB\u53D6\u5355\u4E2A\u7EBF\u5708\u72B6\u6001",value:"ReadCoil"},{label:"\u8BFB\u53D6\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInputs"},{label:"\u8BFB\u53D6\u5355\u4E2A\u79BB\u6563\u8F93\u5165\u72B6\u6001",value:"ReadDiscreteInput"},{label:"\u8BFB\u53D6\u5BC4\u5B58\u5668",value:"ReadRegisters"},{label:"\u8BFB\u53D6\u5355\u4E2A\u5BC4\u5B58\u5668",value:"ReadRegister"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"ReadUint32"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"ReadFloat32"},{label:"\u8BFB\u53D6\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"ReadUint64"},{label:"\u8BFB\u53D6\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64s"},{label:"\u8BFB\u53D6\u5355\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"ReadFloat64"},{label:"\u8BFB\u53D6\u5B57\u8282\u6570\u636E",value:"ReadBytes"},{label:"\u8BFB\u53D6\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"ReadRawBytes"},{label:"\u5199\u5165\u7EBF\u5708\u72B6\u6001",value:"WriteCoil"},{label:"\u5199\u5165\u591A\u4E2A\u7EBF\u5708\u72B6\u6001",value:"WriteCoils"},{label:"\u5199\u5165\u5BC4\u5B58\u5668",value:"WriteRegister"},{label:"\u5199\u5165\u591A\u4E2A\u5BC4\u5B58\u5668",value:"WriteRegisters"},{label:"\u5199\u5165\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F732\u4F4D\u6574\u6570",value:"WriteUint32s"},{label:"\u5199\u5165\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657032\u4F4D",value:"WriteFloat32s"},{label:"\u5199\u5165\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64"},{label:"\u5199\u5165\u591A\u4E2A\u65E0\u7B26\u53F764\u4F4D\u6574\u6570",value:"WriteUint64s"},{label:"\u5199\u5165\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64"},{label:"\u5199\u5165\u591A\u4E2A\u6D6E\u70B9\u657064\u4F4D",value:"WriteFloat64s"},{label:"\u5199\u5165\u5B57\u8282\u6570\u636E",value:"WriteBytes"},{label:"\u5199\u5165\u539F\u59CB\u5B57\u8282\u6570\u636E",value:"WriteRawBytes"}]}},unitId:{label:"\u4ECE\u673A\u7F16\u53F7",desc:"\u4F7F\u7528\u7684\u5355\u5143\u7F16\u53F7\uFF08\u4ECE\u673A\u7F16\u53F7\uFF09\uFF0C\u683C\u5F0F\uFF1Auint8\uFF0C\u793A\u4F8B\uFF1A1",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}]},address:{label:"\u5BC4\u5B58\u5668\u5730\u5740",desc:"\u5BC4\u5B58\u5668\u5730\u5740\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u683C\u5F0F\uFF1Auint16\uFF0C\u793A\u4F8B\uFF1A50\u6216\u80050x32"},quantity:{label:"\u5BC4\u5B58\u5668\u6570\u91CF",desc:"\u5BC4\u5B58\u5668\u6570\u91CF\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\uFF0C\u793A\u4F8B\uFF1A1"},value:{label:"\u5BC4\u5B58\u5668\u503C",desc:"\u5BC4\u5B58\u5668\u503C\uFF0C\u5141\u8BB8\u4F7F\u7528${}\u5360\u4F4D\u7B26\u53D8\u91CF\u3002\u8BFB\u5219\u4E0D\u9700\u8981\u63D0\u4F9B\uFF0C\u5982\u679C\u5199\u5165\u591A\u4E2A\u4E0E\u9017\u53F7\u9694\u5F00\uFF0C\u4F8B\u5982\uFF1A0x01,0x01 true 51,52"},regType:{label:"\u5BC4\u5B58\u5668\u7C7B\u578B",desc:"\u5BC4\u5B58\u5668\u7C7B\u578B",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u4FDD\u6301\u5BC4\u5B58\u56680x3",value:"0"},{label:"\u8F93\u5165\u5BC4\u5B58\u56680x4",value:"1"}]}},encodingConfig:{label:"\u7F16\u7801\u914D\u7F6E",desc:"",endianness:{label:"\u5B57\u8282\u5E8F",desc:"\u5BC4\u5B58\u5668\u7684\u5B57\u8282\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u5927\u7AEF\u5E8F",value:1},{label:"\u5C0F\u7AEF\u5E8F",value:2}]}},wordOrder:{label:"\u5B57\u5E8F",desc:"32\u4F4D\u5BC4\u5B58\u5668\u7684\u5B57\u5E8F",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u9AD8\u5B57\u5728\u524D",value:1},{label:"\u4F4E\u5B57\u5728\u524D",value:2}]}}},rtuConfig:{label:"RTU\u914D\u7F6E",desc:"",parity:{label:"\u6821\u9A8C\u4F4D",desc:"\u4E32\u884C\u94FE\u8DEF\u7684\u6821\u9A8C\u6A21\u5F0F\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!1,multiple:!1,options:[{label:"\u65E0\u6821\u9A8C",value:0},{label:"\u5076\u6821\u9A8C",value:1},{label:"\u5947\u6821\u9A8C",value:2}]}},speed:{label:"\u4E32\u884C\u6CE2\u7279\u7387",desc:"\u8BBE\u7F6E\u4E32\u884C\u94FE\u8DEF\u6CE2\u7279\u7387\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09",component:{type:"select",filterable:!0,allowCreate:!0,multiple:!1,options:[{label:"38400",value:38400},{label:"19200",value:19200},{label:"9600",value:9600},{label:"4800",value:4800}]}},dataBits:{label:"\u6570\u636E\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u5B57\u7B26\u7684\u6570\u636E\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"},stopBits:{label:"\u505C\u6B62\u4F4D",desc:"\u8BBE\u7F6E\u4E32\u884C\u505C\u6B62\u4F4D\u6570\uFF08\u4EC5RTU\u6A21\u5F0F\uFF09"}},tcpConfig:{label:"TCP\u914D\u7F6E",desc:"",timeout:{label:"\u8D85\u65F6\u65F6\u95F4",desc:"\u8BBE\u7F6E\u8BF7\u6C42\u8D85\u65F6\u503C\uFF0C\u5355\u4F4D\u4E3A\u79D2"},certPath:{label:"\u8BC1\u4E66\u8DEF\u5F84",desc:"\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"},keyPath:{label:"\u5BC6\u94A5\u8DEF\u5F84",desc:"\u5BC6\u94A5\u6587\u4EF6\u8DEF\u5F84"},caPath:{label:"CA\u8BC1\u4E66\u8DEF\u5F84",desc:"CA\u8BC1\u4E66\u6587\u4EF6\u8DEF\u5F84"}}}}}},DUe="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let SS=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=DUe[n[t]&63];return e};const Ng=(t,e)=>{if(t&&e){let n=_m[e];if(n)return n[t]||t}else if(t)return _m[t]||t;return t},AX=t=>{if(!t)return 0;let e=0;for(let n=0;n=1&&r<=126||r>=65376&&r<=65439?e+=1:e+=1.8}return e},LUe=(t,e)=>{KN(_m,e);let n=JSON.parse(JSON.stringify(_m.category));t.endpoints&&t.endpoints.forEach(r=>{TF(t.builtins,n,r,!0)}),t.nodes||(t.nodes=t),t.nodes.forEach(r=>{TF(t.builtins,n,r,!1)});for(let r in n){let i=n[r];(!i.components||Array.isArray(i.components)&&i.components.length===0)&&delete n[r]}return n},TF=(t,e,n,r)=>{IUe(n,r);let i="";if(r&&!e[n.category])i="endpoints";else{i=n.category.split("/")[0];let a=n.type.split("/")[0];e[a]&&(i=a)}let o=e[i];o?(n.background=n.background||o.background,o.components?o.components.push(n):o.components=[n]):e[i]={label:i,background:"#86B4E5FF",components:[n]},n.category=i,YUe(t,n,i),BUe(n),n.nodeType=n.nodeType||o&&o.nodeType||"simple-node"},IUe=(t,e)=>{let n={};e?n=_m.component.endpoints[t.type]:n=_m.component.nodes[t.type],n?(Object.assign(t,n),t.relationTypes=n.relationTypes||kF(t.relationTypes),"disabled"in n&&(t.disabled=n.disabled),MX(t,n),e&&(t.router=n.router||t.router)):t.relationTypes=kF(t.relationTypes),e&&(t.router=t.router||{},t.hasOwnProperty("notInput")||(t.notInput=!0))},kF=t=>{if(t){let e=[];return t.forEach(n=>{let r=n.value!==void 0&&n.value!==null?n.value:n,i=n.label!==void 0&&n.label!==null?n.label:n;e.push({value:r,label:Ng(i,"relationTypes")})}),e}return t},MX=(t,e)=>{t.fields&&t.fields.forEach(n=>{let r=e[n.name];r&&KN(n,r),n.fields&&r&&MX(n,r)})},BUe=t=>{t.fields&&t.fields.forEach(e=>{e.type.indexOf("int")>-1&&!e.rules?e.rules=[{type:"number",message:"\u5FC5\u987B\u662F\u6570\u503C\u7C7B\u578B"}]:e.type.indexOf("float")>-1&&!e.rules&&(e.rules=[{pattern:/^-?\d+(\.\d+)?$/,message:"\u5FC5\u987B\u662F\u6D6E\u70B9\u7C7B\u578B"}])})},bA=(t,e)=>{let n={};return t&&t.forEach(r=>{r.id===e&&(n=r)}),n},FUe=(t,e,n)=>{let r=null;return t&&t.forEach(i=>{i.sourceNodeId===e&&i.targetNodeId===n&&(r=i)}),r},VUe=(t,e,n)=>{let r={id:"edge_"+t.edgeCount,type:"flow-link",sourceNodeId:n.fromId,targetNodeId:n.toId,startPoint:{},endPoint:{},text:Ng(n.type,"relationTypes")||"",properties:{model:{...n}}},i=bA(e,r.sourceNodeId),o=bA(e,r.targetNodeId);return i&&(r.startPoint.x=i.x+t.nodeWidth/2,r.startPoint.y=i.y),o&&(r.endPoint.x=o.x-t.nodeWidth/2-10,r.endPoint.y=o.y),r},jUe=t=>{let e=t.split("_");if(e.length>0){let n=parseInt(e[e.length-1]);return isNaN(n)?0:n}},zUe=(t,e,n)=>{let r={};t.forEach(o=>{let a=o.properties.model||{};a.routerId&&(r[a.routerId]=o.id)});let i=[];return e.routers&&e.routers.forEach(o=>{if(!r[o.id]||r[o.id]===n){let a=jb(o);i.push({label:a,value:o.id||a})}}),i},QUe=(t,e)=>{let n=[];return t.type==="switch"&&(e.configuration&&e.configuration.cases&&e.configuration.cases.forEach(r=>{n.push({label:r.then,value:r.then})}),n.push({label:"Default",value:"Default"}),n.push({label:"\u5931\u8D25",value:"Failure"})),n},HUe=(t,e)=>{let n=[];return t.routers&&t.routers.forEach(r=>{if(r.id===e){let i=jb(r);n.push({label:i,value:e})}}),n},WUe=(t,e,n)=>{let r=[];return n?(e.routers&&e.routers.length>0&&e.routers.forEach(i=>{if(i.to&&i.to.path){let o=i.to.path.split(":"),a=jb(i);if(o.length<=1)r.push({fromId:t,toId:n.id,routerId:i.id,nodeType:"endpoint-node",type:a});else for(let s=1;s{t.routers=t.routers||[],t.routers.forEach(r=>{r.to||(r.to={}),r.to.path=e}),n.forEach(r=>{r.fromId===t.id&&t.routers&&t.routers.forEach(i=>{let o=jb(i);(i.id===r.type||o===r.type)&&(i.to.path=i.to.path+":"+r.toId)})})},jb=t=>t.from?(t.params?t.params.join(" "):"")+" "+(t.from&&t.from.path):"",qUe=t=>SS(t||12),YUe=(t,e,n)=>{if(n==="endpoints"){let i=t.endpoints;i&&e.router&&(e.router.options={},Object.keys(i).forEach(o=>{e.router.options[o]=i[o]}))}let r=t.nodePool&&t.nodePool[e.type];if(r&&e.fields){let i=XUe(r);e.fields.forEach(o=>{o.component&&!o.component.options&&(o.component.options=i)})}Object.keys(t).forEach(i=>{e.type===i&&e.fields&&e.fields.forEach(o=>{t[i][o.name]&&(o.component=o.component||{},o.component.options=t[i][o.name])})})};function XUe(t){let e=[];return t&&t.forEach(n=>{e.push({label:n.name,value:`ref://${n.id}`})}),e}function KN(t,...e){if(t==null)throw new TypeError("Cannot convert undefined or null to object");const n=r=>r&&typeof r=="object"&&!Array.isArray(r);for(const r of e)if(n(r))for(const i in r)n(r[i])&&n(t[i])?KN(t[i],r[i]):t[i]=r[i];return t}const ZUe=(t,e,n)=>e.map(r=>{const i=t.find(o=>o.value!==void 0&&o.value!==null?o.value===r:o===r);return i&&i.label?i.label:Ng(r,n)}).filter(r=>r!==void 0),GUe=t=>new Promise((e,n)=>{if(navigator.clipboard&&window.isSecureContext)navigator.clipboard.writeText(t).then(()=>e(!0)).catch(r=>n(r));else{const r=document.createElement("textarea");r.value=t,document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("copy")?e(!0):n("execCommand copy failed")}catch(i){n(i)}finally{document.body.removeChild(r)}}}),KUe=()=>new Promise((t,e)=>{navigator.clipboard&&window.isSecureContext?navigator.clipboard.readText().then(n=>t(n)).catch(n=>{PF().then(t,e)}):PF().then(t,e)});function PF(){return new Promise((t,e)=>{let n="";const r=document.createElement("textarea");r.style.position="fixed",r.style.opacity="0",document.body.appendChild(r),r.focus(),r.select();try{document.execCommand("paste")?(n=r.value,t(n)):e("execCommand paste failed")}catch(i){e(i)}finally{document.body.removeChild(r)}})}const Xn={};Xn.getNodeSeq=jUe;Xn.adapterComponents=LUe;Xn.getNodeByID=bA;Xn.getEdgeBySourceNodeIdAndTargetNodeId=FUe;Xn.createEdge=VUe;Xn.getRelationTypeOptionsFromRouters=zUe;Xn.getEndpointConnections=WUe;Xn.updateEndpointRouterToPath=UUe;Xn.toFromPath=jb;Xn.getRouterRelationTypeLabel=HUe;Xn.genId=qUe;Xn.getSelectedLabels=ZUe;Xn.copyToClipboard=GUe;Xn.readFromClipboard=KUe;Xn.getRelationTypeOptionsFromNode=QUe;class JUe extends lp{initNodeData(e){super.initNodeData(e),this.width=120,this.height=30,this.resizable=!1,this.radius=5,this.text.x=this.x+10,this.iconPosition="",this.defaultFill="#a6bbcf";const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getData(){const e=super.getData();return e.properties.ui="node-red",e}setAttributes(){if(this.text.value){let e=30+AX(this.text.value)*9;e=Math.ceil(e/20)*20;let n=Math.ceil((e-this.width)/20);if(n>0){let r=this.text.value.length-n;r>0&&(this.text.value=this.text.value.substring(0,r)+"...")}}}updateText(e){super.updateText(e),this.setAttributes()}getNodeStyle(){const e=super.getNodeStyle(),n=this.properties.view||{};return this.isSelected?(e.strokeWidth=Number(n.borderWidth)||2,e.stroke=n.borderColor||"#ff7f0e"):(e.strokeWidth=Number(n.borderWidth)||1,e.stroke=n.borderColor||"#999"),e.fill=n.background||this.defaultFill||"rgb(230, 224, 248)",this.icon=n.icon||"/plugin/rule/images/"+n.category+".svg"||"images/fetch.svg",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}getOutlineStyle(){const e=super.getOutlineStyle();return e.stroke="transparent",e.hover.stroke="transparent",e}}class eqe extends wf{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Gt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}getIcon(){return null}getShape(){const{text:e,x:n,y:r,width:i,height:o,radius:a}=this.props.model,s=this.props.model.getNodeStyle();return Gt("g",{className:"lf-red-node"},[Gt("rect",{...s,x:n-i/2,y:r-o/2,width:i,height:o,rx:a,ry:a}),Gt("g",{style:"pointer-events: none;",transform:`translate(${n}, ${r})`},[Gt("rect",{x:-i/2,y:-o/2,width:30,height:30,fill:"#000",fillOpacity:.05,stroke:"none"}),this.getIcon(),Gt("path",{d:`M ${30-i/2} ${1-o/2} l 0 28`,stroke:"#000",strokeOpacity:.1,strokeWidth:1})])])}}var pc={type:"red-node",model:JUe,view:eqe};class tqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/images/comment.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class nqe extends pc.model{getDefaultAnchor(){return[]}initNodeData(e){super.initNodeData(e)}getTextStyle(){const e=super.getTextStyle();return e.fontStyle="italic",e}setAttributes(){this.width=15+AX(this.text.value)*8,this.width<120&&(this.width=120)}updateText(e){super.updateText(e),this.setAttributes()}}var rqe={type:"comment-node",model:nqe,view:tqe};class iqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/start.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class oqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e)}}var aqe={type:"endpoint-node",model:oqe,view:iqe};class sqe extends pc.view{getIcon(){const{width:e,height:n,icon:r}=this.props.model;let i=r||"/plugin/rule/images/fetch.svg";return Gt("image",{width:30,height:30,x:-e/2,y:-n/2,href:i})}}class lqe extends pc.model{initNodeData(e){super.initNodeData(e)}}var uqe={type:"simple-node",model:lqe,view:sqe};class cqe extends pc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i,icon:o}=e;let a=o||"/plugin/rule/images/fetch.svg";return Gt("image",{width:30,height:30,x:-r/2,y:-i/2,href:a})}}class dqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}initNodeData(e){super.initNodeData(e)}}var fqe={type:"chain-node",model:dqe,view:cqe};class hqe extends pc.view{getIcon(){const{model:e,graphModel:n}=this.props,{width:r,height:i}=e;return Gt("image",{width:30,height:30,x:-r/2,y:-i/2,className:"node-red-start",href:"/plugin/rule/images/start.svg",onClick:()=>{n.eventCenter.emit("node-red:start")}})}}class pqe extends pc.model{getDefaultAnchor(){const{x:e,y:n,id:r,width:i}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"}]}initNodeData(e){super.initNodeData(e),this.defaultFill="rgb(166, 187, 207)",e.moveRules&&(this.moveRules=e.moveRules)}}var gqe={type:"start-node",model:pqe,view:hqe};class mqe extends YN.view{getAnchorShape(e){const{x:n,y:r,type:i}=e;return Gt("rect",{x:n-5,y:r-5,width:10,height:10,className:"custom-anchor"})}}class vqe extends YN.model{initNodeData(e){this.width=300,this.height=200,super.initNodeData(e),this.resizable=!0,this.collapsible=!0,this.isRestrict=!1,this.autoResize=!0,this.nodeTextDraggable=!1;const n={message:"\u53EA\u5141\u8BB8\u4ECE\u53F3\u8FB9\u7684\u951A\u70B9\u8FDE\u51FA",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return c&&c.length>0&&c.filter(f=>f.sourceNode.id===a.id&&f.targetNode.id===s.id).length>0?!1:l.type==="right"}},r={message:"Input\u8282\u70B9\u53EA\u80FD\u5141\u8BB8\u5F15\u51FA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>1&&a.type==="start-node"||s.type==="start-node"||s.type==="endpoint-node")}},i={message:"\u76F8\u540C\u7684\u8F93\u5165\u548C\u8F93\u51FA\u8282\u70B9\uFF0C\u53EA\u80FD\u5141\u8BB8\u521B\u5EFA\u4E00\u6761\u8FB9",validate:(a,s,l,u)=>{let c=a.graphModel.getNodeEdges(a.id);return!(c&&c.length>0&&c.filter(f=>f.sourceNode.id==a.id&&f.targetNode.id==s.id).length>0)}};this.sourceRules.push(n),this.sourceRules.push(r),this.sourceRules.push(i);const o={message:"\u53EA\u5141\u8BB8\u4ECE\u5DE6\u8FB9\u951A\u70B9\u8FDE\u5165",validate:(a,s,l,u)=>u.type==="left"};this.targetRules.push(o)}getNodeStyle(){const e=super.getNodeStyle();return this.isSelected?(e.strokeWidth=2,e.stroke="#ff7f0e"):(e.stroke="#AEAFAE",e.strokeDasharray="3 3",e.strokeWidth=1),e}getAddableOutlineStyle(){const e=super.getAddableOutlineStyle();return e.stroke="#AEAFAE",e.strokeDasharray="3 3",e}getDefaultAnchor(){const{x:e,y:n,id:r,width:i,height:o}=this;return[{x:e+i/2,y:n,id:`${r}_right`,type:"right"},{x:e-i/2,y:n,id:`${r}_left`,type:"left"}]}}var yqe={type:"group-node",model:vqe,view:mqe};class bqe extends UP{getEdgeStyle(){const e=super.getEdgeStyle();return e.strokeWidth=this.isHovered?4:3,e.stroke=this.isSelected||this.isHovered?"#ff7f0e":"#999",e}getTextStyle(){const e=super.getTextStyle();e.color="#003a79",e.textWidth=200,e.overflowMode="autoWrap",e.fontSize=16;let n="0px,0px";return this.text.value&&(e.textWidth=Math.ceil(this.text.value.length/2)*e.fontSize+e.fontSize/4+30,e.textWidth>200&&(e.textWidth=200)),e.background={wrapPadding:n,fill:"#FFF",strokeWidth:2,stroke:"#003a79",x:0,y:0,rx:10,ry:10},e}setAttributes(e){super.setAttributes(e),this.offset=20}}class _qe extends cA{}var Oqe={type:"flow-link",view:_qe,model:bqe},Pl=(t,e)=>{const n=t.__vccOpts||t;for(const[r,i]of e)n[r]=i;return n};const wqe={class:"demo-collapse"},Sqe={class:"classify-title"},xqe=["onMousedown"],Cqe={class:"red-ui-palette-label"},Eqe={class:"red-ui-palette-icon-container"},Tqe={key:0,class:"red-ui-palette-port red-ui-palette-port-input"},kqe={key:1,class:"red-ui-palette-port red-ui-palette-port-output"},Pqe=ue({__name:"Sidebar",props:{lf:{type:oX,required:!0}},setup(t){const e=t,n="/plugin/rule",r=F(""),i=F(["endpoints","action","filter","transform","external","flow","ai","ci","iot"]),o=c=>{const{lf:d}=e;d.dnd.startDrag({type:c.nodeType,text:c.label||c.type,properties:{model:{type:c.type,debugMode:!1},view:c}})},a=F(null),s=F(null),{lf:l}=e;l.on("rulego-editor:componentOk",c=>{s.value=c,a.value=c}),Bt(()=>{const{lf:c}=e;c.graphModel.eventCenter.emit("rulego-editor:sidebarOk")});const u=()=>{let c=r.value.toLowerCase(),d={};if(c=="")d=s.value;else for(let f in s.value)d[f]||(d[f]=[]),d[f]=JSON.parse(JSON.stringify(s.value[f])),d[f].components&&(d[f].components=d[f].components.filter(h=>h.label.toLowerCase().indexOf(c)>-1||h.type.toLowerCase().indexOf(c)>-1));a.value=d};return(c,d)=>{const f=hi,h=ho,m=fo,g=Ui,y=Gx,b=Zx,w=mu;return R(),G("div",wqe,[B(f,{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=O=>r.value=O),"prefix-icon":p(c$),onInput:u,placeholder:"\u641C\u7D22\u7EC4\u4EF6"},null,8,["modelValue","prefix-icon"]),B(w,{height:"calc(100vh - 82px)"},{default:z(()=>[(R(!0),G(ct,null,Wt(a.value,(O,S,x)=>(R(),we(b,{modelValue:i.value,"onUpdate:modelValue":d[1]||(d[1]=C=>i.value=C)},{default:z(()=>[B(y,{name:S},{title:z(()=>[B(m,null,{default:z(()=>[B(h,{span:3},{default:z(()=>[J("span",{class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${p(n)+"/images/"+S+"-dark.svg"})`})},null,4)]),_:2},1024),B(h,{span:18,offset:2},{default:z(()=>[J("span",Sqe,je(O.label),1)]),_:2},1024)]),_:2},1024)]),default:z(()=>[(R(!0),G(ct,null,Wt(O.components,(C,E)=>(R(),G("div",{class:"red-ui-palette-node ui-draggable ui-draggable-handle",onMousedown:T=>o(C),key:E,style:mt({backgroundColor:C.background||"#a6bbcf"})},[B(g,{class:"box-item","popper-class":"help-box",effect:"light","show-after":1e3,content:C.desc,placement:"right-start","raw-content":""},{default:z(()=>[J("div",Cqe,je(C.label||C.type),1)]),_:2},1032,["content"]),J("div",Eqe,[C.icon?(R(),G("div",{key:0,class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${C.icon})`})},null,4)):(R(),G("div",{key:1,class:"red-ui-palette-icon",style:mt({backgroundImage:`url(${p(n)+"/images/"+S+".svg"})`})},null,4))]),C.notInput?_e("",!0):(R(),G("div",Tqe)),C.notOutput?_e("",!0):(R(),G("div",kqe))],44,xqe))),128))]),_:2},1032,["name"])]),_:2},1032,["modelValue"]))),256))]),_:1})])}}});var Aqe=Pl(Pqe,[["__scopeId","data-v-3f7105dc"]]);let AF=!1;class RX{constructor({lf:e}){e.register(gqe),e.register(aqe),e.register(rqe),e.register(uqe),e.register(fqe),e.register(yqe),e.register(Oqe),e.setDefaultEdgeType("flow-link")}render(e,n){if(AF){this.app=px(Aqe,{lf:e});const r=document.createElement("div");r.className="node-red-palette",document.body.appendChild(r),this.app.mount(r)}AF=!0}getNodeList(){let e={};for(let n in this.nodeGroups)this.nodeGroups[n].components.forEach(r=>{e[r.type]=r});return e}}JE(RX,"pluginName","NodeRedExtension");var Mqe="/plugin/rule/assets/logo.91bc7193.png";const Rqe={style:{flex:"auto"}},$X={__name:"NewFlowDialog",props:["show"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{show:r}=t,i=F();F(r);const o=Sn({id:"default",name:"",root:!0,additionalInfo:{description:""}});F(!1);const a=()=>{n("submit",Bn(o))},s=()=>{n("close")};return e({updateDefault:u=>{var c;o.id=(u==null?void 0:u.id)||SS(12),o.name=(u==null?void 0:u.name)||"",o.root=(c=u==null?void 0:u.root)!=null?c:!0,u&&"disabled"in u&&(o.disabled=u.disabled),o.additionalInfo=(u==null?void 0:u.additionalInfo)||{description:""},o.configuration=(u==null?void 0:u.configuration)||{}}}),(u,c)=>{const d=ho,f=fo,h=hi,m=Tl,g=Xm,y=El,b=lr,w=Ma;return R(),we(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u.handleOpen},{header:z(()=>[B(f,null,{default:z(()=>[B(d,{span:12},{default:z(()=>[qe("\u521B\u5EFA\u6D41\u7A0B")]),_:1})]),_:1})]),footer:z(()=>[J("div",Rqe,[B(b,{type:"primary",onClick:a},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:z(()=>[B(m,{label:"ID",prop:"id"},{default:z(()=>[B(h,{modelValue:o.id,"onUpdate:modelValue":c[0]||(c[0]=O=>o.id=O),placeholder:"\u5982\u679C\u4E0D\u6307\u5B9A\uFF0C\u81EA\u52A8\u521B\u5EFA"},null,8,["modelValue"])]),_:1}),B(m,{label:"\u540D\u79F0",prop:"name"},{default:z(()=>[B(h,{modelValue:o.name,"onUpdate:modelValue":c[1]||(c[1]=O=>o.name=O),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(m,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:z(()=>[B(g,{class:"ml-2",modelValue:o.root,"onUpdate:modelValue":c[2]||(c[2]=O=>o.root=O),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(m,{label:"\u63CF\u8FF0",prop:"description"},{default:z(()=>[B(h,{modelValue:o.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=O=>o.additionalInfo.description=O),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue","onOpen"])}}};var _A={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors */(function(t,e){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",u=500,c="__lodash_placeholder__",d=1,f=2,h=4,m=1,g=2,y=1,b=2,w=4,O=8,S=16,x=32,C=64,E=128,T=256,P=512,A=30,D="...",N=800,$=16,W=1,L=2,I=3,U=1/0,Q=9007199254740991,V=17976931348623157e292,q=0/0,K=4294967295,ie=K-1,oe=K>>>1,Se=[["ary",E],["bind",y],["bindKey",b],["curry",O],["curryRight",S],["flip",P],["partial",x],["partialRight",C],["rearg",T]],ke="[object Arguments]",Y="[object Array]",re="[object AsyncFunction]",te="[object Boolean]",ge="[object Date]",Re="[object DOMException]",$e="[object Error]",Z="[object Function]",ce="[object GeneratorFunction]",Te="[object Map]",Ie="[object Number]",ae="[object Null]",me="[object Object]",Ae="[object Promise]",X="[object Proxy]",ee="[object RegExp]",le="[object Set]",Ce="[object String]",fe="[object Symbol]",Ee="[object Undefined]",be="[object WeakMap]",Be="[object WeakSet]",Xe="[object ArrayBuffer]",Ke="[object DataView]",tt="[object Float32Array]",Dt="[object Float64Array]",jt="[object Int8Array]",Me="[object Int16Array]",nt="[object Int32Array]",de="[object Uint8Array]",Pe="[object Uint8ClampedArray]",Le="[object Uint16Array]",wt="[object Uint32Array]",tn=/\b__p \+= '';/g,De=/\b(__p \+=) '' \+/g,xt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,qt=/&(?:amp|lt|gt|quot|#39);/g,ln=/[&<>"']/g,nn=RegExp(qt.source),bn=RegExp(ln.source),Ze=/<%-([\s\S]+?)%>/g,Rt=/<%([\s\S]+?)%>/g,xn=/<%=([\s\S]+?)%>/g,fn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Er=/^\w*$/,dr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,eo=/[\\^$.*+?()[\]{}|]/g,Pi=RegExp(eo.source),Oi=/^\s+/,Ml=/\s/,cs=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,_r=/\{\n\/\* \[wrapped with (.+)\] \*/,Rl=/,? & /,et=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Mt=/[()=,{}\[\]\/\s]/,Vn=/\\(\\)?/g,zt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Li=/\w*$/,Eo=/^[-+]0x[0-9a-f]+$/i,Wo=/^0b[01]+$/i,po=/^\[object .+?Constructor\]$/,Ei=/^0o[0-7]+$/i,Uo=/^(?:0|[1-9]\d*)$/,ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nt=/($^)/,rn=/['\n\r\u2028\u2029\\]/g,se="\\ud800-\\udfff",ze="\\u0300-\\u036f",pt="\\ufe20-\\ufe2f",Yt="\\u20d0-\\u20ff",Rn=ze+pt+Yt,gr="\\u2700-\\u27bf",Ti="a-z\\xdf-\\xf6\\xf8-\\xff",ve="\\xac\\xb1\\xd7\\xf7",We="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_t="\\u2000-\\u206f",Lt=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",mn="A-Z\\xc0-\\xd6\\xd8-\\xde",ir="\\ufe0e\\ufe0f",Tt=ve+We+_t+Lt,on="['\u2019]",wn="["+se+"]",Zn="["+Tt+"]",Yi="["+Rn+"]",fv="\\d+",hv="["+gr+"]",da="["+Ti+"]",Ep="[^"+se+Tt+fv+gr+Ti+mn+"]",Yf="\\ud83c[\\udffb-\\udfff]",qo="(?:"+Yi+"|"+Yf+")",ds="[^"+se+"]",pv="(?:\\ud83c[\\udde6-\\uddff]){2}",Tp="[\\ud800-\\udbff][\\udc00-\\udfff]",kp="["+mn+"]",nL="\\u200d",rL="(?:"+da+"|"+Ep+")",XJ="(?:"+kp+"|"+Ep+")",iL="(?:"+on+"(?:d|ll|m|re|s|t|ve))?",oL="(?:"+on+"(?:D|LL|M|RE|S|T|VE))?",aL=qo+"?",sL="["+ir+"]?",ZJ="(?:"+nL+"(?:"+[ds,pv,Tp].join("|")+")"+sL+aL+")*",GJ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",KJ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",lL=sL+aL+ZJ,JJ="(?:"+[hv,pv,Tp].join("|")+")"+lL,eee="(?:"+[ds+Yi+"?",Yi,pv,Tp,wn].join("|")+")",tee=RegExp(on,"g"),nee=RegExp(Yi,"g"),qC=RegExp(Yf+"(?="+Yf+")|"+eee+lL,"g"),ree=RegExp([kp+"?"+da+"+"+iL+"(?="+[Zn,kp,"$"].join("|")+")",XJ+"+"+oL+"(?="+[Zn,kp+rL,"$"].join("|")+")",kp+"?"+rL+"+"+iL,kp+"+"+oL,KJ,GJ,fv,JJ].join("|"),"g"),iee=RegExp("["+nL+se+Rn+ir+"]"),oee=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,aee=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],see=-1,gi={};gi[tt]=gi[Dt]=gi[jt]=gi[Me]=gi[nt]=gi[de]=gi[Pe]=gi[Le]=gi[wt]=!0,gi[ke]=gi[Y]=gi[Xe]=gi[te]=gi[Ke]=gi[ge]=gi[$e]=gi[Z]=gi[Te]=gi[Ie]=gi[me]=gi[ee]=gi[le]=gi[Ce]=gi[be]=!1;var li={};li[ke]=li[Y]=li[Xe]=li[Ke]=li[te]=li[ge]=li[tt]=li[Dt]=li[jt]=li[Me]=li[nt]=li[Te]=li[Ie]=li[me]=li[ee]=li[le]=li[Ce]=li[fe]=li[de]=li[Pe]=li[Le]=li[wt]=!0,li[$e]=li[Z]=li[be]=!1;var lee={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},uee={"&":"&","<":"<",">":">",'"':""","'":"'"},cee={"&":"&","<":"<",">":">",""":'"',"'":"'"},dee={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},fee=parseFloat,hee=parseInt,uL=typeof Mi=="object"&&Mi&&Mi.Object===Object&&Mi,pee=typeof self=="object"&&self&&self.Object===Object&&self,To=uL||pee||Function("return this")(),YC=e&&!e.nodeType&&e,Xf=YC&&!0&&t&&!t.nodeType&&t,cL=Xf&&Xf.exports===YC,XC=cL&&uL.process,Vs=function(){try{var He=Xf&&Xf.require&&Xf.require("util").types;return He||XC&&XC.binding&&XC.binding("util")}catch{}}(),dL=Vs&&Vs.isArrayBuffer,fL=Vs&&Vs.isDate,hL=Vs&&Vs.isMap,pL=Vs&&Vs.isRegExp,gL=Vs&&Vs.isSet,mL=Vs&&Vs.isTypedArray;function fs(He,ft,st){switch(st.length){case 0:return He.call(ft);case 1:return He.call(ft,st[0]);case 2:return He.call(ft,st[0],st[1]);case 3:return He.call(ft,st[0],st[1],st[2])}return He.apply(ft,st)}function gee(He,ft,st,Kt){for(var qn=-1,Br=He==null?0:He.length;++qn-1}function ZC(He,ft,st){for(var Kt=-1,qn=He==null?0:He.length;++Kt-1;);return st}function xL(He,ft){for(var st=He.length;st--&&Pp(ft,He[st],0)>-1;);return st}function xee(He,ft){for(var st=He.length,Kt=0;st--;)He[st]===ft&&++Kt;return Kt}var Cee=eE(lee),Eee=eE(uee);function Tee(He){return"\\"+dee[He]}function kee(He,ft){return He==null?n:He[ft]}function Ap(He){return iee.test(He)}function Pee(He){return oee.test(He)}function Aee(He){for(var ft,st=[];!(ft=He.next()).done;)st.push(ft.value);return st}function iE(He){var ft=-1,st=Array(He.size);return He.forEach(function(Kt,qn){st[++ft]=[qn,Kt]}),st}function CL(He,ft){return function(st){return He(ft(st))}}function pd(He,ft){for(var st=-1,Kt=He.length,qn=0,Br=[];++st-1}function vte(v,_){var k=this.__data__,H=__(k,v);return H<0?(++this.size,k.push([v,_])):k[H][1]=_,this}bc.prototype.clear=hte,bc.prototype.delete=pte,bc.prototype.get=gte,bc.prototype.has=mte,bc.prototype.set=vte;function _c(v){var _=-1,k=v==null?0:v.length;for(this.clear();++_=_?v:_)),v}function Hs(v,_,k,H,ne,ye){var Ne,Fe=_&d,Ue=_&f,vt=_&h;if(k&&(Ne=ne?k(v,H,ne,ye):k(v)),Ne!==n)return Ne;if(!ki(v))return v;var bt=Yn(v);if(bt){if(Ne=One(v),!Fe)return Na(v,Ne)}else{var Ct=Xo(v),Qt=Ct==Z||Ct==ce;if(_d(v))return sI(v,Fe);if(Ct==me||Ct==ke||Qt&&!ne){if(Ne=Ue||Qt?{}:EI(v),!Fe)return Ue?cne(v,$te(Ne,v)):une(v,IL(Ne,v))}else{if(!li[Ct])return ne?v:{};Ne=wne(v,Ct,Fe)}}ye||(ye=new Nl);var vn=ye.get(v);if(vn)return vn;ye.set(v,Ne),t3(v)?v.forEach(function(Nn){Ne.add(Hs(Nn,_,k,Nn,v,ye))}):JI(v)&&v.forEach(function(Nn,mr){Ne.set(mr,Hs(Nn,_,k,mr,v,ye))});var $n=vt?Ue?AE:PE:Ue?La:go,or=bt?n:$n(v);return js(or||v,function(Nn,mr){or&&(mr=Nn,Nn=v[mr]),Ov(Ne,mr,Hs(Nn,_,k,mr,v,ye))}),Ne}function Nte(v){var _=go(v);return function(k){return BL(k,v,_)}}function BL(v,_,k){var H=k.length;if(v==null)return!H;for(v=ni(v);H--;){var ne=k[H],ye=_[ne],Ne=v[ne];if(Ne===n&&!(ne in v)||!ye(Ne))return!1}return!0}function FL(v,_,k){if(typeof v!="function")throw new zs(a);return kv(function(){v.apply(n,k)},_)}function wv(v,_,k,H){var ne=-1,ye=r_,Ne=!0,Fe=v.length,Ue=[],vt=_.length;if(!Fe)return Ue;k&&(_=wi(_,hs(k))),H?(ye=ZC,Ne=!1):_.length>=i&&(ye=gv,Ne=!1,_=new Kf(_));e:for(;++nene?0:ne+k),H=H===n||H>ne?ne:nr(H),H<0&&(H+=ne),H=k>H?0:r3(H);k0&&k(Fe)?_>1?ko(Fe,_-1,k,H,ne):hd(ne,Fe):H||(ne[ne.length]=Fe)}return ne}var dE=hI(),zL=hI(!0);function bu(v,_){return v&&dE(v,_,go)}function fE(v,_){return v&&zL(v,_,go)}function w_(v,_){return fd(_,function(k){return Cc(v[k])})}function eh(v,_){_=yd(_,v);for(var k=0,H=_.length;v!=null&&k_}function Ite(v,_){return v!=null&&Xr.call(v,_)}function Bte(v,_){return v!=null&&_ in ni(v)}function Fte(v,_,k){return v>=Yo(_,k)&&v=120&&bt.length>=120)?new Kf(Ne&&bt):n}bt=v[0];var Ct=-1,Qt=Fe[0];e:for(;++Ct-1;)Fe!==v&&h_.call(Fe,Ue,1),h_.call(v,Ue,1);return v}function JL(v,_){for(var k=v?_.length:0,H=k-1;k--;){var ne=_[k];if(k==H||ne!==ye){var ye=ne;xc(ne)?h_.call(v,ne,1):wE(v,ne)}}return v}function bE(v,_){return v+m_($L()*(_-v+1))}function Kte(v,_,k,H){for(var ne=-1,ye=no(g_((_-v)/(k||1)),0),Ne=st(ye);ye--;)Ne[H?ye:++ne]=v,v+=k;return Ne}function _E(v,_){var k="";if(!v||_<1||_>Q)return k;do _%2&&(k+=v),_=m_(_/2),_&&(v+=v);while(_);return k}function ar(v,_){return IE(PI(v,_,Ia),v+"")}function Jte(v){return LL(jp(v))}function ene(v,_){var k=jp(v);return $_(k,Jf(_,0,k.length))}function Cv(v,_,k,H){if(!ki(v))return v;_=yd(_,v);for(var ne=-1,ye=_.length,Ne=ye-1,Fe=v;Fe!=null&&++nene?0:ne+_),k=k>ne?ne:k,k<0&&(k+=ne),ne=_>k?0:k-_>>>0,_>>>=0;for(var ye=st(ne);++H>>1,Ne=v[ye];Ne!==null&&!gs(Ne)&&(k?Ne<=_:Ne<_)?H=ye+1:ne=ye}return ne}return OE(v,_,Ia,k)}function OE(v,_,k,H){var ne=0,ye=v==null?0:v.length;if(ye===0)return 0;_=k(_);for(var Ne=_!==_,Fe=_===null,Ue=gs(_),vt=_===n;ne=i){var vt=_?null:pne(v);if(vt)return o_(vt);Ne=!1,ne=gv,Ue=new Kf}else Ue=_?[]:Fe;e:for(;++H=H?v:Ws(v,_,k)}var aI=Wee||function(v){return To.clearTimeout(v)};function sI(v,_){if(_)return v.slice();var k=v.length,H=kL?kL(k):new v.constructor(k);return v.copy(H),H}function EE(v){var _=new v.constructor(v.byteLength);return new d_(_).set(new d_(v)),_}function one(v,_){var k=_?EE(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.byteLength)}function ane(v){var _=new v.constructor(v.source,Li.exec(v));return _.lastIndex=v.lastIndex,_}function sne(v){return _v?ni(_v.call(v)):{}}function lI(v,_){var k=_?EE(v.buffer):v.buffer;return new v.constructor(k,v.byteOffset,v.length)}function uI(v,_){if(v!==_){var k=v!==n,H=v===null,ne=v===v,ye=gs(v),Ne=_!==n,Fe=_===null,Ue=_===_,vt=gs(_);if(!Fe&&!vt&&!ye&&v>_||ye&&Ne&&Ue&&!Fe&&!vt||H&&Ne&&Ue||!k&&Ue||!ne)return 1;if(!H&&!ye&&!vt&&v<_||vt&&k&&ne&&!H&&!ye||Fe&&k&&ne||!Ne&&ne||!Ue)return-1}return 0}function lne(v,_,k){for(var H=-1,ne=v.criteria,ye=_.criteria,Ne=ne.length,Fe=k.length;++H=Fe)return Ue;var vt=k[H];return Ue*(vt=="desc"?-1:1)}}return v.index-_.index}function cI(v,_,k,H){for(var ne=-1,ye=v.length,Ne=k.length,Fe=-1,Ue=_.length,vt=no(ye-Ne,0),bt=st(Ue+vt),Ct=!H;++Fe1?k[ne-1]:n,Ne=ne>2?k[2]:n;for(ye=v.length>3&&typeof ye=="function"?(ne--,ye):n,Ne&&ha(k[0],k[1],Ne)&&(ye=ne<3?n:ye,ne=1),_=ni(_);++H-1?ne[ye?_[Ne]:Ne]:n}}function mI(v){return Sc(function(_){var k=_.length,H=k,ne=Qs.prototype.thru;for(v&&_.reverse();H--;){var ye=_[H];if(typeof ye!="function")throw new zs(a);if(ne&&!Ne&&M_(ye)=="wrapper")var Ne=new Qs([],!0)}for(H=Ne?H:k;++H1&&xr.reverse(),bt&&UeFe))return!1;var vt=ye.get(v),bt=ye.get(_);if(vt&&bt)return vt==_&&bt==v;var Ct=-1,Qt=!0,vn=k&g?new Kf:n;for(ye.set(v,_),ye.set(_,v);++Ct1?"& ":"")+_[H],_=_.join(k>2?", ":" "),v.replace(cs,`{ /* [wrapped with `+_+`] */ `)}function xne(v){return Yn(v)||rh(v)||!!(ML&&v&&v[ML])}function xc(v,_){var k=typeof v;return _=_==null?Q:_,!!_&&(k=="number"||k!="symbol"&&Uo.test(v))&&v>-1&&v%1==0&&v<_}function ha(v,_,k){if(!ki(k))return!1;var H=typeof _;return(H=="number"?Da(k)&&xc(_,k.length):H=="string"&&_ in k)?Dl(k[_],v):!1}function NE(v,_){if(Yn(v))return!1;var k=typeof v;return k=="number"||k=="symbol"||k=="boolean"||v==null||gs(v)?!0:Er.test(v)||!fn.test(v)||_!=null&&v in ni(_)}function Cne(v){var _=typeof v;return _=="string"||_=="number"||_=="symbol"||_=="boolean"?v!=="__proto__":v===null}function DE(v){var _=M_(v),k=he[_];if(typeof k!="function"||!(_ in Or.prototype))return!1;if(v===k)return!0;var H=ME(k);return!!H&&v===H[0]}function Ene(v){return!!TL&&TL in v}var Tne=s_?Cc:KE;function Tv(v){var _=v&&v.constructor,k=typeof _=="function"&&_.prototype||$p;return v===k}function TI(v){return v===v&&!ki(v)}function kI(v,_){return function(k){return k==null?!1:k[v]===_&&(_!==n||v in ni(k))}}function kne(v){var _=I_(v,function(H){return k.size===u&&k.clear(),H}),k=_.cache;return _}function Pne(v,_){var k=v[1],H=_[1],ne=k|H,ye=ne<(y|b|E),Ne=H==E&&k==O||H==E&&k==T&&v[7].length<=_[8]||H==(E|T)&&_[7].length<=_[8]&&k==O;if(!(ye||Ne))return v;H&y&&(v[2]=_[2],ne|=k&y?0:w);var Fe=_[3];if(Fe){var Ue=v[3];v[3]=Ue?cI(Ue,Fe,_[4]):Fe,v[4]=Ue?pd(v[3],c):_[4]}return Fe=_[5],Fe&&(Ue=v[5],v[5]=Ue?dI(Ue,Fe,_[6]):Fe,v[6]=Ue?pd(v[5],c):_[6]),Fe=_[7],Fe&&(v[7]=Fe),H&E&&(v[8]=v[8]==null?_[8]:Yo(v[8],_[8])),v[9]==null&&(v[9]=_[9]),v[0]=_[0],v[1]=ne,v}function Ane(v){var _=[];if(v!=null)for(var k in ni(v))_.push(k);return _}function Mne(v){return u_.call(v)}function PI(v,_,k){return _=no(_===n?v.length-1:_,0),function(){for(var H=arguments,ne=-1,ye=no(H.length-_,0),Ne=st(ye);++ne0){if(++_>=N)return arguments[0]}else _=0;return v.apply(n,arguments)}}function $_(v,_){var k=-1,H=v.length,ne=H-1;for(_=_===n?H:_;++k<_;){var ye=bE(k,ne),Ne=v[ye];v[ye]=v[k],v[k]=Ne}return v.length=_,v}var NI=kne(function(v){var _=[];return v.charCodeAt(0)===46&&_.push(""),v.replace(dr,function(k,H,ne,ye){_.push(ne?ye.replace(Vn,"$1"):H||k)}),_});function Ou(v){if(typeof v=="string"||gs(v))return v;var _=v+"";return _=="0"&&1/v==-U?"-0":_}function nh(v){if(v!=null){try{return l_.call(v)}catch{}try{return v+""}catch{}}return""}function $ne(v,_){return js(Se,function(k){var H="_."+k[0];_&k[1]&&!r_(v,H)&&v.push(H)}),v.sort()}function DI(v){if(v instanceof Or)return v.clone();var _=new Qs(v.__wrapped__,v.__chain__);return _.__actions__=Na(v.__actions__),_.__index__=v.__index__,_.__values__=v.__values__,_}function Nne(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=no(nr(_),0);var H=v==null?0:v.length;if(!H||_<1)return[];for(var ne=0,ye=0,Ne=st(g_(H/_));ne1?v[_-1]:n;return k=typeof k=="function"?(v.pop(),k):n,jI(v,k)});function zI(v){var _=he(v);return _.__chain__=!0,_}function Dre(v,_){return _(v),v}function N_(v,_){return _(v)}var Lre=Sc(function(v){var _=v.length,k=_?v[0]:0,H=this.__wrapped__,ne=function(ye){return cE(ye,v)};return _>1||this.__actions__.length||!(H instanceof Or)||!xc(k)?this.thru(ne):(H=H.slice(k,+k+(_?1:0)),H.__actions__.push({func:N_,args:[ne],thisArg:n}),new Qs(H,this.__chain__).thru(function(ye){return _&&!ye.length&&ye.push(n),ye}))});function Ire(){return zI(this)}function Bre(){return new Qs(this.value(),this.__chain__)}function Fre(){this.__values__===n&&(this.__values__=n3(this.value()));var v=this.__index__>=this.__values__.length,_=v?n:this.__values__[this.__index__++];return{done:v,value:_}}function Vre(){return this}function jre(v){for(var _,k=this;k instanceof b_;){var H=DI(k);H.__index__=0,H.__values__=n,_?ne.__wrapped__=H:_=H;var ne=H;k=k.__wrapped__}return ne.__wrapped__=v,_}function zre(){var v=this.__wrapped__;if(v instanceof Or){var _=v;return this.__actions__.length&&(_=new Or(this)),_=_.reverse(),_.__actions__.push({func:N_,args:[BE],thisArg:n}),new Qs(_,this.__chain__)}return this.thru(BE)}function Qre(){return iI(this.__wrapped__,this.__actions__)}var Hre=E_(function(v,_,k){Xr.call(v,k)?++v[k]:Oc(v,k,1)});function Wre(v,_,k){var H=Yn(v)?vL:Dte;return k&&ha(v,_,k)&&(_=n),H(v,Pn(_,3))}function Ure(v,_){var k=Yn(v)?fd:jL;return k(v,Pn(_,3))}var qre=gI(LI),Yre=gI(II);function Xre(v,_){return ko(D_(v,_),1)}function Zre(v,_){return ko(D_(v,_),U)}function Gre(v,_,k){return k=k===n?1:nr(k),ko(D_(v,_),k)}function QI(v,_){var k=Yn(v)?js:md;return k(v,Pn(_,3))}function HI(v,_){var k=Yn(v)?mee:VL;return k(v,Pn(_,3))}var Kre=E_(function(v,_,k){Xr.call(v,k)?v[k].push(_):Oc(v,k,[_])});function Jre(v,_,k,H){v=Da(v)?v:jp(v),k=k&&!H?nr(k):0;var ne=v.length;return k<0&&(k=no(ne+k,0)),V_(v)?k<=ne&&v.indexOf(_,k)>-1:!!ne&&Pp(v,_,k)>-1}var eie=ar(function(v,_,k){var H=-1,ne=typeof _=="function",ye=Da(v)?st(v.length):[];return md(v,function(Ne){ye[++H]=ne?fs(_,Ne,k):Sv(Ne,_,k)}),ye}),tie=E_(function(v,_,k){Oc(v,k,_)});function D_(v,_){var k=Yn(v)?wi:qL;return k(v,Pn(_,3))}function nie(v,_,k,H){return v==null?[]:(Yn(_)||(_=_==null?[]:[_]),k=H?n:k,Yn(k)||(k=k==null?[]:[k]),GL(v,_,k))}var rie=E_(function(v,_,k){v[k?0:1].push(_)},function(){return[[],[]]});function iie(v,_,k){var H=Yn(v)?GC:OL,ne=arguments.length<3;return H(v,Pn(_,4),k,ne,md)}function oie(v,_,k){var H=Yn(v)?vee:OL,ne=arguments.length<3;return H(v,Pn(_,4),k,ne,VL)}function aie(v,_){var k=Yn(v)?fd:jL;return k(v,B_(Pn(_,3)))}function sie(v){var _=Yn(v)?LL:Jte;return _(v)}function lie(v,_,k){(k?ha(v,_,k):_===n)?_=1:_=nr(_);var H=Yn(v)?Ate:ene;return H(v,_)}function uie(v){var _=Yn(v)?Mte:nne;return _(v)}function cie(v){if(v==null)return 0;if(Da(v))return V_(v)?Mp(v):v.length;var _=Xo(v);return _==Te||_==le?v.size:mE(v).length}function die(v,_,k){var H=Yn(v)?KC:rne;return k&&ha(v,_,k)&&(_=n),H(v,Pn(_,3))}var fie=ar(function(v,_){if(v==null)return[];var k=_.length;return k>1&&ha(v,_[0],_[1])?_=[]:k>2&&ha(_[0],_[1],_[2])&&(_=[_[0]]),GL(v,ko(_,1),[])}),L_=Uee||function(){return To.Date.now()};function hie(v,_){if(typeof _!="function")throw new zs(a);return v=nr(v),function(){if(--v<1)return _.apply(this,arguments)}}function WI(v,_,k){return _=k?n:_,_=v&&_==null?v.length:_,wc(v,E,n,n,n,n,_)}function UI(v,_){var k;if(typeof _!="function")throw new zs(a);return v=nr(v),function(){return--v>0&&(k=_.apply(this,arguments)),v<=1&&(_=n),k}}var VE=ar(function(v,_,k){var H=y;if(k.length){var ne=pd(k,Fp(VE));H|=x}return wc(v,H,_,k,ne)}),qI=ar(function(v,_,k){var H=y|b;if(k.length){var ne=pd(k,Fp(qI));H|=x}return wc(_,H,v,k,ne)});function YI(v,_,k){_=k?n:_;var H=wc(v,O,n,n,n,n,n,_);return H.placeholder=YI.placeholder,H}function XI(v,_,k){_=k?n:_;var H=wc(v,S,n,n,n,n,n,_);return H.placeholder=XI.placeholder,H}function ZI(v,_,k){var H,ne,ye,Ne,Fe,Ue,vt=0,bt=!1,Ct=!1,Qt=!0;if(typeof v!="function")throw new zs(a);_=qs(_)||0,ki(k)&&(bt=!!k.leading,Ct="maxWait"in k,ye=Ct?no(qs(k.maxWait)||0,_):ye,Qt="trailing"in k?!!k.trailing:Qt);function vn(Bi){var Ll=H,Tc=ne;return H=ne=n,vt=Bi,Ne=v.apply(Tc,Ll),Ne}function $n(Bi){return vt=Bi,Fe=kv(mr,_),bt?vn(Bi):Ne}function or(Bi){var Ll=Bi-Ue,Tc=Bi-vt,g3=_-Ll;return Ct?Yo(g3,ye-Tc):g3}function Nn(Bi){var Ll=Bi-Ue,Tc=Bi-vt;return Ue===n||Ll>=_||Ll<0||Ct&&Tc>=ye}function mr(){var Bi=L_();if(Nn(Bi))return xr(Bi);Fe=kv(mr,or(Bi))}function xr(Bi){return Fe=n,Qt&&H?vn(Bi):(H=ne=n,Ne)}function ms(){Fe!==n&&aI(Fe),vt=0,H=Ue=ne=Fe=n}function pa(){return Fe===n?Ne:xr(L_())}function vs(){var Bi=L_(),Ll=Nn(Bi);if(H=arguments,ne=this,Ue=Bi,Ll){if(Fe===n)return $n(Ue);if(Ct)return aI(Fe),Fe=kv(mr,_),vn(Ue)}return Fe===n&&(Fe=kv(mr,_)),Ne}return vs.cancel=ms,vs.flush=pa,vs}var pie=ar(function(v,_){return FL(v,1,_)}),gie=ar(function(v,_,k){return FL(v,qs(_)||0,k)});function mie(v){return wc(v,P)}function I_(v,_){if(typeof v!="function"||_!=null&&typeof _!="function")throw new zs(a);var k=function(){var H=arguments,ne=_?_.apply(this,H):H[0],ye=k.cache;if(ye.has(ne))return ye.get(ne);var Ne=v.apply(this,H);return k.cache=ye.set(ne,Ne)||ye,Ne};return k.cache=new(I_.Cache||_c),k}I_.Cache=_c;function B_(v){if(typeof v!="function")throw new zs(a);return function(){var _=arguments;switch(_.length){case 0:return!v.call(this);case 1:return!v.call(this,_[0]);case 2:return!v.call(this,_[0],_[1]);case 3:return!v.call(this,_[0],_[1],_[2])}return!v.apply(this,_)}}function vie(v){return UI(2,v)}var yie=ine(function(v,_){_=_.length==1&&Yn(_[0])?wi(_[0],hs(Pn())):wi(ko(_,1),hs(Pn()));var k=_.length;return ar(function(H){for(var ne=-1,ye=Yo(H.length,k);++ne=_}),rh=HL(function(){return arguments}())?HL:function(v){return Ai(v)&&Xr.call(v,"callee")&&!AL.call(v,"callee")},Yn=st.isArray,$ie=dL?hs(dL):jte;function Da(v){return v!=null&&F_(v.length)&&!Cc(v)}function Ii(v){return Ai(v)&&Da(v)}function Nie(v){return v===!0||v===!1||Ai(v)&&fa(v)==te}var _d=Yee||KE,Die=fL?hs(fL):zte;function Lie(v){return Ai(v)&&v.nodeType===1&&!Pv(v)}function Iie(v){if(v==null)return!0;if(Da(v)&&(Yn(v)||typeof v=="string"||typeof v.splice=="function"||_d(v)||Vp(v)||rh(v)))return!v.length;var _=Xo(v);if(_==Te||_==le)return!v.size;if(Tv(v))return!mE(v).length;for(var k in v)if(Xr.call(v,k))return!1;return!0}function Bie(v,_){return xv(v,_)}function Fie(v,_,k){k=typeof k=="function"?k:n;var H=k?k(v,_):n;return H===n?xv(v,_,n,k):!!H}function zE(v){if(!Ai(v))return!1;var _=fa(v);return _==$e||_==Re||typeof v.message=="string"&&typeof v.name=="string"&&!Pv(v)}function Vie(v){return typeof v=="number"&&RL(v)}function Cc(v){if(!ki(v))return!1;var _=fa(v);return _==Z||_==ce||_==re||_==X}function KI(v){return typeof v=="number"&&v==nr(v)}function F_(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=Q}function ki(v){var _=typeof v;return v!=null&&(_=="object"||_=="function")}function Ai(v){return v!=null&&typeof v=="object"}var JI=hL?hs(hL):Hte;function jie(v,_){return v===_||gE(v,_,RE(_))}function zie(v,_,k){return k=typeof k=="function"?k:n,gE(v,_,RE(_),k)}function Qie(v){return e3(v)&&v!=+v}function Hie(v){if(Tne(v))throw new qn(o);return WL(v)}function Wie(v){return v===null}function Uie(v){return v==null}function e3(v){return typeof v=="number"||Ai(v)&&fa(v)==Ie}function Pv(v){if(!Ai(v)||fa(v)!=me)return!1;var _=f_(v);if(_===null)return!0;var k=Xr.call(_,"constructor")&&_.constructor;return typeof k=="function"&&k instanceof k&&l_.call(k)==zee}var QE=pL?hs(pL):Wte;function qie(v){return KI(v)&&v>=-Q&&v<=Q}var t3=gL?hs(gL):Ute;function V_(v){return typeof v=="string"||!Yn(v)&&Ai(v)&&fa(v)==Ce}function gs(v){return typeof v=="symbol"||Ai(v)&&fa(v)==fe}var Vp=mL?hs(mL):qte;function Yie(v){return v===n}function Xie(v){return Ai(v)&&Xo(v)==be}function Zie(v){return Ai(v)&&fa(v)==Be}var Gie=A_(vE),Kie=A_(function(v,_){return v<=_});function n3(v){if(!v)return[];if(Da(v))return V_(v)?$l(v):Na(v);if(mv&&v[mv])return Aee(v[mv]());var _=Xo(v),k=_==Te?iE:_==le?o_:jp;return k(v)}function Ec(v){if(!v)return v===0?v:0;if(v=qs(v),v===U||v===-U){var _=v<0?-1:1;return _*V}return v===v?v:0}function nr(v){var _=Ec(v),k=_%1;return _===_?k?_-k:_:0}function r3(v){return v?Jf(nr(v),0,K):0}function qs(v){if(typeof v=="number")return v;if(gs(v))return q;if(ki(v)){var _=typeof v.valueOf=="function"?v.valueOf():v;v=ki(_)?_+"":_}if(typeof v!="string")return v===0?v:+v;v=wL(v);var k=Wo.test(v);return k||Ei.test(v)?hee(v.slice(2),k?2:8):Eo.test(v)?q:+v}function i3(v){return _u(v,La(v))}function Jie(v){return v?Jf(nr(v),-Q,Q):v===0?v:0}function zr(v){return v==null?"":ps(v)}var eoe=Ip(function(v,_){if(Tv(_)||Da(_)){_u(_,go(_),v);return}for(var k in _)Xr.call(_,k)&&Ov(v,k,_[k])}),o3=Ip(function(v,_){_u(_,La(_),v)}),j_=Ip(function(v,_,k,H){_u(_,La(_),v,H)}),toe=Ip(function(v,_,k,H){_u(_,go(_),v,H)}),noe=Sc(cE);function roe(v,_){var k=Lp(v);return _==null?k:IL(k,_)}var ioe=ar(function(v,_){v=ni(v);var k=-1,H=_.length,ne=H>2?_[2]:n;for(ne&&ha(_[0],_[1],ne)&&(H=1);++k1),ye}),_u(v,AE(v),k),H&&(k=Hs(k,d|f|h,gne));for(var ne=_.length;ne--;)wE(k,_[ne]);return k});function woe(v,_){return s3(v,B_(Pn(_)))}var Soe=Sc(function(v,_){return v==null?{}:Zte(v,_)});function s3(v,_){if(v==null)return{};var k=wi(AE(v),function(H){return[H]});return _=Pn(_),KL(v,k,function(H,ne){return _(H,ne[0])})}function xoe(v,_,k){_=yd(_,v);var H=-1,ne=_.length;for(ne||(ne=1,v=n);++H_){var H=v;v=_,_=H}if(k||v%1||_%1){var ne=$L();return Yo(v+ne*(_-v+fee("1e-"+((ne+"").length-1))),_)}return bE(v,_)}var Doe=Bp(function(v,_,k){return _=_.toLowerCase(),v+(k?c3(_):_)});function c3(v){return UE(zr(v).toLowerCase())}function d3(v){return v=zr(v),v&&v.replace(ot,Cee).replace(nee,"")}function Loe(v,_,k){v=zr(v),_=ps(_);var H=v.length;k=k===n?H:Jf(nr(k),0,H);var ne=k;return k-=_.length,k>=0&&v.slice(k,ne)==_}function Ioe(v){return v=zr(v),v&&bn.test(v)?v.replace(ln,Eee):v}function Boe(v){return v=zr(v),v&&Pi.test(v)?v.replace(eo,"\\$&"):v}var Foe=Bp(function(v,_,k){return v+(k?"-":"")+_.toLowerCase()}),Voe=Bp(function(v,_,k){return v+(k?" ":"")+_.toLowerCase()}),joe=pI("toLowerCase");function zoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;if(!_||H>=_)return v;var ne=(_-H)/2;return P_(m_(ne),k)+v+P_(g_(ne),k)}function Qoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;return _&&H<_?v+P_(_-H,k):v}function Hoe(v,_,k){v=zr(v),_=nr(_);var H=_?Mp(v):0;return _&&H<_?P_(_-H,k)+v:v}function Woe(v,_,k){return k||_==null?_=0:_&&(_=+_),Kee(zr(v).replace(Oi,""),_||0)}function Uoe(v,_,k){return(k?ha(v,_,k):_===n)?_=1:_=nr(_),_E(zr(v),_)}function qoe(){var v=arguments,_=zr(v[0]);return v.length<3?_:_.replace(v[1],v[2])}var Yoe=Bp(function(v,_,k){return v+(k?"_":"")+_.toLowerCase()});function Xoe(v,_,k){return k&&typeof k!="number"&&ha(v,_,k)&&(_=k=n),k=k===n?K:k>>>0,k?(v=zr(v),v&&(typeof _=="string"||_!=null&&!QE(_))&&(_=ps(_),!_&&Ap(v))?bd($l(v),0,k):v.split(_,k)):[]}var Zoe=Bp(function(v,_,k){return v+(k?" ":"")+UE(_)});function Goe(v,_,k){return v=zr(v),k=k==null?0:Jf(nr(k),0,v.length),_=ps(_),v.slice(k,k+_.length)==_}function Koe(v,_,k){var H=he.templateSettings;k&&ha(v,_,k)&&(_=n),v=zr(v),_=j_({},_,H,OI);var ne=j_({},_.imports,H.imports,OI),ye=go(ne),Ne=rE(ne,ye),Fe,Ue,vt=0,bt=_.interpolate||Nt,Ct="__p += '",Qt=oE((_.escape||Nt).source+"|"+bt.source+"|"+(bt===xn?zt:Nt).source+"|"+(_.evaluate||Nt).source+"|$","g"),vn="//# sourceURL="+(Xr.call(_,"sourceURL")?(_.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++see+"]")+` `;v.replace(Qt,function(Nn,mr,xr,ms,pa,vs){return xr||(xr=ms),Ct+=v.slice(vt,vs).replace(rn,Tee),mr&&(Fe=!0,Ct+=`' + __e(`+mr+`) + '`),pa&&(Ue=!0,Ct+=`'; `+pa+`; __p += '`),xr&&(Ct+=`' + ((__t = (`+xr+`)) == null ? '' : __t) + '`),vt=vs+Nn.length,Nn}),Ct+=`'; `;var $n=Xr.call(_,"variable")&&_.variable;if(!$n)Ct=`with (obj) { `+Ct+` } `;else if(Mt.test($n))throw new qn(s);Ct=(Ue?Ct.replace(tn,""):Ct).replace(De,"$1").replace(xt,"$1;"),Ct="function("+($n||"obj")+`) { `+($n?"":`obj || (obj = {}); `)+"var __t, __p = ''"+(Fe?", __e = _.escape":"")+(Ue?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; `)+Ct+`return __p }`;var or=h3(function(){return Br(ye,vn+"return "+Ct).apply(n,Ne)});if(or.source=Ct,zE(or))throw or;return or}function Joe(v){return zr(v).toLowerCase()}function eae(v){return zr(v).toUpperCase()}function tae(v,_,k){if(v=zr(v),v&&(k||_===n))return wL(v);if(!v||!(_=ps(_)))return v;var H=$l(v),ne=$l(_),ye=SL(H,ne),Ne=xL(H,ne)+1;return bd(H,ye,Ne).join("")}function nae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.slice(0,EL(v)+1);if(!v||!(_=ps(_)))return v;var H=$l(v),ne=xL(H,$l(_))+1;return bd(H,0,ne).join("")}function rae(v,_,k){if(v=zr(v),v&&(k||_===n))return v.replace(Oi,"");if(!v||!(_=ps(_)))return v;var H=$l(v),ne=SL(H,$l(_));return bd(H,ne).join("")}function iae(v,_){var k=A,H=D;if(ki(_)){var ne="separator"in _?_.separator:ne;k="length"in _?nr(_.length):k,H="omission"in _?ps(_.omission):H}v=zr(v);var ye=v.length;if(Ap(v)){var Ne=$l(v);ye=Ne.length}if(k>=ye)return v;var Fe=k-Mp(H);if(Fe<1)return H;var Ue=Ne?bd(Ne,0,Fe).join(""):v.slice(0,Fe);if(ne===n)return Ue+H;if(Ne&&(Fe+=Ue.length-Fe),QE(ne)){if(v.slice(Fe).search(ne)){var vt,bt=Ue;for(ne.global||(ne=oE(ne.source,zr(Li.exec(ne))+"g")),ne.lastIndex=0;vt=ne.exec(bt);)var Ct=vt.index;Ue=Ue.slice(0,Ct===n?Fe:Ct)}}else if(v.indexOf(ps(ne),Fe)!=Fe){var Qt=Ue.lastIndexOf(ne);Qt>-1&&(Ue=Ue.slice(0,Qt))}return Ue+H}function oae(v){return v=zr(v),v&&nn.test(v)?v.replace(qt,Nee):v}var aae=Bp(function(v,_,k){return v+(k?" ":"")+_.toUpperCase()}),UE=pI("toUpperCase");function f3(v,_,k){return v=zr(v),_=k?n:_,_===n?Pee(v)?Iee(v):_ee(v):v.match(_)||[]}var h3=ar(function(v,_){try{return fs(v,n,_)}catch(k){return zE(k)?k:new qn(k)}}),sae=Sc(function(v,_){return js(_,function(k){k=Ou(k),Oc(v,k,VE(v[k],v))}),v});function lae(v){var _=v==null?0:v.length,k=Pn();return v=_?wi(v,function(H){if(typeof H[1]!="function")throw new zs(a);return[k(H[0]),H[1]]}):[],ar(function(H){for(var ne=-1;++ne<_;){var ye=v[ne];if(fs(ye[0],this,H))return fs(ye[1],this,H)}})}function uae(v){return Nte(Hs(v,d))}function qE(v){return function(){return v}}function cae(v,_){return v==null||v!==v?_:v}var dae=mI(),fae=mI(!0);function Ia(v){return v}function YE(v){return UL(typeof v=="function"?v:Hs(v,d))}function hae(v){return YL(Hs(v,d))}function pae(v,_){return XL(v,Hs(_,d))}var gae=ar(function(v,_){return function(k){return Sv(k,v,_)}}),mae=ar(function(v,_){return function(k){return Sv(v,k,_)}});function XE(v,_,k){var H=go(_),ne=w_(_,H);k==null&&!(ki(_)&&(ne.length||!H.length))&&(k=_,_=v,v=this,ne=w_(_,go(_)));var ye=!(ki(k)&&"chain"in k)||!!k.chain,Ne=Cc(v);return js(ne,function(Fe){var Ue=_[Fe];v[Fe]=Ue,Ne&&(v.prototype[Fe]=function(){var vt=this.__chain__;if(ye||vt){var bt=v(this.__wrapped__),Ct=bt.__actions__=Na(this.__actions__);return Ct.push({func:Ue,args:arguments,thisArg:v}),bt.__chain__=vt,bt}return Ue.apply(v,hd([this.value()],arguments))})}),v}function vae(){return To._===this&&(To._=Qee),this}function ZE(){}function yae(v){return v=nr(v),ar(function(_){return ZL(_,v)})}var bae=TE(wi),_ae=TE(vL),Oae=TE(KC);function p3(v){return NE(v)?JC(Ou(v)):Gte(v)}function wae(v){return function(_){return v==null?n:eh(v,_)}}var Sae=yI(),xae=yI(!0);function GE(){return[]}function KE(){return!1}function Cae(){return{}}function Eae(){return""}function Tae(){return!0}function kae(v,_){if(v=nr(v),v<1||v>Q)return[];var k=K,H=Yo(v,K);_=Pn(_),v-=K;for(var ne=nE(H,_);++k0||_<0)?new Or(k):(v<0?k=k.takeRight(-v):v&&(k=k.drop(v)),_!==n&&(_=nr(_),k=_<0?k.dropRight(-_):k.take(_-v)),k)},Or.prototype.takeRightWhile=function(v){return this.reverse().takeWhile(v).reverse()},Or.prototype.toArray=function(){return this.take(K)},bu(Or.prototype,function(v,_){var k=/^(?:filter|find|map|reject)|While$/.test(_),H=/^(?:head|last)$/.test(_),ne=he[H?"take"+(_=="last"?"Right":""):_],ye=H||/^find/.test(_);!ne||(he.prototype[_]=function(){var Ne=this.__wrapped__,Fe=H?[1]:arguments,Ue=Ne instanceof Or,vt=Fe[0],bt=Ue||Yn(Ne),Ct=function(mr){var xr=ne.apply(he,hd([mr],Fe));return H&&Qt?xr[0]:xr};bt&&k&&typeof vt=="function"&&vt.length!=1&&(Ue=bt=!1);var Qt=this.__chain__,vn=!!this.__actions__.length,$n=ye&&!Qt,or=Ue&&!vn;if(!ye&&bt){Ne=or?Ne:new Or(this);var Nn=v.apply(Ne,Fe);return Nn.__actions__.push({func:N_,args:[Ct],thisArg:n}),new Qs(Nn,Qt)}return $n&&or?v.apply(this,Fe):(Nn=this.thru(Ct),$n?H?Nn.value()[0]:Nn.value():Nn)})}),js(["pop","push","shift","sort","splice","unshift"],function(v){var _=a_[v],k=/^(?:push|sort|unshift)$/.test(v)?"tap":"thru",H=/^(?:pop|shift)$/.test(v);he.prototype[v]=function(){var ne=arguments;if(H&&!this.__chain__){var ye=this.value();return _.apply(Yn(ye)?ye:[],ne)}return this[k](function(Ne){return _.apply(Yn(Ne)?Ne:[],ne)})}}),bu(Or.prototype,function(v,_){var k=he[_];if(k){var H=k.name+"";Xr.call(Dp,H)||(Dp[H]=[]),Dp[H].push({name:_,func:k})}}),Dp[T_(n,b).name]=[{name:"wrapper",func:n}],Or.prototype.clone=ote,Or.prototype.reverse=ate,Or.prototype.value=ste,he.prototype.at=Lre,he.prototype.chain=Ire,he.prototype.commit=Bre,he.prototype.next=Fre,he.prototype.plant=jre,he.prototype.reverse=zre,he.prototype.toJSON=he.prototype.valueOf=he.prototype.value=Qre,he.prototype.first=he.prototype.head,mv&&(he.prototype[mv]=Vre),he},Rp=Bee();Xf?((Xf.exports=Rp)._=Rp,YC._=Rp):To._=Rp}).call(Mi)})(_A,_A.exports);var $qe=_A.exports;const Nqe={style:{display:"flex","align-items":"center"}},Dqe={__name:"FlowTable",props:["lf","root"],emits:["new","close","open","operate"],setup(t,{emit:e}){const{lf:n,root:r}=t,i=F(""),o=F(""),a=F([]),s=F(!1),l=F({}),u=F({page:1,size:20,total:0}),c=T=>{u.value.size=T,u.value.page=1,f()},d=T=>{u.value.page=T,f()},f=()=>{let T=n.getEditorSetting().url+n.getEditorSetting().chainsApi;T=T+`?&root=${r}&keywords=${i.value}&disabled=${o.value}&size=${u.value.size}&page=${u.value.page}`,fetch(T).then(P=>P.json()).then(P=>{a.value=(P==null?void 0:P.items)||[],u.value.total=P.total||20}).catch(P=>{Vr.error(P.message)})},h=$qe.debounce(()=>{f()},300),m=()=>{f()};Bt(()=>{f()});const g=(T,P)=>{var A,D;return((D=(A=T.ruleChain)==null?void 0:A.additionalInfo)==null?void 0:D.updateTime)||""},y=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let N=P[0].type||"";return((D=n.nodeComponents()[N])==null?void 0:D.icon)||"/images/endpoint/endpoints.svg"}return"/images/endpoint/endpoints.svg"},b=T=>{var A,D;let P=(A=T==null?void 0:T.metadata)==null?void 0:A.endpoints;if(P&&P.length>0){let N=P[0].type||"";return((D=n.nodeComponents()[N])==null?void 0:D.label)||N}return""},w=()=>{let T={id:SS(12),name:(r?"\u6D41\u7A0B":"\u5B50\u6D41\u7A0B")+u.value.total||1,root:r,additionalInfo:{description:""}};l.value.updateDefault(T),s.value=!0},O=T=>{s.value=!1,e("new",T)},S=()=>{s.value=!1},x=T=>{e("open",T)},C=T=>{Mw.confirm(`\u786E\u5B9A${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"} ${T.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+`/${T.id}/operate/${T.disabled?"start":"stop"}`,{method:"POST"}).then(A=>A.ok?A.text():A.text().then(D=>{throw new Error(`${D}`)})).then(A=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate",T.id,T.disabled?"start":"stop"),f()}).catch(A=>{Vr.error(`${T.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"}\u5931\u8D25: ${A.message}`)})})},E=T=>{Mw.confirm(`\u786E\u5B9A\u5220\u9664 ${T.ruleChain.name} \u5417\uFF1F`,"\u63D0\u793A",{confirmButtonText:"\u786E\u5B9A",cancelButtonText:"\u53D6\u6D88",type:"warning"}).then(()=>{let P=n.getEditorSetting().url+n.getEditorSetting().chainsApi;fetch(P+"/"+T.ruleChain.id,{method:"DELETE"}).then(A=>{A.ok?(Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("operate","delete"),f()):Vr.error(`\u5220\u9664\u5931\u8D25: ${A.statusText}`)}).catch(A=>{Vr.error(`\u5220\u9664\u5931\u8D25: ${A.message}`)})})};return(T,P)=>{const A=lr,D=ho,N=Yc,$=Ol,W=hi,L=fo,I=$b,U=mU,Q=Ui,V=Bs,q=Rb,K=eC;return R(),G(ct,null,[B(p(EH),{locale:p(Uq)},{default:z(()=>[B(L,null,{default:z(()=>[B(D,{span:4},{default:z(()=>[B(A,{type:"primary",onClick:w},{default:z(()=>[qe(je(t.root?"\u65B0\u5EFA\u6D41\u7A0B":"\u65B0\u5EFA\u5B50\u6D41\u7A0B"),1)]),_:1})]),_:1}),B(D,{span:8,offset:12,style:{display:"flex","justify-content":"space-between"}},{default:z(()=>[B($,{modelValue:o.value,"onUpdate:modelValue":P[0]||(P[0]=ie=>o.value=ie),clearable:"",placeholder:"\u72B6\u6001",style:{width:"50%"},onChange:m},{default:z(()=>[B(N,{label:"\u505C\u7528\u4E2D",value:"true"}),B(N,{label:"\u8FD0\u884C\u4E2D",value:"false"})]),_:1},8,["modelValue"]),B(W,{"prefix-icon":p(c$),modelValue:i.value,"onUpdate:modelValue":P[1]||(P[1]=ie=>i.value=ie),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57",onInput:p(h)},null,8,["prefix-icon","modelValue","onInput"])]),_:1})]),_:1}),B(q,{data:a.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:z(()=>[B(I,{prop:"ruleChain.id",label:"ID"}),B(I,{prop:"ruleChain.name",label:"\u540D\u79F0"},{default:z(ie=>[J("div",Nqe,[qe(je(ie.row.ruleChain.name)+" ",1),t.root&&b(ie.row)?(R(),we(Q,{key:0,class:"box-item",effect:"dark",content:`\u89E6\u53D1\u5668:${b(ie.row)||"\u624B\u52A8\u89E6\u53D1"}`,placement:"bottom-start"},{default:z(()=>[t.root?(R(),we(U,{key:0,style:{"margin-left":"8px",width:"20px",height:"20px"},src:y(ie.row),fit:"cover"},null,8,["src"])):_e("",!0)]),_:2},1032,["content"])):_e("",!0)])]),_:1}),B(I,{prop:"ruleChain.disabled",label:"\u72B6\u6001"},{default:z(ie=>{var oe,Se,ke,Y;return[B(V,{type:ie.row.ruleChain.disabled?"info":"success"},{default:z(()=>[qe(je(ie.row.ruleChain.disabled?"\u505C\u7528\u4E2D":"\u8FD0\u884C\u4E2D"),1)]),_:2},1032,["type"]),(Se=(oe=ie.row.ruleChain)==null?void 0:oe.additionalInfo)!=null&&Se.message?(R(),we(Q,{key:0,class:"box-item",effect:"dark",content:(Y=(ke=ie.row.ruleChain)==null?void 0:ke.additionalInfo)==null?void 0:Y.message,placement:"bottom-start"},{default:z(()=>[B(A,{type:"text",size:"small"},{default:z(()=>[qe("\u67E5\u770B\u4FE1\u606F")]),_:1})]),_:2},1032,["content"])):_e("",!0)]}),_:1}),B(I,{formatter:g,label:"\u66F4\u65B0\u65F6\u95F4"}),B(I,{fixed:"right",label:"\u64CD\u4F5C","min-width":"120"},{default:z(ie=>[B(A,{link:"",icon:p(VQ),type:"primary",size:"small",onClick:oe=>x(ie.row)},{default:z(()=>[qe(" \u8BBE\u8BA1 ")]),_:2},1032,["icon","onClick"]),B(A,{link:"",icon:ie.row.ruleChain.disabled?p(zCe):p(PCe),type:ie.row.ruleChain.disabled?"success":"danger",size:"small",onClick:oe=>C(ie.row.ruleChain)},{default:z(()=>[qe(je(ie.row.ruleChain.disabled?"\u90E8\u7F72":"\u4E0B\u7EBF"),1)]),_:2},1032,["icon","type","onClick"]),B(A,{link:"",icon:p(l$),type:"danger",size:"small",onClick:oe=>E(ie.row)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["icon","onClick"])]),_:1})]),_:1},8,["data"]),B(K,{currentPage:u.value.page,"onUpdate:currentPage":P[2]||(P[2]=ie=>u.value.page=ie),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"])]),_:1},8,["locale"]),B($X,{ref_key:"newFlowDialogRef",ref:l,lf:t.lf,show:s.value,onSubmit:O,onClose:S},null,8,["lf","show"])],64)}}};var MF=Pl(Dqe,[["__scopeId","data-v-1f5efb6c"]]);const Lqe={__name:"NewOrOpenFlowDialog",props:["show","lf"],emits:["new","open","close"],setup(t,{emit:e}){const n=F("flows");F(!1);const r=s=>{e("new",s)},i=s=>{e("open",s)},o=(s,l)=>{e("operate",s,l)},a=()=>{e("close")};return(s,l)=>{const u=ho,c=fo,d=Sp,f=wp,h=Ma;return R(),we(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":a,modelValue:t.show},{header:z(()=>[B(c,null,{default:z(()=>[B(u,{span:12},{default:z(()=>[qe("\u65B0\u5EFA/\u6253\u5F00\u89C4\u5219\u94FE")]),_:1})]),_:1})]),default:z(()=>[B(f,{modelValue:n.value,"onUpdate:modelValue":l[0]||(l[0]=m=>n.value=m)},{default:z(()=>[B(d,{label:"\u6D41\u7A0B\u5217\u8868",name:"flows"},{default:z(()=>[B(MF,{lf:t.lf,root:!0,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1}),B(d,{label:"\u5B50\u6D41\u7A0B\u5217\u8868",name:"subFlows"},{default:z(()=>[B(MF,{lf:t.lf,root:!1,onNew:r,onOpen:i,onClose:a,onOperate:o},null,8,["lf"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}};var NX={exports:{}};(function(t,e){(function(n,r){r()})(Mi,function(){function n(u,c){return typeof c=="undefined"?c={autoBom:!1}:typeof c!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),c={autoBom:!c}),c.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(u.type)?new Blob(["\uFEFF",u],{type:u.type}):u}function r(u,c,d){var f=new XMLHttpRequest;f.open("GET",u),f.responseType="blob",f.onload=function(){l(f.response,c,d)},f.onerror=function(){console.error("could not download file")},f.send()}function i(u){var c=new XMLHttpRequest;c.open("HEAD",u,!1);try{c.send()}catch{}return 200<=c.status&&299>=c.status}function o(u){try{u.dispatchEvent(new MouseEvent("click"))}catch{var c=document.createEvent("MouseEvents");c.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),u.dispatchEvent(c)}}var a=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof Mi=="object"&&Mi.global===Mi?Mi:void 0,s=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),l=a.saveAs||(typeof window!="object"||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(u,c,d){var f=a.URL||a.webkitURL,h=document.createElement("a");c=c||u.name||"download",h.download=c,h.rel="noopener",typeof u=="string"?(h.href=u,h.origin===location.origin?o(h):i(h.href)?r(u,c,d):o(h,h.target="_blank")):(h.href=f.createObjectURL(u),setTimeout(function(){f.revokeObjectURL(h.href)},4e4),setTimeout(function(){o(h)},0))}:"msSaveOrOpenBlob"in navigator?function(u,c,d){if(c=c||u.name||"download",typeof u!="string")navigator.msSaveOrOpenBlob(n(u,d),c);else if(i(u))r(u,c,d);else{var f=document.createElement("a");f.href=u,f.target="_blank",setTimeout(function(){o(f)})}}:function(u,c,d,f){if(f=f||open("","_blank"),f&&(f.document.title=f.document.body.innerText="downloading..."),typeof u=="string")return r(u,c,d);var h=u.type==="application/octet-stream",m=/constructor/i.test(a.HTMLElement)||a.safari,g=/CriOS\/[\d]+/.test(navigator.userAgent);if((g||h&&m||s)&&typeof FileReader!="undefined"){var y=new FileReader;y.onloadend=function(){var O=y.result;O=g?O:O.replace(/^data:[^;]*;/,"data:attachment/file;"),f?f.location.href=O:location=O,f=null},y.readAsDataURL(u)}else{var b=a.URL||a.webkitURL,w=b.createObjectURL(u);f?f.location=w:location.href=w,f=null,setTimeout(function(){b.revokeObjectURL(w)},4e4)}});a.saveAs=l.saveAs=l,t.exports=l})})(NX);let OA=[],DX=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e>1;if(t=DX[r])e=r+1;else return!0;if(e==n)return!1}}function RF(t){return t>=127462&&t<=127487}const $F=8205;function Bqe(t,e,n=!0,r=!0){return(n?LX:Fqe)(t,e,r)}function LX(t,e,n){if(e==t.length)return e;e&&IX(t.charCodeAt(e))&&BX(t.charCodeAt(e-1))&&e--;let r=s2(t,e);for(e+=NF(r);e=0&&RF(s2(t,a));)o++,a-=2;if(o%2==0)break;e+=2}else break}return e}function Fqe(t,e,n){for(;e>0;){let r=LX(t,e-2,n);if(r=56320&&t<57344}function BX(t){return t>=55296&&t<56320}function NF(t){return t<65536?1:2}class Mr{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,r){[e,n]=Om(this,e,n);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(n,this.length,i,1),Iu.from(i,this.length-(n-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Om(this,e,n);let r=[];return this.decompose(e,n,r,0),Iu.from(r,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new Hy(this),o=new Hy(e);for(let a=n,s=n;;){if(i.next(a),o.next(a),a=0,i.lineBreak!=o.lineBreak||i.done!=o.done||i.value!=o.value)return!1;if(s+=i.value.length,i.done||s>=r)return!0}}iter(e=1){return new Hy(this,e)}iterRange(e,n=this.length){return new FX(this,e,n)}iterLines(e,n){let r;if(e==null)r=this.iter();else{n==null&&(n=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new VX(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Mr.empty:e.length<=32?new Vi(e):Iu.from(Vi.split(e,[]))}}class Vi extends Mr{constructor(e,n=Vqe(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.text[o],s=i+a.length;if((n?r:s)>=e)return new jqe(i,s,r,a);i=s+1,r++}}decompose(e,n,r,i){let o=e<=0&&n>=this.length?this:new Vi(DF(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(i&1){let a=r.pop(),s=V1(o.text,a.text.slice(),0,o.length);if(s.length<=32)r.push(new Vi(s,a.length+o.length));else{let l=s.length>>1;r.push(new Vi(s.slice(0,l)),new Vi(s.slice(l)))}}else r.push(o)}replace(e,n,r){if(!(r instanceof Vi))return super.replace(e,n,r);[e,n]=Om(this,e,n);let i=V1(this.text,V1(r.text,DF(this.text,0,e)),n),o=this.length+r.length-(n-e);return i.length<=32?new Vi(i,o):Iu.from(Vi.split(i,[]),o)}sliceString(e,n=this.length,r=` `){[e,n]=Om(this,e,n);let i="";for(let o=0,a=0;o<=n&&ae&&a&&(i+=r),eo&&(i+=s.slice(Math.max(0,e-o),n-o)),o=l+1}return i}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let r=[],i=-1;for(let o of e)r.push(o),i+=o.length+1,r.length==32&&(n.push(new Vi(r,i)),r=[],i=-1);return i>-1&&n.push(new Vi(r,i)),n}}class Iu extends Mr{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,n,r,i){for(let o=0;;o++){let a=this.children[o],s=i+a.length,l=r+a.lines-1;if((n?l:s)>=e)return a.lineInner(e,n,r,i);i=s+1,r=l+1}}decompose(e,n,r,i){for(let o=0,a=0;a<=n&&o=a){let u=i&((a<=e?1:0)|(l>=n?2:0));a>=e&&l<=n&&!u?r.push(s):s.decompose(e-a,n-a,r,u)}a=l+1}}replace(e,n,r){if([e,n]=Om(this,e,n),r.lines=o&&n<=s){let l=a.replace(e-o,n-o,r),u=this.lines-a.lines+l.lines;if(l.lines>5-1&&l.lines>u>>5+1){let c=this.children.slice();return c[i]=l,new Iu(c,this.length-(n-e)+r.length)}return super.replace(o,s,l)}o=s+1}return super.replace(e,n,r)}sliceString(e,n=this.length,r=` `){[e,n]=Om(this,e,n);let i="";for(let o=0,a=0;oe&&o&&(i+=r),ea&&(i+=s.sliceString(e-a,n-a,r)),a=l+1}return i}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Iu))return 0;let r=0,[i,o,a,s]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=n,o+=n){if(i==a||o==s)return r;let l=this.children[i],u=e.children[o];if(l!=u)return r+l.scanIdentical(u,n);r+=l.length+1}}static from(e,n=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let h of e)r+=h.lines;if(r<32){let h=[];for(let m of e)m.flatten(h);return new Vi(h,n)}let i=Math.max(32,r>>5),o=i<<1,a=i>>1,s=[],l=0,u=-1,c=[];function d(h){let m;if(h.lines>o&&h instanceof Iu)for(let g of h.children)d(g);else h.lines>a&&(l>a||!l)?(f(),s.push(h)):h instanceof Vi&&l&&(m=c[c.length-1])instanceof Vi&&h.lines+m.lines<=32?(l+=h.lines,u+=h.length+1,c[c.length-1]=new Vi(m.text.concat(h.text),m.length+1+h.length)):(l+h.lines>i&&f(),l+=h.lines,u+=h.length+1,c.push(h))}function f(){l!=0&&(s.push(c.length==1?c[0]:Iu.from(c,u)),u=-1,l=c.length=0)}for(let h of e)d(h);return f(),s.length==1?s[0]:new Iu(s,n)}}Mr.empty=new Vi([""],0);function Vqe(t){let e=-1;for(let n of t)e+=n.length+1;return e}function V1(t,e,n=0,r=1e9){for(let i=0,o=0,a=!0;o=n&&(l>r&&(s=s.slice(0,r-i)),i0?1:(e instanceof Vi?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],o=this.offsets[r],a=o>>1,s=i instanceof Vi?i.text.length:i.children.length;if(a==(n>0?s:0)){if(r==0)return this.done=!0,this.value="",this;n>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((o&1)==(n>0?0:1)){if(this.offsets[r]+=n,e==0)return this.lineBreak=!0,this.value=` `,this;e--}else if(i instanceof Vi){let l=i.text[a+(n<0?-1:0)];if(this.offsets[r]+=n,l.length>Math.max(0,e))return this.value=e==0?l:n>0?l.slice(e):l.slice(0,l.length-e),this;e-=l.length}else{let l=i.children[a+(n<0?-1:0)];e>l.length?(e-=l.length,this.offsets[r]+=n):(n<0&&this.offsets[r]--,this.nodes.push(l),this.offsets.push(n>0?1:(l instanceof Vi?l.text.length:l.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class FX{constructor(e,n,r){this.value="",this.done=!1,this.cursor=new Hy(e,n>r?-1:1),this.pos=n>r?e.length:0,this.from=Math.min(n,r),this.to=Math.max(n,r)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let r=n<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*n,this.value=i.length<=r?i:n<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class VX{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:r,value:i}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol!="undefined"&&(Mr.prototype[Symbol.iterator]=function(){return this.iter()},Hy.prototype[Symbol.iterator]=FX.prototype[Symbol.iterator]=VX.prototype[Symbol.iterator]=function(){return this});class jqe{constructor(e,n,r,i){this.from=e,this.to=n,this.number=r,this.text=i}get length(){return this.to-this.from}}function Om(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function Io(t,e,n=!0,r=!0){return Bqe(t,e,n,r)}function zqe(t){return t>=56320&&t<57344}function Qqe(t){return t>=55296&&t<56320}function za(t,e){let n=t.charCodeAt(e);if(!Qqe(n)||e+1==t.length)return n;let r=t.charCodeAt(e+1);return zqe(r)?(n-55296<<10)+(r-56320)+65536:n}function JN(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Bu(t){return t<65536?1:2}const wA=/\r\n?|\n/;var No=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(No||(No={}));class Xu{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;ne)return o+(e-i);o+=s}else{if(r!=No.Simple&&u>=e&&(r==No.TrackDel&&ie||r==No.TrackBefore&&ie))return null;if(u>e||u==e&&n<0&&!s)return e==i||n<0?o:o+l;o+=l}i=u}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return o}touchesRange(e,n=e){for(let r=0,i=0;r=0&&i<=n&&s>=e)return in?"cover":!0;i=s}return!1}toString(){let e="";for(let n=0;n=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Xu(e)}static create(e){return new Xu(e)}}class oo extends Xu{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return SA(this,(n,r,i,o,a)=>e=e.replace(i,i+(r-n),a),!1),e}mapDesc(e,n=!1){return xA(this,e,n,!0)}invert(e){let n=this.sections.slice(),r=[];for(let i=0,o=0;i=0){n[i]=s,n[i+1]=a;let l=i>>1;for(;r.length0&&qd(r,n,o.text),o.forward(c),s+=c}let u=e[a++];for(;s>1].toJSON()))}return e}static of(e,n,r){let i=[],o=[],a=0,s=null;function l(c=!1){if(!c&&!i.length)return;af||d<0||f>n)throw new RangeError(`Invalid change range ${d} to ${f} (in doc of length ${n})`);let m=h?typeof h=="string"?Mr.of(h.split(r||wA)):h:Mr.empty,g=m.length;if(d==f&&g==0)return;da&&Jo(i,d-a,-1),Jo(i,f-d,g),qd(o,i,m),a=f}}return u(e),l(!s),s}static empty(e){return new oo(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],r=[];for(let i=0;is&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(o.length==1)n.push(o[0],0);else{for(;r.length=0&&n<=0&&n==t[i+1]?t[i]+=e:i>=0&&e==0&&t[i]==0?t[i+1]+=n:r?(t[i]+=e,t[i+1]+=n):t.push(e,n)}function qd(t,e,n){if(n.length==0)return;let r=e.length-2>>1;if(r>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)s=t.sections[a++],l=t.sections[a++];e(i,u,o,c,d),i=u,o=c}}}function xA(t,e,n,r=!1){let i=[],o=r?[]:null,a=new j0(t),s=new j0(e);for(let l=-1;;){if(a.done&&s.len||s.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&s.ins==-1){let u=Math.min(a.len,s.len);Jo(i,u,-1),a.forward(u),s.forward(u)}else if(s.ins>=0&&(a.ins<0||l==a.i||a.off==0&&(s.len=0&&l=0){let u=0,c=a.len;for(;c;)if(s.ins==-1){let d=Math.min(c,s.len);u+=d,c-=d,s.forward(d)}else if(s.ins==0&&s.lenl||a.ins>=0&&a.len>l)&&(s||r.length>u),o.forward2(l),a.forward(l)}}}}class j0{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return n>=e.length?Mr.empty:e[n]}textBit(e){let{inserted:n}=this.set,r=this.i-2>>1;return r>=n.length&&!e?Mr.empty:n[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Dh{constructor(e,n,r){this.from=e,this.to=n,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,n):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new Dh(r,i,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return yt.range(e,n);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return yt.range(this.anchor,r)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return yt.range(e.anchor,e.head)}static create(e,n,r){return new Dh(e,n,r)}}class yt{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:yt.create(this.ranges.map(r=>r.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;re.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new yt(e.ranges.map(n=>Dh.fromJSON(n)),e.main)}static single(e,n=e){return new yt([yt.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;ie?8:0)|o)}static normalized(e,n=0){let r=e[n];e.sort((i,o)=>i.from-o.from),n=e.indexOf(r);for(let i=1;io.head?yt.range(l,s):yt.range(s,l))}}return new yt(e,n)}}function zX(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let eD=0;class Xt{constructor(e,n,r,i,o){this.combine=e,this.compareInput=n,this.compare=r,this.isStatic=i,this.id=eD++,this.default=e([]),this.extensions=typeof o=="function"?o(this):o}get reader(){return this}static define(e={}){return new Xt(e.combine||(n=>n),e.compareInput||((n,r)=>n===r),e.compare||(e.combine?(n,r)=>n===r:tD),!!e.static,e.enables)}of(e){return new j1([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new j1(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new j1(e,this,2,n)}from(e,n){return n||(n=r=>r),this.compute([e],r=>n(r.field(e)))}}function tD(t,e){return t==e||t.length==e.length&&t.every((n,r)=>n===e[r])}class j1{constructor(e,n,r,i){this.dependencies=e,this.facet=n,this.type=r,this.value=i,this.id=eD++}dynamicSlot(e){var n;let r=this.value,i=this.facet.compareInput,o=this.id,a=e[o]>>1,s=this.type==2,l=!1,u=!1,c=[];for(let d of this.dependencies)d=="doc"?l=!0:d=="selection"?u=!0:(((n=e[d.id])!==null&&n!==void 0?n:1)&1)==0&&c.push(e[d.id]);return{create(d){return d.values[a]=r(d),1},update(d,f){if(l&&f.docChanged||u&&(f.docChanged||f.selection)||CA(d,c)){let h=r(d);if(s?!LF(h,d.values[a],i):!i(h,d.values[a]))return d.values[a]=h,1}return 0},reconfigure:(d,f)=>{let h,m=f.config.address[o];if(m!=null){let g=CS(f,m);if(this.dependencies.every(y=>y instanceof Xt?f.facet(y)===d.facet(y):y instanceof So?f.field(y,!1)==d.field(y,!1):!0)||(s?LF(h=r(d),g,i):i(h=r(d),g)))return d.values[a]=g,0}else h=r(d);return d.values[a]=h,1}}}}function LF(t,e,n){if(t.length!=e.length)return!1;for(let r=0;rt[l.id]),i=n.map(l=>l.type),o=r.filter(l=>!(l&1)),a=t[e.id]>>1;function s(l){let u=[];for(let c=0;cr===i),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(IF).find(r=>r.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:r=>(r.values[n]=this.create(r),1),update:(r,i)=>{let o=r.values[n],a=this.updateF(o,i);return this.compareF(o,a)?0:(r.values[n]=a,1)},reconfigure:(r,i)=>i.config.address[this.id]!=null?(r.values[n]=i.field(this),0):(r.values[n]=this.create(r),1)}}init(e){return[this,IF.of({field:this,create:e})]}get extension(){return this}}const Ch={lowest:4,low:3,default:2,high:1,highest:0};function Hv(t){return e=>new QX(e,t)}const Hf={highest:Hv(Ch.highest),high:Hv(Ch.high),default:Hv(Ch.default),low:Hv(Ch.low),lowest:Hv(Ch.lowest)};class QX{constructor(e,n){this.inner=e,this.prec=n}}class zb{of(e){return new EA(this,e)}reconfigure(e){return zb.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class EA{constructor(e,n){this.compartment=e,this.inner=n}}class xS{constructor(e,n,r,i,o,a){for(this.base=e,this.compartments=n,this.dynamicSlots=r,this.address=i,this.staticValues=o,this.facets=a,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,n,r){let i=[],o=Object.create(null),a=new Map;for(let f of Wqe(e,n,a))f instanceof So?i.push(f):(o[f.facet.id]||(o[f.facet.id]=[])).push(f);let s=Object.create(null),l=[],u=[];for(let f of i)s[f.id]=u.length<<1,u.push(h=>f.slot(h));let c=r==null?void 0:r.config.facets;for(let f in o){let h=o[f],m=h[0].facet,g=c&&c[f]||[];if(h.every(y=>y.type==0))if(s[m.id]=l.length<<1|1,tD(g,h))l.push(r.facet(m));else{let y=m.combine(h.map(b=>b.value));l.push(r&&m.compare(y,r.facet(m))?r.facet(m):y)}else{for(let y of h)y.type==0?(s[y.id]=l.length<<1|1,l.push(y.value)):(s[y.id]=u.length<<1,u.push(b=>y.dynamicSlot(b)));s[m.id]=u.length<<1,u.push(y=>Hqe(y,m,h))}}let d=u.map(f=>f(s));return new xS(e,a,d,s,l,o)}}function Wqe(t,e,n){let r=[[],[],[],[],[]],i=new Map;function o(a,s){let l=i.get(a);if(l!=null){if(l<=s)return;let u=r[l].indexOf(a);u>-1&&r[l].splice(u,1),a instanceof EA&&n.delete(a.compartment)}if(i.set(a,s),Array.isArray(a))for(let u of a)o(u,s);else if(a instanceof EA){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let u=e.get(a.compartment)||a.inner;n.set(a.compartment,u),o(u,s)}else if(a instanceof QX)o(a.inner,a.prec);else if(a instanceof So)r[s].push(a),a.provides&&o(a.provides,s);else if(a instanceof j1)r[s].push(a),a.facet.extensions&&o(a.facet.extensions,Ch.default);else{let u=a.extension;if(!u)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(u,s)}}return o(t,Ch.default),r.reduce((a,s)=>a.concat(s))}function Wy(t,e){if(e&1)return 2;let n=e>>1,r=t.status[n];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;t.status[n]=4;let i=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|i}function CS(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const HX=Xt.define(),TA=Xt.define({combine:t=>t.some(e=>e),static:!0}),WX=Xt.define({combine:t=>t.length?t[0]:void 0,static:!0}),UX=Xt.define(),qX=Xt.define(),YX=Xt.define(),XX=Xt.define({combine:t=>t.length?t[0]:!1});class cd{constructor(e,n){this.type=e,this.value=n}static define(){return new Uqe}}class Uqe{of(e){return new cd(this,e)}}class qqe{constructor(e){this.map=e}of(e){return new Wn(this,e)}}class Wn{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new Wn(this.type,n)}is(e){return this.type==e}static define(e={}){return new qqe(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let r=[];for(let i of e){let o=i.map(n);o&&r.push(o)}return r}}Wn.reconfigure=Wn.define();Wn.appendConfig=Wn.define();class Zi{constructor(e,n,r,i,o,a){this.startState=e,this.changes=n,this.selection=r,this.effects=i,this.annotations=o,this.scrollIntoView=a,this._doc=null,this._state=null,r&&zX(r,n.newLength),o.some(s=>s.type==Zi.time)||(this.annotations=o.concat(Zi.time.of(Date.now())))}static create(e,n,r,i,o,a){return new Zi(e,n,r,i,o,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Zi.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Zi.time=cd.define();Zi.userEvent=cd.define();Zi.addToHistory=cd.define();Zi.remote=cd.define();function Yqe(t,e){let n=[];for(let r=0,i=0;;){let o,a;if(r=t[r]))o=t[r++],a=t[r++];else if(i=0;i--){let o=r[i](t);o instanceof Zi?t=o:Array.isArray(o)&&o.length==1&&o[0]instanceof Zi?t=o[0]:t=GX(e,Dg(o),!1)}return t}function Zqe(t){let e=t.startState,n=e.facet(YX),r=t;for(let i=n.length-1;i>=0;i--){let o=n[i](t);o&&Object.keys(o).length&&(r=ZX(r,kA(e,o,t.changes.newLength),!0))}return r==t?t:Zi.create(e,t.changes,t.selection,r.effects,r.annotations,r.scrollIntoView)}const Gqe=[];function Dg(t){return t==null?Gqe:Array.isArray(t)?t:[t]}var xi=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(xi||(xi={}));const Kqe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let PA;try{PA=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Jqe(t){if(PA)return PA.test(t);for(let e=0;e"\x80"&&(n.toUpperCase()!=n.toLowerCase()||Kqe.test(n)))return!0}return!1}function eYe(t){return e=>{if(!/\S/.test(e))return xi.Space;if(Jqe(e))return xi.Word;for(let n=0;n-1)return xi.Word;return xi.Other}}class vr{constructor(e,n,r,i,o,a){this.config=e,this.doc=n,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=o,a&&(a._state=this);for(let s=0;si.set(u,l)),n=null),i.set(s.value.compartment,s.value.extension)):s.is(Wn.reconfigure)?(n=null,r=s.value):s.is(Wn.appendConfig)&&(n=null,r=Dg(r).concat(s.value));let o;n?o=e.startState.values.slice():(n=xS.resolve(r,i,this),o=new vr(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(l,u)=>u.reconfigure(l,this),null).values);let a=e.startState.facet(TA)?e.newSelection:e.newSelection.asSingle();new vr(n,e.newDoc,a,o,(s,l)=>l.update(s,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:yt.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,r=e(n.ranges[0]),i=this.changes(r.changes),o=[r.range],a=Dg(r.effects);for(let s=1;sa.spec.fromJSON(s,l)))}}return vr.create({doc:e.doc,selection:yt.fromJSON(e.selection),extensions:n.extensions?i.concat([n.extensions]):i})}static create(e={}){let n=xS.resolve(e.extensions||[],new Map),r=e.doc instanceof Mr?e.doc:Mr.of((e.doc||"").split(n.staticFacet(vr.lineSeparator)||wA)),i=e.selection?e.selection instanceof yt?e.selection:yt.single(e.selection.anchor,e.selection.head):yt.single(0);return zX(i,r.length),n.staticFacet(TA)||(i=i.asSingle()),new vr(n,r,i,n.dynamicSlots.map(()=>null),(o,a)=>a.create(o),null)}get tabSize(){return this.facet(vr.tabSize)}get lineBreak(){return this.facet(vr.lineSeparator)||` `}get readOnly(){return this.facet(XX)}phrase(e,...n){for(let r of this.facet(vr.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let o=+(i||1);return!o||o>n.length?r:n[o-1]})),e}languageDataAt(e,n,r=-1){let i=[];for(let o of this.facet(HX))for(let a of o(this,n,r))Object.prototype.hasOwnProperty.call(a,e)&&i.push(a[e]);return i}charCategorizer(e){return eYe(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:r,length:i}=this.doc.lineAt(e),o=this.charCategorizer(e),a=e-r,s=e-r;for(;a>0;){let l=Io(n,a,!1);if(o(n.slice(l,a))!=xi.Word)break;a=l}for(;st.length?t[0]:4});vr.lineSeparator=WX;vr.readOnly=XX;vr.phrases=Xt.define({compare(t,e){let n=Object.keys(t),r=Object.keys(e);return n.length==r.length&&n.every(i=>t[i]==e[i])}});vr.languageData=HX;vr.changeFilter=UX;vr.transactionFilter=qX;vr.transactionExtender=YX;zb.reconfigure=Wn.define();function gc(t,e,n={}){let r={};for(let i of t)for(let o of Object.keys(i)){let a=i[o],s=r[o];if(s===void 0)r[o]=a;else if(!(s===a||a===void 0))if(Object.hasOwnProperty.call(n,o))r[o]=n[o](s,a);else throw new Error("Config merge conflict for field "+o)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class up{eq(e){return this==e}range(e,n=e){return z0.create(e,n,this)}}up.prototype.startSide=up.prototype.endSide=0;up.prototype.point=!1;up.prototype.mapMode=No.TrackDel;class z0{constructor(e,n,r){this.from=e,this.to=n,this.value=r}static create(e,n,r){return new z0(e,n,r)}}function AA(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class nD{constructor(e,n,r,i){this.from=e,this.to=n,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,n,r,i=0){let o=r?this.to:this.from;for(let a=i,s=o.length;;){if(a==s)return a;let l=a+s>>1,u=o[l]-e||(r?this.value[l].endSide:this.value[l].startSide)-n;if(l==a)return u>=0?a:s;u>=0?s=l:a=l+1}}between(e,n,r,i){for(let o=this.findIndex(n,-1e9,!0),a=this.findIndex(r,1e9,!1,o);oh||f==h&&u.startSide>0&&u.endSide<=0)continue;(h-f||u.endSide-u.startSide)<0||(a<0&&(a=f),u.point&&(s=Math.max(s,h-f)),r.push(u),i.push(f-a),o.push(h-a))}return{mapped:r.length?new nD(i,o,r,s):null,pos:a}}}class Ar{constructor(e,n,r,i){this.chunkPos=e,this.chunk=n,this.nextLayer=r,this.maxPoint=i}static create(e,n,r,i){return new Ar(e,n,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:r=!1,filterFrom:i=0,filterTo:o=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(r&&(n=n.slice().sort(AA)),this.isEmpty)return n.length?Ar.of(n):this;let s=new KX(this,null,-1).goto(0),l=0,u=[],c=new Sf;for(;s.value||l=0){let d=n[l++];c.addInner(d.from,d.to,d.value)||u.push(d)}else s.rangeIndex==1&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||os.to||o=o&&e<=o+a.length&&a.between(o,e-o,n-o,r)===!1)return}this.nextLayer.between(e,n,r)}}iter(e=0){return Q0.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Q0.from(e).goto(n)}static compare(e,n,r,i,o=-1){let a=e.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),s=n.filter(d=>d.maxPoint>0||!d.isEmpty&&d.maxPoint>=o),l=BF(a,s,r),u=new Wv(a,l,o),c=new Wv(s,l,o);r.iterGaps((d,f,h)=>FF(u,d,c,f,h,i)),r.empty&&r.length==0&&FF(u,0,c,0,0,i)}static eq(e,n,r=0,i){i==null&&(i=1e9-1);let o=e.filter(c=>!c.isEmpty&&n.indexOf(c)<0),a=n.filter(c=>!c.isEmpty&&e.indexOf(c)<0);if(o.length!=a.length)return!1;if(!o.length)return!0;let s=BF(o,a),l=new Wv(o,s,0).goto(r),u=new Wv(a,s,0).goto(r);for(;;){if(l.to!=u.to||!MA(l.active,u.active)||l.point&&(!u.point||!l.point.eq(u.point)))return!1;if(l.to>i)return!0;l.next(),u.next()}}static spans(e,n,r,i,o=-1){let a=new Wv(e,null,o).goto(n),s=n,l=a.openStart;for(;;){let u=Math.min(a.to,r);if(a.point){let c=a.activeForPoint(a.to),d=a.pointFroms&&(i.span(s,u,a.active,l),l=a.openEnd(u));if(a.to>r)return l+(a.point&&a.to>r?1:0);s=a.to,a.next()}}static of(e,n=!1){let r=new Sf;for(let i of e instanceof z0?[e]:n?tYe(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Ar.empty;let n=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Ar.empty;i=i.nextLayer)n=new Ar(i.chunkPos,i.chunk,n,Math.max(i.maxPoint,n.maxPoint));return n}}Ar.empty=new Ar([],[],null,-1);function tYe(t){if(t.length>1)for(let e=t[0],n=1;n0)return t.slice().sort(AA);e=r}return t}Ar.empty.nextLayer=Ar.empty;class Sf{finishChunk(e){this.chunks.push(new nD(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,r){this.addInner(e,n,r)||(this.nextLayer||(this.nextLayer=new Sf)).add(e,n,r)}addInner(e,n,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=n,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let r=n.value.length-1;return this.last=n.value[r],this.lastFrom=n.from[r]+e,this.lastTo=n.to[r]+e,!0}finish(){return this.finishInner(Ar.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=Ar.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function BF(t,e,n){let r=new Map;for(let o of t)for(let a=0;a=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=r&&i.push(new KX(a,n,r,o));return i.length==1?i[0]:new Q0(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let r of this.heap)r.goto(e,n);for(let r=this.heap.length>>1;r>=0;r--)l2(this.heap,r);return this.next(),this}forward(e,n){for(let r of this.heap)r.forward(e,n);for(let r=this.heap.length>>1;r>=0;r--)l2(this.heap,r);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),l2(this.heap,0)}}}function l2(t,e){for(let n=t[e];;){let r=(e<<1)+1;if(r>=t.length)break;let i=t[r];if(r+1=0&&(i=t[r+1],r++),n.compare(i)<0)break;t[r]=n,t[e]=i,e=r}}class Wv{constructor(e,n,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Q0.from(e,n,r)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){VO(this.active,e),VO(this.activeTo,e),VO(this.activeRank,e),this.minActive=VF(this.active,this.activeTo)}addActive(e){let n=0,{value:r,to:i,rank:o}=this.cursor;for(;n0;)n++;jO(this.active,n,r),jO(this.activeTo,n,i),jO(this.activeRank,n,o),e&&jO(e,n,this.cursor.from),this.minActive=VF(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&VO(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let o=this.cursor.value;if(!o.point)this.addActive(r),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from=0&&r[i]=0&&!(this.activeRank[r]e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&n.push(this.active[r]);return n.reverse()}openEnd(e){let n=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)n++;return n}}function FF(t,e,n,r,i,o){t.goto(e),n.goto(r);let a=r+i,s=r,l=r-e;for(;;){let u=t.to+l-n.to,c=u||t.endSide-n.endSide,d=c<0?t.to+l:n.to,f=Math.min(d,a);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&MA(t.activeForPoint(t.to),n.activeForPoint(n.to))||o.comparePoint(s,f,t.point,n.point):f>s&&!MA(t.active,n.active)&&o.compareRange(s,f,t.active,n.active),d>a)break;(u||t.openEnd!=n.openEnd)&&o.boundChange&&o.boundChange(d),s=d,c<=0&&t.next(),c>=0&&n.next()}}function MA(t,e){if(t.length!=e.length)return!1;for(let n=0;n=e;r--)t[r+1]=t[r];t[e]=n}function VF(t,e){let n=-1,r=1e9;for(let i=0;i=e)return i;if(i==t.length)break;o+=t.charCodeAt(i)==9?n-o%n:1,i=Io(t,i)}return r===!0?-1:t.length}const $A="\u037C",jF=typeof Symbol=="undefined"?"__"+$A:Symbol.for($A),NA=typeof Symbol=="undefined"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),zF=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:{};class xf{constructor(e,n){this.rules=[];let{finish:r}=n||{};function i(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function o(a,s,l,u){let c=[],d=/^@(\w+)\b/.exec(a[0]),f=d&&d[1]=="keyframes";if(d&&s==null)return l.push(a[0]+";");for(let h in s){let m=s[h];if(/&/.test(h))o(h.split(/,\s*/).map(g=>a.map(y=>g.replace(/&/,y))).reduce((g,y)=>g.concat(y)),m,l);else if(m&&typeof m=="object"){if(!d)throw new RangeError("The value of a property ("+h+") should be a primitive value.");o(i(h),m,c,f)}else m!=null&&c.push(h.replace(/_.*/,"").replace(/[A-Z]/g,g=>"-"+g.toLowerCase())+": "+m+";")}(c.length||f)&&l.push((r&&!d&&!u?a.map(r):a).join(", ")+" {"+c.join(" ")+"}")}for(let a in e)o(i(a),e[a],this.rules)}getRules(){return this.rules.join(` `)}static newName(){let e=zF[jF]||1;return zF[jF]=e+1,$A+e.toString(36)}static mount(e,n,r){let i=e[NA],o=r&&r.nonce;i?o&&i.setNonce(o):i=new nYe(e,o),i.mount(Array.isArray(n)?n:[n],e)}}let QF=new Map;class nYe{constructor(e,n){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let o=QF.get(r);if(o)return e[NA]=o;this.sheet=new i.CSSStyleSheet,QF.set(r,this)}else this.styleTag=r.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[NA]=this}mount(e,n){let r=this.sheet,i=0,o=0;for(let a=0;a-1&&(this.modules.splice(l,1),o--,l=-1),l==-1){if(this.modules.splice(o++,0,s),r)for(let u=0;u",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},rYe=typeof navigator!="undefined"&&/Mac/.test(navigator.platform),iYe=typeof navigator!="undefined"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ro=0;Ro<10;Ro++)Cf[48+Ro]=Cf[96+Ro]=String(Ro);for(var Ro=1;Ro<=24;Ro++)Cf[Ro+111]="F"+Ro;for(var Ro=65;Ro<=90;Ro++)Cf[Ro]=String.fromCharCode(Ro+32),H0[Ro]=String.fromCharCode(Ro);for(var u2 in Cf)H0.hasOwnProperty(u2)||(H0[u2]=Cf[u2]);function oYe(t){var e=rYe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||iYe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?H0:Cf)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function W0(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function DA(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function z1(t,e){if(!e.anchorNode)return!1;try{return DA(t,e.anchorNode)}catch{return!1}}function wm(t){return t.nodeType==3?dp(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Uy(t,e,n,r){return n?HF(t,e,n,r,-1)||HF(t,e,n,r,1):!1}function cp(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function ES(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function HF(t,e,n,r,i){for(;;){if(t==n&&e==r)return!0;if(e==(i<0?0:rc(t))){if(t.nodeName=="DIV")return!1;let o=t.parentNode;if(!o||o.nodeType!=1)return!1;e=cp(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=i<0?rc(t):0}else return!1}}function rc(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Qb(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function aYe(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function JX(t,e){let n=e.width/t.offsetWidth,r=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-t.offsetHeight)<1)&&(r=1),{scaleX:n,scaleY:r}}function sYe(t,e,n,r,i,o,a,s){let l=t.ownerDocument,u=l.defaultView||window;for(let c=t,d=!1;c&&!d;)if(c.nodeType==1){let f,h=c==l.body,m=1,g=1;if(h)f=aYe(u);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let w=c.getBoundingClientRect();({scaleX:m,scaleY:g}=JX(c,w)),f={left:w.left,right:w.left+c.clientWidth*m,top:w.top,bottom:w.top+c.clientHeight*g}}let y=0,b=0;if(i=="nearest")e.top0&&e.bottom>f.bottom+b&&(b=e.bottom-f.bottom+b+a)):e.bottom>f.bottom&&(b=e.bottom-f.bottom+a,n<0&&e.top-b0&&e.right>f.right+y&&(y=e.right-f.right+y+o)):e.right>f.right&&(y=e.right-f.right+o,n<0&&e.lefti.clientHeight&&(r=i),!n&&i.scrollWidth>i.clientWidth&&(n=i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;return{x:n,y:r}}class uYe{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:r}=e;this.set(n,Math.min(e.anchorOffset,n?rc(n):0),r,Math.min(e.focusOffset,r?rc(r):0))}set(e,n,r,i){this.anchorNode=e,this.anchorOffset=n,this.focusNode=r,this.focusOffset=i}}let rg=null;function eZ(t){if(t.setActive)return t.setActive();if(rg)return t.focus(rg);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(rg==null?{get preventScroll(){return rg={preventScroll:!0},!0}}:void 0),!rg){rg=!1;for(let n=0;nMath.max(1,t.scrollHeight-t.clientHeight-4)}function rZ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&r>0)return{node:n,offset:r};if(n.nodeType==1&&r>0){if(n.contentEditable=="false")return null;n=n.childNodes[r-1],r=rc(n)}else if(n.parentNode&&!ES(n))r=cp(n),n=n.parentNode;else return null}}function iZ(t,e){for(let n=t,r=e;;){if(n.nodeType==3&&rn)return d.domBoundsAround(e,n,u);if(f>=e&&i==-1&&(i=l,o=u),u>n&&d.dom.parentNode==this.dom){a=l,s=c;break}c=f,u=f+d.breakAfter}return{from:o,to:s<0?r+this.length:s,startDOM:(i?this.children[i-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:a=0?this.children[a].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,r=rD){this.markDirty();for(let i=e;ithis.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let r=this.children[--this.i];this.pos-=r.length+r.breakAfter}}}function aZ(t,e,n,r,i,o,a,s,l){let{children:u}=t,c=u.length?u[e]:null,d=o.length?o[o.length-1]:null,f=d?d.breakAfter:a;if(!(e==r&&c&&!a&&!f&&o.length<2&&c.merge(n,i,o.length?d:null,n==0,s,l))){if(r0&&(!a&&o.length&&c.merge(n,c.length,o[0],!1,s,0)?c.breakAfter=o.shift().breakAfter:(n2);var Jt={mac:XF||/Mac/.test(Qa.platform),windows:/Win/.test(Qa.platform),linux:/Linux|X11/.test(Qa.platform),ie:SC,ie_version:lZ?LA.documentMode||6:BA?+BA[1]:IA?+IA[1]:0,gecko:qF,gecko_version:qF?+(/Firefox\/(\d+)/.exec(Qa.userAgent)||[0,0])[1]:0,chrome:!!c2,chrome_version:c2?+c2[1]:0,ios:XF,android:/Android\b/.test(Qa.userAgent),webkit:YF,safari:uZ,webkit_version:YF?+(/\bAppleWebKit\/(\d+)/.exec(Qa.userAgent)||[0,0])[1]:0,tabSize:LA.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};const fYe=256;class uu extends oi{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,r){return this.flags&8||r&&(!(r instanceof uu)||this.length-(n-e)+r.length>fYe||r.flags&8)?!1:(this.text=this.text.slice(0,e)+(r?r.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new uu(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new ra(this.dom,e)}domBoundsAround(e,n,r){return{from:r,to:r+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return hYe(this.dom,e,n)}}class Zc extends oi{constructor(e,n=[],r=0){super(),this.mark=e,this.children=n,this.length=r;for(let i of n)i.setParent(this)}setAttrs(e){if(tZ(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,r,i,o,a){return r&&(!(r instanceof Zc&&r.mark.eq(this.mark))||e&&o<=0||ne&&n.push(r=e&&(i=o),r=l,o++}let a=this.length-e;return this.length=e,i>-1&&(this.children.length=i,this.markDirty()),new Zc(this.mark,n,a)}domAtPos(e){return cZ(this,e)}coordsAt(e,n){return fZ(this,e,n)}}function hYe(t,e,n){let r=t.nodeValue.length;e>r&&(e=r);let i=e,o=e,a=0;e==0&&n<0||e==r&&n>=0?Jt.chrome||Jt.gecko||(e?(i--,a=1):o=0)?0:s.length-1];return Jt.safari&&!a&&l.width==0&&(l=Array.prototype.find.call(s,u=>u.width)||l),a?Qb(l,a<0):l||null}class Yd extends oi{static create(e,n,r){return new Yd(e,n,r)}constructor(e,n,r){super(),this.widget=e,this.length=n,this.side=r,this.prevWidget=null}split(e){let n=Yd.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,r,i,o,a){return r&&(!(r instanceof Yd)||!this.widget.compare(r.widget)||e>0&&o<=0||n0)?ra.before(this.dom):ra.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;let i=this.dom.getClientRects(),o=null;if(!i.length)return null;let a=this.side?this.side<0:e>0;for(let s=a?i.length-1:0;o=i[s],!(e>0?s==0:s==i.length-1||o.top0?ra.before(this.dom):ra.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Mr.empty}get isHidden(){return!0}}uu.prototype.children=Yd.prototype.children=Sm.prototype.children=rD;function cZ(t,e){let n=t.dom,{children:r}=t,i=0;for(let o=0;io&&e0;o--){let a=r[o-1];if(a.dom.parentNode==n)return a.domAtPos(a.length)}for(let o=i;o0&&e instanceof Zc&&i.length&&(r=i[i.length-1])instanceof Zc&&r.mark.eq(e.mark)?dZ(r,e.children[0],n-1):(i.push(e),e.setParent(t)),t.length+=e.length}function fZ(t,e,n){let r=null,i=-1,o=null,a=-1;function s(u,c){for(let d=0,f=0;d=c&&(h.children.length?s(h,c-f):(!o||o.isHidden&&n>0)&&(m>c||f==m&&h.getSide()>0)?(o=h,a=c-f):(f-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(i.indexOf(o)==-1||t[o]!==e[o]))return!1;return!0}function VA(t,e,n){let r=!1;if(e)for(let i in e)n&&i in n||(r=!0,i=="style"?t.style.cssText="":t.removeAttribute(i));if(n)for(let i in n)e&&e[i]==n[i]||(r=!0,i=="style"?t.style.cssText=n[i]:t.setAttribute(i,n[i]));return r}function gYe(t){let e=Object.create(null);for(let n=0;n0?3e8:-4e8:n>0?1e8:-1e8,new Ef(e,n,n,r,e.widget||null,!1)}static replace(e){let n=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:o,end:a}=hZ(e,n);r=(o?n?-3e8:-1:5e8)-1,i=(a?n?2e8:1:-6e8)+1}return new Ef(e,r,i,n,e.widget||null,!0)}static line(e){return new Wb(e)}static set(e,n=!1){return Ar.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}yn.none=Ar.empty;class Hb extends yn{constructor(e){let{start:n,end:r}=hZ(e);super(n?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,r;return this==e||e instanceof Hb&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((r=e.attrs)===null||r===void 0?void 0:r.class))&&TS(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Hb.prototype.point=!1;class Wb extends yn{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Wb&&this.spec.class==e.spec.class&&TS(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Wb.prototype.mapMode=No.TrackBefore;Wb.prototype.point=!0;class Ef extends yn{constructor(e,n,r,i,o,a){super(n,r,o,e),this.block=i,this.isReplace=a,this.mapMode=i?n<=0?No.TrackBefore:No.TrackAfter:No.TrackDel}get type(){return this.startSide!=this.endSide?wa.WidgetRange:this.startSide<=0?wa.WidgetBefore:wa.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Ef&&mYe(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Ef.prototype.point=!0;function hZ(t,e=!1){let{inclusiveStart:n,inclusiveEnd:r}=t;return n==null&&(n=t.inclusive),r==null&&(r=t.inclusive),{start:n!=null?n:e,end:r!=null?r:e}}function mYe(t,e){return t==e||!!(t&&e&&t.compare(e))}function jA(t,e,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=t?n[i]=Math.max(n[i],e):n.push(t,e)}class Xi extends oi{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,r,i,o,a){if(r){if(!(r instanceof Xi))return!1;this.dom||r.transferDOM(this)}return i&&this.setDeco(r?r.attrs:null),sZ(this,e,n,r?r.children.slice():[],o,a),!0}split(e){let n=new Xi;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i:r,off:i}=this.childPos(e);i&&(n.append(this.children[r].split(i),0),this.children[r].merge(i,this.children[r].length,null,!1,0,0),r++);for(let o=r;o0&&this.children[r-1].length==0;)this.children[--r].destroy();return this.children.length=r,this.markDirty(),this.length=e,n}transferDOM(e){!this.dom||(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){TS(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){dZ(this,e,n)}addLineDeco(e){let n=e.spec.attributes,r=e.spec.class;n&&(this.attrs=FA(n,this.attrs||{})),r&&(this.attrs=FA({class:r},this.attrs||{}))}domAtPos(e){return cZ(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var r;this.dom?this.flags&4&&(tZ(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(VA(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let i=this.dom.lastChild;for(;i&&oi.get(i)instanceof Zc;)i=i.lastChild;if(!i||!this.length||i.nodeName!="BR"&&((r=oi.get(i))===null||r===void 0?void 0:r.isEditable)==!1&&(!Jt.ios||!this.children.some(o=>o instanceof uu))){let o=document.createElement("BR");o.cmIgnore=!0,this.dom.appendChild(o)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let r of this.children){if(!(r instanceof uu)||/[^ -~]/.test(r.text))return null;let i=wm(r.dom);if(i.length!=1)return null;e+=i[0].width,n=i[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let r=fZ(this,e,n);if(!this.children.length&&r&&this.parent){let{heightOracle:i}=this.parent.view.viewState,o=r.bottom-r.top;if(Math.abs(o-i.lineHeight)<2&&i.textHeight=n){if(o instanceof Xi)return o;if(a>n)break}i=a+o.breakAfter}return null}}class jc extends oi{constructor(e,n,r){super(),this.widget=e,this.length=n,this.deco=r,this.breakAfter=0,this.prevWidget=null}merge(e,n,r,i,o,a){return r&&(!(r instanceof jc)||!this.widget.compare(r.widget)||e>0&&o<=0||n0}}class zA extends mc{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class qy{constructor(e,n,r,i){this.doc=e,this.pos=n,this.end=r,this.disallowBlockEffectsFor=i,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof jc&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Xi),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(zO(new Sm(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof jc)&&this.getLine()}buildText(e,n,r){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:a,done:s}=this.cursor.next(this.skip);if(this.skip=0,s)throw new Error("Ran out of text content when drawing inline views");if(a){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let i=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(n.slice(n.length-r)),this.getLine().append(zO(new uu(this.text.slice(this.textOff,this.textOff+i)),n),r),this.atCursorPos=!0,this.textOff+=i,e-=i,r=0}}span(e,n,r,i){this.buildText(n-e,r,i),this.pos=n,this.openStart<0&&(this.openStart=i)}point(e,n,r,i,o,a){if(this.disallowBlockEffectsFor[a]&&r instanceof Ef){if(r.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=n-e;if(r instanceof Ef)if(r.block)r.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new jc(r.widget||xm.block,s,r));else{let l=Yd.create(r.widget||xm.inline,s,s?0:r.startSide),u=this.atCursorPos&&!l.isEditable&&o<=i.length&&(e0),c=!l.isEditable&&(ei.length||r.startSide<=0),d=this.getLine();this.pendingBuffer==2&&!u&&!l.isEditable&&(this.pendingBuffer=0),this.flushBuffer(i),u&&(d.append(zO(new Sm(1),i),o),o=i.length+Math.max(0,o-i.length)),d.append(zO(l,i),o),this.atCursorPos=c,this.pendingBuffer=c?ei.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=i.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(r);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=o)}static build(e,n,r,i,o){let a=new qy(e,n,r,o);return a.openEnd=Ar.spans(i,n,r,a),a.openStart<0&&(a.openStart=a.openEnd),a.finish(a.openEnd),a}}function zO(t,e){for(let n of e)t=new Zc(n,[t],t.length);return t}class xm extends mc{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}xm.inline=new xm("span");xm.block=new xm("div");var bi=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(bi||(bi={}));const fp=bi.LTR,iD=bi.RTL;function pZ(t){let e=[];for(let n=0;n=n){if(s.level==r)return a;(o<0||(i!=0?i<0?s.fromn:e[o].level>s.level))&&(o=a)}}if(o<0)throw new RangeError("Index out of range");return o}}function mZ(t,e){if(t.length!=e.length)return!1;for(let n=0;n=0;g-=3)if(Cu[g+1]==-h){let y=Cu[g+2],b=y&2?i:y&4?y&1?o:i:0;b&&(ii[d]=ii[Cu[g]]=b),s=g;break}}else{if(Cu.length==189)break;Cu[s++]=d,Cu[s++]=f,Cu[s++]=l}else if((m=ii[d])==2||m==1){let g=m==i;l=g?0:1;for(let y=s-3;y>=0;y-=3){let b=Cu[y+2];if(b&2)break;if(g)Cu[y+2]|=2;else{if(b&4)break;Cu[y+2]|=4}}}}}function wYe(t,e,n,r){for(let i=0,o=r;i<=n.length;i++){let a=i?n[i-1].to:t,s=il;)m==y&&(m=n[--g].from,y=g?n[g-1].to:t),ii[--m]=h;l=c}else o=u,l++}}}function HA(t,e,n,r,i,o,a){let s=r%2?2:1;if(r%2==i%2)for(let l=e,u=0;ll&&a.push(new Xd(l,g.from,h));let y=g.direction==fp!=!(h%2);WA(t,y?r+1:r,i,g.inner,g.from,g.to,a),l=g.to}m=g.to}else{if(m==n||(c?ii[m]!=s:ii[m]==s))break;m++}f?HA(t,l,m,r+1,i,f,a):le;){let c=!0,d=!1;if(!u||l>o[u-1].to){let g=ii[l-1];g!=s&&(c=!1,d=g==16)}let f=!c&&s==1?[]:null,h=c?r:r+1,m=l;e:for(;;)if(u&&m==o[u-1].to){if(d)break e;let g=o[--u];if(!c)for(let y=g.from,b=u;;){if(y==e)break e;if(b&&o[b-1].to==y)y=o[--b].from;else{if(ii[y-1]==s)break e;break}}if(f)f.push(g);else{g.toii.length;)ii[ii.length]=256;let r=[],i=e==fp?0:1;return WA(t,i,i,n,0,t.length,r),r}function vZ(t){return[new Xd(0,t,0)]}let yZ="";function xYe(t,e,n,r,i){var o;let a=r.head-t.from,s=Xd.find(e,a,(o=r.bidiLevel)!==null&&o!==void 0?o:-1,r.assoc),l=e[s],u=l.side(i,n);if(a==u){let f=s+=i?1:-1;if(f<0||f>=e.length)return null;l=e[s=f],a=l.side(!i,n),u=l.side(i,n)}let c=Io(t.text,a,l.forward(i,n));(cl.to)&&(c=u),yZ=t.text.slice(Math.min(a,c),Math.max(a,c));let d=s==(i?e.length-1:0)?null:e[s+(i?1:-1)];return d&&c==u&&d.level+(i?0:1)t.some(e=>e)}),EZ=Xt.define({combine:t=>t.some(e=>e)}),TZ=Xt.define();class Ig{constructor(e,n="nearest",r="nearest",i=5,o=5,a=!1){this.range=e,this.y=n,this.x=r,this.yMargin=i,this.xMargin=o,this.isSnapshot=a}map(e){return e.empty?this:new Ig(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Ig(yt.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const QO=Wn.define({map:(t,e)=>t.map(e)}),kZ=Wn.define();function qa(t,e,n){let r=t.facet(wZ);r.length?r[0](e):window.onerror?window.onerror(String(e),n,void 0,void 0,e):n?console.error(n+":",e):console.error(e)}const Bd=Xt.define({combine:t=>t.length?t[0]:!0});let EYe=0;const sy=Xt.define();class qi{constructor(e,n,r,i,o){this.id=e,this.create=n,this.domEventHandlers=r,this.domEventObservers=i,this.extension=o(this)}static define(e,n){const{eventHandlers:r,eventObservers:i,provide:o,decorations:a}=n||{};return new qi(EYe++,e,r,i,s=>{let l=[sy.of(s)];return a&&l.push(U0.of(u=>{let c=u.plugin(s);return c?a(c):yn.none})),o&&l.push(o(s)),l})}static fromClass(e,n){return qi.define(r=>new e(r),n)}}class d2{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(r){if(qa(n.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(n){qa(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(r){qa(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const PZ=Xt.define(),sD=Xt.define(),U0=Xt.define(),AZ=Xt.define(),lD=Xt.define(),MZ=Xt.define();function GF(t,e){let n=t.state.facet(MZ);if(!n.length)return n;let r=n.map(o=>o instanceof Function?o(t):o),i=[];return Ar.spans(r,e.from,e.to,{point(){},span(o,a,s,l){let u=o-e.from,c=a-e.from,d=i;for(let f=s.length-1;f>=0;f--,l--){let h=s[f].spec.bidiIsolate,m;if(h==null&&(h=CYe(e.text,u,c)),l>0&&d.length&&(m=d[d.length-1]).to==u&&m.direction==h)m.to=c,d=m.inner;else{let g={from:u,to:c,direction:h,inner:[]};d.push(g),d=g.inner}}}}),i}const RZ=Xt.define();function $Z(t){let e=0,n=0,r=0,i=0;for(let o of t.state.facet(RZ)){let a=o(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(r=Math.max(r,a.top)),a.bottom!=null&&(i=Math.max(i,a.bottom)))}return{left:e,right:n,top:r,bottom:i}}const ly=Xt.define();class pl{constructor(e,n,r,i){this.fromA=e,this.toA=n,this.fromB=r,this.toB=i}join(e){return new pl(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,r=this;for(;n>0;n--){let i=e[n-1];if(!(i.fromA>r.toA)){if(i.toAc)break;o+=2}if(!l)return r;new pl(l.fromA,l.toA,l.fromB,l.toB).addToSet(r),a=l.toA,s=l.toB}}}class kS{constructor(e,n,r){this.view=e,this.state=n,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=oo.empty(this.startState.doc.length);for(let o of r)this.changes=this.changes.compose(o.changes);let i=[];this.changes.iterChangedRanges((o,a,s,l)=>i.push(new pl(o,a,s,l))),this.changedRanges=i}static create(e,n,r){return new kS(e,n,r)}get viewportChanged(){return(this.flags&4)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&10)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class KF extends oi{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=yn.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Xi],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new pl(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:u,toA:c})=>cthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?i=this.domChanged.newSel.head:!$Ye(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let o=i>-1?kYe(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:u,to:c}=this.hasComposition;r=new pl(u,c,e.changes.mapPos(u,-1),e.changes.mapPos(c,1)).addToSet(r.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,(Jt.ie||Jt.chrome)&&!o&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,s=this.updateDeco(),l=MYe(a,s,e.changes);return r=pl.extendWithRanges(r,l),!(this.flags&7)&&r.length==0?!1:(this.updateInner(r,e.startState.doc.length,o),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,r){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,r);let{observer:i}=this.view;i.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let a=Jt.chrome||Jt.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,a),this.flags&=-8,a&&(a.written||i.selectionRange.focusNode!=a.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(a=>a.flags&=-9);let o=[];if(this.view.viewport.from||this.view.viewport.to=0?i[a]:null;if(!s)break;let{fromA:l,toA:u,fromB:c,toB:d}=s,f,h,m,g;if(r&&r.range.fromBc){let S=qy.build(this.view.state.doc,c,r.range.fromB,this.decorations,this.dynamicDecorationMap),x=qy.build(this.view.state.doc,r.range.toB,d,this.decorations,this.dynamicDecorationMap);h=S.breakAtStart,m=S.openStart,g=x.openEnd;let C=this.compositionView(r);x.breakAtStart?C.breakAfter=1:x.content.length&&C.merge(C.length,C.length,x.content[0],!1,x.openStart,0)&&(C.breakAfter=x.content[0].breakAfter,x.content.shift()),S.content.length&&C.merge(0,0,S.content[S.content.length-1],!0,0,S.openEnd)&&S.content.pop(),f=S.content.concat(C).concat(x.content)}else({content:f,breakAtStart:h,openStart:m,openEnd:g}=qy.build(this.view.state.doc,c,d,this.decorations,this.dynamicDecorationMap));let{i:y,off:b}=o.findPos(u,1),{i:w,off:O}=o.findPos(l,-1);aZ(this,w,O,y,b,f,h,m,g)}r&&this.fixCompositionDOM(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let r of n.effects)r.is(kZ)&&(this.editContextFormatting=r.value)}compositionView(e){let n=new uu(e.text.nodeValue);n.flags|=8;for(let{deco:i}of e.marks)n=new Zc(i,[n],n.length);let r=new Xi;return r.append(n,0),r}fixCompositionDOM(e){let n=(o,a)=>{a.flags|=8|(a.children.some(l=>l.flags&7)?1:0),this.markedForComposition.add(a);let s=oi.get(o);s&&s!=a&&(s.dom=null),a.setDOM(o)},r=this.childPos(e.range.fromB,1),i=this.children[r.i];n(e.line,i);for(let o=e.marks.length-1;o>=-1;o--)r=i.childPos(r.off,1),i=i.children[r.i],n(o>=0?e.marks[o].node:e.text,i)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let r=this.view.root.activeElement,i=r==this.dom,o=!i&&z1(this.dom,this.view.observer.selectionRange)&&!(r&&this.dom.contains(r));if(!(i||n||o))return;let a=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,l=this.moveToLine(this.domAtPos(s.anchor)),u=s.empty?l:this.moveToLine(this.domAtPos(s.head));if(Jt.gecko&&s.empty&&!this.hasComposition&&TYe(l)){let d=document.createTextNode("");this.view.observer.ignore(()=>l.node.insertBefore(d,l.node.childNodes[l.offset]||null)),l=u=new ra(d,0),a=!0}let c=this.view.observer.selectionRange;(a||!c.focusNode||(!Uy(l.node,l.offset,c.anchorNode,c.anchorOffset)||!Uy(u.node,u.offset,c.focusNode,c.focusOffset))&&!this.suppressWidgetCursorChange(c,s))&&(this.view.observer.ignore(()=>{Jt.android&&Jt.chrome&&this.dom.contains(c.focusNode)&&RYe(c.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let d=W0(this.view.root);if(d)if(s.empty){if(Jt.gecko){let f=PYe(l.node,l.offset);if(f&&f!=3){let h=(f==1?rZ:iZ)(l.node,l.offset);h&&(l=new ra(h.node,h.offset))}}d.collapse(l.node,l.offset),s.bidiLevel!=null&&d.caretBidiLevel!==void 0&&(d.caretBidiLevel=s.bidiLevel)}else if(d.extend){d.collapse(l.node,l.offset);try{d.extend(u.node,u.offset)}catch{}}else{let f=document.createRange();s.anchor>s.head&&([l,u]=[u,l]),f.setEnd(u.node,u.offset),f.setStart(l.node,l.offset),d.removeAllRanges(),d.addRange(f)}o&&this.view.root.activeElement==this.dom&&(this.dom.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(l,u)),this.impreciseAnchor=l.precise?null:new ra(c.anchorNode,c.anchorOffset),this.impreciseHead=u.precise?null:new ra(c.focusNode,c.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Uy(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,r=W0(e.root),{anchorNode:i,anchorOffset:o}=e.observer.selectionRange;if(!r||!n.empty||!n.assoc||!r.modify)return;let a=Xi.find(this,n.head);if(!a)return;let s=a.posAtStart;if(n.head==s||n.head==s+a.length)return;let l=this.coordsAt(n.head,-1),u=this.coordsAt(n.head,1);if(!l||!u||l.bottom>u.top)return;let c=this.domAtPos(n.head+n.assoc);r.collapse(c.node,c.offset),r.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let d=e.observer.selectionRange;e.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=n.from&&r.collapse(i,o)}moveToLine(e){let n=this.dom,r;if(e.node!=n)return e;for(let i=e.offset;!r&&i=0;i--){let o=oi.get(n.childNodes[i]);o instanceof Xi&&(r=o.domAtPos(o.length))}return r?new ra(r.node,r.offset,!0):e}nearest(e){for(let n=e;n;){let r=oi.get(n);if(r&&r.rootView==this)return r;n=n.parentNode}return null}posFromDOM(e,n){let r=this.nearest(e);if(!r)throw new RangeError("Trying to find position for a DOM position outside of the document");return r.localPosFromDOM(e,n)+r.posAtStart}domAtPos(e){let{i:n,off:r}=this.childCursor().findPos(e,-1);for(;n=0;a--){let s=this.children[a],l=o-s.breakAfter,u=l-s.length;if(le||s.covers(1))&&(!r||s instanceof Xi&&!(r instanceof Xi&&n>=0)))r=s,i=u;else if(r&&u==e&&l==e&&s instanceof jc&&Math.abs(n)<2){if(s.deco.startSide<0)break;a&&(r=null)}o=u}return r?r.coordsAt(e-i,n):null}coordsForChar(e){let{i:n,off:r}=this.childPos(e,1),i=this.children[n];if(!(i instanceof Xi))return null;for(;i.children.length;){let{i:s,off:l}=i.childPos(r,1);for(;;s++){if(s==i.children.length)return null;if((i=i.children[s]).length)break}r=l}if(!(i instanceof uu))return null;let o=Io(i.text,r);if(o==r)return null;let a=dp(i.dom,r,o).getClientRects();for(let s=0;sMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,l=this.view.textDirection==bi.LTR;for(let u=0,c=0;ci)break;if(u>=r){let h=d.dom.getBoundingClientRect();if(n.push(h.height),a){let m=d.dom.lastChild,g=m?wm(m):[];if(g.length){let y=g[g.length-1],b=l?y.right-h.left:h.right-y.left;b>s&&(s=b,this.minWidth=o,this.minWidthFrom=u,this.minWidthTo=f)}}}u=f+d.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?bi.RTL:bi.LTR}measureTextSize(){for(let o of this.children)if(o instanceof Xi){let a=o.measureTextSize();if(a)return a}let e=document.createElement("div"),n,r,i;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let o=wm(e.firstChild)[0];n=e.getBoundingClientRect().height,r=o?o.width/27:7,i=o?o.height:n,e.remove()}),{lineHeight:n,charWidth:r,textHeight:i}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new oZ(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let r=0,i=0;;i++){let o=i==n.viewports.length?null:n.viewports[i],a=o?o.from-1:this.length;if(a>r){let s=(n.lineBlockAt(a).bottom-n.lineBlockAt(r).top)/this.view.scaleY;e.push(yn.replace({widget:new zA(s),block:!0,inclusive:!0,isBlockGap:!0}).range(r,a))}if(!o)break;r=o.to+1}return yn.set(e)}updateDeco(){let e=1,n=this.view.state.facet(U0).map(o=>(this.dynamicDecorationMap[e++]=typeof o=="function")?o(this.view):o),r=!1,i=this.view.state.facet(AZ).map((o,a)=>{let s=typeof o=="function";return s&&(r=!0),s?o(this.view):o});for(i.length&&(this.dynamicDecorationMap[e++]=r,n.push(Ar.join(i))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];en.anchor?-1:1),i;if(!r)return;!n.empty&&(i=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,i.left),top:Math.min(r.top,i.top),right:Math.max(r.right,i.right),bottom:Math.max(r.bottom,i.bottom)});let o=$Z(this.view),a={left:r.left-o.left,top:r.top-o.top,right:r.right+o.right,bottom:r.bottom+o.bottom},{offsetWidth:s,offsetHeight:l}=this.view.scrollDOM;sYe(this.view.scrollDOM,a,n.head{re.from&&(n=!0)}),n}function NYe(t,e,n=1){let r=t.charCategorizer(e),i=t.doc.lineAt(e),o=e-i.from;if(i.length==0)return yt.cursor(e);o==0?n=1:o==i.length&&(n=-1);let a=o,s=o;n<0?a=Io(i.text,o,!1):s=Io(i.text,o);let l=r(i.text.slice(a,s));for(;a>0;){let u=Io(i.text,a,!1);if(r(i.text.slice(u,a))!=l)break;a=u}for(;st?e.left-t:Math.max(0,t-e.right)}function LYe(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function f2(t,e){return t.tope.top+1}function JF(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function qA(t,e,n){let r,i,o,a,s=!1,l,u,c,d;for(let m=t.firstChild;m;m=m.nextSibling){let g=wm(m);for(let y=0;yO||a==O&&o>w){r=m,i=b,o=w,a=O;let S=O?n0?y0)}w==0?n>b.bottom&&(!c||c.bottomb.top)&&(u=m,d=b):c&&f2(c,b)?c=eV(c,b.bottom):d&&f2(d,b)&&(d=JF(d,b.top))}}if(c&&c.bottom>=n?(r=l,i=c):d&&d.top<=n&&(r=u,i=d),!r)return{node:t,offset:0};let f=Math.max(i.left,Math.min(i.right,e));if(r.nodeType==3)return tV(r,f,n);if(s&&r.contentEditable!="false")return qA(r,f,n);let h=Array.prototype.indexOf.call(t.childNodes,r)+(e>=(i.left+i.right)/2?1:0);return{node:t,offset:h}}function tV(t,e,n){let r=t.nodeValue.length,i=-1,o=1e9,a=0;for(let s=0;sn?c.top-n:n-c.bottom)-1;if(c.left-1<=e&&c.right+1>=e&&d=(c.left+c.right)/2,h=f;if((Jt.chrome||Jt.gecko)&&dp(t,s).getBoundingClientRect().left==c.right&&(h=!f),d<=0)return{node:t,offset:s+(h?1:0)};i=s+(h?1:0),o=d}}}return{node:t,offset:i>-1?i:a>0?t.nodeValue.length:0}}function DZ(t,e,n,r=-1){var i,o;let a=t.contentDOM.getBoundingClientRect(),s=a.top+t.viewState.paddingTop,l,{docHeight:u}=t.viewState,{x:c,y:d}=e,f=d-s;if(f<0)return 0;if(f>u)return t.state.doc.length;for(let S=t.viewState.heightOracle.textHeight/2,x=!1;l=t.elementAtHeight(f),l.type!=wa.Text;)for(;f=r>0?l.bottom+S:l.top-S,!(f>=0&&f<=u);){if(x)return n?null:0;x=!0,r=-r}d=s+f;let h=l.from;if(ht.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:nV(t,a,l,c,d);let m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,y=g.elementFromPoint(c,d);y&&!t.contentDOM.contains(y)&&(y=null),y||(c=Math.max(a.left+1,Math.min(a.right-1,c)),y=g.elementFromPoint(c,d),y&&!t.contentDOM.contains(y)&&(y=null));let b,w=-1;if(y&&((i=t.docView.nearest(y))===null||i===void 0?void 0:i.isEditable)!=!1){if(m.caretPositionFromPoint){let S=m.caretPositionFromPoint(c,d);S&&({offsetNode:b,offset:w}=S)}else if(m.caretRangeFromPoint){let S=m.caretRangeFromPoint(c,d);S&&({startContainer:b,startOffset:w}=S,(!t.contentDOM.contains(b)||Jt.safari&&IYe(b,w,c)||Jt.chrome&&BYe(b,w,c))&&(b=void 0))}b&&(w=Math.min(rc(b),w))}if(!b||!t.docView.dom.contains(b)){let S=Xi.find(t.docView,h);if(!S)return f>l.top+l.height/2?l.to:l.from;({node:b,offset:w}=qA(S.dom,c,d))}let O=t.docView.nearest(b);if(!O)return null;if(O.isWidget&&((o=O.dom)===null||o===void 0?void 0:o.nodeType)==1){let S=O.dom.getBoundingClientRect();return e.yt.defaultLineHeight*1.5){let s=t.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-(t.defaultLineHeight-s)*.5)/s)*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+RA(a,o,t.state.tabSize)}function IYe(t,e,n){let r;if(t.nodeType!=3||e!=(r=t.nodeValue.length))return!1;for(let i=t.nextSibling;i;i=i.nextSibling)if(i.nodeType!=1||i.nodeName!="BR")return!1;return dp(t,r-1,r).getBoundingClientRect().left>n}function BYe(t,e,n){if(e!=0)return!1;for(let i=t;;){let o=i.parentNode;if(!o||o.nodeType!=1||o.firstChild!=i)return!1;if(o.classList.contains("cm-line"))break;i=o}let r=t.nodeType==1?t.getBoundingClientRect():dp(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}function YA(t,e){let n=t.lineBlockAt(e);if(Array.isArray(n.type)){for(let r of n.type)if(r.to>e||r.to==e&&(r.to==n.to||r.type==wa.Text))return r}return n}function FYe(t,e,n,r){let i=YA(t,e.head),o=!r||i.type!=wa.Text||!(t.lineWrapping||i.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(o){let a=t.dom.getBoundingClientRect(),s=t.textDirectionAt(i.from),l=t.posAtCoords({x:n==(s==bi.LTR)?a.right-1:a.left+1,y:(o.top+o.bottom)/2});if(l!=null)return yt.cursor(l,n?-1:1)}return yt.cursor(n?i.to:i.from,n?-1:1)}function rV(t,e,n,r){let i=t.state.doc.lineAt(e.head),o=t.bidiSpans(i),a=t.textDirectionAt(i.from);for(let s=e,l=null;;){let u=xYe(i,o,a,s,n),c=yZ;if(!u){if(i.number==(n?t.state.doc.lines:1))return s;c=` `,i=t.state.doc.line(i.number+(n?1:-1)),o=t.bidiSpans(i),u=t.visualLineSide(i,!n)}if(l){if(!l(c))return s}else{if(!r)return u;l=r(c)}s=u}}function VYe(t,e,n){let r=t.state.charCategorizer(e),i=r(n);return o=>{let a=r(o);return i==xi.Space&&(i=a),i==a}}function jYe(t,e,n,r){let i=e.head,o=n?1:-1;if(i==(n?t.state.doc.length:0))return yt.cursor(i,e.assoc);let a=e.goalColumn,s,l=t.contentDOM.getBoundingClientRect(),u=t.coordsAtPos(i,e.assoc||-1),c=t.documentTop;if(u)a==null&&(a=u.left-l.left),s=o<0?u.top:u.bottom;else{let h=t.viewState.lineBlockAt(i);a==null&&(a=Math.min(l.right-l.left,t.defaultCharacterWidth*(i-h.from))),s=(o<0?h.top:h.bottom)+c}let d=l.left+a,f=r!=null?r:t.viewState.heightOracle.textHeight>>1;for(let h=0;;h+=10){let m=s+(f+h)*o,g=DZ(t,{x:d,y:m},!1,o);if(ml.bottom||(o<0?gi)){let y=t.docView.coordsForChar(g),b=!y||m{if(e>o&&ei(t)),n.from,e.head>n.from?-1:1);return r==n.from?n:yt.cursor(r,ro)&&this.lineBreak(),i=a}return this.findPointBefore(r,n),this}readTextNode(e){let n=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,n.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let o=-1,a=1,s;if(this.lineSeparator?(o=n.indexOf(this.lineSeparator,r),a=this.lineSeparator.length):(s=i.exec(n))&&(o=s.index,a=s[0].length),this.append(n.slice(r,o<0?n.length:o)),o<0)break;if(this.lineBreak(),a>1)for(let l of this.points)l.node==e&&l.pos>this.text.length&&(l.pos-=a-1);r=o+a}}readNode(e){if(e.cmIgnore)return;let n=oi.get(e),r=n&&n.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==n&&(r.pos=this.text.length)}findPointInside(e,n){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(QYe(e,r.node,r.offset)?n:0))}}function QYe(t,e,n){for(;;){if(!e||n-1;let{impreciseHead:o,impreciseAnchor:a}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,r,0))){let s=o||a?[]:qYe(e),l=new zYe(s,e.state);l.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=l.text,this.newSel=YYe(s,this.bounds.from)}else{let s=e.observer.selectionRange,l=o&&o.node==s.focusNode&&o.offset==s.focusOffset||!DA(e.contentDOM,s.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(s.focusNode,s.focusOffset),u=a&&a.node==s.anchorNode&&a.offset==s.anchorOffset||!DA(e.contentDOM,s.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(s.anchorNode,s.anchorOffset),c=e.viewport;if((Jt.ios||Jt.chrome)&&e.state.selection.main.empty&&l!=u&&(c.from>0||c.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:a,to:s}=e.bounds,l=i.from,u=null;(o===8||Jt.android&&e.text.length=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:t.state.doc.slice(i.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,i.to))}:(Jt.mac||Jt.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(r&&n.insert.length==2&&(r=yt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Mr.of([" "])}):Jt.chrome&&n&&n.from==n.to&&n.from==i.head&&n.insert.toString()==` `&&t.lineWrapping&&(r&&(r=yt.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Mr.of([" "])}),n)return uD(t,n,r,o);if(r&&!r.main.eq(i)){let a=!1,s="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(a=!0),s=t.inputState.lastSelectionOrigin),t.dispatch({selection:r,scrollIntoView:a,userEvent:s}),!0}else return!1}function uD(t,e,n,r=-1){if(Jt.ios&&t.inputState.flushIOSKey(e))return!0;let i=t.state.selection.main;if(Jt.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&t.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Lg(t.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.lengthi.head)&&Lg(t.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Lg(t.contentDOM,"Delete",46)))return!0;let o=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,s=()=>a||(a=WYe(t,e,n));return t.state.facet(SZ).some(l=>l(t,e.from,e.to,o,s))||t.dispatch(s()),!0}function WYe(t,e,n){let r,i=t.state,o=i.selection.main;if(e.from>=o.from&&e.to<=o.to&&e.to-e.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let s=o.frome.to?i.sliceDoc(e.to,o.to):"";r=i.replaceSelection(t.state.toText(s+e.insert.sliceString(0,void 0,t.state.lineBreak)+l))}else{let s=i.changes(e),l=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=o.to&&e.to>=o.to-10){let u=t.state.sliceDoc(e.from,e.to),c,d=n&&NZ(t,n.main.head);if(d){let m=e.insert.length-(e.to-e.from);c={from:d.from,to:d.to-m}}else c=t.state.doc.lineAt(o.head);let f=o.to-e.to,h=o.to-o.from;r=i.changeByRange(m=>{if(m.from==o.from&&m.to==o.to)return{changes:s,range:l||m.map(s)};let g=m.to-f,y=g-u.length;if(m.to-m.from!=h||t.state.sliceDoc(y,g)!=u||m.to>=c.from&&m.from<=c.to)return{range:m};let b=i.changes({from:y,to:g,insert:e.insert}),w=m.to-o.to;return{changes:b,range:l?yt.range(Math.max(0,l.anchor+w),Math.max(0,l.head+w)):m.map(b)}})}else r={changes:s,selection:l&&i.selection.replaceRange(l)}}let a="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,a+=".compose",t.inputState.compositionFirstChange&&(a+=".start",t.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:a,scrollIntoView:!0})}function UYe(t,e,n,r){let i=Math.min(t.length,e.length),o=0;for(;o0&&s>0&&t.charCodeAt(a-1)==e.charCodeAt(s-1);)a--,s--;if(r=="end"){let l=Math.max(0,o-Math.min(a,s));n-=a+l-o}return a=a?o-n:0,s=o+(s-a),a=o):s=s?o-n:0,a=o+(a-s),s=o),{from:o,toA:a,toB:s}}function qYe(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=t.observer.selectionRange;return n&&(e.push(new iV(n,r)),(i!=n||o!=r)&&e.push(new iV(i,o))),e}function YYe(t,e){if(t.length==0)return null;let n=t[0].pos,r=t.length==2?t[1].pos:n;return n>-1&&r>-1?yt.single(n+e,r+e):null}class XYe{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Jt.safari&&e.contentDOM.addEventListener("input",()=>null),Jt.gecko&&dXe(e.contentDOM.ownerDocument)}handleEvent(e){!rXe(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||this.runHandlers(e.type,e)}runHandlers(e,n){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,n);for(let i of r.handlers){if(n.defaultPrevented)break;if(i(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=ZYe(e),r=this.handlers,i=this.view.contentDOM;for(let o in n)if(o!="scroll"){let a=!n[o].handlers.length,s=r[o];s&&a!=!s.handlers.length&&(i.removeEventListener(o,this.handleEvent),s=null),s||i.addEventListener(o,this.handleEvent,{passive:a})}for(let o in r)o!="scroll"&&!n[o]&&i.removeEventListener(o,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&BZ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Jt.android&&Jt.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Jt.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=IZ.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||GYe.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from0?!0:Jt.safari&&!Jt.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1:!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function oV(t,e){return(n,r)=>{try{return e.call(t,r,n)}catch(i){qa(n.state,i)}}}function ZYe(t){let e=Object.create(null);function n(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of t){let i=r.spec;if(i&&i.domEventHandlers)for(let o in i.domEventHandlers){let a=i.domEventHandlers[o];a&&n(o).handlers.push(oV(r.value,a))}if(i&&i.domEventObservers)for(let o in i.domEventObservers){let a=i.domEventObservers[o];a&&n(o).observers.push(oV(r.value,a))}}for(let r in cu)n(r).handlers.push(cu[r]);for(let r in xl)n(r).observers.push(xl[r]);return e}const IZ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],GYe="dthko",BZ=[16,17,18,20,91,92,224,225],HO=6;function WO(t){return Math.max(0,t)*.7+8}function KYe(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class JYe{constructor(e,n,r,i){this.view=e,this.startEvent=n,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=lYe(e.contentDOM),this.atoms=e.state.facet(lD).map(a=>a(e));let o=e.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(vr.allowMultipleSelections)&&eXe(e,n),this.dragging=nXe(e,n)&&jZ(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&KYe(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,r=0,i=0,o=0,a=this.view.win.innerWidth,s=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:o,bottom:s}=this.scrollParents.y.getBoundingClientRect());let l=$Z(this.view);e.clientX-l.left<=i+HO?n=-WO(i-e.clientX):e.clientX+l.right>=a-HO&&(n=WO(e.clientX-a)),e.clientY-l.top<=o+HO?r=-WO(o-e.clientY):e.clientY+l.bottom>=s-HO&&(r=WO(e.clientY-s)),this.setScrollSpeed(n,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}skipAtoms(e){let n=null;for(let r=0;rn.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function eXe(t,e){let n=t.state.facet(bZ);return n.length?n[0](e):Jt.mac?e.metaKey:e.ctrlKey}function tXe(t,e){let n=t.state.facet(_Z);return n.length?n[0](e):Jt.mac?!e.altKey:!e.ctrlKey}function nXe(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let r=W0(t.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let o=0;o=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function rXe(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,r;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(r=oi.get(n))&&r.ignoreEvent(e))return!1;return!0}const cu=Object.create(null),xl=Object.create(null),FZ=Jt.ie&&Jt.ie_version<15||Jt.ios&&Jt.webkit_version<604;function iXe(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),VZ(t,n.value)},50)}function xC(t,e,n){for(let r of t.facet(e))n=r(n,t);return n}function VZ(t,e){e=xC(t.state,oD,e);let{state:n}=t,r,i=1,o=n.toText(e),a=o.lines==n.selection.ranges.length;if(XA!=null&&n.selection.ranges.every(l=>l.empty)&&XA==o.toString()){let l=-1;r=n.changeByRange(u=>{let c=n.doc.lineAt(u.from);if(c.from==l)return{range:u};l=c.from;let d=n.toText((a?o.line(i++).text:e)+n.lineBreak);return{changes:{from:c.from,insert:d},range:yt.cursor(u.from+d.length)}})}else a?r=n.changeByRange(l=>{let u=o.line(i++);return{changes:{from:l.from,to:l.to,insert:u.text},range:yt.cursor(l.from+u.length)}}):r=n.replaceSelection(o);t.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}xl.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};cu.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);xl.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};xl.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};cu.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of t.state.facet(OZ))if(n=r(t,e),n)break;if(!n&&e.button==0&&(n=sXe(t,e)),n){let r=!t.hasFocus;t.inputState.startMouseSelection(new JYe(t,e,n,r)),r&&t.observer.ignore(()=>{eZ(t.contentDOM);let o=t.root.activeElement;o&&!o.contains(t.contentDOM)&&o.blur()});let i=t.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}return!1};function aV(t,e,n,r){if(r==1)return yt.cursor(e,n);if(r==2)return NYe(t.state,e,n);{let i=Xi.find(t.docView,e),o=t.state.doc.lineAt(i?i.posAtEnd:e),a=i?i.posAtStart:o.from,s=i?i.posAtEnd:o.to;return se>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function oXe(t,e,n,r){let i=Xi.find(t.docView,e);if(!i)return 1;let o=e-i.posAtStart;if(o==0)return 1;if(o==i.length)return-1;let a=i.coordsAt(o,-1);if(a&&sV(n,r,a))return-1;let s=i.coordsAt(o,1);return s&&sV(n,r,s)?1:a&&a.bottom>=r?-1:1}function lV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:oXe(t,n,e.clientX,e.clientY)}}const aXe=Jt.ie&&Jt.ie_version<=11;let uV=null,cV=0,dV=0;function jZ(t){if(!aXe)return t.detail;let e=uV,n=dV;return uV=t,dV=Date.now(),cV=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(cV+1)%3:1}function sXe(t,e){let n=lV(t,e),r=jZ(e),i=t.state.selection;return{update(o){o.docChanged&&(n.pos=o.changes.mapPos(n.pos),i=i.map(o.changes))},get(o,a,s){let l=lV(t,o),u,c=aV(t,l.pos,l.bias,r);if(n.pos!=l.pos&&!a){let d=aV(t,n.pos,n.bias,r),f=Math.min(d.from,c.from),h=Math.max(d.to,c.to);c=f1&&(u=lXe(i,l.pos))?u:s?i.addRange(c):yt.create([c])}}}function lXe(t,e){for(let n=0;n=e)return yt.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}cu.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let i=t.docView.nearest(e.target);if(i&&i.isWidget){let o=i.posAtStart,a=o+i.length;(o>=n.to||a<=n.from)&&(n=yt.range(o,a))}}let{inputState:r}=t;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",xC(t.state,aD,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};cu.dragend=t=>(t.inputState.draggedContent=null,!1);function fV(t,e,n,r){if(n=xC(t.state,oD,n),!n)return;let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,a=r&&o&&tXe(t,e)?{from:o.from,to:o.to}:null,s={from:i,insert:n},l=t.state.changes(a?[a,s]:s);t.focus(),t.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}cu.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&fV(t,e,r.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a{/[\x00-\x08\x0e-\x1f]{2}/.test(s.result)||(r[a]=s.result),o()},s.readAsText(n[a])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return fV(t,e,r,!0),!0}return!1};cu.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=FZ?null:e.clipboardData;return n?(VZ(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(iXe(t),!1)};function uXe(t,e){let n=t.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),t.focus()},50)}function cXe(t){let e=[],n=[],r=!1;for(let i of t.selection.ranges)i.empty||(e.push(t.sliceDoc(i.from,i.to)),n.push(i));if(!e.length){let i=-1;for(let{from:o}of t.selection.ranges){let a=t.doc.lineAt(o);a.number>i&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),i=a.number}r=!0}return{text:xC(t,aD,e.join(t.lineBreak)),ranges:n,linewise:r}}let XA=null;cu.copy=cu.cut=(t,e)=>{let{text:n,ranges:r,linewise:i}=cXe(t.state);if(!n&&!i)return!1;XA=i?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=FZ?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(uXe(t,n),!1)};const zZ=cd.define();function QZ(t,e){let n=[];for(let r of t.facet(xZ)){let i=r(t,e);i&&n.push(i)}return n?t.update({effects:n,annotations:zZ.of(!0)}):null}function HZ(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=QZ(t.state,e);n?t.dispatch(n):t.update([])}},10)}xl.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),HZ(t)};xl.blur=t=>{t.observer.clearSelectionRange(),HZ(t)};xl.compositionstart=xl.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};xl.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Jt.chrome&&Jt.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};xl.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};cu.beforeinput=(t,e)=>{var n,r;if(e.inputType=="insertReplacementText"&&t.observer.editContext){let o=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(o&&a.length){let s=a[0],l=t.posAtDOM(s.startContainer,s.startOffset),u=t.posAtDOM(s.endContainer,s.endOffset);return uD(t,{from:l,to:u,insert:t.state.toText(o)},null),!0}}let i;if(Jt.chrome&&Jt.android&&(i=IZ.find(o=>o.inputType==e.inputType))&&(t.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let o=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>o+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Jt.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Jt.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>xl.compositionend(t,e),20),!1};const hV=new Set;function dXe(t){hV.has(t)||(hV.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const pV=["pre-wrap","normal","pre-line","break-spaces"];let Cm=!1;function gV(){Cm=!1}class fXe{constructor(e){this.lineWrapping=e,this.doc=Mr.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let r=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((n-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return pV.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let r=0;r-1,l=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=n,this.charWidth=r,this.textHeight=i,this.lineLength=o,l){this.heightSamples={};for(let u=0;u0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>H1&&(Cm=!0),this.height=e)}replace(e,n,r){return Sa.of(r)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,r,i){let o=this,a=r.doc;for(let s=i.length-1;s>=0;s--){let{fromA:l,toA:u,fromB:c,toB:d}=i[s],f=o.lineAt(l,vi.ByPosNoHeight,r.setDoc(n),0,0),h=f.to>=u?f:o.lineAt(u,vi.ByPosNoHeight,r,0,0);for(d+=h.to-u,u=h.to;s>0&&f.from<=i[s-1].toA;)l=i[s-1].fromA,c=i[s-1].fromB,s--,lo*2){let s=e[n-1];s.break?e.splice(--n,1,s.left,null,s.right):e.splice(--n,1,s.left,s.right),r+=1+s.break,i-=s.size}else if(o>i*2){let s=e[r];s.break?e.splice(r,1,s.left,null,s.right):e.splice(r,1,s.left,s.right),r+=2+s.break,o-=s.size}else break;else if(i=o&&a(this.blockAt(0,r,i,o))}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more&&this.setHeight(i.heights[i.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ss extends WZ{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,r,i){return new Fu(i,this.length,r,this.height,this.breaks)}replace(e,n,r){let i=r[0];return r.length==1&&(i instanceof Ss||i instanceof Mo&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof Mo?i=new Ss(i.length,this.height):i.height=this.height,this.outdated||(i.outdated=!1),i):Sa.of(r)}updateHeight(e,n=0,r=!1,i){return i&&i.from<=n&&i.more?this.setHeight(i.heights[i.index++]):(r||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Mo extends Sa{constructor(e){super(e,0)}heightMetrics(e,n){let r=e.doc.lineAt(n).number,i=e.doc.lineAt(n+this.length).number,o=i-r+1,a,s=0;if(e.lineWrapping){let l=Math.min(this.height,e.lineHeight*o);a=l/o,this.length>o+1&&(s=(this.height-l)/(this.length-o-1))}else a=this.height/o;return{firstLine:r,lastLine:i,perLine:a,perChar:s}}blockAt(e,n,r,i){let{firstLine:o,lastLine:a,perLine:s,perChar:l}=this.heightMetrics(n,i);if(n.lineWrapping){let u=i+(e0){let o=r[r.length-1];o instanceof Mo?r[r.length-1]=new Mo(o.length+i):r.push(null,new Mo(i-1))}if(e>0){let o=r[0];o instanceof Mo?r[0]=new Mo(e+o.length):r.unshift(new Mo(e-1),null)}return Sa.of(r)}decomposeLeft(e,n){n.push(new Mo(e-1),null)}decomposeRight(e,n){n.push(null,new Mo(this.length-e-1))}updateHeight(e,n=0,r=!1,i){let o=n+this.length;if(i&&i.from<=n+this.length&&i.more){let a=[],s=Math.max(n,i.from),l=-1;for(i.from>n&&a.push(new Mo(i.from-n-1).updateHeight(e,n));s<=o&&i.more;){let c=e.doc.lineAt(s).length;a.length&&a.push(null);let d=i.heights[i.index++];l==-1?l=d:Math.abs(d-l)>=H1&&(l=-2);let f=new Ss(c,d);f.outdated=!1,a.push(f),s+=c+1}s<=o&&a.push(null,new Mo(o-s).updateHeight(e,s));let u=Sa.of(a);return(l<0||Math.abs(u.height-this.height)>=H1||Math.abs(l-this.heightMetrics(e,n).perLine)>=H1)&&(Cm=!0),PS(this,u)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class pXe extends Sa{constructor(e,n,r){super(e.length+n+r.length,e.height+r.height,n|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,n,r,i){let o=r+this.left.height;return es))return u;let c=n==vi.ByPosNoHeight?vi.ByPosNoHeight:vi.ByPos;return l?u.join(this.right.lineAt(s,c,r,a,s)):this.left.lineAt(s,c,r,i,o).join(u)}forEachLine(e,n,r,i,o,a){let s=i+this.left.height,l=o+this.left.length+this.break;if(this.break)e=l&&this.right.forEachLine(e,n,r,s,l,a);else{let u=this.lineAt(l,vi.ByPos,r,i,o);e=e&&u.from<=n&&a(u),n>u.to&&this.right.forEachLine(u.to+1,n,r,s,l,a)}}replace(e,n,r){let i=this.left.length+this.break;if(nthis.left.length)return this.balanced(this.left,this.right.replace(e-i,n-i,r));let o=[];e>0&&this.decomposeLeft(e,o);let a=o.length;for(let s of r)o.push(s);if(e>0&&mV(o,a-1),n=r&&n.push(null)),e>r&&this.right.decomposeLeft(e-r,n)}decomposeRight(e,n){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,n);e2*n.size||n.size>2*e.size?Sa.of(this.break?[e,null,n]:[e,n]):(this.left=PS(this.left,e),this.right=PS(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,r=!1,i){let{left:o,right:a}=this,s=n+o.length+this.break,l=null;return i&&i.from<=n+o.length&&i.more?l=o=o.updateHeight(e,n,r,i):o.updateHeight(e,n,r),i&&i.from<=s+a.length&&i.more?l=a=a.updateHeight(e,s,r,i):a.updateHeight(e,s,r),l?this.balanced(o,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function mV(t,e){let n,r;t[e]==null&&(n=t[e-1])instanceof Mo&&(r=t[e+1])instanceof Mo&&t.splice(e-1,3,new Mo(n.length+1+r.length))}const gXe=5;class cD{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let r=Math.min(n,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ss?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ss(r-this.pos,-1)),this.writtenTo=r,n>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,r){if(e=gXe)&&this.addLineDeco(i,o,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenToe&&this.nodes.push(new Ss(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let r=new Mo(n-e);return this.oracle.doc.lineAt(e).to==n&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ss)return e;let n=new Ss(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=n,this.writtenTo=this.pos=this.pos+r}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Ss)&&!this.isCovered?this.nodes.push(new Ss(0,-1)):(this.writtenToc.clientHeight||c.scrollWidth>c.clientWidth)&&d.overflow!="visible"){let f=c.getBoundingClientRect();o=Math.max(o,f.left),a=Math.min(a,f.right),s=Math.max(s,f.top),l=Math.min(u==t.parentNode?i.innerHeight:l,f.bottom)}u=d.position=="absolute"||d.position=="fixed"?c.offsetParent:c.parentNode}else if(u.nodeType==11)u=u.host;else break;return{left:o-n.left,right:Math.max(o,a)-n.left,top:s-(n.top+e),bottom:Math.max(s,l)-(n.top+e)}}function bXe(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class p2{constructor(e,n,r,i){this.from=e,this.to=n,this.size=r,this.displaySize=i}static same(e,n){if(e.length!=n.length)return!1;for(let r=0;rtypeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new fXe(n),this.stateDeco=e.facet(U0).filter(r=>typeof r!="function"),this.heightMap=Sa.empty().applyChanges(this.stateDeco,Mr.empty,this.heightOracle.setDoc(e.doc),[new pl(0,0,0,e.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=yn.set(this.lineGaps.map(r=>r.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let r=0;r<=1;r++){let i=r?n.head:n.anchor;if(!e.some(({from:o,to:a})=>i>=o&&i<=a)){let{from:o,to:a}=this.lineBlockAt(i);e.push(new UO(o,a))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?yV:new dD(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(cy(e,this.scaler))})}update(e,n=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=this.state.facet(U0).filter(c=>typeof c!="function");let i=e.changedRanges,o=pl.extendWithRanges(i,mXe(r,this.stateDeco,e?e.changes:oo.empty(this.state.doc.length))),a=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);gV(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=a||Cm)&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let l=o.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.headl.to)||!this.viewportIsAppropriate(l))&&(l=this.getViewport(0,n));let u=l.from!=this.viewport.from||l.to!=this.viewport.to;this.viewport=l,e.flags|=this.updateForViewport(),(u||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(EZ)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,r=window.getComputedStyle(n),i=this.heightOracle,o=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?bi.RTL:bi.LTR;let a=this.heightOracle.mustRefreshForWrapping(o),s=n.getBoundingClientRect(),l=a||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let u=0,c=0;if(s.width&&s.height){let{scaleX:S,scaleY:x}=JX(n,s);(S>.005&&Math.abs(this.scaleX-S)>.005||x>.005&&Math.abs(this.scaleY-x)>.005)&&(this.scaleX=S,this.scaleY=x,u|=8,a=l=!0)}let d=(parseInt(r.paddingTop)||0)*this.scaleY,f=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=d||this.paddingBottom!=f)&&(this.paddingTop=d,this.paddingBottom=f,u|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(l=!0),this.editorWidth=e.scrollDOM.clientWidth,u|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=nZ(e.scrollDOM);let m=(this.printing?bXe:yXe)(n,this.paddingTop),g=m.top-this.pixelViewport.top,y=m.bottom-this.pixelViewport.bottom;this.pixelViewport=m;let b=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(b!=this.inView&&(this.inView=b,b&&(l=!0)),!this.inView&&!this.scrollTarget)return 0;let w=s.width;if((this.contentDOMWidth!=w||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,u|=8),l){let S=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(S)&&(a=!0),a||i.lineWrapping&&Math.abs(w-this.contentDOMWidth)>i.charWidth){let{lineHeight:x,charWidth:C,textHeight:E}=e.docView.measureTextSize();a=x>0&&i.refresh(o,x,C,E,w/C,S),a&&(e.docView.minWidth=0,u|=8)}g>0&&y>0?c=Math.max(g,y):g<0&&y<0&&(c=Math.min(g,y)),gV();for(let x of this.viewports){let C=x.from==this.viewport.from?S:e.docView.measureVisibleLineHeights(x);this.heightMap=(a?Sa.empty().applyChanges(this.stateDeco,Mr.empty,this.heightOracle,[new pl(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,a,new hXe(x.from,C))}Cm&&(u|=2)}let O=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return O&&(u&2&&(u|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),u|=this.updateForViewport()),(u&2||O)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>2e3<<1)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),u|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),u}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,o=this.heightOracle,{visibleTop:a,visibleBottom:s}=this,l=new UO(i.lineAt(a-r*1e3,vi.ByHeight,o,0,0).from,i.lineAt(s+(1-r)*1e3,vi.ByHeight,o,0,0).to);if(n){let{head:u}=n.range;if(ul.to){let c=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),d=i.lineAt(u,vi.ByPos,o,0,0),f;n.y=="center"?f=(d.top+d.bottom)/2-c/2:n.y=="start"||n.y=="nearest"&&u=s+Math.max(10,Math.min(r,250)))&&i>a-2*1e3&&o>1,a=i<<1;if(this.defaultTextDirection!=bi.LTR&&!r)return[];let s=[],l=(c,d,f,h)=>{if(d-cc&&bb.from>=f.from&&b.to<=f.to&&Math.abs(b.from-c)b.fromw));if(!y){if(dO.from<=d&&O.to>=d)){let O=n.moveToLineBoundary(yt.cursor(d),!1,!0).head;O>c&&(d=O)}let b=this.gapSize(f,c,d,h),w=r||b<2e6?b:2e6;y=new p2(c,d,b,w)}s.push(y)},u=c=>{if(c.length2e6)for(let C of e)C.from>=c.from&&C.fromc.from&&l(c.from,h,c,d),mn.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let n=[];Ar.spans(e,this.viewport.from,this.viewport.to,{span(i,o){n.push({from:i,to:o})},point(){}},20);let r=n.length!=this.visibleRanges.length||this.visibleRanges.some((i,o)=>i.from!=n[o].from||i.to!=n[o].to);return this.visibleRanges=n,r?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||cy(this.heightMap.lineAt(e,vi.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||cy(this.heightMap.lineAt(this.scaler.fromDOM(e),vi.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return cy(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class UO{constructor(e,n){this.from=e,this.to=n}}function OXe(t,e,n){let r=[],i=t,o=0;return Ar.spans(n,t,e,{span(){},point(a,s){a>i&&(r.push({from:i,to:a}),o+=a-i),i=s}},20),i=1)return e[e.length-1].to;let r=Math.floor(t*n);for(let i=0;;i++){let{from:o,to:a}=e[i],s=a-o;if(r<=s)return o+r;r-=s}}function YO(t,e){let n=0;for(let{from:r,to:i}of t.ranges){if(e<=i){n+=e-r;break}n+=i-r}return n/t.total}function wXe(t,e){for(let n of t)if(e(n))return n}const yV={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class dD{constructor(e,n,r){let i=0,o=0,a=0;this.viewports=r.map(({from:s,to:l})=>{let u=n.lineAt(s,vi.ByPos,e,0,0).top,c=n.lineAt(l,vi.ByPos,e,0,0).bottom;return i+=c-u,{from:s,to:l,top:u,bottom:c,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(n.height-i);for(let s of this.viewports)s.domTop=a+(s.top-o)*this.scale,a=s.domBottom=s.domTop+(s.bottom-s.top),o=s.bottom}toDOM(e){for(let n=0,r=0,i=0;;n++){let o=nn.from==e.viewports[r].from&&n.to==e.viewports[r].to):!1}}function cy(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),r=e.toDOM(t.bottom);return new Fu(t.from,t.length,n,r-n,Array.isArray(t._content)?t._content.map(i=>cy(i,e)):t._content)}const XO=Xt.define({combine:t=>t.join(" ")}),ZA=Xt.define({combine:t=>t.indexOf(!0)>-1}),GA=xf.newName(),UZ=xf.newName(),qZ=xf.newName(),YZ={"&light":"."+UZ,"&dark":"."+qZ};function KA(t,e,n){return new xf(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return t;if(!n||!n[i])throw new RangeError(`Unsupported selector: ${i}`);return n[i]}):t+" "+r}})}const SXe=KA("."+GA,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},YZ),xXe={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},g2=Jt.ie&&Jt.ie_version<=11;class CXe{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new uYe,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let r of n)this.queue.push(r);(Jt.ie&&Jt.ie_version<=11||Jt.ios&&e.composing)&&n.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&e.constructor.EDIT_CONTEXT!==!1&&!(Jt.chrome&&Jt.chrome_version<126)&&(this.editContext=new TXe(e),e.state.facet(Bd)&&(e.contentDOM.editContext=this.editContext.editContext)),g2&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,r)=>n!=e[r]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Bd)?r.root.activeElement!=this.dom:!z1(this.dom,i))return;let o=i.anchorNode&&r.docView.nearest(i.anchorNode);if(o&&o.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Jt.ie&&Jt.ie_version<=11||Jt.android&&Jt.chrome)&&!r.state.selection.main.empty&&i.focusNode&&Uy(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=W0(e.root);if(!n)return!1;let r=Jt.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&EXe(this.view,n)||n;if(!r||this.selectionRange.eq(r))return!1;let i=z1(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let o=this.delayedAndroidKey;o&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=o.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&o.force&&Lg(this.dom,o.key,o.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,r=-1,i=!1;for(let o of e){let a=this.readMutation(o);!a||(a.typeOver&&(i=!0),n==-1?{from:n,to:r}=a:(n=Math.min(a.from,n),r=Math.max(a.to,r)))}return{from:n,to:r,typeOver:i}}readChange(){let{from:e,to:n,typeOver:r}=this.processRecords(),i=this.selectionChanged&&z1(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let o=new HYe(this.view,e,n,r);return this.view.docView.domChanged={newSel:o.newSel?o.newSel.main:null},o}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let r=this.view.state,i=LZ(this.view,n);return this.view.state==r&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),i}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let r=bV(n,e.previousSibling||e.target.previousSibling,-1),i=bV(n,e.nextSibling||e.target.nextSibling,1);return{from:r?n.posAfter(r):n.posAtStart,to:i?n.posBefore(i):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Bd)!=e.state.facet(Bd)&&(e.view.contentDOM.editContext=e.state.facet(Bd)?this.editContext.editContext:null))}destroy(){var e,n,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function bV(t,e,n){for(;e;){let r=oi.get(e);if(r&&r.parent==t)return r;let i=e.parentNode;e=i!=t.dom?i:n>0?e.nextSibling:e.previousSibling}return null}function _V(t,e){let n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor);return Uy(a.node,a.offset,i,o)&&([n,r,i,o]=[i,o,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}}function EXe(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return _V(t,i)}let n=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",r,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",r,!0),n?_V(t,n):null}class TXe{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let{anchor:i}=e.state.selection.main,o={from:this.toEditorPos(r.updateRangeStart),to:this.toEditorPos(r.updateRangeEnd),insert:Mr.of(r.text.split(` `))};o.from==this.from&&ithis.to&&(o.to=i),!(o.from==o.to&&!o.insert.length)&&(this.pendingContextChange=o,e.state.readOnly||uD(e,o,yt.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd))),this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)))},this.handlers.characterboundsupdate=r=>{let i=[],o=null;for(let a=this.toEditorPos(r.rangeStart),s=this.toEditorPos(r.rangeEnd);a{let i=[];for(let o of r.getTextFormats()){let a=o.underlineStyle,s=o.underlineThickness;if(a!="None"&&s!="None"){let l=`text-decoration: underline ${a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${s=="Thin"?1:2}px`;i.push(yn.mark({attributes:{style:l}}).range(this.toEditorPos(o.rangeStart),this.toEditorPos(o.rangeEnd)))}}e.dispatch({effects:kZ.of(yn.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{e.inputState.composing=-1,e.inputState.compositionFirstChange=null};for(let r in this.handlers)n.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=W0(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((o,a,s,l,u)=>{if(r)return;let c=u.length-(a-o);if(i&&a>=i.to)if(i.from==o&&i.to==a&&i.insert.eq(u)){i=this.pendingContextChange=null,n+=c,this.to+=c;return}else i=null,this.revertPending(e.state);if(o+=n,a+=n,a<=this.from)this.from+=c,this.to+=c;else if(othis.to||this.to-this.from+u.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(o),this.toContextPos(a),u.toString()),this.to+=c}n+=c}),i&&!r&&this.revertPending(e.state),!r}update(e){let n=this.pendingContextChange;!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.resetRange(e.state),this.editContext.updateText(0,this.editContext.text.length,e.state.doc.sliceString(this.from,this.to)),this.setSelection(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),i=this.toContextPos(n.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to1e4*3)}toEditorPos(e){return e+this.from}toContextPos(e){return e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ut{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(o=>r(o,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||cYe(e.parent)||document,this.viewState=new vV(e.state||vr.create(e)),e.scrollTo&&e.scrollTo.is(QO)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(sy).map(i=>new d2(i));for(let i of this.plugins)i.update(this);this.observer=new CXe(this),this.inputState=new XYe(this),this.inputState.ensureHandlers(this.plugins),this.docView=new KF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Zi?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,r=!1,i,o=this.state;for(let f of e){if(f.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=f.state}if(this.destroyed){this.viewState.state=o;return}let a=this.hasFocus,s=0,l=null;e.some(f=>f.annotation(zZ))?(this.inputState.notifiedFocused=a,s=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,l=QZ(o,a),l||(s=1));let u=this.observer.delayedAndroidKey,c=null;if(u?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(vr.phrases)!=this.state.facet(vr.phrases))return this.setState(o);i=kS.create(this,o,e),i.flags|=s;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let f of e){if(d&&(d=d.map(f.changes)),f.scrollIntoView){let{main:h}=f.state.selection;d=new Ig(h.empty?h:yt.cursor(h.head,h.head>h.anchor?-1:1))}for(let h of f.effects)h.is(QO)&&(d=h.value.clip(this.state))}this.viewState.update(i,d),this.bidiCache=AS.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),n=this.docView.update(i),this.state.facet(ly)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(f=>f.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(XO)!=i.state.facet(XO)&&(this.viewState.mustMeasureContent=!0),(n||r||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!i.empty)for(let f of this.state.facet(UA))try{f(i)}catch(h){qa(this.state,h,"update listener")}(l||c)&&Promise.resolve().then(()=>{l&&this.state==l.startState&&this.dispatch(l),c&&!LZ(this,c)&&u.force&&Lg(this.contentDOM,u.key,u.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new vV(e),this.plugins=e.facet(sy).map(r=>new d2(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new KF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(sy),r=e.state.facet(sy);if(n!=r){let i=[];for(let o of r){let a=n.indexOf(o);if(a<0)i.push(new d2(o));else{let s=this.plugins[a];s.mustUpdate=e,i.push(s)}}for(let o of this.plugins)o.mustUpdate!=e&&o.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,r=this.scrollDOM,i=r.scrollTop*this.scaleY,{scrollAnchorPos:o,scrollAnchorHeight:a}=this.viewState;Math.abs(i-this.viewState.scrollTop)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let s=0;;s++){if(a<0)if(nZ(r))o=-1,a=this.viewState.heightMap.height;else{let h=this.viewState.scrollAnchorAt(i);o=h.from,a=h.top}this.updateState=1;let l=this.viewState.measure(this);if(!l&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(s>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let u=[];l&4||([this.measureRequests,u]=[u,this.measureRequests]);let c=u.map(h=>{try{return h.read(this)}catch(m){return qa(this.state,m),OV}}),d=kS.create(this,this.state,[]),f=!1;d.flags|=l,n?n.flags|=l:n=d,this.updateState=2,d.empty||(this.updatePlugins(d),this.inputState.update(d),this.updateAttrs(),f=this.docView.update(d),f&&this.docViewUpdate());for(let h=0;h1||m<-1){i=i+m,r.scrollTop=i/this.scaleY,a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let s of this.state.facet(UA))s(n)}get themeClasses(){return GA+" "+(this.state.facet(ZA)?qZ:UZ)+" "+this.state.facet(XO)}updateAttrs(){let e=wV(this,PZ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Bd)?"true":"false",class:"cm-content",style:`${Jt.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),wV(this,sD,n);let r=this.observer.ignore(()=>{let i=VA(this.contentDOM,this.contentAttrs,n),o=VA(this.dom,this.editorAttrs,e);return i||o});return this.editorAttrs=e,this.contentAttrs=n,r}showAnnouncements(e){let n=!0;for(let r of e)for(let i of r.effects)if(i.is(Ut.announce)){n&&(this.announceDOM.textContent=""),n=!1;let o=this.announceDOM.appendChild(document.createElement("div"));o.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(ly);let e=this.state.facet(Ut.cspNonce);xf.mount(this.root,this.styleModules.concat(SXe).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;nr.spec==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,r){return h2(this,e,rV(this,e,n,r))}moveByGroup(e,n){return h2(this,e,rV(this,e,n,r=>VYe(this,e.head,r)))}visualLineSide(e,n){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),o=r[n?r.length-1:0];return yt.cursor(o.side(n,i)+e.from,o.forward(!n,i)?1:-1)}moveToLineBoundary(e,n,r=!0){return FYe(this,e,n,r)}moveVertically(e,n,r){return h2(this,e,jYe(this,e,n,r))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),DZ(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let r=this.docView.coordsAt(e,n);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),o=this.bidiSpans(i),a=o[Xd.find(o,e-i.from,-1,n)];return Qb(r,a.dir==bi.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(CZ)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>kXe)return vZ(e.length);let n=this.textDirectionAt(e.from),r;for(let o of this.bidiCache)if(o.from==e.from&&o.dir==n&&(o.fresh||mZ(o.isolates,r=GF(this,e))))return o.order;r||(r=GF(this,e));let i=SYe(e.text,n,r);return this.bidiCache.push(new AS(e.from,e.to,n,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Jt.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{eZ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return QO.of(new Ig(typeof e=="number"?yt.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return QO.of(new Ig(yt.cursor(r.from),"start","start",r.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return qi.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return qi.define(()=>({}),{eventObservers:e})}static theme(e,n){let r=xf.newName(),i=[XO.of(r),ly.of(KA(`.${r}`,e))];return n&&n.dark&&i.push(ZA.of(!0)),i}static baseTheme(e){return Hf.lowest(ly.of(KA("."+GA,e,YZ)))}static findFromDOM(e){var n;let r=e.querySelector(".cm-content"),i=r&&oi.get(r)||oi.get(e);return((n=i==null?void 0:i.rootView)===null||n===void 0?void 0:n.view)||null}}Ut.styleModule=ly;Ut.inputHandler=SZ;Ut.clipboardInputFilter=oD;Ut.clipboardOutputFilter=aD;Ut.scrollHandler=TZ;Ut.focusChangeEffect=xZ;Ut.perLineTextDirection=CZ;Ut.exceptionSink=wZ;Ut.updateListener=UA;Ut.editable=Bd;Ut.mouseSelectionStyle=OZ;Ut.dragMovesSelection=_Z;Ut.clickAddsSelectionRange=bZ;Ut.decorations=U0;Ut.outerDecorations=AZ;Ut.atomicRanges=lD;Ut.bidiIsolatedRanges=MZ;Ut.scrollMargins=RZ;Ut.darkTheme=ZA;Ut.cspNonce=Xt.define({combine:t=>t.length?t[0]:""});Ut.contentAttributes=sD;Ut.editorAttributes=PZ;Ut.lineWrapping=Ut.contentAttributes.of({class:"cm-lineWrapping"});Ut.announce=Wn.define();const kXe=4096,OV={};class AS{constructor(e,n,r,i,o,a){this.from=e,this.to=n,this.dir=r,this.isolates=i,this.fresh=o,this.order=a}static update(e,n){if(n.empty&&!e.some(o=>o.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:bi.LTR;for(let o=Math.max(0,e.length-10);o=0;i--){let o=r[i],a=typeof o=="function"?o(t):o;a&&FA(a,n)}return n}const PXe=Jt.mac?"mac":Jt.windows?"win":Jt.linux?"linux":"key";function AXe(t,e){const n=t.split(/-(?!$)/);let r=n[n.length-1];r=="Space"&&(r=" ");let i,o,a,s;for(let l=0;lr.concat(i),[]))),n}function RXe(t,e,n){return ZZ(XZ(t.state),e,t,n)}let Fd=null;const $Xe=4e3;function NXe(t,e=PXe){let n=Object.create(null),r=Object.create(null),i=(a,s)=>{let l=r[a];if(l==null)r[a]=s;else if(l!=s)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},o=(a,s,l,u,c)=>{var d,f;let h=n[a]||(n[a]=Object.create(null)),m=s.split(/ (?!$)/).map(b=>AXe(b,e));for(let b=1;b{let S=Fd={view:O,prefix:w,scope:a};return setTimeout(()=>{Fd==S&&(Fd=null)},$Xe),!0}]})}let g=m.join(" ");i(g,!1);let y=h[g]||(h[g]={preventDefault:!1,stopPropagation:!1,run:((f=(d=h._any)===null||d===void 0?void 0:d.run)===null||f===void 0?void 0:f.slice())||[]});l&&y.run.push(l),u&&(y.preventDefault=!0),c&&(y.stopPropagation=!0)};for(let a of t){let s=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let u of s){let c=n[u]||(n[u]=Object.create(null));c._any||(c._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:d}=a;for(let f in c)c[f].run.push(h=>d(h,JA))}let l=a[e]||a.key;if(!!l)for(let u of s)o(u,l,a.run,a.preventDefault,a.stopPropagation),a.shift&&o(u,"Shift-"+l,a.shift,a.preventDefault,a.stopPropagation)}return n}let JA=null;function ZZ(t,e,n,r){JA=e;let i=oYe(e),o=za(i,0),a=Bu(o)==i.length&&i!=" ",s="",l=!1,u=!1,c=!1;Fd&&Fd.view==n&&Fd.scope==r&&(s=Fd.prefix+" ",BZ.indexOf(e.keyCode)<0&&(u=!0,Fd=null));let d=new Set,f=y=>{if(y){for(let b of y.run)if(!d.has(b)&&(d.add(b),b(n)))return y.stopPropagation&&(c=!0),!0;y.preventDefault&&(y.stopPropagation&&(c=!0),u=!0)}return!1},h=t[r],m,g;return h&&(f(h[s+ZO(i,e,!a)])?l=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Jt.windows&&e.ctrlKey&&e.altKey)&&(m=Cf[e.keyCode])&&m!=i?(f(h[s+ZO(m,e,!0)])||e.shiftKey&&(g=H0[e.keyCode])!=i&&g!=m&&f(h[s+ZO(g,e,!1)]))&&(l=!0):a&&e.shiftKey&&f(h[s+ZO(i,e,!0)])&&(l=!0),!l&&f(h._any)&&(l=!0)),u&&(l=!0),l&&c&&e.stopPropagation(),JA=null,l}class qb{constructor(e,n,r,i,o){this.className=e,this.left=n,this.top=r,this.width=i,this.height=o}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,r){if(r.empty){let i=e.coordsAtPos(r.head,r.assoc||1);if(!i)return[];let o=GZ(e);return[new qb(n,i.left-o.left,i.top-o.top,null,i.bottom-i.top)]}else return DXe(e,n,r)}}function GZ(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==bi.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function xV(t,e,n,r){let i=t.coordsAtPos(e,n*2);if(!i)return r;let o=t.dom.getBoundingClientRect(),a=(i.top+i.bottom)/2,s=t.posAtCoords({x:o.left+1,y:a}),l=t.posAtCoords({x:o.right-1,y:a});return s==null||l==null?r:{from:Math.max(r.from,Math.min(s,l)),to:Math.min(r.to,Math.max(s,l))}}function DXe(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let r=Math.max(n.from,t.viewport.from),i=Math.min(n.to,t.viewport.to),o=t.textDirection==bi.LTR,a=t.contentDOM,s=a.getBoundingClientRect(),l=GZ(t),u=a.querySelector(".cm-line"),c=u&&window.getComputedStyle(u),d=s.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),f=s.right-(c?parseInt(c.paddingRight):0),h=YA(t,r),m=YA(t,i),g=h.type==wa.Text?h:null,y=m.type==wa.Text?m:null;if(g&&(t.lineWrapping||h.widgetLineBreaks)&&(g=xV(t,r,1,g)),y&&(t.lineWrapping||m.widgetLineBreaks)&&(y=xV(t,i,-1,y)),g&&y&&g.from==y.from&&g.to==y.to)return w(O(n.from,n.to,g));{let x=g?O(n.from,null,g):S(h,!1),C=y?O(null,n.to,y):S(m,!0),E=[];return(g||h).to<(y||m).from-(g&&y?1:0)||h.widgetLineBreaks>1&&x.bottom+t.defaultLineHeight/2N&&W.from<$)for(let L=Math.max(W.from,N),I=Math.min(W.to,$);;){let U=t.state.doc.lineAt(L);for(let Q of t.bidiSpans(U)){let V=Q.from+U.from,q=Q.to+U.from;if(V>=I)break;q>L&&D(Math.max(V,L),x==null&&V<=N,Math.min(q,I),C==null&&q>=$,Q.dir)}if(L=U.to+1,L>=I)break}return A.length==0&&D(N,x==null,$,C==null,t.textDirection),{top:T,bottom:P,horizontal:A}}function S(x,C){let E=s.top+(C?x.top:x.bottom);return{top:E,bottom:E,horizontal:[]}}}function LXe(t,e){return t.constructor==e.constructor&&t.eq(e)}class IXe{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(W1)!=e.state.facet(W1)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,r=e.facet(W1);for(;n!LXe(n,this.drawn[r]))){let n=this.dom.firstChild,r=0;for(let i of e)i.update&&n&&i.constructor&&this.drawn[r].constructor&&i.update(n,this.drawn[r])?(n=n.nextSibling,r++):this.dom.insertBefore(i.draw(),n);for(;n;){let i=n.nextSibling;n.remove(),n=i}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const W1=Xt.define();function KZ(t){return[qi.define(e=>new IXe(e,t)),W1.of(t)]}const JZ=!Jt.ios,q0=Xt.define({combine(t){return gc(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function BXe(t={}){return[q0.of(t),FXe,VXe,jXe,EZ.of(!0)]}function eG(t){return t.startState.facet(q0)!=t.state.facet(q0)}const FXe=KZ({above:!0,markers(t){let{state:e}=t,n=e.facet(q0),r=[];for(let i of e.selection.ranges){let o=i==e.selection.main;if(i.empty?!o||JZ:n.drawRangeCursor){let a=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",s=i.empty?i:yt.cursor(i.head,i.head>i.anchor?-1:1);for(let l of qb.forRange(t,a,s))r.push(l)}}return r},update(t,e){t.transactions.some(r=>r.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=eG(t);return n&&CV(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){CV(e.state,t)},class:"cm-cursorLayer"});function CV(t,e){e.style.animationDuration=t.facet(q0).cursorBlinkRate+"ms"}const VXe=KZ({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:qb.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||eG(t)},class:"cm-selectionLayer"}),eM={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};JZ&&(eM[".cm-line"].caretColor=eM[".cm-content"].caretColor="transparent !important");const jXe=Hf.highest(Ut.theme(eM)),tG=Wn.define({map(t,e){return t==null?null:e.mapPos(t)}}),dy=So.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,r)=>r.is(tG)?r.value:n,t)}}),zXe=qi.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(dy);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(dy)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(dy),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let r=t.scrollDOM.getBoundingClientRect();return{left:n.left-r.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-r.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(dy)!=t&&this.view.dispatch({effects:tG.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function QXe(){return[dy,zXe]}function EV(t,e,n,r,i){e.lastIndex=0;for(let o=t.iterRange(n,r),a=n,s;!o.next().done;a+=o.value.length)if(!o.lineBreak)for(;s=e.exec(o.value);)i(a+s.index,s)}function HXe(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(t.state.doc.lineAt(i).from,i-e),o=Math.min(t.state.doc.lineAt(o).to,o+e),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}class WXe{constructor(e){const{regexp:n,decoration:r,decorate:i,boundary:o,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,i)this.addMatch=(s,l,u,c)=>i(c,u,u+s[0].length,s,l);else if(typeof r=="function")this.addMatch=(s,l,u,c)=>{let d=r(s,l,u);d&&c(u,u+s[0].length,d)};else if(r)this.addMatch=(s,l,u,c)=>c(u,u+s[0].length,r);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=o,this.maxLength=a}createDeco(e){let n=new Sf,r=n.add.bind(n);for(let{from:i,to:o}of HXe(e,this.maxLength))EV(e.state.doc,this.regexp,i,o,(a,s)=>this.addMatch(s,e,a,r));return n.finish()}updateDeco(e,n){let r=1e9,i=-1;return e.docChanged&&e.changes.iterChanges((o,a,s,l)=>{l>e.view.viewport.from&&s1e3?this.createDeco(e.view):i>-1?this.updateRange(e.view,n.map(e.changes),r,i):n}updateRange(e,n,r,i){for(let o of e.visibleRanges){let a=Math.max(o.from,r),s=Math.min(o.to,i);if(s>a){let l=e.state.doc.lineAt(a),u=l.tol.from;a--)if(this.boundary.test(l.text[a-1-l.from])){c=a;break}for(;sf.push(b.range(g,y));if(l==u)for(this.regexp.lastIndex=c-l.from;(h=this.regexp.exec(l.text))&&h.indexthis.addMatch(y,e,g,m));n=n.update({filterFrom:c,filterTo:d,filter:(g,y)=>gd,add:f})}}return n}}const tM=/x/.unicode!=null?"gu":"g",UXe=new RegExp(`[\0-\b -\x7F-\x9F\xAD\u061C\u200B\u200E\u200F\u2028\u2029\u202D\u202E\u2066\u2067\u2069\uFEFF\uFFF9-\uFFFC]`,tM),qXe={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let m2=null;function YXe(){var t;if(m2==null&&typeof document!="undefined"&&document.body){let e=document.body.style;m2=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return m2||!1}const U1=Xt.define({combine(t){let e=gc(t,{render:null,specialChars:UXe,addSpecialChars:null});return(e.replaceTabs=!YXe())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,tM)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,tM)),e}});function XXe(t={}){return[U1.of(t),ZXe()]}let TV=null;function ZXe(){return TV||(TV=qi.fromClass(class{constructor(t){this.view=t,this.decorations=yn.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(U1)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new WXe({regexp:t.specialChars,decoration:(e,n,r)=>{let{doc:i}=n.state,o=za(e[0],0);if(o==9){let a=i.lineAt(r),s=n.state.tabSize,l=rv(a.text,s,r-a.from);return yn.replace({widget:new eZe((s-l%s)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[o]||(this.decorationCache[o]=yn.replace({widget:new JXe(t,o)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(U1);t.startState.facet(U1)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const GXe="\u2022";function KXe(t){return t>=32?GXe:t==10?"\u2424":String.fromCharCode(9216+t)}class JXe extends mc{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=KXe(this.code),r=e.state.phrase("Control character")+" "+(qXe[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,n);if(i)return i;let o=document.createElement("span");return o.textContent=n,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class eZe extends mc{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function tZe(){return rZe}const nZe=yn.line({class:"cm-activeLine"}),rZe=qi.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let r of t.state.selection.ranges){let i=t.lineBlockAt(r.head);i.from>e&&(n.push(nZe.range(i.from)),e=i.from)}return yn.set(n)}},{decorations:t=>t.decorations});class iZe extends mc{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),typeof this.content=="string"?n.setAttribute("aria-label","placeholder "+this.content):n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?wm(e.firstChild):[];if(!n.length)return null;let r=window.getComputedStyle(e.parentNode),i=Qb(n[0],r.direction!="rtl"),o=parseInt(r.lineHeight);return i.bottom-i.top>o*1.5?{left:i.left,right:i.right,top:i.top,bottom:i.top+o}:i}ignoreEvent(){return!1}}function oZe(t){return qi.fromClass(class{constructor(e){this.view=e,this.placeholder=t?yn.set([yn.widget({widget:new iZe(t),side:1}).range(0)]):yn.none}get decorations(){return this.view.state.doc.length?yn.none:this.placeholder}},{decorations:e=>e.decorations})}const nM=2e3;function aZe(t,e,n){let r=Math.min(e.line,n.line),i=Math.max(e.line,n.line),o=[];if(e.off>nM||n.off>nM||e.col<0||n.col<0){let a=Math.min(e.off,n.off),s=Math.max(e.off,n.off);for(let l=r;l<=i;l++){let u=t.doc.line(l);u.length<=s&&o.push(yt.range(u.from+a,u.to+s))}}else{let a=Math.min(e.col,n.col),s=Math.max(e.col,n.col);for(let l=r;l<=i;l++){let u=t.doc.line(l),c=RA(u.text,a,t.tabSize,!0);if(c<0)o.push(yt.cursor(u.to));else{let d=RA(u.text,s,t.tabSize);o.push(yt.range(u.from+c,u.from+d))}}}return o}function sZe(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function kV(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),r=t.state.doc.lineAt(n),i=n-r.from,o=i>nM?-1:i==r.length?sZe(t,e.clientX):rv(r.text,t.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function lZe(t,e){let n=kV(t,e),r=t.state.selection;return n?{update(i){if(i.docChanged){let o=i.changes.mapPos(i.startState.doc.line(n.line).from),a=i.state.doc.lineAt(o);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},r=r.map(i.changes)}},get(i,o,a){let s=kV(t,i);if(!s)return r;let l=aZe(t.state,n,s);return l.length?a?yt.create(l.concat(r.ranges)):yt.create(l):r}}:null}function uZe(t){let e=(t==null?void 0:t.eventFilter)||(n=>n.altKey&&n.button==0);return Ut.mouseSelectionStyle.of((n,r)=>e(r)?lZe(n,r):null)}const cZe={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},dZe={style:"cursor: crosshair"};function fZe(t={}){let[e,n]=cZe[t.key||"Alt"],r=qi.fromClass(class{constructor(i){this.view=i,this.isDown=!1}set(i){this.isDown!=i&&(this.isDown=i,this.view.update([]))}},{eventObservers:{keydown(i){this.set(i.keyCode==e||n(i))},keyup(i){(i.keyCode==e||!n(i))&&this.set(!1)},mousemove(i){this.set(n(i))}}});return[r,Ut.contentAttributes.of(i=>{var o;return!((o=i.plugin(r))===null||o===void 0)&&o.isDown?dZe:null})]}const Uv="-10000px";class nG{constructor(e,n,r,i){this.facet=n,this.createTooltipView=r,this.removeTooltipView=i,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let o=null;this.tooltipViews=this.tooltips.map(a=>o=r(a,o))}update(e,n){var r;let i=e.state.facet(this.facet),o=i.filter(l=>l);if(i===this.input){for(let l of this.tooltipViews)l.update&&l.update(e);return!1}let a=[],s=n?[]:null;for(let l=0;ln[u]=l),n.length=s.length),this.input=i,this.tooltips=o,this.tooltipViews=a,!0}}function hZe(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const v2=Xt.define({combine:t=>{var e,n,r;return{position:Jt.ios?"absolute":((e=t.find(i=>i.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(i=>i.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((r=t.find(i=>i.tooltipSpace))===null||r===void 0?void 0:r.tooltipSpace)||hZe}}}),PV=new WeakMap,fD=qi.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(v2);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new nG(t,hD,(n,r)=>this.createTooltip(n,r),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,r=t.state.facet(v2);if(r.position!=this.position&&!this.madeAbsolute){this.position=r.position;for(let i of this.manager.tooltipViews)i.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let i of this.manager.tooltipViews)this.container.appendChild(i.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),r=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let i=document.createElement("div");i.className="cm-tooltip-arrow",n.dom.appendChild(i)}return n.dom.style.position=this.position,n.dom.style.top=Uv,n.dom.style.left="0px",this.container.insertBefore(n.dom,r),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let r of this.manager.tooltipViews)r.dom.remove(),(t=r.destroy)===null||t===void 0||t.call(r);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=this.view.dom.getBoundingClientRect(),e=1,n=1,r=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:i}=this.manager.tooltipViews[0];if(Jt.gecko)r=i.offsetParent!=this.container.ownerDocument.body;else if(i.style.top==Uv&&i.style.left=="0px"){let o=i.getBoundingClientRect();r=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}}if(r||this.position=="absolute")if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(e=i.width/this.parent.offsetWidth,n=i.height/this.parent.offsetHeight)}else({scaleX:e,scaleY:n}=this.view.viewState);return{editor:t,parent:this.parent?this.container.getBoundingClientRect():t,pos:this.manager.tooltips.map((i,o)=>{let a=this.manager.tooltipViews[o];return a.getCoords?a.getCoords(i.pos):this.view.coordsAtPos(i.pos)}),size:this.manager.tooltipViews.map(({dom:i})=>i.getBoundingClientRect()),space:this.view.state.facet(v2).tooltipSpace(this.view),scaleX:e,scaleY:n,makeAbsolute:r}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let s of this.manager.tooltipViews)s.dom.style.position="absolute"}let{editor:n,space:r,scaleX:i,scaleY:o}=t,a=[];for(let s=0;s=Math.min(n.bottom,r.bottom)||d.rightMath.min(n.right,r.right)+.1){c.style.top=Uv;continue}let h=l.arrow?u.dom.querySelector(".cm-tooltip-arrow"):null,m=h?7:0,g=f.right-f.left,y=(e=PV.get(u))!==null&&e!==void 0?e:f.bottom-f.top,b=u.offset||gZe,w=this.view.textDirection==bi.LTR,O=f.width>r.right-r.left?w?r.left:r.right-f.width:w?Math.max(r.left,Math.min(d.left-(h?14:0)+b.x,r.right-g)):Math.min(Math.max(r.left,d.left-g+(h?14:0)-b.x),r.right-g),S=this.above[s];!l.strictSide&&(S?d.top-(f.bottom-f.top)-b.yr.bottom)&&S==r.bottom-d.bottom>d.top-r.top&&(S=this.above[s]=!S);let x=(S?d.top-r.top:r.bottom-d.bottom)-m;if(xO&&T.topC&&(C=S?T.top-y-2-m:T.bottom+m+2);if(this.position=="absolute"?(c.style.top=(C-t.parent.top)/o+"px",c.style.left=(O-t.parent.left)/i+"px"):(c.style.top=C/o+"px",c.style.left=O/i+"px"),h){let T=d.left+(w?b.x:-b.x)-(O+14-7);h.style.left=T/i+"px"}u.overlap!==!0&&a.push({left:O,top:C,right:E,bottom:C+y}),c.classList.toggle("cm-tooltip-above",S),c.classList.toggle("cm-tooltip-below",!S),u.positioned&&u.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Uv}},{eventObservers:{scroll(){this.maybeMeasure()}}}),pZe=Ut.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:`${7}px`,width:`${7*2}px`,position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:`${7}px solid transparent`,borderRight:`${7}px solid transparent`},".cm-tooltip-above &":{bottom:`-${7}px`,"&:before":{borderTop:`${7}px solid #bbb`},"&:after":{borderTop:`${7}px solid #f5f5f5`,bottom:"1px"}},".cm-tooltip-below &":{top:`-${7}px`,"&:before":{borderBottom:`${7}px solid #bbb`},"&:after":{borderBottom:`${7}px solid #f5f5f5`,top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),gZe={x:0,y:0},hD=Xt.define({enables:[fD,pZe]}),MS=Xt.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class CC{static create(e){return new CC(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new nG(e,MS,(n,r)=>this.createHostedView(n,r),n=>n.dom.remove())}createHostedView(e,n){let r=e.create(this.view);return r.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(r.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&r.mount&&r.mount(this.view),r}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let r of this.manager.tooltipViews){let i=r[e];if(i!==void 0){if(n===void 0)n=i;else if(n!==i)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const mZe=hD.compute([MS],t=>{let e=t.facet(MS);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var r;return(r=n.end)!==null&&r!==void 0?r:n.pos})),create:CC.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class vZe{constructor(e,n,r,i,o){this.view=e,this.source=n,this.field=r,this.setHover=i,this.hoverTime=o,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;es.bottom||n.xs.right+e.defaultCharacterWidth)return;let l=e.bidiSpans(e.state.doc.lineAt(i)).find(c=>c.from<=i&&c.to>=i),u=l&&l.dir==bi.RTL?-1:1;o=n.x{this.pending==s&&(this.pending=null,l&&!(Array.isArray(l)&&!l.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(l)?l:[l])}))},l=>qa(e.state,l,"hover tooltip"))}else a&&!(Array.isArray(a)&&!a.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(a)?a:[a])})}get tooltip(){let e=this.view.plugin(fD),n=e?e.manager.tooltips.findIndex(r=>r.create==CC.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,r;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:i,tooltip:o}=this;if(i.length&&o&&!yZe(o.dom,e)||this.pending){let{pos:a}=i[0]||this.pending,s=(r=(n=i[0])===null||n===void 0?void 0:n.end)!==null&&r!==void 0?r:a;(a==s?this.view.posAtCoords(this.lastMove)!=a:!bZe(this.view,a,s,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:r}=this;r&&r.dom.contains(e.relatedTarget)?this.watchTooltipLeave(r.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=r=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(r.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const GO=4;function yZe(t,e){let{left:n,right:r,top:i,bottom:o}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let s=a.getBoundingClientRect();i=Math.min(s.top,i),o=Math.max(s.bottom,o)}return e.clientX>=n-GO&&e.clientX<=r+GO&&e.clientY>=i-GO&&e.clientY<=o+GO}function bZe(t,e,n,r,i,o){let a=t.scrollDOM.getBoundingClientRect(),s=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>r||a.righti||Math.min(a.bottom,s)=e&&l<=n}function _Ze(t,e={}){let n=Wn.define(),r=So.define({create(){return[]},update(i,o){if(i.length&&(e.hideOnChange&&(o.docChanged||o.selection)?i=[]:e.hideOn&&(i=i.filter(a=>!e.hideOn(o,a))),o.docChanged)){let a=[];for(let s of i){let l=o.changes.mapPos(s.pos,-1,No.TrackDel);if(l!=null){let u=Object.assign(Object.create(null),s);u.pos=l,u.end!=null&&(u.end=o.changes.mapPos(u.end)),a.push(u)}}i=a}for(let a of o.effects)a.is(n)&&(i=a.value),a.is(OZe)&&(i=[]);return i},provide:i=>MS.from(i)});return{active:r,extension:[r,qi.define(i=>new vZe(i,t,r,n,e.hoverTime||300)),mZe]}}function rG(t,e){let n=t.plugin(fD);if(!n)return null;let r=n.manager.tooltips.indexOf(e);return r<0?null:n.manager.tooltipViews[r]}const OZe=Wn.define(),AV=Xt.define({combine(t){let e,n;for(let r of t)e=e||r.topContainer,n=n||r.bottomContainer;return{topContainer:e,bottomContainer:n}}});function Y0(t,e){let n=t.plugin(iG),r=n?n.specs.indexOf(e):-1;return r>-1?n.panels[r]:null}const iG=qi.fromClass(class{constructor(t){this.input=t.state.facet(X0),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(AV);this.top=new KO(t,!0,e.topContainer),this.bottom=new KO(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(AV);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new KO(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new KO(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(X0);if(n!=this.input){let r=n.filter(l=>l),i=[],o=[],a=[],s=[];for(let l of r){let u=this.specs.indexOf(l),c;u<0?(c=l(t.view),s.push(c)):(c=this.panels[u],c.update&&c.update(t)),i.push(c),(c.top?o:a).push(c)}this.specs=r,this.panels=i,this.top.sync(o),this.bottom.sync(a);for(let l of s)l.dom.classList.add("cm-panel"),l.mount&&l.mount()}else for(let r of this.panels)r.update&&r.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Ut.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class KO{constructor(e,n,r){this.view=e,this.top=n,this.container=r,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=MV(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=MV(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function MV(t){let e=t.nextSibling;return t.remove(),e}const X0=Xt.define({enables:iG});class Gc extends up{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Gc.prototype.elementClass="";Gc.prototype.toDOM=void 0;Gc.prototype.mapMode=No.TrackBefore;Gc.prototype.startSide=Gc.prototype.endSide=-1;Gc.prototype.point=!0;const q1=Xt.define(),wZe=Xt.define(),SZe={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Ar.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},Yy=Xt.define();function xZe(t){return[oG(),Yy.of(Object.assign(Object.assign({},SZe),t))]}const rM=Xt.define({combine:t=>t.some(e=>e)});function oG(t){let e=[CZe];return t&&t.fixed===!1&&e.push(rM.of(!0)),e}const CZe=qi.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Yy).map(e=>new $V(t,e));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!t.state.facet(rM),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,r=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(r<(n.to-n.from)*.8)}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(rM)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let n=Ar.iter(this.view.state.facet(q1),this.view.viewport.from),r=[],i=this.gutters.map(o=>new EZe(o,this.view.viewport,-this.view.documentPadding.top));for(let o of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(o.type)){let a=!0;for(let s of o.type)if(s.type==wa.Text&&a){iM(n,r,s.from);for(let l of i)l.line(this.view,s,r);a=!1}else if(s.widget)for(let l of i)l.widget(this.view,s)}else if(o.type==wa.Text){iM(n,r,o.from);for(let a of i)a.line(this.view,o,r)}else if(o.widget)for(let a of i)a.widget(this.view,o);for(let o of i)o.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(Yy),n=t.state.facet(Yy),r=t.docChanged||t.heightChanged||t.viewportChanged||!Ar.eq(t.startState.facet(q1),t.state.facet(q1),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let i of this.gutters)i.update(t)&&(r=!0);else{r=!0;let i=[];for(let o of n){let a=e.indexOf(o);a<0?i.push(new $V(this.view,o)):(this.gutters[a].update(t),i.push(this.gutters[a]))}for(let o of this.gutters)o.dom.remove(),i.indexOf(o)<0&&o.destroy();for(let o of i)this.dom.appendChild(o.dom);this.gutters=i}return r}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>Ut.scrollMargins.of(e=>{let n=e.plugin(t);return!n||n.gutters.length==0||!n.fixed?null:e.textDirection==bi.LTR?{left:n.dom.offsetWidth*e.scaleX}:{right:n.dom.offsetWidth*e.scaleX}})});function RV(t){return Array.isArray(t)?t:[t]}function iM(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class EZe{constructor(e,n,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Ar.iter(e.markers,n.from)}addElement(e,n,r){let{gutter:i}=this,o=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==i.elements.length){let s=new aG(e,a,o,r);i.elements.push(s),i.dom.appendChild(s.dom)}else i.elements[this.i].update(e,a,o,r);this.height=n.bottom,this.i++}line(e,n,r){let i=[];iM(this.cursor,i,n.from),r.length&&(i=i.concat(r));let o=this.gutter.config.lineMarker(e,n,i);o&&i.unshift(o);let a=this.gutter;i.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,i)}widget(e,n){let r=this.gutter.config.widgetMarker(e,n.widget,n),i=r?[r]:null;for(let o of e.state.facet(wZe)){let a=o(e,n.widget,n);a&&(i||(i=[])).push(a)}i&&this.addElement(e,n,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class $V{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in n.domEventHandlers)this.dom.addEventListener(r,i=>{let o=i.target,a;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let l=o.getBoundingClientRect();a=(l.top+l.bottom)/2}else a=i.clientY;let s=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[r](e,s,i)&&i.preventDefault()});this.markers=RV(n.markers(e)),n.initialSpacer&&(this.spacer=new aG(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=RV(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Ar.eq(this.markers,n,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class aG{constructor(e,n,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,r,i)}update(e,n,r,i){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),TZe(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,n){let r="cm-gutterElement",i=this.dom.firstChild;for(let o=0,a=0;;){let s=a,l=oo(s,l,u)||a(s,l,u):a}return r}})}});class y2 extends Gc{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function b2(t,e){return t.state.facet(_g).formatNumber(e,t.state)}const AZe=Yy.compute([_g],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(kZe)},lineMarker(e,n,r){return r.some(i=>i.toDOM)?null:new y2(b2(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,r)=>{for(let i of e.state.facet(PZe)){let o=i(e,n,r);if(o)return o}return null},lineMarkerChange:e=>e.startState.facet(_g)!=e.state.facet(_g),initialSpacer(e){return new y2(b2(e,NV(e.state.doc.lines)))},updateSpacer(e,n){let r=b2(n.view,NV(n.view.state.doc.lines));return r==e.number?e:new y2(r)},domEventHandlers:t.facet(_g).domEventHandlers}));function MZe(t={}){return[_g.of(t),oG(),AZe]}function NV(t){let e=9;for(;e{let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.head).from;i>n&&(n=i,e.push(RZe.range(i)))}return Ar.of(e)});function NZe(){return $Ze}const sG=1024;let DZe=0;class _2{constructor(e,n){this.from=e,this.to=n}}class hr{constructor(e={}){this.id=DZe++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=is.match(e)),n=>{let r=e(n);return r===void 0?null:[this,r]}}}hr.closedBy=new hr({deserialize:t=>t.split(" ")});hr.openedBy=new hr({deserialize:t=>t.split(" ")});hr.group=new hr({deserialize:t=>t.split(" ")});hr.isolate=new hr({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});hr.contextHash=new hr({perNode:!0});hr.lookAhead=new hr({perNode:!0});hr.mounted=new hr({perNode:!0});class RS{constructor(e,n,r){this.tree=e,this.overlay=n,this.parser=r}static get(e){return e&&e.props&&e.props[hr.mounted.id]}}const LZe=Object.create(null);class is{constructor(e,n,r,i=0){this.name=e,this.props=n,this.id=r,this.flags=i}static define(e){let n=e.props&&e.props.length?Object.create(null):LZe,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new is(e.name||"",n,e.id,r);if(e.props){for(let o of e.props)if(Array.isArray(o)||(o=o(i)),o){if(o[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[o[0].id]=o[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(hr.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let r in e)for(let i of r.split(" "))n[i]=e[r];return r=>{for(let i=r.prop(hr.group),o=-1;o<(i?i.length:0);o++){let a=n[o<0?r.name:i[o]];if(a)return a}}}}is.none=new is("",Object.create(null),0,8);class pD{constructor(e){this.types=e;for(let n=0;n0;for(let l=this.cursor(a|ao.IncludeAnonymous);;){let u=!1;if(l.from<=o&&l.to>=i&&(!s&&l.type.isAnonymous||n(l)!==!1)){if(l.firstChild())continue;u=!0}for(;u&&r&&(s||!l.type.isAnonymous)&&r(l),!l.nextSibling();){if(!l.parent())return;u=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:vD(is.none,this.children,this.positions,0,this.children.length,0,this.length,(n,r,i)=>new Gi(this.type,n,r,i,this.propValues),e.makeTree||((n,r,i)=>new Gi(is.none,n,r,i)))}static build(e){return VZe(e)}}Gi.empty=new Gi(is.none,[],[],0);class gD{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new gD(this.buffer,this.index)}}class Tf{constructor(e,n,r){this.buffer=e,this.length=n,this.set=r}get type(){return is.none}toString(){let e=[];for(let n=0;n0));l=a[l+3]);return s}slice(e,n,r){let i=this.buffer,o=new Uint16Array(n-e),a=0;for(let s=e,l=0;s=e&&ne;case 1:return n<=e&&r>e;case 2:return r>e;case 4:return!0}}function Z0(t,e,n,r){for(var i;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to0?s.length:-1;e!=u;e+=n){let c=s[e],d=l[e]+a.from;if(!!lG(i,r,d,d+c.length)){if(c instanceof Tf){if(o&ao.ExcludeBuffers)continue;let f=c.findChild(0,c.buffer.length,n,r-d,i);if(f>-1)return new zu(new IZe(a,c,e,d),null,f)}else if(o&ao.IncludeAnonymous||!c.type.isAnonymous||mD(c)){let f;if(!(o&ao.IgnoreMounts)&&(f=RS.get(c))&&!f.overlay)return new Ja(f.tree,d,e,a);let h=new Ja(c,d,e,a);return o&ao.IncludeAnonymous||!h.type.isAnonymous?h:h.nextChild(n<0?c.children.length-1:0,n,r,i)}}}if(o&ao.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,n,r=0){let i;if(!(r&ao.IgnoreOverlays)&&(i=RS.get(this._tree))&&i.overlay){let o=e-this.from;for(let{from:a,to:s}of i.overlay)if((n>0?a<=o:a=o:s>o))return new Ja(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function LV(t,e,n,r){let i=t.cursor(),o=[];if(!i.firstChild())return o;if(n!=null){for(let a=!1;!a;)if(a=i.type.is(n),!i.nextSibling())return o}for(;;){if(r!=null&&i.type.is(r))return o;if(i.type.is(e)&&o.push(i.node),!i.nextSibling())return r==null?o:[]}}function oM(t,e,n=e.length-1){for(let r=t;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[n]&&e[n]!=r.name)return!1;n--}}return!0}class IZe{constructor(e,n,r,i){this.parent=e,this.buffer=n,this.index=r,this.start=i}}class zu extends uG{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,r){super(),this.context=e,this._parent=n,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,n,r){let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.context.start,r);return o<0?null:new zu(this.context,this,o)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,n,r=0){if(r&ao.ExcludeBuffers)return null;let{buffer:i}=this.context,o=i.findChild(this.index+4,i.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return o<0?null:new zu(this.context,this,o)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new zu(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new zu(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:r}=this.context,i=this.index+4,o=r.buffer[this.index+3];if(o>i){let a=r.buffer[this.index+1];e.push(r.slice(i,o,a)),n.push(0)}return new Gi(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function cG(t){if(!t.length)return null;let e=0,n=t[0];for(let o=1;on.from||a.to=e){let s=new Ja(a.tree,a.overlay[0].from+o.from,-1,o);(i||(i=[r])).push(Z0(s,e,n,!1))}}return i?cG(i):r}class aM{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Ja)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=n||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof Ja?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,r,this.mode));let{buffer:i}=this.buffer,o=i.findChild(this.index+4,i.buffer[this.index+3],e,n-this.buffer.start,r);return o<0?!1:(this.stack.push(this.index),this.yieldBuf(o))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,r=this.mode){return this.buffer?r&ao.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&ao.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&ao.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(n.findChild(i,this.index,-1,0,4))}else{let i=n.buffer[this.index+3];if(i<(r<0?n.buffer.length:n.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,r,{buffer:i}=this;if(i){if(e>0){if(this.index-1)for(let o=n+e,a=e<0?-1:r._tree.children.length;o!=a;o+=e){let s=r._tree.children[o];if(this.mode&ao.IncludeAnonymous||s instanceof Tf||!s.type.isAnonymous||mD(s))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to=0;){for(let a=e;a;a=a._parent)if(a.index==i){if(i==this.index)return a;n=a,r=o+1;break e}i=this.stack[--o]}}for(let i=r;i=0;o--){if(o<0)return oM(this._tree,e,i);let a=r[n.buffer[this.stack[o]]];if(!a.isAnonymous){if(e[i]&&e[i]!=a.name)return!1;i--}}return!0}}function mD(t){return t.children.some(e=>e instanceof Tf||!e.type.isAnonymous||mD(e))}function VZe(t){var e;let{buffer:n,nodeSet:r,maxBufferLength:i=sG,reused:o=[],minRepeatType:a=r.types.length}=t,s=Array.isArray(n)?new gD(n,n.length):n,l=r.types,u=0,c=0;function d(x,C,E,T,P,A){let{id:D,start:N,end:$,size:W}=s,L=c,I=u;for(;W<0;)if(s.next(),W==-1){let K=o[D];E.push(K),T.push(N-x);return}else if(W==-3){u=D;return}else if(W==-4){c=D;return}else throw new RangeError(`Unrecognized record size: ${W}`);let U=l[D],Q,V,q=N-x;if($-N<=i&&(V=y(s.pos-C,P))){let K=new Uint16Array(V.size-V.skip),ie=s.pos-V.size,oe=K.length;for(;s.pos>ie;)oe=b(V.start,K,oe);Q=new Tf(K,$-V.start,r),q=V.start-x}else{let K=s.pos-W;s.next();let ie=[],oe=[],Se=D>=a?D:-1,ke=0,Y=$;for(;s.pos>K;)Se>=0&&s.id==Se&&s.size>=0?(s.end<=Y-i&&(m(ie,oe,N,ke,s.end,Y,Se,L,I),ke=ie.length,Y=s.end),s.next()):A>2500?f(N,K,ie,oe):d(N,K,ie,oe,Se,A+1);if(Se>=0&&ke>0&&ke-1&&ke>0){let re=h(U,I);Q=vD(U,ie,oe,0,ie.length,0,$-N,re,re)}else Q=g(U,ie,oe,$-N,L-$,I)}E.push(Q),T.push(q)}function f(x,C,E,T){let P=[],A=0,D=-1;for(;s.pos>C;){let{id:N,start:$,end:W,size:L}=s;if(L>4)s.next();else{if(D>-1&&$=0;W-=3)N[L++]=P[W],N[L++]=P[W+1]-$,N[L++]=P[W+2]-$,N[L++]=L;E.push(new Tf(N,P[2]-$,r)),T.push($-x)}}function h(x,C){return(E,T,P)=>{let A=0,D=E.length-1,N,$;if(D>=0&&(N=E[D])instanceof Gi){if(!D&&N.type==x&&N.length==P)return N;($=N.prop(hr.lookAhead))&&(A=T[D]+N.length+$)}return g(x,E,T,P,A,C)}}function m(x,C,E,T,P,A,D,N,$){let W=[],L=[];for(;x.length>T;)W.push(x.pop()),L.push(C.pop()+E-P);x.push(g(r.types[D],W,L,A-P,N-A,$)),C.push(P-E)}function g(x,C,E,T,P,A,D){if(A){let N=[hr.contextHash,A];D=D?[N].concat(D):[N]}if(P>25){let N=[hr.lookAhead,P];D=D?[N].concat(D):[N]}return new Gi(x,C,E,T,D)}function y(x,C){let E=s.fork(),T=0,P=0,A=0,D=E.end-i,N={size:0,start:0,skip:0};e:for(let $=E.pos-x;E.pos>$;){let W=E.size;if(E.id==C&&W>=0){N.size=T,N.start=P,N.skip=A,A+=4,T+=4,E.next();continue}let L=E.pos-W;if(W<0||L<$||E.start=a?4:0,U=E.start;for(E.next();E.pos>L;){if(E.size<0)if(E.size==-3)I+=4;else break e;else E.id>=a&&(I+=4);E.next()}P=U,T+=W,A+=I}return(C<0||T==x)&&(N.size=T,N.start=P,N.skip=A),N.size>4?N:void 0}function b(x,C,E){let{id:T,start:P,end:A,size:D}=s;if(s.next(),D>=0&&T4){let $=s.pos-(D-4);for(;s.pos>$;)E=b(x,C,E)}C[--E]=N,C[--E]=A-x,C[--E]=P-x,C[--E]=T}else D==-3?u=T:D==-4&&(c=T);return E}let w=[],O=[];for(;s.pos>0;)d(t.start||0,t.bufferStart||0,w,O,-1,0);let S=(e=t.length)!==null&&e!==void 0?e:w.length?O[0]+w[0].length:0;return new Gi(l[t.topID],w.reverse(),O.reverse(),S)}const IV=new WeakMap;function Y1(t,e){if(!t.isAnonymous||e instanceof Tf||e.type!=t)return 1;let n=IV.get(e);if(n==null){n=1;for(let r of e.children){if(r.type!=t||!(r instanceof Gi)){n=1;break}n+=Y1(t,r)}IV.set(e,n)}return n}function vD(t,e,n,r,i,o,a,s,l){let u=0;for(let m=r;m=c)break;C+=E}if(O==S+1){if(C>c){let E=m[S];h(E.children,E.positions,0,E.children.length,g[S]+w);continue}d.push(m[S])}else{let E=g[O-1]+m[O-1].length-x;d.push(vD(t,m,g,S,O,x,E,null,l))}f.push(x+w-o)}}return h(e,n,r,i,0),(s||l)(d,f,a)}class jZe{constructor(){this.map=new WeakMap}setBuffer(e,n,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(n,r)}getBuffer(e,n){let r=this.map.get(e);return r&&r.get(n)}set(e,n){e instanceof zu?this.setBuffer(e.context.buffer,e.index,n):e instanceof Ja&&this.map.set(e.tree,n)}get(e){return e instanceof zu?this.getBuffer(e.context.buffer,e.index):e instanceof Ja?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class qh{constructor(e,n,r,i,o=!1,a=!1){this.from=e,this.to=n,this.tree=r,this.offset=i,this.open=(o?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],r=!1){let i=[new qh(0,e.length,e,0,!1,r)];for(let o of n)o.to>e.length&&i.push(o);return i}static applyChanges(e,n,r=128){if(!n.length)return e;let i=[],o=1,a=e.length?e[0]:null;for(let s=0,l=0,u=0;;s++){let c=s=r)for(;a&&a.from=f.from||d<=f.to||u){let h=Math.max(f.from,l)-u,m=Math.min(f.to,d)-u;f=h>=m?null:new qh(h,m,f.tree,f.offset+u,s>0,!!c)}if(f&&i.push(f),a.to>d)break;a=onew _2(i.from,i.to)):[new _2(0,0)]:[new _2(0,e.length)],this.createParse(e,n||[],r)}parse(e,n,r){let i=this.startParse(e,n,r);for(;;){let o=i.advance();if(o)return o}}}class zZe{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}new hr({perNode:!0});let QZe=0;class tl{constructor(e,n,r,i){this.name=e,this.set=n,this.base=r,this.modified=i,this.id=QZe++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let r=typeof e=="string"?e:"?";if(e instanceof tl&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let i=new tl(r,[],null,[]);if(i.set.push(i),n)for(let o of n.set)i.set.push(o);return i}static defineModifier(e){let n=new $S(e);return r=>r.modified.indexOf(n)>-1?r:$S.get(r.base||r,r.modified.concat(n).sort((i,o)=>i.id-o.id))}}let HZe=0;class $S{constructor(e){this.name=e,this.instances=[],this.id=HZe++}static get(e,n){if(!n.length)return e;let r=n[0].instances.find(s=>s.base==e&&WZe(n,s.modified));if(r)return r;let i=[],o=new tl(e.name,i,e,n);for(let s of n)s.instances.push(o);let a=UZe(n);for(let s of e.set)if(!s.modified.length)for(let l of a)i.push($S.get(s,l));return o}}function WZe(t,e){return t.length==e.length&&t.every((n,r)=>n==e[r])}function UZe(t){let e=[[]];for(let n=0;nr.length-n.length)}function yD(t){let e=Object.create(null);for(let n in t){let r=t[n];Array.isArray(r)||(r=[r]);for(let i of n.split(" "))if(i){let o=[],a=2,s=i;for(let d=0;;){if(s=="..."&&d>0&&d+3==i.length){a=1;break}let f=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(s);if(!f)throw new RangeError("Invalid path: "+i);if(o.push(f[0]=="*"?"":f[0][0]=='"'?JSON.parse(f[0]):f[0]),d+=f[0].length,d==i.length)break;let h=i[d++];if(d==i.length&&h=="!"){a=0;break}if(h!="/")throw new RangeError("Invalid path: "+i);s=i.slice(d)}let l=o.length-1,u=o[l];if(!u)throw new RangeError("Invalid path: "+i);let c=new NS(r,a,l>0?o.slice(0,l):null);e[u]=c.sort(e[u])}}return fG.add(e)}const fG=new hr;class NS{constructor(e,n,r,i){this.tags=e,this.mode=n,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth{let a=i;for(let s of o)for(let l of s.set){let u=n[l.id];if(u){a=a?a+" "+u:u;break}}return a},scope:r}}function qZe(t,e){let n=null;for(let r of t){let i=r.style(e);i&&(n=n?n+" "+i:i)}return n}function YZe(t,e,n,r=0,i=t.length){let o=new XZe(r,Array.isArray(e)?e:[e],n);o.highlightRange(t.cursor(),r,i,"",o.highlighters),o.flush(i)}class XZe{constructor(e,n,r){this.at=e,this.highlighters=n,this.span=r,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,r,i,o){let{type:a,from:s,to:l}=e;if(s>=r||l<=n)return;a.isTop&&(o=this.highlighters.filter(h=>!h.scope||h.scope(a)));let u=i,c=ZZe(e)||NS.empty,d=qZe(o,c.tags);if(d&&(u&&(u+=" "),u+=d,c.mode==1&&(i+=(i?" ":"")+d)),this.startSpan(Math.max(n,s),u),c.opaque)return;let f=e.tree&&e.tree.prop(hr.mounted);if(f&&f.overlay){let h=e.node.enter(f.overlay[0].from+s,1),m=this.highlighters.filter(y=>!y.scope||y.scope(f.tree.type)),g=e.firstChild();for(let y=0,b=s;;y++){let w=y=O||!e.nextSibling())););if(!w||O>r)break;b=w.to+s,b>n&&(this.highlightRange(h.cursor(),Math.max(n,w.from+s),Math.min(r,b),"",m),this.startSpan(Math.min(r,b),u))}g&&e.parent()}else if(e.firstChild()){f&&(i="");do if(!(e.to<=n)){if(e.from>=r)break;this.highlightRange(e,n,r,i,o),this.startSpan(Math.min(r,e.to),u)}while(e.nextSibling());e.parent()}}}function ZZe(t){let e=t.type.prop(fG);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ft=tl.define,e1=Ft(),Nd=Ft(),BV=Ft(Nd),FV=Ft(Nd),Dd=Ft(),t1=Ft(Dd),O2=Ft(Dd),Pu=Ft(),fh=Ft(Pu),Eu=Ft(),Tu=Ft(),sM=Ft(),qv=Ft(sM),n1=Ft(),Je={comment:e1,lineComment:Ft(e1),blockComment:Ft(e1),docComment:Ft(e1),name:Nd,variableName:Ft(Nd),typeName:BV,tagName:Ft(BV),propertyName:FV,attributeName:Ft(FV),className:Ft(Nd),labelName:Ft(Nd),namespace:Ft(Nd),macroName:Ft(Nd),literal:Dd,string:t1,docString:Ft(t1),character:Ft(t1),attributeValue:Ft(t1),number:O2,integer:Ft(O2),float:Ft(O2),bool:Ft(Dd),regexp:Ft(Dd),escape:Ft(Dd),color:Ft(Dd),url:Ft(Dd),keyword:Eu,self:Ft(Eu),null:Ft(Eu),atom:Ft(Eu),unit:Ft(Eu),modifier:Ft(Eu),operatorKeyword:Ft(Eu),controlKeyword:Ft(Eu),definitionKeyword:Ft(Eu),moduleKeyword:Ft(Eu),operator:Tu,derefOperator:Ft(Tu),arithmeticOperator:Ft(Tu),logicOperator:Ft(Tu),bitwiseOperator:Ft(Tu),compareOperator:Ft(Tu),updateOperator:Ft(Tu),definitionOperator:Ft(Tu),typeOperator:Ft(Tu),controlOperator:Ft(Tu),punctuation:sM,separator:Ft(sM),bracket:qv,angleBracket:Ft(qv),squareBracket:Ft(qv),paren:Ft(qv),brace:Ft(qv),content:Pu,heading:fh,heading1:Ft(fh),heading2:Ft(fh),heading3:Ft(fh),heading4:Ft(fh),heading5:Ft(fh),heading6:Ft(fh),contentSeparator:Ft(Pu),list:Ft(Pu),quote:Ft(Pu),emphasis:Ft(Pu),strong:Ft(Pu),link:Ft(Pu),monospace:Ft(Pu),strikethrough:Ft(Pu),inserted:Ft(),deleted:Ft(),changed:Ft(),invalid:Ft(),meta:n1,documentMeta:Ft(n1),annotation:Ft(n1),processingInstruction:Ft(n1),definition:tl.defineModifier("definition"),constant:tl.defineModifier("constant"),function:tl.defineModifier("function"),standard:tl.defineModifier("standard"),local:tl.defineModifier("local"),special:tl.defineModifier("special")};for(let t in Je){let e=Je[t];e instanceof tl&&(e.name=t)}hG([{tag:Je.link,class:"tok-link"},{tag:Je.heading,class:"tok-heading"},{tag:Je.emphasis,class:"tok-emphasis"},{tag:Je.strong,class:"tok-strong"},{tag:Je.keyword,class:"tok-keyword"},{tag:Je.atom,class:"tok-atom"},{tag:Je.bool,class:"tok-bool"},{tag:Je.url,class:"tok-url"},{tag:Je.labelName,class:"tok-labelName"},{tag:Je.inserted,class:"tok-inserted"},{tag:Je.deleted,class:"tok-deleted"},{tag:Je.literal,class:"tok-literal"},{tag:Je.string,class:"tok-string"},{tag:Je.number,class:"tok-number"},{tag:[Je.regexp,Je.escape,Je.special(Je.string)],class:"tok-string2"},{tag:Je.variableName,class:"tok-variableName"},{tag:Je.local(Je.variableName),class:"tok-variableName tok-local"},{tag:Je.definition(Je.variableName),class:"tok-variableName tok-definition"},{tag:Je.special(Je.variableName),class:"tok-variableName2"},{tag:Je.definition(Je.propertyName),class:"tok-propertyName tok-definition"},{tag:Je.typeName,class:"tok-typeName"},{tag:Je.namespace,class:"tok-namespace"},{tag:Je.className,class:"tok-className"},{tag:Je.macroName,class:"tok-macroName"},{tag:Je.propertyName,class:"tok-propertyName"},{tag:Je.operator,class:"tok-operator"},{tag:Je.comment,class:"tok-comment"},{tag:Je.meta,class:"tok-meta"},{tag:Je.invalid,class:"tok-invalid"},{tag:Je.punctuation,class:"tok-punctuation"}]);var w2;const Og=new hr;function pG(t){return Xt.define({combine:t?e=>e.concat(t):void 0})}const bD=new hr;class Jl{constructor(e,n,r=[],i=""){this.data=e,this.name=i,vr.prototype.hasOwnProperty("tree")||Object.defineProperty(vr.prototype,"tree",{get(){return uo(this)}}),this.parser=n,this.extension=[kf.of(this),vr.languageData.of((o,a,s)=>{let l=VV(o,a,s),u=l.type.prop(Og);if(!u)return[];let c=o.facet(u),d=l.type.prop(bD);if(d){let f=l.resolve(a-l.from,s);for(let h of d)if(h.test(f,o)){let m=o.facet(h.facet);return h.type=="replace"?m:m.concat(c)}}return c})].concat(r)}isActiveAt(e,n,r=-1){return VV(e,n,r).type.prop(Og)==this.data}findRegions(e){let n=e.facet(kf);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let r=[],i=(o,a)=>{if(o.prop(Og)==this.data){r.push({from:a,to:a+o.length});return}let s=o.prop(hr.mounted);if(s){if(s.tree.prop(Og)==this.data){if(s.overlay)for(let l of s.overlay)r.push({from:l.from+a,to:l.to+a});else r.push({from:a,to:a+o.length});return}else if(s.overlay){let l=r.length;if(i(s.tree,s.overlay[0].from+a),r.length>l)return}}for(let l=0;lr.isTop?n:void 0)]}),e.name)}configure(e,n){return new G0(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function uo(t){let e=t.field(Jl.state,!1);return e?e.tree:Gi.empty}class GZe{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let r=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-r,n-r)}}let Yv=null;class DS{constructor(e,n,r=[],i,o,a,s,l){this.parser=e,this.state=n,this.fragments=r,this.tree=i,this.treeLen=o,this.viewport=a,this.skipped=s,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(e,n,r){return new DS(e,n,[],Gi.empty,0,r,[],null)}startParse(){return this.parser.startParse(new GZe(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Gi.empty&&this.isDone(n!=null?n:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(qh.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Yv;Yv=this;try{return e()}finally{Yv=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=jV(e,n.from,n.to);return e}changes(e,n){let{fragments:r,tree:i,treeLen:o,viewport:a,skipped:s}=this;if(this.takeTree(),!e.empty){let l=[];if(e.iterChangedRanges((u,c,d,f)=>l.push({fromA:u,toA:c,fromB:d,toB:f})),r=qh.applyChanges(r,l),i=Gi.empty,o=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){s=[];for(let u of this.skipped){let c=e.mapPos(u.from,1),d=e.mapPos(u.to,-1);ce.from&&(this.fragments=jV(this.fragments,i,o),this.skipped.splice(r--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends dG{createParse(n,r,i){let o=i[0].from,a=i[i.length-1].to;return{parsedPos:o,advance(){let l=Yv;if(l){for(let u of i)l.tempSkipped.push(u);e&&(l.scheduleOn=l.scheduleOn?Promise.all([l.scheduleOn,e]):e)}return this.parsedPos=a,new Gi(is.none,[],[],a-o)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Yv}}function jV(t,e,n){return qh.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Em{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,r)||n.takeTree(),new Em(n)}static init(e){let n=Math.min(3e3,e.doc.length),r=DS.create(e.facet(kf).parser,e,{from:0,to:n});return r.work(20,n)||r.takeTree(),new Em(r)}}Jl.state=So.define({create:Em.init,update(t,e){for(let n of e.effects)if(n.is(Jl.setState))return n.value;return e.startState.facet(kf)!=e.state.facet(kf)?Em.init(e.state):t.apply(e)}});let gG=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback!="undefined"&&(gG=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:500-100})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const S2=typeof navigator!="undefined"&&((w2=navigator.scheduling)===null||w2===void 0?void 0:w2.isInputPending)?()=>navigator.scheduling.isInputPending():null,KZe=qi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Jl.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Jl.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=gG(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEndi+1e3,l=o.context.work(()=>S2&&S2()||Date.now()>a,i+(s?0:1e5));this.chunkBudget-=Date.now()-n,(l||this.chunkBudget<=0)&&(o.context.takeTree(),this.view.dispatch({effects:Jl.setState.of(new Em(o.context))})),this.chunkBudget>0&&!(l&&!s)&&this.scheduleWork(),this.checkAsyncSchedule(o.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>qa(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),kf=Xt.define({combine(t){return t.length?t[0]:null},enables:t=>[Jl.state,KZe,Ut.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class mG{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}const JZe=Xt.define(),Yb=Xt.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function LS(t){let e=t.facet(Yb);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function K0(t,e){let n="",r=t.tabSize,i=t.facet(Yb)[0];if(i==" "){for(;e>=r;)n+=" ",e-=r;i=" "}for(let o=0;o=e?eGe(t,n,e):null}class EC{constructor(e,n={}){this.state=e,this.options=n,this.unit=LS(e)}lineAt(e,n=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:o}=this.options;return i!=null&&i>=r.from&&i<=r.to?o&&i==e?{text:"",from:e}:(n<0?i-1&&(o+=a-this.countColumn(r,r.search(/\S|$/))),o}countColumn(e,n=e.length){return rv(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:r,from:i}=this.lineAt(e,n),o=this.options.overrideIndentation;if(o){let a=o(i);if(a>-1)return a}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const OD=new hr;function eGe(t,e,n){let r=e.resolveStack(n),i=r.node.enterUnfinishedNodesBefore(n);if(i!=r.node){let o=[];for(let a=i;a!=r.node;a=a.parent)o.push(a);for(let a=o.length-1;a>=0;a--)r={node:o[a],next:r}}return vG(r,t,n)}function vG(t,e,n){for(let r=t;r;r=r.next){let i=nGe(r.node);if(i)return i(wD.create(e,n,r))}return 0}function tGe(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function nGe(t){let e=t.type.prop(OD);if(e)return e;let n=t.firstChild,r;if(n&&(r=n.type.prop(hr.closedBy))){let i=t.lastChild,o=i&&r.indexOf(i.name)>-1;return a=>yG(a,!0,1,void 0,o&&!tGe(a)?i.from:void 0)}return t.parent==null?rGe:null}function rGe(){return 0}class wD extends EC{constructor(e,n,r){super(e.state,e.options),this.base=e,this.pos=n,this.context=r}get node(){return this.context.node}static create(e,n,r){return new wD(e,n,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(n.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(iGe(r,e))break;n=this.state.doc.lineAt(r.from)}return this.lineIndent(n.from)}continue(){return vG(this.context.next,this.base,this.pos)}}function iGe(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function oGe(t){let e=t.node,n=e.childAfter(e.from),r=e.lastChild;if(!n)return null;let i=t.options.simulateBreak,o=t.state.doc.lineAt(n.from),a=i==null||i<=o.from?o.to:Math.min(o.to,i);for(let s=n.to;;){let l=e.childAfter(s);if(!l||l==r)return null;if(!l.type.isSkipped){if(l.from>=a)return null;let u=/^ */.exec(o.text.slice(n.to-o.from))[0].length;return{from:n.from,to:n.to+u}}s=l.to}}function aGe({closing:t,align:e=!0,units:n=1}){return r=>yG(r,e,n,t)}function yG(t,e,n,r,i){let o=t.textAfter,a=o.match(/^\s*/)[0].length,s=r&&o.slice(a,a+r.length)==r||i==t.pos+a,l=e?oGe(t):null;return l?s?t.column(l.from):t.column(l.to):t.baseIndent+(s?0:t.unit*n)}const sGe=t=>t.baseIndent;function Xy({except:t,units:e=1}={}){return n=>{let r=t&&t.test(n.textAfter);return n.baseIndent+(r?0:e*n.unit)}}const lGe=200;function uGe(){return vr.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:r}=t.newSelection.main,i=n.lineAt(r);if(r>i.from+lGe)return t;let o=n.sliceString(i.from,r);if(!e.some(u=>u.test(o)))return t;let{state:a}=t,s=-1,l=[];for(let{head:u}of a.selection.ranges){let c=a.doc.lineAt(u);if(c.from==s)continue;s=c.from;let d=_D(a,c.from);if(d==null)continue;let f=/^\s*/.exec(c.text)[0],h=K0(a,d);f!=h&&l.push({from:c.from,to:c.from+f.length,insert:h})}return l.length?[t,{changes:l,sequential:!0}]:t})}const cGe=Xt.define(),SD=new hr;function bG(t){let e=t.firstChild,n=t.lastChild;return e&&e.ton)continue;if(o&&s.from=e&&u.to>n&&(o=u)}}return o}function fGe(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function IS(t,e,n){for(let r of t.facet(cGe)){let i=r(t,e,n);if(i)return i}return dGe(t,e,n)}function _G(t,e){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);return n>=r?void 0:{from:n,to:r}}const TC=Wn.define({map:_G}),Xb=Wn.define({map:_G});function OG(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(r=>r.from<=n&&r.to>=n)||e.push(t.lineBlockAt(n));return e}const hp=So.define({create(){return yn.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)if(n.is(TC)&&!hGe(t,n.value.from,n.value.to)){let{preparePlaceholder:r}=e.state.facet(xD),i=r?yn.replace({widget:new _Ge(r(e.state,n.value))}):zV;t=t.update({add:[i.range(n.value.from,n.value.to)]})}else n.is(Xb)&&(t=t.update({filter:(r,i)=>n.value.from!=r||n.value.to!=i,filterFrom:n.value.from,filterTo:n.value.to}));if(e.selection){let n=!1,{head:r}=e.selection.main;t.between(r,r,(i,o)=>{ir&&(n=!0)}),n&&(t=t.update({filterFrom:r,filterTo:r,filter:(i,o)=>o<=r||i>=r}))}return t},provide:t=>Ut.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(r,i)=>{n.push(r,i)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n{(!i||i.from>o)&&(i={from:o,to:a})}),i}function hGe(t,e,n){let r=!1;return t.between(e,e,(i,o)=>{i==e&&o==n&&(r=!0)}),r}function wG(t,e){return t.field(hp,!1)?e:e.concat(Wn.appendConfig.of(xG()))}const pGe=t=>{for(let e of OG(t)){let n=IS(t.state,e.from,e.to);if(n)return t.dispatch({effects:wG(t.state,[TC.of(n),SG(t,n)])}),!0}return!1},gGe=t=>{if(!t.state.field(hp,!1))return!1;let e=[];for(let n of OG(t)){let r=BS(t.state,n.from,n.to);r&&e.push(Xb.of(r),SG(t,r,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function SG(t,e,n=!0){let r=t.state.doc.lineAt(e.from).number,i=t.state.doc.lineAt(e.to).number;return Ut.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${t.state.phrase("to")} ${i}.`)}const mGe=t=>{let{state:e}=t,n=[];for(let r=0;r{let e=t.state.field(hp,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(r,i)=>{n.push(Xb.of({from:r,to:i}))}),t.dispatch({effects:n}),!0},yGe=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:pGe},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:gGe},{key:"Ctrl-Alt-[",run:mGe},{key:"Ctrl-Alt-]",run:vGe}],bGe={placeholderDOM:null,preparePlaceholder:null,placeholderText:"\u2026"},xD=Xt.define({combine(t){return gc(t,bGe)}});function xG(t){let e=[hp,SGe];return t&&e.push(xD.of(t)),e}function CG(t,e){let{state:n}=t,r=n.facet(xD),i=a=>{let s=t.lineBlockAt(t.posAtDOM(a.target)),l=BS(t.state,s.from,s.to);l&&t.dispatch({effects:Xb.of(l)}),a.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(t,i,e);let o=document.createElement("span");return o.textContent=r.placeholderText,o.setAttribute("aria-label",n.phrase("folded code")),o.title=n.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=i,o}const zV=yn.replace({widget:new class extends mc{toDOM(t){return CG(t,null)}}});class _Ge extends mc{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return CG(e,this.value)}}const OGe={openText:"\u2304",closedText:"\u203A",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class x2 extends Gc{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function wGe(t={}){let e=Object.assign(Object.assign({},OGe),t),n=new x2(e,!0),r=new x2(e,!1),i=qi.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(kf)!=a.state.facet(kf)||a.startState.field(hp,!1)!=a.state.field(hp,!1)||uo(a.startState)!=uo(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let s=new Sf;for(let l of a.viewportLineBlocks){let u=BS(a.state,l.from,l.to)?r:IS(a.state,l.from,l.to)?n:null;u&&s.add(l.from,l.from,u)}return s.finish()}}),{domEventHandlers:o}=e;return[i,xZe({class:"cm-foldGutter",markers(a){var s;return((s=a.plugin(i))===null||s===void 0?void 0:s.markers)||Ar.empty},initialSpacer(){return new x2(e,!1)},domEventHandlers:Object.assign(Object.assign({},o),{click:(a,s,l)=>{if(o.click&&o.click(a,s,l))return!0;let u=BS(a.state,s.from,s.to);if(u)return a.dispatch({effects:Xb.of(u)}),!0;let c=IS(a.state,s.from,s.to);return c?(a.dispatch({effects:TC.of(c)}),!0):!1}})}),xG()]}const SGe=Ut.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class kC{constructor(e,n){this.specs=e;let r;function i(s){let l=xf.newName();return(r||(r=Object.create(null)))["."+l]=s,l}const o=typeof n.all=="string"?n.all:n.all?i(n.all):void 0,a=n.scope;this.scope=a instanceof Jl?s=>s.prop(Og)==a.data:a?s=>s==a:void 0,this.style=hG(e.map(s=>({tag:s.tag,class:s.class||i(Object.assign({},s,{tag:null}))})),{all:o}).style,this.module=r?new xf(r):null,this.themeType=n.themeType}static define(e,n){return new kC(e,n||{})}}const lM=Xt.define(),EG=Xt.define({combine(t){return t.length?[t[0]]:null}});function C2(t){let e=t.facet(lM);return e.length?e:t.facet(EG)}function xGe(t,e){let n=[EGe],r;return t instanceof kC&&(t.module&&n.push(Ut.styleModule.of(t.module)),r=t.themeType),e!=null&&e.fallback?n.push(EG.of(t)):r?n.push(lM.computeN([Ut.darkTheme],i=>i.facet(Ut.darkTheme)==(r=="dark")?[t]:[])):n.push(lM.of(t)),n}class CGe{constructor(e){this.markCache=Object.create(null),this.tree=uo(e.state),this.decorations=this.buildDeco(e,C2(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=uo(e.state),r=C2(e.state),i=r!=C2(e.startState),{viewport:o}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length=o.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||i)&&(this.tree=n,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=o.to)}buildDeco(e,n){if(!n||!this.tree.length)return yn.none;let r=new Sf;for(let{from:i,to:o}of e.visibleRanges)YZe(this.tree,n,(a,s,l)=>{r.add(a,s,this.markCache[l]||(this.markCache[l]=yn.mark({class:l})))},i,o);return r.finish()}}const EGe=Hf.high(qi.fromClass(CGe,{decorations:t=>t.decorations})),TGe=kC.define([{tag:Je.meta,color:"#404740"},{tag:Je.link,textDecoration:"underline"},{tag:Je.heading,textDecoration:"underline",fontWeight:"bold"},{tag:Je.emphasis,fontStyle:"italic"},{tag:Je.strong,fontWeight:"bold"},{tag:Je.strikethrough,textDecoration:"line-through"},{tag:Je.keyword,color:"#708"},{tag:[Je.atom,Je.bool,Je.url,Je.contentSeparator,Je.labelName],color:"#219"},{tag:[Je.literal,Je.inserted],color:"#164"},{tag:[Je.string,Je.deleted],color:"#a11"},{tag:[Je.regexp,Je.escape,Je.special(Je.string)],color:"#e40"},{tag:Je.definition(Je.variableName),color:"#00f"},{tag:Je.local(Je.variableName),color:"#30a"},{tag:[Je.typeName,Je.namespace],color:"#085"},{tag:Je.className,color:"#167"},{tag:[Je.special(Je.variableName),Je.macroName],color:"#256"},{tag:Je.definition(Je.propertyName),color:"#00c"},{tag:Je.comment,color:"#940"},{tag:Je.invalid,color:"#f00"}]),kGe=Ut.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),TG=1e4,kG="()[]{}",PG=Xt.define({combine(t){return gc(t,{afterCursor:!0,brackets:kG,maxScanDistance:TG,renderMatch:MGe})}}),PGe=yn.mark({class:"cm-matchingBracket"}),AGe=yn.mark({class:"cm-nonmatchingBracket"});function MGe(t){let e=[],n=t.matched?PGe:AGe;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const RGe=So.define({create(){return yn.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],r=e.state.facet(PG);for(let i of e.state.selection.ranges){if(!i.empty)continue;let o=Qu(e.state,i.head,-1,r)||i.head>0&&Qu(e.state,i.head-1,1,r)||r.afterCursor&&(Qu(e.state,i.head,1,r)||i.headUt.decorations.from(t)}),$Ge=[RGe,kGe];function NGe(t={}){return[PG.of(t),$Ge]}const DGe=new hr;function uM(t,e,n){let r=t.prop(e<0?hr.openedBy:hr.closedBy);if(r)return r;if(t.name.length==1){let i=n.indexOf(t.name);if(i>-1&&i%2==(e<0?1:0))return[n[i+e]]}return null}function cM(t){let e=t.type.prop(DGe);return e?e(t.node):t}function Qu(t,e,n,r={}){let i=r.maxScanDistance||TG,o=r.brackets||kG,a=uo(t),s=a.resolveInner(e,n);for(let l=s;l;l=l.parent){let u=uM(l.type,n,o);if(u&&l.from0?e>=c.from&&ec.from&&e<=c.to))return LGe(t,e,n,l,c,u,o)}}return IGe(t,e,n,a,s.type,i,o)}function LGe(t,e,n,r,i,o,a){let s=r.parent,l={from:i.from,to:i.to},u=0,c=s==null?void 0:s.cursor();if(c&&(n<0?c.childBefore(r.from):c.childAfter(r.to)))do if(n<0?c.to<=r.from:c.from>=r.to){if(u==0&&o.indexOf(c.type.name)>-1&&c.from0)return null;let u={from:n<0?e-1:e,to:n>0?e+1:e},c=t.doc.iterRange(e,n>0?t.doc.length:0),d=0;for(let f=0;!c.next().done&&f<=o;){let h=c.value;n<0&&(f+=h.length);let m=e+f*n;for(let g=n>0?0:h.length-1,y=n>0?h.length:-1;g!=y;g+=n){let b=a.indexOf(h[g]);if(!(b<0||r.resolveInner(m+g,1).type!=i))if(b%2==0==n>0)d++;else{if(d==1)return{start:u,end:{from:m+g,to:m+g+1},matched:b>>1==l>>1};d--}}n>0&&(f+=h.length)}return c.done?{start:u,matched:!1}:null}const BGe=Object.create(null),QV=[is.none],HV=[],WV=Object.create(null),FGe=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])FGe[t]=VGe(BGe,e);function E2(t,e){HV.indexOf(t)>-1||(HV.push(t),console.warn(e))}function VGe(t,e){let n=[];for(let s of e.split(" ")){let l=[];for(let u of s.split(".")){let c=t[u]||Je[u];c?typeof c=="function"?l.length?l=l.map(c):E2(u,`Modifier ${u} used at start of tag`):l.length?E2(u,`Tag ${u} used as modifier`):l=Array.isArray(c)?c:[c]:E2(u,`Unknown highlighting tag ${u}`)}for(let u of l)n.push(u)}if(!n.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+n.map(s=>s.id),o=WV[i];if(o)return o.id;let a=WV[i]=is.define({id:QV.length,name:r,props:[yD({[r]:n})]});return QV.push(a),a.id}bi.RTL,bi.LTR;const jGe=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),r=ED(t.state,n.from);return r.line?zGe(t):r.block?HGe(t):!1};function CD(t,e){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=t(e,n);return i?(r(n.update(i)),!0):!1}}const zGe=CD(qGe,0),QGe=CD(AG,0),HGe=CD((t,e)=>AG(t,e,UGe(e)),0);function ED(t,e){let n=t.languageDataAt("commentTokens",e);return n.length?n[0]:{}}const Xv=50;function WGe(t,{open:e,close:n},r,i){let o=t.sliceDoc(r-Xv,r),a=t.sliceDoc(i,i+Xv),s=/\s*$/.exec(o)[0].length,l=/^\s*/.exec(a)[0].length,u=o.length-s;if(o.slice(u-e.length,u)==e&&a.slice(l,l+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+l,margin:l&&1}};let c,d;i-r<=2*Xv?c=d=t.sliceDoc(r,i):(c=t.sliceDoc(r,r+Xv),d=t.sliceDoc(i-Xv,i));let f=/^\s*/.exec(c)[0].length,h=/\s*$/.exec(d)[0].length,m=d.length-h-n.length;return c.slice(f,f+e.length)==e&&d.slice(m,m+n.length)==n?{open:{pos:r+f+e.length,margin:/\s/.test(c.charAt(f+e.length))?1:0},close:{pos:i-h-n.length,margin:/\s/.test(d.charAt(m-1))?1:0}}:null}function UGe(t){let e=[];for(let n of t.selection.ranges){let r=t.doc.lineAt(n.from),i=n.to<=r.to?r:t.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:t.doc.lineAt(n.to-1));let o=e.length-1;o>=0&&e[o].to>r.from?e[o].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function AG(t,e,n=e.selection.ranges){let r=n.map(o=>ED(e,o.from).block);if(!r.every(o=>o))return null;let i=n.map((o,a)=>WGe(e,r[a],o.from,o.to));if(t!=2&&!i.every(o=>o))return{changes:e.changes(n.map((o,a)=>i[a]?[]:[{from:o.from,insert:r[a].open+" "},{from:o.to,insert:" "+r[a].close}]))};if(t!=1&&i.some(o=>o)){let o=[];for(let a=0,s;ai&&(o==a||a>d.from)){i=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,m=d.text.slice(f,f+u.length)==u?f:-1;fo.comment<0&&(!o.empty||o.single))){let o=[];for(let{line:s,token:l,indent:u,empty:c,single:d}of r)(d||!c)&&o.push({from:s.from+u,insert:l+" "});let a=e.changes(o);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&r.some(o=>o.comment>=0)){let o=[];for(let{line:a,comment:s,token:l}of r)if(s>=0){let u=a.from+s,c=u+l.length;a.text[c-a.from]==" "&&c++,o.push({from:u,to:c})}return{changes:o}}return null}const dM=cd.define(),YGe=cd.define(),XGe=Xt.define(),MG=Xt.define({combine(t){return gc(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(r,i)=>e(r,i)||n(r,i)})}}),RG=So.define({create(){return Hu.empty},update(t,e){let n=e.state.facet(MG),r=e.annotation(dM);if(r){let l=Ya.fromTransaction(e,r.selection),u=r.side,c=u==0?t.undone:t.done;return l?c=FS(c,c.length,n.minDepth,l):c=DG(c,e.startState.selection),new Hu(u==0?r.rest:c,u==0?c:r.rest)}let i=e.annotation(YGe);if((i=="full"||i=="before")&&(t=t.isolate()),e.annotation(Zi.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let o=Ya.fromTransaction(e),a=e.annotation(Zi.time),s=e.annotation(Zi.userEvent);return o?t=t.addChanges(o,a,s,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,s,n.newGroupDelay)),(i=="full"||i=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Hu(t.done.map(Ya.fromJSON),t.undone.map(Ya.fromJSON))}});function ZGe(t={}){return[RG,MG.of(t),Ut.domEventHandlers({beforeinput(e,n){let r=e.inputType=="historyUndo"?$G:e.inputType=="historyRedo"?fM:null;return r?(e.preventDefault(),r(n)):!1}})]}function PC(t,e){return function({state:n,dispatch:r}){if(!e&&n.readOnly)return!1;let i=n.field(RG,!1);if(!i)return!1;let o=i.pop(t,n,e);return o?(r(o),!0):!1}}const $G=PC(0,!1),fM=PC(1,!1),GGe=PC(0,!0),KGe=PC(1,!0);class Ya{constructor(e,n,r,i,o){this.changes=e,this.effects=n,this.mapped=r,this.startSelection=i,this.selectionsAfter=o}setSelAfter(e){return new Ya(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,r;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(r=this.startSelection)===null||r===void 0?void 0:r.toJSON(),selectionsAfter:this.selectionsAfter.map(i=>i.toJSON())}}static fromJSON(e){return new Ya(e.changes&&oo.fromJSON(e.changes),[],e.mapped&&Xu.fromJSON(e.mapped),e.startSelection&&yt.fromJSON(e.startSelection),e.selectionsAfter.map(yt.fromJSON))}static fromTransaction(e,n){let r=sl;for(let i of e.startState.facet(XGe)){let o=i(e);o.length&&(r=r.concat(o))}return!r.length&&e.changes.empty?null:new Ya(e.changes.invert(e.startState.doc),r,void 0,n||e.startState.selection,sl)}static selection(e){return new Ya(void 0,sl,void 0,void 0,e)}}function FS(t,e,n,r){let i=e+1>n+20?e-n-1:0,o=t.slice(i,e);return o.push(r),o}function JGe(t,e){let n=[],r=!1;return t.iterChangedRanges((i,o)=>n.push(i,o)),e.iterChangedRanges((i,o,a,s)=>{for(let l=0;l=u&&a<=c&&(r=!0)}}),r}function eKe(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,r)=>n.empty!=e.ranges[r].empty).length===0}function NG(t,e){return t.length?e.length?t.concat(e):t:e}const sl=[],tKe=200;function DG(t,e){if(t.length){let n=t[t.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-tKe));return r.length&&r[r.length-1].eq(e)?t:(r.push(e),FS(t,t.length-1,1e9,n.setSelAfter(r)))}else return[Ya.selection([e])]}function nKe(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function T2(t,e){if(!t.length)return t;let n=t.length,r=sl;for(;n;){let i=rKe(t[n-1],e,r);if(i.changes&&!i.changes.empty||i.effects.length){let o=t.slice(0,n);return o[n-1]=i,o}else e=i.mapped,n--,r=i.selectionsAfter}return r.length?[Ya.selection(r)]:sl}function rKe(t,e,n){let r=NG(t.selectionsAfter.length?t.selectionsAfter.map(s=>s.map(e)):sl,n);if(!t.changes)return Ya.selection(r);let i=t.changes.map(e),o=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(o):o;return new Ya(i,Wn.mapEffects(t.effects,e),a,t.startSelection.map(o),r)}const iKe=/^(input\.type|delete)($|\.)/;class Hu{constructor(e,n,r=0,i=void 0){this.done=e,this.undone=n,this.prevTime=r,this.prevUserEvent=i}isolate(){return this.prevTime?new Hu(this.done,this.undone):this}addChanges(e,n,r,i,o){let a=this.done,s=a[a.length-1];return s&&s.changes&&!s.changes.empty&&e.changes&&(!r||iKe.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime0&&n-this.prevTimen.empty?t.moveByChar(n,e):AC(n,e))}function ca(t){return t.textDirectionAt(t.state.selection.main.head)==bi.LTR}const IG=t=>LG(t,!ca(t)),BG=t=>LG(t,ca(t));function FG(t,e){return vu(t,n=>n.empty?t.moveByGroup(n,e):AC(n,e))}const aKe=t=>FG(t,!ca(t)),sKe=t=>FG(t,ca(t));function lKe(t,e,n){if(e.type.prop(n))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function MC(t,e,n){let r=uo(t).resolveInner(e.head),i=n?hr.closedBy:hr.openedBy;for(let l=e.head;;){let u=n?r.childAfter(l):r.childBefore(l);if(!u)break;lKe(t,u,i)?r=u:l=n?u.to:u.from}let o=r.type.prop(i),a,s;return o&&(a=n?Qu(t,r.from,1):Qu(t,r.to,-1))&&a.matched?s=n?a.end.to:a.end.from:s=n?r.to:r.from,yt.cursor(s,n?-1:1)}const uKe=t=>vu(t,e=>MC(t.state,e,!ca(t))),cKe=t=>vu(t,e=>MC(t.state,e,ca(t)));function VG(t,e){return vu(t,n=>{if(!n.empty)return AC(n,e);let r=t.moveVertically(n,e);return r.head!=n.head?r:t.moveToLineBoundary(n,e)})}const jG=t=>VG(t,!1),zG=t=>VG(t,!0);function QG(t){let e=t.scrollDOM.clientHeighta.empty?t.moveVertically(a,e,n.height):AC(a,e));if(i.eq(r.selection))return!1;let o;if(n.selfScroll){let a=t.coordsAtPos(r.selection.main.head),s=t.scrollDOM.getBoundingClientRect(),l=s.top+n.marginTop,u=s.bottom-n.marginBottom;a&&a.top>l&&a.bottomHG(t,!1),hM=t=>HG(t,!0);function Wf(t,e,n){let r=t.lineBlockAt(e.head),i=t.moveToLineBoundary(e,n);if(i.head==e.head&&i.head!=(n?r.to:r.from)&&(i=t.moveToLineBoundary(e,n,!1)),!n&&i.head==r.from&&r.length){let o=/^\s*/.exec(t.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;o&&e.head!=r.from+o&&(i=yt.cursor(r.from+o))}return i}const dKe=t=>vu(t,e=>Wf(t,e,!0)),fKe=t=>vu(t,e=>Wf(t,e,!1)),hKe=t=>vu(t,e=>Wf(t,e,!ca(t))),pKe=t=>vu(t,e=>Wf(t,e,ca(t))),gKe=t=>vu(t,e=>yt.cursor(t.lineBlockAt(e.head).from,1)),mKe=t=>vu(t,e=>yt.cursor(t.lineBlockAt(e.head).to,-1));function vKe(t,e,n){let r=!1,i=iv(t.selection,o=>{let a=Qu(t,o.head,-1)||Qu(t,o.head,1)||o.head>0&&Qu(t,o.head-1,1)||o.headvKe(t,e,!1);function Al(t,e){let n=iv(t.state.selection,r=>{let i=e(r);return yt.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(vc(t.state,n)),!0)}function WG(t,e){return Al(t,n=>t.moveByChar(n,e))}const UG=t=>WG(t,!ca(t)),qG=t=>WG(t,ca(t));function YG(t,e){return Al(t,n=>t.moveByGroup(n,e))}const bKe=t=>YG(t,!ca(t)),_Ke=t=>YG(t,ca(t)),OKe=t=>Al(t,e=>MC(t.state,e,!ca(t))),wKe=t=>Al(t,e=>MC(t.state,e,ca(t)));function XG(t,e){return Al(t,n=>t.moveVertically(n,e))}const ZG=t=>XG(t,!1),GG=t=>XG(t,!0);function KG(t,e){return Al(t,n=>t.moveVertically(n,e,QG(t).height))}const qV=t=>KG(t,!1),YV=t=>KG(t,!0),SKe=t=>Al(t,e=>Wf(t,e,!0)),xKe=t=>Al(t,e=>Wf(t,e,!1)),CKe=t=>Al(t,e=>Wf(t,e,!ca(t))),EKe=t=>Al(t,e=>Wf(t,e,ca(t))),TKe=t=>Al(t,e=>yt.cursor(t.lineBlockAt(e.head).from)),kKe=t=>Al(t,e=>yt.cursor(t.lineBlockAt(e.head).to)),XV=({state:t,dispatch:e})=>(e(vc(t,{anchor:0})),!0),ZV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.doc.length})),!0),GV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.selection.main.anchor,head:0})),!0),KV=({state:t,dispatch:e})=>(e(vc(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),PKe=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),AKe=({state:t,dispatch:e})=>{let n=RC(t).map(({from:r,to:i})=>yt.range(r,Math.min(i+1,t.doc.length)));return e(t.update({selection:yt.create(n),userEvent:"select"})),!0},MKe=({state:t,dispatch:e})=>{let n=iv(t.selection,r=>{let i=uo(t),o=i.resolveStack(r.from,1);if(r.empty){let a=i.resolveStack(r.from,-1);a.node.from>=o.node.from&&a.node.to<=o.node.to&&(o=a)}for(let a=o;a;a=a.next){let{node:s}=a;if((s.from=r.to||s.to>r.to&&s.from<=r.from)&&a.next)return yt.range(s.to,s.from)}return r});return n.eq(t.selection)?!1:(e(vc(t,n)),!0)},RKe=({state:t,dispatch:e})=>{let n=t.selection,r=null;return n.ranges.length>1?r=yt.create([n.main]):n.main.empty||(r=yt.create([yt.cursor(n.main.head)])),r?(e(vc(t,r)),!0):!1};function Zb(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:r}=t,i=r.changeByRange(o=>{let{from:a,to:s}=o;if(a==s){let l=e(o);la&&(n="delete.forward",l=r1(t,l,!0)),a=Math.min(a,l),s=Math.max(s,l)}else a=r1(t,a,!1),s=r1(t,s,!0);return a==s?{range:o}:{changes:{from:a,to:s},range:yt.cursor(a,ai(t)))r.between(e,e,(i,o)=>{ie&&(e=n?o:i)});return e}const JG=(t,e,n)=>Zb(t,r=>{let i=r.from,{state:o}=t,a=o.doc.lineAt(i),s,l;if(n&&!e&&i>a.from&&iJG(t,!1,!0),eK=t=>JG(t,!0,!1),tK=(t,e)=>Zb(t,n=>{let r=n.head,{state:i}=t,o=i.doc.lineAt(r),a=i.charCategorizer(r);for(let s=null;;){if(r==(e?o.to:o.from)){r==n.head&&o.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let l=Io(o.text,r-o.from,e)+o.from,u=o.text.slice(Math.min(r,l)-o.from,Math.max(r,l)-o.from),c=a(u);if(s!=null&&c!=s)break;(u!=" "||r!=n.head)&&(s=c),r=l}return r}),nK=t=>tK(t,!1),$Ke=t=>tK(t,!0),NKe=t=>Zb(t,e=>{let n=t.lineBlockAt(e.head).to;return e.headZb(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),LKe=t=>Zb(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head{if(t.readOnly)return!1;let n=t.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Mr.of(["",""])},range:yt.cursor(r.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},BKe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(r=>{if(!r.empty||r.from==0||r.from==t.doc.length)return{range:r};let i=r.from,o=t.doc.lineAt(i),a=i==o.from?i-1:Io(o.text,i-o.from,!1)+o.from,s=i==o.to?i+1:Io(o.text,i-o.from,!0)+o.from;return{changes:{from:a,to:s,insert:t.doc.slice(i,s).append(t.doc.slice(a,i))},range:yt.cursor(s)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function RC(t){let e=[],n=-1;for(let r of t.selection.ranges){let i=t.doc.lineAt(r.from),o=t.doc.lineAt(r.to);if(!r.empty&&r.to==o.from&&(o=t.doc.lineAt(r.to-1)),n>=i.number){let a=e[e.length-1];a.to=o.to,a.ranges.push(r)}else e.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return e}function rK(t,e,n){if(t.readOnly)return!1;let r=[],i=[];for(let o of RC(t)){if(n?o.to==t.doc.length:o.from==0)continue;let a=t.doc.lineAt(n?o.to+1:o.from-1),s=a.length+1;if(n){r.push({from:o.to,to:a.to},{from:o.from,insert:a.text+t.lineBreak});for(let l of o.ranges)i.push(yt.range(Math.min(t.doc.length,l.anchor+s),Math.min(t.doc.length,l.head+s)))}else{r.push({from:a.from,to:o.from},{from:o.to,insert:t.lineBreak+a.text});for(let l of o.ranges)i.push(yt.range(l.anchor-s,l.head-s))}}return r.length?(e(t.update({changes:r,scrollIntoView:!0,selection:yt.create(i,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const FKe=({state:t,dispatch:e})=>rK(t,e,!1),VKe=({state:t,dispatch:e})=>rK(t,e,!0);function iK(t,e,n){if(t.readOnly)return!1;let r=[];for(let i of RC(t))n?r.push({from:i.from,insert:t.doc.slice(i.from,i.to)+t.lineBreak}):r.push({from:i.to,insert:t.lineBreak+t.doc.slice(i.from,i.to)});return e(t.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const jKe=({state:t,dispatch:e})=>iK(t,e,!1),zKe=({state:t,dispatch:e})=>iK(t,e,!0),QKe=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(RC(e).map(({from:i,to:o})=>(i>0?i--:o{let o;if(t.lineWrapping){let a=t.lineBlockAt(i.head),s=t.coordsAtPos(i.head,i.assoc||1);s&&(o=a.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(i,!0,o)}).map(n);return t.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function HKe(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=uo(t).resolveInner(e),r=n.childBefore(e),i=n.childAfter(e),o;return r&&i&&r.to<=e&&i.from>=e&&(o=r.type.prop(hr.closedBy))&&o.indexOf(i.name)>-1&&t.doc.lineAt(r.to).from==t.doc.lineAt(i.from).from&&!/\S/.test(t.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const JV=oK(!1),WKe=oK(!0);function oK(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:o,to:a}=i,s=e.doc.lineAt(o),l=!t&&o==a&&HKe(e,o);t&&(o=a=(a<=s.to?s:e.doc.lineAt(a)).to);let u=new EC(e,{simulateBreak:o,simulateDoubleBreak:!!l}),c=_D(u,o);for(c==null&&(c=rv(/^\s*/.exec(e.doc.lineAt(o).text)[0],e.tabSize));as.from&&o{let i=[];for(let a=r.from;a<=r.to;){let s=t.doc.lineAt(a);s.number>n&&(r.empty||r.to>s.from)&&(e(s,i,r),n=s.number),a=s.to+1}let o=t.changes(i);return{changes:i,range:yt.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const UKe=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),r=new EC(t,{overrideIndentation:o=>{let a=n[o];return a==null?-1:a}}),i=TD(t,(o,a,s)=>{let l=_D(r,o.from);if(l==null)return;/\S/.test(o.text)||(l=0);let u=/^\s*/.exec(o.text)[0],c=K0(t,l);(u!=c||s.fromt.readOnly?!1:(e(t.update(TD(t,(n,r)=>{r.push({from:n.from,insert:t.facet(Yb)})}),{userEvent:"input.indent"})),!0),sK=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(TD(t,(n,r)=>{let i=/^\s*/.exec(n.text)[0];if(!i)return;let o=rv(i,t.tabSize),a=0,s=K0(t,Math.max(0,o-LS(t)));for(;a(t.setTabFocusMode(),!0),YKe=[{key:"Ctrl-b",run:IG,shift:UG,preventDefault:!0},{key:"Ctrl-f",run:BG,shift:qG},{key:"Ctrl-p",run:jG,shift:ZG},{key:"Ctrl-n",run:zG,shift:GG},{key:"Ctrl-a",run:gKe,shift:TKe},{key:"Ctrl-e",run:mKe,shift:kKe},{key:"Ctrl-d",run:eK},{key:"Ctrl-h",run:pM},{key:"Ctrl-k",run:NKe},{key:"Ctrl-Alt-h",run:nK},{key:"Ctrl-o",run:IKe},{key:"Ctrl-t",run:BKe},{key:"Ctrl-v",run:hM}],XKe=[{key:"ArrowLeft",run:IG,shift:UG,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:aKe,shift:bKe,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:hKe,shift:CKe,preventDefault:!0},{key:"ArrowRight",run:BG,shift:qG,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:sKe,shift:_Ke,preventDefault:!0},{mac:"Cmd-ArrowRight",run:pKe,shift:EKe,preventDefault:!0},{key:"ArrowUp",run:jG,shift:ZG,preventDefault:!0},{mac:"Cmd-ArrowUp",run:XV,shift:GV},{mac:"Ctrl-ArrowUp",run:UV,shift:qV},{key:"ArrowDown",run:zG,shift:GG,preventDefault:!0},{mac:"Cmd-ArrowDown",run:ZV,shift:KV},{mac:"Ctrl-ArrowDown",run:hM,shift:YV},{key:"PageUp",run:UV,shift:qV},{key:"PageDown",run:hM,shift:YV},{key:"Home",run:fKe,shift:xKe,preventDefault:!0},{key:"Mod-Home",run:XV,shift:GV},{key:"End",run:dKe,shift:SKe,preventDefault:!0},{key:"Mod-End",run:ZV,shift:KV},{key:"Enter",run:JV,shift:JV},{key:"Mod-a",run:PKe},{key:"Backspace",run:pM,shift:pM},{key:"Delete",run:eK},{key:"Mod-Backspace",mac:"Alt-Backspace",run:nK},{key:"Mod-Delete",mac:"Alt-Delete",run:$Ke},{mac:"Mod-Backspace",run:DKe},{mac:"Mod-Delete",run:LKe}].concat(YKe.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),ZKe=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:uKe,shift:OKe},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:cKe,shift:wKe},{key:"Alt-ArrowUp",run:FKe},{key:"Shift-Alt-ArrowUp",run:jKe},{key:"Alt-ArrowDown",run:VKe},{key:"Shift-Alt-ArrowDown",run:zKe},{key:"Escape",run:RKe},{key:"Mod-Enter",run:WKe},{key:"Alt-l",mac:"Ctrl-l",run:AKe},{key:"Mod-i",run:MKe,preventDefault:!0},{key:"Mod-[",run:sK},{key:"Mod-]",run:aK},{key:"Mod-Alt-\\",run:UKe},{key:"Shift-Mod-k",run:QKe},{key:"Shift-Mod-\\",run:yKe},{key:"Mod-/",run:jGe},{key:"Alt-A",run:QGe},{key:"Ctrl-m",mac:"Shift-Alt-m",run:qKe}].concat(XKe),GKe={key:"Tab",run:aK,shift:sK};function ci(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];typeof i=="string"?t.setAttribute(r,i):i!=null&&(t[r]=i)}e++}for(;et.normalize("NFKD"):t=>t;class Tm{constructor(e,n,r=0,i=e.length,o,a){this.test=a,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=o?s=>o(ej(s)):ej,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return za(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=JN(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=Bu(e);let i=this.normalize(n);for(let o=0,a=r;;o++){let s=i.charCodeAt(o),l=this.match(s,a,this.bufferPos+this.bufferStart);if(o==i.length-1){if(l)return this.value=l,this;break}a==r&&othis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let r=this.curLineStart+n.index,i=r+n[0].length;if(this.matchPos=VS(this.text,i+(r==i?1:0)),r==this.curLineStart+this.curLine.length&&this.nextLine(),(rthis.value.to)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length=r||i.to<=n){let s=new Bg(n,e.sliceString(n,r));return k2.set(e,s),s}if(i.from==n&&i.to==r)return i;let{text:o,from:a}=i;return a>n&&(o=e.sliceString(n,a)+o,a=n),i.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let r=this.flat.from+n.index,i=r+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(r,i,n)))return this.value={from:r,to:i,match:n},this.matchPos=VS(this.text,i+(r==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Bg.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol!="undefined"&&(cK.prototype[Symbol.iterator]=dK.prototype[Symbol.iterator]=function(){return this});function KKe(t){try{return new RegExp(t,kD),!0}catch{return!1}}function VS(t,e){if(e>=t.length)return e;let n=t.lineAt(e),r;for(;e=56320&&r<57344;)e++;return e}function gM(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=ci("input",{class:"cm-textfield",name:"line",value:e}),r=ci("form",{class:"cm-gotoLine",onkeydown:o=>{o.keyCode==27?(o.preventDefault(),t.dispatch({effects:jS.of(!1)}),t.focus()):o.keyCode==13&&(o.preventDefault(),i())},onsubmit:o=>{o.preventDefault(),i()}},ci("label",t.state.phrase("Go to line"),": ",n)," ",ci("button",{class:"cm-button",type:"submit"},t.state.phrase("go")));function i(){let o=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!o)return;let{state:a}=t,s=a.doc.lineAt(a.selection.main.head),[,l,u,c,d]=o,f=c?+c.slice(1):0,h=u?+u:s.number;if(u&&d){let y=h/100;l&&(y=y*(l=="-"?-1:1)+s.number/a.doc.lines),h=Math.round(a.doc.lines*y)}else u&&l&&(h=h*(l=="-"?-1:1)+s.number);let m=a.doc.line(Math.max(1,Math.min(a.doc.lines,h))),g=yt.cursor(m.from+Math.max(0,Math.min(f,m.length)));t.dispatch({effects:[jS.of(!1),Ut.scrollIntoView(g.from,{y:"center"})],selection:g}),t.focus()}return{dom:r}}const jS=Wn.define(),tj=So.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(jS)&&(t=n.value);return t},provide:t=>X0.from(t,e=>e?gM:null)}),JKe=t=>{let e=Y0(t,gM);if(!e){let n=[jS.of(!0)];t.state.field(tj,!1)==null&&n.push(Wn.appendConfig.of([tj,eJe])),t.dispatch({effects:n}),e=Y0(t,gM)}return e&&e.dom.querySelector("input").select(),!0},eJe=Ut.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),tJe={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},fK=Xt.define({combine(t){return gc(t,tJe,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function nJe(t){let e=[sJe,aJe];return t&&e.push(fK.of(t)),e}const rJe=yn.mark({class:"cm-selectionMatch"}),iJe=yn.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function nj(t,e,n,r){return(n==0||t(e.sliceDoc(n-1,n))!=xi.Word)&&(r==e.doc.length||t(e.sliceDoc(r,r+1))!=xi.Word)}function oJe(t,e,n,r){return t(e.sliceDoc(n,n+1))==xi.Word&&t(e.sliceDoc(r-1,r))==xi.Word}const aJe=qi.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(fK),{state:n}=t,r=n.selection;if(r.ranges.length>1)return yn.none;let i=r.main,o,a=null;if(i.empty){if(!e.highlightWordAroundCursor)return yn.none;let l=n.wordAt(i.head);if(!l)return yn.none;a=n.charCategorizer(i.head),o=n.sliceDoc(l.from,l.to)}else{let l=i.to-i.from;if(l200)return yn.none;if(e.wholeWords){if(o=n.sliceDoc(i.from,i.to),a=n.charCategorizer(i.head),!(nj(a,n,i.from,i.to)&&oJe(a,n,i.from,i.to)))return yn.none}else if(o=n.sliceDoc(i.from,i.to),!o)return yn.none}let s=[];for(let l of t.visibleRanges){let u=new Tm(n.doc,o,l.from,l.to);for(;!u.next().done;){let{from:c,to:d}=u.value;if((!a||nj(a,n,c,d))&&(i.empty&&c<=i.from&&d>=i.to?s.push(iJe.range(c,d)):(c>=i.to||d<=i.from)&&s.push(rJe.range(c,d)),s.length>e.maxMatches))return yn.none}}return yn.set(s)}},{decorations:t=>t.decorations}),sJe=Ut.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),lJe=({state:t,dispatch:e})=>{let{selection:n}=t,r=yt.create(n.ranges.map(i=>t.wordAt(i.head)||yt.cursor(i.head)),n.mainIndex);return r.eq(n)?!1:(e(t.update({selection:r})),!0)};function uJe(t,e){let{main:n,ranges:r}=t.selection,i=t.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let a=!1,s=new Tm(t.doc,e,r[r.length-1].to);;)if(s.next(),s.done){if(a)return null;s=new Tm(t.doc,e,0,Math.max(0,r[r.length-1].from-1)),a=!0}else{if(a&&r.some(l=>l.from==s.value.from))continue;if(o){let l=t.wordAt(s.value.from);if(!l||l.from!=s.value.from||l.to!=s.value.to)continue}return s.value}}const cJe=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(o=>o.from===o.to))return lJe({state:t,dispatch:e});let r=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(o=>t.sliceDoc(o.from,o.to)!=r))return!1;let i=uJe(t,r);return i?(e(t.update({selection:t.selection.addRange(yt.range(i.from,i.to),!1),effects:Ut.scrollIntoView(i.to)})),!0):!1},ov=Xt.define({combine(t){return gc(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new wJe(e),scrollToMatch:e=>Ut.scrollIntoView(e)})}});class hK{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||KKe(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,r)=>r=="n"?` `:r=="r"?"\r":r=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new pJe(this):new fJe(this)}getCursor(e,n=0,r){let i=e.doc?e:vr.create({doc:e});return r==null&&(r=i.doc.length),this.regexp?dg(this,i,n,r):cg(this,i,n,r)}}class pK{constructor(e){this.spec=e}}function cg(t,e,n,r){return new Tm(e.doc,t.unquoted,n,r,t.caseSensitive?void 0:i=>i.toLowerCase(),t.wholeWord?dJe(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function dJe(t,e){return(n,r,i,o)=>((o>n||o+i.length=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=cg(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(r+this.spec.unquoted.length,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}function dg(t,e,n,r){return new cK(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?hJe(e.charCategorizer(e.selection.main.head)):void 0},n,r)}function zS(t,e){return t.slice(Io(t,e,!1),e)}function QS(t,e){return t.slice(e,Io(t,e))}function hJe(t){return(e,n,r)=>!r[0].length||(t(zS(r.input,r.index))!=xi.Word||t(QS(r.input,r.index))!=xi.Word)&&(t(QS(r.input,r.index+r[0].length))!=xi.Word||t(zS(r.input,r.index+r[0].length))!=xi.Word)}class pJe extends pK{nextMatch(e,n,r){let i=dg(this.spec,e,r,e.doc.length).next();return i.done&&(i=dg(this.spec,e,0,n).next()),i.done?null:i.value}prevMatchInRange(e,n,r){for(let i=1;;i++){let o=Math.max(n,r-i*1e4),a=dg(this.spec,e,o,r),s=null;for(;!a.next().done;)s=a.value;if(s&&(o==n||s.from>o+10))return s;if(o==n)return null}}prevMatch(e,n,r){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,r,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,(n,r)=>r=="$"?"$":r=="&"?e.match[0]:r!="0"&&+r=n)return null;i.push(r.value)}return i}highlight(e,n,r,i){let o=dg(this.spec,e,Math.max(0,n-250),Math.min(r+250,e.doc.length));for(;!o.next().done;)i(o.value.from,o.value.to)}}const J0=Wn.define(),PD=Wn.define(),rf=So.define({create(t){return new P2(mM(t).create(),null)},update(t,e){for(let n of e.effects)n.is(J0)?t=new P2(n.value.create(),t.panel):n.is(PD)&&(t=new P2(t.query,n.value?AD:null));return t},provide:t=>X0.from(t,e=>e.panel)});class P2{constructor(e,n){this.query=e,this.panel=n}}const gJe=yn.mark({class:"cm-searchMatch"}),mJe=yn.mark({class:"cm-searchMatch cm-searchMatch-selected"}),vJe=qi.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(rf))}update(t){let e=t.state.field(rf);(e!=t.startState.field(rf)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return yn.none;let{view:n}=this,r=new Sf;for(let i=0,o=n.visibleRanges,a=o.length;io[i+1].from-2*250;)l=o[++i].to;t.highlight(n.state,s,l,(u,c)=>{let d=n.state.selection.ranges.some(f=>f.from==u&&f.to==c);r.add(u,c,d?mJe:gJe)})}return r.finish()}},{decorations:t=>t.decorations});function Gb(t){return e=>{let n=e.state.field(rf,!1);return n&&n.query.spec.valid?t(e,n):vK(e)}}const HS=Gb((t,{query:e})=>{let{to:n}=t.state.selection.main,r=e.nextMatch(t.state,n,n);if(!r)return!1;let i=yt.single(r.from,r.to),o=t.state.facet(ov);return t.dispatch({selection:i,effects:[MD(t,r),o.scrollToMatch(i.main,t)],userEvent:"select.search"}),mK(t),!0}),WS=Gb((t,{query:e})=>{let{state:n}=t,{from:r}=n.selection.main,i=e.prevMatch(n,r,r);if(!i)return!1;let o=yt.single(i.from,i.to),a=t.state.facet(ov);return t.dispatch({selection:o,effects:[MD(t,i),a.scrollToMatch(o.main,t)],userEvent:"select.search"}),mK(t),!0}),yJe=Gb((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:yt.create(n.map(r=>yt.range(r.from,r.to))),userEvent:"select.search.matches"}),!0)}),bJe=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],a=0;for(let s=new Tm(t.doc,t.sliceDoc(r,i));!s.next().done;){if(o.length>1e3)return!1;s.value.from==r&&(a=o.length),o.push(yt.range(s.value.from,s.value.to))}return e(t.update({selection:yt.create(o,a),userEvent:"select.search.matches"})),!0},rj=Gb((t,{query:e})=>{let{state:n}=t,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=e.nextMatch(n,r,r);if(!o)return!1;let a=[],s,l,u=[];if(o.from==r&&o.to==i&&(l=n.toText(e.getReplacement(o)),a.push({from:o.from,to:o.to,insert:l}),o=e.nextMatch(n,o.from,o.to),u.push(Ut.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let c=a.length==0||a[0].from>=o.to?0:o.to-o.from-l.length;s=yt.single(o.from-c,o.to-c),u.push(MD(t,o)),u.push(n.facet(ov).scrollToMatch(s.main,t))}return t.dispatch({changes:a,selection:s,effects:u,userEvent:"input.replace"}),!0}),_Je=Gb((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(i=>{let{from:o,to:a}=i;return{from:o,to:a,insert:e.getReplacement(i)}});if(!n.length)return!1;let r=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Ut.announce.of(r),userEvent:"input.replace.all"}),!0});function AD(t){return t.state.facet(ov).createPanel(t)}function mM(t,e){var n,r,i,o,a;let s=t.selection.main,l=s.empty||s.to>s.from+100?"":t.sliceDoc(s.from,s.to);if(e&&!l)return e;let u=t.facet(ov);return new hK({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:u.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(r=e==null?void 0:e.caseSensitive)!==null&&r!==void 0?r:u.caseSensitive,literal:(i=e==null?void 0:e.literal)!==null&&i!==void 0?i:u.literal,regexp:(o=e==null?void 0:e.regexp)!==null&&o!==void 0?o:u.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:u.wholeWord})}function gK(t){let e=Y0(t,AD);return e&&e.dom.querySelector("[main-field]")}function mK(t){let e=gK(t);e&&e==t.root.activeElement&&e.select()}const vK=t=>{let e=t.state.field(rf,!1);if(e&&e.panel){let n=gK(t);if(n&&n!=t.root.activeElement){let r=mM(t.state,e.query.spec);r.valid&&t.dispatch({effects:J0.of(r)}),n.focus(),n.select()}}else t.dispatch({effects:[PD.of(!0),e?J0.of(mM(t.state,e.query.spec)):Wn.appendConfig.of(xJe)]});return!0},yK=t=>{let e=t.state.field(rf,!1);if(!e||!e.panel)return!1;let n=Y0(t,AD);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:PD.of(!1)}),!0},OJe=[{key:"Mod-f",run:vK,scope:"editor search-panel"},{key:"F3",run:HS,shift:WS,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:HS,shift:WS,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:yK,scope:"editor search-panel"},{key:"Mod-Shift-l",run:bJe},{key:"Mod-Alt-g",run:JKe},{key:"Mod-d",run:cJe,preventDefault:!0}];class wJe{constructor(e){this.view=e;let n=this.query=e.state.field(rf).query.spec;this.commit=this.commit.bind(this),this.searchField=ci("input",{value:n.search,placeholder:ys(e,"Find"),"aria-label":ys(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=ci("input",{value:n.replace,placeholder:ys(e,"Replace"),"aria-label":ys(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=ci("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=ci("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=ci("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function r(i,o,a){return ci("button",{class:"cm-button",name:i,onclick:o,type:"button"},a)}this.dom=ci("div",{onkeydown:i=>this.keydown(i),class:"cm-search"},[this.searchField,r("next",()=>HS(e),[ys(e,"next")]),r("prev",()=>WS(e),[ys(e,"previous")]),r("select",()=>yJe(e),[ys(e,"all")]),ci("label",null,[this.caseField,ys(e,"match case")]),ci("label",null,[this.reField,ys(e,"regexp")]),ci("label",null,[this.wordField,ys(e,"by word")]),...e.state.readOnly?[]:[ci("br"),this.replaceField,r("replace",()=>rj(e),[ys(e,"replace")]),r("replaceAll",()=>_Je(e),[ys(e,"replace all")])],ci("button",{name:"close",onclick:()=>yK(e),"aria-label":ys(e,"close"),type:"button"},["\xD7"])])}commit(){let e=new hK({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:J0.of(e)}))}keydown(e){RXe(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?WS:HS)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),rj(this.view))}update(e){for(let n of e.transactions)for(let r of n.effects)r.is(J0)&&!r.value.eq(this.query)&&this.setQuery(r.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(ov).top}}function ys(t,e){return t.state.phrase(e)}const i1=30,o1=/[\s\.,:;?!]/;function MD(t,{from:e,to:n}){let r=t.state.doc.lineAt(e),i=t.state.doc.lineAt(n).to,o=Math.max(r.from,e-i1),a=Math.min(i,n+i1),s=t.state.sliceDoc(o,a);if(o!=r.from){for(let l=0;ls.length-i1;l--)if(!o1.test(s[l-1])&&o1.test(s[l])){s=s.slice(0,l);break}}return Ut.announce.of(`${t.state.phrase("current match")}. ${s} ${t.state.phrase("on line")} ${r.number}.`)}const SJe=Ut.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),xJe=[rf,Hf.low(vJe),SJe];class bK{constructor(e,n,r,i){this.state=e,this.pos=n,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=uo(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),r=Math.max(n.from,this.pos-250),i=n.text.slice(r-n.from,this.pos-n.from),o=i.search(OK(e,!1));return o<0?null:{from:r+o,to:this.pos,text:i.slice(o)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function ij(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function CJe(t){let e=Object.create(null),n=Object.create(null);for(let{label:i}of t){e[i[0]]=!0;for(let o=1;otypeof i=="string"?{label:i}:i),[n,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:CJe(e);return i=>{let o=i.matchBefore(r);return o||i.explicit?{from:o?o.from:i.pos,options:e,validFor:n}:null}}function EJe(t,e){return n=>{for(let r=uo(n.state).resolveInner(n.pos,-1);r;r=r.parent){if(t.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(n)}}class oj{constructor(e,n,r,i){this.completion=e,this.source=n,this.match=r,this.score=i}}function of(t){return t.selection.main.from}function OK(t,e){var n;let{source:r}=t,i=e&&r[0]!="^",o=r[r.length-1]!="$";return!i&&!o?t:new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const RD=cd.define();function TJe(t,e,n,r){let{main:i}=t.selection,o=n-i.from,a=r-i.from;return Object.assign(Object.assign({},t.changeByRange(s=>{if(s!=i&&n!=r&&t.sliceDoc(s.from+o,s.from+a)!=t.sliceDoc(n,r))return{range:s};let l=t.toText(e);return{changes:{from:s.from+o,to:r==i.from?s.to:s.from+a,insert:l},range:yt.cursor(s.from+o+l.length)}})),{scrollIntoView:!0,userEvent:"input.complete"})}const aj=new WeakMap;function kJe(t){if(!Array.isArray(t))return t;let e=aj.get(t);return e||aj.set(t,e=_K(t)),e}const US=Wn.define(),eb=Wn.define();class PJe{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n=48&&x<=57||x>=97&&x<=122?2:x>=65&&x<=90?1:0:(C=JN(x))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!w||E==1&&y||S==0&&E!=0)&&(n[d]==x||r[d]==x&&(f=!0)?a[d++]=w:a.length&&(b=!1)),S=E,w+=Bu(x)}return d==l&&a[0]==0&&b?this.result(-100+(f?-200:0),a,e):h==l&&m==0?this.ret(-200-e.length+(g==e.length?0:-100),[0,g]):s>-1?this.ret(-700-e.length,[s,s+this.pattern.length]):h==l?this.ret(-200+-700-e.length,[m,g]):d==l?this.result(-100+(f?-200:0)+-700+(b?0:-1100),a,e):n.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,n,r){let i=[],o=0;for(let a of n){let s=a+(this.astral?Bu(za(r,a)):1);o&&i[o-1]==a?i[o-1]=s:(i[o++]=a,i[o++]=s)}return this.ret(e-r.length,i)}}class AJe{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:MJe,filterStrict:!1,compareCompletions:(e,n)=>e.label.localeCompare(n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>r=>sj(e(r),n(r)),optionClass:(e,n)=>r=>sj(e(r),n(r)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function sj(t,e){return t?e?t+" "+e:t:e}function MJe(t,e,n,r,i,o){let a=t.textDirection==bi.RTL,s=a,l=!1,u="top",c,d,f=e.left-i.left,h=i.right-e.right,m=r.right-r.left,g=r.bottom-r.top;if(s&&f=g||w>e.top?c=n.bottom-e.top:(u="bottom",c=e.bottom-n.top)}let y=(e.bottom-e.top)/o.offsetHeight,b=(e.right-e.left)/o.offsetWidth;return{style:`${u}: ${c/y}px; max-width: ${d/b}px`,class:"cm-completionInfo-"+(l?a?"left-narrow":"right-narrow":s?"left":"right")}}function RJe(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let r=document.createElement("div");return r.classList.add("cm-completionIcon"),n.type&&r.classList.add(...n.type.split(/\s+/g).map(i=>"cm-completionIcon-"+i)),r.setAttribute("aria-hidden","true"),r},position:20}),e.push({render(n,r,i,o){let a=document.createElement("span");a.className="cm-completionLabel";let s=n.displayLabel||n.label,l=0;for(let u=0;ul&&a.appendChild(document.createTextNode(s.slice(l,c)));let f=a.appendChild(document.createElement("span"));f.appendChild(document.createTextNode(s.slice(c,d))),f.className="cm-completionMatchedText",l=d}return ln.position-r.position).map(n=>n.render)}function A2(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let i=Math.floor(e/n);return{from:i*n,to:(i+1)*n}}let r=Math.floor((t-e)/n);return{from:t-(r+1)*n,to:t-r*n}}class $Je{constructor(e,n,r){this.view=e,this.stateField=n,this.applyCompletion=r,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:l=>this.placeInfo(l),key:this},this.space=null,this.currentClass="";let i=e.state.field(n),{options:o,selected:a}=i.open,s=e.state.facet(Do);this.optionContent=RJe(s),this.optionClass=s.optionClass,this.tooltipClass=s.tooltipClass,this.range=A2(o.length,a,s.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",l=>{let{options:u}=e.state.field(n).open;for(let c=l.target,d;c&&c!=this.dom;c=c.parentNode)if(c.nodeName=="LI"&&(d=/-(\d+)$/.exec(c.id))&&+d[1]{let u=e.state.field(this.stateField,!1);u&&u.tooltip&&e.state.facet(Do).closeOnBlur&&l.relatedTarget!=e.contentDOM&&e.dispatch({effects:eb.of(null)})}),this.showOptions(o,i.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let r=e.state.field(this.stateField),i=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),r!=i){let{options:o,selected:a,disabled:s}=r.open;(!i.open||i.open.options!=o)&&(this.range=A2(o.length,a,e.state.facet(Do).maxRenderedOptions),this.showOptions(o,r.id)),this.updateSel(),s!=((n=i.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!s)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let r of this.currentClass.split(" "))r&&this.dom.classList.remove(r);for(let r of n.split(" "))r&&this.dom.classList.add(r);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;if((n.selected>-1&&n.selected=this.range.to)&&(this.range=A2(n.options.length,n.selected,this.view.state.facet(Do).maxRenderedOptions),this.showOptions(n.options,e.id)),this.updateSelectedOption(n.selected)){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:i}=r;if(!i)return;let o=typeof i=="string"?document.createTextNode(i):i(r);if(!o)return;"then"in o?o.then(a=>{a&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(a,r)}).catch(a=>qa(this.view.state,a,"completion info")):this.addInfoPane(o,r)}}addInfoPane(e,n){this.destroyInfo();let r=this.info=document.createElement("div");if(r.className="cm-tooltip cm-completionInfo",e.nodeType!=null)r.appendChild(e),this.infoDestroy=null;else{let{dom:i,destroy:o}=e;r.appendChild(i),this.infoDestroy=o||null}this.dom.appendChild(r),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let r=this.list.firstChild,i=this.range.from;r;r=r.nextSibling,i++)r.nodeName!="LI"||!r.id?i--:i==e?r.hasAttribute("aria-selected")||(r.setAttribute("aria-selected","true"),n=r):r.hasAttribute("aria-selected")&&r.removeAttribute("aria-selected");return n&&DJe(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),r=this.info.getBoundingClientRect(),i=e.getBoundingClientRect(),o=this.space;if(!o){let a=this.dom.ownerDocument.defaultView||window;o={left:0,top:0,right:a.innerWidth,bottom:a.innerHeight}}return i.top>Math.min(o.bottom,n.bottom)-10||i.bottomr.from||r.from==0))if(o=f,typeof u!="string"&&u.header)i.appendChild(u.header(u));else{let h=i.appendChild(document.createElement("completion-section"));h.textContent=f}}const c=i.appendChild(document.createElement("li"));c.id=n+"-"+a,c.setAttribute("role","option");let d=this.optionClass(s);d&&(c.className=d);for(let f of this.optionContent){let h=f(s,this.view.state,this.view,l);h&&c.appendChild(h)}}return r.from&&i.classList.add("cm-completionListIncompleteTop"),r.tonew $Je(n,t,e)}function DJe(t,e){let n=t.getBoundingClientRect(),r=e.getBoundingClientRect(),i=n.height/t.offsetHeight;r.topn.bottom&&(t.scrollTop+=(r.bottom-n.bottom)/i)}function lj(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function LJe(t,e){let n=[],r=null,i=u=>{n.push(u);let{section:c}=u.completion;if(c){r||(r=[]);let d=typeof c=="string"?c:c.name;r.some(f=>f.name==d)||r.push(typeof c=="string"?{name:d}:c)}},o=e.facet(Do);for(let u of t)if(u.hasResult()){let c=u.result.getMatch;if(u.result.filter===!1)for(let d of u.result.options)i(new oj(d,u.source,c?c(d):[],1e9-n.length));else{let d=e.sliceDoc(u.from,u.to),f,h=o.filterStrict?new AJe(d):new PJe(d);for(let m of u.result.options)if(f=h.match(m.label)){let g=m.displayLabel?c?c(m,f.matched):[]:f.matched;i(new oj(m,u.source,g,f.score+(m.boost||0)))}}}if(r){let u=Object.create(null),c=0,d=(f,h)=>{var m,g;return((m=f.rank)!==null&&m!==void 0?m:1e9)-((g=h.rank)!==null&&g!==void 0?g:1e9)||(f.named.score-c.score||l(c.completion,d.completion))){let c=u.completion;!s||s.label!=c.label||s.detail!=c.detail||s.type!=null&&c.type!=null&&s.type!=c.type||s.apply!=c.apply||s.boost!=c.boost?a.push(u):lj(u.completion)>lj(s)&&(a[a.length-1]=u),s=u.completion}return a}class wg{constructor(e,n,r,i,o,a){this.options=e,this.attrs=n,this.tooltip=r,this.timestamp=i,this.selected=o,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new wg(this.options,uj(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,r,i,o){let a=LJe(e,n);if(!a.length)return i&&e.some(l=>l.state==1)?new wg(i.options,i.attrs,i.tooltip,i.timestamp,i.selected,!0):null;let s=n.facet(Do).selectOnOpen?0:-1;if(i&&i.selected!=s&&i.selected!=-1){let l=i.options[i.selected].completion;for(let u=0;uu.hasResult()?Math.min(l,u.from):l,1e8),create:zJe,above:o.aboveCursor},i?i.timestamp:Date.now(),s,!1)}map(e){return new wg(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class qS{constructor(e,n,r){this.active=e,this.id=n,this.open=r}static start(){return new qS(VJe,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,r=n.facet(Do),o=(r.override||n.languageDataAt("autocomplete",of(n)).map(kJe)).map(s=>(this.active.find(u=>u.source==s)||new Cs(s,this.active.some(u=>u.state!=0)?1:0)).update(e,r));o.length==this.active.length&&o.every((s,l)=>s==this.active[l])&&(o=this.active);let a=this.open;a&&e.docChanged&&(a=a.map(e.changes)),e.selection||o.some(s=>s.hasResult()&&e.changes.touchesRange(s.from,s.to))||!IJe(o,this.active)?a=wg.build(o,n,this.id,a,r):a&&a.disabled&&!o.some(s=>s.state==1)&&(a=null),!a&&o.every(s=>s.state!=1)&&o.some(s=>s.hasResult())&&(o=o.map(s=>s.hasResult()?new Cs(s.source,0):s));for(let s of e.effects)s.is(xK)&&(a=a&&a.setSelected(s.value,this.id));return o==this.active&&a==this.open?this:new qS(o,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?BJe:FJe}}function IJe(t,e){if(t==e)return!0;for(let n=0,r=0;;){for(;n-1&&(n["aria-activedescendant"]=t+"-"+e),n}const VJe=[];function wK(t,e){if(t.isUserEvent("input.complete")){let r=t.annotation(RD);if(r&&e.activateOnCompletion(r))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Cs{constructor(e,n,r=-1){this.source=e,this.state=n,this.explicitPos=r}hasResult(){return!1}update(e,n){let r=wK(e,n),i=this;(r&8||r&16&&this.touches(e))&&(i=new Cs(i.source,0)),r&4&&i.state==0&&(i=new Cs(this.source,1)),i=i.updateFor(e,r);for(let o of e.effects)if(o.is(US))i=new Cs(i.source,1,o.value?of(e.state):-1);else if(o.is(eb))i=new Cs(i.source,0);else if(o.is(SK))for(let a of o.value)a.source==i.source&&(i=a);return i}updateFor(e,n){return this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new Cs(this.source,this.state,e.mapPos(this.explicitPos))}touches(e){return e.changes.touchesRange(of(e.state))}}class Fg extends Cs{constructor(e,n,r,i,o){super(e,2,n),this.result=r,this.from=i,this.to=o}hasResult(){return!0}updateFor(e,n){var r;if(!(n&3))return this.map(e.changes);let i=this.result;i.map&&!e.changes.empty&&(i=i.map(i,e.changes));let o=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),s=of(e.state);if((this.explicitPos<0?s<=o:sa||!i||n&2&&of(e.startState)==this.from)return new Cs(this.source,n&4?1:0);let l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return jJe(i.validFor,e.state,o,a)?new Fg(this.source,l,i,o,a):i.update&&(i=i.update(i,o,a,new bK(e.state,s,l>=0)))?new Fg(this.source,l,i,i.from,(r=i.to)!==null&&r!==void 0?r:of(e.state)):new Cs(this.source,1,l)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new Fg(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Cs(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function jJe(t,e,n,r){if(!t)return!1;let i=e.sliceDoc(n,r);return typeof t=="function"?t(i,n,r,e):OK(t,!0).test(i)}const SK=Wn.define({map(t,e){return t.map(n=>n.map(e))}}),xK=Wn.define(),Ha=So.define({create(){return qS.start()},update(t,e){return t.update(e)},provide:t=>[hD.from(t,e=>e.tooltip),Ut.contentAttributes.from(t,e=>e.attrs)]});function $D(t,e){const n=e.completion.apply||e.completion.label;let r=t.state.field(Ha).active.find(i=>i.source==e.source);return r instanceof Fg?(typeof n=="string"?t.dispatch(Object.assign(Object.assign({},TJe(t.state,n,r.from,r.to)),{annotations:RD.of(e.completion)})):n(t,e.completion,r.from,r.to),!0):!1}const zJe=NJe(Ha,$D);function a1(t,e="option"){return n=>{let r=n.state.field(Ha,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+i*(t?1:-1):t?0:a-1;return s<0?s=e=="page"?0:a-1:s>=a&&(s=e=="page"?a-1:0),n.dispatch({effects:xK.of(s)}),!0}}const QJe=t=>{let e=t.state.field(Ha,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.state.field(Ha,!1)?(t.dispatch({effects:US.of(!0)}),!0):!1,HJe=t=>{let e=t.state.field(Ha,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:eb.of(null)}),!0)};class WJe{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const UJe=50,qJe=1e3,YJe=qi.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Ha).active)e.state==1&&this.startQuery(e)}update(t){let e=t.state.field(Ha),n=t.state.facet(Do);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Ha)==e)return;let r=t.transactions.some(o=>{let a=wK(o,n);return a&8||(o.selection||o.docChanged)&&!(a&3)});for(let o=0;oUJe&&Date.now()-a.time>qJe){for(let s of a.context.abortListeners)try{s()}catch(l){qa(this.view.state,l)}a.context.abortListeners=null,this.running.splice(o--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(o=>o.effects.some(a=>a.is(US)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(o=>o.state==1&&!this.running.some(a=>a.active.source==o.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let o of t.transactions)o.isUserEvent("input.type")?this.composing=2:this.composing==2&&o.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Ha);for(let n of e.active)n.state==1&&!this.running.some(r=>r.active.source==n.source)&&this.startQuery(n)}startQuery(t){let{state:e}=this.view,n=of(e),r=new bK(e,n,t.explicitPos==n,this.view),i=new WJe(t,r);this.running.push(i),Promise.resolve(t.source(r)).then(o=>{i.context.aborted||(i.done=o||null,this.scheduleAccept())},o=>{this.view.dispatch({effects:eb.of(null)}),qa(this.view.state,o)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(Do).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(Do);for(let r=0;ra.source==i.active.source);if(o&&o.state==1)if(i.done==null){let a=new Cs(i.active.source,0);for(let s of i.updates)a=a.update(s,n);a.state!=1&&e.push(a)}else this.startQuery(o)}e.length&&this.view.dispatch({effects:SK.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Ha,!1);if(e&&e.tooltip&&this.view.state.facet(Do).closeOnBlur){let n=e.open&&rG(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:eb.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:US.of(!1)}),20),this.composing=0}}}),XJe=typeof navigator=="object"&&/Win/.test(navigator.platform),ZJe=Hf.highest(Ut.domEventHandlers({keydown(t,e){let n=e.state.field(Ha,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(XJe&&t.altKey)||t.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(a=>a.source==r.source),o=r.completion.commitCharacters||i.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&$D(e,r),!1}})),CK=Ut.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"\xB7\xB7\xB7"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:`${400}px`,boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`${30}px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`${30}px`},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'\u0192'"}},".cm-completionIcon-class":{"&:after":{content:"'\u25CB'"}},".cm-completionIcon-interface":{"&:after":{content:"'\u25CC'"}},".cm-completionIcon-variable":{"&:after":{content:"'\u{1D465}'"}},".cm-completionIcon-constant":{"&:after":{content:"'\u{1D436}'"}},".cm-completionIcon-type":{"&:after":{content:"'\u{1D461}'"}},".cm-completionIcon-enum":{"&:after":{content:"'\u222A'"}},".cm-completionIcon-property":{"&:after":{content:"'\u25A1'"}},".cm-completionIcon-keyword":{"&:after":{content:"'\u{1F511}\uFE0E'"}},".cm-completionIcon-namespace":{"&:after":{content:"'\u25A2'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class GJe{constructor(e,n,r,i){this.field=e,this.line=n,this.from=r,this.to=i}}class ND{constructor(e,n,r){this.field=e,this.from=n,this.to=r}map(e){let n=e.mapPos(this.from,-1,No.TrackDel),r=e.mapPos(this.to,1,No.TrackDel);return n==null||r==null?null:new ND(this.field,n,r)}}class DD{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let r=[],i=[n],o=e.doc.lineAt(n),a=/^\s*/.exec(o.text)[0];for(let l of this.lines){if(r.length){let u=a,c=/^\t*/.exec(l)[0].length;for(let d=0;dnew ND(l.field,i[l.line]+l.from,i[l.line]+l.to));return{text:r,ranges:s}}static parse(e){let n=[],r=[],i=[],o;for(let a of e.split(/\r\n?|\n/)){for(;o=/[#$]\{(?:(\d+)(?::([^}]*))?|((?:\\[{}]|[^}])*))\}/.exec(a);){let s=o[1]?+o[1]:null,l=o[2]||o[3]||"",u=-1,c=l.replace(/\\[{}]/g,d=>d[1]);for(let d=0;d=u&&f.field++}i.push(new GJe(u,r.length,o.index,o.index+c.length)),a=a.slice(0,o.index)+l+a.slice(o.index+o[0].length)}a=a.replace(/\\([{}])/g,(s,l,u)=>{for(let c of i)c.line==r.length&&c.from>u&&(c.from--,c.to--);return l}),r.push(a)}return new DD(r,i)}}let KJe=yn.widget({widget:new class extends mc{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),JJe=yn.mark({class:"cm-snippetField"});class av{constructor(e,n){this.ranges=e,this.active=n,this.deco=yn.set(e.map(r=>(r.from==r.to?KJe:JJe).range(r.from,r.to)))}map(e){let n=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;n.push(i)}return new av(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(r=>r.field==this.active&&r.from<=n.from&&r.to>=n.to))}}const Kb=Wn.define({map(t,e){return t&&t.map(e)}}),eet=Wn.define(),tb=So.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(Kb))return n.value;if(n.is(eet)&&t)return new av(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ut.decorations.from(t,e=>e?e.deco:yn.none)});function LD(t,e){return yt.create(t.filter(n=>n.field==e).map(n=>yt.range(n.from,n.to)))}function tet(t){let e=DD.parse(t);return(n,r,i,o)=>{let{text:a,ranges:s}=e.instantiate(n.state,i),l={changes:{from:i,to:o,insert:Mr.of(a)},scrollIntoView:!0,annotations:r?[RD.of(r),Zi.userEvent.of("input.complete")]:void 0};if(s.length&&(l.selection=LD(s,0)),s.some(u=>u.field>0)){let u=new av(s,0),c=l.effects=[Kb.of(u)];n.state.field(tb,!1)===void 0&&c.push(Wn.appendConfig.of([tb,aet,set,CK]))}n.dispatch(n.state.update(l))}}function EK(t){return({state:e,dispatch:n})=>{let r=e.field(tb,!1);if(!r||t<0&&r.active==0)return!1;let i=r.active+t,o=t>0&&!r.ranges.some(a=>a.field==i+t);return n(e.update({selection:LD(r.ranges,i),effects:Kb.of(o?null:new av(r.ranges,i)),scrollIntoView:!0})),!0}}const net=({state:t,dispatch:e})=>t.field(tb,!1)?(e(t.update({effects:Kb.of(null)})),!0):!1,ret=EK(1),iet=EK(-1),oet=[{key:"Tab",run:ret,shift:iet},{key:"Escape",run:net}],dj=Xt.define({combine(t){return t.length?t[0]:oet}}),aet=Hf.highest(Ub.compute([dj],t=>t.facet(dj)));function Va(t,e){return Object.assign(Object.assign({},e),{apply:tet(t)})}const set=Ut.domEventHandlers({mousedown(t,e){let n=e.state.field(tb,!1),r;if(!n||(r=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let i=n.ranges.find(o=>o.from<=r&&o.to>=r);return!i||i.field==n.active?!1:(e.dispatch({selection:LD(n.ranges,i.field),effects:Kb.of(n.ranges.some(o=>o.field>i.field)?new av(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),nb={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Lh=Wn.define({map(t,e){let n=e.mapPos(t,-1,No.TrackAfter);return n==null?void 0:n}}),ID=new class extends up{};ID.startSide=1;ID.endSide=-1;const TK=So.define({create(){return Ar.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:r=>r>=n.from&&r<=n.to})}for(let n of e.effects)n.is(Lh)&&(t=t.update({add:[ID.range(n.value,n.value+1)]}));return t}});function uet(){return[det,TK]}const M2="()[]{}<>";function kK(t){for(let e=0;e{if((cet?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let i=t.state.selection.main;if(r.length>2||r.length==2&&Bu(za(r,0))==1||e!=i.from||n!=i.to)return!1;let o=pet(t.state,r);return o?(t.dispatch(o),!0):!1}),fet=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let r=PK(t,t.selection.main.head).brackets||nb.brackets,i=null,o=t.changeByRange(a=>{if(a.empty){let s=get(t.doc,a.head);for(let l of r)if(l==s&&$C(t.doc,a.head)==kK(za(l,0)))return{changes:{from:a.head-l.length,to:a.head+l.length},range:yt.cursor(a.head-l.length)}}return{range:i=a}});return i||e(t.update(o,{scrollIntoView:!0,userEvent:"delete.backward"})),!i},het=[{key:"Backspace",run:fet}];function pet(t,e){let n=PK(t,t.selection.main.head),r=n.brackets||nb.brackets;for(let i of r){let o=kK(za(i,0));if(e==i)return o==i?yet(t,i,r.indexOf(i+i+i)>-1,n):met(t,i,o,n.before||nb.before);if(e==o&&AK(t,t.selection.main.from))return vet(t,i,o)}return null}function AK(t,e){let n=!1;return t.field(TK).between(0,t.doc.length,r=>{r==e&&(n=!0)}),n}function $C(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Bu(za(n,0)))}function get(t,e){let n=t.sliceString(e-2,e);return Bu(za(n,0))==n.length?n:n.slice(1)}function met(t,e,n,r){let i=null,o=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:Lh.of(a.to+e.length),range:yt.range(a.anchor+e.length,a.head+e.length)};let s=$C(t.doc,a.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:e+n,from:a.head},effects:Lh.of(a.head+e.length),range:yt.cursor(a.head+e.length)}:{range:i=a}});return i?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function vet(t,e,n){let r=null,i=t.changeByRange(o=>o.empty&&$C(t.doc,o.head)==n?{changes:{from:o.head,to:o.head+n.length,insert:n},range:yt.cursor(o.head+n.length)}:r={range:o});return r?null:t.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function yet(t,e,n,r){let i=r.stringPrefixes||nb.stringPrefixes,o=null,a=t.changeByRange(s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Lh.of(s.to+e.length),range:yt.range(s.anchor+e.length,s.head+e.length)};let l=s.head,u=$C(t.doc,l),c;if(u==e){if(fj(t,l))return{changes:{insert:e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)};if(AK(t,l)){let f=n&&t.sliceDoc(l,l+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:l,to:l+f.length,insert:f},range:yt.cursor(l+f.length)}}}else{if(n&&t.sliceDoc(l-2*e.length,l)==e+e&&(c=hj(t,l-2*e.length,i))>-1&&fj(t,c))return{changes:{insert:e+e+e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)};if(t.charCategorizer(l)(u)!=xi.Word&&hj(t,l,i)>-1&&!bet(t,l,e,i))return{changes:{insert:e+e,from:l},effects:Lh.of(l+e.length),range:yt.cursor(l+e.length)}}return{range:o=s}});return o?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function fj(t,e){let n=uo(t).resolveInner(e+1);return n.parent&&n.from==e}function bet(t,e,n,r){let i=uo(t).resolveInner(e,-1),o=r.reduce((a,s)=>Math.max(a,s.length),0);for(let a=0;a<5;a++){let s=t.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),l=s.indexOf(n);if(!l||l>-1&&r.indexOf(s.slice(0,l))>-1){let c=i.firstChild;for(;c&&c.from==i.from&&c.to-c.from>n.length+l;){if(t.sliceDoc(c.to-n.length,c.to)==n)return!1;c=c.firstChild}return!0}let u=i.to==e&&i.parent;if(!u)break;i=u}return!1}function hj(t,e,n){let r=t.charCategorizer(e);if(r(t.sliceDoc(e-1,e))!=xi.Word)return e;for(let i of n){let o=e-i.length;if(t.sliceDoc(o,e)==i&&r(t.sliceDoc(o-1,o))!=xi.Word)return o}return-1}function _et(t={}){return[ZJe,Ha,Do.of(t),YJe,Oet,CK]}const MK=[{key:"Ctrl-Space",run:cj},{mac:"Alt-`",run:cj},{key:"Escape",run:HJe},{key:"ArrowDown",run:a1(!0)},{key:"ArrowUp",run:a1(!1)},{key:"PageDown",run:a1(!0,"page")},{key:"PageUp",run:a1(!1,"page")},{key:"Enter",run:QJe}],Oet=Hf.highest(Ub.computeN([Do],t=>t.facet(Do).defaultKeymap?[MK]:[]));class wet{constructor(e,n,r){this.from=e,this.to=n,this.diagnostic=r}}class Eh{constructor(e,n,r){this.diagnostics=e,this.panel=n,this.selected=r}static init(e,n,r){let i=e,o=r.facet(rb).markerFilter;o&&(i=o(i,r));let a=yn.set(i.map(s=>s.from==s.to||s.from==s.to-1&&r.doc.lineAt(s.from).to==s.from?yn.widget({widget:new Ret(s),diagnostic:s}).range(s.from):yn.mark({attributes:{class:"cm-lintRange cm-lintRange-"+s.severity+(s.markClass?" "+s.markClass:"")},diagnostic:s}).range(s.from,s.to)),!0);return new Eh(a,n,km(a))}}function km(t,e=null,n=0){let r=null;return t.between(n,1e9,(i,o,{spec:a})=>{if(!(e&&a.diagnostic!=e))return r=new wet(i,o,a.diagnostic),!1}),r}function xet(t,e){let n=e.pos,r=e.end||n,i=t.state.facet(rb).hideOn(t,n,r);if(i!=null)return i;let o=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(RK))||t.changes.touchesRange(o.from,Math.max(o.to,r)))}function Cet(t,e){return t.field(Ts,!1)?e:e.concat(Wn.appendConfig.of(Det))}const RK=Wn.define(),BD=Wn.define(),$K=Wn.define(),Ts=So.define({create(){return new Eh(yn.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),r=null,i=t.panel;if(t.selected){let o=e.changes.mapPos(t.selected.from,1);r=km(n,t.selected.diagnostic,o)||km(n,null,o)}!n.size&&i&&e.state.facet(rb).autoPanel&&(i=null),t=new Eh(n,i,r)}for(let n of e.effects)if(n.is(RK)){let r=e.state.facet(rb).autoPanel?n.value.length?ib.open:null:t.panel;t=Eh.init(n.value,r,e.state)}else n.is(BD)?t=new Eh(t.diagnostics,n.value?ib.open:null,t.selected):n.is($K)&&(t=new Eh(t.diagnostics,t.panel,n.value));return t},provide:t=>[X0.from(t,e=>e.panel),Ut.decorations.from(t,e=>e.diagnostics)]}),Eet=yn.mark({class:"cm-lintRange cm-lintRange-active"});function Tet(t,e,n){let{diagnostics:r}=t.state.field(Ts),i=[],o=2e8,a=0;r.between(e-(n<0?1:0),e+(n>0?1:0),(l,u,{spec:c})=>{e>=l&&e<=u&&(l==u||(e>l||n>0)&&(eDK(t,n,!1)))}const Pet=t=>{let e=t.state.field(Ts,!1);(!e||!e.panel)&&t.dispatch({effects:Cet(t.state,[BD.of(!0)])});let n=Y0(t,ib.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},pj=t=>{let e=t.state.field(Ts,!1);return!e||!e.panel?!1:(t.dispatch({effects:BD.of(!1)}),!0)},Aet=t=>{let e=t.state.field(Ts,!1);if(!e)return!1;let n=t.state.selection.main,r=e.diagnostics.iter(n.to+1);return!r.value&&(r=e.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to)?!1:(t.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)},Met=[{key:"Mod-Shift-m",run:Pet,preventDefault:!0},{key:"F8",run:Aet}],rb=Xt.define({combine(t){return Object.assign({sources:t.map(e=>e.source).filter(e=>e!=null)},gc(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(e,n)=>e?n?r=>e(r)||n(r):e:n}))}});function NK(t){let e=[];if(t)e:for(let{name:n}of t){for(let r=0;ro.toLowerCase()==i.toLowerCase())){e.push(i);continue e}}e.push("")}return e}function DK(t,e,n){var r;let i=n?NK(e.actions):[];return ci("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},ci("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(r=e.actions)===null||r===void 0?void 0:r.map((o,a)=>{let s=!1,l=f=>{if(f.preventDefault(),s)return;s=!0;let h=km(t.state.field(Ts).diagnostics,e);h&&o.apply(t,h.from,h.to)},{name:u}=o,c=i[a]?u.indexOf(i[a]):-1,d=c<0?u:[u.slice(0,c),ci("u",u.slice(c,c+1)),u.slice(c+1)];return ci("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${u}${c<0?"":` (access key "${i[a]})"`}.`},d)}),e.source&&ci("div",{class:"cm-diagnosticSource"},e.source))}class Ret extends mc{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return ci("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class gj{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=DK(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class ib{constructor(e){this.view=e,this.items=[];let n=i=>{if(i.keyCode==27)pj(this.view),this.view.focus();else if(i.keyCode==38||i.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(i.keyCode==40||i.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(i.keyCode==36)this.moveSelection(0);else if(i.keyCode==35)this.moveSelection(this.items.length-1);else if(i.keyCode==13)this.view.focus();else if(i.keyCode>=65&&i.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:o}=this.items[this.selectedIndex],a=NK(o.actions);for(let s=0;s{for(let o=0;opj(this.view)},"\xD7")),this.update()}get selectedIndex(){let e=this.view.state.field(Ts).selected;if(!e)return-1;for(let n=0;n{let u=-1,c;for(let d=r;dr&&(this.items.splice(r,u-r),i=!0)),n&&c.diagnostic==n.diagnostic?c.dom.hasAttribute("aria-selected")||(c.dom.setAttribute("aria-selected","true"),o=c):c.dom.hasAttribute("aria-selected")&&c.dom.removeAttribute("aria-selected"),r++});r({sel:o.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:a,panel:s})=>{let l=s.height/this.list.offsetHeight;a.tops.bottom&&(this.list.scrollTop+=(a.bottom-s.bottom)/l)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),i&&this.sync()}sync(){let e=this.list.firstChild;function n(){let r=e;e=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;e!=r.dom;)n();e=r.dom.nextSibling}else this.list.insertBefore(r.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Ts),r=km(n.diagnostics,this.items[e].diagnostic);!r||this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:$K.of(r)})}static open(e){return new ib(e)}}function $et(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function s1(t){return $et(``,'width="6" height="3"')}const Net=Ut.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:s1("#d11")},".cm-lintRange-warning":{backgroundImage:s1("orange")},".cm-lintRange-info":{backgroundImage:s1("#999")},".cm-lintRange-hint":{backgroundImage:s1("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}}),Det=[Ts,Ut.decorations.compute([Ts],t=>{let{selected:e,panel:n}=t.field(Ts);return!e||!n||e.from==e.to?yn.none:yn.set([Eet.range(e.from,e.to)])}),_Ze(Tet,{hideOn:xet}),Net],Let=(()=>[MZe(),NZe(),XXe(),ZGe(),wGe(),BXe(),QXe(),vr.allowMultipleSelections.of(!0),uGe(),xGe(TGe,{fallback:!0}),NGe(),uet(),_et(),uZe(),fZe(),tZe(),nJe(),Ub.of([...het,...ZKe,...OJe,...oKe,...yGe,...MK,...Met])])();/*! * VueCodemirror v6.1.1 * Copyright (c) Surmon. All rights reserved. * Released under the MIT License. * Surmon */var Iet=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Let]}),Bet=Symbol("vue-codemirror-global-config"),va,Fet=function(t){var e=t.onUpdate,n=t.onChange,r=t.onFocus,i=t.onBlur,o=function(a,s){var l={};for(var u in a)Object.prototype.hasOwnProperty.call(a,u)&&s.indexOf(u)<0&&(l[u]=a[u]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function"){var c=0;for(u=Object.getOwnPropertySymbols(a);cn%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,r=0){let i=e.parser.context;return new YS(e,[],n,r,r,0,[],0,i?new vj(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let r=e>>19,i=e&65535,{parser:o}=this.p,a=this.reducePos=2e3&&!(!((n=this.p.parser.nodeSet.types[i])===null||n===void 0)&&n.isAnonymous)&&(u==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSizel;)this.stack.pop();this.reduceContext(i,u)}storeNode(e,n,r,i=4,o=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]0&&a.buffer[s-4]==0&&a.buffer[s-1]>-1){if(n==r)return;if(a.buffer[s-2]>=n){a.buffer[s-2]=r;return}}}if(!o||this.pos==r)this.buffer.push(e,n,r,i);else{let a=this.buffer.length;if(a>0&&this.buffer[a-4]!=0){let s=!1;for(let l=a;l>0&&this.buffer[l-2]>r;l-=4)if(this.buffer[l-1]>=0){s=!0;break}if(s)for(;a>0&&this.buffer[a-2]>r;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,i>4&&(i-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=r,this.buffer[a+3]=i}}shift(e,n,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let o=e,{parser:a}=this.p;(i>this.pos||n<=a.maxNode)&&(this.pos=i,a.stateFlag(o,1)||(this.reducePos=i)),this.pushState(o,r),this.shiftContext(n,r),n<=a.maxNode&&this.buffer.push(n,r,i,4)}else this.pos=i,this.shiftContext(n,r),n<=this.p.parser.maxNode&&this.buffer.push(n,r,i,4)}apply(e,n,r,i){e&65536?this.reduce(e):this.shift(e,n,r,i)}useNode(e,n){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(n,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let r=e.buffer.slice(n),i=e.bufferBase+n;for(;e&&i==e.bufferBase;)e=e.parent;return new YS(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,r?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new Wet(this);;){let r=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(r==0)return!1;if((r&65536)==0)return!0;n.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>4<<1||this.stack.length>=120){let i=[];for(let o=0,a;ol&1&&s==a)||i.push(n[o],a)}n=i}let r=[];for(let i=0;i>19,i=n&65535,o=this.stack.length-r*3;if(o<0||e.getGoto(this.stack[o],i,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],r=(i,o)=>{if(!n.includes(i))return n.push(i),e.allActions(i,a=>{if(!(a&393216))if(a&65536){let s=(a>>19)-o;if(s>1){let l=a&65535,u=this.stack.length-s*3;if(u>=0&&e.getGoto(this.stack[u],l,!1)>=0)return s<<19|65536|l}}else{let s=r(a,o+1);if(s!=null)return s}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;nthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class vj{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class Wet{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=i}}class XS{constructor(e,n,r){this.stack=e,this.pos=n,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new XS(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new XS(this.stack,this.pos,this.index)}}function fy(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let r=0,i=0;r=92&&a--,a>=34&&a--;let l=a-32;if(l>=46&&(l-=46,s=!0),o+=l,s)break;o*=46}n?n[i++]=o:n=new e(o)}return n}class X1{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const yj=new X1;class Uet{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=yj,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let r=this.range,i=this.rangeIndex,o=this.pos+e;for(;or.to:o>=r.to;){if(i==this.ranges.length-1)return null;let a=this.ranges[++i];o+=a.from-r.to,r=a}return o}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,r,i;if(n>=0&&n=this.chunk2Pos&&rs.to&&(this.chunk2=this.chunk2.slice(0,s.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,n=0){let r=n?this.resolveOffset(n,-1):this.pos;if(r==null||r=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=yj,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let r="";for(let i of this.ranges){if(i.from>=n)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,n)))}return r}}class Vg{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:r}=n.p;IK(this.data,e,n,this.id,r.data,r.tokenPrecTable)}}Vg.prototype.contextual=Vg.prototype.fallback=Vg.prototype.extend=!1;class vM{constructor(e,n,r){this.precTable=n,this.elseToken=r,this.data=typeof e=="string"?fy(e):e}token(e,n){let r=e.pos,i=0;for(;;){let o=e.next<0,a=e.resolveOffset(1,1);if(IK(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(o||i++,a==null)break;e.reset(a,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}vM.prototype.contextual=Vg.prototype.fallback=Vg.prototype.extend=!1;class Jb{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function IK(t,e,n,r,i,o){let a=0,s=1<0){let m=t[h];if(l.allows(m)&&(e.token.value==-1||e.token.value==m||qet(m,e.token.value,i,o))){e.acceptToken(m);break}}let c=e.next,d=0,f=t[a+2];if(e.next<0&&f>d&&t[u+f*3-3]==65535){a=t[u+f*3-1];continue e}for(;d>1,m=u+h+(h<<1),g=t[m],y=t[m+1]||65536;if(c=y)d=h+1;else{a=t[m+2],e.advance();continue e}}break}}function bj(t,e,n){for(let r=e,i;(i=t[r])!=65535;r++)if(i==n)return r-e;return-1}function qet(t,e,n,r){let i=bj(n,r,e);return i<0||bj(n,r,t)e)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(t.length,Math.max(r.from+1,e+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:t.length}}class Yet{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?_j(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?_j(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=a,null;if(o instanceof Gi){if(a==e){if(a=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+o.length}}}class Xet{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new X1)}getActions(e){let n=0,r=null,{parser:i}=e.p,{tokenizers:o}=i,a=i.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,l=0;for(let u=0;ud.end+25&&(l=Math.max(d.lookAhead,l)),d.value!=0)){let f=n;if(d.extended>-1&&(n=this.addActions(e,d.extended,d.end,n)),n=this.addActions(e,d.value,d.end,n),!c.extend&&(r=d,n>f))break}}for(;this.actions.length>n;)this.actions.pop();return l&&e.setLookAhead(l),!r&&e.pos==this.stream.end&&(r=new X1,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,n=this.addActions(e,r.value,r.end,n)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new X1,{pos:r,p:i}=e;return n.start=r,n.end=Math.min(r+1,i.stream.end),n.value=r==i.stream.end?i.parser.eofTerm:0,n}updateCachedToken(e,n,r){let i=this.stream.clipPos(r.pos);if(n.token(this.stream.reset(i,e),r),e.value>-1){let{parser:o}=r.p;for(let a=0;a=0&&r.p.parser.dialect.allows(s>>1)){(s&1)==0?e.value=s>>1:e.extended=s>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,n,r,i){for(let o=0;oe.bufferLength*4?new Yet(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,r=this.stacks=[],i,o;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;an)r.push(s);else{if(this.advanceStack(s,r,e))continue;{i||(i=[],o=[]),i.push(s);let l=this.tokens.getMainToken(s);o.push(l.value,l.end)}}break}}if(!r.length){let a=i&&Jet(i);if(a)return bs&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw bs&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&i){let a=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,o,r);if(a)return bs&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(r.length>a)for(r.sort((s,l)=>l.score-s.score);r.length>a;)r.pop();r.some(s=>s.reducePos>n)&&this.recovering--}else if(r.length>1){e:for(let a=0;a500&&u.buffer.length>500)if((s.score-u.score||s.buffer.length-u.buffer.length)>0)r.splice(l--,1);else{r.splice(a--,1);continue e}}}r.length>12&&r.splice(12,r.length-12)}this.minStackPos=r[0].pos;for(let a=1;a ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let u=e.curContext&&e.curContext.tracker.strict,c=u?e.curContext.hash:0;for(let d=this.fragments.nodeAt(i);d;){let f=this.parser.nodeSet.types[d.type.id]==d.type?o.getGoto(e.state,d.type.id):-1;if(f>-1&&d.length&&(!u||(d.prop(hr.contextHash)||0)==c))return e.useNode(d,f),bs&&console.log(a+this.stackID(e)+` (via reuse of ${o.getName(d.type.id)})`),!0;if(!(d instanceof Gi)||d.children.length==0||d.positions[0]>0)break;let h=d.children[0];if(h instanceof Gi&&d.positions[0]==0)d=h;else break}}let s=o.stateSlot(e.state,4);if(s>0)return e.reduce(s),bs&&console.log(a+this.stackID(e)+` (via always-reduce ${o.getName(s&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let u=0;ui?n.push(m):r.push(m)}return!1}advanceFully(e,n){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return Oj(e,n),!0}}runRecovery(e,n,r){let i=null,o=!1;for(let a=0;a ":"";if(s.deadEnd&&(o||(o=!0,s.restart(),bs&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,r))))continue;let d=s.split(),f=c;for(let h=0;d.forceReduce()&&h<10&&(bs&&console.log(f+this.stackID(d)+" (via force-reduce)"),!this.advanceFully(d,r));h++)bs&&(f=this.stackID(d)+" -> ");for(let h of s.recoverByInsert(l))bs&&console.log(c+this.stackID(h)+" (via recover-insert)"),this.advanceFully(h,r);this.stream.end>s.pos?(u==s.pos&&(u++,l=0),s.recoverByDelete(l,u),bs&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(l)})`),Oj(s,r)):(!i||i.scoret;class Ket{constructor(e){this.start=e.start,this.shift=e.shift||$2,this.reduce=e.reduce||$2,this.reuse=e.reuse||$2,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class ob extends dG{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (${14})`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let s=0;se.topRules[s][1]),i=[];for(let s=0;s=0)o(c,l,s[u++]);else{let d=s[u+-c];for(let f=-c;f>0;f--)o(s[u++],l,d);u++}}}this.nodeSet=new pD(n.map((s,l)=>is.define({name:l>=this.minRepeatTerm?void 0:s,id:l,props:i[l],top:r.indexOf(l)>-1,error:l==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(l)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=sG;let a=fy(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let s=0;stypeof s=="number"?new Vg(a,s):s),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,r){let i=new Zet(this,e,n,r);for(let o of this.wrappers)i=o(i,e,n,r);return i}getGoto(e,n,r=!1){let i=this.goto;if(n>=i[0])return-1;for(let o=i[n+1];;){let a=i[o++],s=a&1,l=i[o++];if(s&&r)return l;for(let u=o+(a>>1);o0}validAction(e,n){return!!this.allActions(e,r=>r==n?!0:null)}allActions(e,n){let r=this.stateSlot(e,4),i=r?n(r):void 0;for(let o=this.stateSlot(e,1);i==null;o+=3){if(this.data[o]==65535)if(this.data[o+1]==1)o=Lc(this.data,o+2);else break;i=n(Lc(this.data,o+1))}return i}nextStates(e){let n=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Lc(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];n.some((o,a)=>a&1&&o==i)||n.push(this.data[r],i)}}return n}configure(e){let n=Object.assign(Object.create(ob.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=r}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(o=>o.from==r);return i?i.to:r})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((r,i)=>{let o=e.specializers.find(s=>s.from==r.external);if(!o)return r;let a=Object.assign(Object.assign({},r),{external:o.to});return n.specializers[i]=wj(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),r=n.map(()=>!1);if(e)for(let o of e.split(" ")){let a=n.indexOf(o);a>=0&&(r[a]=!0)}let i=null;for(let o=0;or)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.scoret.external(n,r)<<1|e}return t.get}const ett=yD({String:Je.string,Number:Je.number,"True False":Je.bool,PropertyName:Je.propertyName,Null:Je.null,",":Je.separator,"[ ]":Je.squareBracket,"{ }":Je.brace}),ttt=ob.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#CjOOQO'#Cp'#CpQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CrOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59U,59UO!iQPO,59UOVQPO,59QOqQPO'#CkO!nQPO,59^OOQO1G.k1G.kOVQPO'#ClO!vQPO,59aOOQO1G.p1G.pOOQO1G.l1G.lOOQO,59V,59VOOQO-E6i-E6iOOQO,59W,59WOOQO-E6j-E6j",stateData:"#O~OcOS~OQSORSOSSOTSOWQO]ROePO~OVXOeUO~O[[O~PVOg^O~Oh_OVfX~OVaO~OhbO[iX~O[dO~Oh_OVfa~OhbO[ia~O",goto:"!kjPPPPPPkPPkqwPPk{!RPPP!XP!ePP!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"\u26A0 JsonText True False Null Number String } { Object Property PropertyName ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",12,"["],["closedBy",8,"}",13,"]"]],propSources:[ett],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oc~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Oe~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zOh~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yOg~~'OO]~~'TO[~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),ntt=G0.define({name:"json",parser:ttt.configure({props:[OD.add({Object:Xy({except:/^\s*\}/}),Array:Xy({except:/^\s*\]/})}),SD.add({"Object Array":bG})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function sv(){return new mG(ntt)}var BK={exports:{}},NC={},FD={exports:{}},FK={},DC={};function _o(t){this.__parent=t,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}_o.prototype.clone_empty=function(){var t=new _o(this.__parent);return t.set_indent(this.__indent_count,this.__alignment_count),t};_o.prototype.item=function(t){return t<0?this.__items[this.__items.length+t]:this.__items[t]};_o.prototype.has_match=function(t){for(var e=this.__items.length-1;e>=0;e--)if(this.__items[e].match(t))return!0;return!1};_o.prototype.set_indent=function(t,e){this.is_empty()&&(this.__indent_count=t||0,this.__alignment_count=e||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};_o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};_o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};_o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var t=this.__parent.current_line;return t.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),t.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),t.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,t.__items[0]===" "&&(t.__items.splice(0,1),t.__character_count-=1),!0}return!1};_o.prototype.is_empty=function(){return this.__items.length===0};_o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};_o.prototype.push=function(t){this.__items.push(t);var e=t.lastIndexOf(` `);e!==-1?this.__character_count=t.length-e:this.__character_count+=t.length};_o.prototype.pop=function(){var t=null;return this.is_empty()||(t=this.__items.pop(),this.__character_count-=t.length),t};_o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};_o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};_o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};_o.prototype.toString=function(){var t="";return this.is_empty()?this.__parent.indent_empty_lines&&(t=this.__parent.get_indent_string(this.__indent_count)):(t=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),t+=this.__items.join("")),t};function e_(t,e){this.__cache=[""],this.__indent_size=t.indent_size,this.__indent_string=t.indent_char,t.indent_with_tabs||(this.__indent_string=new Array(t.indent_size+1).join(t.indent_char)),e=e||"",t.indent_level>0&&(e=new Array(t.indent_level+1).join(this.__indent_string)),this.__base_string=e,this.__base_string_length=e.length}e_.prototype.get_indent_size=function(t,e){var n=this.__base_string_length;return e=e||0,t<0&&(n=0),n+=t*this.__indent_size,n+=e,n};e_.prototype.get_indent_string=function(t,e){var n=this.__base_string;return e=e||0,t<0&&(t=0,n=""),e+=t*this.__indent_size,this.__ensure_cache(e),n+=this.__cache[e],n};e_.prototype.__ensure_cache=function(t){for(;t>=this.__cache.length;)this.__add_column()};e_.prototype.__add_column=function(){var t=this.__cache.length,e=0,n="";this.__indent_size&&t>=this.__indent_size&&(e=Math.floor(t/this.__indent_size),t-=e*this.__indent_size,n=new Array(e+1).join(this.__indent_string)),t&&(n+=new Array(t+1).join(" ")),this.__cache.push(n)};function xo(t,e){this.__indent_cache=new e_(t,e),this.raw=!1,this._end_with_newline=t.end_with_newline,this.indent_size=t.indent_size,this.wrap_line_length=t.wrap_line_length,this.indent_empty_lines=t.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new _o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}xo.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};xo.prototype.get_line_number=function(){return this.__lines.length};xo.prototype.get_indent_string=function(t,e){return this.__indent_cache.get_indent_string(t,e)};xo.prototype.get_indent_size=function(t,e){return this.__indent_cache.get_indent_size(t,e)};xo.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};xo.prototype.add_new_line=function(t){return this.is_empty()||!t&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};xo.prototype.get_code=function(t){this.trim(!0);var e=this.current_line.pop();e&&(e[e.length-1]===` `&&(e=e.replace(/\n+$/g,"")),this.current_line.push(e)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(` `);return t!==` `&&(n=n.replace(/[\n]/g,t)),n};xo.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};xo.prototype.set_indent=function(t,e){return t=t||0,e=e||0,this.next_line.set_indent(t,e),this.__lines.length>1?(this.current_line.set_indent(t,e),!0):(this.current_line.set_indent(),!1)};xo.prototype.add_raw_token=function(t){for(var e=0;e1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};xo.prototype.just_added_newline=function(){return this.current_line.is_empty()};xo.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};xo.prototype.ensure_empty_line_above=function(t,e){for(var n=this.__lines.length-2;n>=0;){var r=this.__lines[n];if(r.is_empty())break;if(r.item(0).indexOf(t)!==0&&r.item(-1)!==e){this.__lines.splice(n+1,0,new _o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}};DC.Output=xo;var VD={};function rtt(t,e,n,r){this.type=t,this.text=e,this.comments_before=null,this.newlines=n||0,this.whitespace_before=r||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}VD.Token=rtt;var jD={};(function(t){var e="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",n="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",r="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",i="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",o="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",a="(?:"+o+"|["+e+r+"])",s="(?:"+o+"|["+n+r+i+"])*";t.identifier=new RegExp(a+s,"g"),t.identifierStart=new RegExp(a),t.identifierMatch=new RegExp("(?:"+o+"|["+n+r+i+"])+"),t.newline=/[\n\r\u2028\u2029]/,t.lineBreak=new RegExp(`\r |`+t.newline.source),t.allLineBreaks=new RegExp(t.lineBreak.source,"g")})(jD);var zD={},lv={};function Uf(t,e){this.raw_options=VK(t,e),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}Uf.prototype._get_array=function(t,e){var n=this.raw_options[t],r=e||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(r=n.concat()):typeof n=="string"&&(r=n.split(/[^a-zA-Z0-9_\/\-]+/)),r};Uf.prototype._get_boolean=function(t,e){var n=this.raw_options[t],r=n===void 0?!!e:!!n;return r};Uf.prototype._get_characters=function(t,e){var n=this.raw_options[t],r=e||"";return typeof n=="string"&&(r=n.replace(/\\r/,"\r").replace(/\\n/,` `).replace(/\\t/," ")),r};Uf.prototype._get_number=function(t,e){var n=this.raw_options[t];e=parseInt(e,10),isNaN(e)&&(e=0);var r=parseInt(n,10);return isNaN(r)&&(r=e),r};Uf.prototype._get_selection=function(t,e,n){var r=this._get_selection_list(t,e,n);if(r.length!==1)throw new Error("Invalid Option Value: The option '"+t+`' can only be one of the following values: `+e+` You passed in: '`+this.raw_options[t]+"'");return r[0]};Uf.prototype._get_selection_list=function(t,e,n){if(!e||e.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[e[0]],!this._is_valid_selection(n,e))throw new Error("Invalid Default Value!");var r=this._get_array(t,n);if(!this._is_valid_selection(r,e))throw new Error("Invalid Option Value: The option '"+t+`' can contain only the following values: `+e+` You passed in: '`+this.raw_options[t]+"'");return r};Uf.prototype._is_valid_selection=function(t,e){return t.length&&e.length&&!t.some(function(n){return e.indexOf(n)===-1})};function VK(t,e){var n={};t=jK(t);var r;for(r in t)r!==e&&(n[r]=t[r]);if(e&&t[e])for(r in t[e])n[r]=t[e][r];return n}function jK(t){var e={},n;for(n in t){var r=n.replace(/-/g,"_");e[r]=t[n]}return e}lv.Options=Uf;lv.normalizeOpts=jK;lv.mergeOpts=VK;var zK=lv.Options,itt=["before-newline","after-newline","preserve-newline"];function QK(t){zK.call(this,t,"js");var e=this.raw_options.brace_style||null;e==="expand-strict"?this.raw_options.brace_style="expand":e==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var r=0;r0&&(this.__position-=1)};Qo.prototype.hasNext=function(){return this.__position=0&&t=0&&e=t.length&&this.__input.substring(e-t.length,e).toLowerCase()===t};LC.InputScanner=Qo;var uv={},WK={};function xp(t){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=t}xp.prototype.restart=function(){this.__position=0};xp.prototype.isEmpty=function(){return this.__tokens_length===0};xp.prototype.hasNext=function(){return this.__position=0&&t/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}du.prototype=new yM;du.prototype._create=function(){return new du(this._input,this)};du.prototype._update=function(){this.__set_templated_pattern()};du.prototype.disable=function(t){var e=this._create();return e._disabled[t]=!0,e._update(),e};du.prototype.read_options=function(t){var e=this._create();for(var n in bM)e._disabled[n]=t.templating.indexOf(n)===-1;return e._update(),e};du.prototype.exclude=function(t){var e=this._create();return e._excluded[t]=!0,e._update(),e};du.prototype.read=function(){var t="";this._match_pattern?t=this._input.read(this._starting_pattern):t=this._input.read(this._starting_pattern,this.__template_pattern);for(var e=this._read_template();e;)this._match_pattern?e+=this._input.read(this._match_pattern):e+=this._input.readUntil(this.__template_pattern),t+=e,e=this._read_template();return this._until_after&&(t+=this._input.readUntilAfter(this._until_pattern)),t};du.prototype.__set_templated_pattern=function(){var t=[];this._disabled.php||t.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||t.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||t.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(t.push(this.__patterns.django._starting_pattern.source),t.push(this.__patterns.django_value._starting_pattern.source),t.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||t.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&t.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+t.join("|")+")")};du.prototype._read_template=function(){var t="",e=this._input.peek();if(e==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(t=t||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(t=t||this.__patterns.erb.read())}else e==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(t=t||this.__patterns.handlebars_comment.read(),t=t||this.__patterns.handlebars_unescaped.read(),t=t||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(t=t||this.__patterns.django_value.read()),this._excluded.django||(t=t||this.__patterns.django_comment.read(),t=t||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(t=t||this.__patterns.smarty_comment.read(),t=t||this.__patterns.smarty_literal.read(),t=t||this.__patterns.smarty.read()));return t};HD.TemplatablePattern=du;var stt=LC.InputScanner,XK=uv.Tokenizer,D2=uv.TOKEN,ltt=IC.Directives,ll=jD,utt=t_.Pattern,ctt=HD.TemplatablePattern;function L2(t,e){return e.indexOf(t)!==-1}var En={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:D2.START,RAW:D2.RAW,EOF:D2.EOF},Sj=new ltt(/\/\*/,/\*\//),dtt=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,ftt=/[0-9]/,htt=/[^\d\.]/,ptt=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),pp=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";pp=pp.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");pp="\\?\\.(?!\\d) "+pp;pp=pp.replace(/ /g,"|");var gtt=new RegExp(pp),ZK="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),mtt=ZK.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),vtt=new RegExp("^(?:"+mtt.join("|")+")$"),Z1,Co=function(t,e){XK.call(this,t,e),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new utt(this._input),r=new ctt(this._input).read_options(this._options);this.__patterns={template:r,identifier:r.starting_with(ll.identifier).matching(ll.identifierMatch),number:n.matching(dtt),punct:n.matching(gtt),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(ll.lineBreak),shebang:n.starting_with(/#!/).until_after(ll.lineBreak),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:r.until(/['\\\n\r\u2028\u2029]/),double_quote:r.until(/["\\\n\r\u2028\u2029]/),template_text:r.until(/[`\\$]/),template_expression:r.until(/[`}\\]/)}};Co.prototype=new XK;Co.prototype._is_comment=function(t){return t.type===En.COMMENT||t.type===En.BLOCK_COMMENT||t.type===En.UNKNOWN};Co.prototype._is_opening=function(t){return t.type===En.START_BLOCK||t.type===En.START_EXPR};Co.prototype._is_closing=function(t,e){return(t.type===En.END_BLOCK||t.type===En.END_EXPR)&&e&&(t.text==="]"&&e.text==="["||t.text===")"&&e.text==="("||t.text==="}"&&e.text==="{")};Co.prototype._reset=function(){Z1=!1};Co.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(En.EOF,""):(n=n||this._read_non_javascript(r),n=n||this._read_string(r),n=n||this._read_pair(r,this._input.peek(1)),n=n||this._read_word(t),n=n||this._read_singles(r),n=n||this._read_comment(r),n=n||this._read_regexp(r,t),n=n||this._read_xml(r,t),n=n||this._read_punctuation(),n=n||this._create_token(En.UNKNOWN,this._input.next()),n)};Co.prototype._read_word=function(t){var e;if(e=this.__patterns.identifier.read(),e!=="")return e=e.replace(ll.allLineBreaks,` `),!(t.type===En.DOT||t.type===En.RESERVED&&(t.text==="set"||t.text==="get"))&&vtt.test(e)?(e==="in"||e==="of")&&(t.type===En.WORD||t.type===En.STRING)?this._create_token(En.OPERATOR,e):this._create_token(En.RESERVED,e):this._create_token(En.WORD,e);if(e=this.__patterns.number.read(),e!=="")return this._create_token(En.WORD,e)};Co.prototype._read_singles=function(t){var e=null;return t==="("||t==="["?e=this._create_token(En.START_EXPR,t):t===")"||t==="]"?e=this._create_token(En.END_EXPR,t):t==="{"?e=this._create_token(En.START_BLOCK,t):t==="}"?e=this._create_token(En.END_BLOCK,t):t===";"?e=this._create_token(En.SEMICOLON,t):t==="."&&htt.test(this._input.peek(1))?e=this._create_token(En.DOT,t):t===","&&(e=this._create_token(En.COMMA,t)),e&&this._input.next(),e};Co.prototype._read_pair=function(t,e){var n=null;return t==="#"&&e==="{"&&(n=this._create_token(En.START_BLOCK,t+e)),n&&(this._input.next(),this._input.next()),n};Co.prototype._read_punctuation=function(){var t=this.__patterns.punct.read();if(t!=="")return t==="="?this._create_token(En.EQUALS,t):t==="?."?this._create_token(En.DOT,t):this._create_token(En.OPERATOR,t)};Co.prototype._read_non_javascript=function(t){var e="";if(t==="#"){if(this._is_first_token()&&(e=this.__patterns.shebang.read(),e))return this._create_token(En.UNKNOWN,e.trim()+` `);if(e=this.__patterns.include.read(),e)return this._create_token(En.UNKNOWN,e.trim()+` `);t=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(ftt)){do t=this._input.next(),n+=t;while(this._input.hasNext()&&t!=="#"&&t!=="=");return t==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(n+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(n+="{}",this._input.next(),this._input.next())),this._create_token(En.WORD,n)}this._input.back()}else if(t==="<"&&this._is_first_token()){if(e=this.__patterns.html_comment_start.read(),e){for(;this._input.hasNext()&&!this._input.testChar(ll.newline);)e+=this._input.next();return Z1=!0,this._create_token(En.COMMENT,e)}}else if(Z1&&t==="-"&&(e=this.__patterns.html_comment_end.read(),e))return Z1=!1,this._create_token(En.COMMENT,e);return null};Co.prototype._read_comment=function(t){var e=null;if(t==="/"){var n="";if(this._input.peek(1)==="*"){n=this.__patterns.block_comment.read();var r=Sj.get_directives(n);r&&r.ignore==="start"&&(n+=Sj.readIgnored(this._input)),n=n.replace(ll.allLineBreaks,` `),e=this._create_token(En.BLOCK_COMMENT,n),e.directives=r}else this._input.peek(1)==="/"&&(n=this.__patterns.comment.read(),e=this._create_token(En.COMMENT,n))}return e};Co.prototype._read_string=function(t){if(t==="`"||t==="'"||t==='"'){var e=this._input.next();return this.has_char_escapes=!1,t==="`"?e+=this._read_string_recursive("`",!0,"${"):e+=this._read_string_recursive(t),this.has_char_escapes&&this._options.unescape_strings&&(e=ytt(e)),this._input.peek()===t&&(e+=this._input.next()),e=e.replace(ll.allLineBreaks,` `),this._create_token(En.STRING,e)}return null};Co.prototype._allow_regexp_or_xml=function(t){return t.type===En.RESERVED&&L2(t.text,["return","case","throw","else","do","typeof","yield"])||t.type===En.END_EXPR&&t.text===")"&&t.opened.previous.type===En.RESERVED&&L2(t.opened.previous.text,["if","while","for"])||L2(t.type,[En.COMMENT,En.START_EXPR,En.START_BLOCK,En.START,En.END_BLOCK,En.OPERATOR,En.EQUALS,En.EOF,En.SEMICOLON,En.COMMA])};Co.prototype._read_regexp=function(t,e){if(t==="/"&&this._allow_regexp_or_xml(e)){for(var n=this._input.next(),r=!1,i=!1;this._input.hasNext()&&(r||i||this._input.peek()!==t)&&!this._input.testChar(ll.newline);)n+=this._input.peek(),r?r=!1:(r=this._input.peek()==="\\",this._input.peek()==="["?i=!0:this._input.peek()==="]"&&(i=!1)),this._input.next();return this._input.peek()===t&&(n+=this._input.next(),n+=this._input.read(ll.identifier)),this._create_token(En.STRING,n)}return null};Co.prototype._read_xml=function(t,e){if(this._options.e4x&&t==="<"&&this._allow_regexp_or_xml(e)){var n="",r=this.__patterns.xml.read_match();if(r){for(var i=r[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),o=i.indexOf("{")===0,a=0;r;){var s=!!r[1],l=r[2],u=!!r[r.length-1]||l.slice(0,8)==="![CDATA[";if(!u&&(l===i||o&&l.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(s?--a:++a),n+=r[0],a<=0)break;r=this.__patterns.xml.read_match()}return r||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(ll.allLineBreaks,` `),this._create_token(En.STRING,n)}}return null};function ytt(t){for(var e="",n=0,r=new stt(t),i=null;r.hasNext();)if(i=r.match(/([\s]|[^\\]|\\\\)+/g),i&&(e+=i[0]),r.peek()==="\\"){if(r.next(),r.peek()==="x")i=r.match(/x([0-9A-Fa-f]{2})/g);else if(r.peek()==="u")i=r.match(/u([0-9A-Fa-f]{4})/g),i||(i=r.match(/u\{([0-9A-Fa-f]+)\}/g));else{e+="\\",r.hasNext()&&(e+=r.next());continue}if(!i||(n=parseInt(i[1],16),n>126&&n<=255&&i[0].indexOf("x")===0))return t;n>=0&&n<32||n>1114111?e+="\\"+i[0]:n===34||n===39||n===92?e+="\\"+String.fromCharCode(n):e+=String.fromCharCode(n)}return e}Co.prototype._read_string_recursive=function(t,e,n){var r,i;t==="'"?i=this.__patterns.single_quote:t==='"'?i=this.__patterns.double_quote:t==="`"?i=this.__patterns.template_text:t==="}"&&(i=this.__patterns.template_expression);for(var o=i.read(),a="";this._input.hasNext();){if(a=this._input.next(),a===t||!e&&ll.newline.test(a)){this._input.back();break}else a==="\\"&&this._input.hasNext()?(r=this._input.peek(),r==="x"||r==="u"?this.has_char_escapes=!0:r==="\r"&&this._input.peek(1)===` `&&this._input.next(),a+=this._input.next()):n&&(n==="${"&&a==="$"&&this._input.peek()==="{"&&(a+=this._input.next()),n===a&&(t==="`"?a+=this._read_string_recursive("}",e,"`"):a+=this._read_string_recursive("`",e,"${"),this._input.hasNext()&&(a+=this._input.next())));a+=i.read(),o+=a}return o};qf.Tokenizer=Co;qf.TOKEN=En;qf.positionable_operators=ptt.slice();qf.line_starters=ZK.slice();var btt=DC.Output,_tt=VD.Token,ZS=jD,Ott=zD.Options,wtt=qf.Tokenizer,sb=qf.line_starters,hy=qf.positionable_operators,dt=qf.TOKEN;function Gn(t,e){return e.indexOf(t)!==-1}function Stt(t){return t.replace(/^\s+/g,"")}function xtt(t){for(var e={},n=0;nn&&(n=t.line_indent_level));var r={mode:e,parent:t,last_token:t?t.last_token:new _tt(dt.START_BLOCK,""),last_word:t?t.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:t?t.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return r};Ir.prototype._reset=function(t){var e=t.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new btt(this._options,e),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(In.BlockStatement);var n=new wtt(t,this._options);return this._tokens=n.tokenize(),t};Ir.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t,e=this._reset(this._source_text),n=this._options.eol;this._options.eol==="auto"&&(n=` `,e&&ZS.lineBreak.test(e||"")&&(n=e.match(ZS.lineBreak)[0]));for(var r=this._tokens.next();r;)this.handle_token(r),this._last_last_text=this._flags.last_token.text,this._flags.last_token=r,r=this._tokens.next();return t=this._output.get_code(n),t};Ir.prototype.handle_token=function(t,e){t.type===dt.START_EXPR?this.handle_start_expr(t):t.type===dt.END_EXPR?this.handle_end_expr(t):t.type===dt.START_BLOCK?this.handle_start_block(t):t.type===dt.END_BLOCK?this.handle_end_block(t):t.type===dt.WORD?this.handle_word(t):t.type===dt.RESERVED?this.handle_word(t):t.type===dt.SEMICOLON?this.handle_semicolon(t):t.type===dt.STRING?this.handle_string(t):t.type===dt.EQUALS?this.handle_equals(t):t.type===dt.OPERATOR?this.handle_operator(t):t.type===dt.COMMA?this.handle_comma(t):t.type===dt.BLOCK_COMMENT?this.handle_block_comment(t,e):t.type===dt.COMMENT?this.handle_comment(t,e):t.type===dt.DOT?this.handle_dot(t):t.type===dt.EOF?this.handle_eof(t):t.type===dt.UNKNOWN?this.handle_unknown(t,e):this.handle_unknown(t,e)};Ir.prototype.handle_whitespace_and_comments=function(t,e){var n=t.newlines,r=this._options.keep_array_indentation&&Af(this._flags.mode);if(t.comments_before)for(var i=t.comments_before.next();i;)this.handle_whitespace_and_comments(i,e),this.handle_token(i,e),i=t.comments_before.next();if(r)for(var o=0;o0,e);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,e);for(var a=1;a0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.set_mode=function(t){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,t),this._flags=this.create_flags(this._previous_flags,t),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};Ir.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===In.Statement&&KK(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};Ir.prototype.start_of_object_property=function(){return this._flags.parent.mode===In.ObjectLiteral&&this._flags.mode===In.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ri(this._flags.last_token,["get","set"]))};Ir.prototype.start_of_statement=function(t){var e=!1;return e=e||ri(this._flags.last_token,["var","let","const"])&&t.type===dt.WORD,e=e||el(this._flags.last_token,"do"),e=e||!(this._flags.parent.mode===In.ObjectLiteral&&this._flags.mode===In.Statement)&&ri(this._flags.last_token,WD)&&!t.newlines,e=e||el(this._flags.last_token,"else")&&!(el(t,"if")&&!t.comments_before),e=e||this._flags.last_token.type===dt.END_EXPR&&(this._previous_flags.mode===In.ForInitializer||this._previous_flags.mode===In.Conditional),e=e||this._flags.last_token.type===dt.WORD&&this._flags.mode===In.BlockStatement&&!this._flags.in_case&&!(t.text==="--"||t.text==="++")&&this._last_last_text!=="function"&&t.type!==dt.WORD&&t.type!==dt.RESERVED,e=e||this._flags.mode===In.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ri(this._flags.last_token,["get","set"])),e?(this.set_mode(In.Statement),this.indent(),this.handle_whitespace_and_comments(t,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t,ri(t,["do","for","if","while"])),!0):!1};Ir.prototype.handle_start_expr=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t);var e=In.Expression;if(t.text==="["){if(this._flags.last_token.type===dt.WORD||this._flags.last_token.text===")"){ri(this._flags.last_token,sb)&&(this._output.space_before_token=!0),this.print_token(t),this.set_mode(e),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}e=In.ArrayLiteral,Af(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),Gn(this._flags.last_token.type,[dt.START_EXPR,dt.END_EXPR,dt.WORD,dt.OPERATOR,dt.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===dt.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,e=In.ForInitializer):Gn(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,e=In.Conditional):Gn(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&t.whitespace_before===""?this._output.space_before_token=!1:(Gn(this._flags.last_token.text,sb)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t);else if(this._flags.last_token.type===dt.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var r=this._tokens.peek(-4);ri(n,["async","function"])||n.text==="*"&&ri(r,["async","function"])?this._output.space_before_token=!0:this._flags.mode===In.ObjectLiteral?(n.text==="{"||n.text===","||n.text==="*"&&(r.text==="{"||r.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(t);(this._flags.last_token.type===dt.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(Gn(this._last_last_text,["function","yield"])||this._flags.mode===In.ObjectLiteral&&Gn(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===dt.START_BLOCK?this.print_newline():(this._flags.last_token.type===dt.END_EXPR||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===dt.COMMA)&&this.allow_wrap_or_preserved_newline(t,t.newlines),this.print_token(t),this.set_mode(e),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};Ir.prototype.handle_end_expr=function(t){for(;this._flags.mode===In.Statement;)this.restore_mode();this.handle_whitespace_and_comments(t),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(t,t.text==="]"&&Af(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===dt.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(t),this.restore_mode(),KK(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===In.Conditional&&(this._previous_flags.mode=In.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};Ir.prototype.handle_start_block=function(t){this.handle_whitespace_and_comments(t);var e=this._tokens.peek(),n=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===dt.END_EXPR?(this.set_mode(In.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(In.BlockStatement):n&&(Gn(n.text,[":",","])&&Gn(e.type,[dt.STRING,dt.WORD,dt.RESERVED])||Gn(e.text,["get","set","..."])&&Gn(n.type,[dt.WORD,dt.RESERVED]))?Gn(this._last_last_text,["class","interface"])&&!Gn(n.text,[":",","])?this.set_mode(In.BlockStatement):this.set_mode(In.ObjectLiteral):this._flags.last_token.type===dt.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(In.BlockStatement):Gn(this._flags.last_token.type,[dt.EQUALS,dt.START_EXPR,dt.COMMA,dt.OPERATOR])||ri(this._flags.last_token,["return","throw","import","default"])?this.set_mode(In.ObjectLiteral):this.set_mode(In.BlockStatement),this._flags.last_token&&ri(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var r=!e.comments_before&&e.text==="}",i=r&&this._flags.last_word==="function"&&this._flags.last_token.type===dt.END_EXPR;if(this._options.brace_preserve_inline){var o=0,a=null;this._flags.inline_frame=!0;do if(o+=1,a=this._tokens.peek(o-1),a.newlines){this._flags.inline_frame=!1;break}while(a.type!==dt.EOF&&!(a.type===dt.END_BLOCK&&a.opened===t))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==dt.OPERATOR&&(i||this._flags.last_token.type===dt.EQUALS||ri(this._flags.last_token,BC)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(Af(this._previous_flags.mode)&&(this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.COMMA)&&((this._flags.last_token.type===dt.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(t),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==dt.OPERATOR&&this._flags.last_token.type!==dt.START_EXPR&&(Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(t),this.indent(),!r&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};Ir.prototype.handle_end_block=function(t){for(this.handle_whitespace_and_comments(t);this._flags.mode===In.Statement;)this.restore_mode();var e=this._flags.last_token.type===dt.START_BLOCK;this._flags.inline_frame&&!e?this._output.space_before_token=!0:this._options.brace_style==="expand"?e||this.print_newline():e||(Af(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(t)};Ir.prototype.handle_word=function(t){if(t.type===dt.RESERVED){if(Gn(t.text,["set","get"])&&this._flags.mode!==In.ObjectLiteral)t.type=dt.WORD;else if(t.text==="import"&&Gn(this._tokens.peek().text,["(","."]))t.type=dt.WORD;else if(Gn(t.text,["as","from"])&&!this._flags.import_block)t.type=dt.WORD;else if(this._flags.mode===In.ObjectLiteral){var e=this._tokens.peek();e.text===":"&&(t.type=dt.WORD)}}if(this.start_of_statement(t)?ri(this._flags.last_token,["var","let","const"])&&t.type===dt.WORD&&(this._flags.declaration_statement=!0):t.newlines&&!Gy(this._flags.mode)&&(this._flags.last_token.type!==dt.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==dt.EQUALS&&(this._options.preserve_newlines||!ri(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(t),this.print_newline()):this.handle_whitespace_and_comments(t),this._flags.do_block&&!this._flags.do_while)if(el(t,"while")){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&el(t,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===In.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ri(t,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(t),this._flags.in_case=!0;return}if((this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR)&&!this.start_of_object_property()&&!(Gn(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===In.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(t),el(t,"function")){(Gn(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(Gn(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===dt.OPERATOR))&&!this._output.just_added_blankline()&&!t.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD?ri(this._flags.last_token,["get","set","new","export"])||ri(this._flags.last_token,WD)?this._output.space_before_token=!0:el(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===dt.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Gy(this._flags.mode)||Af(this._flags.mode))||this.print_newline(),this.print_token(t),this._flags.last_word=t.text;return}var n="NONE";if(this._flags.last_token.type===dt.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":ri(t,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===dt.SEMICOLON&&this._flags.mode===In.BlockStatement?n="NEWLINE":this._flags.last_token.type===dt.SEMICOLON&&Gy(this._flags.mode)?n="SPACE":this._flags.last_token.type===dt.STRING?n="NEWLINE":this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD||this._flags.last_token.text==="*"&&(Gn(this._last_last_text,["function","yield"])||this._flags.mode===In.ObjectLiteral&&Gn(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===dt.START_BLOCK?this._flags.inline_frame?n="SPACE":n="NEWLINE":this._flags.last_token.type===dt.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),ri(t,sb)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?n="SPACE":n="NEWLINE"),ri(t,["else","catch","finally"]))if((!(this._flags.last_token.type===dt.END_BLOCK&&this._previous_flags.mode===In.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&t.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var r=this._output.current_line;r.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else n==="NEWLINE"?ri(this._flags.last_token,BC)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ri(t,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==dt.END_EXPR?(this._flags.last_token.type!==dt.START_EXPR||!ri(t,["var","let","const"]))&&this._flags.last_token.text!==":"&&(el(t,"if")&&el(t.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ri(t,sb)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&Af(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():n==="SPACE"&&(this._output.space_before_token=!0);t.previous&&(t.previous.type===dt.WORD||t.previous.type===dt.RESERVED)&&(this._output.space_before_token=!0),this.print_token(t),this._flags.last_word=t.text,t.type===dt.RESERVED&&(t.text==="do"?this._flags.do_block=!0:t.text==="if"?this._flags.if_block=!0:t.text==="import"?this._flags.import_block=!0:this._flags.import_block&&el(t,"from")&&(this._flags.import_block=!1))};Ir.prototype.handle_semicolon=function(t){this.start_of_statement(t)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(t);for(var e=this._tokens.peek();this._flags.mode===In.Statement&&!(this._flags.if_block&&el(e,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(t)};Ir.prototype.handle_string=function(t){t.text.startsWith("`")&&t.newlines===0&&t.whitespace_before===""&&(t.previous.text===")"||this._flags.last_token.type===dt.WORD)||(this.start_of_statement(t)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(t),this._flags.last_token.type===dt.RESERVED||this._flags.last_token.type===dt.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR||this._flags.last_token.type===dt.EQUALS||this._flags.last_token.type===dt.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(t):t.text.startsWith("`")&&this._flags.last_token.type===dt.END_EXPR&&(t.previous.text==="]"||t.previous.text===")")&&t.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(t)};Ir.prototype.handle_equals=function(t){this.start_of_statement(t)||this.handle_whitespace_and_comments(t),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0};Ir.prototype.handle_comma=function(t){this.handle_whitespace_and_comments(t,!0),this.print_token(t),this._output.space_before_token=!0,this._flags.declaration_statement?(Gy(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)):this._flags.mode===In.ObjectLiteral||this._flags.mode===In.Statement&&this._flags.parent.mode===In.ObjectLiteral?(this._flags.mode===In.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(t)};Ir.prototype.handle_operator=function(t){var e=t.text==="*"&&(ri(this._flags.last_token,["function","yield"])||Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.COMMA,dt.END_BLOCK,dt.SEMICOLON])),n=Gn(t.text,["-","+"])&&(Gn(this._flags.last_token.type,[dt.START_BLOCK,dt.START_EXPR,dt.EQUALS,dt.OPERATOR])||Gn(this._flags.last_token.text,sb)||this._flags.last_token.text===",");if(!this.start_of_statement(t)){var r=!e;this.handle_whitespace_and_comments(t,r)}if(t.text==="*"&&this._flags.last_token.type===dt.DOT){this.print_token(t);return}if(t.text==="::"){this.print_token(t);return}if(Gn(t.text,["-","+"])&&this.start_of_object_property()){this.print_token(t);return}if(this._flags.last_token.type===dt.OPERATOR&&Gn(this._options.operator_position,GK)&&this.allow_wrap_or_preserved_newline(t),t.text===":"&&this._flags.in_case){this.print_token(t),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==dt.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var i=!0,o=!0,a=!1;if(t.text===":"?this._flags.ternary_depth===0?i=!1:(this._flags.ternary_depth-=1,a=!0):t.text==="?"&&(this._flags.ternary_depth+=1),!n&&!e&&this._options.preserve_newlines&&Gn(t.text,hy)){var s=t.text===":",l=s&&a,u=s&&!a;switch(this._options.operator_position){case Zy.before_newline:this._output.space_before_token=!u,this.print_token(t),(!s||l)&&this.allow_wrap_or_preserved_newline(t),this._output.space_before_token=!0;return;case Zy.after_newline:this._output.space_before_token=!0,!s||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(t):this._output.space_before_token=!1,this.print_token(t),this._output.space_before_token=!0;return;case Zy.preserve_newline:u||this.allow_wrap_or_preserved_newline(t),i=!(this._output.just_added_newline()||u),this._output.space_before_token=i,this.print_token(t),this._output.space_before_token=!0;return}}if(e){this.allow_wrap_or_preserved_newline(t),i=!1;var c=this._tokens.peek();o=c&&Gn(c.type,[dt.WORD,dt.RESERVED])}else if(t.text==="...")this.allow_wrap_or_preserved_newline(t),i=this._flags.last_token.type===dt.START_BLOCK,o=!1;else if(Gn(t.text,["--","++","!","~"])||n){if((this._flags.last_token.type===dt.COMMA||this._flags.last_token.type===dt.START_EXPR)&&this.allow_wrap_or_preserved_newline(t),i=!1,o=!1,t.newlines&&(t.text==="--"||t.text==="++"||t.text==="~")){var d=ri(this._flags.last_token,BC)&&t.newlines;d&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(d,!0)}this._flags.last_token.text===";"&&Gy(this._flags.mode)&&(i=!0),this._flags.last_token.type===dt.RESERVED?i=!0:this._flags.last_token.type===dt.END_EXPR?i=!(this._flags.last_token.text==="]"&&(t.text==="--"||t.text==="++")):this._flags.last_token.type===dt.OPERATOR&&(i=Gn(t.text,["--","-","++","+"])&&Gn(this._flags.last_token.text,["--","-","++","+"]),Gn(t.text,["+","-"])&&Gn(this._flags.last_token.text,["--","++"])&&(o=!0)),(this._flags.mode===In.BlockStatement&&!this._flags.inline_frame||this._flags.mode===In.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||i,this.print_token(t),this._output.space_before_token=o};Ir.prototype.handle_block_comment=function(t,e){if(this._output.raw){this._output.add_raw_token(t),t.directives&&t.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(t.directives){this.print_newline(!1,e),this.print_token(t),t.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!ZS.newline.test(t.text)&&!t.newlines){this._output.space_before_token=!0,this.print_token(t),this._output.space_before_token=!0;return}else this.print_block_commment(t,e)};Ir.prototype.print_block_commment=function(t,e){var n=Ett(t.text),r,i=!1,o=!1,a=t.whitespace_before,s=a.length;if(this.print_newline(!1,e),this.print_token_line_indentation(t),this._output.add_token(n[0]),this.print_newline(!1,e),n.length>1){for(n=n.slice(1),i=Ttt(n,"*"),o=ktt(n,a),i&&(this._flags.alignment=1),r=0;r0&&this._indentLevel--};dd.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;e==="auto"&&(e=` `,t&&Cj.test(t||"")&&(e=t.match(Cj)[0])),t=t.replace(Ltt,` `);var n=t.match(/^[\t ]*/)[0];this._output=new $tt(this._options,n),this._input=new Ntt(t),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var r=0,i=!1,o=!1,a=!1,s=!1,l=!1,u=this._ch,c=!1,d,f,h;d=this._input.read(Itt),f=d!=="",h=u,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),u=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var m=this._input.read(Btt),g=xj.get_directives(m);g&&g.ignore==="start"&&(m+=xj.readIgnored(this._input)),this.print_string(m),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(Ftt)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(f),this.print_string(this._ch);var y=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);y.match(/[ :]$/)&&(y=this.eatString(": ").replace(/\s+$/,""),this.print_string(y),this._output.space_before_token=!0),r===0&&y.indexOf(":")!==-1&&(o=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(f),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var b=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);b.match(/[ :]$/)&&(b=this.eatString(": ").replace(/\s+$/,""),this.print_string(b),this._output.space_before_token=!0),r===0&&b.indexOf(":")!==-1?(o=!0,this.indent()):b in this.NESTED_AT_RULE?(this._nestedLevel+=1,b in this.CONDITIONAL_GROUP_RULE&&(a=!0)):r===0&&!o&&(s=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(f),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")o&&(o=!1,this.outdent()),s=!1,a?(a=!1,i=this._indentLevel>=this._nestedLevel):i=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&i&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(h==="("?this._output.space_before_token=!1:h!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),h==="{"&&this._output.trim(!0),o&&(this.outdent(),o=!1),this.print_string(this._ch),i=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var w=0;w"||this._ch==="+"||this._ch==="~")&&!o&&r===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&GS.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(f),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),GS.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var x=h==='"'||h==="'";this.preserveSingleSpace(x||f),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` `&&c&&this._output.add_new_line()}var C=this._output.get_code(e);return C};JK.Beautifier=dd;var Vtt=JK.Beautifier,jtt=qD.Options;function ztt(t,e){var n=new Vtt(t,e);return n.beautify()}UD.exports=ztt;UD.exports.defaultOptions=function(){return new jtt};var YD={exports:{}},nJ={},XD={},rJ=lv.Options;function iJ(t){rJ.call(this,t,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}iJ.prototype=new rJ;XD.Options=iJ;var FC={},oJ=uv.Tokenizer,I2=uv.TOKEN,Qtt=IC.Directives,Htt=HD.TemplatablePattern,Wtt=t_.Pattern,Ur={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:I2.START,RAW:I2.RAW,EOF:I2.EOF},Ej=new Qtt(/<\!--/,/-->/),Ho=function(t,e){oJ.call(this,t,e),this._current_tag_name="";var n=new Htt(this._input).read_options(this._options),r=new Wtt(this._input);if(this.__patterns={word:n.until(/[\n\r\t <]/),word_control_flow_close_excluded:n.until(/[\n\r\t <}]/),single_quote:n.until_after(/'/),double_quote:n.until_after(/"/),attribute:n.until(/[\n\r\t =>]|\/>/),element_name:n.until(/[\n\r\t >\/]/),angular_control_flow_start:r.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:r.starting_with(/{{!--/).until_after(/--}}/),handlebars:r.starting_with(/{{/).until_after(/}}/),handlebars_open:r.until(/[\n\r\t }]/),handlebars_raw_close:r.until(/}}/),comment:r.starting_with(//),cdata:r.starting_with(//),conditional_comment:r.starting_with(//),processing:r.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var i=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=r.matching(i).until_after(i)}};Ho.prototype=new oJ;Ho.prototype._is_comment=function(t){return!1};Ho.prototype._is_opening=function(t){return t.type===Ur.TAG_OPEN||t.type===Ur.CONTROL_FLOW_OPEN};Ho.prototype._is_closing=function(t,e){return t.type===Ur.TAG_CLOSE&&e&&((t.text===">"||t.text==="/>")&&e.text[0]==="<"||t.text==="}}"&&e.text[0]==="{"&&e.text[1]==="{")||t.type===Ur.CONTROL_FLOW_CLOSE&&t.text==="}"&&e.text.endsWith("{")};Ho.prototype._reset=function(){this._current_tag_name=""};Ho.prototype._get_next_token=function(t,e){var n=null;this._readWhitespace();var r=this._input.peek();return r===null?this._create_token(Ur.EOF,""):(n=n||this._read_open_handlebars(r,e),n=n||this._read_attribute(r,t,e),n=n||this._read_close(r,e),n=n||this._read_control_flows(r,e),n=n||this._read_raw_content(r,t,e),n=n||this._read_content_word(r,e),n=n||this._read_comment_or_cdata(r),n=n||this._read_processing(r),n=n||this._read_open(r,e),n=n||this._create_token(Ur.UNKNOWN,this._input.next()),n)};Ho.prototype._read_comment_or_cdata=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);i==="!"&&(n=this.__patterns.comment.read(),n?(r=Ej.get_directives(n),r&&r.ignore==="start"&&(n+=Ej.readIgnored(this._input))):n=this.__patterns.cdata.read()),n&&(e=this._create_token(Ur.COMMENT,n),e.directives=r)}return e};Ho.prototype._read_processing=function(t){var e=null,n=null,r=null;if(t==="<"){var i=this._input.peek(1);(i==="!"||i==="?")&&(n=this.__patterns.conditional_comment.read(),n=n||this.__patterns.processing.read()),n&&(e=this._create_token(Ur.COMMENT,n),e.directives=r)}return e};Ho.prototype._read_open=function(t,e){var n=null,r=null;return(!e||e.type===Ur.CONTROL_FLOW_OPEN)&&t==="<"&&(n=this._input.next(),this._input.peek()==="/"&&(n+=this._input.next()),n+=this.__patterns.element_name.read(),r=this._create_token(Ur.TAG_OPEN,n)),r};Ho.prototype._read_open_handlebars=function(t,e){var n=null,r=null;return(!e||e.type===Ur.CONTROL_FLOW_OPEN)&&this._options.indent_handlebars&&t==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(n=this.__patterns.handlebars_comment.read(),n=n||this.__patterns.handlebars.read(),r=this._create_token(Ur.COMMENT,n)):(n=this.__patterns.handlebars_open.read(),r=this._create_token(Ur.TAG_OPEN,n))),r};Ho.prototype._read_control_flows=function(t,e){var n="",r=null;if(!this._options.templating.includes("angular")||!this._options.indent_handlebars)return r;if(t==="@"){if(n=this.__patterns.angular_control_flow_start.read(),n==="")return r;for(var i=n.endsWith("(")?1:0,o=0;!(n.endsWith("{")&&i===o);){var a=this._input.next();if(a===null)break;a==="("?i++:a===")"&&o++,n+=a}r=this._create_token(Ur.CONTROL_FLOW_OPEN,n)}else t==="}"&&e&&e.type===Ur.CONTROL_FLOW_OPEN&&(n=this._input.next(),r=this._create_token(Ur.CONTROL_FLOW_CLOSE,n));return r};Ho.prototype._read_close=function(t,e){var n=null,r=null;return e&&e.type===Ur.TAG_OPEN&&(e.text[0]==="<"&&(t===">"||t==="/"&&this._input.peek(1)===">")?(n=this._input.next(),t==="/"&&(n+=this._input.next()),r=this._create_token(Ur.TAG_CLOSE,n)):e.text[0]==="{"&&t==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),r=this._create_token(Ur.TAG_CLOSE,"}}"))),r};Ho.prototype._read_attribute=function(t,e,n){var r=null,i="";if(n&&n.text[0]==="<")if(t==="=")r=this._create_token(Ur.EQUALS,this._input.next());else if(t==='"'||t==="'"){var o=this._input.next();t==='"'?o+=this.__patterns.double_quote.read():o+=this.__patterns.single_quote.read(),r=this._create_token(Ur.VALUE,o)}else i=this.__patterns.attribute.read(),i&&(e.type===Ur.EQUALS?r=this._create_token(Ur.VALUE,i):r=this._create_token(Ur.ATTRIBUTE,i));return r};Ho.prototype._is_content_unformatted=function(t){return this._options.void_elements.indexOf(t)===-1&&(this._options.content_unformatted.indexOf(t)!==-1||this._options.unformatted.indexOf(t)!==-1)};Ho.prototype._read_raw_content=function(t,e,n){var r="";if(n&&n.text[0]==="{")r=this.__patterns.handlebars_raw_close.read();else if(e.type===Ur.TAG_CLOSE&&e.opened.text[0]==="<"&&e.text[0]!=="/"){var i=e.opened.text.substr(1).toLowerCase();if(i==="script"||i==="style"){var o=this._read_comment_or_cdata(t);if(o)return o.type=Ur.TEXT,o;r=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(i)&&(r=this._input.readUntil(new RegExp("","ig")))}return r?this._create_token(Ur.TEXT,r):null};Ho.prototype._read_content_word=function(t,e){var n="";if(this._options.unformatted_content_delimiter&&t===this._options.unformatted_content_delimiter[0]&&(n=this.__patterns.unformatted_content_delimiter.read()),n||(n=e&&e.type===Ur.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),n)return this._create_token(Ur.TEXT,n)};FC.Tokenizer=Ho;FC.TOKEN=Ur;var Utt=XD.Options,qtt=DC.Output,Ytt=FC.Tokenizer,Fr=FC.TOKEN,Tj=/\r\n|[\r\n]/,Xtt=/\r\n|[\r\n]/g,Fs=function(t,e){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=t.max_preserve_newlines,this.preserve_newlines=t.preserve_newlines,this._output=new qtt(t,e)};Fs.prototype.current_line_has_match=function(t){return this._output.current_line.has_match(t)};Fs.prototype.set_space_before_token=function(t,e){this._output.space_before_token=t,this._output.non_breaking_space=e};Fs.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()};Fs.prototype.add_raw_token=function(t){this._output.add_raw_token(t)};Fs.prototype.print_preserved_newlines=function(t){var e=0;t.type!==Fr.TEXT&&t.previous.type!==Fr.TEXT&&(e=t.newlines?1:0),this.preserve_newlines&&(e=t.newlines0);return e!==0};Fs.prototype.traverse_whitespace=function(t){return t.whitespace_before||t.newlines?(this.print_preserved_newlines(t)||(this._output.space_before_token=!0),!0):!1};Fs.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped};Fs.prototype.print_newline=function(t){this._output.add_new_line(t)};Fs.prototype.print_token=function(t){t.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(t.text))};Fs.prototype.indent=function(){this.indent_level++};Fs.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))};Fs.prototype.get_full_indent=function(t){return t=this.indent_level+(t||0),t<1?"":this._output.get_indent_string(t)};var Ztt=function(t){for(var e=null,n=t.next;n.type!==Fr.EOF&&t.closed!==n;){if(n.type===Fr.ATTRIBUTE&&n.text==="type"){n.next&&n.next.type===Fr.EQUALS&&n.next.next&&n.next.next.type===Fr.VALUE&&(e=n.next.next.text);break}n=n.next}return e},Gtt=function(t,e){var n=null,r=null;return e.closed?(t==="script"?n="text/javascript":t==="style"&&(n="text/css"),n=Ztt(e)||n,n.search("text/css")>-1?r="css":n.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?r="javascript":n.search(/(text|application|dojo)\/(x-)?(html)/)>-1?r="html":n.search(/test\/null/)>-1&&(r="null"),r):null};function py(t,e){return e.indexOf(t)!==-1}function Ktt(t,e,n){this.parent=t||null,this.tag=e?e.tag_name:"",this.indent_level=n||0,this.parser_token=e||null}function Cp(t){this._printer=t,this._current_frame=null}Cp.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null};Cp.prototype.record_tag=function(t){var e=new Ktt(this._current_frame,t,this._printer.indent_level);this._current_frame=e};Cp.prototype._try_pop_frame=function(t){var e=null;return t&&(e=t.parser_token,this._printer.indent_level=t.indent_level,this._current_frame=t.parent),e};Cp.prototype._get_frame=function(t,e){for(var n=this._current_frame;n&&t.indexOf(n.tag)===-1;){if(e&&e.indexOf(n.tag)!==-1){n=null;break}n=n.parent}return n};Cp.prototype.try_pop=function(t,e){var n=this._get_frame([t],e);return this._try_pop_frame(n)};Cp.prototype.indent_to_tag=function(t){var e=this._get_frame(t);e&&(this._printer.indent_level=e.indent_level)};function os(t,e,n,r){this._source_text=t||"",e=e||{},this._js_beautify=n,this._css_beautify=r,this._tag_stack=null;var i=new Utt(e,"html");this._options=i,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}os.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var t=this._source_text,e=this._options.eol;this._options.eol==="auto"&&(e=` `,t&&Tj.test(t)&&(e=t.match(Tj)[0])),t=t.replace(Xtt,` `);var n=t.match(/^[\t ]*/)[0],r={text:"",type:""},i=new aJ,o=new Fs(this._options,n),a=new Ytt(t,this._options).tokenize();this._tag_stack=new Cp(o);for(var s=null,l=a.next();l.type!==Fr.EOF;)l.type===Fr.TAG_OPEN||l.type===Fr.COMMENT?(s=this._handle_tag_open(o,l,i,r,a),i=s):l.type===Fr.ATTRIBUTE||l.type===Fr.EQUALS||l.type===Fr.VALUE||l.type===Fr.TEXT&&!i.tag_complete?s=this._handle_inside_tag(o,l,i,r):l.type===Fr.TAG_CLOSE?s=this._handle_tag_close(o,l,i):l.type===Fr.TEXT?s=this._handle_text(o,l,i):l.type===Fr.CONTROL_FLOW_OPEN?s=this._handle_control_flow_open(o,l):l.type===Fr.CONTROL_FLOW_CLOSE?s=this._handle_control_flow_close(o,l):o.add_raw_token(l),r=s,l=a.next();var u=o._output.get_code(e);return u};os.prototype._handle_control_flow_open=function(t,e){var n={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),t.indent(),n};os.prototype._handle_control_flow_close=function(t,e){var n={text:e.text,type:e.type};return t.deindent(),e.newlines?t.print_preserved_newlines(e):t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),t.print_token(e),n};os.prototype._handle_tag_close=function(t,e,n){var r={text:e.text,type:e.type};return t.alignment_size=0,n.tag_complete=!0,t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):(n.tag_start_char==="<"&&(t.set_space_before_token(e.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&n.has_wrapped_attrs&&t.print_newline(!1)),t.print_token(e)),n.indent_content&&!(n.is_unformatted||n.is_content_unformatted)&&(t.indent(),n.indent_content=!1),!n.is_inline_element&&!(n.is_unformatted||n.is_content_unformatted)&&t.set_wrap_point(),r};os.prototype._handle_inside_tag=function(t,e,n,r){var i=n.has_wrapped_attrs,o={text:e.text,type:e.type};return t.set_space_before_token(e.newlines||e.whitespace_before!=="",!0),n.is_unformatted?t.add_raw_token(e):n.tag_start_char==="{"&&e.type===Fr.TEXT?t.print_preserved_newlines(e)?(e.newlines=0,t.add_raw_token(e)):t.print_token(e):(e.type===Fr.ATTRIBUTE?t.set_space_before_token(!0):(e.type===Fr.EQUALS||e.type===Fr.VALUE&&e.previous.type===Fr.EQUALS)&&t.set_space_before_token(!1),e.type===Fr.ATTRIBUTE&&n.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(t.traverse_whitespace(e),i=i||e.newlines!==0),this._is_wrap_attributes_force&&n.attr_count>=this._options.wrap_attributes_min_attrs&&(r.type!==Fr.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(t.print_newline(!1),i=!0)),t.print_token(e),i=i||t.previous_token_wrapped(),n.has_wrapped_attrs=i),o};os.prototype._handle_text=function(t,e,n){var r={text:e.text,type:"TK_CONTENT"};return n.custom_beautifier_name?this._print_custom_beatifier_text(t,e,n):n.is_unformatted||n.is_content_unformatted?t.add_raw_token(e):(t.traverse_whitespace(e),t.print_token(e)),r};os.prototype._print_custom_beatifier_text=function(t,e,n){var r=this;if(e.text!==""){var i=e.text,o,a=1,s="",l="";n.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?o=this._js_beautify:n.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?o=this._css_beautify:n.custom_beautifier_name==="html"&&(o=function(m,g){var y=new os(m,g,r._js_beautify,r._css_beautify);return y.beautify()}),this._options.indent_scripts==="keep"?a=0:this._options.indent_scripts==="separate"&&(a=-t.indent_level);var u=t.get_full_indent(a);if(i=i.replace(/\n[ \t]*$/,""),n.custom_beautifier_name!=="html"&&i[0]==="<"&&i.match(/^(|]]>)$/.exec(i);if(!c){t.add_raw_token(e);return}s=u+c[1]+` `,i=c[4],c[5]&&(l=u+c[5]),i=i.replace(/\n[ \t]*$/,""),(c[2]||c[3].indexOf(` `)!==-1)&&(c=c[3].match(/[ \t]+$/),c&&(e.whitespace_before=c[0]))}if(i)if(o){var d=function(){this.eol=` `};d.prototype=this._options.raw_options;var f=new d;i=o(u+i,f)}else{var h=e.whitespace_before;h&&(i=i.replace(new RegExp(` (`+h+")?","g"),` `)),i=u+i.replace(/\n/g,` `+u)}s&&(i?i=s+i+` `+l:i=s+l),t.print_newline(!1),i&&(e.text=i,e.whitespace_before="",e.newlines=0,t.add_raw_token(e),t.print_newline(!0))}};os.prototype._handle_tag_open=function(t,e,n,r,i){var o=this._get_tag_open_token(e);if((n.is_unformatted||n.is_content_unformatted)&&!n.is_empty_element&&e.type===Fr.TAG_OPEN&&!o.is_start_tag?(t.add_raw_token(e),o.start_tag_token=this._tag_stack.try_pop(o.tag_name)):(t.traverse_whitespace(e),this._set_tag_position(t,e,o,n,r),o.is_inline_element||t.set_wrap_point(),t.print_token(e)),o.is_start_tag&&this._is_wrap_attributes_force){var a=0,s;do s=i.peek(a),s.type===Fr.ATTRIBUTE&&(o.attr_count+=1),a+=1;while(s.type!==Fr.EOF&&s.type!==Fr.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(o.alignment_size=e.text.length+1),!o.tag_complete&&!o.is_unformatted&&(t.alignment_size=o.alignment_size),o};var aJ=function(t,e){if(this.parent=t||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!e)this.tag_complete=!0;else{var n;this.tag_start_char=e.text[0],this.text=e.text,this.tag_start_char==="<"?(n=e.text.match(/^<([^\s>]*)/),this.tag_check=n?n[1]:""):(n=e.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=n?n[1]:"",(e.text.startsWith("{{#>")||e.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&e.next!==null?this.tag_check=e.next.text.split(" ")[0]:this.tag_check=e.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),e.type===Fr.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||e.closed&&e.closed.text==="/>";var r=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(r=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(r)))}};os.prototype._get_tag_open_token=function(t){var e=new aJ(this._tag_stack.get_parser_token(),t);return e.alignment_size=this._options.wrap_attributes_indent_size,e.is_end_tag=e.is_end_tag||py(e.tag_check,this._options.void_elements),e.is_empty_element=e.tag_complete||e.is_start_tag&&e.is_end_tag,e.is_unformatted=!e.tag_complete&&py(e.tag_check,this._options.unformatted),e.is_content_unformatted=!e.is_empty_element&&py(e.tag_check,this._options.content_unformatted),e.is_inline_element=py(e.tag_name,this._options.inline)||this._options.inline_custom_elements&&e.tag_name.includes("-")||e.tag_start_char==="{",e};os.prototype._set_tag_position=function(t,e,n,r,i){if(n.is_empty_element||(n.is_end_tag?n.start_tag_token=this._tag_stack.try_pop(n.tag_name):(this._do_optional_end_element(n)&&(n.is_inline_element||t.print_newline(!1)),this._tag_stack.record_tag(n),(n.tag_name==="script"||n.tag_name==="style")&&!(n.is_unformatted||n.is_content_unformatted)&&(n.custom_beautifier_name=Gtt(n.tag_check,e)))),py(n.tag_check,this._options.extra_liners)&&(t.print_newline(!1),t._output.just_added_blankline()||t.print_newline(!0)),n.is_empty_element){if(n.tag_start_char==="{"&&n.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),n.indent_content=!0;var o=t.current_line_has_match(/{{#if/);o||t.print_newline(!1)}n.tag_name==="!--"&&i.type===Fr.TAG_CLOSE&&r.is_end_tag&&n.text.indexOf(` `)===-1||(n.is_inline_element||n.is_unformatted||t.print_newline(!1),this._calcluate_parent_multiline(t,n))}else if(n.is_end_tag){var a=!1;a=n.start_tag_token&&n.start_tag_token.multiline_content,a=a||!n.is_inline_element&&!(r.is_inline_element||r.is_unformatted)&&!(i.type===Fr.TAG_CLOSE&&n.start_tag_token===r)&&i.type!=="TK_CONTENT",(n.is_content_unformatted||n.is_unformatted)&&(a=!1),a&&t.print_newline(!1)}else n.indent_content=!n.custom_beautifier_name,n.tag_start_char==="<"&&(n.tag_name==="html"?n.indent_content=this._options.indent_inner_html:n.tag_name==="head"?n.indent_content=this._options.indent_head_inner_html:n.tag_name==="body"&&(n.indent_content=this._options.indent_body_inner_html)),!(n.is_inline_element||n.is_unformatted)&&(i.type!=="TK_CONTENT"||n.is_content_unformatted)&&t.print_newline(!1),this._calcluate_parent_multiline(t,n)};os.prototype._calcluate_parent_multiline=function(t,e){e.parent&&t._output.just_added_newline()&&!((e.is_inline_element||e.is_unformatted)&&e.parent.is_inline_element)&&(e.parent.multiline_content=!0)};var Jtt=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],ent=["a","audio","del","ins","map","noscript","video"];os.prototype._do_optional_end_element=function(t){var e=null;if(!(t.is_empty_element||!t.is_start_tag||!t.parent)){if(t.tag_name==="body")e=e||this._tag_stack.try_pop("head");else if(t.tag_name==="li")e=e||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(t.tag_name==="dd"||t.tag_name==="dt")e=e||this._tag_stack.try_pop("dt",["dl"]),e=e||this._tag_stack.try_pop("dd",["dl"]);else if(t.parent.tag_name==="p"&&Jtt.indexOf(t.tag_name)!==-1){var n=t.parent.parent;(!n||ent.indexOf(n.tag_name)===-1)&&(e=e||this._tag_stack.try_pop("p"))}else t.tag_name==="rp"||t.tag_name==="rt"?(e=e||this._tag_stack.try_pop("rt",["ruby","rtc"]),e=e||this._tag_stack.try_pop("rp",["ruby","rtc"])):t.tag_name==="optgroup"?e=e||this._tag_stack.try_pop("optgroup",["select"]):t.tag_name==="option"?e=e||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):t.tag_name==="colgroup"?e=e||this._tag_stack.try_pop("caption",["table"]):t.tag_name==="thead"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"])):t.tag_name==="tbody"||t.tag_name==="tfoot"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("thead",["table"]),e=e||this._tag_stack.try_pop("tbody",["table"])):t.tag_name==="tr"?(e=e||this._tag_stack.try_pop("caption",["table"]),e=e||this._tag_stack.try_pop("colgroup",["table"]),e=e||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(t.tag_name==="th"||t.tag_name==="td")&&(e=e||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),e=e||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return t.parent=this._tag_stack.get_parser_token(),e}};nJ.Beautifier=os;var tnt=nJ.Beautifier,nnt=XD.Options;function rnt(t,e,n,r){var i=new tnt(t,e,n,r);return i.beautify()}YD.exports=rnt;YD.exports.defaultOptions=function(){return new nnt};var sJ=FD.exports,lJ=UD.exports,uJ=YD.exports;function cJ(t,e,n,r){return n=n||sJ,r=r||lJ,uJ(t,e,n,r)}cJ.defaultOptions=uJ.defaultOptions;NC.js=sJ;NC.css=lJ;NC.html=cJ;(function(t){function e(n,r,i){var o=function(a,s){return n.js_beautify(a,s)};return o.js=n.js_beautify,o.css=r.css_beautify,o.html=i.html_beautify,o.js_beautify=n.js_beautify,o.css_beautify=r.css_beautify,o.html_beautify=i.html_beautify,o}(function(n){var r=NC;r.js_beautify=r.js,r.css_beautify=r.css,r.html_beautify=r.html,n.exports=e(r,r,r)})(t)})(BK);var lb=BK.exports;const kj=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],zc=(()=>{if(typeof document=="undefined")return!1;const t=kj[0],e={};for(const n of kj)if((n==null?void 0:n[1])in document){for(const[i,o]of n.entries())e[t[i]]=o;return e}return!1})(),Pj={change:zc.fullscreenchange,error:zc.fullscreenerror};let Os={request(t=document.documentElement,e){return new Promise((n,r)=>{const i=()=>{Os.off("change",i),n()};Os.on("change",i);const o=t[zc.requestFullscreen](e);o instanceof Promise&&o.then(i).catch(r)})},exit(){return new Promise((t,e)=>{if(!Os.isFullscreen){t();return}const n=()=>{Os.off("change",n),t()};Os.on("change",n);const r=document[zc.exitFullscreen]();r instanceof Promise&&r.then(n).catch(e)})},toggle(t,e){return Os.isFullscreen?Os.exit():Os.request(t,e)},onchange(t){Os.on("change",t)},onerror(t){Os.on("error",t)},on(t,e){const n=Pj[t];n&&document.addEventListener(n,e,!1)},off(t,e){const n=Pj[t];n&&document.removeEventListener(n,e,!1)},raw:zc};Object.defineProperties(Os,{isFullscreen:{get:()=>Boolean(document[zc.fullscreenElement])},element:{enumerable:!0,get:()=>{var t;return(t=document[zc.fullscreenElement])!=null?t:void 0}},isEnabled:{enumerable:!0,get:()=>Boolean(document[zc.fullscreenEnabled])}});zc||(Os={isEnabled:!1});var Hr=Os;const int={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},ont={style:{flex:"auto"}},ant={__name:"ExportDialog",props:["show","data","ruleChainId","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=t,r=[sv()],{show:i,data:o,ruleChainId:a}=Ri(n),s=F(!1),l=F(null),u=F("450px"),c=()=>{let m=new Blob([o.value],{type:"text/plain;charset=utf-8"});NX.exports.saveAs(m,a.value+".json")},d=()=>{n.lf.getSnapshot(a.value+".png","#FFF")},f=()=>{e("close")},h=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(l.value[0]))};return Hr.on("change",()=>{Hr.isFullscreen?(u.value="100%",s.value=!0):(u.value="450px",s.value=!1)}),(m,g)=>{const y=ho,b=fo,w=lr,O=Ma;return R(),we(O,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:p(i)},{header:z(()=>[B(b,null,{default:z(()=>[B(y,{span:12},{default:z(()=>[qe("\u5BFC\u51FA\u6D41\u7A0BDSL")]),_:1})]),_:1})]),footer:z(()=>[J("div",ont,[B(w,{type:"primary",onClick:d},{default:z(()=>[qe("\u4E0B\u8F7D\u56FE\u7247")]),_:1}),B(w,{type:"primary",onClick:c},{default:z(()=>[qe("\u4E0B\u8F7D\u6570\u636E")]),_:1}),B(w,{onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[J("div",int,[B(w,{icon:s.value?p(Lx):p(zm),size:"small",onClick:h,circle:""},null,8,["icon"])]),B(p(Vu),{modelValue:p(o),"onUpdate:modelValue":g[0]||(g[0]=S=>kr(o)?o.value=S:null),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u5B9A\u4E49JSON\u5185\u5BB9...",ref_key:"codeEditorRef",ref:l,style:mt({height:u.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:r},null,8,["modelValue","style"])]),_:1},8,["modelValue"])}}},snt=J("label",null,"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",-1),lnt={style:{flex:"auto","text-align":"right"}},unt={__name:"ImportDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const n=[sv()],r=F(),i=F(),o=F(!1),a=F(null),s=F("400px"),l=Sn({data:""});function u(g,y){y.value=y;const b=new FileReader;b.onload=w=>{try{l.data=w.target.result}catch(O){Vr.error("Invalid JSON format:"+O)}},b.readAsText(g.raw)}function c(g){return!1}const d=()=>{e("submit",l.data)},f=()=>{e("close")},h=function(){l.data=lb.js(l.data,{indent_size:2})},m=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(a.value[0]))};return Hr.on("change",()=>{Hr.isFullscreen?(s.value=window.innerHeight+"px",o.value=!0):(s.value="400px",o.value=!1)}),(g,y)=>{const b=lr,w=Iq,O=Tl,S=ho,x=fo,C=El,E=Ma;return R(),we(E,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{footer:z(()=>[J("div",lnt,[B(b,{type:"primary",size:"large",onClick:d},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{size:"large",onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(C,{model:l,ref_key:"formRef",ref:r,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:z(()=>[B(O,null,{default:z(()=>[B(w,{"file-list":i.value,"onUpdate:fileList":y[0]||(y[0]=T=>i.value=T),class:"upload-demo",action:null,"on-change":u,"before-upload":c,limit:1,accept:".json"},{default:z(()=>[B(b,{type:"default"},{default:z(()=>[qe("\u5BFC\u5165\u6D41\u7A0BDSL\u6587\u4EF6")]),_:1})]),_:1},8,["file-list"])]),_:1}),B(O,{label:"\u5728\u4E0B\u65B9\u7C98\u8D34\u6D41\u7A0BDSL",prop:"data"},{label:z(()=>[B(x,null,{default:z(()=>[B(S,{span:20},{default:z(()=>[snt]),_:1}),B(S,{span:4,style:{"text-align":"right"}},{default:z(()=>[B(b,{type:"info",size:"small",round:"",onClick:h},{default:z(()=>[qe("\u6574\u7406")]),_:1}),B(b,{icon:o.value?p(Lx):p(zm),size:"small",onClick:m,circle:""},null,8,["icon"])]),_:1})]),_:1})]),default:z(()=>[J("div",{ref_key:"codeEditorRef",ref:a,style:{width:"100%"}},[B(p(Vu),{modelValue:l.data,"onUpdate:modelValue":y[1]||(y[1]=T=>l.data=T),placeholder:"\u8BF7\u7C98\u8D34\u6D41\u7A0BDSL",style:mt({height:s.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:n},null,8,["modelValue","style"])],512)]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},cnt={__name:"NodeOperate",props:["currentElementPosition"],emits:["edit","delete"],setup(t,{emit:e}){const n=()=>{e("edit")},r=()=>{e("delete")};return(i,o)=>{const a=lr;return R(),G("div",{style:mt({position:"absolute",top:t.currentElementPosition.y+"px",left:t.currentElementPosition.x+"px"})},[B(a,{type:"danger",size:"small",icon:p(VQ),onClick:n,circle:""},null,8,["icon"]),B(a,{type:"danger",size:"small",icon:p(l$),onClick:r,circle:"",style:{"margin-left":"3px"}},null,8,["icon"])],4)}}},dnt=(t,e,n,r,i,o,a,s)=>{let l=t.url+t.executeApi,u=t.url+t.notifyApi,c="";n?c=l.replace(":msgType",i).replace(":id",e):c=u.replace(":msgType",i).replace(":id",e),c=c+"?msgId="+r+"&"+o;const d={method:"POST",headers:s.headers,body:a},f={data:null,headers:null};return new Promise((h,m)=>{fetch(c,d).then(g=>{const y={};for(const[b,w]of g.headers.entries())y[b]=w;return f.headers=y,g.text()}).then(g=>{try{f.data=JSON.parse(g)}catch{f.data=g}h(f)}).catch(g=>{h(g)})})},fnt={class:"log-data"},hnt={__name:"logs",props:["logData","ruleChain","lf"],setup(t){const e=t,n=F([]);Ve(()=>e.logData,()=>{n.value=e.logData.map(i=>i.nodeId)});function r(i){var o,a;return((a=(o=e.lf.getNodeDataById(i))==null?void 0:o.properties)==null?void 0:a.model)||{}}return(i,o)=>{const a=gt,s=Bs,l=Gx,u=Zx;return R(),G("view",fnt,[B(u,{modelValue:n.value,"onUpdate:modelValue":o[0]||(o[0]=c=>n.value=c)},{default:z(()=>[(R(!0),G(ct,null,Wt(t.logData,c=>(R(),we(l,{name:c.nodeId,key:c.nodeId},{title:z(()=>[B(a,{color:"#13ce66",style:{"margin-right":"10px","font-size":"24px"}},{default:z(()=>[B(p(d$))]),_:1}),qe(je(r(c.nodeId).name)+" ",1),B(s,{style:{"margin-left":"20px"}},{default:z(()=>[qe(je(r(c.nodeId).type),1)]),_:2},1024)]),default:z(()=>[B(u,{"model-value":["\u65E5\u5FD7"]},{default:z(()=>[B(l,{title:"\u8F93\u5165"},{title:z(()=>[qe(" \u8F93\u5165 ")]),default:z(()=>[qe(" "+je(c.inMsg),1)]),_:2},1024),B(l,{title:"\u8F93\u5165"},{title:z(()=>[qe(" \u8F93\u51FA ")]),default:z(()=>[qe(" "+je(c.outMsg),1)]),_:2},1024)]),_:2},1024)]),_:2},1032,["name"]))),128))]),_:1},8,["modelValue"])])}}},pnt={style:{float:"right"}},gnt={__name:"RunPanel",props:["lf","show","data"],emits:["submit","close"],setup(t,{emit:e}){const{lf:n,show:r,data:i}=t,o=[sv()],a=F(!1),s=F("metadata"),l=F("response"),u=n.getRuleChain().id,c=Sn({data:"",headers:""}),d=F([]),f=F({}),h=F(""),m=F(),g=Sn({wait:!0,msgType:"testMsgType",headers:`{ "Content-Type": "application/json" }`,metadata:"key1=value1&key2=value2",body:`{ "temperature":68 }`}),y=F(null);function b(){y&&y.value&&y.value.close();let C=BP();y.value=new WebSocket(window.allEnv.rule.wsServer+"/api/v1/logs/ws/"+u+"/"+C),y.value.onmessage=E=>{let T=f.value,P=JSON.parse(E.data),A=P.nodeId;if(P.chainId===u){if(P.flowType==="Log"){let N=T[A];N?N.logItems.push(P.msg.data):T[A]={nodeId:A,logItems:[]}}else if(P.flowType==="OUT"){let N=T[A];N?(N.outMsg=P.msg,N.err=P.err,N.relationType=P.relationType,N.endTs=E.ts||new Date().getTime()):T[A]={nodeId:A,outMsg:P.msg,relationType:P.relationType,err:P.err,logItems:[],endTs:E.ts||new Date().getTime()}}else if(P.flowType==="IN"){let N=T[A];N?(N.inMsg=P.msg,N.startTs=E.ts||new Date().getTime()):T[A]={nodeId:A,logItems:[],inMsg:P.msg,startTs:E.ts||new Date().getTime()}}f.value=T,d.value=Object.values(T).sort((N,$)=>N.startTs===$.startTs?N.endTs-$.endTs:N.startTs-$.startTs)}},y.value.onopen=()=>{console.log("WebSocket connected")},y.value.onerror=E=>{console.error("WebSocket error",E)},y.value.onclose=()=>{console.log("WebSocket disconnected")}}Bt(()=>{y.value&&y.value.close(),b()}),ed(()=>{y.value&&y.value.close()});const w=async(C,E,T,P,A,D)=>{try{l.value==="response"&&(a.value=!0),c.data="",c.headers="",h.value=BP(),d.value=[],f.value={};const N=n.getEditorSetting(),$=await dnt(N,E,C,h.value,T,P,A,D);$.data&&(c.data=JSON.stringify($.data,null," ")),c.headers=JSON.stringify($.headers,null," ")}catch(N){Vr({showClose:!0,message:N.response&&N.response.data||N.code,type:"error"})}finally{a.value=!1}},O=C=>{!C||C.validate(E=>{if(E){let T={headers:JSON.parse(g.headers)};w(g.wait,u,g.msgType,g.metadata,g.body,T)}else return!1})},S=()=>{l.value==="log"&&y&&y.value&&y.value.readyState===WebSocket.CLOSED&&(console.log("\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5..."),b())},x=()=>{e("close")};return(C,E)=>{const T=hi,P=Tl,A=Sp,D=wp,N=Is,$=lr,W=El,L=ho,I=fo,U=bP;return Ht((R(),G("div",null,[B(I,{gutter:20},{default:z(()=>[B(L,{span:10,class:"send-form"},{default:z(()=>[B(W,{model:g,ref_key:"formRef",ref:m,"label-position":"top","label-width":"auto"},{default:z(()=>[B(P,{label:"\u6D88\u606F\u7C7B\u578B",rules:[{required:!0,message:"\u6D88\u606F\u7C7B\u578B\u662F\u5FC5\u987B\u7684"}],prop:"msgType"},{default:z(()=>[B(T,{modelValue:g.msgType,"onUpdate:modelValue":E[0]||(E[0]=Q=>g.msgType=Q),placeholder:"\u8BF7\u8F93\u5165\u6D88\u606F\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),B(D,{modelValue:s.value,"onUpdate:modelValue":E[3]||(E[3]=Q=>s.value=Q)},{default:z(()=>[B(A,{label:"\u5143\u6570\u636E",name:"metadata"},{default:z(()=>[B(p(Vu),{modelValue:g.metadata,"onUpdate:modelValue":E[1]||(E[1]=Q=>g.metadata=Q),placeholder:"\u8BF7\u8F93\u5165\u5143\u6570\uFF0C\u636E\u683C\u5F0F\uFF1Akey1=value1&key2=value2",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(A,{label:"\u8BF7\u6C42\u5934",name:"headers"},{default:z(()=>[B(p(Vu),{modelValue:g.headers,"onUpdate:modelValue":E[2]||(E[2]=Q=>g.headers=Q),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u5934\u6570\u636E",style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),B(P,{label:"\u8BF7\u6C42\u4F53",prop:"body"},{default:z(()=>[B(p(Vu),{modelValue:g.body,"onUpdate:modelValue":E[4]||(E[4]=Q=>g.body=Q),placeholder:"\u8BF7\u8F93\u5165\u8BF7\u6C42\u4F53\u6570\u636E",style:{height:"200px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(P,null,{default:z(()=>[B(N,{modelValue:g.wait,"onUpdate:modelValue":E[5]||(E[5]=Q=>g.wait=Q),label:"\u8F93\u51FA\u7ED3\u679C"},null,8,["modelValue"])]),_:1}),J("div",pnt,[B($,{type:"default",onClick:E[6]||(E[6]=Q=>x())},{default:z(()=>[qe("\u5173\u95ED")]),_:1}),B($,{type:"primary",loading:a.value,onClick:E[7]||(E[7]=Q=>O(m.value))},{default:z(()=>[qe("\u53D1\u9001")]),_:1},8,["loading"])])]),_:1},8,["model"])]),_:1}),B(L,{span:14},{default:z(()=>[B(D,{type:"card",modelValue:l.value,"onUpdate:modelValue":E[10]||(E[10]=Q=>l.value=Q),onTabChange:S},{default:z(()=>[B(A,{label:"\u8F93\u51FA",name:"response"},{default:z(()=>[B(W,{"label-position":"top","label-width":"auto"},{default:z(()=>[B(P,{label:"\u54CD\u5E94\u5934"},{default:z(()=>[B(p(Vu),{modelValue:c.headers,"onUpdate:modelValue":E[8]||(E[8]=Q=>c.headers=Q),editable:!1,style:{height:"100px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1}),B(P,{label:"\u54CD\u5E94\u4F53"},{default:z(()=>[B(p(Vu),{modelValue:c.data,"onUpdate:modelValue":E[9]||(E[9]=Q=>c.data=Q),placeholder:"",editable:!1,style:{height:"300px",width:"100%"},autofocus:!0,tabSize:2,extensions:o},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(A,{label:"\u65E5\u5FD7",name:"log"},{default:z(()=>{var Q;return[(Q=d.value)!=null&&Q.length?(R(),we(hnt,{key:0,lf:t.lf,logData:d.value,ruleChainId:p(u),msgId:h.value},null,8,["lf","logData","ruleChainId","msgId"])):_e("",!0)]}),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})])),[[U,a.value]])}}};var mnt=Pl(gnt,[["__scopeId","data-v-249a8b3f"]]);const vnt={__name:"RunDialog",props:["show","lf"],emits:["submit","close",'"operate"'],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(""),o=F(""),a=F(""),s=()=>{e("close")},l=(c,d)=>{e("operate",c,d)},u=()=>{i.value=r.getRuleChain().id;let c=r.getEditorSetting();o.value=c.url+c.executeApi,a.value=c.url+c.notifyApi};return(c,d)=>{const f=Ma;return R(),we(f,{"append-to-body":!0,"destroy-on-close":!1,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"80%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:u},{header:z(()=>[qe(" \u8FD0\u884C\u6D41\u7A0B ")]),default:z(()=>[B(mnt,{lf:t.lf,onClose:s,onOperate:l},null,8,["lf"])]),_:1},8,["modelValue"])}}},ynt={style:{flex:"auto","text-align":"right"}},bnt={__name:"FlowForm",props:["show","lf","ruleChain","flowStatus"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r,ruleChain:i,flowStatus:o}=t,a=F(),s=()=>{if(o===0){e("submit",i);return}let u=r.getEditorSetting().url+r.getEditorSetting().chainsApi;fetch(u+`/${i.id}/base`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Bn(i))}).then(c=>c.ok?c.text():c.text().then(d=>{throw new Error(`${d}`)})).then(c=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),e("submit",i)}).catch(c=>{Vr.error(`\u4FDD\u5B58\u5931\u8D25: ${c.message}`)})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Tl,h=Xm,m=lr,g=El;return R(),we(g,{model:t.ruleChain,ref_key:"formRef",ref:a,"label-position":"top","label-width":"auto"},{default:z(()=>[B(f,{label:"ID",prop:"id"},{default:z(()=>[B(d,{modelValue:t.ruleChain.id,"onUpdate:modelValue":c[0]||(c[0]=y=>t.ruleChain.id=y),disabled:""},null,8,["modelValue"])]),_:1}),B(f,{label:"\u540D\u79F0",prop:"name"},{default:z(()=>[B(d,{modelValue:t.ruleChain.name,"onUpdate:modelValue":c[1]||(c[1]=y=>t.ruleChain.name=y),placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u540D\u79F0"},null,8,["modelValue"])]),_:1}),B(f,{label:"\u6839\u89C4\u5219\u94FE",prop:"root"},{default:z(()=>[B(h,{class:"ml-2",disabled:"",modelValue:t.ruleChain.root,"onUpdate:modelValue":c[2]||(c[2]=y=>t.ruleChain.root=y),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"])]),_:1}),B(f,{label:"\u63CF\u8FF0",prop:"description"},{default:z(()=>[B(d,{modelValue:t.ruleChain.additionalInfo.description,"onUpdate:modelValue":c[3]||(c[3]=y=>t.ruleChain.additionalInfo.description=y),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u89C4\u5219\u94FE\u63CF\u8FF0"},null,8,["modelValue"])]),_:1}),J("div",ynt,[B(m,{type:"primary",onClick:s},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(m,{onClick:l},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),_:1},8,["model"])}}},_nt={style:{flex:"auto","text-align":"right"}},Ont={__name:"VarsForm",props:{show:Boolean,data:{type:Object,default:()=>F({key:"",value:""})},isNew:{type:Boolean,default:()=>!1}},emits:["submit","close"],setup(t,{emit:e}){const{show:n,data:r,isNew:i}=t,o=F(),a=r,s=u=>{!u||u.validate(c=>{if(c)e("submit",Bn(a));else return!1})},l=()=>{e("close")};return(u,c)=>{const d=hi,f=Tl,h=lr,m=El,g=Ma;return R(),we(g,{modelValue:t.show,"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"before-close":l},{default:z(()=>[B(m,{model:p(a),ref_key:"formRef",ref:o,"label-position":"top","label-width":"auto"},{default:z(()=>[B(f,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"key"},{default:z(()=>[B(d,{modelValue:p(a).key,"onUpdate:modelValue":c[0]||(c[0]=y=>p(a).key=y),disabled:!t.isNew,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0"},null,8,["modelValue","disabled"])]),_:1}),B(f,{label:"\u503C",rules:[{required:!0,message:"\u503C\u662F\u5FC5\u987B\u7684"}],prop:"value"},{default:z(()=>[B(d,{modelValue:p(a).value,"onUpdate:modelValue":c[1]||(c[1]=y=>p(a).value=y),type:"textarea",rows:"4",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue"])]),_:1}),J("div",_nt,[B(h,{type:"default",onClick:l},{default:z(()=>[qe("\u53D6\u6D88")]),_:1}),B(h,{type:"primary",onClick:c[2]||(c[2]=y=>s(o.value))},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1})])]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},wnt={__name:"VarsTable",props:["ruleChain","varType","lf","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const{ruleChain:r,varType:i,lf:o,flowStatus:a}=t,s=F(!1),l=F({}),u=F(!1),c=F([]),d=()=>{l.value={key:"",value:""},u.value=!0,s.value=!0},f=O=>{l.value=O,u.value=!0,s.value=!1},h=O=>{l.value=O;const S=c.value.findIndex(C=>C.key===O.key);S!==-1&&c.value.splice(S,1);const x=r.id;w(x,i,c.value)},m=()=>{u.value=!1},g=O=>{b(O)},y=O=>{const S=c.value.findIndex(C=>C.key===O.key);S!==-1?c.value[S].value=O.value:c.value.push(O);const x=r.id;w(x,i,c.value)},b=O=>{if(!O||!O.configuration||!O.configuration[i])return c.value=[],[];const S=Object.keys(O.configuration[i]).map(x=>({key:x,value:O.configuration[i][x]}));return c.value=S,S},w=async(O,S,x)=>{const C={};if(x.forEach(T=>{C[T.key]=T.value}),a===0){const T=Bn(r);T.configuration||(T.configuration={}),T.configuration[S]=C,m(),n("submit",T,"config");return}let E=o.getEditorSetting().url+o.getEditorSetting().chainsApi;fetch(E+`/${r.id}/config/${S}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)}).then(T=>T.ok?T.text():T.text().then(P=>{throw new Error(`${P}`)})).then(T=>{Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"}),m();const P=Bn(r);P.configuration||(P.configuration={}),P.configuration[S]=C,n("submit",P,"config")}).catch(T=>{Vr.error(`\u4FDD\u5B58\u5931\u8D25: ${T.message}`)})};return e({updateData:g}),(O,S)=>{const x=lr,C=$b,E=Rb;return R(),G(ct,null,[B(x,{style:{float:"right"},onClick:d},{default:z(()=>[qe(je(t.varType==="vars"?"\u65B0\u5EFA\u53D8\u91CF":"\u65B0\u5EFA\u79D8\u94A5"),1)]),_:1}),B(E,{data:b(t.ruleChain),stripe:"",style:{width:"100%"}},{default:z(()=>[B(C,{prop:"key",label:"\u540D\u79F0"}),t.varType==="vars"?(R(),we(C,{key:0,prop:"value",label:"\u503C"})):_e("",!0),B(C,{fixed:"right",label:"\u64CD\u4F5C"},{default:z(({row:T})=>[t.varType==="vars"?(R(),we(x,{key:0,link:"",type:"primary",size:"small",onClick:P=>f(T)},{default:z(()=>[qe("\u7F16\u8F91")]),_:2},1032,["onClick"])):_e("",!0),B(x,{link:"",type:"primary",size:"small",onClick:P=>h(T)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),u.value?(R(),we(Ont,{key:0,isNew:s.value,data:l.value,show:u.value,varType:t.varType,onSubmit:y,onClose:m},null,8,["isNew","data","show","varType"])):_e("",!0)],64)}}},Snt={__name:"FlowInfoDialog",props:["show","lf","ruleChain","fromActiveName","flowStatus"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s,flowStatus:l}=Ri(r),u=F("info");F();const c=F(),d=async y=>{try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(y),Vr({showClose:!0,message:"\u590D\u5236\u6210\u529F",type:"success"});else{const b=document.createElement("textarea");b.value=y,document.body.appendChild(b),b.focus(),b.select();const w=document.execCommand("copy");Vr({showClose:!0,message:w?"\u590D\u5236\u6210\u529F":"\u590D\u5236\u5931\u8D25",type:w?"success":"error"}),document.body.removeChild(b)}}catch(b){console.error("Failed to copy: ",b)}},f=(y,b)=>{n("submit",y,b||"base")},h=()=>{n("close")},m=()=>{};return e({changeActiveName:y=>{u.value=y}}),(y,b)=>{const w=ho,O=fo,S=Sp,x=Bs,C=JW,E=KW,T=wp,P=Ma;return R(),we(P,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"60%",draggable:"",top:"10px","before-close":h,modelValue:p(i)},{header:z(()=>[B(O,null,{default:z(()=>[B(w,{span:12},{default:z(()=>[qe(je(p(a).name),1)]),_:1})]),_:1})]),default:z(()=>[B(T,{modelValue:u.value,"onUpdate:modelValue":b[2]||(b[2]=A=>u.value=A),"tab-position":"left",onTabChange:m},{default:z(()=>[B(S,{label:"\u57FA\u7840\u4FE1\u606F",name:"info"},{default:z(()=>[B(bnt,{lf:p(o),flowStatus:p(l),ruleChain:p(a),onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u53D8\u91CF",name:"vars"},{default:z(()=>[B(wnt,{lf:p(o),ref_key:"varsRef",ref:c,flowStatus:p(l),ruleChain:p(a),varType:"vars",onSubmit:f,onClose:h},null,8,["lf","flowStatus","ruleChain"])]),_:1}),B(S,{label:"\u5E94\u7528\u96C6\u6210",name:"app"},{default:z(()=>[B(x,{style:{"margin-bottom":"20px"},size:"small",type:"info"},{default:z(()=>[qe("\u5E94\u7528\u901A\u8FC7\u8C03\u7528\u4EE5\u4E0B\u63A5\u53E3\u6267\u884C\u89C4\u5219\u94FE")]),_:1}),B(E,{column:"1",border:"",title:""},{default:z(()=>[B(C,{label:"\u540C\u6B65\u63A5\u53E3"},{default:z(()=>[J("span",{onClick:b[0]||(b[0]=A=>d("/api/v1/rules/"+p(a).id+"/execute/{msgType}"))}," POST /api/v1/rules/"+je(p(a).id)+"/execute/{msgType}",1),B(x,{size:"small",type:"info"},{default:z(()=>[qe("\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1}),B(C,{label:"\u5F02\u6B65\u63A5\u53E3"},{default:z(()=>[J("span",{onClick:b[1]||(b[1]=A=>d("/api/v1/rules/"+p(a).id+"/notify/{msgType}"))}," POST /api/v1/rules/"+je(p(a).id)+"/notify/{msgType}",1),B(x,{size:"small",type:"info"},{default:z(()=>[qe("\u4E0D\u5173\u6CE8\u89C4\u5219\u94FE\u5904\u7406\u7ED3\u679C")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},xnt={__name:"NodeMgtNodeTree",props:["show","lf"],emits:["updateNodeState"],setup(t,{expose:e,emit:n}){const{show:r,lf:i}=t;sv(),F("locals");const o=F([{id:1,label:"Level one 1",children:[{id:4,label:"Level two 1-1",children:[{id:9,label:"Level three 1-1-1"},{id:10,label:"Level three 1-1-2"}]}]}]);Bt(()=>{let c=i.getOptions();o.value=l(c.components)});const a=c=>{let d=o.value,f=[];d.forEach(h=>{h.type===c.type?(h.disabled=!h.disabled,f.push({type:h.type,disabled:h.disabled,category:h.category}),h.children&&h.children.length>0&&h.children.forEach(m=>{m.disabled=h.disabled,f.push({type:m.type,disabled:m.disabled,category:m.category})})):h.children&&h.children.length>0&&h.children.forEach(m=>{m.type===c.type&&(m.disabled=!m.disabled,f.push({type:m.type,disabled:m.disabled,category:m.category}))})}),n("updateNodeState",f),o.value=d},s=c=>c.map(d=>{var f;return{type:d.type,label:d.label,category:d.type,isTop:!0,background:d.background,disabled:(f=d.disabled)!=null?f:!1,children:d.components.map(h=>{var m;return{type:h.type,label:h.label,category:d.type,disabled:(m=h.disabled)!=null?m:!1,children:[]}})}}),l=c=>{let d=[];return Object.keys(c).forEach(f=>{let h=c[f];d.push({label:h.label,components:h.components,type:f})}),s(d)};return e({renderData:c=>{o.value=l(c)}}),(c,d)=>{const f=gt,h=lr,m=T0;return R(),we(m,{style:{"max-width":"600px"},data:o.value,"node-key":"type","default-expand-all":"","expand-on-click-node":!0},{default:z(({node:g,data:y})=>[J("span",{class:j({"item-is-disabled":y.disabled,"custom-tree-node":!0})},[J("span",null,[qe(je(y.label)+" ",1),B(f,null,{default:z(()=>[y.isTop?(R(),G("span",{key:0,class:"tree-node-icon",style:mt({backgroundImage:`url(${y.icon?y.icon:"/images/"+y.category+"-dark.svg"})`})},null,4)):_e("",!0)]),_:2},1024)]),J("span",null,[B(h,{size:"small",onClick:b=>a(y)},{default:z(()=>[qe(je(y.disabled?"\u542F\u7528":"\u7981\u7528"),1)]),_:2},1032,["onClick"])])],2)]),_:1},8,["data"])}}};var Cnt=Pl(xnt,[["__scopeId","data-v-6d2066a0"]]);const Ent={style:{display:"flex","justify-content":"flex-end","margin-top":"10px"}},Tnt={__name:"NodeMgtDialog",props:["show","lf"],emits:["updateLocales","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=[sv()],o=F("installed"),a=F(),s=F("{}"),l=F(!1),u=F(null),c=F("450px"),d=()=>{if(o.value==="installed"){let x=r.getOptions();a.value.renderData(x.components)}},f=()=>{b()},h=()=>{y()},m=()=>{e("close")},g=x=>{let C=JSON.parse(s.value);C.component||(C.component={}),C.component.endpoints||(C.component.endpoints={}),C.component.nodes||(C.component.nodes={}),x&&x.forEach(E=>{E.category==="endpoints"?C.component.endpoints[E.type]?C.component.endpoints[E.type].disabled=E.disabled:C.component.endpoints[E.type]={type:E.type,disabled:E.disabled}:C.component.nodes[E.type]?C.component.nodes[E.type].disabled=E.disabled:C.component.nodes[E.type]={type:E.type,disabled:E.disabled}}),s.value=JSON.stringify(C,null,2),b()},y=async()=>{let x=r.getEditorSetting().url+"/api/v1/locales";fetch(x+"?&lang=zh_cn",{method:"GET",headers:{"Content-Type":"application/json"}}).then(C=>C.text()).then(C=>{s.value=C}).catch(C=>{s.value=C.message})},b=()=>{if(!w(s.value)){Vr.error("\u6570\u636E\u683C\u5F0F\u4E0D\u6B63\u786E");return}let C=r.getEditorSetting().url+"/api/v1/locales";fetch(C+"?&lang=zh_cn",{method:"POST",headers:{"Content-Type":"application/json"},body:s.value}).then(E=>{if(E.ok){Vr({showClose:!0,message:"\u64CD\u4F5C\u6210\u529F",type:"success"});let T=JSON.parse(s.value);r.setLocales(T),e("updateLocales")}else Vr.error("\u4FDD\u5B58\u5931\u8D25");return E}).catch(E=>{Vr.error(E.message)})},w=x=>{try{const C=JSON.parse(x);return!(typeof C!="object"||C===null)}catch{return!1}},O=function(){s.value=lb.js(s.value,{indent_size:2})},S=()=>{Hr.isEnabled&&(Hr.isFullscreen?(Hr.exit(),l.value=!1):(c.value="100%",Hr.request(u.value[0]),l.value=!0))};return Hr.on("change",()=>{Hr.isFullscreen?c.value="100%":c.value="450px"}),(x,C)=>{const E=ho,T=fo,P=Sp,A=Bs,D=lr,N=wp,$=Ma;return R(),we($,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px",width:"80%",class:"custom-dialog","before-close":m,modelValue:t.show,onOpen:h},{header:z(()=>[B(T,null,{default:z(()=>[B(E,{span:12},{default:z(()=>[qe("\u7EC4\u4EF6\u7BA1\u7406")]),_:1})]),_:1})]),default:z(()=>[B(N,{modelValue:o.value,"onUpdate:modelValue":C[2]||(C[2]=W=>o.value=W),"tab-position":"left",onClick:d},{default:z(()=>[B(P,{label:"\u5DF2\u5B89\u88C5",name:"installed"},{default:z(()=>[B(Cnt,{ref_key:"nodeTreeRef",ref:a,lf:t.lf,onUpdateNodeState:g},null,8,["lf"])]),_:1}),B(P,{label:"\u56FD\u9645\u5316\u914D\u7F6E",name:"locals"},{default:z(()=>[B(T,{style:{"margin-bottom":"10px"}},{default:z(()=>[B(E,{span:20},{default:z(()=>[B(A,{type:"info"},{default:z(()=>[qe("\u652F\u6301\u589E\u91CF\u914D\u7F6E\u7EC4\u4EF6\u8868\u5355\u914D\u7F6E")]),_:1})]),_:1}),B(E,{span:4,style:{float:"right","text-align":"right"}},{default:z(()=>[B(D,{type:"info",size:"small",round:"",onClick:C[0]||(C[0]=W=>O())},{default:z(()=>[qe("\u6574\u7406")]),_:1}),B(D,{icon:l.value?p(Lx):p(zm),size:"small",onClick:S,circle:""},null,8,["icon"])]),_:1})]),_:1}),B(p(Vu),{modelValue:s.value,"onUpdate:modelValue":C[1]||(C[1]=W=>s.value=W),placeholder:"\u8BF7\u8F93\u5165\u8BED\u8A00\u5305\u914D\u7F6E",ref_key:"codeEditorRef",ref:u,style:mt({height:c.value,width:"100%"}),autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue","style"]),J("div",Ent,[B(D,{type:"primary",onClick:f},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1}),B(D,{onClick:m},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["modelValue"])}}},dJ="rulego-editor-config",knt=function(){try{const t=localStorage.getItem(dJ);t&&(window.rulegoEditorConfig=JSON.parse(t))}catch(t){console.error("\u4FDD\u5B58\u6570\u636E\u51FA\u9519:",t)}return window.rulegoEditorConfig},Pnt=t=>{try{localStorage.setItem(dJ,JSON.stringify(t)),window.rulegoEditorConfig=t}catch(e){console.error("\u66F4\u65B0\u6570\u636E\u51FA\u9519:",e)}},Ant=J("a",{href:"https://github.com/rulego/rulego/tree/main/examples/server",target:"_blank"},"examples/server",-1),Mnt=J("br",null,null,-1),Rnt=J("br",null,null,-1),$nt={style:{flex:"auto"}},Nnt={__name:"SettingDialog",props:["show","lf"],emits:["submit","close"],setup(t,{emit:e}){const{show:n,lf:r}=t,i=F(),o=Sn({baseUrl:r.getEditorSetting().url,toolbar:r.getEditorSetting().toolbar}),a=()=>{let u=Bn(o);e("submit",u),Pnt(u)},s=()=>{e("close")},l=()=>{o.baseUrl=r.getEditorSetting().url,o.toolbar=r.getEditorSetting().toolbar};return(u,c)=>{const d=ho,f=fo,h=kH,m=hi,g=Tl,y=El,b=lr,w=Ma;return R(),we(w,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,width:"50%",draggable:"",top:"10px","before-close":s,modelValue:t.show,onOpen:l},{header:z(()=>[B(f,null,{default:z(()=>[B(d,{span:12},{default:z(()=>[qe("RuleGo-Editor\u8BBE\u7F6E")]),_:1})]),_:1})]),footer:z(()=>[J("div",$nt,[B(b,{type:"primary",onClick:a},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(b,{onClick:s},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(h,{title:"",type:"info",style:{"margin-bottom":"10px","margin-top":"-10px"},center:""},{default:z(()=>[qe(" \u652F\u6301\u79BB\u7EBF\u8FD0\u884C\uFF0C\u5E76\u751F\u6210\u89C4\u5219\u94FE\u6570\u636E\u3002\u5982\u679C\u9700\u8981\u5BF9\u63A5\u540E\u53F0API\u3002\u8BF7\u5148\u8FD0\u884C\uFF1A"),Ant,qe("\u3002 ")]),_:1}),Mnt,Rnt,B(y,{model:o,ref_key:"formRef",ref:i,"label-position":"top","label-width":"auto"},{default:z(()=>[B(g,{label:"RuleGo\u540E\u53F0URL",prop:"url"},{default:z(()=>[B(m,{modelValue:o.baseUrl,"onUpdate:modelValue":c[0]||(c[0]=O=>o.baseUrl=O),placeholder:"\u793A\u4F8B:http://127.0.0.1:9090"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},Dnt=J("p",{class:"text item"},"RuleGo-Editor \u4EC5\u4F9B\u5B66\u4E60\u4EA4\u6D41\u4F7F\u7528\uFF0C\u8BF7\u52FF\u7528\u4E8E\u5546\u4E1A\u7528\u9014\u3002",-1),Lnt=J("p",{class:"text item"},[qe("\u5546\u7528\u6388\u6743\u8BF7\u8054\u7CFB\u4F5C\u8005\u83B7\u53D6\u6388\u6743\uFF0C\u8BE6\u60C5\uFF1A"),J("a",{href:"https://app.rulego.cc",target:"_blank"},"https://app.rulego.cco")],-1),Int=J("p",{class:"text item"},"Email:rulego@outlook.com",-1),Bnt=J("p",{class:"text item"},"\u5FAE\u4FE1:rulegoteam",-1),Fnt={__name:"AboutDialog",props:["show","lf","ruleChain","fromActiveName"],emits:["submit","close"],setup(t,{expose:e,emit:n}){const r=t,{show:i,lf:o,ruleChain:a,fromActiveName:s}=Ri(r),l=F("info");F(),Ve(s,d=>{});const u=()=>{n("close")};return e({changeActiveName:d=>{l.value=d}}),(d,f)=>{const h=Ma;return R(),we(h,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,class:"custom-dialog",width:"50%",draggable:"",top:"10px","before-close":u,modelValue:p(i)},{header:z(()=>[qe(" RuleGo-Editor v0.27.0 ")]),default:z(()=>[Dnt,Lnt,Int,Bnt]),_:1},8,["modelValue"])}}},Vnt={},jnt={t:"1733454332806",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1484",width:"200",height:"200"},znt=J("path",{d:"M385.47911111 902.59911111h83.74044444v41.41511111h-83.74044444zM217.99822222 902.59911111h83.74044445v41.41511111h-83.74044445zM113.55022222 881.89155555h-41.41511111v62.12266667H134.25777778v-41.41511111h-20.70755556zM72.13511111 546.816h41.41511111v83.74044445h-41.41511111zM72.13511111 211.85422222h41.41511111v83.74044445h-41.41511111zM72.13511111 714.41066667h41.41511111v83.74044444h-41.41511111zM72.13511111 379.33511111h41.41511111V463.07555555h-41.41511111zM72.13511111 128.11377778h41.41511111v-20.70755556H134.25777778V65.99111111h-62.12266667zM553.07377778 65.99111111h83.74044444v41.41511111h-83.74044444zM720.55466667 65.99111111h83.74044444v41.41511111h-83.74044444zM385.47911111 65.99111111h83.74044444v41.41511111h-83.74044444zM217.99822222 65.99111111h83.74044445v41.41511111h-83.74044445zM888.03555555 65.99111111v41.41511111h20.70755556v20.70755556h41.41511111V65.99111111zM908.74311111 379.33511111h41.41511111V463.07555555h-41.41511111zM908.74311111 211.85422222h41.41511111v83.74044445h-41.41511111zM738.75911111 637.26933333l70.08711111-54.272c5.23377778-4.096 8.07822222-10.46755555 7.50933333-17.06666666-0.56888889-6.59911111-4.43733333-12.51555555-10.24-15.58755556L451.47022222 359.424c-6.82666667-3.64088889-15.13244445-2.95822222-21.27644444 1.70666667-6.144 4.77866667-8.87466667 12.62933333-7.05422223 20.13866666l95.91466667 391.168c1.59288889 6.48533333 6.25777778 11.60533333 12.51555556 13.76711112 6.25777778 2.16177778 13.19822222 1.024 18.432-2.95822223l70.08711111-54.272 151.552 195.69777778c3.86844445 5.00622222 9.67111111 7.62311111 15.47377778 7.62311111 4.20977778 0 8.41955555-1.36533333 11.94666666-4.096l87.60888889-67.81155556c4.096-3.18577778 6.82666667-7.85066667 7.39555556-12.97066666 0.68266667-5.12-0.79644445-10.35377778-3.98222223-14.44977778l-151.32444444-195.69777778z","p-id":"1485",fill:"#2c2c2c"},null,-1),Qnt=[znt];function Hnt(t,e){return R(),G("svg",jnt,Qnt)}var Wnt=Pl(Vnt,[["render",Hnt]]);const Unt={},qnt={t:"1733456794249",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3806",width:"200",height:"200"},Ynt=J("path",{d:"M946.8 420L651.9 125.1c-19.5-19.5-52.7-5.7-52.7 21.8v174c-79.3-1.8-501.8 14.9-532.3 569.6-0.9 17.2 22.1 24.3 30.6 9.3C255 621 396.6 553.3 599.1 561.5v175.2c0 27.5 33.3 41.3 52.8 21.9l294.8-294.9c12.1-12.1 12.1-31.6 0.1-43.7z",fill:"#555555","p-id":"3807"},null,-1),Xnt=[Ynt];function Znt(t,e){return R(),G("svg",qnt,Xnt)}var Gnt=Pl(Unt,[["render",Znt]]);const Knt={name:"Undo"},Jnt={t:"1733456780307",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"2833",width:"200",height:"200"},ert=J("path",{d:"M426.053024 331.626933l0-169.619142-331.490833 300.725132 331.490833 300.789601L426.053024 581.63394c92.097558 0 376.594077 0 499.373425 281.257755l0-31.251771C925.426449 706.636932 802.629705 305.014832 426.053024 331.626933z",fill:"#3D3B4F","p-id":"2834"},null,-1),trt=[ert];function nrt(t,e,n,r,i,o){return R(),G("svg",Jnt,trt)}var rrt=Pl(Knt,[["render",nrt]]);const irt=t=>(Jse("data-v-309ebd4f"),t=t(),ele(),t),ort={class:"up-toolbar"},art=irt(()=>J("div",{class:"logo"},[J("img",{class:"logoimg",src:Mqe,alt:"logo"}),qe("Sagoo Rule Editor")],-1)),srt={class:"title"},lrt={class:"over-toolbar"},urt={__name:"Toolbar",props:["lf"],setup(t){const{lf:e}=t,n=()=>{const ge=e.getGraphData().ruleChain;if(!ge.id)return Vr.info("\u8BF7\u5148\u4ECE sagoo-iot \u4E2D\u9009\u62E9\u4E00\u4E2A\u89C4\u5219\u94FE\u518D\u8FDB\u884C\u5BFC\u5165\u64CD\u4F5C");const Re=document.createElement("input");Re.type="file",Re.accept=".json",Re.onchange=()=>{const $e=Re.files[0],Z=new FileReader;Z.readAsText($e),Z.onload=()=>{var Te;const ce=JSON.parse(Z.result);ce.ruleChain.id=ge.id,ce.ruleChain.name=ge.name,ce.ruleChain.additionalInfo.description=(Te=ge.additionalInfo)==null?void 0:Te.description,e.graphModel.eventCenter.emit("rulego-editor:open",JSON.stringify(ce)),l.value=!0}},Re.click()},r=()=>{const te=e.getGraphData(),ge=te.ruleChain.id,Re=new Blob([JSON.stringify(te,null,2)],{type:"text/plain;charset=utf-8"});saveAs(Re,ge+".json")},i=F(null),o=F(null),a=F(!1),s=F(!1),l=F(!1),u=F(null),c=F(),d=F(),f=F(""),h=F(0),m=F(!1);let g=!0,y=F(!1);const b=F(!1),w=F(!1),O=F({}),S=F(""),x=F("info"),C=F({});let E=F({x:0,y:0}),T=F({x:0,y:0,targetNodeId:""});const P=F(!0),A=F(!1),D=F({toolbar:e.getEditorSetting().toolbar});e.on("history:change",te=>{l.value=!0,w.value=te.data.undoAble,b.value=te.data.redoAble}),e.on("rulego-editor:saveOk",()=>{l.value=!1,h.value===0&&(h.value=1)}),e.on("selection:selected,node:click,edge:click,blank:click",()=>{const{nodes:te,edges:ge}=e.getSelectElements();let Re=te.filter($e=>$e.type!=="start-node");s.value=Re.length>0||ge.length>0}),e.on("node:drag",({data:te,e:ge})=>{if(te.type!=="start-node"&&i.value&&te.id===i.value.id){let Re=e.getPointByClient(ge.clientX,ge.clientY);E.value.x=Re.domOverlayPosition.x+40,E.value.y=Re.domOverlayPosition.y-45}else if(o.value){let Re=e.getEdgeDataById(o.value.id);if(te.id!==Re.sourceNodeId&&te.id!==Re.targetNodeId)return;let $e=e.getPointByClient(ge.clientX,ge.clientY);T.value.x!==0&&T.value.y!==0&&T.value.targetNodeId===te.id&&(E.value.x=E.value.x-(T.value.x-$e.domOverlayPosition.x),E.value.y=E.value.y-(T.value.y-$e.domOverlayPosition.y)),T.value.x=$e.domOverlayPosition.x,T.value.y=$e.domOverlayPosition.y,T.value.targetNodeId=te.id}}),e.on("node:click",({data:te,position:ge})=>{te.type!=="start-node"?(i.value=te,o.value=null,E.value.x=ge.domOverlayPosition.x+40,E.value.y=ge.domOverlayPosition.y-45,T.value.x=0,T.value.y=0,T.value.targetNodeId=te.id,a.value=!0):a.value=!1}),e.on("edge:click",({data:te,position:ge})=>{i.value=null,o.value=te,E.value.x=ge.domOverlayPosition.x+10,E.value.y=ge.domOverlayPosition.y,T.value.x=0,T.value.y=0,T.value.targetNodeId="",a.value=!0}),e.on("blank:click",({})=>{i.value=null,o.value=null,a.value=!1}),e.on("graph:updated,graph:rendered",({})=>{I()}),e.on("rulego-editor:deleted",te=>{i.value=null,o.value=null,a.value=!1,s.value=!1}),e.on("rulego-editor:setting",te=>{D.value=te,P.value=te.showTest});const N=()=>{S.value="test"},$=()=>{S.value="",m.value=!1},W=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():Hr.request(document.documentElement),e.graphModel.eventCenter.emit("rulego-editor:fullScreen",A.value))};Hr.on("change",()=>{Hr.isFullscreen?A.value=!0:A.value=!1});const L=te=>{V({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:new",te),$(),I(!0)}})},I=(te=!1)=>{let ge=e.getRuleChain();ge&&(f.value=ge.name||ge.id,"disabled"in ge?h.value=ge.disabled?2:1:h.value=0,ge.id&&te&&(window.location.hash=ge.id))},U=()=>{y.value=!y.value,y.value?e.openSelectionSelect():e.closeSelectionSelect()},Q=()=>{g=!g,g?e.extension.miniMap.show():e.extension.miniMap.hide()},V=({message:te="\u5F53\u524D\u753B\u5E03\u5B58\u5728\u672A\u4FDD\u5B58\u6570\u636E\u3002\u786E\u5B9A\u653E\u5F03\u4FDD\u5B58\u5417\uFF1F",title:ge="\u786E\u8BA4",confirmButtonText:Re="\u786E\u5B9A",cancelButtonText:$e="\u53D6\u6D88",type:Z="warning",onConfirm:ce,onCancel:Te})=>{l.value?Mw.confirm(te,ge,{confirmButtonText:Re,cancelButtonText:$e,type:Z}).then(()=>{typeof ce=="function"&&ce()}).catch(()=>{typeof Te=="function"&&Te()}):typeof ce=="function"&&ce()},q=(te,ge)=>{V({onConfirm:()=>{e.graphModel.eventCenter.emit("rulego-editor:open",te),$(),I(!0)}})},K=(te,ge)=>{let Re=e.getRuleChain();Re.id===te&&(ge==="start"?(Re.disabled=!1,h.value=1,e.graphModel.eventCenter.emit("rulego-editor:update",Re)):ge==="stop"?(Re.disabled=!0,h.value=2,e.graphModel.eventCenter.emit("rulego-editor:update",Re)):ge==="delete"&&(h.value=0,e.graphModel.eventCenter.emit("rulego-editor:new",{}))),l.value=!1},ie=(te,ge)=>{e.graphModel.eventCenter.emit("rulego-editor:update",te),l.value=!0,ge==="base"&&($(),I())},oe=te=>{e.graphModel.eventCenter.emit("rulego-editor:setting",te),$()},Se=()=>{e.graphModel.eventCenter.emit("rulego-editor:save")},ke=()=>{e.graphModel.eventCenter.emit("rulego-editor:deleteSelects"),a.value=!1},Y=()=>{e.graphModel.eventCenter.emit("rulego-editor:showEditPanel")},re=()=>{};return(te,ge)=>{const Re=Bs,$e=lr,Z=ho,ce=fo,Te=Ui;return R(),G(ct,null,[J("div",ort,[art,J("div",srt,[qe(je(f.value)+" ",1),B(Re,{size:"small",type:h.value===0?"info":h.value===1?"success":"danger"},{default:z(()=>[qe(je(h.value===0?"\u7F16\u8F91\u4E2D":h.value===1?"\u8FD0\u884C\u4E2D":"\u505C\u7528\u4E2D"),1)]),_:1},8,["type"])]),B(ce,null,{default:z(()=>[B(Z,{span:24},{default:z(()=>[B($e,{onClick:Se,type:"primary",icon:te.Check,size:"small",disabled:!l.value},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1},8,["icon","disabled"]),B($e,{onClick:N,type:"success",icon:te.CaretRight,size:"small"},{default:z(()=>[qe("\u8C03\u8BD5")]),_:1},8,["icon"]),B($e,{onClick:n,type:"info",plain:"",icon:te.Download,size:"small"},{default:z(()=>[qe("\u5BFC\u5165")]),_:1},8,["icon"]),B($e,{onClick:r,type:"info",icon:te.Upload,size:"small"},{default:z(()=>[qe("\u5BFC\u51FA")]),_:1},8,["icon"]),B($e,{onClick:te.closePage,type:"warning",icon:p(_a),size:"small"},{default:z(()=>[qe("\u5173\u95ED")]),_:1},8,["onClick","icon"])]),_:1})]),_:1})]),_e("",!0),a.value?(R(),we(cnt,{key:1,onDelete:ke,onEdit:Y,currentElementPosition:p(E)},null,8,["currentElementPosition"])):_e("",!0),B($X,{ref_key:"newFlowDialogRef",ref:O,lf:t.lf,show:m.value,onSubmit:L,onClose:$},null,8,["lf","show"]),B(Lqe,{lf:t.lf,show:S.value==="open",onNew:L,onOpen:q,onOperate:K,onClose:$},null,8,["lf","show"]),B(unt,{lf:t.lf,show:S.value==="import",onSubmit:q,onClose:$},null,8,["lf","show"]),B(ant,{lf:t.lf,show:S.value==="export",data:c.value,ruleChainId:d.value,onClose:$},null,8,["lf","show","data","ruleChainId"]),B(Nnt,{lf:t.lf,show:S.value==="setting",onSubmit:oe,onClose:$},null,8,["lf","show"]),B(vnt,{lf:t.lf,show:S.value==="test",onOperate:K,onClose:$},null,8,["lf","show"]),B(Snt,{ref_key:"flowInfoDialogRef",ref:u,lf:t.lf,flowStatus:h.value,show:S.value==="edit",fromActiveName:x.value,ruleChain:C.value,onSubmit:ie,onClose:$},null,8,["lf","flowStatus","show","fromActiveName","ruleChain"]),B(Tnt,{lf:t.lf,show:S.value==="nodeMgt",onUpdateLocales:re,onClose:$},null,8,["lf","show"]),B(Fnt,{lf:t.lf,show:S.value==="showAbout",onClose:$},null,8,["lf","show"]),J("div",lrt,[B(Te,{class:"box-item",effect:"dark",content:p(y)?"\u5173\u95ED\u6846\u9009":"\u6253\u5F00\u6846\u9009",placement:"bottom-start"},{default:z(()=>[B($e,{type:p(y)?"success":"",icon:Wnt,onClick:U,circle:""},null,8,["type"])]),_:1},8,["content"]),B(Te,{class:"box-item",effect:"dark",content:"\u64A4\u9500",placement:"bottom-start"},{default:z(()=>[B($e,{icon:rrt,onClick:ge[0]||(ge[0]=Ie=>t.lf.undo()),disabled:!w.value,circle:""},null,8,["disabled"])]),_:1}),B(Te,{class:"box-item",effect:"dark",content:"\u91CD\u505A",placement:"bottom-start"},{default:z(()=>[B($e,{icon:Gnt,onClick:ge[1]||(ge[1]=Ie=>t.lf.redo()),disabled:!b.value,circle:""},null,8,["disabled"])]),_:1}),B(Te,{class:"box-item",effect:"dark",content:"\u5C0F\u5730\u56FE",placement:"bottom-start"},{default:z(()=>[B($e,{icon:p(pCe),onClick:Q,circle:""},null,8,["icon"])]),_:1}),B(Te,{effect:"dark",content:A.value?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F",placement:"bottom-start"},{default:z(()=>[B($e,{icon:A.value?p(Lx):p(zm),onClick:W,circle:""},null,8,["icon"])]),_:1},8,["content"])])],64)}}};var crt=Pl(urt,[["__scopeId","data-v-309ebd4f"]]);class fJ{constructor({lf:e}){this.app=px(crt,{lf:e})}render(e,n){const r=document.createElement("div");n.appendChild(r),this.app.mount(r)}}JE(fJ,"pluginName","ControlExtension");const drt={style:{flex:"auto","text-align":"left"}},frt={__name:"EdgePropertyDrawer",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=Sn({relationTypeOptions:[],relationTypeValues:[]});let u=r;l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate;const c=h=>{!h||h.validate(m=>{if(m)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Xn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Bn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,m)=>{const g=ho,y=fo,b=Yc,w=Ol,O=Tl,S=El,x=lr,C=K$;return R(),we(C,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,"destroy-on-close":!0,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":f,modelValue:t.show},{header:z(()=>[B(y,{class:"setter-title"},{default:z(()=>[B(g,{span:12},{default:z(()=>[qe("\u89C4\u5219\u8282\u70B9\u94FE\u63A5\u8BE6\u60C5")]),_:1})]),_:1})]),footer:z(()=>[J("div",drt,[B(x,{type:"primary",size:"large",onClick:m[1]||(m[1]=E=>c(s.value))},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(x,{size:"large",onClick:d},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(S,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:z(()=>[B(O,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:z(()=>[B(w,{modelValue:l.relationTypeValues,"onUpdate:modelValue":m[0]||(m[0]=E=>l.relationTypeValues=E),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:z(()=>[(R(!0),G(ct,null,Wt(l.relationTypeOptions,E=>(R(),we(b,{key:E.value!==void 0&&E.value!==null?E.value:E,label:E.label||E,value:E.value!==void 0&&E.value!==null?E.value:E},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},hrt={style:{flex:"auto"}},prt={__name:"EdgePropertyDialog",props:["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentEdgeModel:r,sourceNodeView:i,relationTypeSplit:o,sourceNodeRelationTypeOptions:a}=t,s=F(),l=Sn({relationTypeAllowCreate:!1,relationTypeOptions:[],relationTypeValues:[]});let u=r;if(l.relationTypeOptions=a||i&&i.relationTypes,l.relationTypeValues=r.routerId||r.relationTypes,l.relationTypeAllowCreate=i&&i.relationTypeAllowCreate,!l.relationTypeValues){let h=l.relationTypeOptions&&l.relationTypeOptions.length>0?l.relationTypeOptions[0]:null;h?i.nodeType==="endpoint-node"?l.relationTypeValues=h.value!==void 0&&h.value!==null?h.value:h:l.relationTypeValues=[h.value!==void 0&&h.value!==null?h.value:h]:l.relationTypeValues=[]}const c=h=>{!h||h.validate(m=>{if(m)i.nodeType==="endpoint-node"?u.relationTypes=[l.relationTypeValues]:u.relationTypes=l.relationTypeValues,u.relationTypesLabel=Xn.getSelectedLabels(l.relationTypeOptions,u.relationTypes,"relationTypes"),e("submit",Bn(u));else return!1})},d=()=>{e("cancel")},f=()=>{d()};return(h,m)=>{const g=Yc,y=Ol,b=Tl,w=El,O=lr,S=Ma;return R(),we(S,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!1,width:"50%",draggable:"",top:"10px","before-close":f,modelValue:t.show},{header:z(()=>[qe(" \u6DFB\u52A0\u94FE\u63A5 ")]),footer:z(()=>[J("div",hrt,[B(O,{type:"primary",size:"large",onClick:m[1]||(m[1]=x=>c(s.value))},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:d},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[B(w,{model:l,ref_key:"formRef",ref:s,"label-position":"right","label-width":"auto"},{default:z(()=>[B(b,{label:"\u94FE\u63A5\u6807\u7B7E",rules:[{required:!0,message:"\u94FE\u63A5\u6807\u7B7E\u662F\u5FC5\u987B\u7684"}],prop:"relationTypeValues"},{default:z(()=>[B(y,{modelValue:l.relationTypeValues,"onUpdate:modelValue":m[0]||(m[0]=x=>l.relationTypeValues=x),multiple:t.sourceNodeView.nodeType!=="endpoint-node",filterable:"","allow-create":l.relationTypeAllowCreate||!l.relationTypeOptions||l.relationTypeOptions.length===0,placeholder:"\u94FE\u63A5\u6807\u7B7E",style:{width:"100%"}},{default:z(()=>[(R(!0),G(ct,null,Wt(l.relationTypeOptions,x=>(R(),we(g,{key:x.value!==void 0&&x.value!==null?x.value:x,label:x.label||x,value:x.value!==void 0&&x.value!==null?x.value:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue","multiple","allow-create"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])}}},grt=312,mrt=313,Aj=1,vrt=2,yrt=3,brt=4,_rt=314,Ort=316,wrt=317,Srt=5,xrt=6,Crt=0,_M=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],hJ=125,Ert=59,OM=47,Trt=42,krt=43,Prt=45,Art=60,Mrt=44,Rrt=63,$rt=46,Nrt=91,Drt=new Ket({start:!1,shift(t,e){return e==Srt||e==xrt||e==Ort?t:e==wrt},strict:!1}),Lrt=new Jb((t,e)=>{let{next:n}=t;(n==hJ||n==-1||e.context)&&t.acceptToken(_rt)},{contextual:!0,fallback:!0}),Irt=new Jb((t,e)=>{let{next:n}=t,r;_M.indexOf(n)>-1||n==OM&&((r=t.peek(1))==OM||r==Trt)||n!=hJ&&n!=Ert&&n!=-1&&!e.context&&t.acceptToken(grt)},{contextual:!0}),Brt=new Jb((t,e)=>{t.next==Nrt&&!e.context&&t.acceptToken(mrt)},{contextual:!0}),Frt=new Jb((t,e)=>{let{next:n}=t;if(n==krt||n==Prt){if(t.advance(),n==t.next){t.advance();let r=!e.context&&e.canShift(Aj);t.acceptToken(r?Aj:vrt)}}else n==Rrt&&t.peek(1)==$rt&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(yrt))},{contextual:!0});function B2(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Vrt=new Jb((t,e)=>{if(t.next!=Art||!e.dialectEnabled(Crt)||(t.advance(),t.next==OM))return;let n=0;for(;_M.indexOf(t.next)>-1;)t.advance(),n++;if(B2(t.next,!0)){for(t.advance(),n++;B2(t.next,!1);)t.advance(),n++;for(;_M.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Mrt)return;for(let r=0;;r++){if(r==7){if(!B2(t.next,!0))return;break}if(t.next!="extends".charCodeAt(r))break;t.advance(),n++}}t.acceptToken(brt,-n)}),jrt=yD({"get set async static":Je.modifier,"for while do if else switch try catch finally return throw break continue default case":Je.controlKeyword,"in of await yield void typeof delete instanceof":Je.operatorKeyword,"let var const using function class extends":Je.definitionKeyword,"import export from":Je.moduleKeyword,"with debugger as new":Je.keyword,TemplateString:Je.special(Je.string),super:Je.atom,BooleanLiteral:Je.bool,this:Je.self,null:Je.null,Star:Je.modifier,VariableName:Je.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":Je.function(Je.variableName),VariableDefinition:Je.definition(Je.variableName),Label:Je.labelName,PropertyName:Je.propertyName,PrivatePropertyName:Je.special(Je.propertyName),"CallExpression/MemberExpression/PropertyName":Je.function(Je.propertyName),"FunctionDeclaration/VariableDefinition":Je.function(Je.definition(Je.variableName)),"ClassDeclaration/VariableDefinition":Je.definition(Je.className),PropertyDefinition:Je.definition(Je.propertyName),PrivatePropertyDefinition:Je.definition(Je.special(Je.propertyName)),UpdateOp:Je.updateOperator,"LineComment Hashbang":Je.lineComment,BlockComment:Je.blockComment,Number:Je.number,String:Je.string,Escape:Je.escape,ArithOp:Je.arithmeticOperator,LogicOp:Je.logicOperator,BitOp:Je.bitwiseOperator,CompareOp:Je.compareOperator,RegExp:Je.regexp,Equals:Je.definitionOperator,Arrow:Je.function(Je.punctuation),": Spread":Je.punctuation,"( )":Je.paren,"[ ]":Je.squareBracket,"{ }":Je.brace,"InterpolationStart InterpolationEnd":Je.special(Je.brace),".":Je.derefOperator,", ;":Je.separator,"@":Je.meta,TypeName:Je.typeName,TypeDefinition:Je.definition(Je.typeName),"type enum interface implements namespace module declare":Je.definitionKeyword,"abstract global Privacy readonly override":Je.modifier,"is keyof unique infer":Je.operatorKeyword,JSXAttributeValue:Je.attributeValue,JSXText:Je.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":Je.angleBracket,"JSXIdentifier JSXNameSpacedName":Je.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":Je.attributeName,"JSXBuiltin/JSXIdentifier":Je.standard(Je.tagName)}),zrt={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,extends:54,this:58,true:66,false:66,null:78,void:82,typeof:86,super:102,new:136,delete:148,yield:157,await:161,class:166,public:229,private:229,protected:229,readonly:231,instanceof:250,satisfies:253,in:254,const:256,import:290,keyof:345,unique:349,infer:355,is:391,abstract:411,implements:413,type:415,let:418,var:420,using:423,interface:429,enum:433,namespace:439,module:441,declare:445,global:449,for:468,of:477,while:480,with:484,do:488,if:492,else:494,switch:498,case:504,try:510,catch:514,finally:518,return:522,throw:526,break:530,continue:534,debugger:538},Qrt={__proto__:null,async:123,get:125,set:127,declare:189,public:191,private:191,protected:191,static:193,abstract:195,override:197,readonly:203,accessor:205,new:395},Hrt={__proto__:null,"<":187},Wrt=ob.deserialize({version:14,states:"$CdQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#D^O.QQlO'#DdO.bQlO'#DoO%[QlO'#DwO0fQlO'#EPOOQ!0Lf'#EX'#EXO1PQ`O'#EUOOQO'#Em'#EmOOQO'#Ih'#IhO1XQ`O'#GpO1dQ`O'#ElO1iQ`O'#ElO3hQ!0MxO'#JnO6[Q!0MxO'#JoO6uQ`O'#F[O6zQ,UO'#FsOOQ!0Lf'#Fe'#FeO7VO7dO'#FeO7eQMhO'#FzO9RQ`O'#FyOOQ!0Lf'#Jo'#JoOOQ!0Lb'#Jn'#JnO9WQ`O'#GtOOQ['#K['#K[O9cQ`O'#IUO9hQ!0LrO'#IVOOQ['#J['#J[OOQ['#IZ'#IZQ`QlOOQ`QlOOO9pQ!L^O'#DsO9wQlO'#D{O:OQlO'#D}O9^Q`O'#GpO:VQMhO'#CoO:eQ`O'#EkO:pQ`O'#EvO:uQMhO'#FdO;dQ`O'#GpOOQO'#K]'#K]O;iQ`O'#K]O;wQ`O'#GxO;wQ`O'#GyO;wQ`O'#G{O9^Q`O'#HOOVQ`O'#CeO>gQ`O'#H_O>oQ`O'#HeO>oQ`O'#HgO`QlO'#HiO>oQ`O'#HkO>oQ`O'#HnO>tQ`O'#HtO>yQ!0LsO'#HzO%[QlO'#H|O?UQ!0LsO'#IOO?aQ!0LsO'#IQO9hQ!0LrO'#ISO?lQ!0MxO'#CiO@nQpO'#DiQOQ`OOO%[QlO'#D}OAUQ`O'#EQO:VQMhO'#EkOAaQ`O'#EkOAlQ!bO'#FdOOQ['#Cg'#CgOOQ!0Lb'#Dn'#DnOOQ!0Lb'#Jr'#JrO%[QlO'#JrOOQO'#Ju'#JuOOQO'#Id'#IdOBlQpO'#EdOOQ!0Lb'#Ec'#EcOOQ!0Lb'#Jy'#JyOChQ!0MSO'#EdOCrQpO'#ETOOQO'#Jt'#JtODWQpO'#JuOEeQpO'#ETOCrQpO'#EdPErO&2DjO'#CbPOOO)CDy)CDyOOOO'#I['#I[OE}O#tO,59UOOQ!0Lh,59U,59UOOOO'#I]'#I]OF]O&jO,59UOFkQ!L^O'#D`OOOO'#I_'#I_OFrO#@ItO,59xOOQ!0Lf,59x,59xOGQQlO'#I`OGeQ`O'#JpOIdQ!fO'#JpO+}QlO'#JpOIkQ`O,5:OOJRQ`O'#EmOJ`Q`O'#KPOJkQ`O'#KOOJkQ`O'#KOOJsQ`O,5;ZOJxQ`O'#J}OOQ!0Ln,5:Z,5:ZOKPQlO,5:ZOL}Q!0MxO,5:cOMnQ`O,5:kONXQ!0LrO'#J|ON`Q`O'#J{O9WQ`O'#J{ONtQ`O'#J{ON|Q`O,5;YO! RQ`O'#J{O!#WQ!fO'#JoOOQ!0Lh'#Ci'#CiO%[QlO'#EPO!#vQ!fO,5:pOOQS'#Jv'#JvOOQO-EpOOQ['#Jd'#JdOOQ[,5>q,5>qOOQ[-E[Q!0MxO,5:gO%[QlO,5:gO!@rQ!0MxO,5:iOOQO,5@w,5@wO!AcQMhO,5=[O!AqQ!0LrO'#JeO9RQ`O'#JeO!BSQ!0LrO,59ZO!B_QpO,59ZO!BgQMhO,59ZO:VQMhO,59ZO!BrQ`O,5;WO!BzQ`O'#H^O!C`Q`O'#KaO%[QlO,5;|O!9fQpO,5tQ`O'#HTO9^Q`O'#HVO!DwQ`O'#HVO:VQMhO'#HXO!D|Q`O'#HXOOQ[,5=m,5=mO!ERQ`O'#HYO!EdQ`O'#CoO!EiQ`O,59PO!EsQ`O,59PO!GxQlO,59POOQ[,59P,59PO!HYQ!0LrO,59PO%[QlO,59PO!JeQlO'#HaOOQ['#Hb'#HbOOQ['#Hc'#HcO`QlO,5=yO!J{Q`O,5=yO`QlO,5>PO`QlO,5>RO!KQQ`O,5>TO`QlO,5>VO!KVQ`O,5>YO!K[QlO,5>`OOQ[,5>f,5>fO%[QlO,5>fO9hQ!0LrO,5>hOOQ[,5>j,5>jO# fQ`O,5>jOOQ[,5>l,5>lO# fQ`O,5>lOOQ[,5>n,5>nO#!SQpO'#D[O%[QlO'#JrO#!uQpO'#JrO##PQpO'#DjO##bQpO'#DjO#%sQlO'#DjO#%zQ`O'#JqO#&SQ`O,5:TO#&XQ`O'#EqO#&gQ`O'#KQO#&oQ`O,5;[O#&tQpO'#DjO#'RQpO'#ESOOQ!0Lf,5:l,5:lO%[QlO,5:lO#'YQ`O,5:lO>tQ`O,5;VO!B_QpO,5;VO!BgQMhO,5;VO:VQMhO,5;VO#'bQ`O,5@^O#'gQ07dO,5:pOOQO-EzO+}QlO,5>zOOQO,5?Q,5?QO#*oQlO'#I`OOQO-E<^-E<^O#*|Q`O,5@[O#+UQ!fO,5@[O#+]Q`O,5@jOOQ!0Lf1G/j1G/jO%[QlO,5@kO#+eQ`O'#IfOOQO-EoQ`O1G3oO$4WQlO1G3qO$8[QlO'#HpOOQ[1G3t1G3tO$8iQ`O'#HvO>tQ`O'#HxOOQ[1G3z1G3zO$8qQlO1G3zO9hQ!0LrO1G4QOOQ[1G4S1G4SOOQ!0Lb'#G]'#G]O9hQ!0LrO1G4UO9hQ!0LrO1G4WO$tQ`O,5:UO!(vQlO,5:UO!B_QpO,5:UO$<}Q?MtO,5:UOOQO,5;],5;]O$=XQpO'#IaO$=oQ`O,5@]OOQ!0Lf1G/o1G/oO$=wQpO'#IgO$>RQ`O,5@lOOQ!0Lb1G0v1G0vO##bQpO,5:UOOQO'#Ic'#IcO$>ZQpO,5:nOOQ!0Ln,5:n,5:nO#']Q`O1G0WOOQ!0Lf1G0W1G0WO%[QlO1G0WOOQ!0Lf1G0q1G0qO>tQ`O1G0qO!B_QpO1G0qO!BgQMhO1G0qOOQ!0Lb1G5x1G5xO!BSQ!0LrO1G0ZOOQO1G0j1G0jO%[QlO1G0jO$>bQ!0LrO1G0jO$>mQ!0LrO1G0jO!B_QpO1G0ZOCrQpO1G0ZO$>{Q!0LrO1G0jOOQO1G0Z1G0ZO$?aQ!0MxO1G0jPOOO-EzO$?}Q`O1G5vO$@VQ`O1G6UO$@_Q!fO1G6VO9WQ`O,5?QO$@iQ!0MxO1G6SO%[QlO1G6SO$@yQ!0LrO1G6SO$A[Q`O1G6RO$A[Q`O1G6RO9WQ`O1G6RO$AdQ`O,5?TO9WQ`O,5?TOOQO,5?T,5?TO$AxQ`O,5?TO$)QQ`O,5?TOOQO-E[OOQ[,5>[,5>[O%[QlO'#HqO%<{Q`O'#HsOOQ[,5>b,5>bO9WQ`O,5>bOOQ[,5>d,5>dOOQ[7+)f7+)fOOQ[7+)l7+)lOOQ[7+)p7+)pOOQ[7+)r7+)rO%=QQpO1G5xO%=lQ?MtO1G0wO%=vQ`O1G0wOOQO1G/p1G/pO%>RQ?MtO1G/pO>tQ`O1G/pO!(vQlO'#DjOOQO,5>{,5>{OOQO-E<_-E<_OOQO,5?R,5?ROOQO-EtQ`O7+&]O!B_QpO7+&]OOQO7+%u7+%uO$?aQ!0MxO7+&UOOQO7+&U7+&UO%[QlO7+&UO%>]Q!0LrO7+&UO!BSQ!0LrO7+%uO!B_QpO7+%uO%>hQ!0LrO7+&UO%>vQ!0MxO7++nO%[QlO7++nO%?WQ`O7++mO%?WQ`O7++mOOQO1G4o1G4oO9WQ`O1G4oO%?`Q`O1G4oOOQS7+%z7+%zO#']Q`O<|O%[QlO,5>|OOQO-E<`-E<`O%KlQ`O1G5yOOQ!0Lf<]OOQ[,5>_,5>_O&;hQ`O1G3|O9WQ`O7+&cO!(vQlO7+&cOOQO7+%[7+%[O&;mQ?MtO1G6VO>tQ`O7+%[OOQ!0Lf<tQ`O<tQ`O7+)hO'+dQ`O<{AN>{O%[QlOAN?[OOQO<{Oh%VOk+bO![']O%f+aO~O!d+dOa(XX![(XX'v(XX!Y(XX~Oa%lO![XO'v%lO~Oh%VO!i%cO~Oh%VO!i%cO(P%eO~O!d#vO#h(uO~Ob+oO%g+pO(P+lO(RTO(UUO!Z)UP~O!Y+qO`)TX~O[+uO~O`+vO~O![%}O(P%eO(Q!lO`)TP~Oh%VO#]+{O~Oh%VOk,OO![$|O~O![,QO~O},SO![XO~O%k%tO~O!u,XO~Oe,^O~Ob,_O(P#nO(RTO(UUO!Z)SP~Oe%{O~O%g!QO(P&WO~P=RO[,dO`,cO~OPYOQYOSfOdzOeyOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO!fuO!iZO!lYO!mYO!nYO!pvO!uxO!y]O%e}O(RTO(UUO(]VO(k[O(ziO~O![!eO!r!gO$V!kO(P!dO~P!E{O`,cOa%lO'v%lO~OPYOQYOSfOd!jOe!iOmkOoYOpkOqkOwkOyYO{YO!PWO!TkO!UkO![!eO!fuO!iZO!lYO!mYO!nYO!pvO!u!hO$V!kO(P!dO(RTO(UUO(]VO(k[O(ziO~Oa,iO!rwO#t!OO%i!OO%j!OO%k!OO~P!HeO!i&lO~O&Y,oO~O![,qO~O&k,sO&m,tOP&haQ&haS&haY&haa&had&hae&ham&hao&hap&haq&haw&hay&ha{&ha!P&ha!T&ha!U&ha![&ha!f&ha!i&ha!l&ha!m&ha!n&ha!p&ha!r&ha!u&ha!y&ha#t&ha$V&ha%e&ha%g&ha%i&ha%j&ha%k&ha%n&ha%p&ha%s&ha%t&ha%v&ha&S&ha&Y&ha&[&ha&^&ha&`&ha&c&ha&i&ha&o&ha&q&ha&s&ha&u&ha&w&ha's&ha(P&ha(R&ha(U&ha(]&ha(k&ha(z&ha!Z&ha&a&hab&ha&f&ha~O(P,yO~Oh!bX!Y!OX!Z!OX!d!OX!d!bX!i!bX#]!OX~O!Y!bX!Z!bX~P# kO!d-OO#],}Oh(fX!Y#eX!Z#eX!d(fX!i(fX~O!Y(fX!Z(fX~P#!^Oh%VO!d-QO!i%cO!Y!^X!Z!^X~Op!nO!P!oO(RTO(UUO(a!mO~OP;jOQ;jOSfOd=fOe!iOmkOo;jOpkOqkOwkOy;jO{;jO!PWO!TkO!UkO![!eO!f;mO!iZO!l;jO!m;jO!n;jO!p;nO!r;qO!u!hO$V!kO(RTO(UUO(]VO(k[O(z=dO~O(P{Og'XX!Y'XX~P!+oO!Y.xOg(la~OSfO![3vO$c3wO~O!Z3{O~Os3|O~P#.uOa$lq!Y$lq'v$lq's$lq!V$lq!h$lqs$lq![$lq%f$lq!d$lq~P!9}O!V4OO~P!&fO!P4PO~O}){O'u)|O(v%POk'ea(u'ea!Y'ea#]'ea~Og'ea#}'ea~P%+ZO}){O'u)|Ok'ga(u'ga(v'ga!Y'ga#]'ga~Og'ga#}'ga~P%+|O(n$YO~P#.uO!VfX!V$xX!YfX!Y$xX!d%PX#]fX~P!/nO(PU#>[#>|#?`#?f#?l#?z#@a#BQ#B`#Bg#C}#D]#Ey#FX#F_#Fe#Fk#Fu#F{#GR#G]#Go#GuPPPPPPPPPPP#G{PPPPPPP#Hp#Kw#Ma#Mh#MpPPP$%OP$%X$(Q$.k$.n$.q$/p$/s$/z$0SP$0Y$0]P$0y$0}$1u$3T$3Y$3pPP$3u$3{$4PP$4S$4W$4[$5W$5o$6W$6[$6_$6b$6h$6k$6o$6sR!|RoqOXst!Z#d%k&o&q&r&t,l,q1}2QY!vQ']-^1b5iQ%rvQ%zyQ&R|Q&g!VS'T!e-UQ'c!iS'i!r!yU*g$|*W*kQ+j%{Q+w&TQ,]&aQ-['[Q-f'dQ-n'jQ0S*mQ1l,^R < TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:377,context:Drt,nodeProps:[["isolate",-8,5,6,14,34,36,48,50,52,""],["group",-26,9,17,19,65,204,208,212,213,215,218,221,231,233,239,241,243,245,248,254,260,262,264,266,268,270,271,"Statement",-34,13,14,29,32,33,39,48,51,52,54,59,67,69,73,77,79,81,82,107,108,117,118,135,138,140,141,142,143,144,146,147,166,167,169,"Expression",-23,28,30,34,38,40,42,171,173,175,176,178,179,180,182,183,184,186,187,188,198,200,202,203,"Type",-3,85,100,106,"ClassItem"],["openedBy",23,"<",35,"InterpolationStart",53,"[",57,"{",70,"(",159,"JSXStartCloseTag"],["closedBy",24,">",37,"InterpolationEnd",47,"]",58,"}",71,")",164,"JSXEndTag"]],propSources:[jrt],skippedNodes:[0,5,6,274],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$h&j(SpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU(SpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX(Sp(V!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z07[+rq$h&j(Sp(V!b'x0/lOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z07[.ST(T#S$h&j'y0/lO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c07[.n_$h&j(Sp(V!b'y0/lOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)3p/x`$h&j!m),Q(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW1V`#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z(KW2d_#u(Ch$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'At3l_(R':f$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k(^4r_$h&j(V!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k&z5vX$h&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q&z6jT$c`$h&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c`6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y`7bO$c``7eP;=`<%l6y&z7kP;=`<%l5q(^7w]$c`$h&j(V!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!r8uZ(V!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p!r9oU$c`(V!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!r:UP;=`<%l8p(^:[P;=`<%l4k%9[:hh$h&j(Sp(V!bOY%ZYZ&cZq%Zqr`#P#o`x!^=^!^!_?q!_#O=^#O#P>`#P#o=^#o#p?q#p;'S=^;'S;=`@h<%lO=^&n>gXWS$h&jOY>`YZ&cZ!^>`!^!_?S!_#o>`#o#p?S#p;'S>`;'S;=`?k<%lO>`S?XSWSOY?SZ;'S?S;'S;=`?e<%lO?SS?hP;=`<%l?S&n?nP;=`<%l>`!f?xWWS(V!bOY?qZw?qwx?Sx#O?q#O#P?S#P;'S?q;'S;=`@b<%lO?q!f@eP;=`<%l?q(Q@kP;=`<%l=^'`@w]WS$h&j(SpOY@nYZ&cZr@nrs>`s!^@n!^!_Ap!_#O@n#O#P>`#P#o@n#o#pAp#p;'S@n;'S;=`Bg<%lO@ntAwWWS(SpOYApZrAprs?Ss#OAp#O#P?S#P;'SAp;'S;=`Ba<%lOAptBdP;=`<%lAp'`BjP;=`<%l@n#WBvYWS(Sp(V!bOYBmZrBmrs?qswBmwxApx#OBm#O#P?S#P;'SBm;'S;=`Cf<%lOBm#WCiP;=`<%lBm(rCoP;=`<%l^!Q^$h&j!U7`OY!=yYZ&cZ!P!=y!P!Q!>|!Q!^!=y!^!_!@c!_!}!=y!}#O!CW#O#P!Dy#P#o!=y#o#p!@c#p;'S!=y;'S;=`!Ek<%lO!=y|#X#Z&c#Z#[!>|#[#]&c#]#^!>|#^#a&c#a#b!>|#b#g&c#g#h!>|#h#i&c#i#j!>|#j#k!>|#k#m&c#m#n!>|#n#o&c#p;'S&c;'S;=`&w<%lO&c7`!@hX!U7`OY!@cZ!P!@c!P!Q!AT!Q!}!@c!}#O!Ar#O#P!Bq#P;'S!@c;'S;=`!CQ<%lO!@c7`!AYW!U7`#W#X!AT#Z#[!AT#]#^!AT#a#b!AT#g#h!AT#i#j!AT#j#k!AT#m#n!AT7`!AuVOY!ArZ#O!Ar#O#P!B[#P#Q!@c#Q;'S!Ar;'S;=`!Bk<%lO!Ar7`!B_SOY!ArZ;'S!Ar;'S;=`!Bk<%lO!Ar7`!BnP;=`<%l!Ar7`!BtSOY!@cZ;'S!@c;'S;=`!CQ<%lO!@c7`!CTP;=`<%l!@c^!Ezl$h&j(V!b!U7`OY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#W&}#W#X!Eq#X#Z&}#Z#[!Eq#[#]&}#]#^!Eq#^#a&}#a#b!Eq#b#g&}#g#h!Eq#h#i&}#i#j!Eq#j#k!Eq#k#m&}#m#n!Eq#n#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}8r!GyZ(V!b!U7`OY!GrZw!Grwx!@cx!P!Gr!P!Q!Hl!Q!}!Gr!}#O!JU#O#P!Bq#P;'S!Gr;'S;=`!J|<%lO!Gr8r!Hse(V!b!U7`OY'}Zw'}x#O'}#P#W'}#W#X!Hl#X#Z'}#Z#[!Hl#[#]'}#]#^!Hl#^#a'}#a#b!Hl#b#g'}#g#h!Hl#h#i'}#i#j!Hl#j#k!Hl#k#m'}#m#n!Hl#n;'S'};'S;=`(f<%lO'}8r!JZX(V!bOY!JUZw!JUwx!Arx#O!JU#O#P!B[#P#Q!Gr#Q;'S!JU;'S;=`!Jv<%lO!JU8r!JyP;=`<%l!JU8r!KPP;=`<%l!Gr>^!KZ^$h&j(V!bOY!KSYZ&cZw!KSwx!CWx!^!KS!^!_!JU!_#O!KS#O#P!DR#P#Q!^!LYP;=`<%l!KS>^!L`P;=`<%l!_#c#d#Bq#d#l%Z#l#m#Es#m#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#>j_$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#?rd$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#A]f$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!R#AQ!R!S#AQ!S!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#AQ#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Bzc$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Dbe$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q!Y#DV!Y!^%Z!^!_*g!_#O%Z#O#P&c#P#R%Z#R#S#DV#S#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#E|g$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z'Ad#Gpi$h&j(Sp(V!bp'9tOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#Ge![!^%Z!^!_*g!_!c%Z!c!i#Ge!i#O%Z#O#P&c#P#R%Z#R#S#Ge#S#T%Z#T#Z#Ge#Z#b%Z#b#c#>_#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z*)x#Il_!d$b$h&j#})Lv(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z)[#Jv_al$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z04f#LS^h#)`#O-v$?V_!Z(CdsBr$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z?O$@a_!n7`$h&j(Sp(V!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z07[$Aq|$h&j(Sp(V!b'x0/l$[#t(P,2j(a$I[OX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr07[$D|k$h&j(Sp(V!b'y0/l$[#t(P,2j(a$I[OY%ZYZ&cZr%Zrs&}st%ZtuEruw%Zwx(rx}%Z}!OGv!O!Q%Z!Q![Er![!^%Z!^!_*g!_!c%Z!c!}Er!}#O%Z#O#P&c#P#R%Z#R#SEr#S#T%Z#T#oEr#o#p*g#p$g%Z$g;'SEr;'S;=`I|<%lOEr",tokenizers:[Irt,Brt,Frt,Vrt,2,3,4,5,6,7,8,9,10,11,12,13,14,Lrt,new vM("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOu~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!R~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(_~~",141,336),new vM("j~RQYZXz{^~^O'|~~aP!P!Qd~iO'}~~",25,319)],topRules:{Script:[0,7],SingleExpression:[1,272],SingleClassItem:[2,273]},dialects:{jsx:0,ts:14980},dynamicPrecedences:{77:1,79:1,91:1,167:1,196:1},specialized:[{term:323,get:t=>zrt[t]||-1},{term:339,get:t=>Qrt[t]||-1},{term:92,get:t=>Hrt[t]||-1}],tokenPrec:15004}),pJ=[Va("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Va("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Va("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Va("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Va("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Va(`try { \${} } catch (\${error}) { \${} }`,{label:"try",detail:"/ catch block",type:"keyword"}),Va("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Va(`if (\${}) { \${} } else { \${} }`,{label:"if",detail:"/ else block",type:"keyword"}),Va(`class \${name} { constructor(\${params}) { \${} } }`,{label:"class",detail:"definition",type:"keyword"}),Va('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Va('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Urt=pJ.concat([Va("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Va("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Va("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Mj=new jZe,gJ=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Zv(t){return(e,n)=>{let r=e.node.getChild("VariableDefinition");return r&&n(r,t),!0}}const qrt=["FunctionDeclaration"],Yrt={FunctionDeclaration:Zv("function"),ClassDeclaration:Zv("class"),ClassExpression:()=>!0,EnumDeclaration:Zv("constant"),TypeAliasDeclaration:Zv("type"),NamespaceDeclaration:Zv("namespace"),VariableDefinition(t,e){t.matchContext(qrt)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function mJ(t,e){let n=Mj.get(e);if(n)return n;let r=[],i=!0;function o(a,s){let l=t.sliceString(a.from,a.to);r.push({label:l,type:s})}return e.cursor(ao.IncludeAnonymous).iterate(a=>{if(i)i=!1;else if(a.name){let s=Yrt[a.name];if(s&&s(a,o)||gJ.has(a.name))return!1}else if(a.to-a.from>8192){for(let s of mJ(t,a.node))r.push(s);return!1}}),Mj.set(e,r),r}const Rj=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,vJ=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function Xrt(t){let e=uo(t.state).resolveInner(t.pos,-1);if(vJ.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&Rj.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let r=[];for(let i=e;i;i=i.parent)gJ.has(i.name)&&(r=r.concat(mJ(t.state.doc,i)));return{options:r,from:n?e.from:t.pos,validFor:Rj}}const Yh=G0.define({name:"javascript",parser:Wrt.configure({props:[OD.add({IfStatement:Xy({except:/^\s*({|else\b)/}),TryStatement:Xy({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:sGe,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:r?1:2)*t.unit},Block:aGe({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Xy({except:/^{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),SD.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":bG,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),yJ={test:t=>/^JSX/.test(t.name),facet:pG({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Zrt=Yh.configure({dialect:"ts"},"typescript"),Grt=Yh.configure({dialect:"jsx",props:[bD.add(t=>t.isTop?[yJ]:void 0)]}),Krt=Yh.configure({dialect:"jsx ts",props:[bD.add(t=>t.isTop?[yJ]:void 0)]},"typescript");let bJ=t=>({label:t,type:"keyword"});const _J="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(bJ),Jrt=_J.concat(["declare","implements","private","protected","public"].map(bJ));function OJ(t={}){let e=t.jsx?t.typescript?Krt:Grt:t.typescript?Zrt:Yh,n=t.typescript?Urt.concat(Jrt):pJ.concat(_J);return new mG(e,[Yh.data.of({autocomplete:EJe(vJ,_K(n))}),Yh.data.of({autocomplete:Xrt}),t.jsx?nit:[]])}function eit(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function $j(t,e,n=t.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return t.sliceString(r.from,Math.min(r.to,n));return""}const tit=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),nit=Ut.inputHandler.of((t,e,n,r,i)=>{if((tit?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||r!=">"&&r!="/"||!Yh.isActiveAt(t.state,e,-1))return!1;let o=i(),{state:a}=o,s=a.changeByRange(l=>{var u;let{head:c}=l,d=uo(a).resolveInner(c-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(a.doc.sliceString(c-1,c)!=r||d.name=="JSXAttributeValue"&&d.to>c)){if(r==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:c,insert:""}};if(r=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,m=h.parent;if(m&&h.from==c-2&&((f=$j(a.doc,m.firstChild,c))||((u=m.firstChild)===null||u===void 0?void 0:u.name)=="JSXFragmentTag")){let g=`${f}>`;return{range:yt.cursor(c+g.length,-1),changes:{from:c,insert:g}}}}else if(r==">"){let h=eit(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(c,c+2))&&(f=$j(a.doc,h,c)))return{range:l,changes:{from:c,insert:``}}}}return{range:l}});return s.changes.empty?!1:(t.dispatch([o,a.update(s,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function wJ(t,e){return function(){return t.apply(e,arguments)}}const{toString:rit}=Object.prototype,{getPrototypeOf:ZD}=Object,VC=(t=>e=>{const n=rit.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),yu=t=>(t=t.toLowerCase(),e=>VC(e)===t),jC=t=>e=>typeof e===t,{isArray:cv}=Array,ub=jC("undefined");function iit(t){return t!==null&&!ub(t)&&t.constructor!==null&&!ub(t.constructor)&&Rs(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const SJ=yu("ArrayBuffer");function oit(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&SJ(t.buffer),e}const ait=jC("string"),Rs=jC("function"),xJ=jC("number"),zC=t=>t!==null&&typeof t=="object",sit=t=>t===!0||t===!1,G1=t=>{if(VC(t)!=="object")return!1;const e=ZD(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},lit=yu("Date"),uit=yu("File"),cit=yu("Blob"),dit=yu("FileList"),fit=t=>zC(t)&&Rs(t.pipe),hit=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rs(t.append)&&((e=VC(t))==="formdata"||e==="object"&&Rs(t.toString)&&t.toString()==="[object FormData]"))},pit=yu("URLSearchParams"),[git,mit,vit,yit]=["ReadableStream","Request","Response","Headers"].map(yu),bit=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function n_(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let r,i;if(typeof t!="object"&&(t=[t]),cv(t))for(r=0,i=t.length;r0;)if(i=n[r],e===i.toLowerCase())return i;return null}const Ih=(()=>typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global)(),EJ=t=>!ub(t)&&t!==Ih;function wM(){const{caseless:t}=EJ(this)&&this||{},e={},n=(r,i)=>{const o=t&&CJ(e,i)||i;G1(e[o])&&G1(r)?e[o]=wM(e[o],r):G1(r)?e[o]=wM({},r):cv(r)?e[o]=r.slice():e[o]=r};for(let r=0,i=arguments.length;r(n_(e,(i,o)=>{n&&Rs(i)?t[o]=wJ(i,n):t[o]=i},{allOwnKeys:r}),t),Oit=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),wit=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Sit=(t,e,n,r)=>{let i,o,a;const s={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),o=i.length;o-- >0;)a=i[o],(!r||r(a,t,e))&&!s[a]&&(e[a]=t[a],s[a]=!0);t=n!==!1&&ZD(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},xit=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},Cit=t=>{if(!t)return null;if(cv(t))return t;let e=t.length;if(!xJ(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Eit=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&ZD(Uint8Array)),Tit=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const o=i.value;e.call(t,o[0],o[1])}},kit=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},Pit=yu("HTMLFormElement"),Ait=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Nj=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),Mit=yu("RegExp"),TJ=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};n_(n,(i,o)=>{let a;(a=e(i,o,t))!==!1&&(r[o]=a||i)}),Object.defineProperties(t,r)},Rit=t=>{TJ(t,(e,n)=>{if(Rs(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(!!Rs(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},$it=(t,e)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return cv(t)?r(t):r(String(t).split(e)),n},Nit=()=>{},Dit=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,F2="abcdefghijklmnopqrstuvwxyz",Dj="0123456789",kJ={DIGIT:Dj,ALPHA:F2,ALPHA_DIGIT:F2+F2.toUpperCase()+Dj},Lit=(t=16,e=kJ.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function Iit(t){return!!(t&&Rs(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Bit=t=>{const e=new Array(10),n=(r,i)=>{if(zC(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[i]=r;const o=cv(r)?[]:{};return n_(r,(a,s)=>{const l=n(a,i+1);!ub(l)&&(o[s]=l)}),e[i]=void 0,o}}return r};return n(t,0)},Fit=yu("AsyncFunction"),Vit=t=>t&&(zC(t)||Rs(t))&&Rs(t.then)&&Rs(t.catch),PJ=((t,e)=>t?setImmediate:e?((n,r)=>(Ih.addEventListener("message",({source:i,data:o})=>{i===Ih&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),Ih.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rs(Ih.postMessage)),jit=typeof queueMicrotask!="undefined"?queueMicrotask.bind(Ih):typeof process!="undefined"&&process.nextTick||PJ;var lt={isArray:cv,isArrayBuffer:SJ,isBuffer:iit,isFormData:hit,isArrayBufferView:oit,isString:ait,isNumber:xJ,isBoolean:sit,isObject:zC,isPlainObject:G1,isReadableStream:git,isRequest:mit,isResponse:vit,isHeaders:yit,isUndefined:ub,isDate:lit,isFile:uit,isBlob:cit,isRegExp:Mit,isFunction:Rs,isStream:fit,isURLSearchParams:pit,isTypedArray:Eit,isFileList:dit,forEach:n_,merge:wM,extend:_it,trim:bit,stripBOM:Oit,inherits:wit,toFlatObject:Sit,kindOf:VC,kindOfTest:yu,endsWith:xit,toArray:Cit,forEachEntry:Tit,matchAll:kit,isHTMLForm:Pit,hasOwnProperty:Nj,hasOwnProp:Nj,reduceDescriptors:TJ,freezeMethods:Rit,toObjectSet:$it,toCamelCase:Ait,noop:Nit,toFiniteNumber:Dit,findKey:CJ,global:Ih,isContextDefined:EJ,ALPHABET:kJ,generateString:Lit,isSpecCompliantForm:Iit,toJSONObject:Bit,isAsyncFn:Fit,isThenable:Vit,setImmediate:PJ,asap:jit};function Jn(t,e,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}lt.inherits(Jn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:lt.toJSONObject(this.config),code:this.code,status:this.status}}});const AJ=Jn.prototype,MJ={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{MJ[t]={value:t}});Object.defineProperties(Jn,MJ);Object.defineProperty(AJ,"isAxiosError",{value:!0});Jn.from=(t,e,n,r,i,o)=>{const a=Object.create(AJ);return lt.toFlatObject(t,a,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Jn.call(a,t.message,e,n,r,i),a.cause=t,a.name=t.name,o&&Object.assign(a,o),a};var zit=null;function SM(t){return lt.isPlainObject(t)||lt.isArray(t)}function RJ(t){return lt.endsWith(t,"[]")?t.slice(0,-2):t}function Lj(t,e,n){return t?t.concat(e).map(function(i,o){return i=RJ(i),!n&&o?"["+i+"]":i}).join(n?".":""):e}function Qit(t){return lt.isArray(t)&&!t.some(SM)}const Hit=lt.toFlatObject(lt,{},null,function(e){return/^is[A-Z]/.test(e)});function QC(t,e,n){if(!lt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=lt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,y){return!lt.isUndefined(y[g])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&<.isSpecCompliantForm(e);if(!lt.isFunction(i))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(lt.isDate(m))return m.toISOString();if(!l&<.isBlob(m))throw new Jn("Blob is not supported. Use a Buffer instead.");return lt.isArrayBuffer(m)||lt.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,g,y){let b=m;if(m&&!y&&typeof m=="object"){if(lt.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(lt.isArray(m)&&Qit(m)||(lt.isFileList(m)||lt.endsWith(g,"[]"))&&(b=lt.toArray(m)))return g=RJ(g),b.forEach(function(O,S){!(lt.isUndefined(O)||O===null)&&e.append(a===!0?Lj([g],S,o):a===null?g:g+"[]",u(O))}),!1}return SM(m)?!0:(e.append(Lj(y,g,o),u(m)),!1)}const d=[],f=Object.assign(Hit,{defaultVisitor:c,convertValue:u,isVisitable:SM});function h(m,g){if(!lt.isUndefined(m)){if(d.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(m),lt.forEach(m,function(b,w){(!(lt.isUndefined(b)||b===null)&&i.call(e,b,lt.isString(w)?w.trim():w,g,f))===!0&&h(b,g?g.concat(w):[w])}),d.pop()}}if(!lt.isObject(t))throw new TypeError("data must be an object");return h(t),e}function Ij(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function GD(t,e){this._pairs=[],t&&QC(t,this,e)}const $J=GD.prototype;$J.append=function(e,n){this._pairs.push([e,n])};$J.toString=function(e){const n=e?function(r){return e.call(this,r,Ij)}:Ij;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Wit(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function NJ(t,e,n){if(!e)return t;const r=n&&n.encode||Wit;lt.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(e,n):o=lt.isURLSearchParams(e)?e.toString():new GD(e,n).toString(r),o){const a=t.indexOf("#");a!==-1&&(t=t.slice(0,a)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class Uit{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){lt.forEach(this.handlers,function(r){r!==null&&e(r)})}}var Bj=Uit,DJ={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qit=typeof URLSearchParams!="undefined"?URLSearchParams:GD,Yit=typeof FormData!="undefined"?FormData:null,Xit=typeof Blob!="undefined"?Blob:null,Zit={isBrowser:!0,classes:{URLSearchParams:qit,FormData:Yit,Blob:Xit},protocols:["http","https","file","blob","url","data"]};const KD=typeof window!="undefined"&&typeof document!="undefined",xM=typeof navigator=="object"&&navigator||void 0,Git=KD&&(!xM||["ReactNative","NativeScript","NS"].indexOf(xM.product)<0),Kit=(()=>typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Jit=KD&&window.location.href||"http://localhost";var eot=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:KD,hasStandardBrowserWebWorkerEnv:Kit,hasStandardBrowserEnv:Git,navigator:xM,origin:Jit},Symbol.toStringTag,{value:"Module"})),ia={...eot,...Zit};function tot(t,e){return QC(t,new ia.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return ia.isNode&<.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},e))}function not(t){return lt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function rot(t){const e={},n=Object.keys(t);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&<.isArray(i)?i.length:a,l?(lt.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!lt.isObject(i[a]))&&(i[a]=[]),e(n,r,i[a],o)&<.isArray(i[a])&&(i[a]=rot(i[a])),!s)}if(lt.isFormData(t)&<.isFunction(t.entries)){const n={};return lt.forEachEntry(t,(r,i)=>{e(not(r),i,n,0)}),n}return null}function iot(t,e,n){if(lt.isString(t))try{return(e||JSON.parse)(t),lt.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const JD={transitional:DJ,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=lt.isObject(e);if(o&<.isHTMLForm(e)&&(e=new FormData(e)),lt.isFormData(e))return i?JSON.stringify(LJ(e)):e;if(lt.isArrayBuffer(e)||lt.isBuffer(e)||lt.isStream(e)||lt.isFile(e)||lt.isBlob(e)||lt.isReadableStream(e))return e;if(lt.isArrayBufferView(e))return e.buffer;if(lt.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return tot(e,this.formSerializer).toString();if((s=lt.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return QC(s?{"files[]":e}:e,l&&new l,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),iot(e)):e}],transformResponse:[function(e){const n=this.transitional||JD.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(lt.isResponse(e)||lt.isReadableStream(e))return e;if(e&<.isString(e)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(e)}catch(s){if(a)throw s.name==="SyntaxError"?Jn.from(s,Jn.ERR_BAD_RESPONSE,this,null,this.response):s}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ia.classes.FormData,Blob:ia.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};lt.forEach(["delete","get","head","post","put","patch"],t=>{JD.headers[t]={}});var eL=JD;const oot=lt.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"]);var aot=t=>{const e={};let n,r,i;return t&&t.split(` `).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||e[n]&&oot[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e};const Fj=Symbol("internals");function Gv(t){return t&&String(t).trim().toLowerCase()}function K1(t){return t===!1||t==null?t:lt.isArray(t)?t.map(K1):String(t)}function sot(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const lot=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function V2(t,e,n,r,i){if(lt.isFunction(r))return r.call(this,e,n);if(i&&(e=n),!!lt.isString(e)){if(lt.isString(r))return e.indexOf(r)!==-1;if(lt.isRegExp(r))return r.test(e)}}function uot(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function cot(t,e){const n=lt.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(i,o,a){return this[r].call(this,e,i,o,a)},configurable:!0})})}class HC{constructor(e){e&&this.set(e)}set(e,n,r){const i=this;function o(s,l,u){const c=Gv(l);if(!c)throw new Error("header name must be a non-empty string");const d=lt.findKey(i,c);(!d||i[d]===void 0||u===!0||u===void 0&&i[d]!==!1)&&(i[d||l]=K1(s))}const a=(s,l)=>lt.forEach(s,(u,c)=>o(u,c,l));if(lt.isPlainObject(e)||e instanceof this.constructor)a(e,n);else if(lt.isString(e)&&(e=e.trim())&&!lot(e))a(aot(e),n);else if(lt.isHeaders(e))for(const[s,l]of e.entries())o(l,s,r);else e!=null&&o(n,e,r);return this}get(e,n){if(e=Gv(e),e){const r=lt.findKey(this,e);if(r){const i=this[r];if(!n)return i;if(n===!0)return sot(i);if(lt.isFunction(n))return n.call(this,i,r);if(lt.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Gv(e),e){const r=lt.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||V2(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let i=!1;function o(a){if(a=Gv(a),a){const s=lt.findKey(r,a);s&&(!n||V2(r,r[s],s,n))&&(delete r[s],i=!0)}}return lt.isArray(e)?e.forEach(o):o(e),i}clear(e){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!e||V2(this,this[o],o,e,!0))&&(delete this[o],i=!0)}return i}normalize(e){const n=this,r={};return lt.forEach(this,(i,o)=>{const a=lt.findKey(r,o);if(a){n[a]=K1(i),delete n[o];return}const s=e?uot(o):String(o).trim();s!==o&&delete n[o],n[s]=K1(i),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return lt.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=e&<.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(i=>r.set(i)),r}static accessor(e){const r=(this[Fj]=this[Fj]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Gv(a);r[s]||(cot(i,a),r[s]=!0)}return lt.isArray(e)?e.forEach(o):o(e),this}}HC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);lt.reduceDescriptors(HC.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});lt.freezeMethods(HC);var ou=HC;function j2(t,e){const n=this||eL,r=e||n,i=ou.from(r.headers);let o=r.data;return lt.forEach(t,function(s){o=s.call(n,o,i.normalize(),e?e.status:void 0)}),i.normalize(),o}function IJ(t){return!!(t&&t.__CANCEL__)}function dv(t,e,n){Jn.call(this,t==null?"canceled":t,Jn.ERR_CANCELED,e,n),this.name="CanceledError"}lt.inherits(dv,Jn,{__CANCEL__:!0});function BJ(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Jn("Request failed with status code "+n.status,[Jn.ERR_BAD_REQUEST,Jn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function dot(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function fot(t,e){t=t||10;const n=new Array(t),r=new Array(t);let i=0,o=0,a;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[o];a||(a=u),n[i]=l,r[i]=u;let d=o,f=0;for(;d!==i;)f+=n[d++],d=d%t;if(i=(i+1)%t,i===o&&(o=(o+1)%t),u-a{n=c,i=null,o&&(clearTimeout(o),o=null),t.apply(null,u)};return[(...u)=>{const c=Date.now(),d=c-n;d>=r?a(u,c):(i=u,o||(o=setTimeout(()=>{o=null,a(i)},r-d)))},()=>i&&a(i)]}const KS=(t,e,n=3)=>{let r=0;const i=fot(50,250);return hot(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,l=a-r,u=i(l),c=a<=s;r=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:l,rate:u||void 0,estimated:u&&s&&c?(s-a)/u:void 0,event:o,lengthComputable:s!=null,[e?"download":"upload"]:!0};t(d)},n)},Vj=(t,e)=>{const n=t!=null;return[r=>e[0]({lengthComputable:n,total:t,loaded:r}),e[1]]},jj=t=>(...e)=>lt.asap(()=>t(...e));var pot=ia.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,ia.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(ia.origin),ia.navigator&&/(msie|trident)/i.test(ia.navigator.userAgent)):()=>!0,got=ia.hasStandardBrowserEnv?{write(t,e,n,r,i,o){const a=[t+"="+encodeURIComponent(e)];lt.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),lt.isString(r)&&a.push("path="+r),lt.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function mot(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function vot(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function FJ(t,e){return t&&!mot(e)?vot(t,e):e}const zj=t=>t instanceof ou?{...t}:t;function gp(t,e){e=e||{};const n={};function r(u,c,d,f){return lt.isPlainObject(u)&<.isPlainObject(c)?lt.merge.call({caseless:f},u,c):lt.isPlainObject(c)?lt.merge({},c):lt.isArray(c)?c.slice():c}function i(u,c,d,f){if(lt.isUndefined(c)){if(!lt.isUndefined(u))return r(void 0,u,d,f)}else return r(u,c,d,f)}function o(u,c){if(!lt.isUndefined(c))return r(void 0,c)}function a(u,c){if(lt.isUndefined(c)){if(!lt.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function s(u,c,d){if(d in e)return r(u,c);if(d in t)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(u,c,d)=>i(zj(u),zj(c),d,!0)};return lt.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||i,f=d(t[c],e[c],c);lt.isUndefined(f)&&d!==s||(n[c]=f)}),n}var VJ=t=>{const e=gp({},t);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=e;e.headers=a=ou.from(a),e.url=NJ(FJ(e.baseURL,e.url),t.params,t.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let l;if(lt.isFormData(n)){if(ia.hasStandardBrowserEnv||ia.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...c]=l?l.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...c].join("; "))}}if(ia.hasStandardBrowserEnv&&(r&<.isFunction(r)&&(r=r(e)),r||r!==!1&&pot(e.url))){const u=i&&o&&got.read(o);u&&a.set(i,u)}return e};const yot=typeof XMLHttpRequest!="undefined";var bot=yot&&function(t){return new Promise(function(n,r){const i=VJ(t);let o=i.data;const a=ou.from(i.headers).normalize();let{responseType:s,onUploadProgress:l,onDownloadProgress:u}=i,c,d,f,h,m;function g(){h&&h(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let y=new XMLHttpRequest;y.open(i.method.toUpperCase(),i.url,!0),y.timeout=i.timeout;function b(){if(!y)return;const O=ou.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),x={data:!s||s==="text"||s==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:O,config:t,request:y};BJ(function(E){n(E),g()},function(E){r(E),g()},x),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){!y||(r(new Jn("Request aborted",Jn.ECONNABORTED,t,y)),y=null)},y.onerror=function(){r(new Jn("Network Error",Jn.ERR_NETWORK,t,y)),y=null},y.ontimeout=function(){let S=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const x=i.transitional||DJ;i.timeoutErrorMessage&&(S=i.timeoutErrorMessage),r(new Jn(S,x.clarifyTimeoutError?Jn.ETIMEDOUT:Jn.ECONNABORTED,t,y)),y=null},o===void 0&&a.setContentType(null),"setRequestHeader"in y&<.forEach(a.toJSON(),function(S,x){y.setRequestHeader(x,S)}),lt.isUndefined(i.withCredentials)||(y.withCredentials=!!i.withCredentials),s&&s!=="json"&&(y.responseType=i.responseType),u&&([f,m]=KS(u,!0),y.addEventListener("progress",f)),l&&y.upload&&([d,h]=KS(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",h)),(i.cancelToken||i.signal)&&(c=O=>{!y||(r(!O||O.type?new dv(null,t,y):O),y.abort(),y=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const w=dot(i.url);if(w&&ia.protocols.indexOf(w)===-1){r(new Jn("Unsupported protocol "+w+":",Jn.ERR_BAD_REQUEST,t));return}y.send(o||null)})};const _ot=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let r=new AbortController,i;const o=function(u){if(!i){i=!0,s();const c=u instanceof Error?u:this.reason;r.abort(c instanceof Jn?c:new dv(c instanceof Error?c.message:c))}};let a=e&&setTimeout(()=>{a=null,o(new Jn(`timeout ${e} of ms exceeded`,Jn.ETIMEDOUT))},e);const s=()=>{t&&(a&&clearTimeout(a),a=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}=r;return l.unsubscribe=()=>lt.asap(s),l}};var Oot=_ot;const wot=function*(t,e){let n=t.byteLength;if(!e||n{const i=Sot(t,e);let o=0,a,s=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:c}=await i.next();if(u){s(),l.close();return}let d=c.byteLength;if(n){let f=o+=d;n(f)}l.enqueue(new Uint8Array(c))}catch(u){throw s(u),u}},cancel(l){return s(l),i.return()}},{highWaterMark:2})},WC=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",jJ=WC&&typeof ReadableStream=="function",Cot=WC&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),zJ=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Eot=jJ&&zJ(()=>{let t=!1;const e=new Request(ia.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Hj=64*1024,CM=jJ&&zJ(()=>lt.isReadableStream(new Response("").body)),JS={stream:CM&&(t=>t.body)};WC&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!JS[e]&&(JS[e]=lt.isFunction(t[e])?n=>n[e]():(n,r)=>{throw new Jn(`Response type '${e}' is not supported`,Jn.ERR_NOT_SUPPORT,r)})})})(new Response);const Tot=async t=>{if(t==null)return 0;if(lt.isBlob(t))return t.size;if(lt.isSpecCompliantForm(t))return(await new Request(ia.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(lt.isArrayBufferView(t)||lt.isArrayBuffer(t))return t.byteLength;if(lt.isURLSearchParams(t)&&(t=t+""),lt.isString(t))return(await Cot(t)).byteLength},kot=async(t,e)=>{const n=lt.toFiniteNumber(t.getContentLength());return n==null?Tot(e):n};var Pot=WC&&(async t=>{let{url:e,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:l,responseType:u,headers:c,withCredentials:d="same-origin",fetchOptions:f}=VJ(t);u=u?(u+"").toLowerCase():"text";let h=Oot([i,o&&o.toAbortSignal()],a),m;const g=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let y;try{if(l&&Eot&&n!=="get"&&n!=="head"&&(y=await kot(c,r))!==0){let x=new Request(e,{method:"POST",body:r,duplex:"half"}),C;if(lt.isFormData(r)&&(C=x.headers.get("content-type"))&&c.setContentType(C),x.body){const[E,T]=Vj(y,KS(jj(l)));r=Qj(x.body,Hj,E,T)}}lt.isString(d)||(d=d?"include":"omit");const b="credentials"in Request.prototype;m=new Request(e,{...f,signal:h,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:b?d:void 0});let w=await fetch(m);const O=CM&&(u==="stream"||u==="response");if(CM&&(s||O&&g)){const x={};["status","statusText","headers"].forEach(P=>{x[P]=w[P]});const C=lt.toFiniteNumber(w.headers.get("content-length")),[E,T]=s&&Vj(C,KS(jj(s),!0))||[];w=new Response(Qj(w.body,Hj,E,()=>{T&&T(),g&&g()}),x)}u=u||"text";let S=await JS[lt.findKey(JS,u)||"text"](w,t);return!O&&g&&g(),await new Promise((x,C)=>{BJ(x,C,{data:S,headers:ou.from(w.headers),status:w.status,statusText:w.statusText,config:t,request:m})})}catch(b){throw g&&g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new Jn("Network Error",Jn.ERR_NETWORK,t,m),{cause:b.cause||b}):Jn.from(b,b&&b.code,t,m)}});const EM={http:zit,xhr:bot,fetch:Pot};lt.forEach(EM,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Wj=t=>`- ${t}`,Aot=t=>lt.isFunction(t)||t===null||t===!1;var QJ={getAdapter:t=>{t=lt.isArray(t)?t:[t];const{length:e}=t;let n,r;const i={};for(let o=0;o`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=e?o.length>1?`since : `+o.map(Wj).join(` `):" "+Wj(o[0]):"as no adapter specified";throw new Jn("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:EM};function z2(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new dv(null,t)}function Uj(t){return z2(t),t.headers=ou.from(t.headers),t.data=j2.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),QJ.getAdapter(t.adapter||eL.adapter)(t).then(function(r){return z2(t),r.data=j2.call(t,t.transformResponse,r),r.headers=ou.from(r.headers),r},function(r){return IJ(r)||(z2(t),r&&r.response&&(r.response.data=j2.call(t,t.transformResponse,r.response),r.response.headers=ou.from(r.response.headers))),Promise.reject(r)})}const HJ="1.7.9",UC={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{UC[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const qj={};UC.transitional=function(e,n,r){function i(o,a){return"[Axios v"+HJ+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(e===!1)throw new Jn(i(a," has been removed"+(n?" in "+n:"")),Jn.ERR_DEPRECATED);return n&&!qj[a]&&(qj[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,a,s):!0}};UC.spelling=function(e){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};function Mot(t,e,n){if(typeof t!="object")throw new Jn("options must be an object",Jn.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let i=r.length;for(;i-- >0;){const o=r[i],a=e[o];if(a){const s=t[o],l=s===void 0||a(s,o,t);if(l!==!0)throw new Jn("option "+o+" must be "+l,Jn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Jn("Unknown option "+o,Jn.ERR_BAD_OPTION)}}var J1={assertOptions:Mot,validators:UC};const ku=J1.validators;class ex{constructor(e){this.defaults=e,this.interceptors={request:new Bj,response:new Bj}}async request(e,n){try{return await this._request(e,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+o):r.stack=o}catch{}}throw r}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=gp(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&J1.assertOptions(r,{silentJSONParsing:ku.transitional(ku.boolean),forcedJSONParsing:ku.transitional(ku.boolean),clarifyTimeoutError:ku.transitional(ku.boolean)},!1),i!=null&&(lt.isFunction(i)?n.paramsSerializer={serialize:i}:J1.assertOptions(i,{encode:ku.function,serialize:ku.function},!0)),J1.assertOptions(n,{baseUrl:ku.spelling("baseURL"),withXsrfToken:ku.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&<.merge(o.common,o[n.method]);o&<.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ou.concat(a,o);const s=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,s.unshift(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=[Uj.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,u),f=m.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},e(function(o,a,s){r.reason||(r.reason=new dv(o,a,s),n(r.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=r=>{e.abort(r)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new tL(function(i){e=i}),cancel:e}}}var Rot=tL;function $ot(t){return function(n){return t.apply(null,n)}}function Not(t){return lt.isObject(t)&&t.isAxiosError===!0}const TM={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(TM).forEach(([t,e])=>{TM[e]=t});var Dot=TM;function WJ(t){const e=new ew(t),n=wJ(ew.prototype.request,e);return lt.extend(n,ew.prototype,e,{allOwnKeys:!0}),lt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(i){return WJ(gp(t,i))},n}const Ki=WJ(eL);Ki.Axios=ew;Ki.CanceledError=dv;Ki.CancelToken=Rot;Ki.isCancel=IJ;Ki.VERSION=HJ;Ki.toFormData=QC;Ki.AxiosError=Jn;Ki.Cancel=Ki.CanceledError;Ki.all=function(e){return Promise.all(e)};Ki.spread=$ot;Ki.isAxiosError=Not;Ki.mergeConfig=gp;Ki.AxiosHeaders=ou;Ki.formToJSON=t=>LJ(lt.isHTMLForm(t)?new FormData(t):t);Ki.getAdapter=QJ.getAdapter;Ki.HttpStatusCode=Dot;Ki.default=Ki;var Lot=Ki;const Iot=localStorage.getItem("token"),Bot=Lot.create({baseURL:window.allEnv.rule.iotServer,timeout:6e4,headers:{"Content-Type":"application/json",Authorization:`Bearer ${Iot}`}});function Yj(t,e){return Bot.get(t,{params:e})}const Fot={class:"node-property-item"},Vot={key:0},jot={key:1},zot={class:"pair-content"},Qot={key:2},Hot={key:3},Wot={key:4},Uot={class:"pair-content"},qot={key:5},Yot={class:"pair-content"},Xot={key:6},Zot={class:"node-property-sub-item"},Got={key:7},Kot={key:8},Jot={key:9},eat={key:10},tat={__name:"NodePropertyItem",props:["nodePropertyForm","configuration","fields","parentField","currentNodeModel","lf"],setup(t,{expose:e}){const{nodePropertyForm:n,configuration:r,fields:i,parentField:o,currentNodeModel:a,lf:s}=t;F("");const l=[OJ()],u=F(),c=F(),d=F([]);F({}),F({});const f=F(null),h=F("300px");(i||[]).forEach(N=>{if(N.component&&N.component.type==="select"&&N.component.defineOptions&&(N.component.options=N.component.defineOptions||[]),N.component&&N.component.type==="select"&&N.component.optionApi&&N.component.autoGetData){N.component.loading=!0,Yj(N.component.optionApi,N.component.apiParams).then(L=>{N.component.options=(N.component.defineOptions||[]).concat(L.data.data[N.component.resDataKey]||[])}).finally(()=>N.component.loading=!1);const $=r[N.name],W=N.component.onChangeGetDataKey;W&&g($,W,!0)}});function g(N,$,W=!1){if(!N)return;const L=i.find(I=>I.name===$);!L||(W||(r[$]=L.component.defineOptions?L.component.defineOptions[0].value:null),L.component.options=L.component.defineOptions||[],L.component.loading=!0,Yj(L.component.optionApi,{[L.component.getDataByKey]:N}).then(I=>{L.component.options=(L.component.defineOptions||[]).concat(I.data.data[L.component.resDataKey]||[])}).finally(()=>L.component.loading=!1))}const y=function(N){r[N]=lb.js(r[N],{indent_size:2})},b=()=>{Hr.isEnabled&&(Hr.isFullscreen?Hr.exit():(h.value="100%",Hr.request(f.value[0])))};Hr.on("change",()=>{Hr.isFullscreen?h.value="100%":h.value="300px"}),function(){let N={};if(i&&i.forEach($=>{N[$.name]=$}),r){let $={},W={};for(let L in r){let I=Bn(r[L]),U=N[L];if(!(!U||U.component)){if(I&&I instanceof Array)$[L]=[],I.forEach(Q=>{$[L].push({key:Q})});else if(I&&typeof I=="object"&&U.type!=="struct"){W[L]=[];for(let Q in I)W[L].push({key:Q,value:I[Q]})}}}r.arrayItemValues=$,r.mapItemValues=W}}();const O=N=>{r.mapItemValues[N]?r.mapItemValues[N].push({key:"",value:""}):r.mapItemValues[N]=[{key:"",value:""}]},S=(N,$)=>{r.mapItemValues[N]&&r.mapItemValues[N].splice($,1)},x=N=>{r.arrayItemValues[N]?r.arrayItemValues[N].push({key:"",value:""}):r.arrayItemValues[N]=[{key:"",value:""}]},C=(N,$)=>{r.arrayItemValues[N]&&r.arrayItemValues[N].splice($,1)},E=N=>{r[N]||(r[N]=[]),r[N].push({case:"",then:""})},T=(N,$)=>{r[N]&&r[N].length>$&&r[N].splice($,1)},P=N=>N.indexOf("int")>-1,A=N=>N.indexOf("float")>-1;return e({submit:N=>{if(!u.value){N&&N(!1);return}return u.value.validate($=>(N&&N($),$))}}),(N,$)=>{const W=Xm,L=iC,I=Tl,U=ho,Q=fo,V=hi,q=lr,K=Yc,ie=Ol,oe=Gx,Se=Zx,ke=El;return R(),we(ke,{model:t.configuration,ref_key:"propertyItemFormRef",ref:u,"label-position":"top","label-width":"auto",class:"rulego-editor-property-form"},{default:z(()=>[(R(!0),G(ct,null,Wt(t.fields,(Y,re)=>(R(),G("div",Fot,[Y.type==="Boolean"||Y.type==="bool"?(R(),G("div",Vot,[B(I,{label:Y.label||Y.name,prop:Y.name},{default:z(()=>[B(W,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,class:"ml-2",style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},{default:z(()=>[qe(je(Y.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue"]),B(L,{class:"mx-1"},{default:z(()=>[qe(je(Y.label),1)]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","prop"])])):Y.component&&Y.component.type==="switchNode"?(R(),G("div",jot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[J("div",zot,[B(Q,{class:"pair-item-header"},{default:z(()=>[B(U,{span:12},{default:z(()=>[qe(" \u6761\u4EF6 ")]),_:1}),B(U,{span:6,offset:1},{default:z(()=>[qe(" \u8DEF\u7531 ")]),_:1})]),_:1}),(R(!0),G(ct,null,Wt(t.configuration[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:12},{default:z(()=>[B(V,{modelValue:te.case,"onUpdate:modelValue":Re=>te.case=Re,rules:[{required:!0,message:"\u6761\u4EF6\u662F\u5FC5\u987B\u7684"}],prop:Y.name+"["+ge+"].case",placeholder:"\u8F93\u5165\u5224\u65AD\u6761\u4EF6\uFF0C\u5982\uFF1Amsg.temperature > 50"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:6,offset:1},{default:z(()=>[B(V,{modelValue:te.then,"onUpdate:modelValue":Re=>te.then=Re,rules:[{required:!0,message:"\u8DEF\u7531\u662F\u5FC5\u987B\u7684"}],prop:Y.name+"["+ge+"].then",placeholder:"\u8F93\u5165\u8DEF\u7531\uFF1A\u5982\uFF1ACase1"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:2,offset:1},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>T(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(U,{span:24},{default:z(()=>[B(q,{type:"primary",onClick:te=>E(Y.name),icon:"el-icon-plus"},{default:z(()=>[qe("\u6DFB\u52A0\u5206\u652F")]),_:2},1032,["onClick"])]),_:2},1024)]),_:2},1024)]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):Y.component&&Y.component.type==="select"?(R(),G("div",Qot,[!Y.component.getDataByKey||t.configuration[Y.component.getDataByKey]?(R(),we(I,{key:0,label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(ie,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,multiple:Y.component&&Y.component.multiple,filterable:Y.component&&Y.component.filterable,"allow-create":Y.component&&Y.component.allowCreate,placeholder:Y.component&&Y.component.placeholder,onChange:te=>g(te,Y.component.onChangeGetDataKey)},{default:z(()=>[(R(!0),G(ct,null,Wt(Y.component.options,te=>(R(),we(K,{key:te.value!==void 0&&te.value!==null?te.value:te,label:te[Y.component.resDataLabelKey]||te.label||te,value:te[Y.component.resDataValueKey]||(te.value!==void 0&&te.value!==null?te.value:te)},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder","onChange"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])):_e("",!0)])):Y.component&&Y.component.type==="textarea"?(R(),G("div",Hot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>{var te;return[B(V,{type:"textarea",rows:((te=Y==null?void 0:Y.component)==null?void 0:te.rows)||2,modelValue:t.configuration[Y.name],"onUpdate:modelValue":ge=>t.configuration[Y.name]=ge},null,8,["rows","modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]}),_:2},1032,["label","rules","prop"])])):Y.type==="map"?(R(),G("div",Wot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:"mapItemValues["+Y.name+"]"},{default:z(()=>[J("div",Uot,[B(Q,{class:"pair-item-header"},{default:z(()=>[B(U,{span:8},{default:z(()=>[qe(" \u952E ")]),_:1}),B(U,{span:8,offset:2},{default:z(()=>[qe(" \u503C ")]),_:1})]),_:1}),(R(!0),G(ct,null,Wt(t.configuration.mapItemValues[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:8},{default:z(()=>[B(V,{modelValue:te.key,"onUpdate:modelValue":Re=>te.key=Re,rules:[{required:!0,message:"key\u662F\u5FC5\u987B\u7684"}],prop:"mapItemValues["+Y.name+"]["+te.key+"]",placeholder:"\u8BF7\u8F93\u5165\u952E"},null,8,["modelValue","onUpdate:modelValue","prop"])]),_:2},1024),B(U,{span:8,offset:2},{default:z(()=>[B(V,{modelValue:te.value,"onUpdate:modelValue":Re=>te.value=Re,rules:[{required:!0,message:"value\u662F\u5FC5\u987B\u7684"}],prop:"configuration[item.name][pair.key]",placeholder:"\u8BF7\u8F93\u5165\u503C"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(U,{span:4,offset:2},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>S(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(q,{type:"primary",icon:p(pw),onClick:te=>O(Y.name)},{default:z(()=>[qe("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)])]),_:2},1032,["label","rules","prop"])])):Y.type==="array"?(R(),G("div",qot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:"arrayItemValues["+Y.name+"].0.key"},{default:z(()=>[J("div",Yot,[(R(!0),G(ct,null,Wt(t.configuration.arrayItemValues[Y.name],(te,ge)=>(R(),we(Q,{key:ge,class:"pair-item"},{default:z(()=>[B(U,{span:12},{default:z(()=>[B(V,{modelValue:te.key,"onUpdate:modelValue":Re=>te.key=Re,placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),B(U,{span:4,offset:2},{default:z(()=>[B(q,{icon:p(_a),onClick:Re=>C(Y.name,ge),circle:""},null,8,["icon","onClick"])]),_:2},1024)]),_:2},1024))),128)),B(Q,null,{default:z(()=>[B(q,{type:"primary",icon:p(pw),onClick:te=>x(Y.name)},{default:z(()=>[qe("\u6DFB\u52A0")]),_:2},1032,["icon","onClick"])]),_:2},1024)]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):Y.type==="struct"?(R(),G("div",Xot,[B(Se,{modelValue:d.value,"onUpdate:modelValue":$[0]||($[0]=te=>d.value=te)},{default:z(()=>[B(oe,{name:Y.name},{title:z(()=>[qe(je(Y.label||Y.name),1)]),default:z(()=>[J("div",Zot,[B(UJ,{ref_for:!0,ref_key:"subPropertyItemFormRef",ref:c,configuration:t.configuration[Y.name],fields:Y.fields},null,8,["configuration","fields"])])]),_:2},1032,["name"])]),_:2},1032,["modelValue"])])):Y.name==="jsScript"||Y.name==="JsScript"||Y.name==="script"||Y.component&&Y.component.type==="codeEditor"?(R(),G("div",Got,[B(I,{rules:Y.rules,prop:"item.name"},{label:z(()=>[B(Q,null,{default:z(()=>[B(U,{span:20},{default:z(()=>[J("label",null,je(Y.label||Y.name),1)]),_:2},1024),B(U,{span:4,style:{"text-align":"right"}},{default:z(()=>[B(q,{type:"info",size:"small",round:"",onClick:te=>y(Y.name)},{default:z(()=>[qe("\u6574\u7406")]),_:2},1032,["onClick"]),B(q,{icon:p(zm),size:"small",onClick:b,circle:""},null,8,["icon"])]),_:2},1024)]),_:2},1024)]),default:z(()=>[B(Q,{style:{height:"300px",width:"100%"}},{default:z(()=>[B(U,{span:24},{default:z(()=>[J("div",{ref_for:!0,ref_key:"codeEditorRef",ref:f},[B(p(Vu),{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,placeholder:"\u8BF7\u8F93\u5165\u5185\u5BB9...",style:mt({height:h.value,width:"100%",background:"#ffff"}),autofocus:!0,tabSize:2,extensions:l},null,8,["modelValue","onUpdate:modelValue","style"])],512)]),_:2},1024)]),_:2},1024),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["rules"])])):P(Y.type)?(R(),G("div",Kot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(V,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,modelModifiers:{number:!0}},null,8,["modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):A(Y.type)?(R(),G("div",Jot,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[B(V,{modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te},null,8,["modelValue","onUpdate:modelValue"]),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])])):(R(),G("div",eat,[B(I,{label:Y.label||Y.name,rules:Y.rules,prop:Y.name},{default:z(()=>[Y.component&&Y.component.type==="select"?(R(),we(ie,{key:0,modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te,multiple:Y.component&&Y.component.multiple,filterable:Y.component&&Y.component.filterable,"allow-create":Y.component&&Y.component.allowCreate,placeholder:Y.component&&Y.component.placeholder},{default:z(()=>[(R(!0),G(ct,null,Wt(Y.component.options,te=>(R(),we(K,{key:te.value!==void 0&&te.value!==null?te.value:te,label:te.label||te,value:te.value!==void 0&&te.value!==null?te.value:te},null,8,["label","value"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","multiple","filterable","allow-create","placeholder"])):(R(),we(V,{key:1,modelValue:t.configuration[Y.name],"onUpdate:modelValue":te=>t.configuration[Y.name]=te},null,8,["modelValue","onUpdate:modelValue"])),B(L,{size:"small",type:"info"},{default:z(()=>[qe(je(Y.desc),1)]),_:2},1024)]),_:2},1032,["label","rules","prop"])]))]))),256))]),_:1},8,["model"])}}};var UJ=Pl(tat,[["__scopeId","data-v-40d221cb"]]);const nat={class:""},rat={__name:"NodePropertyForm",props:["showDrawer","currentNodeModel","currentNodeView","lf"],setup(t,{expose:e}){const{showDrawer:n,currentNodeModel:r,currentNodeView:i,lf:o}=t;F(""),OJ();const a=F(),s=F();F({}),F({});const l=Sn({nodeId:r.nodeId,id:r.id,type:r.type,name:r.name,configuration:r.configuration||{},debugMode:r.debugMode,additionalInfo:r.additionalInfo||{}});(function(){r.configuration||(r.configuration={}),i.fields&&(i.fields.forEach(h=>{!r.configuration.hasOwnProperty(h.name)&&(h.defaultValue||h.defaultValue===0)&&(r.configuration[h.name]=h.defaultValue)}),l.configuration=r.configuration)})();const c=()=>(d(l.configuration),l),d=h=>{for(let m in h.mapItemValues){let g=h.mapItemValues[m];g&&(h[m]={},g.forEach(y=>{y.key!==""&&(h[m][y.key]=y.value)}))}for(let m in h.arrayItemValues){let g=h.arrayItemValues[m];g&&(h[m]=[],g.forEach(y=>{y.key!==""&&h[m].push(y.key)}))}delete h.mapItemValues,delete h.arrayItemValues;for(let m in h)typeof h[m]=="object"&&d(h[m]);return h};return e({getFormModel:c,submit:h=>(a.value||h&&h(!1),a.value.validate(m=>m?s.value.submit(h):(h&&h(m),m)))}),(h,m)=>{const g=hi,y=ho,b=Xm,w=iC,O=fo,S=Tl,x=El;return R(),G("div",nat,[B(x,{model:l,ref_key:"nodePropertyFormRef",ref:a,"label-position":"top","label-width":"auto"},{default:z(()=>[B(S,{label:"\u8282\u70B9ID",rules:[{required:!0,message:"ID\u662F\u5FC5\u987B\u7684"}],prop:"id"},{default:z(()=>[B(O,{style:{width:"100%"}},{default:z(()=>[B(y,{span:16},{default:z(()=>[B(g,{modelValue:l.id,"onUpdate:modelValue":m[0]||(m[0]=C=>l.id=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9ID"},null,8,["modelValue"])]),_:1}),B(y,{span:7,offset:1},{default:z(()=>[B(b,{class:"ml-2",modelValue:l.debugMode,"onUpdate:modelValue":m[1]||(m[1]=C=>l.debugMode=C),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(w,{class:"mx-1",prop:"debugMode",onClick:m[2]||(m[2]=C=>l.debugMode=!l.debugMode)},{default:z(()=>[qe(" \u8C03\u8BD5\u6A21\u5F0F ")]),_:1})]),_:1})]),_:1})]),_:1}),B(S,{label:"\u540D\u79F0",rules:[{required:!0,message:"\u540D\u79F0\u662F\u5FC5\u987B\u7684"}],prop:"name"},{default:z(()=>[B(O,{style:{width:"100%"}},{default:z(()=>[B(y,{span:24},{default:z(()=>[B(g,{modelValue:l.name,"onUpdate:modelValue":m[3]||(m[3]=C=>l.name=C),placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),B(UJ,{ref_key:"nodePropertyItemFormRef",ref:s,lf:t.lf,currentNodeModel:t.currentNodeModel,configuration:Sn(l.configuration),fields:t.currentNodeView.fields},null,8,["lf","currentNodeModel","configuration","fields"]),B(S,{label:"\u63CF\u8FF0",prop:"desc"},{default:z(()=>[B(g,{modelValue:l.additionalInfo.description,"onUpdate:modelValue":m[4]||(m[4]=C=>l.additionalInfo.description=C),type:"textarea",rows:"2",placeholder:"\u8BF7\u8F93\u5165\u8282\u70B9\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},8,["model"])])}}};var kM=Pl(rat,[["__scopeId","data-v-647b04d4"]]);const iat={style:{flex:"auto"}},oat={__name:"DebugDataPanel",props:["url","chainId","nodeId"],setup(t){const{url:e,chainId:n,nodeId:r}=t,i=[sv(),vr.readOnly.of(!0)],o=F([]),a=F(!1),s=F(""),l=F(""),u=F({page:1,size:20,total:0}),c=w=>{u.value.size=w,u.value.page=1,f()},d=w=>{u.value.page=w,f()},f=()=>{fetch(e+"?chainId="+n+"&nodeId="+r+"&size="+u.value.size+"&page="+u.value.page).then(w=>w.json()).then(w=>{o.value=w.items||[],u.value={size:w.size||20,page:w.page,total:w.total}}).catch(w=>{Vr.error(w.message)})};Bt(()=>{f()});const h=(w,O)=>It(w.ts).format("YYYY-MM-DD HH:mm:ss"),m=w=>{s.value="\u6570\u636E",l.value=lb.js(w.data,{indent_size:2}),a.value=!0},g=w=>{s.value="\u5143\u6570\u636E",l.value=lb.js(JSON.stringify(w.metadata),{indent_size:2}),a.value=!0},y=w=>{s.value="\u9519\u8BEF",l.value=w||"",a.value=!0},b=()=>{a.value=!1};return(w,O)=>{const S=lr,x=Ui,C=ho,E=fo,T=$b,P=Rb,A=eC,D=Ma;return R(),G(ct,null,[B(E,null,{default:z(()=>[B(C,{span:4,offset:20},{default:z(()=>[B(x,{class:"box-item",effect:"dark",content:"\u5237\u65B0",placement:"top-start"},{default:z(()=>[B(S,{icon:p(jQ),onClick:f,circle:""},null,8,["icon"])]),_:1})]),_:1})]),_:1}),B(P,{data:o.value,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"20px"}},{default:z(()=>[B(T,{prop:"ts",label:"\u4E8B\u4EF6\u65F6\u95F4",width:"90",formatter:h}),B(T,{prop:"flowType",label:"\u7C7B\u578B",width:"60"}),B(T,{prop:"msg.id",label:"\u6D88\u606FID",width:"130"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:N.row.msg.id,placement:"top-start"},{default:z(()=>[qe(je(N.row.msg.id.length>14?N.row.msg.id.substring(0,14)+"...":N.row.msg.id),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"msg.type",label:"\u6D88\u606F\u7C7B\u578B",width:"130"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:N.row.msg.type,placement:"top-start"},{default:z(()=>[qe(je(N.row.msg.type.length>10?N.row.msg.type.substring(0,10)+"...":N.row.msg.type),1)]),_:2},1032,["content"])]),_:1}),B(T,{prop:"relationType",label:"\u5173\u7CFB\u7C7B\u578B",width:"90"}),B(T,{prop:"msg.data",label:"\u6570\u636E",width:"60"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[B(S,{icon:p(Oy),onClick:$=>m(N.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"msg.metadata",label:"\u5143\u6570\u636E",width:"80"},{default:z(N=>[B(x,{class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[B(S,{icon:p(Oy),onClick:$=>g(N.row.msg),link:""},null,8,["icon","onClick"])]),_:2},1024)]),_:1}),B(T,{prop:"err",label:"\u9519\u8BEF",width:"80"},{default:z(N=>[N.row.err?(R(),we(x,{key:0,class:"box-item",effect:"dark",content:"\u67E5\u770B",placement:"top-start"},{default:z(()=>[N.row.err?(R(),we(S,{key:0,icon:p(Oy),onClick:$=>y(N.row.err),link:""},null,8,["icon","onClick"])):_e("",!0)]),_:2},1024)):_e("",!0)]),_:1})]),_:1},8,["data"]),B(A,{currentPage:u.value.page,"onUpdate:currentPage":O[0]||(O[0]=N=>u.value.page=N),style:{"margin-top":"10px"},class:"float-right","page-size":u.value.size,total:u.value.total,"page-sizes":[20,50,100],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:c,onCurrentChange:d},null,8,["currentPage","page-size","total"]),B(D,{"append-to-body":!1,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,draggable:"",top:"10px","before-close":b,modelValue:a.value},{header:z(()=>[B(E,null,{default:z(()=>[B(C,{span:12},{default:z(()=>[qe(je(s.value),1)]),_:1})]),_:1})]),footer:z(()=>[J("div",iat,[B(S,{onClick:b},{default:z(()=>[qe("\u5173\u95ED")]),_:1})])]),default:z(()=>[B(p(Vu),{modelValue:l.value,"onUpdate:modelValue":O[1]||(O[1]=N=>l.value=N),placeholder:"\u65E0\u6570\u636E",style:{height:"400px",width:"100%"},autofocus:!0,tabSize:2,extensions:i},null,8,["modelValue"])]),_:1},8,["modelValue"])],64)}}},aat={class:""},sat={__name:"RouterItemForm",props:["showDrawer","currentRouter","currentNodeView","currentNodeModel"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentRouter:i,currentNodeView:o,currentNodeModel:a}=t;F(["headersToMetadata"]),F(["responseToBody"]);const s=F(["POST","GET","DELETE","PUT","PATCH"]),l={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},u=Sn(i),c=F(l);if(o.router){let m={...l};m=Object.assign(m,o.router),m.from.processors||(m.from.processors=l.from.processors),m.to.processors||(m.to.processors=l.to.processors),c.value=m,o.type==="endpoint/http"&&(!u.params||u.params.length===0)&&(u.params=["POST"])}const d=F();return Sn({showPopover:!1,cronValue:""}),e({submit:()=>d.value.validate(m=>(m&&a.routers&&a.routers.forEach(g=>{if(Xn.toFromPath(g)===Xn.toFromPath(u)&&g.id!==u.id)return Vr.error(Xn.toFromPath(u)+" \u5DF2\u7ECF\u5B58\u5728"),m=!1,!1}),m&&n("submit",Bn(u)),m)),getRouterView:()=>c}),(m,g)=>{const y=Yc,b=Ol,w=hi,O=iC,S=ho,x=fo,C=Tl,E=Xm,T=El;return R(),G("div",aat,[B(T,{model:u,ref_key:"formRef",ref:d,"label-position":"top","label-width":"auto"},{default:z(()=>{var P,A,D,N,$,W;return[B(C,{label:c.value.from.path.label,rules:c.value.from.path.rules,prop:"from.path"},{default:z(()=>[B(x,{style:{width:"100%"}},{default:z(()=>[B(S,{span:24},{default:z(()=>[t.currentNodeView.type==="endpoint/sagoo/devicein"?(R(),we(b,{key:0,modelValue:u.from.path,"onUpdate:modelValue":g[0]||(g[0]=L=>u.from.path=L),filterable:""},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.from.path.options,L=>(R(),we(y,{key:L,label:L.label,value:L.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):(R(),G(ct,{key:1},[B(w,{modelValue:u.from.path,"onUpdate:modelValue":g[2]||(g[2]=L=>u.from.path=L),placeholder:"\u8BF7\u8F93\u5165"+c.value.from.path.label},ts({_:2},[t.currentNodeView.type==="endpoint/http"?{name:"prepend",fn:z(()=>[B(b,{modelValue:u.params[0],"onUpdate:modelValue":g[1]||(g[1]=L=>u.params[0]=L),filterable:"",style:{width:"150px"}},{default:z(()=>[(R(!0),G(ct,null,Wt(s.value,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.from.path.desc),1)]),_:1})],64))]),_:1})]),_:1})]),_:1},8,["label","rules"]),c.value.from.processors.hide?_e("",!0):(R(),we(C,{key:0,label:c.value.from.processors.label,prop:"from.processors"},{default:z(()=>[B(b,{modelValue:u.from.processors,"onUpdate:modelValue":g[3]||(g[3]=L=>u.from.processors=L),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.from.processors.label},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.options.inProcessors,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.from.processors.desc),1)]),_:1})]),_:1},8,["label"])),(D=(A=(P=c.value)==null?void 0:P.to)==null?void 0:A.processors)!=null&&D.hide?_e("",!0):(R(),we(C,{key:1,label:(W=($=(N=c.value)==null?void 0:N.to)==null?void 0:$.processors)==null?void 0:W.label,prop:"to.processors"},{default:z(()=>[B(b,{modelValue:u.to.processors,"onUpdate:modelValue":g[4]||(g[4]=L=>u.to.processors=L),multiple:"",filterable:"","allow-create":!0,placeholder:"\u8BF7\u8F93\u5165"+c.value.to.processors.label},{default:z(()=>[(R(!0),G(ct,null,Wt(c.value.options.outProcessors,L=>(R(),we(y,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe(je(c.value.to.processors.desc),1)]),_:1})]),_:1},8,["label"])),t.currentNodeView.type==="endpoint/http"?(R(),we(C,{key:2,label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",prop:"to.wait"},{default:z(()=>[B(E,{modelValue:u.to.wait,"onUpdate:modelValue":g[5]||(g[5]=L=>u.to.wait=L),style:{"--el-switch-on-color":"#13ce66","--el-switch-off-color":"#ff4949"}},null,8,["modelValue"]),B(O,{size:"small",type:"info"},{default:z(()=>[qe("\u5982\u679C\u5F00\u542F\u5219\u4F1A\u628A\u89C4\u5219\u94FE\u6267\u884C\u7ED3\u679C\u54CD\u5E94\u5230\u5BA2\u6237\u7AEF")]),_:1})]),_:1})):_e("",!0)]}),_:1},8,["model"])])}}},qJ={__name:"RouterPropertyTable",props:["showDrawer","currentNodeModel","currentNodeView"],emits:["submit","cancel"],setup(t,{expose:e,emit:n}){const{showDrawer:r,currentNodeModel:i,currentNodeView:o}=t,a=F({}),s=F(!1),l=F(!1),u=F(),c={from:{path:{label:"Path",rules:[{required:!0,message:"\u8BE5\u9879\u662F\u5FC5\u987B\u7684"}],desc:"\u8DEF\u7531Path\uFF1A\u5982:/api/ms/ws "},processors:{label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u524D\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}},to:{processors:{label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668",desc:"\u9009\u62E9\u5185\u7F6E\u7684\u540E\u7F6E\u6570\u636E\u8F6C\u6362\u5668\u6216\u8005\u5904\u7406\u5668"}}},d=F(c);if(o.router){let T={...c};T=Object.assign(T,o.router),d.value=T}const f=F({current:1,pageSize:12,total:i.routers&&i.routers.length}),h=T=>{f.value.pageSize=T,f.value.current=1},m=T=>{f.value.current=T},g=T=>{if(l.value){const P=i.routers.findIndex(A=>A.id===T.id||Xn.toFromPath(A)===Xn.toFromPath(T));P!==-1&&i.routers.splice(P,1,T)}else i.routers||(i.routers=[]),i.routers.push(T);s.value=!1},y=()=>i,b=()=>{n("cancel")},w=(T,P)=>Xn.toFromPath(T,P),O=(T,P)=>T.to&&T.to.wait?"\u662F":"\u5426",S=()=>{a.value={id:Xn.genId(),params:[],from:{path:"",processors:[]},to:{path:"",processors:[],wait:!1}},l.value=!1,s.value=!0},x=T=>{a.value={...T},l.value=!0,s.value=!0},C=T=>{i.routers&&(i.routers=i.routers.filter(P=>P.id!==T.id&&Xn.toFromPath(P)!==Xn.toFromPath(T)))},E=()=>{u.value.submit()};return e({getFormModel:y}),(T,P)=>{const A=lr,D=$b,N=Bs,$=Rb,W=eC,L=Ma;return R(),G(ct,null,[B(A,{type:"primary",onClick:S},{default:z(()=>[qe("\u65B0\u589E")]),_:1}),B($,{data:t.currentNodeModel.routers,stripe:"","empty-text":"\u6CA1\u6570\u636E",style:{width:"100%","min-height":"50px"}},{default:z(()=>{var I,U,Q,V;return[B(D,{prop:"from.path",label:d.value.from.path.label,formatter:function(q){return w(q,t.currentNodeModel.type)}},null,8,["label","formatter"]),(U=(I=d.value.from)==null?void 0:I.processors)!=null&&U.hide?_e("",!0):(R(),we(D,{key:0,prop:"from.processors",label:"\u524D\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:z(q=>[(R(!0),G(ct,null,Wt(q.row.from.processors,K=>(R(),we(N,{key:K,style:{"margin-right":"5px"}},{default:z(()=>[qe(je(K),1)]),_:2},1024))),128))]),_:1})),(V=(Q=d.value.to)==null?void 0:Q.processors)!=null&&V.hide?_e("",!0):(R(),we(D,{key:1,prop:"to.processors",label:"\u540E\u7F6E\u6570\u636E\u5904\u7406\u5668"},{default:z(q=>[(R(!0),G(ct,null,Wt(q.row.to.processors,K=>(R(),we(N,{key:K,style:{"margin-right":"5px"}},{default:z(()=>[qe(je(K),1)]),_:2},1024))),128))]),_:1})),t.currentNodeView.type==="endpoint/http"?(R(),we(D,{key:2,prop:"to.wait",label:"\u7B49\u5F85\u6267\u884C\u7ED3\u679C",formatter:O})):_e("",!0),B(D,{label:"\u64CD\u4F5C"},{default:z(({row:q})=>[B(A,{type:"primary",size:"small",onClick:K=>x(q)},{default:z(()=>[qe("\u7F16\u8F91")]),_:2},1032,["onClick"]),B(A,{type:"danger",size:"small",onClick:K=>C(q)},{default:z(()=>[qe("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]}),_:1},8,["data"]),B(W,{currentPage:f.value.current,"onUpdate:currentPage":P[0]||(P[0]=I=>f.value.current=I),style:{"margin-top":"10px"},class:"float-right","page-size":f.value.pageSize,total:f.value.total,"page-sizes":[12,24,36],background:!0,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:h,onCurrentChange:m},null,8,["currentPage","page-size","total"]),B(L,{modelValue:s.value,"onUpdate:modelValue":P[2]||(P[2]=I=>s.value=I),"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,title:l.value.value?"\u7F16\u8F91\u7F16\u8F91":"\u65B0\u589E\u8DEF\u7531"},{footer:z(()=>[B(A,{onClick:P[1]||(P[1]=I=>s.value=!1)},{default:z(()=>[qe("\u53D6\u6D88")]),_:1}),B(A,{type:"primary",onClick:E},{default:z(()=>[qe("\u4FDD\u5B58")]),_:1})]),default:z(()=>[B(sat,{ref_key:"routerItemFormRef",ref:u,currentRouter:a.value,currentNodeView:t.currentNodeView,currentNodeModel:t.currentNodeModel,onSubmit:g,onCancel:b},null,8,["currentRouter","currentNodeView","currentNodeModel"])]),_:1},8,["modelValue","title"])],64)}}},lat=["innerHTML"],uat={style:{"text-align":"left"}},cat={__name:"NodePropertyDrawer",props:["show","currentNodeModel","currentNodeView","chainId","debugDataUrl","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,chainId:o,debugDataUrl:a,lf:s}=t,l=F(),u=F(),c=F("detail"),d=async()=>{let g;if(u.value&&!i.router.hide){if(g=u.value.getFormModel().routers,!g||g.length===0){c.value="router",Vr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else g=[{from:{path:"*"},to:{}}];l.value.submit(y=>{if(!y)c.value="detail";else{const b=l.value.getFormModel();g&&(b.routers=g),e("submit",b)}})},f=()=>{e("cancel")},h=()=>{f()},m=()=>{};return(g,y)=>{const b=Bs,w=ho,O=fo,S=Sp,x=wp,C=lr,E=K$;return R(),we(E,{modal:!1,"close-on-click-modal":!1,"close-on-press-escape":!1,direction:"rtl",size:"580px","modal-class":"right-drawer-modal","before-close":h,modelValue:t.show},ts({header:z(()=>[B(O,{class:"setter-title"},{default:z(()=>[B(w,{span:12},{default:z(()=>[qe("\u8282\u70B9\u8BE6\u60C5 "),B(b,{class:"ml-2",type:"info"},{default:z(()=>[qe(je(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),default:z(()=>[B(x,{modelValue:c.value,"onUpdate:modelValue":y[0]||(y[0]=T=>c.value=T),onTabClick:m},{default:z(()=>[B(S,{label:"\u8BE6\u60C5",name:"detail"},{default:z(()=>[B(kM,{ref_key:"nodePropertyFormRef",ref:l,lf:t.lf,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["lf","currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.nodeType==="endpoint-node"&&!t.currentNodeView.router.hide?(R(),we(S,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:z(()=>[B(qJ,{ref_key:"routerPropertyFormRef",ref:u,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:d,onCancel:f},null,8,["currentNodeModel","currentNodeView"])]),_:1})):_e("",!0),t.currentNodeView.nodeType!=="endpoint-node"?(R(),we(S,{key:1,label:"\u8C03\u8BD5\u65E5\u5FD7",name:"debug"},{default:z(()=>[c.value==="debug"?(R(),we(oat,{key:0,url:t.debugDataUrl,chainId:t.chainId,nodeId:t.currentNodeModel.id},null,8,["url","chainId","nodeId"])):_e("",!0)]),_:1})):_e("",!0),B(S,{label:"\u5E2E\u52A9",name:"help"},{default:z(()=>[J("div",{innerHTML:t.currentNodeView.desc},null,8,lat)]),_:1})]),_:1},8,["modelValue"])]),_:2},[c.value==="detail"||c.value==="router"?{name:"footer",fn:z(()=>[J("div",uat,[B(C,{type:"primary",size:"large",onClick:d},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(C,{size:"large",onClick:f},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),key:"0"}:void 0]),1032,["modelValue"])}}};var dat=Pl(cat,[["__scopeId","data-v-f76fd896"]]);const fat={style:{flex:"auto"}},hat={__name:"NodePropertyDialog",props:["show","currentNodeModel","currentNodeView","lf"],emits:["submit","cancel"],setup(t,{emit:e}){const{show:n,currentNodeModel:r,currentNodeView:i,lf:o}=t,a=F(),s=F(),l=F("detail"),u=async()=>{let f;if(s.value&&!i.router.hide){if(f=s.value.getFormModel().routers,!f||f.length===0){l.value="router",Vr.error("\u8BF7\u8BBE\u7F6E\u8DEF\u7531");return}}else f=[{from:{path:"*"},to:{}}];a.value.submit(h=>{if(!h)l.value="detail";else{const m=a.value.getFormModel();f&&(m.routers=f),e("submit",m)}})},c=()=>{e("cancel")},d=()=>{c()};return(f,h)=>{const m=Bs,g=ho,y=fo,b=Sp,w=wp,O=lr,S=Ma;return R(),we(S,{"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!1,"close-on-press-escape":!0,width:"55%",draggable:"",top:"10px","before-close":d,modelValue:t.show},{header:z(()=>[B(y,{class:"setter-title"},{default:z(()=>[B(g,{span:12},{default:z(()=>[qe("\u8282\u70B9\u8BE6\u60C5\u914D\u7F6E "),B(m,{class:"ml-2",type:"info"},{default:z(()=>[qe(je(t.currentNodeView.label||t.currentNodeView.type),1)]),_:1})]),_:1})]),_:1})]),footer:z(()=>[J("div",fat,[B(O,{type:"primary",size:"large",onClick:u},{default:z(()=>[qe("\u786E\u8BA4")]),_:1}),B(O,{size:"large",onClick:c},{default:z(()=>[qe("\u53D6\u6D88")]),_:1})])]),default:z(()=>[t.currentNodeView.nodeType!=="endpoint-node"?(R(),we(kM,{key:0,ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,editorOptions:f.editorOptions,lf:t.lf,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView","editorOptions","lf"])):_e("",!0),t.currentNodeView.nodeType==="endpoint-node"?(R(),we(w,{key:1,modelValue:l.value,"onUpdate:modelValue":h[0]||(h[0]=x=>l.value=x)},{default:z(()=>[B(b,{label:"\u8BE6\u60C5",name:"detail"},{default:z(()=>[B(kM,{ref_key:"nodePropertyFormRef",ref:a,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}),t.currentNodeView.router.hide?_e("",!0):(R(),we(b,{key:0,label:"\u8DEF\u7531\u8BBE\u7F6E",name:"router"},{default:z(()=>[B(qJ,{ref_key:"routerPropertyFormRef",ref:s,currentNodeModel:t.currentNodeModel,currentNodeView:t.currentNodeView,onSubmit:u,onCancel:c},null,8,["currentNodeModel","currentNodeView"])]),_:1}))]),_:1},8,["modelValue"])):_e("",!0)]),_:1},8,["modelValue"])}}},pat={builtins:{endpoints:{inProcessors:["toHex","headersToMetadata","setJsonDataType"],outProcessors:["responseToBody","metadataToHeaders"]},functions:{functionName:[]},nodePool:{}},endpoints:[{type:"endpoint/kafka",category:"endpoint/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"sagoo",label:"",desc:"",validate:"",fields:null}],label:"Kafka",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/nats",category:"endpoint/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Nats",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/rabbitmq",category:"endpoint/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"RabbitMQ",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis",category:"endpoint/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/redis/stream",category:"endpoint/redis_stream",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"groupId",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null}],label:"Redis",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/mqtt",category:"github.com/rulego/rulego/endpoint/mqtt",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"Duration",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Mqtt",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/net",category:"github.com/rulego/rulego/endpoint/net",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:":6335",label:"",desc:"",validate:"",fields:null},{name:"readTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"encode",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"Net",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/http",category:"github.com/rulego/rulego/endpoint/rest",fields:[{name:"server",type:"string",defaultValue:":6333",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Rest",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/schedule",category:"github.com/rulego/rulego/endpoint/schedule",fields:null,label:"Schedule",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"endpoint/ws",category:"github.com/rulego/rulego/endpoint/websocket",fields:[{name:"server",type:"string",defaultValue:":6334",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"allowCors",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"Websocket",desc:"",icon:"",relationTypes:["Success","Failure"]}],nodes:[{type:"comment",category:"action",fields:null,label:"CommentNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"delay",category:"action",fields:[{name:"maxPendingMsgs",type:"int",defaultValue:1e3,label:"",desc:"",validate:"",fields:null},{name:"periodInSeconds",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"periodInSecondsPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"overwrite",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DelayNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exec",category:"action",fields:[{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"args",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"log",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"replaceData",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ExecCommandNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"for",category:"action",fields:[{name:"range",type:"string",defaultValue:"1..3",label:"",desc:"",validate:"",fields:null},{name:"do",type:"string",defaultValue:"s3",label:"",desc:"",validate:"",fields:null},{name:"mode",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ForNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"functions",category:"action",fields:[{name:"functionName",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null}],label:"FunctionsNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupAction",category:"action",fields:[{name:"matchRelationType",type:"string",defaultValue:"Success",label:"",desc:"",validate:"",fields:null},{name:"matchNum",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupActionNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"iterator",category:"action",fields:[{name:"fieldName",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"jsScript",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"IteratorNode",desc:"",icon:"",relationTypes:["True","False","Success","Failure"]},{type:"join",category:"action",fields:[{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"JoinNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"log",category:"action",fields:[{name:"jsScript",type:"string",defaultValue:"return 'Incoming message:\\n' + JSON.stringify(msg) + '\\nIncoming metadata:\\n' + JSON.stringify(metadata);",label:"",desc:"",validate:"",fields:null}],label:"LogNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"dbClient",category:"external",fields:[{name:"driverName",type:"string",defaultValue:"mysql",label:"",desc:"",validate:"",fields:null},{name:"dsn",type:"string",defaultValue:"root:root@tcp(127.0.0.1:3306)/test",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"sql",type:"string",defaultValue:"select * from test",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"getOne",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"DbClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"mqttClient",category:"external",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:1883",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null},{name:"maxReconnectInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"qOS",type:"uint8",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cleanSession",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"clientID",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cAFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"certKeyFile",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"MqttClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"net",category:"external",fields:[{name:"protocol",type:"string",defaultValue:"tcp",label:"",desc:"",validate:"",fields:null},{name:"server",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"connectTimeout",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null},{name:"heartbeatInterval",type:"int",defaultValue:60,label:"",desc:"",validate:"",fields:null}],label:"NetNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"restApiCall",category:"external",fields:[{name:"restEndpointUrlPattern",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"requestMethod",type:"string",defaultValue:"POST",label:"",desc:"",validate:"",fields:null},{name:"withoutRequestBody",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:{"Content-Type":"application/json"},label:"",desc:"",validate:"",fields:null},{name:"readTimeoutMs",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"insecureSkipVerify",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"maxParallelRequestsCount",type:"int",defaultValue:200,label:"",desc:"",validate:"",fields:null},{name:"enableProxy",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"useSystemProxyProperties",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"proxyScheme",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"proxyUser",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"proxyPassword",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RestApiCallNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"sendEmail",category:"external",fields:[{name:"smtpHost",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"smtpPort",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"enableTls",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"email",type:"struct",defaultValue:{from:"",to:"",cc:"",bcc:"",subject:"",body:""},label:"",desc:"",validate:"",fields:[{name:"from",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"to",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"cc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"bcc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"subject",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"body",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}]},{name:"connectTimeout",type:"int",defaultValue:10,label:"",desc:"",validate:"",fields:null}],label:"SendEmailNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ssh",category:"external",fields:[{name:"host",type:"string",defaultValue:"127.0.0.1",label:"",desc:"",validate:"",fields:null},{name:"port",type:"int",defaultValue:22,label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"root",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"password",label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"SshNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/grpcClient",category:"external/grpc",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:50051",label:"",desc:"",validate:"",fields:null},{name:"service",type:"string",defaultValue:"helloworld.Greeter",label:"",desc:"",validate:"",fields:null},{name:"method",type:"string",defaultValue:"SayHello",label:"",desc:"",validate:"",fields:null},{name:"request",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"headers",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/kafkaProducer",category:"external/kafka",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:9092",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"partition",type:"int32",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"ProducerNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/mongodbClient",category:"external/mongodb",fields:[{name:"server",type:"string",defaultValue:"mongodb://localhost:27017",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"test",label:"",desc:"",validate:"",fields:null},{name:"collection",type:"string",defaultValue:"user",label:"",desc:"",validate:"",fields:null},{name:"opType",type:"string",defaultValue:"QUERY",label:"",desc:"",validate:"",fields:null},{name:"filter",type:"string",defaultValue:'{"age": {"$gte": 18}}',label:"",desc:"",validate:"",fields:null},{name:"doc",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"one",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/natsClient",category:"external/nats",fields:[{name:"server",type:"string",defaultValue:"nats://127.0.0.1:4222",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"topic",type:"string",defaultValue:"/device/msg",label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiQuery",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"command",type:"string",defaultValue:"select * from cpu_load",label:"",desc:"",validate:"",fields:null}],label:"QueryNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/opengeminiWrite",category:"external/opengemini",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:8086",label:"",desc:"",validate:"",fields:null},{name:"database",type:"string",defaultValue:"db0",label:"",desc:"",validate:"",fields:null},{name:"username",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"token",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"WriteNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/rabbitmqClient",category:"external/rabbitmq",fields:[{name:"server",type:"string",defaultValue:"amqp://guest:guest@127.0.0.1:5672/",label:"",desc:"",validate:"",fields:null},{name:"key",type:"string",defaultValue:"device.msg.request",label:"",desc:"",validate:"",fields:null},{name:"exchange",type:"string",defaultValue:"rulego",label:"",desc:"",validate:"",fields:null},{name:"exchangeType",type:"string",defaultValue:"topic",label:"",desc:"",validate:"",fields:null},{name:"durable",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null},{name:"autoDelete",type:"bool",defaultValue:!0,label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisClient",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"cmd",type:"string",defaultValue:"GET",label:"",desc:"",validate:"",fields:null},{name:"paramsExpr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"params",type:"array",defaultValue:["${metadata.key}"],label:"",desc:"",validate:"",fields:null}],label:"ClientNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/redisPub",category:"external/redis",fields:[{name:"server",type:"string",defaultValue:"127.0.0.1:6379",label:"",desc:"",validate:"",fields:null},{name:"password",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"poolSize",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"db",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null},{name:"channel",type:"string",defaultValue:"default",label:"",desc:"",validate:"",fields:null}],label:"PublisherNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprFilter",category:"filter",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"ExprFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fieldFilter",category:"filter",fields:[{name:"checkAllKeys",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"dataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"metadataNames",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"FieldFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"fork",category:"filter",fields:null,label:"ForkNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"groupFilter",category:"filter",fields:[{name:"allMatches",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null},{name:"nodeIds",type:"",defaultValue:null,label:"",desc:"",validate:"",fields:null},{name:"timeout",type:"int",defaultValue:0,label:"",desc:"",validate:"",fields:null}],label:"GroupFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsFilter",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return msg.temperature > 50;",label:"",desc:"",validate:"",fields:null}],label:"JsFilterNode",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"jsSwitch",category:"filter",fields:[{name:"jsScript",type:"string",defaultValue:"return ['msgType1','msgType2'];",label:"",desc:"",validate:"",fields:null}],label:"JsSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"msgTypeSwitch",category:"filter",fields:null,label:"MsgTypeSwitchNode",desc:"",icon:"",relationTypes:[]},{type:"switch",category:"filter",fields:[{name:"cases",type:"array",defaultValue:[{case:"msg.temperature>=20 && msg.temperature<=50",then:"Case1"},{case:"msg.temperature>50",then:"Case2"}],label:"",desc:"",validate:"",fields:null}],label:"SwitchNode",desc:"",icon:"",relationTypes:[]},{type:"x/luaFilter",category:"filter",fields:[{name:"script",type:"string",defaultValue:"return msg.temperature > 50",label:"",desc:"",validate:"",fields:null}],label:"LuaFilter",desc:"",icon:"",relationTypes:["True","False","Failure"]},{type:"flow",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"extend",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"ChainNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"ref",category:"flow",fields:[{name:"targetId",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null}],label:"RefNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"exprTransform",category:"transform",fields:[{name:"expr",type:"string",defaultValue:"",label:"",desc:"",validate:"",fields:null},{name:"mapping",type:"map",defaultValue:null,label:"",desc:"",validate:"",fields:null}],label:"ExprTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"jsTransform",category:"transform",fields:[{name:"jsScript",type:"string",defaultValue:"return {'msg':msg,'metadata':metadata,'msgType':msgType};",label:"",desc:"",validate:"",fields:null}],label:"JsTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"metadataTransform",category:"transform",fields:[{name:"mapping",type:"map",defaultValue:{temperature:"msg.temperature"},label:"",desc:"",validate:"",fields:null},{name:"isNew",type:"bool",defaultValue:!1,label:"",desc:"",validate:"",fields:null}],label:"MetadataTransformNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"text/template",category:"transform",fields:[{name:"template",type:"string",defaultValue:`"id": "{{ .id}}" "ts": "{{ .ts}}" "type": "{{ .type}}" "msgType": "{{ .msgType}}" "data": "{{ .data | escape}}" "dataType": "{{ .dataType}}" `,label:"",desc:"",validate:"",fields:null}],label:"TemplateNode",desc:"",icon:"",relationTypes:["Success","Failure"]},{type:"x/luaTransform",category:"transform",fields:[{name:"script",type:"string",defaultValue:"return msg, metadata, msgType",label:"",desc:"",validate:"",fields:null}],label:"LuaTransform",desc:"",icon:"",relationTypes:["Success","Failure"]}]},gat={class:"flow-chart"},mat={__name:"RuleGoEditor",props:["options","data"],emits:["saveOk","saveError","reset","updateLocales"],setup(t,{expose:e,emit:n}){const r=t,i=F(),o=F(null),a=F(null),s=F({}),l=F({}),u=F({}),c=F(null),d=F(!1),f=F(!1),h=F(!1),m=F(!1),g=F(!1),y=F({url:window.allEnv.rule.server,toolbar:{}});let b={},w=F({}),O={},S={},x={},C=[],E=[];const T=F(r.data),P=r.options;let A={setting:{},relationTypeSplit:"/",endpointRelationTypeSplit:` `,url:window.allEnv.rule.server,componentsApi:"/api/v1/components",debugDataApi:"/api/v1/logs/debug",executeApi:"/api/v1/rules/:id/execute/:msgType",notifyApi:"/api/v1/rules/:id/notify/msgType",chainsApi:"/api/v1/rules",startX:280,startY:280,loadComponentsFromApi:!0,loadEndpointComponents:!0,locales:{},builtinComponents:{builtins:{},endpoints:[],nodes:[]},components:{endpoints:[],nodes:[]},adapterComponents:function(ae){return A.loadEndpointComponents||(ae.endpoints=[]),A.builtinComponents=ae,Xn.adapterComponents(ae,A.locales)},toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0},container:i.value,grid:{visible:!0,type:"mesh",size:10,config:{color:"#eeeeee"}},adjustEdge:!0,adjustEdgeStartAndEnd:!0,textEdit:!1,stopMoveGraph:!1,hoverOutline:!1,edgeSelectedOutline:!1,allowResize:!0,keyboard:{enabled:!0,shortcuts:[{keys:["delete","backspace"],callback:ae=>{!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div"||Se()}},{keys:["cmd + c","ctrl + c"],callback:ae=>{if(!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div")return;if(!o.value){Xn.copyToClipboard("");return}O.currentCloneNodeId=o.value.id;let me=o.value.properties&&o.value.properties.model||{};Xn.copyToClipboard(JSON.stringify(me))}},{keys:["cmd + v","ctrl + v"],callback:ae=>{!ae.target||ae.target.tagName!=="DIV"&&ae.target.tagName!=="div"||K()}}]},idGenerator:function(ae){return ae==="flow-link"?(O.edgeCount++,"edge_"+O.edgeCount):(O.nodeCount++,"node_"+O.nodeCount)},plugins:[EUe,SUe,RX,fJ,CUe,oUe]},D=null;Bt(()=>{N()});const N=()=>{A.components&&A.components.nodes&&A.components.nodes.length>0?(A.components=A.adapterComponents(A.components),b=Z(A.components),$()):(A.components=A.adapterComponents(pat),b=Z(A.components),$()),A.loadComponentsFromApi&&$e().then(ae=>{A.components=ae,b=Z(A.components),$()})},$=()=>{te(),Object.assign(A,P),y.value={url:A.url,componentsApi:A.componentsApi,debugDataApi:A.debugDataApi,executeApi:A.executeApi,notifyApi:A.notifyApi,chainsApi:A.chainsApi,toolbar:A.toolbar},A.ruleChain&&(w.value=w),A.container=i.value,D=new oX(A),D.getRuleChain=function(){return w.value},D.getEditorSetting=function(){return y.value},D.getOptions=function(){return A},D.nodeComponents=function(){return b},D.setLocales=function(ae){Ie(ae)},D.extension.selectionSelect.setSelectionSense(!0,!1),D.adapterIn=function(ae){kr(ae)&&(ae=ae.value),ae||(ae={});let me={};ae.ruleChain&&(w.value=ae.ruleChain,me=ae.ruleChain.additionalInfo||{});let Ae=[],X=[],ee=parseInt(me.layoutX||A.startX)||A.startX,le=parseInt(me.layoutY||A.startY)||A.startY;Ae.push({id:O.startNodeId,type:"start-node",x:ee,y:le,text:Ng("Input")});let Ce=null,fe=0,Ee=ae.metadata&&ae.metadata.firstNodeIndex||0;ae&&ae.metadata&&ae.metadata.nodes&&ae.metadata.nodes.forEach((Xe,Ke)=>{let tt=Xn.getNodeSeq(Xe.id);tt>fe&&(fe=tt),O.nodeCount++;let Dt=b[Xe.type],jt="simple-node";Dt&&Dt.nodeType&&(jt=Dt.nodeType),Ee===Ke&&(Ce=Xe),ee=ee+150;let Me=Xe.additionalInfo||{},nt=Me.layoutX||ee,de=Me.layoutY||le;Ae.push({id:Xe.id,type:jt,x:nt,y:de,text:Xe.name,properties:{view:b[Xe.type],model:Xe}})}),ae&&ae.metadata&&ae.metadata.endpoints&&ae.metadata.endpoints.forEach((Xe,Ke)=>{let tt=Xn.getNodeSeq(Xe.id);tt>fe&&(fe=tt),O.nodeCount++,ee=ee+150;let Dt=Xe.additionalInfo||{},jt=Dt.layoutX||ee,Me=Dt.layoutY||le;Ae.push({id:Xe.id,type:"endpoint-node",x:jt,y:Me,text:Xe.name,properties:{view:b[Xe.type],model:Xe}})}),O.nodeCount+=fe;let be=[];Ce&&(be=[{fromId:O.startNodeId,toId:Ce.id}]),ae.metadata&&ae.metadata.endpoints&&ae.metadata.endpoints.forEach((Xe,Ke)=>{be=be.concat(Xn.getEndpointConnections(Xe.id,Xe,Ce))});let Be=be;return ae&&ae.metadata&&ae.metadata.connections&&(Be=Be.concat(ae.metadata.connections)),Be.forEach(Xe=>{O.edgeCount++;let Ke=Xn.getEdgeBySourceNodeIdAndTargetNodeId(X,Xe.fromId,Xe.toId);Ke?(Xe.nodeType==="endpoint-node"?Ke.text=Ke.text+A.endpointRelationTypeSplit+Ng(Xe.type,"relationTypes"):Ke.text=Ke.text+A.relationTypeSplit+Ng(Xe.type,"relationTypes"),Ke.properties.model.relationTypes||(Ke.properties.model.relationTypes=[]),Ke.properties.model.relationTypes.push(Xe.type),Xe.routerId&&(Ke.properties.model.routerId=Xe.routerId)):(Xe.relationTypes=[Xe.type],Ke=Xn.createEdge(O,Ae,Xe),X.push(Ke))}),{edges:X,nodes:Ae}},D.adapterOut=function(ae){w.value&&!w.value.id&&(w.value.id=Xn.genId());let me=[],Ae=[],X=[],ee=null,le=[];ae&&ae.edges&&ae.edges.forEach(fe=>{if(fe.sourceNodeId!==O.startNodeId){let Ee=ce(fe.sourceNodeId),be=ce(fe.targetNodeId);Ee===""&&Vr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+Ee),be===""&&Vr.error("\u627E\u4E0D\u5230\u8282\u70B9Id="+be);let Be=D.getNodeDataById(fe.sourceNodeId),Xe=fe.properties.model||{fromId:Ee,toId:be,type:""};Xe.fromId=Ee,Xe.toId=be,Xe.relationTypes.forEach(Ke=>{let tt={};Object.assign(tt,Xe),tt.type=Ke,delete tt.id,delete tt.relationTypes,delete tt.relationTypesLabel,Be.type==="endpoint-node"?le.push(tt):X.push(tt)})}else ee=fe.targetNodeId}),ae&&ae.nodes&&ae.nodes.forEach(fe=>{if(fe.id===O.startNodeId)w.value.additionalInfo?(w.value.additionalInfo.layoutX=String(fe.x),w.value.additionalInfo.layoutY=String(fe.y)):w.value.additionalInfo={layoutX:String(fe.x),layoutY:String(fe.y)};else{let Ee=fe.properties.model;if(Ee){let be=Ee.additionalInfo;be?(be.layoutX=fe.x,be.layoutY=fe.y):Ee.additionalInfo={layoutX:fe.x,layoutY:fe.y},delete Ee.nodeId,fe.type==="endpoint-node"?(Xn.updateEndpointRouterToPath(Ee,w.value.id,le),me.push(Ee)):!ee&&fe.type==="simple-node"||fe.id===ee?Ae.unshift(Ee):Ae.push(Ee)}}});let Ce={endpoints:me,nodes:Ae,connections:X};return{ruleChain:w.value,metadata:Ce}},T?D.render(T):(w.value.id=Xn.genId(),D.render({})),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components),D.on("blank:mousemove",({e:ae})=>{O.mouseX=ae.offsetX,O.mouseY=ae.offsetY}),D.on("blank:mousedown",({e:ae})=>{O.mouseX=ae.offsetX,O.mouseY=ae.offsetY}),D.on("node:click",({data:ae})=>{Y(),Ot(()=>{ae.type!=="start-node"?(o.value=ae,a.value=null,ke(),f.value=!0):(o.value=null,a.value=null)})}),D.on("node:dbclick",({data:ae})=>{Y(),Ot(()=>{ae.type!=="start-node"&&(o.value=ae,a.value=null,ke(),f.value=!0)})}),D.on("edge:click",({data:ae})=>{Y(),Ot(()=>{o.value=null,a.value=ae,f.value=!1,h.value=!1})}),D.on("edge:dbclick",({data:ae})=>{Y(),Ot(()=>{a.value=ae,o.value=null,ke()})}),D.on("node:dnd-add",({data:ae})=>{Y(),Ot(()=>{if(S=ae,o.value=ae,a.value=null,ke(!0),ae.type==="group-node"){const me=D.addNode({type:"start-node",moveRules:[function(Ae,X,ee){return!1}],x:ae.x-100,y:ae.y,text:"\u5F00\u59CB"});ae.addChild(me.id)}})}),D.on("node:add",({data:ae})=>{let me=ae.properties.model;const Ae=D.getNodeModelById(ae.id);me&&Ae&&(me.id=ae.id,Ae.setProperty("model",me))}),D.on("edge:add",({data:ae})=>{let me=D.getNodeEdges(ae.sourceNodeId);me&&me.length>1&&D.getNodeDataById(ae.sourceNodeId).type==="start-node"&&D.deleteEdge(ae.id)}),D.on("edge:add",({data:ae})=>{x=ae,a.value=ae,o.value=null,ae.sourceNodeId!==O.startNodeId&&ke(!0)}),D.on("node:drop",({data:ae})=>{let me=ae.properties.model;me&&(me.additionalInfo?(me.layoutX=ae.x,me.layoutY=ae.y):me.additionalInfo={layoutX:ae.x,layoutY:ae.y})}),D.on("rulego-editor:new",ae=>{Re();let me=typeof ae=="string"?JSON.parse(ae):ae;me.id||(me.id=Xn.genId()),w.value=me}),D.on("rulego-editor:open",ae=>{let me=typeof ae=="string"?JSON.parse(ae):ae;ge(me)}),D.on("rulego-editor:update",ae=>{let me=typeof ae=="string"?JSON.parse(ae):ae;w.name=me.name,w.root=me.root||!0,w.disabled=me.disabled,w.additionalInfo=me.additionalInfo}),D.on("rulego-editor:setting",ae=>{ae.baseUrl&&ae.baseUrl!==y.value.url?(y.value.url=ae.baseUrl,y.value.toolbar=ae.toolbar,$e().then(me=>{A.components=me,b=Z(A.components),$()})):(y.value.url=ae.baseUrl,y.value.toolbar=ae.toolbar)}),D.on("rulego-editor:fullScreen",()=>{console.info("rulego-editor:fullScreen")}),D.on("rulego-editor:save",()=>{oe()}),D.on("rulego-editor:reset",()=>{console.info("rulego-editor:deleteSelects")}),D.on("rulego-editor:deleteSelects",()=>{Se()}),D.on("rulego-editor:showEditPanel",()=>{ke(!1)}),D.on("history:change",ae=>{C=ae.data.undos,E=ae.data.redos}),D.on("rulego-editor:loadComponents",ae=>{A.components=A.adapterComponents(ae),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)})},W=ae=>{o.value=ae;let me=ae.properties.model;!me.type&&ae.properties.view&&(me.type=ae.properties.view.type),l.value=b[me.type]||ae.properties.view,me.id=me.id||ae.id,me.nodeId=ae.id,me.additionalInfo?(me.layoutX=ae.x,me.layoutY=ae.y):me.additionalInfo={layoutX:ae.x,layoutY:ae.y},s.value=me||{}},L=ae=>{const me=D.getNodeModelById(ae.nodeId);me&&(o.value=me,me.setProperty("model",ae),me.updateText(ae.name));let Ae=me.getData();if(Ae.type==="endpoint-node")V(ae.nodeId,ae);else{let X=Ae.properties||{};q(ae.nodeId,X.view||{},ae)}S=null,d.value=!1,f.value=!1},I=()=>{S&&(D.deleteNode(S.id),S=null),re()},U=ae=>{const me=D.getEdgeModelById(ae.id);me&&(a.value=me,D.getNodeDataById(me.sourceNodeId).type==="endpoint-node"?(ae.routerId=ae.relationTypes[0],me.updateText(ae.relationTypesLabel.join(A.endpointRelationTypeSplit))):me.updateText(ae.relationTypesLabel.join(A.relationTypeSplit)),me.setProperty("model",ae)),x=null,g.value=!1,h.value=!1},Q=()=>{x&&(D.deleteEdge(x.id),x=null),re()},V=(ae,me)=>{D.getEdgeModels({sourceNodeId:ae}).forEach(X=>{let ee=X.properties.model||{},le=Xn.getRouterRelationTypeLabel(me,ee.routerId||ee.relationTypes);if(le.length===0)D.deleteEdge(X.id);else{let Ce=le.map(fe=>fe.label);X.updateText(Ce.join(A.endpointRelationTypeSplit))}})},q=(ae,me,Ae)=>{if(!me.relationTypeDynamics)return;let X=D.getEdgeModels({sourceNodeId:ae}),ee=Xn.getRelationTypeOptionsFromNode(me,Ae);X.forEach(le=>{(le.properties.model||{}).relationTypes.every(Ee=>ee.find(be=>be.value===Ee))||D.deleteEdge(le.id)})},K=()=>{Xn.readFromClipboard().then(ae=>{!ie(ae)&&O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)}).catch(ae=>{O.currentCloneNodeId&&D.cloneNode(O.currentCloneNodeId)})},ie=ae=>{if(!ae)return!1;try{let me=JSON.parse(ae);if(!me.type)return!1;O.nodeCount++,me.id="node_"+O.nodeCount;let Ae=O.mouseX,X=O.mouseY,ee=b[me.type];return ee?(D.addNode({id:me.id,type:ee.nodeType||"simple-node",x:Ae,y:X,text:me.name,properties:{view:ee,model:me}}),!0):!1}catch{return!1}},oe=()=>{let ae=D.getGraphData(),me=y.value.url+A.chainsApi+"/"+w.value.id;fetch(me,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ae)}).then(Ae=>Ae.ok?Ae:Ae.text().then(X=>{throw new Error("\u4FDD\u5B58\u5931\u8D25: "+X)})).then(Ae=>{Vr({showClose:!0,message:"\u4FDD\u5B58\u6210\u529F",type:"success"}),n("saveOk",Ae),D.graphModel.eventCenter.emit("rulego-editor:saveOk",Ae)}).catch(Ae=>{Vr.error(Ae.message),n("saveError",ae,Ae)})},Se=()=>{const{nodes:ae,edges:me}=D.getSelectElements();me&&me.forEach(Ae=>{D.deleteEdge(Ae.id)}),ae&&ae.forEach(Ae=>{Ae.type!=="start-node"&&D.deleteNode(Ae.id)}),D.graphModel.eventCenter.emit("rulego-editor:deleted"),Y()},ke=ae=>{if(o.value){let me=o.value;me.type!=="start-node"&&(W(me),ae?d.value=!0:f.value=!0,h.value=!1)}else{let me=a.value,Ae=D.getNodeDataById(me.sourceNodeId);if(Ae.type==="start-node")return;let X=Ae.properties.model||{},ee=X.type;l.value=b[ee];let le=D.getEdgeModels({sourceNodeId:Ae.id}),Ce=[];if(Ae.type==="endpoint-node"){if(Ce=Xn.getRelationTypeOptionsFromRouters(le,X,me.id),Ae.type==="endpoint-node"&&Ce.length===0){Vr.error("\u8F93\u5165\u7AEF\u6BCF\u4E2A\u8DEF\u7531\u53EA\u5141\u8BB8\u4E00\u6761\u8FB9"),D.deleteEdge(me.id);return}}else Ce=Xn.getRelationTypeOptionsFromNode(Ae.properties.view||{},X);c.value=Ce.length>0?Ce:null,u.value=me.properties.model||{id:me.id,fromId:me.sourceNodeId,toId:me.targetNodeId,type:""},u.value.id=me.id,d.value=!1,f.value=!1,ae?g.value=!0:h.value=!0}},Y=()=>{o.value=null,a.value=null,S=null,x=null,re()},re=()=>{d.value=!1,f.value=!1,g.value=!1,h.value=!1},te=()=>{O={nodeCount:0,edgeCount:0,startNodeId:"$node_start_input",nodeWidth:100,currentCloneNodeId:""},o.value=null,a.value=null,d.value=!1,f.value=!1,h.value=!1,m.value=!1,w.value={}},ge=ae=>{T.value=ae,te(),D||N(),D.render(ae),C.length=0,E.length=0,D.extension.miniMap.show()},Re=()=>{D.clearData(),ge({})},$e=async()=>{let ae=y.value.url+A.componentsApi;const Ae=await(await fetch(ae)).json();return A.adapterComponents(Ae)},Z=ae=>{let me={};for(let Ae in ae)ae[Ae].components&&ae[Ae].components.forEach(X=>{me[X.type]=X});return me},ce=ae=>{let me=D.getNodeModelById(ae);return me&&me.properties&&me.properties.model?me.properties.model.id:""},Te=()=>D.getGraphData(),Ie=ae=>{A.locales=ae,A.components=A.adapterComponents(A.builtinComponents),b=Z(A.components),D.graphModel.eventCenter.emit("rulego-editor:componentOk",A.components)};return e({render:ge,save:oe,lf:D,getData:Te,setLocales:Ie}),(ae,me)=>(R(),G("div",gat,[J("div",{ref_key:"container",ref:i,class:"container"},null,512),f.value?(R(),we(dat,{key:0,show:f.value,currentNodeModel:s.value,currentNodeView:l.value,debugDataUrl:y.value.url+p(A).debugDataApi,chainId:p(w).id,lf:p(D),onSubmit:L,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","debugDataUrl","chainId","lf"])):_e("",!0),d.value?(R(),we(hat,{key:1,show:d.value,currentNodeModel:s.value,currentNodeView:l.value,lf:p(D),onSubmit:L,onCancel:I},null,8,["show","currentNodeModel","currentNodeView","lf"])):_e("",!0),h.value?(R(),we(frt,{key:2,show:h.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,onSubmit:U,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions"])):_e("",!0),g.value?(R(),we(prt,{key:3,show:g.value,currentEdgeModel:u.value,sourceNodeView:l.value,relationTypeSplit:p(A).relationTypeSplit,sourceNodeRelationTypeOptions:c.value,lf:p(D),onSubmit:U,onCancel:Q},null,8,["show","currentEdgeModel","sourceNodeView","relationTypeSplit","sourceNodeRelationTypeOptions","lf"])):_e("",!0)]))}};var vat=Pl(mat,[["__scopeId","data-v-4b2a8223"]]);const yat={__name:"App",setup(t){const e=F(),n=F(!1),r=F({url:window.allEnv.rule.server,toolbar:{showTile:!0,showSelection:!0,showUndo:!0,showRedo:!0,showMinMap:!0,showTest:!0,showSetting:!0,showFullScreen:!0,showNew:!0,showOpen:!0,showEdit:!0,showIntegration:!0,showExport:!0,showImport:!0,showNodeMgt:!0,showUserSetting:!0,showAbout:!0,showDoc:!0,showSave:!0,showReset:!0,showDelete:!0}});F({});let i=window.location.hash.slice(1);Bt(()=>{try{const l=knt();l&&(r.value.url=l.baseUrl||r.value.url)}catch(l){console.error("\u8BFB\u53D6\u6570\u636E\u51FA\u9519:",l)}finally{n.value=!0}let a=r.value.url+"/api/v1/rules/"+i,s=r.value.url+"/api/v1/locales";if(i!==""&&i!=="#undefined")o(a,s);else{let l=r.value.url+"/api/v1/rules/get/latest";o(l,s)}});const o=async(a,s)=>{var c;let l,u;try{l=await fetch(s).then(d=>d.json()),e.value.setLocales(l),u=await fetch(a).then(d=>d.json()),window.location.hash=(c=u==null?void 0:u.ruleChain)==null?void 0:c.id,e.value.render(u,l)}catch(d){Vr.closeAll(),Vr.error("\u89C4\u5219\u94FE\u83B7\u53D6\u5931\u8D25\uFF0C\u8BF7\u66F4\u6362 ID \u518D\u6B21\u5C1D\u8BD5"),console.error("Error fetching data:",d)}};return(a,s)=>n.value?(R(),we(vat,{key:0,ref_key:"ruleGoEditorRef",ref:e,data:null,options:r.value},null,8,["options"])):_e("",!0)}},YJ=px(yat);YJ.use(qje,{locale:Uq});YJ.mount("#app")});export default bat();