(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const r of s)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const r={};return s.integrity&&(r.integrity=s.integrity),s.referrerPolicy&&(r.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?r.credentials="include":s.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(s){if(s.ep)return;s.ep=!0;const r=n(s);fetch(s.href,r)}})();function lA(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const ls={},Nm=[],_i=()=>{},ON=()=>!1,G2=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),cA=t=>t.startsWith("onUpdate:"),Cr=Object.assign,uA=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},xq=Object.prototype.hasOwnProperty,fi=(t,e)=>xq.call(t,e),pt=Array.isArray,Bm=t=>ky(t)==="[object Map]",Ig=t=>ky(t)==="[object Set]",bh=t=>ky(t)==="[object Date]",Kt=t=>typeof t=="function",Gt=t=>typeof t=="string",$l=t=>typeof t=="symbol",Mn=t=>t!==null&&typeof t=="object",Vf=t=>(Mn(t)||Kt(t))&&Kt(t.then)&&Kt(t.catch),DN=Object.prototype.toString,ky=t=>DN.call(t),Sq=t=>ky(t).slice(8,-1),A0=t=>ky(t)==="[object Object]",j2=t=>Gt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Qv=lA(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),K2=t=>{const e=Object.create(null);return(n=>e[n]||(e[n]=t(n)))},Eq=/-\w/g,Co=K2(t=>t.replace(Eq,e=>e.slice(1).toUpperCase())),Cq=/\B([A-Z])/g,Jc=K2(t=>t.replace(Cq,"-$1").toLowerCase()),Py=K2(t=>t.charAt(0).toUpperCase()+t.slice(1)),e0=K2(t=>t?`on${Py(t)}`:""),la=(t,e)=>!Object.is(t,e),L_=(t,...e)=>{for(let n=0;n{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},q2=t=>{const e=parseFloat(t);return isNaN(e)?t:e},Tq=t=>{const e=Gt(t)?Number(t):NaN;return isNaN(e)?t:e};let gL;const Y2=()=>gL||(gL=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ht(t){if(pt(t)){const e={};for(let n=0;n{if(n){const i=n.split(Aq);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function J(t){let e="";if(Gt(t))e=t;else if(pt(t))for(let n=0;nHf(n,e))}const FN=t=>!!(t&&t.__v_isRef===!0),Xe=t=>Gt(t)?t:t==null?"":pt(t)||Mn(t)&&(t.toString===DN||!Kt(t.toString))?FN(t)?Xe(t.value):JSON.stringify(t,zN,2):String(t),zN=(t,e)=>FN(e)?zN(t,e.value):Bm(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],r)=>(n[kS(i,r)+" =>"]=s,n),{})}:Ig(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>kS(n))}:$l(e)?kS(e):Mn(e)&&!pt(e)&&!A0(e)?String(e):e,kS=(t,e="")=>{var n;return $l(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function Oq(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}let fo;class UN{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=fo,!e&&fo&&(this.index=(fo.scopes||(fo.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e0&&--this._on===0&&(fo=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n0)return;if(n0){let e=n0;for(n0=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;t0;){let e=t0;for(t0=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function WN(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function GN(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),pA(i),Dq(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function QC(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(jN(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function jN(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===k0)||(t.globalVersion=k0,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!QC(t))))return;t.flags|=2;const e=t.dep,n=Ns,i=Nl;Ns=t,Nl=!0;try{WN(t);const s=t.fn(t._value);(e.version===0||la(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Ns=n,Nl=i,GN(t),t.flags&=-3}}function pA(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let r=n.computed.deps;r;r=r.nextDep)pA(r,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Dq(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}let Nl=!0;const KN=[];function Zu(){KN.push(Nl),Nl=!1}function Ju(){const t=KN.pop();Nl=t===void 0?!0:t}function vL(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Ns;Ns=void 0;try{e()}finally{Ns=n}}}let k0=0,Nq=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class J2{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Ns||!Nl||Ns===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ns)n=this.activeLink=new Nq(Ns,this),Ns.deps?(n.prevDep=Ns.depsTail,Ns.depsTail.nextDep=n,Ns.depsTail=n):Ns.deps=Ns.depsTail=n,qN(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Ns.depsTail,n.nextDep=void 0,Ns.depsTail.nextDep=n,Ns.depsTail=n,Ns.deps===n&&(Ns.deps=i)}return n}trigger(e){this.version++,k0++,this.notify(e)}notify(e){hA();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{fA()}}}function qN(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)qN(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const Ow=new WeakMap,Rf=Symbol(""),eT=Symbol(""),P0=Symbol("");function go(t,e,n){if(Nl&&Ns){let i=Ow.get(t);i||Ow.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new J2),s.map=i,s.key=n),s.track()}}function Lu(t,e,n,i,s,r){const o=Ow.get(t);if(!o){k0++;return}const a=l=>{l&&l.trigger()};if(hA(),e==="clear")o.forEach(a);else{const l=pt(t),c=l&&j2(n);if(l&&n==="length"){const u=Number(i);o.forEach((d,h)=>{(h==="length"||h===P0||!$l(h)&&h>=u)&&a(d)})}else switch((n!==void 0||o.has(void 0))&&a(o.get(n)),c&&a(o.get(P0)),e){case"add":l?c&&a(o.get("length")):(a(o.get(Rf)),Bm(t)&&a(o.get(eT)));break;case"delete":l||(a(o.get(Rf)),Bm(t)&&a(o.get(eT)));break;case"set":Bm(t)&&a(o.get(Rf));break}}fA()}function Bq(t,e){const n=Ow.get(t);return n&&n.get(e)}function Cp(t){const e=Hi(t);return e===t?e:(go(e,"iterate",P0),Oa(t)?e:e.map(Vl))}function Q2(t){return go(t=Hi(t),"iterate",P0),t}function Kd(t,e){return Qu(t)?Ic(t)?eg(Vl(e)):eg(e):Vl(e)}const Fq={__proto__:null,[Symbol.iterator](){return LS(this,Symbol.iterator,t=>Kd(this,t))},concat(...t){return Cp(this).concat(...t.map(e=>pt(e)?Cp(e):e))},entries(){return LS(this,"entries",t=>(t[1]=Kd(this,t[1]),t))},every(t,e){return uu(this,"every",t,e,void 0,arguments)},filter(t,e){return uu(this,"filter",t,e,n=>n.map(i=>Kd(this,i)),arguments)},find(t,e){return uu(this,"find",t,e,n=>Kd(this,n),arguments)},findIndex(t,e){return uu(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return uu(this,"findLast",t,e,n=>Kd(this,n),arguments)},findLastIndex(t,e){return uu(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return uu(this,"forEach",t,e,void 0,arguments)},includes(...t){return IS(this,"includes",t)},indexOf(...t){return IS(this,"indexOf",t)},join(t){return Cp(this).join(t)},lastIndexOf(...t){return IS(this,"lastIndexOf",t)},map(t,e){return uu(this,"map",t,e,void 0,arguments)},pop(){return uv(this,"pop")},push(...t){return uv(this,"push",t)},reduce(t,...e){return yL(this,"reduce",t,e)},reduceRight(t,...e){return yL(this,"reduceRight",t,e)},shift(){return uv(this,"shift")},some(t,e){return uu(this,"some",t,e,void 0,arguments)},splice(...t){return uv(this,"splice",t)},toReversed(){return Cp(this).toReversed()},toSorted(t){return Cp(this).toSorted(t)},toSpliced(...t){return Cp(this).toSpliced(...t)},unshift(...t){return uv(this,"unshift",t)},values(){return LS(this,"values",t=>Kd(this,t))}};function LS(t,e,n){const i=Q2(t),s=i[e]();return i!==t&&!Oa(t)&&(s._next=s.next,s.next=()=>{const r=s._next();return r.done||(r.value=n(r.value)),r}),s}const zq=Array.prototype;function uu(t,e,n,i,s,r){const o=Q2(t),a=o!==t&&!Oa(t),l=o[e];if(l!==zq[e]){const d=l.apply(t,r);return a?Vl(d):d}let c=n;o!==t&&(a?c=function(d,h){return n.call(this,Kd(t,d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(o,c,i);return a&&s?s(u):u}function yL(t,e,n,i){const s=Q2(t);let r=n;return s!==t&&(Oa(t)?n.length>3&&(r=function(o,a,l){return n.call(this,o,a,l,t)}):r=function(o,a,l){return n.call(this,o,Kd(t,a),l,t)}),s[e](r,...i)}function IS(t,e,n){const i=Hi(t);go(i,"iterate",P0);const s=i[e](...n);return(s===-1||s===!1)&&ex(n[0])?(n[0]=Hi(n[0]),i[e](...n)):s}function uv(t,e,n=[]){Zu(),hA();const i=Hi(t)[e].apply(t,n);return fA(),Ju(),i}const Uq=lA("__proto__,__v_isRef,__isVue"),YN=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter($l));function $q(t){$l(t)||(t=String(t));const e=Hi(this);return go(e,"has",t),e.hasOwnProperty(t)}class XN{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;const s=this._isReadonly,r=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return r;if(n==="__v_raw")return i===(s?r?Zq:eB:r?QN:JN).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const o=pt(e);if(!s){let l;if(o&&(l=Fq[n]))return l;if(n==="hasOwnProperty")return $q}const a=Reflect.get(e,n,Li(e)?e:i);if(($l(n)?YN.has(n):Uq(n))||(s||go(e,"get",n),r))return a;if(Li(a)){const l=o&&j2(n)?a:a.value;return s&&Mn(l)?Vc(l):l}return Mn(a)?s?Vc(a):ni(a):a}}class ZN extends XN{constructor(e=!1){super(!1,e)}set(e,n,i,s){let r=e[n];const o=pt(e)&&j2(n);if(!this._isShallow){const c=Qu(r);if(!Oa(i)&&!Qu(i)&&(r=Hi(r),i=Hi(i)),!o&&Li(r)&&!Li(i))return c||(r.value=i),!0}const a=o?Number(n)t,U1=t=>Reflect.getPrototypeOf(t);function jq(t,e,n){return function(...i){const s=this.__v_raw,r=Hi(s),o=Bm(r),a=t==="entries"||t===Symbol.iterator&&o,l=t==="keys"&&o,c=s[t](...i),u=n?tT:e?eg:Vl;return!e&&go(r,"iterate",l?eT:Rf),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function $1(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Kq(t,e){const n={get(s){const r=this.__v_raw,o=Hi(r),a=Hi(s);t||(la(s,a)&&go(o,"get",s),go(o,"get",a));const{has:l}=U1(o),c=e?tT:t?eg:Vl;if(l.call(o,s))return c(r.get(s));if(l.call(o,a))return c(r.get(a));r!==o&&r.get(s)},get size(){const s=this.__v_raw;return!t&&go(Hi(s),"iterate",Rf),s.size},has(s){const r=this.__v_raw,o=Hi(r),a=Hi(s);return t||(la(s,a)&&go(o,"has",s),go(o,"has",a)),s===a?r.has(s):r.has(s)||r.has(a)},forEach(s,r){const o=this,a=o.__v_raw,l=Hi(a),c=e?tT:t?eg:Vl;return!t&&go(l,"iterate",Rf),a.forEach((u,d)=>s.call(r,c(u),c(d),o))}};return Cr(n,t?{add:$1("add"),set:$1("set"),delete:$1("delete"),clear:$1("clear")}:{add(s){!e&&!Oa(s)&&!Qu(s)&&(s=Hi(s));const r=Hi(this);return U1(r).has.call(r,s)||(r.add(s),Lu(r,"add",s,s)),this},set(s,r){!e&&!Oa(r)&&!Qu(r)&&(r=Hi(r));const o=Hi(this),{has:a,get:l}=U1(o);let c=a.call(o,s);c||(s=Hi(s),c=a.call(o,s));const u=l.call(o,s);return o.set(s,r),c?la(r,u)&&Lu(o,"set",s,r):Lu(o,"add",s,r),this},delete(s){const r=Hi(this),{has:o,get:a}=U1(r);let l=o.call(r,s);l||(s=Hi(s),l=o.call(r,s)),a&&a.call(r,s);const c=r.delete(s);return l&&Lu(r,"delete",s,void 0),c},clear(){const s=Hi(this),r=s.size!==0,o=s.clear();return r&&Lu(s,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=jq(s,t,e)}),n}function mA(t,e){const n=Kq(t,e);return(i,s,r)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(fi(n,s)&&s in i?n:i,s,r)}const qq={get:mA(!1,!1)},Yq={get:mA(!1,!0)},Xq={get:mA(!0,!1)};const JN=new WeakMap,QN=new WeakMap,eB=new WeakMap,Zq=new WeakMap;function Jq(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Qq(t){return t.__v_skip||!Object.isExtensible(t)?0:Jq(Sq(t))}function ni(t){return Qu(t)?t:vA(t,!1,Hq,qq,JN)}function gA(t){return vA(t,!1,Gq,Yq,QN)}function Vc(t){return vA(t,!0,Wq,Xq,eB)}function vA(t,e,n,i,s){if(!Mn(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const r=Qq(t);if(r===0)return t;const o=s.get(t);if(o)return o;const a=new Proxy(t,r===2?i:n);return s.set(t,a),a}function Ic(t){return Qu(t)?Ic(t.__v_raw):!!(t&&t.__v_isReactive)}function Qu(t){return!!(t&&t.__v_isReadonly)}function Oa(t){return!!(t&&t.__v_isShallow)}function ex(t){return t?!!t.__v_raw:!1}function Hi(t){const e=t&&t.__v_raw;return e?Hi(e):t}function Da(t){return!fi(t,"__v_skip")&&Object.isExtensible(t)&&NN(t,"__v_skip",!0),t}const Vl=t=>Mn(t)?ni(t):t,eg=t=>Mn(t)?Vc(t):t;function Li(t){return t?t.__v_isRef===!0:!1}function X(t){return tB(t,!1)}function wi(t){return tB(t,!0)}function tB(t,e){return Li(t)?t:new eY(t,e)}class eY{constructor(e,n){this.dep=new J2,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Hi(e),this._value=n?e:Vl(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||Oa(e)||Qu(e);e=i?e:Hi(e),la(e,n)&&(this._rawValue=e,this._value=i?e:Vl(e),this.dep.trigger())}}function I_(t){t.dep&&t.dep.trigger()}function v(t){return Li(t)?t.value:t}function Rc(t){return Kt(t)?t():v(t)}const tY={get:(t,e,n)=>e==="__v_raw"?t:v(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return Li(s)&&!Li(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function nB(t){return Ic(t)?t:new Proxy(t,tY)}class nY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new J2,{get:i,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function iB(t){return new nY(t)}function hr(t){const e=pt(t)?new Array(t.length):{};for(const n in t)e[n]=sB(t,n);return e}class iY{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=Hi(e);let s=!0,r=e;if(!pt(e)||!j2(String(n)))do s=!ex(r)||Oa(r);while(s&&(r=r.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=v(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&Li(this._raw[this._key])){const n=this._object[this._key];if(Li(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Bq(this._raw,this._key)}}class sY{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ei(t,e,n){return Li(t)?t:Kt(t)?new sY(t):Mn(t)&&arguments.length>1?sB(t,e,n):X(t)}function sB(t,e,n){return new iY(t,e,n)}class rY{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new J2(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=k0-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Ns!==this)return HN(this,!0),!0}get value(){const e=this.dep.track();return jN(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function oY(t,e,n=!1){let i,s;return Kt(t)?i=t:(i=t.get,s=t.set),new rY(i,s,n)}const V1={},Dw=new WeakMap;let of;function aY(t,e=!1,n=of){if(n){let i=Dw.get(n);i||Dw.set(n,i=[]),i.push(t)}}function lY(t,e,n=ls){const{immediate:i,deep:s,once:r,scheduler:o,augmentJob:a,call:l}=n,c=_=>s?_:Oa(_)||s===!1||s===0?Iu(_,1):Iu(_);let u,d,h,f,p=!1,m=!1;if(Li(t)?(d=()=>t.value,p=Oa(t)):Ic(t)?(d=()=>c(t),p=!0):pt(t)?(m=!0,p=t.some(_=>Ic(_)||Oa(_)),d=()=>t.map(_=>{if(Li(_))return _.value;if(Ic(_))return c(_);if(Kt(_))return l?l(_,2):_()})):Kt(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){Zu();try{h()}finally{Ju()}}const _=of;of=u;try{return l?l(t,3,[f]):t(f)}finally{of=_}}:d=_i,e&&s){const _=d,E=s===!0?1/0:s;d=()=>Iu(_(),E)}const b=Ly(),g=()=>{u.stop(),b&&b.active&&uA(b.effects,u)};if(r&&e){const _=e;e=(...E)=>{_(...E),g()}}let x=m?new Array(t.length).fill(V1):V1;const S=_=>{if(!(!(u.flags&1)||!u.dirty&&!_))if(e){const E=u.run();if(s||p||(m?E.some((T,A)=>la(T,x[A])):la(E,x))){h&&h();const T=of;of=u;try{const A=[E,x===V1?void 0:m&&x[0]===V1?[]:x,f];x=E,l?l(e,3,A):e(...A)}finally{of=T}}}else u.run()};return a&&a(S),u=new $N(d),u.scheduler=o?()=>o(S,!1):S,f=_=>aY(_,!1,u),h=u.onStop=()=>{const _=Dw.get(u);if(_){if(l)l(_,4);else for(const E of _)E();Dw.delete(u)}},e?i?S(!0):x=u.run():o?o(S.bind(null,!0),!0):u.run(),g.pause=u.pause.bind(u),g.resume=u.resume.bind(u),g.stop=g,g}function Iu(t,e=1/0,n){if(e<=0||!Mn(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,Li(t))Iu(t.value,e,n);else if(pt(t))for(let i=0;i{Iu(i,e,n)});else if(A0(t)){for(const i in t)Iu(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&Iu(t[i],e,n)}return t}function Iy(t,e,n,i){try{return i?t(...i):t()}catch(s){tx(s,e,n)}}function Hl(t,e,n,i){if(Kt(t)){const s=Iy(t,e,n,i);return s&&Vf(s)&&s.catch(r=>{tx(r,e,n)}),s}if(pt(t)){const s=[];for(let r=0;r>>1,s=Ho[i],r=L0(s);r=L0(n)?Ho.push(t):Ho.splice(uY(e),0,t),t.flags|=1,oB()}}function oB(){Nw||(Nw=rB.then(cB))}function aB(t){pt(t)?Fm.push(...t):qd&&t.id===-1?qd.splice(wm+1,0,t):t.flags&1||(Fm.push(t),t.flags|=1),oB()}function bL(t,e,n=Sc+1){for(;nL0(n)-L0(i));if(Fm.length=0,qd){qd.push(...e);return}for(qd=e,wm=0;wmt.id==null?t.flags&2?-1:1/0:t.id;function cB(t){try{for(Sc=0;Sc{i._d&&Vw(-1);const r=Bw(e);let o;try{o=t(...s)}finally{Bw(r),i._d&&Vw(1)}return o};return i._n=!0,i._c=!0,i._d=!0,i}function _n(t,e){if(Zr===null)return t;const n=ux(Zr),i=t.dirs||(t.dirs=[]);for(let s=0;s1)return n&&Kt(e)?e.call(i&&i.proxy):e}}function bA(){return!!(xn()||Of)}const dY=Symbol.for("v-scx"),hY=()=>zt(dY);function jo(t,e){return ix(t,null,e)}function fY(t,e){return ix(t,null,{flush:"sync"})}function We(t,e,n){return ix(t,e,n)}function ix(t,e,n=ls){const{immediate:i,deep:s,flush:r,once:o}=n,a=Cr({},n),l=e&&i||!e&&r!=="post";let c;if(O0){if(r==="sync"){const f=hY();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=_i,f.resume=_i,f.pause=_i,f}}const u=vo;a.call=(f,p,m)=>Hl(f,u,p,m);let d=!1;r==="post"?a.scheduler=f=>{zo(f,u&&u.suspense)}:r!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():yA(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=lY(t,e,a);return O0&&(c?c.push(h):l&&h()),h}function pY(t,e,n){const i=this.proxy,s=Gt(t)?t.includes(".")?hB(i,t):()=>i[t]:t.bind(i,i);let r;Kt(e)?r=e:(r=e.handler,n=e);const o=Ry(this),a=ix(s,r.bind(i),n);return o(),a}function hB(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;st.__isTeleport,i0=t=>t&&(t.disabled||t.disabled===""),_L=t=>t&&(t.defer||t.defer===""),wL=t=>typeof SVGElement<"u"&&t instanceof SVGElement,xL=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,nT=(t,e)=>{const n=t&&t.to;return Gt(n)?e?e(n):null:n},mB={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,r,o,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:b}}=c,g=i0(e.props);let{shapeFlag:x,children:S,dynamicChildren:_}=e;if(t==null){const E=e.el=m(""),T=e.anchor=m("");f(E,n,i),f(T,n,i);const A=(P,k)=>{x&16&&u(S,P,k,s,r,o,a,l)},I=()=>{const P=e.target=nT(e.props,p),k=gB(P,e,m,f);P&&(o!=="svg"&&wL(P)?o="svg":o!=="mathml"&&xL(P)&&(o="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(P),g||(A(P,k),R_(e,!1)))};g&&(A(n,T),R_(e,!0)),_L(e.props)?(e.el.__isMounted=!1,zo(()=>{I(),delete e.el.__isMounted},r)):I()}else{if(_L(e.props)&&t.el.__isMounted===!1){zo(()=>{mB.process(t,e,n,i,s,r,o,a,l,c)},r);return}e.el=t.el,e.targetStart=t.targetStart;const E=e.anchor=t.anchor,T=e.target=t.target,A=e.targetAnchor=t.targetAnchor,I=i0(t.props),P=I?n:T,k=I?E:A;if(o==="svg"||wL(T)?o="svg":(o==="mathml"||xL(T))&&(o="mathml"),_?(h(t.dynamicChildren,_,P,s,r,o,a),TA(t,e,!0)):l||d(t,e,P,k,s,r,o,a,!1),g)I?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):H1(e,n,E,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const B=e.target=nT(e.props,p);B&&H1(e,B,null,c,0)}else I&&H1(e,T,A,c,1);R_(e,g)}},remove(t,e,n,{um:i,o:{remove:s}},r){const{shapeFlag:o,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(s(c),s(u)),r&&s(l),o&16){const f=r||!i0(h);for(let p=0;p{t.isMounted=!0}),gi(()=>{t.isUnmounting=!0}),t}const Ha=[Function,Array],yB={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Ha,onEnter:Ha,onAfterEnter:Ha,onEnterCancelled:Ha,onBeforeLeave:Ha,onLeave:Ha,onAfterLeave:Ha,onLeaveCancelled:Ha,onBeforeAppear:Ha,onAppear:Ha,onAfterAppear:Ha,onAppearCancelled:Ha},bB=t=>{const e=t.subTree;return e.component?bB(e.component):e},gY={name:"BaseTransition",props:yB,setup(t,{slots:e}){const n=xn(),i=vB();return()=>{const s=e.default&&_A(e.default(),!0);if(!s||!s.length)return;const r=_B(s),o=Hi(t),{mode:a}=o;if(i.isLeaving)return RS(r);const l=SL(r);if(!l)return RS(r);let c=I0(l,o,i,n,d=>c=d);l.type!==Hs&&Wf(l,c);let u=n.subTree&&SL(n.subTree);if(u&&u.type!==Hs&&!df(u,l)&&bB(n).type!==Hs){let d=I0(u,o,i,n);if(Wf(u,d),a==="out-in"&&l.type!==Hs)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},RS(r);a==="in-out"&&l.type!==Hs?d.delayLeave=(h,f,p)=>{const m=wB(i,u);m[String(u.key)]=u,h[ku]=()=>{f(),h[ku]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return r}}};function _B(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Hs){e=n;break}}return e}const vY=gY;function wB(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function I0(t,e,n,i,s){const{appear:r,mode:o,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:b,onAppear:g,onAfterAppear:x,onAppearCancelled:S}=e,_=String(t.key),E=wB(n,t),T=(P,k)=>{P&&Hl(P,i,9,k)},A=(P,k)=>{const B=k[1];T(P,k),pt(P)?P.every(R=>R.length<=1)&&B():P.length<=1&&B()},I={mode:o,persisted:a,beforeEnter(P){let k=l;if(!n.isMounted)if(r)k=b||l;else return;P[ku]&&P[ku](!0);const B=E[_];B&&df(t,B)&&B.el[ku]&&B.el[ku](),T(k,[P])},enter(P){let k=c,B=u,R=d;if(!n.isMounted)if(r)k=g||c,B=x||u,R=S||d;else return;let H=!1;const q=P[W1]=oe=>{H||(H=!0,oe?T(R,[P]):T(B,[P]),I.delayedLeave&&I.delayedLeave(),P[W1]=void 0)};k?A(k,[P,q]):q()},leave(P,k){const B=String(t.key);if(P[W1]&&P[W1](!0),n.isUnmounting)return k();T(h,[P]);let R=!1;const H=P[ku]=q=>{R||(R=!0,k(),q?T(m,[P]):T(p,[P]),P[ku]=void 0,E[B]===t&&delete E[B])};E[B]=t,f?A(f,[P,H]):H()},clone(P){const k=I0(P,e,n,i,s);return s&&s(k),k}};return I}function RS(t){if(sx(t))return t=ed(t),t.children=null,t}function SL(t){if(!sx(t))return pB(t.type)&&t.children?_B(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&Kt(n.default))return n.default()}}function Wf(t,e){t.shapeFlag&6&&t.component?(t.transition=e,Wf(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 _A(t,e=!1,n){let i=[],s=0;for(let r=0;r1)for(let r=0;rs0(p,e&&(pt(e)?e[m]:e),n,i,s));return}if(zm(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&s0(t,e,n,i.component.subTree);return}const r=i.shapeFlag&4?ux(i.component):i.el,o=s?null:r,{i:a,r:l}=t,c=e&&e.r,u=a.refs===ls?a.refs={}:a.refs,d=a.setupState,h=Hi(d),f=d===ls?ON:p=>fi(h,p);if(c!=null&&c!==l){if(EL(e),Gt(c))u[c]=null,f(c)&&(d[c]=null);else if(Li(c)){c.value=null;const p=e;p.k&&(u[p.k]=null)}}if(Kt(l))Iy(l,a,12,[o,u]);else{const p=Gt(l),m=Li(l);if(p||m){const b=()=>{if(t.f){const g=p?f(l)?d[l]:u[l]:l.value;if(s)pt(g)&&uA(g,r);else if(pt(g))g.includes(r)||g.push(r);else if(p)u[l]=[r],f(l)&&(d[l]=u[l]);else{const x=[r];l.value=x,t.k&&(u[t.k]=x)}}else p?(u[l]=o,f(l)&&(d[l]=o)):m&&(l.value=o,t.k&&(u[t.k]=o))};if(o){const g=()=>{b(),Fw.delete(t)};g.id=-1,Fw.set(t,g),zo(g,n)}else EL(t),b()}}}function EL(t){const e=Fw.get(t);e&&(e.flags|=8,Fw.delete(t))}Y2().requestIdleCallback;Y2().cancelIdleCallback;const zm=t=>!!t.type.__asyncLoader,sx=t=>t.type.__isKeepAlive;function rx(t,e){EB(t,"a",e)}function SB(t,e){EB(t,"da",e)}function EB(t,e,n=vo){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(ox(e,i,n),n){let s=n.parent;for(;s&&s.parent;)sx(s.parent.vnode)&&yY(i,e,n,s),s=s.parent}}function yY(t,e,n,i){const s=ox(e,t,i,!0);eo(()=>{uA(i[e],s)},n)}function ox(t,e,n=vo,i=!1){if(n){const s=n[t]||(n[t]=[]),r=e.__weh||(e.__weh=(...o)=>{Zu();const a=Ry(n),l=Hl(e,n,t,o);return a(),Ju(),l});return i?s.unshift(r):s.push(r),r}}const ad=t=>(e,n=vo)=>{(!O0||t==="sp")&&ox(t,(...i)=>e(...i),n)},ax=ad("bm"),mn=ad("m"),lx=ad("bu"),ec=ad("u"),gi=ad("bum"),eo=ad("um"),bY=ad("sp"),_Y=ad("rtg"),wY=ad("rtc");function xY(t,e=vo){ox("ec",t,e)}const wA="components",SY="directives";function Zt(t,e){return SA(wA,t,!0,e)||t}const CB=Symbol.for("v-ndc");function Sn(t){return Gt(t)?SA(wA,t,!1)||t:t||CB}function xA(t){return SA(SY,t)}function SA(t,e,n=!0,i=!1){const s=Zr||vo;if(s){const r=s.type;if(t===wA){const a=sX(r,!1);if(a&&(a===e||a===Co(e)||a===Py(Co(e))))return r}const o=CL(s[t]||r[t],e)||CL(s.appContext[t],e);return!o&&i?r:o}}function CL(t,e){return t&&(t[e]||t[Co(e)]||t[Py(Co(e))])}function yn(t,e,n,i){let s;const r=n,o=pt(t);if(o||Gt(t)){const a=o&&Ic(t);let l=!1,c=!1;a&&(l=!Oa(t),c=Qu(t),t=Q2(t)),s=new Array(t.length);for(let u=0,d=t.length;ue(a,l,void 0,r));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l{const r=i.fn(...s);return r&&(r.key=i.key),r}:i.fn)}return t}function Ue(t,e,n={},i,s){if(Zr.ce||Zr.parent&&zm(Zr.parent)&&Zr.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),z(),De(At,null,[de("slot",n,i&&i())],c?-2:64)}let r=t[e];r&&r._c&&(r._d=!1),z();const o=r&&TB(r(n)),a=n.key||o&&o.key,l=De(At,{key:(a&&!$l(a)?a:`_${e}`)+(!o&&i?"_fb":"")},o||(i?i():[]),o&&t._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),r&&r._c&&(r._d=!0),l}function TB(t){return t.some(e=>Yi(e)?!(e.type===Hs||e.type===At&&!TB(e.children)):!0)?t:null}function EY(t,e){const n={};for(const i in t)n[e0(i)]=t[i];return n}const iT=t=>t?jB(t)?ux(t):iT(t.parent):null,r0=Cr(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=>iT(t.parent),$root:t=>iT(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>kB(t),$forceUpdate:t=>t.f||(t.f=()=>{yA(t.update)}),$nextTick:t=>t.n||(t.n=Nt.bind(t.proxy)),$watch:t=>pY.bind(t)}),OS=(t,e)=>t!==ls&&!t.__isScriptSetup&&fi(t,e),CY={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:r,accessCache:o,type:a,appContext:l}=t;if(e[0]!=="$"){const h=o[e];if(h!==void 0)switch(h){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return r[e]}else{if(OS(i,e))return o[e]=1,i[e];if(s!==ls&&fi(s,e))return o[e]=2,s[e];if(fi(r,e))return o[e]=3,r[e];if(n!==ls&&fi(n,e))return o[e]=4,n[e];sT&&(o[e]=0)}}const c=r0[e];let u,d;if(c)return e==="$attrs"&&go(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==ls&&fi(n,e))return o[e]=4,n[e];if(d=l.config.globalProperties,fi(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:r}=t;return OS(s,e)?(s[e]=n,!0):i!==ls&&fi(i,e)?(i[e]=n,!0):fi(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(r[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,props:r,type:o}},a){let l;return!!(n[a]||t!==ls&&a[0]!=="$"&&fi(t,a)||OS(e,a)||fi(r,a)||fi(i,a)||fi(r0,a)||fi(s.config.globalProperties,a)||(l=o.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:fi(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}};function tr(){return MB().slots}function ld(){return MB().attrs}function MB(t){const e=xn();return e.setupContext||(e.setupContext=qB(e))}function zw(t){return pt(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function tg(t,e){return!t||!e?t||e:pt(t)&&pt(e)?t.concat(e):Cr({},zw(t),zw(e))}let sT=!0;function TY(t){const e=kB(t),n=t.proxy,i=t.ctx;sT=!1,e.beforeCreate&&TL(e.beforeCreate,t,"bc");const{data:s,computed:r,methods:o,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:b,beforeDestroy:g,beforeUnmount:x,destroyed:S,unmounted:_,render:E,renderTracked:T,renderTriggered:A,errorCaptured:I,serverPrefetch:P,expose:k,inheritAttrs:B,components:R,directives:H,filters:q}=e;if(c&&MY(c,i,null),o)for(const V in o){const D=o[V];Kt(D)&&(i[V]=D.bind(n))}if(s){const V=s.call(n,n);Mn(V)&&(t.data=ni(V))}if(sT=!0,r)for(const V in r){const D=r[V],K=Kt(D)?D.bind(n,n):Kt(D.get)?D.get.bind(n,n):_i,W=!Kt(D)&&Kt(D.set)?D.set.bind(n):_i,Q=F({get:K,set:W});Object.defineProperty(i,V,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ie=>Q.value=ie})}if(a)for(const V in a)AB(a[V],i,n,V);if(l){const V=Kt(l)?l.call(n):l;Reflect.ownKeys(V).forEach(D=>{Xn(D,V[D])})}u&&TL(u,t,"c");function Z(V,D){pt(D)?D.forEach(K=>V(K.bind(n))):D&&V(D.bind(n))}if(Z(ax,d),Z(mn,h),Z(lx,f),Z(ec,p),Z(rx,m),Z(SB,b),Z(xY,I),Z(wY,T),Z(_Y,A),Z(gi,x),Z(eo,_),Z(bY,P),pt(k))if(k.length){const V=t.exposed||(t.exposed={});k.forEach(D=>{Object.defineProperty(V,D,{get:()=>n[D],set:K=>n[D]=K,enumerable:!0})})}else t.exposed||(t.exposed={});E&&t.render===_i&&(t.render=E),B!=null&&(t.inheritAttrs=B),R&&(t.components=R),H&&(t.directives=H),P&&xB(t)}function MY(t,e,n=_i){pt(t)&&(t=rT(t));for(const i in t){const s=t[i];let r;Mn(s)?"default"in s?r=zt(s.from||i,s.default,!0):r=zt(s.from||i):r=zt(s),Li(r)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>r.value,set:o=>r.value=o}):e[i]=r}}function TL(t,e,n){Hl(pt(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function AB(t,e,n,i){let s=i.includes(".")?hB(n,i):()=>n[i];if(Gt(t)){const r=e[t];Kt(r)&&We(s,r)}else if(Kt(t))We(s,t.bind(n));else if(Mn(t))if(pt(t))t.forEach(r=>AB(r,e,n,i));else{const r=Kt(t.handler)?t.handler.bind(n):e[t.handler];Kt(r)&&We(s,r,t)}}function kB(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:r,config:{optionMergeStrategies:o}}=t.appContext,a=r.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>Uw(l,c,o,!0)),Uw(l,e,o)),Mn(e)&&r.set(e,l),l}function Uw(t,e,n,i=!1){const{mixins:s,extends:r}=e;r&&Uw(t,r,n,!0),s&&s.forEach(o=>Uw(t,o,n,!0));for(const o in e)if(!(i&&o==="expose")){const a=AY[o]||n&&n[o];t[o]=a?a(t[o],e[o]):e[o]}return t}const AY={data:ML,props:AL,emits:AL,methods:Fv,computed:Fv,beforeCreate:Oo,created:Oo,beforeMount:Oo,mounted:Oo,beforeUpdate:Oo,updated:Oo,beforeDestroy:Oo,beforeUnmount:Oo,destroyed:Oo,unmounted:Oo,activated:Oo,deactivated:Oo,errorCaptured:Oo,serverPrefetch:Oo,components:Fv,directives:Fv,watch:PY,provide:ML,inject:kY};function ML(t,e){return e?t?function(){return Cr(Kt(t)?t.call(this,this):t,Kt(e)?e.call(this,this):e)}:e:t}function kY(t,e){return Fv(rT(t),rT(e))}function rT(t){if(pt(t)){const e={};for(let n=0;n{let u,d=ls,h;return fY(()=>{const f=t[s];la(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const p=n.set?n.set(f):f;if(!la(p,u)&&!(d!==ls&&la(f,d)))return;const m=i.vnode.props;m&&(e in m||s in m||r in m)&&(`onUpdate:${e}`in m||`onUpdate:${s}`in m||`onUpdate:${r}`in m)||(u=f,c()),i.emit(`update:${e}`,p),la(f,p)&&la(f,d)&&!la(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?o||ls:a,done:!1}:{done:!0}}}},a}const LB=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Co(e)}Modifiers`]||t[`${Jc(e)}Modifiers`];function RY(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||ls;let s=n;const r=e.startsWith("update:"),o=r&&LB(i,e.slice(7));o&&(o.trim&&(s=n.map(u=>Gt(u)?u.trim():u)),o.number&&(s=n.map(q2)));let a,l=i[a=e0(e)]||i[a=e0(Co(e))];!l&&r&&(l=i[a=e0(Jc(e))]),l&&Hl(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Hl(c,t,6,s)}}const OY=new WeakMap;function IB(t,e,n=!1){const i=n?OY:e.emitsCache,s=i.get(t);if(s!==void 0)return s;const r=t.emits;let o={},a=!1;if(!Kt(t)){const l=c=>{const u=IB(c,e,!0);u&&(a=!0,Cr(o,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!r&&!a?(Mn(t)&&i.set(t,null),null):(pt(r)?r.forEach(l=>o[l]=null):Cr(o,r),Mn(t)&&i.set(t,o),o)}function cx(t,e){return!t||!G2(e)?!1:(e=e.slice(2).replace(/Once$/,""),fi(t,e[0].toLowerCase()+e.slice(1))||fi(t,Jc(e))||fi(t,e))}function kL(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[r],slots:o,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,b=Bw(t);let g,x;try{if(n.shapeFlag&4){const _=s||i,E=_;g=Cc(c.call(E,_,u,d,f,h,p)),x=a}else{const _=e;g=Cc(_.length>1?_(d,{attrs:a,slots:o,emit:l}):_(d,null)),x=e.props?a:DY(a)}}catch(_){o0.length=0,tx(_,t,1),g=de(Hs)}let S=g;if(x&&m!==!1){const _=Object.keys(x),{shapeFlag:E}=S;_.length&&E&7&&(r&&_.some(cA)&&(x=NY(x,r)),S=ed(S,x,!1,!0))}return n.dirs&&(S=ed(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&Wf(S,n.transition),g=S,Bw(b),g}const DY=t=>{let e;for(const n in t)(n==="class"||n==="style"||G2(n))&&((e||(e={}))[n]=t[n]);return e},NY=(t,e)=>{const n={};for(const i in t)(!cA(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function BY(t,e,n){const{props:i,children:s,component:r}=t,{props:o,children:a,patchFlag:l}=e,c=r.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?PL(i,o,c):!!o;if(l&8){const u=e.dynamicProps;for(let d=0;dObject.create(RB),DB=t=>Object.getPrototypeOf(t)===RB;function zY(t,e,n,i=!1){const s={},r=OB();t.propsDefaults=Object.create(null),NB(t,e,s,r);for(const o in t.propsOptions[0])o in s||(s[o]=void 0);n?t.props=i?s:gA(s):t.type.props?t.props=s:t.props=r,t.attrs=r}function UY(t,e,n,i){const{props:s,attrs:r,vnode:{patchFlag:o}}=t,a=Hi(s),[l]=t.propsOptions;let c=!1;if((i||o>0)&&!(o&16)){if(o&8){const u=t.vnode.dynamicProps;for(let d=0;d{l=!0;const[h,f]=BB(d,e,!0);Cr(o,h),f&&a.push(...f)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!r&&!l)return Mn(t)&&i.set(t,Nm),Nm;if(pt(r))for(let u=0;ut==="_"||t==="_ctx"||t==="$stable",CA=t=>pt(t)?t.map(Cc):[Cc(t)],VY=(t,e,n)=>{if(e._n)return e;const i=xe((...s)=>CA(e(...s)),n);return i._c=!1,i},FB=(t,e,n)=>{const i=t._ctx;for(const s in t){if(EA(s))continue;const r=t[s];if(Kt(r))e[s]=VY(s,r,i);else if(r!=null){const o=CA(r);e[s]=()=>o}}},zB=(t,e)=>{const n=CA(e);t.slots.default=()=>n},UB=(t,e,n)=>{for(const i in e)(n||!EA(i))&&(t[i]=e[i])},HY=(t,e,n)=>{const i=t.slots=OB();if(t.vnode.shapeFlag&32){const s=e._;s?(UB(i,e,n),n&&NN(i,"_",s,!0)):FB(e,i)}else e&&zB(t,e)},WY=(t,e,n)=>{const{vnode:i,slots:s}=t;let r=!0,o=ls;if(i.shapeFlag&32){const a=e._;a?n&&a===1?r=!1:UB(s,e,n):(r=!e.$stable,FB(e,s)),o=e}else e&&(zB(t,e),o={default:1});if(r)for(const a in s)!EA(a)&&o[a]==null&&delete s[a]},zo=YY;function GY(t){return jY(t)}function jY(t,e){const n=Y2();n.__VUE__=!0;const{insert:i,remove:s,patchProp:r,createElement:o,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=_i,insertStaticContent:p}=t,m=(fe,Me,ge,Qe=null,G=null,ee=null,j=void 0,he=null,be=!!Me.dynamicChildren)=>{if(fe===Me)return;fe&&!df(fe,Me)&&(Qe=ke(fe),ie(fe,G,ee,!0),fe=null),Me.patchFlag===-2&&(be=!1,Me.dynamicChildren=null);const{type:re,ref:le,shapeFlag:Ce}=Me;switch(re){case ap:b(fe,Me,ge,Qe);break;case Hs:g(fe,Me,ge,Qe);break;case O_:fe==null&&x(Me,ge,Qe,j);break;case At:R(fe,Me,ge,Qe,G,ee,j,he,be);break;default:Ce&1?E(fe,Me,ge,Qe,G,ee,j,he,be):Ce&6?H(fe,Me,ge,Qe,G,ee,j,he,be):(Ce&64||Ce&128)&&re.process(fe,Me,ge,Qe,G,ee,j,he,be,Fe)}le!=null&&G?s0(le,fe&&fe.ref,ee,Me||fe,!Me):le==null&&fe&&fe.ref!=null&&s0(fe.ref,null,ee,fe,!0)},b=(fe,Me,ge,Qe)=>{if(fe==null)i(Me.el=a(Me.children),ge,Qe);else{const G=Me.el=fe.el;Me.children!==fe.children&&c(G,Me.children)}},g=(fe,Me,ge,Qe)=>{fe==null?i(Me.el=l(Me.children||""),ge,Qe):Me.el=fe.el},x=(fe,Me,ge,Qe)=>{[fe.el,fe.anchor]=p(fe.children,Me,ge,Qe,fe.el,fe.anchor)},S=({el:fe,anchor:Me},ge,Qe)=>{let G;for(;fe&&fe!==Me;)G=h(fe),i(fe,ge,Qe),fe=G;i(Me,ge,Qe)},_=({el:fe,anchor:Me})=>{let ge;for(;fe&&fe!==Me;)ge=h(fe),s(fe),fe=ge;s(Me)},E=(fe,Me,ge,Qe,G,ee,j,he,be)=>{if(Me.type==="svg"?j="svg":Me.type==="math"&&(j="mathml"),fe==null)T(Me,ge,Qe,G,ee,j,he,be);else{const re=fe.el&&fe.el._isVueCE?fe.el:null;try{re&&re._beginPatch(),P(fe,Me,G,ee,j,he,be)}finally{re&&re._endPatch()}}},T=(fe,Me,ge,Qe,G,ee,j,he)=>{let be,re;const{props:le,shapeFlag:Ce,transition:Ee,dirs:Oe}=fe;if(be=fe.el=o(fe.type,ee,le&&le.is,le),Ce&8?u(be,fe.children):Ce&16&&I(fe.children,be,null,Qe,G,DS(fe,ee),j,he),Oe&&Wh(fe,null,Qe,"created"),A(be,fe,fe.scopeId,j,Qe),le){for(const $e in le)$e!=="value"&&!Qv($e)&&r(be,$e,null,le[$e],ee,Qe);"value"in le&&r(be,"value",null,le.value,ee),(re=le.onVnodeBeforeMount)&&hc(re,Qe,fe)}Oe&&Wh(fe,null,Qe,"beforeMount");const Ge=KY(G,Ee);Ge&&Ee.beforeEnter(be),i(be,Me,ge),((re=le&&le.onVnodeMounted)||Ge||Oe)&&zo(()=>{re&&hc(re,Qe,fe),Ge&&Ee.enter(be),Oe&&Wh(fe,null,Qe,"mounted")},G)},A=(fe,Me,ge,Qe,G)=>{if(ge&&f(fe,ge),Qe)for(let ee=0;ee{for(let re=be;re{const he=Me.el=fe.el;let{patchFlag:be,dynamicChildren:re,dirs:le}=Me;be|=fe.patchFlag&16;const Ce=fe.props||ls,Ee=Me.props||ls;let Oe;if(ge&&Gh(ge,!1),(Oe=Ee.onVnodeBeforeUpdate)&&hc(Oe,ge,Me,fe),le&&Wh(Me,fe,ge,"beforeUpdate"),ge&&Gh(ge,!0),(Ce.innerHTML&&Ee.innerHTML==null||Ce.textContent&&Ee.textContent==null)&&u(he,""),re?k(fe.dynamicChildren,re,he,ge,Qe,DS(Me,G),ee):j||D(fe,Me,he,null,ge,Qe,DS(Me,G),ee,!1),be>0){if(be&16)B(he,Ce,Ee,ge,G);else if(be&2&&Ce.class!==Ee.class&&r(he,"class",null,Ee.class,G),be&4&&r(he,"style",Ce.style,Ee.style,G),be&8){const Ge=Me.dynamicProps;for(let $e=0;$e{Oe&&hc(Oe,ge,Me,fe),le&&Wh(Me,fe,ge,"updated")},Qe)},k=(fe,Me,ge,Qe,G,ee,j)=>{for(let he=0;he{if(Me!==ge){if(Me!==ls)for(const ee in Me)!Qv(ee)&&!(ee in ge)&&r(fe,ee,Me[ee],null,G,Qe);for(const ee in ge){if(Qv(ee))continue;const j=ge[ee],he=Me[ee];j!==he&&ee!=="value"&&r(fe,ee,he,j,G,Qe)}"value"in ge&&r(fe,"value",Me.value,ge.value,G)}},R=(fe,Me,ge,Qe,G,ee,j,he,be)=>{const re=Me.el=fe?fe.el:a(""),le=Me.anchor=fe?fe.anchor:a("");let{patchFlag:Ce,dynamicChildren:Ee,slotScopeIds:Oe}=Me;Oe&&(he=he?he.concat(Oe):Oe),fe==null?(i(re,ge,Qe),i(le,ge,Qe),I(Me.children||[],ge,le,G,ee,j,he,be)):Ce>0&&Ce&64&&Ee&&fe.dynamicChildren&&fe.dynamicChildren.length===Ee.length?(k(fe.dynamicChildren,Ee,ge,G,ee,j,he),(Me.key!=null||G&&Me===G.subTree)&&TA(fe,Me,!0)):D(fe,Me,ge,le,G,ee,j,he,be)},H=(fe,Me,ge,Qe,G,ee,j,he,be)=>{Me.slotScopeIds=he,fe==null?Me.shapeFlag&512?G.ctx.activate(Me,ge,Qe,j,be):q(Me,ge,Qe,G,ee,j,be):oe(fe,Me,be)},q=(fe,Me,ge,Qe,G,ee,j)=>{const he=fe.component=eX(fe,Qe,G);if(sx(fe)&&(he.ctx.renderer=Fe),tX(he,!1,j),he.asyncDep){if(G&&G.registerDep(he,Z,j),!fe.el){const be=he.subTree=de(Hs);g(null,be,Me,ge),fe.placeholder=be.el}}else Z(he,fe,Me,ge,G,ee,j)},oe=(fe,Me,ge)=>{const Qe=Me.component=fe.component;if(BY(fe,Me,ge))if(Qe.asyncDep&&!Qe.asyncResolved){V(Qe,Me,ge);return}else Qe.next=Me,Qe.update();else Me.el=fe.el,Qe.vnode=Me},Z=(fe,Me,ge,Qe,G,ee,j)=>{const he=()=>{if(fe.isMounted){let{next:Ce,bu:Ee,u:Oe,parent:Ge,vnode:$e}=fe;{const Mt=$B(fe);if(Mt){Ce&&(Ce.el=$e.el,V(fe,Ce,j)),Mt.asyncDep.then(()=>{fe.isUnmounted||he()});return}}let ot=Ce,dt;Gh(fe,!1),Ce?(Ce.el=$e.el,V(fe,Ce,j)):Ce=$e,Ee&&L_(Ee),(dt=Ce.props&&Ce.props.onVnodeBeforeUpdate)&&hc(dt,Ge,Ce,$e),Gh(fe,!0);const Jt=kL(fe),at=fe.subTree;fe.subTree=Jt,m(at,Jt,d(at.el),ke(at),fe,G,ee),Ce.el=Jt.el,ot===null&&FY(fe,Jt.el),Oe&&zo(Oe,G),(dt=Ce.props&&Ce.props.onVnodeUpdated)&&zo(()=>hc(dt,Ge,Ce,$e),G)}else{let Ce;const{el:Ee,props:Oe}=Me,{bm:Ge,m:$e,parent:ot,root:dt,type:Jt}=fe,at=zm(Me);Gh(fe,!1),Ge&&L_(Ge),!at&&(Ce=Oe&&Oe.onVnodeBeforeMount)&&hc(Ce,ot,Me),Gh(fe,!0);{dt.ce&&dt.ce._def.shadowRoot!==!1&&dt.ce._injectChildStyle(Jt);const Mt=fe.subTree=kL(fe);m(null,Mt,ge,Qe,fe,G,ee),Me.el=Mt.el}if($e&&zo($e,G),!at&&(Ce=Oe&&Oe.onVnodeMounted)){const Mt=Me;zo(()=>hc(Ce,ot,Mt),G)}(Me.shapeFlag&256||ot&&zm(ot.vnode)&&ot.vnode.shapeFlag&256)&&fe.a&&zo(fe.a,G),fe.isMounted=!0,Me=ge=Qe=null}};fe.scope.on();const be=fe.effect=new $N(he);fe.scope.off();const re=fe.update=be.run.bind(be),le=fe.job=be.runIfDirty.bind(be);le.i=fe,le.id=fe.uid,be.scheduler=()=>yA(le),Gh(fe,!0),re()},V=(fe,Me,ge)=>{Me.component=fe;const Qe=fe.vnode.props;fe.vnode=Me,fe.next=null,UY(fe,Me.props,Qe,ge),WY(fe,Me.children,ge),Zu(),bL(fe),Ju()},D=(fe,Me,ge,Qe,G,ee,j,he,be=!1)=>{const re=fe&&fe.children,le=fe?fe.shapeFlag:0,Ce=Me.children,{patchFlag:Ee,shapeFlag:Oe}=Me;if(Ee>0){if(Ee&128){W(re,Ce,ge,Qe,G,ee,j,he,be);return}else if(Ee&256){K(re,Ce,ge,Qe,G,ee,j,he,be);return}}Oe&8?(le&16&&_e(re,G,ee),Ce!==re&&u(ge,Ce)):le&16?Oe&16?W(re,Ce,ge,Qe,G,ee,j,he,be):_e(re,G,ee,!0):(le&8&&u(ge,""),Oe&16&&I(Ce,ge,Qe,G,ee,j,he,be))},K=(fe,Me,ge,Qe,G,ee,j,he,be)=>{fe=fe||Nm,Me=Me||Nm;const re=fe.length,le=Me.length,Ce=Math.min(re,le);let Ee;for(Ee=0;Eele?_e(fe,G,ee,!0,!1,Ce):I(Me,ge,Qe,G,ee,j,he,be,Ce)},W=(fe,Me,ge,Qe,G,ee,j,he,be)=>{let re=0;const le=Me.length;let Ce=fe.length-1,Ee=le-1;for(;re<=Ce&&re<=Ee;){const Oe=fe[re],Ge=Me[re]=be?Yd(Me[re]):Cc(Me[re]);if(df(Oe,Ge))m(Oe,Ge,ge,null,G,ee,j,he,be);else break;re++}for(;re<=Ce&&re<=Ee;){const Oe=fe[Ce],Ge=Me[Ee]=be?Yd(Me[Ee]):Cc(Me[Ee]);if(df(Oe,Ge))m(Oe,Ge,ge,null,G,ee,j,he,be);else break;Ce--,Ee--}if(re>Ce){if(re<=Ee){const Oe=Ee+1,Ge=OeEe)for(;re<=Ce;)ie(fe[re],G,ee,!0),re++;else{const Oe=re,Ge=re,$e=new Map;for(re=Ge;re<=Ee;re++){const Ze=Me[re]=be?Yd(Me[re]):Cc(Me[re]);Ze.key!=null&&$e.set(Ze.key,re)}let ot,dt=0;const Jt=Ee-Ge+1;let at=!1,Mt=0;const Bt=new Array(Jt);for(re=0;re=Jt){ie(Ze,G,ee,!0);continue}let vt;if(Ze.key!=null)vt=$e.get(Ze.key);else for(ot=Ge;ot<=Ee;ot++)if(Bt[ot-Ge]===0&&df(Ze,Me[ot])){vt=ot;break}vt===void 0?ie(Ze,G,ee,!0):(Bt[vt-Ge]=re+1,vt>=Mt?Mt=vt:at=!0,m(Ze,Me[vt],ge,null,G,ee,j,he,be),dt++)}const $t=at?qY(Bt):Nm;for(ot=$t.length-1,re=Jt-1;re>=0;re--){const Ze=Ge+re,vt=Me[Ze],qe=Me[Ze+1],kt=Ze+1{const{el:ee,type:j,transition:he,children:be,shapeFlag:re}=fe;if(re&6){Q(fe.component.subTree,Me,ge,Qe);return}if(re&128){fe.suspense.move(Me,ge,Qe);return}if(re&64){j.move(fe,Me,ge,Fe);return}if(j===At){i(ee,Me,ge);for(let Ce=0;Cehe.enter(ee),G);else{const{leave:Ce,delayLeave:Ee,afterLeave:Oe}=he,Ge=()=>{fe.ctx.isUnmounted?s(ee):i(ee,Me,ge)},$e=()=>{ee._isLeaving&&ee[ku](!0),Ce(ee,()=>{Ge(),Oe&&Oe()})};Ee?Ee(ee,Ge,$e):$e()}else i(ee,Me,ge)},ie=(fe,Me,ge,Qe=!1,G=!1)=>{const{type:ee,props:j,ref:he,children:be,dynamicChildren:re,shapeFlag:le,patchFlag:Ce,dirs:Ee,cacheIndex:Oe}=fe;if(Ce===-2&&(G=!1),he!=null&&(Zu(),s0(he,null,ge,fe,!0),Ju()),Oe!=null&&(Me.renderCache[Oe]=void 0),le&256){Me.ctx.deactivate(fe);return}const Ge=le&1&&Ee,$e=!zm(fe);let ot;if($e&&(ot=j&&j.onVnodeBeforeUnmount)&&hc(ot,Me,fe),le&6)ae(fe.component,ge,Qe);else{if(le&128){fe.suspense.unmount(ge,Qe);return}Ge&&Wh(fe,null,Me,"beforeUnmount"),le&64?fe.type.remove(fe,Me,ge,Fe,Qe):re&&!re.hasOnce&&(ee!==At||Ce>0&&Ce&64)?_e(re,Me,ge,!1,!0):(ee===At&&Ce&384||!G&&le&16)&&_e(be,Me,ge),Qe&&ne(fe)}($e&&(ot=j&&j.onVnodeUnmounted)||Ge)&&zo(()=>{ot&&hc(ot,Me,fe),Ge&&Wh(fe,null,Me,"unmounted")},ge)},ne=fe=>{const{type:Me,el:ge,anchor:Qe,transition:G}=fe;if(Me===At){ce(ge,Qe);return}if(Me===O_){_(fe);return}const ee=()=>{s(ge),G&&!G.persisted&&G.afterLeave&&G.afterLeave()};if(fe.shapeFlag&1&&G&&!G.persisted){const{leave:j,delayLeave:he}=G,be=()=>j(ge,ee);he?he(fe.el,ee,be):be()}else ee()},ce=(fe,Me)=>{let ge;for(;fe!==Me;)ge=h(fe),s(fe),fe=ge;s(Me)},ae=(fe,Me,ge)=>{const{bum:Qe,scope:G,job:ee,subTree:j,um:he,m:be,a:re}=fe;IL(be),IL(re),Qe&&L_(Qe),G.stop(),ee&&(ee.flags|=8,ie(j,fe,Me,ge)),he&&zo(he,Me),zo(()=>{fe.isUnmounted=!0},Me)},_e=(fe,Me,ge,Qe=!1,G=!1,ee=0)=>{for(let j=ee;j{if(fe.shapeFlag&6)return ke(fe.component.subTree);if(fe.shapeFlag&128)return fe.suspense.next();const Me=h(fe.anchor||fe.el),ge=Me&&Me[fB];return ge?h(ge):Me};let Te=!1;const Ke=(fe,Me,ge)=>{let Qe;fe==null?Me._vnode&&(ie(Me._vnode,null,null,!0),Qe=Me._vnode.component):m(Me._vnode||null,fe,Me,null,null,null,ge),Me._vnode=fe,Te||(Te=!0,bL(Qe),lB(),Te=!1)},Fe={p:m,um:ie,m:Q,r:ne,mt:q,mc:I,pc:D,pbc:k,n:ke,o:t};return{render:Ke,hydrate:void 0,createApp:IY(Ke)}}function DS({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function Gh({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function KY(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function TA(t,e,n=!1){const i=t.children,s=e.children;if(pt(i)&&pt(s))for(let r=0;r>1,t[n[a]]0&&(e[i]=n[r-1]),n[r]=i)}}for(r=n.length,o=n[r-1];r-- >0;)n[r]=o,o=e[o];return n}function $B(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:$B(e)}function IL(t){if(t)for(let e=0;et.__isSuspense;function YY(t,e){e&&e.pendingBranch?pt(t)?e.effects.push(...t):e.effects.push(t):aB(t)}const At=Symbol.for("v-fgt"),ap=Symbol.for("v-txt"),Hs=Symbol.for("v-cmt"),O_=Symbol.for("v-stc"),o0=[];let La=null;function z(t=!1){o0.push(La=t?null:[])}function XY(){o0.pop(),La=o0[o0.length-1]||null}let R0=1;function Vw(t,e=!1){R0+=t,t<0&&La&&e&&(La.hasOnce=!0)}function WB(t){return t.dynamicChildren=R0>0?La||Nm:null,XY(),R0>0&&La&&La.push(t),t}function se(t,e,n,i,s,r){return WB(U(t,e,n,i,s,r,!0))}function De(t,e,n,i,s){return WB(de(t,e,n,i,s,!0))}function Yi(t){return t?t.__v_isVNode===!0:!1}function df(t,e){return t.type===e.type&&t.key===e.key}const GB=({key:t})=>t??null,D_=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Gt(t)||Li(t)||Kt(t)?{i:Zr,r:t,k:e,f:!!n}:t:null);function U(t,e=null,n=null,i=0,s=null,r=t===At?0:1,o=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&GB(e),ref:e&&D_(e),scopeId:nx,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:r,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Zr};return a?(MA(l,n),r&128&&t.normalize(l)):n&&(l.shapeFlag|=Gt(n)?8:16),R0>0&&!o&&La&&(l.patchFlag>0||r&6)&&l.patchFlag!==32&&La.push(l),l}const de=ZY;function ZY(t,e=null,n=null,i=0,s=null,r=!1){if((!t||t===CB)&&(t=Hs),Yi(t)){const a=ed(t,e,!0);return n&&MA(a,n),R0>0&&!r&&La&&(a.shapeFlag&6?La[La.indexOf(t)]=a:La.push(a)),a.patchFlag=-2,a}if(rX(t)&&(t=t.__vccOpts),e){e=Gu(e);let{class:a,style:l}=e;a&&!Gt(a)&&(e.class=J(a)),Mn(l)&&(ex(l)&&!pt(l)&&(l=Cr({},l)),e.style=Ht(l))}const o=Gt(t)?1:HB(t)?128:pB(t)?64:Mn(t)?4:Kt(t)?2:0;return U(t,e,n,i,s,o,r,!0)}function Gu(t){return t?ex(t)||DB(t)?Cr({},t):t:null}function ed(t,e,n=!1,i=!1){const{props:s,ref:r,patchFlag:o,children:a,transition:l}=t,c=e?Dn(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&GB(c),ref:e&&e.ref?n&&r?pt(r)?r.concat(D_(e)):[r,D_(e)]:D_(e):r,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==At?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ed(t.ssContent),ssFallback:t.ssFallback&&ed(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&Wf(u,l.clone(u)),u}function cn(t=" ",e=0){return de(ap,null,t,e)}function Le(t="",e=!1){return e?(z(),De(Hs,null,t)):de(Hs,null,t)}function Cc(t){return t==null||typeof t=="boolean"?de(Hs):pt(t)?de(At,null,t.slice()):Yi(t)?Yd(t):de(ap,null,String(t))}function Yd(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ed(t)}function MA(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(pt(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),MA(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!DB(e)?e._ctx=Zr:s===3&&Zr&&(Zr.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else Kt(e)?(e={default:e,_ctx:Zr},n=32):(e=String(e),i&64?(n=16,e=[cn(e)]):n=8);t.children=e,t.shapeFlag|=n}function Dn(...t){const e={};for(let n=0;nvo||Zr;let Hw,aT;{const t=Y2(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),r=>{s.length>1?s.forEach(o=>o(r)):s[0](r)}};Hw=e("__VUE_INSTANCE_SETTERS__",n=>vo=n),aT=e("__VUE_SSR_SETTERS__",n=>O0=n)}const Ry=t=>{const e=vo;return Hw(t),t.scope.on(),()=>{t.scope.off(),Hw(e)}},RL=()=>{vo&&vo.scope.off(),Hw(null)};function jB(t){return t.vnode.shapeFlag&4}let O0=!1;function tX(t,e=!1,n=!1){e&&aT(e);const{props:i,children:s}=t.vnode,r=jB(t);zY(t,i,r,e),HY(t,s,n||e);const o=r?nX(t,e):void 0;return e&&aT(!1),o}function nX(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,CY);const{setup:i}=n;if(i){Zu();const s=t.setupContext=i.length>1?qB(t):null,r=Ry(t),o=Iy(i,t,0,[t.props,s]),a=Vf(o);if(Ju(),r(),(a||t.sp)&&!zm(t)&&xB(t),a){if(o.then(RL,RL),e)return o.then(l=>{OL(t,l)}).catch(l=>{tx(l,t,0)});t.asyncDep=o}else OL(t,o)}else KB(t)}function OL(t,e,n){Kt(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Mn(e)&&(t.setupState=nB(e)),KB(t)}function KB(t,e,n){const i=t.type;t.render||(t.render=i.render||_i);{const s=Ry(t);Zu();try{TY(t)}finally{Ju(),s()}}}const iX={get(t,e){return go(t,"get",""),t[e]}};function qB(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,iX),slots:t.slots,emit:t.emit,expose:e}}function ux(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(nB(Da(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in r0)return r0[n](t)},has(e,n){return n in e||n in r0}})):t.proxy}function sX(t,e=!0){return Kt(t)?t.displayName||t.name:t.name||e&&t.__name}function rX(t){return Kt(t)&&"__vccOpts"in t}const F=(t,e)=>oY(t,e,O0);function tn(t,e,n){try{Vw(-1);const i=arguments.length;return i===2?Mn(e)&&!pt(e)?Yi(e)?de(t,null,[e]):de(t,e):de(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&Yi(n)&&(n=[n]),de(t,e,n))}finally{Vw(1)}}const oX="3.5.26",aX=_i;let lT;const DL=typeof window<"u"&&window.trustedTypes;if(DL)try{lT=DL.createPolicy("vue",{createHTML:t=>t})}catch{}const YB=lT?t=>lT.createHTML(t):t=>t,lX="http://www.w3.org/2000/svg",cX="http://www.w3.org/1998/Math/MathML",Au=typeof document<"u"?document:null,NL=Au&&Au.createElement("template"),uX={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?Au.createElementNS(lX,t):e==="mathml"?Au.createElementNS(cX,t):n?Au.createElement(t,{is:n}):Au.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Au.createTextNode(t),createComment:t=>Au.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Au.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,r){const o=n?n.previousSibling:e.lastChild;if(s&&(s===r||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===r||!(s=s.nextSibling)););else{NL.innerHTML=YB(i==="svg"?`${t}`:i==="mathml"?`${t}`:t);const a=NL.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[o?o.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},_d="transition",dv="animation",ng=Symbol("_vtc"),XB={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},ZB=Cr({},yB,XB),dX=t=>(t.displayName="Transition",t.props=ZB,t),Rr=dX((t,{slots:e})=>tn(vY,JB(t),e)),jh=(t,e=[])=>{pt(t)?t.forEach(n=>n(...e)):t&&t(...e)},BL=t=>t?pt(t)?t.some(e=>e.length>1):t.length>1:!1;function JB(t){const e={};for(const R in t)R in XB||(e[R]=t[R]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:r=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=r,appearActiveClass:c=o,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=hX(s),m=p&&p[0],b=p&&p[1],{onBeforeEnter:g,onEnter:x,onEnterCancelled:S,onLeave:_,onLeaveCancelled:E,onBeforeAppear:T=g,onAppear:A=x,onAppearCancelled:I=S}=e,P=(R,H,q,oe)=>{R._enterCancelled=oe,Ud(R,H?u:a),Ud(R,H?c:o),q&&q()},k=(R,H)=>{R._isLeaving=!1,Ud(R,d),Ud(R,f),Ud(R,h),H&&H()},B=R=>(H,q)=>{const oe=R?A:x,Z=()=>P(H,R,q);jh(oe,[H,Z]),FL(()=>{Ud(H,R?l:r),_c(H,R?u:a),BL(oe)||zL(H,i,m,Z)})};return Cr(e,{onBeforeEnter(R){jh(g,[R]),_c(R,r),_c(R,o)},onBeforeAppear(R){jh(T,[R]),_c(R,l),_c(R,c)},onEnter:B(!1),onAppear:B(!0),onLeave(R,H){R._isLeaving=!0;const q=()=>k(R,H);_c(R,d),R._enterCancelled?(_c(R,h),cT(R)):(cT(R),_c(R,h)),FL(()=>{R._isLeaving&&(Ud(R,d),_c(R,f),BL(_)||zL(R,i,b,q))}),jh(_,[R,q])},onEnterCancelled(R){P(R,!1,void 0,!0),jh(S,[R])},onAppearCancelled(R){P(R,!0,void 0,!0),jh(I,[R])},onLeaveCancelled(R){k(R),jh(E,[R])}})}function hX(t){if(t==null)return null;if(Mn(t))return[NS(t.enter),NS(t.leave)];{const e=NS(t);return[e,e]}}function NS(t){return Tq(t)}function _c(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[ng]||(t[ng]=new Set)).add(e)}function Ud(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[ng];n&&(n.delete(e),n.size||(t[ng]=void 0))}function FL(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let fX=0;function zL(t,e,n,i){const s=t._endId=++fX,r=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(r,n);const{type:o,timeout:a,propCount:l}=QB(t,e);if(!o)return i();const c=o+"end";let u=0;const d=()=>{t.removeEventListener(c,h),r()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u(n[p]||"").split(", "),s=i(`${_d}Delay`),r=i(`${_d}Duration`),o=UL(s,r),a=i(`${dv}Delay`),l=i(`${dv}Duration`),c=UL(a,l);let u=null,d=0,h=0;e===_d?o>0&&(u=_d,d=o,h=r.length):e===dv?c>0&&(u=dv,d=c,h=l.length):(d=Math.max(o,c),u=d>0?o>c?_d:dv:null,h=u?u===_d?r.length:l.length:0);const f=u===_d&&/\b(?:transform|all)(?:,|$)/.test(i(`${_d}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function UL(t,e){for(;t.length$L(n)+$L(t[i])))}function $L(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function cT(t){return(t?t.ownerDocument:document).body.offsetHeight}function pX(t,e,n){const i=t[ng];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const Ww=Symbol("_vod"),eF=Symbol("_vsh"),ci={name:"show",beforeMount(t,{value:e},{transition:n}){t[Ww]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):hv(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),hv(t,!0),i.enter(t)):i.leave(t,()=>{hv(t,!1)}):hv(t,e))},beforeUnmount(t,{value:e}){hv(t,e)}};function hv(t,e){t.style.display=e?t[Ww]:"none",t[eF]=!e}const tF=Symbol("");function nF(t){const e=xn();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(r=>Gw(r,s))},i=()=>{const s=t(e.proxy);e.ce?Gw(e.ce,s):uT(e.subTree,s),n(s)};lx(()=>{aB(i)}),mn(()=>{We(i,_i,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),eo(()=>s.disconnect())})}function uT(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{uT(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)Gw(t.el,e);else if(t.type===At)t.children.forEach(n=>uT(n,e));else if(t.type===O_){let{el:n,anchor:i}=t;for(;n&&(Gw(n,e),n!==i);)n=n.nextSibling}}function Gw(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e){const r=Oq(e[s]);n.setProperty(`--${s}`,r),i+=`--${s}: ${r};`}n[tF]=i}}const mX=/(?:^|;)\s*display\s*:/;function gX(t,e,n){const i=t.style,s=Gt(n);let r=!1;if(n&&!s){if(e)if(Gt(e))for(const o of e.split(";")){const a=o.slice(0,o.indexOf(":")).trim();n[a]==null&&N_(i,a,"")}else for(const o in e)n[o]==null&&N_(i,o,"");for(const o in n)o==="display"&&(r=!0),N_(i,o,n[o])}else if(s){if(e!==n){const o=i[tF];o&&(n+=";"+o),i.cssText=n,r=mX.test(n)}}else e&&t.removeAttribute("style");Ww in t&&(t[Ww]=r?i.display:"",t[eF]&&(i.display="none"))}const VL=/\s*!important$/;function N_(t,e,n){if(pt(n))n.forEach(i=>N_(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=vX(t,e);VL.test(n)?t.setProperty(Jc(i),n.replace(VL,""),"important"):t[i]=n}}const HL=["Webkit","Moz","ms"],BS={};function vX(t,e){const n=BS[e];if(n)return n;let i=Co(e);if(i!=="filter"&&i in t)return BS[e]=i;i=Py(i);for(let s=0;sFS||(wX.then(()=>FS=0),FS=Date.now());function SX(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;Hl(EX(i,n.value),e,5,[i])};return n.value=t,n.attached=xX(),n}function EX(t,e){if(pt(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const YL=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,CX=(t,e,n,i,s,r)=>{const o=s==="svg";e==="class"?pX(t,i,o):e==="style"?gX(t,n,i):G2(e)?cA(e)||bX(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):TX(t,e,i,o))?(jL(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&GL(t,e,i,o,r,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Gt(i))?jL(t,Co(e),i,r,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),GL(t,e,i,o))};function TX(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&YL(e)&&Kt(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return YL(e)&&Gt(n)?!1:e in t}const iF=new WeakMap,sF=new WeakMap,jw=Symbol("_moveCb"),XL=Symbol("_enterCb"),MX=t=>(delete t.props.mode,t),AX=MX({name:"TransitionGroup",props:Cr({},ZB,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=xn(),i=vB();let s,r;return ec(()=>{if(!s.length)return;const o=t.moveClass||`${t.name||"v"}-move`;if(!IX(s[0].el,n.vnode.el,o)){s=[];return}s.forEach(kX),s.forEach(PX);const a=s.filter(LX);cT(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;_c(c,o),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[jw]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[jw]=null,Ud(c,o))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const o=Hi(t),a=JB(o);let l=o.tag||At;if(s=[],r)for(let c=0;c{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const r=e.nodeType===1?e:e.parentNode;r.appendChild(i);const{hasTransform:o}=QB(i);return r.removeChild(i),o}const _h=t=>{const e=t.props["onUpdate:modelValue"]||!1;return pt(e)?n=>L_(e,n):e};function RX(t){t.target.composing=!0}function ZL(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ol=Symbol("_assign");function JL(t,e,n){return e&&(t=t.trim()),n&&(t=q2(t)),t}const Mc={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[ol]=_h(s);const r=i||s.props&&s.props.type==="number";Ru(t,e?"change":"input",o=>{o.target.composing||t[ol](JL(t.value,n,r))}),(n||r)&&Ru(t,"change",()=>{t.value=JL(t.value,n,r)}),e||(Ru(t,"compositionstart",RX),Ru(t,"compositionend",ZL),Ru(t,"change",ZL))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:r}},o){if(t[ol]=_h(o),t.composing)return;const a=(r||t.type==="number")&&!/^0\d/.test(t.value)?q2(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},dx={deep:!0,created(t,e,n){t[ol]=_h(n),Ru(t,"change",()=>{const i=t._modelValue,s=ig(t),r=t.checked,o=t[ol];if(pt(i)){const a=dA(i,s),l=a!==-1;if(r&&!l)o(i.concat(s));else if(!r&&l){const c=[...i];c.splice(a,1),o(c)}}else if(Ig(i)){const a=new Set(i);r?a.add(s):a.delete(s),o(a)}else o(rF(t,r))})},mounted:QL,beforeUpdate(t,e,n){t[ol]=_h(n),QL(t,e,n)}};function QL(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(pt(e))s=dA(e,i.props.value)>-1;else if(Ig(e))s=e.has(i.props.value);else{if(e===n)return;s=Hf(e,rF(t,!0))}t.checked!==s&&(t.checked=s)}const kA={created(t,{value:e},n){t.checked=Hf(e,n.props.value),t[ol]=_h(n),Ru(t,"change",()=>{t[ol](ig(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ol]=_h(i),e!==n&&(t.checked=Hf(e,i.props.value))}},G1={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Ig(e);Ru(t,"change",()=>{const r=Array.prototype.filter.call(t.options,o=>o.selected).map(o=>n?q2(ig(o)):ig(o));t[ol](t.multiple?s?new Set(r):r:r[0]),t._assigning=!0,Nt(()=>{t._assigning=!1})}),t[ol]=_h(i)},mounted(t,{value:e}){eI(t,e)},beforeUpdate(t,e,n){t[ol]=_h(n)},updated(t,{value:e}){t._assigning||eI(t,e)}};function eI(t,e){const n=t.multiple,i=pt(e);if(!(n&&!i&&!Ig(e))){for(let s=0,r=t.options.length;sString(c)===String(a)):o.selected=dA(e,a)>-1}else o.selected=e.has(a);else if(Hf(ig(o),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function ig(t){return"_value"in t?t._value:t.value}function rF(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const OX=["ctrl","shift","alt","meta"],DX={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)=>OX.some(n=>t[`${n}Key`]&&!e.includes(n))},un=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=((s,...r)=>{for(let o=0;o{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=(s=>{if(!("key"in s))return;const r=Jc(s.key);if(e.some(o=>o===r||NX[o]===r))return t(s)}))},BX=Cr({patchProp:CX},uX);let tI;function oF(){return tI||(tI=GY(BX))}const wh=((...t)=>{oF().render(...t)}),aF=((...t)=>{const e=oF().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=zX(i);if(!s)return;const r=e._component;!Kt(r)&&!r.render&&!r.template&&(r.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const o=n(s,!1,FX(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),o},e});function FX(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function zX(t){return Gt(t)?document.querySelector(t):t}let lF;const hx=t=>lF=t,cF=Symbol();function dT(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var a0;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(a0||(a0={}));function UX(){const t=X2(!0),e=t.run(()=>X({}));let n=[],i=[];const s=Da({install(r){hx(s),s._a=r,r.provide(cF,s),r.config.globalProperties.$pinia=s,i.forEach(o=>n.push(o)),i=[]},use(r){return this._a?n.push(r):i.push(r),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const uF=()=>{};function nI(t,e,n,i=uF){t.add(e);const s=()=>{t.delete(e)&&i()};return!n&&Ly()&&Z2(s),s}function Tp(t,...e){t.forEach(n=>{n(...e)})}const $X=t=>t(),iI=Symbol(),zS=Symbol();function hT(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];dT(s)&&dT(i)&&t.hasOwnProperty(n)&&!Li(i)&&!Ic(i)?t[n]=hT(s,i):t[n]=i}return t}const VX=Symbol();function HX(t){return!dT(t)||!Object.prototype.hasOwnProperty.call(t,VX)}const{assign:$d}=Object;function WX(t){return!!(Li(t)&&t.effect)}function GX(t,e,n,i){const{state:s,actions:r,getters:o}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=hr(n.state.value[t]);return $d(u,r,Object.keys(o||{}).reduce((d,h)=>(d[h]=Da(F(()=>{hx(n);const f=n._s.get(t);return o[h].call(f,f)})),d),{}))}return l=dF(t,c,e,n,i,!0),l}function dF(t,e,n={},i,s,r){let o;const a=$d({actions:{}},n),l={deep:!0};let c,u,d=new Set,h=new Set,f;const p=i.state.value[t];!r&&!p&&(i.state.value[t]={}),X({});let m;function b(I){let P;c=u=!1,typeof I=="function"?(I(i.state.value[t]),P={type:a0.patchFunction,storeId:t,events:f}):(hT(i.state.value[t],I),P={type:a0.patchObject,payload:I,storeId:t,events:f});const k=m=Symbol();Nt().then(()=>{m===k&&(c=!0)}),u=!0,Tp(d,P,i.state.value[t])}const g=r?function(){const{state:P}=n,k=P?P():{};this.$patch(B=>{$d(B,k)})}:uF;function x(){o.stop(),d.clear(),h.clear(),i._s.delete(t)}const S=(I,P="")=>{if(iI in I)return I[zS]=P,I;const k=function(){hx(i);const B=Array.from(arguments),R=new Set,H=new Set;function q(V){R.add(V)}function oe(V){H.add(V)}Tp(h,{args:B,name:k[zS],store:E,after:q,onError:oe});let Z;try{Z=I.apply(this&&this.$id===t?this:E,B)}catch(V){throw Tp(H,V),V}return Z instanceof Promise?Z.then(V=>(Tp(R,V),V)).catch(V=>(Tp(H,V),Promise.reject(V))):(Tp(R,Z),Z)};return k[iI]=!0,k[zS]=P,k},_={_p:i,$id:t,$onAction:nI.bind(null,h),$patch:b,$reset:g,$subscribe(I,P={}){const k=nI(d,I,P.detached,()=>B()),B=o.run(()=>We(()=>i.state.value[t],R=>{(P.flush==="sync"?u:c)&&I({storeId:t,type:a0.direct,events:f},R)},$d({},l,P)));return k},$dispose:x},E=ni(_);i._s.set(t,E);const A=(i._a&&i._a.runWithContext||$X)(()=>i._e.run(()=>(o=X2()).run(()=>e({action:S}))));for(const I in A){const P=A[I];if(Li(P)&&!WX(P)||Ic(P))r||(p&&HX(P)&&(Li(P)?P.value=p[I]:hT(P,p[I])),i.state.value[t][I]=P);else if(typeof P=="function"){const k=S(P,I);A[I]=k,a.actions[I]=P}}return $d(E,A),$d(Hi(E),A),Object.defineProperty(E,"$state",{get:()=>i.state.value[t],set:I=>{b(P=>{$d(P,I)})}}),i._p.forEach(I=>{$d(E,o.run(()=>I({store:E,app:i._a,pinia:i,options:a})))}),p&&r&&n.hydrate&&n.hydrate(E.$state,p),c=!0,u=!0,E}function jX(t,e,n){let i;const s=typeof e=="function";i=s?n:e;function r(o,a){const l=bA();return o=o||(l?zt(cF,null):null),o&&hx(o),o=lF,o._s.has(t)||(s?dF(t,e,i,o):GX(t,i,o)),o._s.get(t)}return r.$id=t,r}function cd(t){const e=Hi(t),n={};for(const i in e){const s=e[i];s.effect?n[i]=F({get:()=>t[i],set(r){t[i]=r}}):(Li(s)||Ic(s))&&(n[i]=Ei(t,i))}return n}const KX=()=>"https://cad2map-900960123746.asia-southeast1.run.app/api",Ll={API_URL:KX(),MAP_DEFAULT_CENTER:[21.0285,105.8542],MAP_DEFAULT_ZOOM:13,TILE_LAYERS:{osm:{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",options:{maxZoom:19,attribution:"© OpenStreetMap"}},satellite:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",options:{maxZoom:19,attribution:"© Esri"}},topo:{url:"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",options:{maxZoom:17,attribution:"© OpenTopoMap"}}},DEFAULT_MEASURE_STYLES:{lineColor:"#2563eb",lineWeight:4,areaColor:"#16a34a",areaFillOpacity:.35,areaWeight:3,showDistanceLabels:!0},DEFAULT_MEASURE_UNITS:{distance:"m",area:"m2"}},Xo=jX("app",()=>{const t=X(null),e=X(null),n=X([]),i=X(new Set),s=X(null),r=X(null),o=X(null),a=X("vn2000"),l=X("v1"),c=X([]),u=X("osm"),d=X("---, ---"),h=X(null),f=X({line:null,area:null}),p=X({...Ll.DEFAULT_MEASURE_UNITS}),m=X({...Ll.DEFAULT_MEASURE_STYLES}),b=X({max_concurrent:5,timeout:10,current_source:"esri_satellite",api_keys:{}}),g=X([]),x=X(!1),S=X([]),_=X("ready"),E=X(!1),T=X(null),A=X("gis"),I=X(null),P=X(null),k=X(new Set),B=X(null),R=X(!1),H=X(!0),q=X(new Set),oe=F(()=>!!t.value),Z=F(()=>n.value.length),V=F(()=>Array.from(i.value)),D=F(()=>{const rt=n.value,jt=i.value;return rt.length>0&&rt.every(Di=>jt.has(Di.name))}),K=F(()=>n.value.filter(rt=>!k.value.has(rt.name))),W=F(()=>_.value);function Q(rt,jt){t.value=rt,e.value=jt}function ie(rt){n.value=rt,i.value=new Set(rt.map(jt=>jt.name))}function ne(rt){const jt=new Set(i.value);jt.has(rt)?jt.delete(rt):jt.add(rt),i.value=jt}function ce(){i.value=new Set(n.value.map(rt=>rt.name))}function ae(){i.value=new Set}function _e(rt){return i.value.has(rt)}function ke(){t.value=null,e.value=null,n.value=[],o.value=null,B.value=null}function Te(rt){s.value=rt}function Ke(rt){r.value=rt}function Fe(rt){o.value=rt}function ve(rt){a.value=rt}function fe(rt){l.value=rt}function Me(rt){c.value=[...c.value,rt]}function ge(rt){c.value=c.value.filter((jt,Di)=>Di!==rt)}function Qe(rt,jt){const Di=[...c.value];Di[rt]=jt,c.value=Di}function G(){c.value=[]}function ee(rt){u.value=rt}function j(rt){d.value=rt}function he(rt){h.value=rt}function be(rt){f.value=rt}function re(rt){f.value=rt(f.value)}function le(rt){p.value=rt}function Ce(rt){m.value=rt}function Ee(rt){b.value={...b.value,...rt}}function Oe(rt){g.value=rt}function Ge(rt,jt){b.value={...b.value,api_keys:{...b.value.api_keys,[rt]:jt}}}function $e(rt){x.value=rt}function ot(rt){_.value=rt}function dt(rt){E.value=rt}function Jt(rt){T.value=rt}function at(rt){A.value=rt}function Mt(){A.value=A.value==="gis"?"cad":"gis"}function Bt(rt){I.value=rt}function $t(rt){P.value=rt}function Ze(rt){const jt=new Set(k.value);jt.has(rt)?jt.delete(rt):jt.add(rt),k.value=jt}function vt(rt){return k.value.has(rt)}function qe(){I.value=null,P.value=null}function kt(){I.value=null}function Je(rt){B.value=rt}function Ft(){R.value=!R.value}function Ne(){H.value=!H.value}function et(rt){const jt=new Set(q.value);jt.has(rt)?jt.delete(rt):jt.add(rt),q.value=jt}function ut(rt){return q.value.has(rt)}function Qt(rt){S.value=[...S.value,rt]}function Cn(rt,jt){const Di={time:new Date().toLocaleTimeString(),type:rt,message:jt};S.value=[...S.value,Di]}function ei(){S.value=[]}function Tt(){t.value=null,e.value=null,n.value=[],i.value=new Set,s.value=null,r.value=null,o.value=null,a.value="vn2000",l.value="v1",c.value=[],u.value="osm",d.value="---, ---",h.value=null,f.value={line:null,area:null},p.value={...Ll.DEFAULT_MEASURE_UNITS},m.value={...Ll.DEFAULT_MEASURE_STYLES},x.value=!1,S.value=[],_.value="ready",E.value=!1,A.value="gis",I.value=null,P.value=null,k.value=new Set,R.value=!1,H.value=!0,q.value=new Set}return{fileId:t,filename:e,layers:n,selectedLayers:i,currentTaskId:s,lastConversionSettings:r,geoJSON:o,coordinateMode:a,coordinateStandard:l,referencePoints:c,currentBaseLayer:u,cursorCoords:d,activeTool:h,activeMeasures:f,measureUnits:p,measureStyles:m,downloadSettings:b,mapSources:g,isLoading:x,logs:S,systemStatus:_,overlayBounds:T,isDrawingOverlay:E,viewMode:A,selectedFeature:I,hoveredFeature:P,hiddenLayers:k,dxfFileUrl:B,leftPanelCollapsed:R,rightPanelCollapsed:H,collapsedSections:q,hasFile:oe,layerCount:Z,selectedLayerNames:V,allLayersSelected:D,visibleLayers:K,appState:W,setFileLoaded:Q,setLayers:ie,toggleLayerSelection:ne,selectAllLayers:ce,deselectAllLayers:ae,isLayerSelected:_e,clearFile:ke,setCurrentTaskId:Te,setLastConversionSettings:Ke,setGeoJSON:Fe,setCoordinateMode:ve,setCoordinateStandard:fe,addReferencePoint:Me,removeReferencePoint:ge,updateReferencePoint:Qe,clearReferencePoints:G,setCurrentBaseLayer:ee,setCursorCoords:j,setActiveTool:he,setActiveMeasures:be,updateActiveMeasures:re,setMeasureUnits:le,setMeasureStyles:Ce,setDownloadSettings:Ee,setMapSources:Oe,setApiKey:Ge,setLoading:$e,setSystemStatus:ot,setDrawingOverlay:dt,setOverlayBounds:Jt,setViewMode:at,toggleViewMode:Mt,setSelectedFeature:Bt,setHoveredFeature:$t,toggleLayerHidden:Ze,isLayerHidden:vt,clearSelection:qe,clearSelectedFeature:kt,setDxfFileUrl:Je,toggleLeftPanel:Ft,toggleRightPanel:Ne,toggleSection:et,isSectionCollapsed:ut,addLog:Qt,log:Cn,clearLogs:ei,reset:Tt}});function hF(t,e){return function(){return t.apply(e,arguments)}}const{toString:qX}=Object.prototype,{getPrototypeOf:PA}=Object,{iterator:fx,toStringTag:fF}=Symbol,px=(t=>e=>{const n=qX.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tc=t=>(t=t.toLowerCase(),e=>px(e)===t),mx=t=>e=>typeof e===t,{isArray:Rg}=Array,sg=mx("undefined");function Oy(t){return t!==null&&!sg(t)&&t.constructor!==null&&!sg(t.constructor)&&da(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const pF=tc("ArrayBuffer");function YX(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&pF(t.buffer),e}const XX=mx("string"),da=mx("function"),mF=mx("number"),Dy=t=>t!==null&&typeof t=="object",ZX=t=>t===!0||t===!1,B_=t=>{if(px(t)!=="object")return!1;const e=PA(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(fF in t)&&!(fx in t)},JX=t=>{if(!Dy(t)||Oy(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},QX=tc("Date"),eZ=tc("File"),tZ=tc("Blob"),nZ=tc("FileList"),iZ=t=>Dy(t)&&da(t.pipe),sZ=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||da(t.append)&&((e=px(t))==="formdata"||e==="object"&&da(t.toString)&&t.toString()==="[object FormData]"))},rZ=tc("URLSearchParams"),[oZ,aZ,lZ,cZ]=["ReadableStream","Request","Response","Headers"].map(tc),uZ=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ny(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let i,s;if(typeof t!="object"&&(t=[t]),Rg(t))for(i=0,s=t.length;i0;)if(s=n[i],e===s.toLowerCase())return s;return null}const _f=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,vF=t=>!sg(t)&&t!==_f;function fT(){const{caseless:t,skipUndefined:e}=vF(this)&&this||{},n={},i=(s,r)=>{const o=t&&gF(n,r)||r;B_(n[o])&&B_(s)?n[o]=fT(n[o],s):B_(s)?n[o]=fT({},s):Rg(s)?n[o]=s.slice():(!e||!sg(s))&&(n[o]=s)};for(let s=0,r=arguments.length;s(Ny(e,(s,r)=>{n&&da(s)?t[r]=hF(s,n):t[r]=s},{allOwnKeys:i}),t),hZ=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),fZ=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},pZ=(t,e,n,i)=>{let s,r,o;const a={};if(e=e||{},t==null)return e;do{for(s=Object.getOwnPropertyNames(t),r=s.length;r-- >0;)o=s[r],(!i||i(o,t,e))&&!a[o]&&(e[o]=t[o],a[o]=!0);t=n!==!1&&PA(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},mZ=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},gZ=t=>{if(!t)return null;if(Rg(t))return t;let e=t.length;if(!mF(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},vZ=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&PA(Uint8Array)),yZ=(t,e)=>{const i=(t&&t[fx]).call(t);let s;for(;(s=i.next())&&!s.done;){const r=s.value;e.call(t,r[0],r[1])}},bZ=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},_Z=tc("HTMLFormElement"),wZ=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),sI=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),xZ=tc("RegExp"),yF=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Ny(n,(s,r)=>{let o;(o=e(s,r,t))!==!1&&(i[r]=o||s)}),Object.defineProperties(t,i)},SZ=t=>{yF(t,(e,n)=>{if(da(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(da(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},EZ=(t,e)=>{const n={},i=s=>{s.forEach(r=>{n[r]=!0})};return Rg(t)?i(t):i(String(t).split(e)),n},CZ=()=>{},TZ=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function MZ(t){return!!(t&&da(t.append)&&t[fF]==="FormData"&&t[fx])}const AZ=t=>{const e=new Array(10),n=(i,s)=>{if(Dy(i)){if(e.indexOf(i)>=0)return;if(Oy(i))return i;if(!("toJSON"in i)){e[s]=i;const r=Rg(i)?[]:{};return Ny(i,(o,a)=>{const l=n(o,s+1);!sg(l)&&(r[a]=l)}),e[s]=void 0,r}}return i};return n(t,0)},kZ=tc("AsyncFunction"),PZ=t=>t&&(Dy(t)||da(t))&&da(t.then)&&da(t.catch),bF=((t,e)=>t?setImmediate:e?((n,i)=>(_f.addEventListener("message",({source:s,data:r})=>{s===_f&&r===n&&i.length&&i.shift()()},!1),s=>{i.push(s),_f.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",da(_f.postMessage)),LZ=typeof queueMicrotask<"u"?queueMicrotask.bind(_f):typeof process<"u"&&process.nextTick||bF,IZ=t=>t!=null&&da(t[fx]),Rt={isArray:Rg,isArrayBuffer:pF,isBuffer:Oy,isFormData:sZ,isArrayBufferView:YX,isString:XX,isNumber:mF,isBoolean:ZX,isObject:Dy,isPlainObject:B_,isEmptyObject:JX,isReadableStream:oZ,isRequest:aZ,isResponse:lZ,isHeaders:cZ,isUndefined:sg,isDate:QX,isFile:eZ,isBlob:tZ,isRegExp:xZ,isFunction:da,isStream:iZ,isURLSearchParams:rZ,isTypedArray:vZ,isFileList:nZ,forEach:Ny,merge:fT,extend:dZ,trim:uZ,stripBOM:hZ,inherits:fZ,toFlatObject:pZ,kindOf:px,kindOfTest:tc,endsWith:mZ,toArray:gZ,forEachEntry:yZ,matchAll:bZ,isHTMLForm:_Z,hasOwnProperty:sI,hasOwnProp:sI,reduceDescriptors:yF,freezeMethods:SZ,toObjectSet:EZ,toCamelCase:wZ,noop:CZ,toFiniteNumber:TZ,findKey:gF,global:_f,isContextDefined:vF,isSpecCompliantForm:MZ,toJSONObject:AZ,isAsyncFn:kZ,isThenable:PZ,setImmediate:bF,asap:LZ,isIterable:IZ};function Pi(t,e,n,i,s){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),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}Rt.inherits(Pi,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:Rt.toJSONObject(this.config),code:this.code,status:this.status}}});const _F=Pi.prototype,wF={};["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=>{wF[t]={value:t}});Object.defineProperties(Pi,wF);Object.defineProperty(_F,"isAxiosError",{value:!0});Pi.from=(t,e,n,i,s,r)=>{const o=Object.create(_F);Rt.toFlatObject(t,o,function(u){return u!==Error.prototype},c=>c!=="isAxiosError");const a=t&&t.message?t.message:"Error",l=e==null&&t?t.code:e;return Pi.call(o,a,l,n,i,s),t&&o.cause==null&&Object.defineProperty(o,"cause",{value:t,configurable:!0}),o.name=t&&t.name||"Error",r&&Object.assign(o,r),o};const RZ=null;function pT(t){return Rt.isPlainObject(t)||Rt.isArray(t)}function xF(t){return Rt.endsWith(t,"[]")?t.slice(0,-2):t}function rI(t,e,n){return t?t.concat(e).map(function(s,r){return s=xF(s),!n&&r?"["+s+"]":s}).join(n?".":""):e}function OZ(t){return Rt.isArray(t)&&!t.some(pT)}const DZ=Rt.toFlatObject(Rt,{},null,function(e){return/^is[A-Z]/.test(e)});function gx(t,e,n){if(!Rt.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=Rt.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!Rt.isUndefined(b[m])});const i=n.metaTokens,s=n.visitor||u,r=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Rt.isSpecCompliantForm(e);if(!Rt.isFunction(s))throw new TypeError("visitor must be a function");function c(p){if(p===null)return"";if(Rt.isDate(p))return p.toISOString();if(Rt.isBoolean(p))return p.toString();if(!l&&Rt.isBlob(p))throw new Pi("Blob is not supported. Use a Buffer instead.");return Rt.isArrayBuffer(p)||Rt.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function u(p,m,b){let g=p;if(p&&!b&&typeof p=="object"){if(Rt.endsWith(m,"{}"))m=i?m:m.slice(0,-2),p=JSON.stringify(p);else if(Rt.isArray(p)&&OZ(p)||(Rt.isFileList(p)||Rt.endsWith(m,"[]"))&&(g=Rt.toArray(p)))return m=xF(m),g.forEach(function(S,_){!(Rt.isUndefined(S)||S===null)&&e.append(o===!0?rI([m],_,r):o===null?m:m+"[]",c(S))}),!1}return pT(p)?!0:(e.append(rI(b,m,r),c(p)),!1)}const d=[],h=Object.assign(DZ,{defaultVisitor:u,convertValue:c,isVisitable:pT});function f(p,m){if(!Rt.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),Rt.forEach(p,function(g,x){(!(Rt.isUndefined(g)||g===null)&&s.call(e,g,Rt.isString(x)?x.trim():x,m,h))===!0&&f(g,m?m.concat(x):[x])}),d.pop()}}if(!Rt.isObject(t))throw new TypeError("data must be an object");return f(t),e}function oI(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function LA(t,e){this._pairs=[],t&&gx(t,this,e)}const SF=LA.prototype;SF.append=function(e,n){this._pairs.push([e,n])};SF.toString=function(e){const n=e?function(i){return e.call(this,i,oI)}:oI;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function NZ(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function EF(t,e,n){if(!e)return t;const i=n&&n.encode||NZ;Rt.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let r;if(s?r=s(e,n):r=Rt.isURLSearchParams(e)?e.toString():new LA(e,n).toString(i),r){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+r}return t}class aI{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Rt.forEach(this.handlers,function(i){i!==null&&e(i)})}}const CF={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},BZ=typeof URLSearchParams<"u"?URLSearchParams:LA,FZ=typeof FormData<"u"?FormData:null,zZ=typeof Blob<"u"?Blob:null,UZ={isBrowser:!0,classes:{URLSearchParams:BZ,FormData:FZ,Blob:zZ},protocols:["http","https","file","blob","url","data"]},IA=typeof window<"u"&&typeof document<"u",mT=typeof navigator=="object"&&navigator||void 0,$Z=IA&&(!mT||["ReactNative","NativeScript","NS"].indexOf(mT.product)<0),VZ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",HZ=IA&&window.location.href||"http://localhost",WZ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:IA,hasStandardBrowserEnv:$Z,hasStandardBrowserWebWorkerEnv:VZ,navigator:mT,origin:HZ},Symbol.toStringTag,{value:"Module"})),yo={...WZ,...UZ};function GZ(t,e){return gx(t,new yo.classes.URLSearchParams,{visitor:function(n,i,s,r){return yo.isNode&&Rt.isBuffer(n)?(this.append(i,n.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...e})}function jZ(t){return Rt.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function KZ(t){const e={},n=Object.keys(t);let i;const s=n.length;let r;for(i=0;i=n.length;return o=!o&&Rt.isArray(s)?s.length:o,l?(Rt.hasOwnProp(s,o)?s[o]=[s[o],i]:s[o]=i,!a):((!s[o]||!Rt.isObject(s[o]))&&(s[o]=[]),e(n,i,s[o],r)&&Rt.isArray(s[o])&&(s[o]=KZ(s[o])),!a)}if(Rt.isFormData(t)&&Rt.isFunction(t.entries)){const n={};return Rt.forEachEntry(t,(i,s)=>{e(jZ(i),s,n,0)}),n}return null}function qZ(t,e,n){if(Rt.isString(t))try{return(e||JSON.parse)(t),Rt.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const By={transitional:CF,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,r=Rt.isObject(e);if(r&&Rt.isHTMLForm(e)&&(e=new FormData(e)),Rt.isFormData(e))return s?JSON.stringify(TF(e)):e;if(Rt.isArrayBuffer(e)||Rt.isBuffer(e)||Rt.isStream(e)||Rt.isFile(e)||Rt.isBlob(e)||Rt.isReadableStream(e))return e;if(Rt.isArrayBufferView(e))return e.buffer;if(Rt.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(r){if(i.indexOf("application/x-www-form-urlencoded")>-1)return GZ(e,this.formSerializer).toString();if((a=Rt.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return gx(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return r||s?(n.setContentType("application/json",!1),qZ(e)):e}],transformResponse:[function(e){const n=this.transitional||By.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(Rt.isResponse(e)||Rt.isReadableStream(e))return e;if(e&&Rt.isString(e)&&(i&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(e,this.parseReviver)}catch(a){if(o)throw a.name==="SyntaxError"?Pi.from(a,Pi.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:yo.classes.FormData,Blob:yo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Rt.forEach(["delete","get","head","post","put","patch"],t=>{By.headers[t]={}});const YZ=Rt.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"]),XZ=t=>{const e={};let n,i,s;return t&&t.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),i=o.substring(s+1).trim(),!(!n||e[n]&&YZ[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},lI=Symbol("internals");function fv(t){return t&&String(t).trim().toLowerCase()}function F_(t){return t===!1||t==null?t:Rt.isArray(t)?t.map(F_):String(t)}function ZZ(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const JZ=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function US(t,e,n,i,s){if(Rt.isFunction(i))return i.call(this,e,n);if(s&&(e=n),!!Rt.isString(e)){if(Rt.isString(i))return e.indexOf(i)!==-1;if(Rt.isRegExp(i))return i.test(e)}}function QZ(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function eJ(t,e){const n=Rt.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(s,r,o){return this[i].call(this,e,s,r,o)},configurable:!0})})}let ha=class{constructor(e){e&&this.set(e)}set(e,n,i){const s=this;function r(a,l,c){const u=fv(l);if(!u)throw new Error("header name must be a non-empty string");const d=Rt.findKey(s,u);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||l]=F_(a))}const o=(a,l)=>Rt.forEach(a,(c,u)=>r(c,u,l));if(Rt.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(Rt.isString(e)&&(e=e.trim())&&!JZ(e))o(XZ(e),n);else if(Rt.isObject(e)&&Rt.isIterable(e)){let a={},l,c;for(const u of e){if(!Rt.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?Rt.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,n)}else e!=null&&r(n,e,i);return this}get(e,n){if(e=fv(e),e){const i=Rt.findKey(this,e);if(i){const s=this[i];if(!n)return s;if(n===!0)return ZZ(s);if(Rt.isFunction(n))return n.call(this,s,i);if(Rt.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=fv(e),e){const i=Rt.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||US(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let s=!1;function r(o){if(o=fv(o),o){const a=Rt.findKey(i,o);a&&(!n||US(i,i[a],a,n))&&(delete i[a],s=!0)}}return Rt.isArray(e)?e.forEach(r):r(e),s}clear(e){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const r=n[i];(!e||US(this,this[r],r,e,!0))&&(delete this[r],s=!0)}return s}normalize(e){const n=this,i={};return Rt.forEach(this,(s,r)=>{const o=Rt.findKey(i,r);if(o){n[o]=F_(s),delete n[r];return}const a=e?QZ(r):String(r).trim();a!==r&&delete n[r],n[a]=F_(s),i[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return Rt.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=e&&Rt.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(s=>i.set(s)),i}static accessor(e){const i=(this[lI]=this[lI]={accessors:{}}).accessors,s=this.prototype;function r(o){const a=fv(o);i[a]||(eJ(s,o),i[a]=!0)}return Rt.isArray(e)?e.forEach(r):r(e),this}};ha.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Rt.reduceDescriptors(ha.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});Rt.freezeMethods(ha);function $S(t,e){const n=this||By,i=e||n,s=ha.from(i.headers);let r=i.data;return Rt.forEach(t,function(a){r=a.call(n,r,s.normalize(),e?e.status:void 0)}),s.normalize(),r}function MF(t){return!!(t&&t.__CANCEL__)}function Og(t,e,n){Pi.call(this,t??"canceled",Pi.ERR_CANCELED,e,n),this.name="CanceledError"}Rt.inherits(Og,Pi,{__CANCEL__:!0});function AF(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Pi("Request failed with status code "+n.status,[Pi.ERR_BAD_REQUEST,Pi.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tJ(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function nJ(t,e){t=t||10;const n=new Array(t),i=new Array(t);let s=0,r=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),u=i[r];o||(o=c),n[s]=l,i[s]=c;let d=r,h=0;for(;d!==s;)h+=n[d++],d=d%t;if(s=(s+1)%t,s===r&&(r=(r+1)%t),c-o{n=u,s=null,r&&(clearTimeout(r),r=null),t(...c)};return[(...c)=>{const u=Date.now(),d=u-n;d>=i?o(c,u):(s=c,r||(r=setTimeout(()=>{r=null,o(s)},i-d)))},()=>s&&o(s)]}const Kw=(t,e,n=3)=>{let i=0;const s=nJ(50,250);return iJ(r=>{const o=r.loaded,a=r.lengthComputable?r.total:void 0,l=o-i,c=s(l),u=o<=a;i=o;const d={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:r,lengthComputable:a!=null,[e?"download":"upload"]:!0};t(d)},n)},cI=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},uI=t=>(...e)=>Rt.asap(()=>t(...e)),sJ=yo.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,yo.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(yo.origin),yo.navigator&&/(msie|trident)/i.test(yo.navigator.userAgent)):()=>!0,rJ=yo.hasStandardBrowserEnv?{write(t,e,n,i,s,r,o){if(typeof document>"u")return;const a=[`${t}=${encodeURIComponent(e)}`];Rt.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),Rt.isString(i)&&a.push(`path=${i}`),Rt.isString(s)&&a.push(`domain=${s}`),r===!0&&a.push("secure"),Rt.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function oJ(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function aJ(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function kF(t,e,n){let i=!oJ(e);return t&&(i||n==!1)?aJ(t,e):e}const dI=t=>t instanceof ha?{...t}:t;function Gf(t,e){e=e||{};const n={};function i(c,u,d,h){return Rt.isPlainObject(c)&&Rt.isPlainObject(u)?Rt.merge.call({caseless:h},c,u):Rt.isPlainObject(u)?Rt.merge({},u):Rt.isArray(u)?u.slice():u}function s(c,u,d,h){if(Rt.isUndefined(u)){if(!Rt.isUndefined(c))return i(void 0,c,d,h)}else return i(c,u,d,h)}function r(c,u){if(!Rt.isUndefined(u))return i(void 0,u)}function o(c,u){if(Rt.isUndefined(u)){if(!Rt.isUndefined(c))return i(void 0,c)}else return i(void 0,u)}function a(c,u,d){if(d in e)return i(c,u);if(d in t)return i(void 0,c)}const l={url:r,method:r,data:r,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,d)=>s(dI(c),dI(u),d,!0)};return Rt.forEach(Object.keys({...t,...e}),function(u){const d=l[u]||s,h=d(t[u],e[u],u);Rt.isUndefined(h)&&d!==a||(n[u]=h)}),n}const PF=t=>{const e=Gf({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:r,headers:o,auth:a}=e;if(e.headers=o=ha.from(o),e.url=EF(kF(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),Rt.isFormData(n)){if(yo.hasStandardBrowserEnv||yo.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(Rt.isFunction(n.getHeaders)){const l=n.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([u,d])=>{c.includes(u.toLowerCase())&&o.set(u,d)})}}if(yo.hasStandardBrowserEnv&&(i&&Rt.isFunction(i)&&(i=i(e)),i||i!==!1&&sJ(e.url))){const l=s&&r&&rJ.read(r);l&&o.set(s,l)}return e},lJ=typeof XMLHttpRequest<"u",cJ=lJ&&function(t){return new Promise(function(n,i){const s=PF(t);let r=s.data;const o=ha.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=s,u,d,h,f,p;function m(){f&&f(),p&&p(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function g(){if(!b)return;const S=ha.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:t,request:b};AF(function(A){n(A),m()},function(A){i(A),m()},E),b=null}"onloadend"in b?b.onloadend=g:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(g)},b.onabort=function(){b&&(i(new Pi("Request aborted",Pi.ECONNABORTED,t,b)),b=null)},b.onerror=function(_){const E=_&&_.message?_.message:"Network Error",T=new Pi(E,Pi.ERR_NETWORK,t,b);T.event=_||null,i(T),b=null},b.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const E=s.transitional||CF;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),i(new Pi(_,E.clarifyTimeoutError?Pi.ETIMEDOUT:Pi.ECONNABORTED,t,b)),b=null},r===void 0&&o.setContentType(null),"setRequestHeader"in b&&Rt.forEach(o.toJSON(),function(_,E){b.setRequestHeader(E,_)}),Rt.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),c&&([h,p]=Kw(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,f]=Kw(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",f)),(s.cancelToken||s.signal)&&(u=S=>{b&&(i(!S||S.type?new Og(null,t,b):S),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const x=tJ(s.url);if(x&&yo.protocols.indexOf(x)===-1){i(new Pi("Unsupported protocol "+x+":",Pi.ERR_BAD_REQUEST,t));return}b.send(r||null)})},uJ=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,s;const r=function(c){if(!s){s=!0,a();const u=c instanceof Error?c:this.reason;i.abort(u instanceof Pi?u:new Og(u instanceof Error?u.message:u))}};let o=e&&setTimeout(()=>{o=null,r(new Pi(`timeout ${e} of ms exceeded`,Pi.ETIMEDOUT))},e);const a=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(r):c.removeEventListener("abort",r)}),t=null)};t.forEach(c=>c.addEventListener("abort",r));const{signal:l}=i;return l.unsubscribe=()=>Rt.asap(a),l}},dJ=function*(t,e){let n=t.byteLength;if(n{const s=hJ(t,e);let r=0,o,a=l=>{o||(o=!0,i&&i(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await s.next();if(c){a(),l.close();return}let d=u.byteLength;if(n){let h=r+=d;n(h)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},fI=64*1024,{isFunction:j1}=Rt,pJ=(({Request:t,Response:e})=>({Request:t,Response:e}))(Rt.global),{ReadableStream:pI,TextEncoder:mI}=Rt.global,gI=(t,...e)=>{try{return!!t(...e)}catch{return!1}},mJ=t=>{t=Rt.merge.call({skipUndefined:!0},pJ,t);const{fetch:e,Request:n,Response:i}=t,s=e?j1(e):typeof fetch=="function",r=j1(n),o=j1(i);if(!s)return!1;const a=s&&j1(pI),l=s&&(typeof mI=="function"?(p=>m=>p.encode(m))(new mI):async p=>new Uint8Array(await new n(p).arrayBuffer())),c=r&&a&&gI(()=>{let p=!1;const m=new n(yo.origin,{body:new pI,method:"POST",get duplex(){return p=!0,"half"}}).headers.has("Content-Type");return p&&!m}),u=o&&a&&gI(()=>Rt.isReadableStream(new i("").body)),d={stream:u&&(p=>p.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(p=>{!d[p]&&(d[p]=(m,b)=>{let g=m&&m[p];if(g)return g.call(m);throw new Pi(`Response type '${p}' is not supported`,Pi.ERR_NOT_SUPPORT,b)})});const h=async p=>{if(p==null)return 0;if(Rt.isBlob(p))return p.size;if(Rt.isSpecCompliantForm(p))return(await new n(yo.origin,{method:"POST",body:p}).arrayBuffer()).byteLength;if(Rt.isArrayBufferView(p)||Rt.isArrayBuffer(p))return p.byteLength;if(Rt.isURLSearchParams(p)&&(p=p+""),Rt.isString(p))return(await l(p)).byteLength},f=async(p,m)=>{const b=Rt.toFiniteNumber(p.getContentLength());return b??h(m)};return async p=>{let{url:m,method:b,data:g,signal:x,cancelToken:S,timeout:_,onDownloadProgress:E,onUploadProgress:T,responseType:A,headers:I,withCredentials:P="same-origin",fetchOptions:k}=PF(p),B=e||fetch;A=A?(A+"").toLowerCase():"text";let R=uJ([x,S&&S.toAbortSignal()],_),H=null;const q=R&&R.unsubscribe&&(()=>{R.unsubscribe()});let oe;try{if(T&&c&&b!=="get"&&b!=="head"&&(oe=await f(I,g))!==0){let Q=new n(m,{method:"POST",body:g,duplex:"half"}),ie;if(Rt.isFormData(g)&&(ie=Q.headers.get("content-type"))&&I.setContentType(ie),Q.body){const[ne,ce]=cI(oe,Kw(uI(T)));g=hI(Q.body,fI,ne,ce)}}Rt.isString(P)||(P=P?"include":"omit");const Z=r&&"credentials"in n.prototype,V={...k,signal:R,method:b.toUpperCase(),headers:I.normalize().toJSON(),body:g,duplex:"half",credentials:Z?P:void 0};H=r&&new n(m,V);let D=await(r?B(H,k):B(m,V));const K=u&&(A==="stream"||A==="response");if(u&&(E||K&&q)){const Q={};["status","statusText","headers"].forEach(ae=>{Q[ae]=D[ae]});const ie=Rt.toFiniteNumber(D.headers.get("content-length")),[ne,ce]=E&&cI(ie,Kw(uI(E),!0))||[];D=new i(hI(D.body,fI,ne,()=>{ce&&ce(),q&&q()}),Q)}A=A||"text";let W=await d[Rt.findKey(d,A)||"text"](D,p);return!K&&q&&q(),await new Promise((Q,ie)=>{AF(Q,ie,{data:W,headers:ha.from(D.headers),status:D.status,statusText:D.statusText,config:p,request:H})})}catch(Z){throw q&&q(),Z&&Z.name==="TypeError"&&/Load failed|fetch/i.test(Z.message)?Object.assign(new Pi("Network Error",Pi.ERR_NETWORK,p,H),{cause:Z.cause||Z}):Pi.from(Z,Z&&Z.code,p,H)}}},gJ=new Map,LF=t=>{let e=t&&t.env||{};const{fetch:n,Request:i,Response:s}=e,r=[i,s,n];let o=r.length,a=o,l,c,u=gJ;for(;a--;)l=r[a],c=u.get(l),c===void 0&&u.set(l,c=a?new Map:mJ(e)),u=c;return c};LF();const RA={http:RZ,xhr:cJ,fetch:{get:LF}};Rt.forEach(RA,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const vI=t=>`- ${t}`,vJ=t=>Rt.isFunction(t)||t===null||t===!1;function yJ(t,e){t=Rt.isArray(t)?t:[t];const{length:n}=t;let i,s;const r={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : `+o.map(vI).join(` `):" "+vI(o[0]):"as no adapter specified";throw new Pi("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return s}const IF={getAdapter:yJ,adapters:RA};function VS(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Og(null,t)}function yI(t){return VS(t),t.headers=ha.from(t.headers),t.data=$S.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),IF.getAdapter(t.adapter||By.adapter,t)(t).then(function(i){return VS(t),i.data=$S.call(t,t.transformResponse,i),i.headers=ha.from(i.headers),i},function(i){return MF(i)||(VS(t),i&&i.response&&(i.response.data=$S.call(t,t.transformResponse,i.response),i.response.headers=ha.from(i.response.headers))),Promise.reject(i)})}const RF="1.13.2",vx={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{vx[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const bI={};vx.transitional=function(e,n,i){function s(r,o){return"[Axios v"+RF+"] Transitional option '"+r+"'"+o+(i?". "+i:"")}return(r,o,a)=>{if(e===!1)throw new Pi(s(o," has been removed"+(n?" in "+n:"")),Pi.ERR_DEPRECATED);return n&&!bI[o]&&(bI[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(r,o,a):!0}};vx.spelling=function(e){return(n,i)=>(console.warn(`${i} is likely a misspelling of ${e}`),!0)};function bJ(t,e,n){if(typeof t!="object")throw new Pi("options must be an object",Pi.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let s=i.length;for(;s-- >0;){const r=i[s],o=e[r];if(o){const a=t[r],l=a===void 0||o(a,r,t);if(l!==!0)throw new Pi("option "+r+" must be "+l,Pi.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Pi("Unknown option "+r,Pi.ERR_BAD_OPTION)}}const z_={assertOptions:bJ,validators:vx},fc=z_.validators;let Df=class{constructor(e){this.defaults=e||{},this.interceptors={request:new aI,response:new aI}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const r=s.stack?s.stack.replace(/^.+\n/,""):"";try{i.stack?r&&!String(i.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(i.stack+=` `+r):i.stack=r}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Gf(this.defaults,n);const{transitional:i,paramsSerializer:s,headers:r}=n;i!==void 0&&z_.assertOptions(i,{silentJSONParsing:fc.transitional(fc.boolean),forcedJSONParsing:fc.transitional(fc.boolean),clarifyTimeoutError:fc.transitional(fc.boolean)},!1),s!=null&&(Rt.isFunction(s)?n.paramsSerializer={serialize:s}:z_.assertOptions(s,{encode:fc.function,serialize:fc.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),z_.assertOptions(n,{baseUrl:fc.spelling("baseURL"),withXsrfToken:fc.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=r&&Rt.merge(r.common,r[n.method]);r&&Rt.forEach(["delete","get","head","post","put","patch","common"],p=>{delete r[p]}),n.headers=ha.concat(o,r);const a=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,a.unshift(m.fulfilled,m.rejected))});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let u,d=0,h;if(!l){const p=[yI.bind(this),void 0];for(p.unshift(...a),p.push(...c),h=p.length,u=Promise.resolve(n);d{if(!i._listeners)return;let r=i._listeners.length;for(;r-- >0;)i._listeners[r](s);i._listeners=null}),this.promise.then=s=>{let r;const o=new Promise(a=>{i.subscribe(a),r=a}).then(s);return o.cancel=function(){i.unsubscribe(r)},o},e(function(r,o,a){i.reason||(i.reason=new Og(r,o,a),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new OF(function(s){e=s}),cancel:e}}};function wJ(t){return function(n){return t.apply(null,n)}}function xJ(t){return Rt.isObject(t)&&t.isAxiosError===!0}const gT={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(gT).forEach(([t,e])=>{gT[e]=t});function DF(t){const e=new Df(t),n=hF(Df.prototype.request,e);return Rt.extend(n,Df.prototype,e,{allOwnKeys:!0}),Rt.extend(n,e,null,{allOwnKeys:!0}),n.create=function(s){return DF(Gf(t,s))},n}const rr=DF(By);rr.Axios=Df;rr.CanceledError=Og;rr.CancelToken=_J;rr.isCancel=MF;rr.VERSION=RF;rr.toFormData=gx;rr.AxiosError=Pi;rr.Cancel=rr.CanceledError;rr.all=function(e){return Promise.all(e)};rr.spread=wJ;rr.isAxiosError=xJ;rr.mergeConfig=Gf;rr.AxiosHeaders=ha;rr.formToJSON=t=>TF(Rt.isHTMLForm(t)?new FormData(t):t);rr.getAdapter=IF.getAdapter;rr.HttpStatusCode=gT;rr.default=rr;const{Axios:oJe,AxiosError:aJe,CanceledError:lJe,isCancel:cJe,CancelToken:uJe,VERSION:dJe,all:hJe,Cancel:fJe,isAxiosError:pJe,spread:mJe,toFormData:gJe,AxiosHeaders:vJe,HttpStatusCode:yJe,formToJSON:bJe,getAdapter:_Je,mergeConfig:wJe}=rr,Mp="cad2map:",SJ=1440*60*1e3,_I={get(t,e){try{const n=localStorage.getItem(Mp+t);return n===null?e:JSON.parse(n)}catch{return console.warn(`Failed to parse localStorage key: ${t}`),e}},set(t,e){try{localStorage.setItem(Mp+t,JSON.stringify(e))}catch(n){console.error(`Failed to save to localStorage key: ${t}`,n)}},remove(t){localStorage.removeItem(Mp+t)},getSettings(){return this.get("settings",{measureUnits:{distance:"m",area:"m2"},measureStyles:{lineColor:"#2563eb",lineWeight:4,areaColor:"#16a34a",areaFillOpacity:.35,areaWeight:3,showDistanceLabels:!0},downloadSettings:{max_concurrent:5,timeout:10,current_source:"esri_satellite",api_keys:{}},theme:"system"})},saveSettings(t){const e=this.getSettings();this.set("settings",{...e,...t})},updateSetting(t,e){const n=this.getSettings();n[t]=e,this.set("settings",n)},getCachedProvinces(){const t=this.get("provinces",null);return t?Date.now()>t.expiresAt?(this.remove("provinces"),null):t.data:null},cacheProvinces(t){const e=Date.now();this.set("provinces",{data:t,cachedAt:e,expiresAt:e+SJ})},clearProvincesCache(){this.remove("provinces")},getLastProvince(){return this.get("lastProvince",null)},setLastProvince(t){this.set("lastProvince",t)},getLastCoordinateSystem(){return this.get("lastCoordSystem","vn2000")},setLastCoordinateSystem(t){this.set("lastCoordSystem",t)},getApiKey(t){return this.get("apiKeys",{})[t]||null},setApiKey(t,e){const n=this.get("apiKeys",{});n[t]=e,this.set("apiKeys",n)},removeApiKey(t){const e=this.get("apiKeys",{});delete e[t],this.set("apiKeys",e)},clearAll(){const t=[];for(let e=0;elocalStorage.removeItem(e))},exportSettings(){const t={};for(let e=0;e{const n=indexedDB.open(EJ,CJ);n.onerror=()=>{console.error("IndexedDB error:",n.error),e(n.error)},n.onsuccess=()=>{K1=n.result,t(K1)},n.onupgradeneeded=i=>{const s=i.target.result;if(!s.objectStoreNames.contains("dxfFiles")){const r=s.createObjectStore("dxfFiles",{keyPath:"id"});r.createIndex("filename","filename",{unique:!1}),r.createIndex("uploadDate","uploadDate",{unique:!1})}s.objectStoreNames.contains("geoJsonResults")||s.createObjectStore("geoJsonResults",{keyPath:"fileId"}).createIndex("convertedDate","convertedDate",{unique:!1}),s.objectStoreNames.contains("fileHistory")||s.createObjectStore("fileHistory",{keyPath:"fileId"}).createIndex("lastAccessed","lastAccessed",{unique:!1})}})}const pc={async saveDxfFile(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("dxfFiles","readwrite").objectStore("dxfFiles").put(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async getDxfFile(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("dxfFiles","readonly").objectStore("dxfFiles").get(t);o.onsuccess=()=>n(o.result),o.onerror=()=>i(o.error)})},async getAllDxfFiles(){const t=await Wa();return new Promise((e,n)=>{const r=t.transaction("dxfFiles","readonly").objectStore("dxfFiles").getAll();r.onsuccess=()=>e(r.result||[]),r.onerror=()=>n(r.error)})},async deleteDxfFile(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("dxfFiles","readwrite").objectStore("dxfFiles").delete(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async getDxfFileAsBlob(t){const e=await this.getDxfFile(t);return!e||!e.rawContent?null:new Blob([e.rawContent],{type:"application/dxf"})},async saveGeoJSON(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("geoJsonResults","readwrite").objectStore("geoJsonResults").put(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async getGeoJSON(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("geoJsonResults","readonly").objectStore("geoJsonResults").get(t);o.onsuccess=()=>n(o.result),o.onerror=()=>i(o.error)})},async getAllGeoJSON(){const t=await Wa();return new Promise((e,n)=>{const r=t.transaction("geoJsonResults","readonly").objectStore("geoJsonResults").getAll();r.onsuccess=()=>e(r.result||[]),r.onerror=()=>n(r.error)})},async deleteGeoJSON(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("geoJsonResults","readwrite").objectStore("geoJsonResults").delete(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async updateHistory(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("fileHistory","readwrite").objectStore("fileHistory").put(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async getHistory(t=20){const e=await Wa();return new Promise((n,i)=>{const a=e.transaction("fileHistory","readonly").objectStore("fileHistory").index("lastAccessed").getAll(null,t);a.onsuccess=()=>{const l=(a.result||[]).sort((c,u)=>new Date(u.lastAccessed).getTime()-new Date(c.lastAccessed).getTime());n(l)},a.onerror=()=>i(a.error)})},async deleteHistoryEntry(t){const e=await Wa();return new Promise((n,i)=>{const o=e.transaction("fileHistory","readwrite").objectStore("fileHistory").delete(t);o.onsuccess=()=>n(),o.onerror=()=>i(o.error)})},async clearAll(){const t=await Wa(),e=["dxfFiles","geoJsonResults","fileHistory"];for(const n of e)await new Promise((i,s)=>{const a=t.transaction(n,"readwrite").objectStore(n).clear();a.onsuccess=()=>i(),a.onerror=()=>s(a.error)})},async getStorageStats(){const t=await this.getAllDxfFiles(),e=await this.getAllGeoJSON(),n=await this.getHistory(1e3);let i=0;for(const s of t)i+=s.rawContent?.byteLength||0,i+=JSON.stringify(s).length;for(const s of e)i+=JSON.stringify(s.geoJson).length;return{totalFiles:t.length,totalGeoJSON:e.length,historyCount:n.length,estimatedSizeMB:Math.round(i/(1024*1024)*100)/100}},async deleteFileComplete(t){await this.deleteDxfFile(t),await this.deleteGeoJSON(t),await this.deleteHistoryEntry(t)}},Tr=rr.create({baseURL:Ll.API_URL,timeout:3e4});function Vr(t){let e="An error occurred";if(t.response){const n=t.response.data;e=n?.message??n?.detail??t.message}else t.request?e="No response from server":e=t.message;throw console.error("API Error:",e),new Error(e)}function Dg(){async function t(H){const q=new FormData;q.append("file",H);try{return(await Tr.post("/upload",q,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(oe){return Vr(oe)}}async function e(H=!1){if(!H){const q=_I.getCachedProvinces();if(q)return console.log("Using cached provinces"),q}try{const q=await Tr.get("/provinces");return _I.cacheProvinces(q.data.map(oe=>({name:oe.name,code:oe.code,meridian:oe.meridian??0,meridian_display:oe.meridian_display??""}))),q.data}catch(q){return Vr(q)}}async function n(H){try{return(await Tr.post("/convert",H)).data}catch(q){return Vr(q)}}async function i(H,q){try{return(await Tr.get("/export",{params:{file_id:H,format:q},responseType:"blob"})).data}catch(oe){return Vr(oe)}}async function s(H){try{return(await Tr.post("/create_overlay",H)).data}catch(q){return Vr(q)}}async function r(H,q,oe,Z,V,D="vn2000",K,W=!1){const Q=new FormData;Q.append("file",H,q),Q.append("min_lat",oe.min_lat.toString()),Q.append("max_lat",oe.max_lat.toString()),Q.append("min_lng",oe.min_lng.toString()),Q.append("max_lng",oe.max_lng.toString()),Q.append("zoom",Z.toString()),V&&Q.append("source",V),Q.append("coordinate_system",D),K&&Q.append("province",K),Q.append("swap_xy",W.toString());try{return(await Tr.post("/create_overlay_stateless",Q,{headers:{"Content-Type":"multipart/form-data"}})).data}catch(ie){return Vr(ie)}}async function o(H,q,oe,Z,V,D="vn2000",K,W=!1){const Q=new FormData;Q.append("file",H,q),Q.append("min_lat",oe.min_lat.toString()),Q.append("max_lat",oe.max_lat.toString()),Q.append("min_lng",oe.min_lng.toString()),Q.append("max_lng",oe.max_lng.toString()),Q.append("zoom",Z.toString()),V&&Q.append("source",V),Q.append("coordinate_system",D),K&&Q.append("province",K),Q.append("swap_xy",W.toString());try{return(await Tr.post("/overlay_direct",Q,{headers:{"Content-Type":"multipart/form-data"},responseType:"blob",timeout:3e5})).data}catch(ie){return Vr(ie)}}async function a(H){try{return(await Tr.get(`/task/${H}`)).data}catch(q){return Vr(q)}}function l(H){return`${Ll.API_URL}/task_image/${H}`}async function c(H){try{return(await Tr.get(`/download_overlay/${H}`,{responseType:"blob"})).data}catch(q){return Vr(q)}}async function u(){try{await Tr.post("/system/reset",{})}catch(H){return Vr(H)}}async function d(){try{return await Tr.get("/health"),!0}catch{return!1}}async function h(){return(await pc.getAllDxfFiles()).map(q=>({file_id:q.id,filename:q.filename,upload_date:q.uploadDate.toISOString(),size_kb:Math.round(q.size/1024),layer_count:q.layers?.length??0}))}async function f(H){await pc.deleteFileComplete(H)}async function p(){const H=await pc.getStorageStats();return{total_files:H.totalFiles,total_size_mb:H.estimatedSizeMB}}async function m(H){await pc.saveDxfFile(H),await pc.updateHistory({fileId:H.id,filename:H.filename,lastAccessed:new Date})}async function b(H,q,oe,Z,V){await pc.saveGeoJSON({fileId:H,filename:q,geoJson:oe,convertedDate:new Date,province:Z,coordinateSystem:V}),await pc.updateHistory({fileId:H,filename:q,lastAccessed:new Date,province:Z,coordinateSystem:V})}async function g(H){return pc.getGeoJSON(H)}async function x(H=20){return pc.getHistory(H)}async function S(H){return pc.getDxfFileAsBlob(H)}async function _(H){try{const oe=(await Tr.get(`/files/${H}`)).data,Z=oe.conversion_history?.[0];return{file_id:oe.id,filename:oe.original_filename,layers:oe.file_metadata?.layers?.map(V=>({name:V.name,entity_count:V.entity_count,color:V.color}))??[],last_conversion:Z?{coordinate_system:Z.coordinate_system,province:Z.province}:void 0}}catch(q){return Vr(q)}}async function E(H){try{return(await Tr.post(`/files/${H}/load`,{})).data}catch(q){return Vr(q)}}async function T(){try{return(await Tr.get("/download/settings")).data}catch(H){return Vr(H)}}async function A(H){try{return(await Tr.post("/download/settings",H)).data}catch(q){return Vr(q)}}async function I(){try{return(await Tr.get("/download/sources")).data}catch(H){return Vr(H)}}async function P(){try{return(await Tr.get("/measure/settings")).data}catch(H){return Vr(H)}}async function k(H){try{return(await Tr.post("/measure/settings",H)).data}catch(q){return Vr(q)}}async function B(){try{return(await Tr.post("/measure/settings/reset",{})).data}catch(H){return Vr(H)}}function R(H){return`${window.location.origin}${Ll.API_URL}/files/${H}/raw`}return{uploadFile:t,getStoredFiles:h,deleteFile:f,getStorageStats:p,saveFileToClientStorage:m,saveGeoJSONToClientStorage:b,getGeoJSONFromClientStorage:g,getFileHistory:x,getFileInfo:_,loadFileFromStorage:E,getProvinces:e,convertCoordinates:n,exportFile:i,requestOverlay:s,requestOverlayStateless:r,requestOverlayDirect:o,getDxfBlobFromStorage:S,getOverlayStatus:a,getOverlayPreviewUrl:l,downloadOverlay:c,resetSystem:u,checkHealth:d,getDownloadSettings:T,updateDownloadSettings:A,getMapSources:I,getMeasureSettings:P,updateMeasureSettings:k,resetMeasureSettings:B,getDxfFileUrl:R}}function ud(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zv={exports:{}};var TJ=zv.exports,wI;function MJ(){return wI||(wI=1,(function(t,e){(function(n,i){i(e)})(TJ,(function(n){var i="1.9.4";function s(y){var C,N,Y,me;for(N=1,Y=arguments.length;N"u"||!L||!L.Mixin)){y=S(y)?y:[y];for(var C=0;C0?Math.floor(y):Math.ceil(y)};D.prototype={clone:function(){return new D(this.x,this.y)},add:function(y){return this.clone()._add(W(y))},_add:function(y){return this.x+=y.x,this.y+=y.y,this},subtract:function(y){return this.clone()._subtract(W(y))},_subtract:function(y){return this.x-=y.x,this.y-=y.y,this},divideBy:function(y){return this.clone()._divideBy(y)},_divideBy:function(y){return this.x/=y,this.y/=y,this},multiplyBy:function(y){return this.clone()._multiplyBy(y)},_multiplyBy:function(y){return this.x*=y,this.y*=y,this},scaleBy:function(y){return new D(this.x*y.x,this.y*y.y)},unscaleBy:function(y){return new D(this.x/y.x,this.y/y.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=K(this.x),this.y=K(this.y),this},distanceTo:function(y){y=W(y);var C=y.x-this.x,N=y.y-this.y;return Math.sqrt(C*C+N*N)},equals:function(y){return y=W(y),y.x===this.x&&y.y===this.y},contains:function(y){return y=W(y),Math.abs(y.x)<=Math.abs(this.x)&&Math.abs(y.y)<=Math.abs(this.y)},toString:function(){return"Point("+h(this.x)+", "+h(this.y)+")"}};function W(y,C,N){return y instanceof D?y:S(y)?new D(y[0],y[1]):y==null?y:typeof y=="object"&&"x"in y&&"y"in y?new D(y.x,y.y):new D(y,C,N)}function Q(y,C){if(y)for(var N=C?[y,C]:y,Y=0,me=N.length;Y=this.min.x&&N.x<=this.max.x&&C.y>=this.min.y&&N.y<=this.max.y},intersects:function(y){y=ie(y);var C=this.min,N=this.max,Y=y.min,me=y.max,Pe=me.x>=C.x&&Y.x<=N.x,st=me.y>=C.y&&Y.y<=N.y;return Pe&&st},overlaps:function(y){y=ie(y);var C=this.min,N=this.max,Y=y.min,me=y.max,Pe=me.x>C.x&&Y.xC.y&&Y.y=C.lat&&me.lat<=N.lat&&Y.lng>=C.lng&&me.lng<=N.lng},intersects:function(y){y=ce(y);var C=this._southWest,N=this._northEast,Y=y.getSouthWest(),me=y.getNorthEast(),Pe=me.lat>=C.lat&&Y.lat<=N.lat,st=me.lng>=C.lng&&Y.lng<=N.lng;return Pe&&st},overlaps:function(y){y=ce(y);var C=this._southWest,N=this._northEast,Y=y.getSouthWest(),me=y.getNorthEast(),Pe=me.lat>C.lat&&Y.latC.lng&&Y.lng1,Tt=(function(){var y=!1;try{var C=Object.defineProperty({},"passive",{get:function(){y=!0}});window.addEventListener("testPassiveEventSupport",d,C),window.removeEventListener("testPassiveEventSupport",d,C)}catch{}return y})(),rt=(function(){return!!document.createElement("canvas").getContext})(),jt=!!(document.createElementNS&&Qe("svg").createSVGRect),Di=!!jt&&(function(){var y=document.createElement("div");return y.innerHTML="",(y.firstChild&&y.firstChild.namespaceURI)==="http://www.w3.org/2000/svg"})(),ms=!jt&&(function(){try{var y=document.createElement("div");y.innerHTML='';var C=y.firstChild;return C.style.behavior="url(#default#VML)",C&&typeof C.adj=="object"}catch{return!1}})(),pe=navigator.platform.indexOf("Mac")===0,Qn=navigator.platform.indexOf("Linux")===0;function gs(y){return navigator.userAgent.toLowerCase().indexOf(y)>=0}var An={ie:j,ielt9:he,edge:be,webkit:re,android:le,android23:Ce,androidStock:Oe,opera:Ge,chrome:$e,gecko:ot,safari:dt,phantom:Jt,opera12:at,win:Mt,ie3d:Bt,webkit3d:$t,gecko3d:Ze,any3d:vt,mobile:qe,mobileWebkit:kt,mobileWebkit3d:Je,msPointer:Ft,pointer:Ne,touch:ut,touchNative:et,mobileOpera:Qt,mobileGecko:Cn,retina:ei,passiveEvents:Tt,canvas:rt,svg:jt,vml:ms,inlineSvg:Di,mac:pe,linux:Qn},ts=An.msPointer?"MSPointerDown":"pointerdown",Ur=An.msPointer?"MSPointerMove":"pointermove",lt=An.msPointer?"MSPointerUp":"pointerup",Un=An.msPointer?"MSPointerCancel":"pointercancel",Yn={touchstart:ts,touchmove:Ur,touchend:lt,touchcancel:Un},ii={touchstart:St,touchmove:bt,touchend:bt,touchcancel:bt},di={},mt=!1;function on(y,C,N){return C==="touchstart"&&tt(),ii[C]?(N=ii[C].bind(this,N),y.addEventListener(Yn[C],N,!1),N):(console.warn("wrong event specified:",C),d)}function ln(y,C,N){if(!Yn[C]){console.warn("wrong event specified:",C);return}y.removeEventListener(Yn[C],N,!1)}function Ci(y){di[y.pointerId]=y}function ji(y){di[y.pointerId]&&(di[y.pointerId]=y)}function Ie(y){delete di[y.pointerId]}function tt(){mt||(document.addEventListener(ts,Ci,!0),document.addEventListener(Ur,ji,!0),document.addEventListener(lt,Ie,!0),document.addEventListener(Un,Ie,!0),mt=!0)}function bt(y,C){if(C.pointerType!==(C.MSPOINTER_TYPE_MOUSE||"mouse")){C.touches=[];for(var N in di)C.touches.push(di[N]);C.changedTouches=[C],y(C)}}function St(y,C){C.MSPOINTER_TYPE_TOUCH&&C.pointerType===C.MSPOINTER_TYPE_TOUCH&&hn(C),bt(y,C)}function ft(y){var C={},N,Y;for(Y in y)N=y[Y],C[Y]=N&&N.bind?N.bind(y):N;return y=C,C.type="dblclick",C.detail=2,C.isTrusted=!1,C._simulated=!0,C}var nn=200;function Ye(y,C){y.addEventListener("dblclick",C);var N=0,Y;function me(Pe){if(Pe.detail!==1){Y=Pe.detail;return}if(!(Pe.pointerType==="mouse"||Pe.sourceCapabilities&&!Pe.sourceCapabilities.firesTouchEvents)){var st=en(Pe);if(!(st.some(function(It){return It instanceof HTMLLabelElement&&It.attributes.for})&&!st.some(function(It){return It instanceof HTMLInputElement||It instanceof HTMLSelectElement}))){var wt=Date.now();wt-N<=nn?(Y++,Y===2&&C(ft(Pe))):Y=1,N=wt}}}return y.addEventListener("click",me),{dblclick:C,simDblclick:me}}function Et(y,C){y.removeEventListener("dblclick",C.dblclick),y.removeEventListener("click",C.simDblclick)}var Ot=pr(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),Wt=pr(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),Rn=Wt==="webkitTransition"||Wt==="OTransition"?Wt+"End":"transitionend";function Ln(y){return typeof y=="string"?document.getElementById(y):y}function oi(y,C){var N=y.style[C]||y.currentStyle&&y.currentStyle[C];if((!N||N==="auto")&&document.defaultView){var Y=document.defaultView.getComputedStyle(y,null);N=Y?Y[C]:null}return N==="auto"?null:N}function In(y,C,N){var Y=document.createElement(y);return Y.className=C||"",N&&N.appendChild(Y),Y}function ai(y){var C=y.parentNode;C&&C.removeChild(y)}function Ji(y){for(;y.firstChild;)y.removeChild(y.firstChild)}function vi(y){var C=y.parentNode;C&&C.lastChild!==y&&C.appendChild(y)}function Nn(y){var C=y.parentNode;C&&C.firstChild!==y&&C.insertBefore(y,C.firstChild)}function Ps(y,C){if(y.classList!==void 0)return y.classList.contains(C);var N=fr(y);return N.length>0&&new RegExp("(^|\\s)"+C+"(\\s|$)").test(N)}function On(y,C){if(y.classList!==void 0)for(var N=p(C),Y=0,me=N.length;Y0?2*window.devicePixelRatio:1;function Vn(y){return An.edge?y.wheelDeltaY/2:y.deltaY&&y.deltaMode===0?-y.deltaY/zn:y.deltaY&&y.deltaMode===1?-y.deltaY*20:y.deltaY&&y.deltaMode===2?-y.deltaY*60:y.deltaX||y.deltaZ?0:y.wheelDelta?(y.wheelDeltaY||y.wheelDelta)/2:y.detail&&Math.abs(y.detail)<32765?-y.detail*20:y.detail?y.detail/-32765*60:0}function qn(y,C){var N=C.relatedTarget;if(!N)return!0;try{for(;N&&N!==y;)N=N.parentNode}catch{return!1}return N!==y}var ti={__proto__:null,on:je,off:nt,stopPropagation:Vt,disableScrollPropagation:qt,disableClickPropagation:dn,preventDefault:hn,stop:sn,getPropagationPath:en,getMousePosition:gn,getWheelDelta:Vn,isExternalTarget:qn,addListener:je,removeListener:nt},Zn=V.extend({run:function(y,C,N,Y){this.stop(),this._el=y,this._inProgress=!0,this._duration=N||.25,this._easeOutPower=1/Math.max(Y||.5,.2),this._startPos=Ls(y),this._offset=C.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=B(this._animate,this),this._step()},_step:function(y){var C=+new Date-this._startTime,N=this._duration*1e3;Cthis.options.maxZoom)?this.setZoom(y):this},panInsideBounds:function(y,C){this._enforcingBounds=!0;var N=this.getCenter(),Y=this._limitCenter(N,this._zoom,ce(y));return N.equals(Y)||this.panTo(Y,C),this._enforcingBounds=!1,this},panInside:function(y,C){C=C||{};var N=W(C.paddingTopLeft||C.padding||[0,0]),Y=W(C.paddingBottomRight||C.padding||[0,0]),me=this.project(this.getCenter()),Pe=this.project(y),st=this.getPixelBounds(),wt=ie([st.min.add(N),st.max.subtract(Y)]),It=wt.getSize();if(!wt.contains(Pe)){this._enforcingBounds=!0;var rn=Pe.subtract(wt.getCenter()),Fn=wt.extend(Pe).getSize().subtract(It);me.x+=rn.x<0?-Fn.x:Fn.x,me.y+=rn.y<0?-Fn.y:Fn.y,this.panTo(this.unproject(me),C),this._enforcingBounds=!1}return this},invalidateSize:function(y){if(!this._loaded)return this;y=s({animate:!1,pan:!0},y===!0?{animate:!0}:y);var C=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var N=this.getSize(),Y=C.divideBy(2).round(),me=N.divideBy(2).round(),Pe=Y.subtract(me);return!Pe.x&&!Pe.y?this:(y.animate&&y.pan?this.panBy(Pe):(y.pan&&this._rawPanBy(Pe),this.fire("move"),y.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:C,newSize:N}))},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(y){if(y=this._locateOptions=s({timeout:1e4,watch:!1},y),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var C=o(this._handleGeolocationResponse,this),N=o(this._handleGeolocationError,this);return y.watch?this._locationWatchId=navigator.geolocation.watchPosition(C,N,y):navigator.geolocation.getCurrentPosition(C,N,y),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(y){if(this._container._leaflet_id){var C=y.code,N=y.message||(C===1?"permission denied":C===2?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:C,message:"Geolocation error: "+N+"."})}},_handleGeolocationResponse:function(y){if(this._container._leaflet_id){var C=y.coords.latitude,N=y.coords.longitude,Y=new ae(C,N),me=Y.toBounds(y.coords.accuracy*2),Pe=this._locateOptions;if(Pe.setView){var st=this.getBoundsZoom(me);this.setView(Y,Pe.maxZoom?Math.min(st,Pe.maxZoom):st)}var wt={latlng:Y,bounds:me,timestamp:y.timestamp};for(var It in y.coords)typeof y.coords[It]=="number"&&(wt[It]=y.coords[It]);this.fire("locationfound",wt)}},addHandler:function(y,C){if(!C)return this;var N=this[y]=new C(this);return this._handlers.push(N),this.options[y]&&N.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch{this._container._leaflet_id=void 0,this._containerId=void 0}this._locationWatchId!==void 0&&this.stopLocate(),this._stop(),ai(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(R(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload");var y;for(y in this._layers)this._layers[y].remove();for(y in this._panes)ai(this._panes[y]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(y,C){var N="leaflet-pane"+(y?" leaflet-"+y.replace("Pane","")+"-pane":""),Y=In("div",N,C||this._mapPane);return y&&(this._panes[y]=Y),Y},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var y=this.getPixelBounds(),C=this.unproject(y.getBottomLeft()),N=this.unproject(y.getTopRight());return new ne(C,N)},getMinZoom:function(){return this.options.minZoom===void 0?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return this.options.maxZoom===void 0?this._layersMaxZoom===void 0?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(y,C,N){y=ce(y),N=W(N||[0,0]);var Y=this.getZoom()||0,me=this.getMinZoom(),Pe=this.getMaxZoom(),st=y.getNorthWest(),wt=y.getSouthEast(),It=this.getSize().subtract(N),rn=ie(this.project(wt,Y),this.project(st,Y)).getSize(),Fn=An.any3d?this.options.zoomSnap:1,hi=It.x/rn.x,Ki=It.y/rn.y,Po=C?Math.max(hi,Ki):Math.min(hi,Ki);return Y=this.getScaleZoom(Po,Y),Fn&&(Y=Math.round(Y/(Fn/100))*(Fn/100),Y=C?Math.ceil(Y/Fn)*Fn:Math.floor(Y/Fn)*Fn),Math.max(me,Math.min(Pe,Y))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new D(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(y,C){var N=this._getTopLeftPoint(y,C);return new Q(N,N.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(y){return this.options.crs.getProjectedBounds(y===void 0?this.getZoom():y)},getPane:function(y){return typeof y=="string"?this._panes[y]:y},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(y,C){var N=this.options.crs;return C=C===void 0?this._zoom:C,N.scale(y)/N.scale(C)},getScaleZoom:function(y,C){var N=this.options.crs;C=C===void 0?this._zoom:C;var Y=N.zoom(y*N.scale(C));return isNaN(Y)?1/0:Y},project:function(y,C){return C=C===void 0?this._zoom:C,this.options.crs.latLngToPoint(_e(y),C)},unproject:function(y,C){return C=C===void 0?this._zoom:C,this.options.crs.pointToLatLng(W(y),C)},layerPointToLatLng:function(y){var C=W(y).add(this.getPixelOrigin());return this.unproject(C)},latLngToLayerPoint:function(y){var C=this.project(_e(y))._round();return C._subtract(this.getPixelOrigin())},wrapLatLng:function(y){return this.options.crs.wrapLatLng(_e(y))},wrapLatLngBounds:function(y){return this.options.crs.wrapLatLngBounds(ce(y))},distance:function(y,C){return this.options.crs.distance(_e(y),_e(C))},containerPointToLayerPoint:function(y){return W(y).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(y){return W(y).add(this._getMapPanePos())},containerPointToLatLng:function(y){var C=this.containerPointToLayerPoint(W(y));return this.layerPointToLatLng(C)},latLngToContainerPoint:function(y){return this.layerPointToContainerPoint(this.latLngToLayerPoint(_e(y)))},mouseEventToContainerPoint:function(y){return gn(y,this._container)},mouseEventToLayerPoint:function(y){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(y))},mouseEventToLatLng:function(y){return this.layerPointToLatLng(this.mouseEventToLayerPoint(y))},_initContainer:function(y){var C=this._container=Ln(y);if(C){if(C._leaflet_id)throw new Error("Map container is already initialized.")}else throw new Error("Map container not found.");je(C,"scroll",this._onScroll,this),this._containerId=l(C)},_initLayout:function(){var y=this._container;this._fadeAnimated=this.options.fadeAnimation&&An.any3d,On(y,"leaflet-container"+(An.touch?" leaflet-touch":"")+(An.retina?" leaflet-retina":"")+(An.ielt9?" leaflet-oldie":"")+(An.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var C=oi(y,"position");C!=="absolute"&&C!=="relative"&&C!=="fixed"&&C!=="sticky"&&(y.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var y=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Ni(this._mapPane,new D(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(On(y.markerPane,"leaflet-zoom-hide"),On(y.shadowPane,"leaflet-zoom-hide"))},_resetView:function(y,C,N){Ni(this._mapPane,new D(0,0));var Y=!this._loaded;this._loaded=!0,C=this._limitZoom(C),this.fire("viewprereset");var me=this._zoom!==C;this._moveStart(me,N)._move(y,C)._moveEnd(me),this.fire("viewreset"),Y&&this.fire("load")},_moveStart:function(y,C){return y&&this.fire("zoomstart"),C||this.fire("movestart"),this},_move:function(y,C,N,Y){C===void 0&&(C=this._zoom);var me=this._zoom!==C;return this._zoom=C,this._lastCenter=y,this._pixelOrigin=this._getNewPixelOrigin(y),Y?N&&N.pinch&&this.fire("zoom",N):((me||N&&N.pinch)&&this.fire("zoom",N),this.fire("move",N)),this},_moveEnd:function(y){return y&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return R(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(y){Ni(this._mapPane,this._getMapPanePos().subtract(y))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(y){this._targets={},this._targets[l(this._container)]=this;var C=y?nt:je;C(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&C(window,"resize",this._onResize,this),An.any3d&&this.options.transform3DLimit&&(y?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){R(this._resizeRequest),this._resizeRequest=B(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var y=this._getMapPanePos();Math.max(Math.abs(y.x),Math.abs(y.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(y,C){for(var N=[],Y,me=C==="mouseout"||C==="mouseover",Pe=y.target||y.srcElement,st=!1;Pe;){if(Y=this._targets[l(Pe)],Y&&(C==="click"||C==="preclick")&&this._draggableMoved(Y)){st=!0;break}if(Y&&Y.listens(C,!0)&&(me&&!qn(Pe,y)||(N.push(Y),me))||Pe===this._container)break;Pe=Pe.parentNode}return!N.length&&!st&&!me&&this.listens(C,!0)&&(N=[this]),N},_isClickDisabled:function(y){for(;y&&y!==this._container;){if(y._leaflet_disable_click)return!0;y=y.parentNode}},_handleDOMEvent:function(y){var C=y.target||y.srcElement;if(!(!this._loaded||C._leaflet_disable_events||y.type==="click"&&this._isClickDisabled(C))){var N=y.type;N==="mousedown"&&we(C),this._fireDOMEvent(y,N)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(y,C,N){if(y.type==="click"){var Y=s({},y);Y.type="preclick",this._fireDOMEvent(Y,Y.type,N)}var me=this._findEventTargets(y,C);if(N){for(var Pe=[],st=0;st0?Math.round(y-C)/2:Math.max(0,Math.ceil(y))-Math.max(0,Math.floor(C))},_limitZoom:function(y){var C=this.getMinZoom(),N=this.getMaxZoom(),Y=An.any3d?this.options.zoomSnap:1;return Y&&(y=Math.round(y/Y)*Y),Math.max(C,Math.min(N,y))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){yi(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(y,C){var N=this._getCenterOffset(y)._trunc();return(C&&C.animate)!==!0&&!this.getSize().contains(N)?!1:(this.panBy(N,C),!0)},_createAnimProxy:function(){var y=this._proxy=In("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(y),this.on("zoomanim",function(C){var N=Ot,Y=this._proxy.style[N];Ys(this._proxy,this.project(C.center,C.zoom),this.getZoomScale(C.zoom,1)),Y===this._proxy.style[N]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ai(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var y=this.getCenter(),C=this.getZoom();Ys(this._proxy,this.project(y,C),this.getZoomScale(C,1))},_catchTransitionEnd:function(y){this._animatingZoom&&y.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(y,C,N){if(this._animatingZoom)return!0;if(N=N||{},!this._zoomAnimated||N.animate===!1||this._nothingToAnimate()||Math.abs(C-this._zoom)>this.options.zoomAnimationThreshold)return!1;var Y=this.getZoomScale(C),me=this._getCenterOffset(y)._divideBy(1-1/Y);return N.animate!==!0&&!this.getSize().contains(me)?!1:(B(function(){this._moveStart(!0,N.noMoveStart||!1)._animateZoom(y,C,!0)},this),!0)},_animateZoom:function(y,C,N,Y){this._mapPane&&(N&&(this._animatingZoom=!0,this._animateToCenter=y,this._animateToZoom=C,On(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:y,zoom:C,noUpdate:Y}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&yi(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function Gn(y,C){return new bn(y,C)}var jn=q.extend({options:{position:"topright"},initialize:function(y){m(this,y)},getPosition:function(){return this.options.position},setPosition:function(y){var C=this._map;return C&&C.removeControl(this),this.options.position=y,C&&C.addControl(this),this},getContainer:function(){return this._container},addTo:function(y){this.remove(),this._map=y;var C=this._container=this.onAdd(y),N=this.getPosition(),Y=y._controlCorners[N];return On(C,"leaflet-control"),N.indexOf("bottom")!==-1?Y.insertBefore(C,Y.firstChild):Y.appendChild(C),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ai(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(y){this._map&&y&&y.screenX>0&&y.screenY>0&&this._map.getContainer().focus()}}),fn=function(y){return new jn(y)};bn.include({addControl:function(y){return y.addTo(this),this},removeControl:function(y){return y.remove(),this},_initControlPos:function(){var y=this._controlCorners={},C="leaflet-",N=this._controlContainer=In("div",C+"control-container",this._container);function Y(me,Pe){var st=C+me+" "+C+Pe;y[me+Pe]=In("div",st,N)}Y("top","left"),Y("top","right"),Y("bottom","left"),Y("bottom","right")},_clearControlPos:function(){for(var y in this._controlCorners)ai(this._controlCorners[y]);ai(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var li=jn.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(y,C,N,Y){return N1,this._baseLayersList.style.display=y?"":"none"),this._separator.style.display=C&&y?"":"none",this},_onLayerChange:function(y){this._handlingClick||this._update();var C=this._getLayer(l(y.target)),N=C.overlay?y.type==="add"?"overlayadd":"overlayremove":y.type==="add"?"baselayerchange":null;N&&this._map.fire(N,C)},_createRadioElement:function(y,C){var N='",Y=document.createElement("div");return Y.innerHTML=N,Y.firstChild},_addItem:function(y){var C=document.createElement("label"),N=this._map.hasLayer(y.layer),Y;y.overlay?(Y=document.createElement("input"),Y.type="checkbox",Y.className="leaflet-control-layers-selector",Y.defaultChecked=N):Y=this._createRadioElement("leaflet-base-layers_"+l(this),N),this._layerControlInputs.push(Y),Y.layerId=l(y.layer),je(Y,"click",this._onInputClick,this);var me=document.createElement("span");me.innerHTML=" "+y.name;var Pe=document.createElement("span");C.appendChild(Pe),Pe.appendChild(Y),Pe.appendChild(me);var st=y.overlay?this._overlaysList:this._baseLayersList;return st.appendChild(C),this._checkDisabledLayers(),C},_onInputClick:function(){if(!this._preventClick){var y=this._layerControlInputs,C,N,Y=[],me=[];this._handlingClick=!0;for(var Pe=y.length-1;Pe>=0;Pe--)C=y[Pe],N=this._getLayer(C.layerId).layer,C.checked?Y.push(N):C.checked||me.push(N);for(Pe=0;Pe=0;me--)C=y[me],N=this._getLayer(C.layerId).layer,C.disabled=N.options.minZoom!==void 0&&YN.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var y=this._section;this._preventClick=!0,je(y,"click",hn),this.expand();var C=this;setTimeout(function(){nt(y,"click",hn),C._preventClick=!1})}}),Bi=function(y,C,N){return new li(y,C,N)},hs=jn.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(y){var C="leaflet-control-zoom",N=In("div",C+" leaflet-bar"),Y=this.options;return this._zoomInButton=this._createButton(Y.zoomInText,Y.zoomInTitle,C+"-in",N,this._zoomIn),this._zoomOutButton=this._createButton(Y.zoomOutText,Y.zoomOutTitle,C+"-out",N,this._zoomOut),this._updateDisabled(),y.on("zoomend zoomlevelschange",this._updateDisabled,this),N},onRemove:function(y){y.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(y){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(y.shiftKey?3:1))},_createButton:function(y,C,N,Y,me){var Pe=In("a",N,Y);return Pe.innerHTML=y,Pe.href="#",Pe.title=C,Pe.setAttribute("role","button"),Pe.setAttribute("aria-label",C),dn(Pe),je(Pe,"click",sn),je(Pe,"click",me,this),je(Pe,"click",this._refocusOnMap,this),Pe},_updateDisabled:function(){var y=this._map,C="leaflet-disabled";yi(this._zoomInButton,C),yi(this._zoomOutButton,C),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||y._zoom===y.getMinZoom())&&(On(this._zoomOutButton,C),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||y._zoom===y.getMaxZoom())&&(On(this._zoomInButton,C),this._zoomInButton.setAttribute("aria-disabled","true"))}});bn.mergeOptions({zoomControl:!0}),bn.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new hs,this.addControl(this.zoomControl))});var Os=function(y){return new hs(y)},ns=jn.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(y){var C="leaflet-control-scale",N=In("div",C),Y=this.options;return this._addScales(Y,C+"-line",N),y.on(Y.updateWhenIdle?"moveend":"move",this._update,this),y.whenReady(this._update,this),N},onRemove:function(y){y.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(y,C,N){y.metric&&(this._mScale=In("div",C,N)),y.imperial&&(this._iScale=In("div",C,N))},_update:function(){var y=this._map,C=y.getSize().y/2,N=y.distance(y.containerPointToLatLng([0,C]),y.containerPointToLatLng([this.options.maxWidth,C]));this._updateScales(N)},_updateScales:function(y){this.options.metric&&y&&this._updateMetric(y),this.options.imperial&&y&&this._updateImperial(y)},_updateMetric:function(y){var C=this._getRoundNum(y),N=C<1e3?C+" m":C/1e3+" km";this._updateScale(this._mScale,N,C/y)},_updateImperial:function(y){var C=y*3.2808399,N,Y,me;C>5280?(N=C/5280,Y=this._getRoundNum(N),this._updateScale(this._iScale,Y+" mi",Y/N)):(me=this._getRoundNum(C),this._updateScale(this._iScale,me+" ft",me/C))},_updateScale:function(y,C,N){y.style.width=Math.round(this.options.maxWidth*N)+"px",y.innerHTML=C},_getRoundNum:function(y){var C=Math.pow(10,(Math.floor(y)+"").length-1),N=y/C;return N=N>=10?10:N>=5?5:N>=3?3:N>=2?2:1,C*N}}),Bs=function(y){return new ns(y)},to='',no=jn.extend({options:{position:"bottomright",prefix:''+(An.inlineSvg?to+" ":"")+"Leaflet"},initialize:function(y){m(this,y),this._attributions={}},onAdd:function(y){y.attributionControl=this,this._container=In("div","leaflet-control-attribution"),dn(this._container);for(var C in y._layers)y._layers[C].getAttribution&&this.addAttribution(y._layers[C].getAttribution());return this._update(),y.on("layeradd",this._addAttribution,this),this._container},onRemove:function(y){y.off("layeradd",this._addAttribution,this)},_addAttribution:function(y){y.layer.getAttribution&&(this.addAttribution(y.layer.getAttribution()),y.layer.once("remove",function(){this.removeAttribution(y.layer.getAttribution())},this))},setPrefix:function(y){return this.options.prefix=y,this._update(),this},addAttribution:function(y){return y?(this._attributions[y]||(this._attributions[y]=0),this._attributions[y]++,this._update(),this):this},removeAttribution:function(y){return y?(this._attributions[y]&&(this._attributions[y]--,this._update()),this):this},_update:function(){if(this._map){var y=[];for(var C in this._attributions)this._attributions[C]&&y.push(C);var N=[];this.options.prefix&&N.push(this.options.prefix),y.length&&N.push(y.join(", ")),this._container.innerHTML=N.join(' ')}}});bn.mergeOptions({attributionControl:!0}),bn.addInitHook(function(){this.options.attributionControl&&new no().addTo(this)});var qr=function(y){return new no(y)};jn.Layers=li,jn.Zoom=hs,jn.Scale=ns,jn.Attribution=no,fn.layers=Bi,fn.zoom=Os,fn.scale=Bs,fn.attribution=qr;var Is=q.extend({initialize:function(y){this._map=y},enable:function(){return this._enabled?this:(this._enabled=!0,this.addHooks(),this)},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});Is.addTo=function(y,C){return y.addHandler(C,this),this};var io={Events:Z},so=An.touch?"touchstart mousedown":"mousedown",mr=V.extend({options:{clickTolerance:3},initialize:function(y,C,N,Y){m(this,Y),this._element=y,this._dragStartTarget=C||y,this._preventOutline=N},enable:function(){this._enabled||(je(this._dragStartTarget,so,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(mr._dragging===this&&this.finishDrag(!0),nt(this._dragStartTarget,so,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(y){if(this._enabled&&(this._moved=!1,!Ps(this._element,"leaflet-zoom-anim"))){if(y.touches&&y.touches.length!==1){mr._dragging===this&&this.finishDrag();return}if(!(mr._dragging||y.shiftKey||y.which!==1&&y.button!==1&&!y.touches)&&(mr._dragging=this,this._preventOutline&&we(this._element),$(),ba(),!this._moving)){this.fire("down");var C=y.touches?y.touches[0]:y,N=ze(this._element);this._startPoint=new D(C.clientX,C.clientY),this._startPos=Ls(this._element),this._parentScale=He(N);var Y=y.type==="mousedown";je(document,Y?"mousemove":"touchmove",this._onMove,this),je(document,Y?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(y){if(this._enabled){if(y.touches&&y.touches.length>1){this._moved=!0;return}var C=y.touches&&y.touches.length===1?y.touches[0]:y,N=new D(C.clientX,C.clientY)._subtract(this._startPoint);!N.x&&!N.y||Math.abs(N.x)+Math.abs(N.y)Pe&&(st=wt,Pe=It);Pe>N&&(C[st]=1,Uh(y,C,N,Y,st),Uh(y,C,N,st,me))}function ru(y,C){for(var N=[y[0]],Y=1,me=0,Pe=y.length;YC&&(N.push(y[Y]),me=Y);return meC.max.x&&(N|=2),y.yC.max.y&&(N|=8),N}function M1(y,C){var N=C.x-y.x,Y=C.y-y.y;return N*N+Y*Y}function $h(y,C,N,Y){var me=C.x,Pe=C.y,st=N.x-me,wt=N.y-Pe,It=st*st+wt*wt,rn;return It>0&&(rn=((y.x-me)*st+(y.y-Pe)*wt)/It,rn>1?(me=N.x,Pe=N.y):rn>0&&(me+=st*rn,Pe+=wt*rn)),st=y.x-me,wt=y.y-Pe,Y?st*st+wt*wt:new D(me,Pe)}function ko(y){return!S(y[0])||typeof y[0][0]!="object"&&typeof y[0][0]<"u"}function yp(y){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),ko(y)}function bp(y,C){var N,Y,me,Pe,st,wt,It,rn;if(!y||y.length===0)throw new Error("latlngs not passed");ko(y)||(console.warn("latlngs are not flat! Only the first ring will be used"),y=y[0]);var Fn=_e([0,0]),hi=ce(y),Ki=hi.getNorthWest().distanceTo(hi.getSouthWest())*hi.getNorthEast().distanceTo(hi.getNorthWest());Ki<1700&&(Fn=Ao(y));var Po=y.length,$r=[];for(N=0;NY){It=(Pe-Y)/me,rn=[wt.x-It*(wt.x-st.x),wt.y-It*(wt.y-st.y)];break}var Qo=C.unproject(W(rn));return _e([Qo.lat+Fn.lat,Qo.lng+Fn.lng])}var A1={__proto__:null,simplify:$a,pointToSegmentDistance:iu,closestPointOnSegment:su,clipSegment:T1,_getEdgeIntersection:gl,_getBitCode:ou,_sqClosestPointOnSegment:$h,isFlat:ko,_flat:yp,polylineCenter:bp},iv={project:function(y){return new D(y.lng,y.lat)},unproject:function(y){return new ae(y.y,y.x)},bounds:new Q([-180,-90],[180,90])},_p={R:6378137,R_MINOR:6356752314245179e-9,bounds:new Q([-2003750834279e-5,-1549657073972e-5],[2003750834279e-5,1876465623138e-5]),project:function(y){var C=Math.PI/180,N=this.R,Y=y.lat*C,me=this.R_MINOR/N,Pe=Math.sqrt(1-me*me),st=Pe*Math.sin(Y),wt=Math.tan(Math.PI/4-Y/2)/Math.pow((1-st)/(1+st),Pe/2);return Y=-N*Math.log(Math.max(wt,1e-10)),new D(y.lng*C*N,Y)},unproject:function(y){for(var C=180/Math.PI,N=this.R,Y=this.R_MINOR/N,me=Math.sqrt(1-Y*Y),Pe=Math.exp(-y.y/N),st=Math.PI/2-2*Math.atan(Pe),wt=0,It=.1,rn;wt<15&&Math.abs(It)>1e-7;wt++)rn=me*Math.sin(st),rn=Math.pow((1-rn)/(1+rn),me/2),It=Math.PI/2-2*Math.atan(Pe*rn)-st,st+=It;return new ae(st*C,y.x*C/N)}},sv={__proto__:null,LonLat:iv,Mercator:_p,SphericalMercator:Fe},vl=s({},Te,{code:"EPSG:3395",projection:_p,transformation:(function(){var y=.5/(Math.PI*_p.R);return fe(y,.5,-y,.5)})()}),cc=s({},Te,{code:"EPSG:4326",projection:iv,transformation:fe(1/180,1,-1/180,.5)}),uc=s({},ke,{projection:iv,transformation:fe(1,0,-1,0),scale:function(y){return Math.pow(2,y)},zoom:function(y){return Math.log(y)/Math.LN2},distance:function(y,C){var N=C.lng-y.lng,Y=C.lat-y.lat;return Math.sqrt(N*N+Y*Y)},infinite:!0});ke.Earth=Te,ke.EPSG3395=vl,ke.EPSG3857=Me,ke.EPSG900913=ge,ke.EPSG4326=cc,ke.Simple=uc;var xa=V.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(y){return y.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(y){return y&&y.removeLayer(this),this},getPane:function(y){return this._map.getPane(y?this.options[y]||y:this.options.pane)},addInteractiveTarget:function(y){return this._map._targets[l(y)]=this,this},removeInteractiveTarget:function(y){return delete this._map._targets[l(y)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(y){var C=y.target;if(C.hasLayer(this)){if(this._map=C,this._zoomAnimated=C._zoomAnimated,this.getEvents){var N=this.getEvents();C.on(N,this),this.once("remove",function(){C.off(N,this)},this)}this.onAdd(C),this.fire("add"),C.fire("layeradd",{layer:this})}}});bn.include({addLayer:function(y){if(!y._layerAdd)throw new Error("The provided object is not a Layer.");var C=l(y);return this._layers[C]?this:(this._layers[C]=y,y._mapToAdd=this,y.beforeAdd&&y.beforeAdd(this),this.whenReady(y._layerAdd,y),this)},removeLayer:function(y){var C=l(y);return this._layers[C]?(this._loaded&&y.onRemove(this),delete this._layers[C],this._loaded&&(this.fire("layerremove",{layer:y}),y.fire("remove")),y._map=y._mapToAdd=null,this):this},hasLayer:function(y){return l(y)in this._layers},eachLayer:function(y,C){for(var N in this._layers)y.call(C,this._layers[N]);return this},_addLayers:function(y){y=y?S(y)?y:[y]:[];for(var C=0,N=y.length;Cthis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),this.options.minZoom===void 0&&this._layersMinZoom&&this.getZoom()=2&&C[0]instanceof ae&&C[0].equals(C[N-1])&&C.pop(),C},_setLatLngs:function(y){au.prototype._setLatLngs.call(this,y),ko(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return ko(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var y=this._renderer._bounds,C=this.options.weight,N=new D(C,C);if(y=new Q(y.min.subtract(N),y.max.add(N)),this._parts=[],!(!this._pxBounds||!this._pxBounds.intersects(y))){if(this.options.noClip){this._parts=this._rings;return}for(var Y=0,me=this._rings.length,Pe;Yy.y!=me.y>y.y&&y.x<(me.x-Y.x)*(y.y-Y.y)/(me.y-Y.y)+Y.x&&(C=!C);return C||au.prototype._containsPoint.call(this,y,!0)}});function eq(y,C){return new wp(y,C)}var lu=yl.extend({initialize:function(y,C){m(this,C),this._layers={},y&&this.addData(y)},addData:function(y){var C=S(y)?y:y.features,N,Y,me;if(C){for(N=0,Y=C.length;N0&&me.push(me[0].slice()),me}function xp(y,C){return y.feature?s({},y.feature,{geometry:C}):O1(C)}function O1(y){return y.type==="Feature"||y.type==="FeatureCollection"?y:{type:"Feature",properties:{},geometry:y}}var MS={toGeoJSON:function(y){return xp(this,{type:"Point",coordinates:TS(this.getLatLng(),y)})}};Vh.include(MS),ov.include(MS),Hh.include(MS),au.include({toGeoJSON:function(y){var C=!ko(this._latlngs),N=R1(this._latlngs,C?1:0,!1,y);return xp(this,{type:(C?"Multi":"")+"LineString",coordinates:N})}}),wp.include({toGeoJSON:function(y){var C=!ko(this._latlngs),N=C&&!ko(this._latlngs[0]),Y=R1(this._latlngs,N?2:C?1:0,!0,y);return C||(Y=[Y]),xp(this,{type:(N?"Multi":"")+"Polygon",coordinates:Y})}}),vd.include({toMultiPoint:function(y){var C=[];return this.eachLayer(function(N){C.push(N.toGeoJSON(y).geometry.coordinates)}),xp(this,{type:"MultiPoint",coordinates:C})},toGeoJSON:function(y){var C=this.feature&&this.feature.geometry&&this.feature.geometry.type;if(C==="MultiPoint")return this.toMultiPoint(y);var N=C==="GeometryCollection",Y=[];return this.eachLayer(function(me){if(me.toGeoJSON){var Pe=me.toGeoJSON(y);if(N)Y.push(Pe.geometry);else{var st=O1(Pe);st.type==="FeatureCollection"?Y.push.apply(Y,st.features):Y.push(st)}}}),N?xp(this,{geometries:Y,type:"GeometryCollection"}):{type:"FeatureCollection",features:Y}}});function XP(y,C){return new lu(y,C)}var tq=XP,D1=xa.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(y,C,N){this._url=y,this._bounds=ce(C),m(this,N)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(On(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ai(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(y){return this.options.opacity=y,this._image&&this._updateOpacity(),this},setStyle:function(y){return y.opacity&&this.setOpacity(y.opacity),this},bringToFront:function(){return this._map&&vi(this._image),this},bringToBack:function(){return this._map&&Nn(this._image),this},setUrl:function(y){return this._url=y,this._image&&(this._image.src=y),this},setBounds:function(y){return this._bounds=ce(y),this._map&&this._reset(),this},getEvents:function(){var y={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(y.zoomanim=this._animateZoom),y},setZIndex:function(y){return this.options.zIndex=y,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var y=this._url.tagName==="IMG",C=this._image=y?this._url:In("img");if(On(C,"leaflet-image-layer"),this._zoomAnimated&&On(C,"leaflet-zoom-animated"),this.options.className&&On(C,this.options.className),C.onselectstart=d,C.onmousemove=d,C.onload=o(this.fire,this,"load"),C.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||this.options.crossOrigin==="")&&(C.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),y){this._url=C.src;return}C.src=this._url,C.alt=this.options.alt},_animateZoom:function(y){var C=this._map.getZoomScale(y.zoom),N=this._map._latLngBoundsToNewLayerBounds(this._bounds,y.zoom,y.center).min;Ys(this._image,N,C)},_reset:function(){var y=this._image,C=new Q(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),N=C.getSize();Ni(y,C.min),y.style.width=N.x+"px",y.style.height=N.y+"px"},_updateOpacity:function(){cr(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&this.options.zIndex!==void 0&&this.options.zIndex!==null&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var y=this.options.errorOverlayUrl;y&&this._url!==y&&(this._url=y,this._image.src=y)},getCenter:function(){return this._bounds.getCenter()}}),nq=function(y,C,N){return new D1(y,C,N)},ZP=D1.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var y=this._url.tagName==="VIDEO",C=this._image=y?this._url:In("video");if(On(C,"leaflet-image-layer"),this._zoomAnimated&&On(C,"leaflet-zoom-animated"),this.options.className&&On(C,this.options.className),C.onselectstart=d,C.onmousemove=d,C.onloadeddata=o(this.fire,this,"load"),y){for(var N=C.getElementsByTagName("source"),Y=[],me=0;me0?Y:[C.src];return}S(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(C.style,"objectFit")&&(C.style.objectFit="fill"),C.autoplay=!!this.options.autoplay,C.loop=!!this.options.loop,C.muted=!!this.options.muted,C.playsInline=!!this.options.playsInline;for(var Pe=0;Peme?(C.height=me+"px",On(y,Pe)):yi(y,Pe),this._containerWidth=this._container.offsetWidth},_animateZoom:function(y){var C=this._map._latLngToNewLayerPoint(this._latlng,y.zoom,y.center),N=this._getAnchor();Ni(this._container,C.add(N))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var y=this._map,C=parseInt(oi(this._container,"marginBottom"),10)||0,N=this._container.offsetHeight+C,Y=this._containerWidth,me=new D(this._containerLeft,-N-this._containerBottom);me._add(Ls(this._container));var Pe=y.layerPointToContainerPoint(me),st=W(this.options.autoPanPadding),wt=W(this.options.autoPanPaddingTopLeft||st),It=W(this.options.autoPanPaddingBottomRight||st),rn=y.getSize(),Fn=0,hi=0;Pe.x+Y+It.x>rn.x&&(Fn=Pe.x+Y-rn.x+It.x),Pe.x-Fn-wt.x<0&&(Fn=Pe.x-wt.x),Pe.y+N+It.y>rn.y&&(hi=Pe.y+N-rn.y+It.y),Pe.y-hi-wt.y<0&&(hi=Pe.y-wt.y),(Fn||hi)&&(this.options.keepInView&&(this._autopanning=!0),y.fire("autopanstart").panBy([Fn,hi]))}},_getAnchor:function(){return W(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),rq=function(y,C){return new N1(y,C)};bn.mergeOptions({closePopupOnClick:!0}),bn.include({openPopup:function(y,C,N){return this._initOverlay(N1,y,C,N).openOn(this),this},closePopup:function(y){return y=arguments.length?y:this._popup,y&&y.close(),this}}),xa.include({bindPopup:function(y,C){return this._popup=this._initOverlay(N1,this._popup,y,C),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(y){return this._popup&&(this instanceof yl||(this._popup._source=this),this._popup._prepareOpen(y||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return this._popup?this._popup.isOpen():!1},setPopupContent:function(y){return this._popup&&this._popup.setContent(y),this},getPopup:function(){return this._popup},_openPopup:function(y){if(!(!this._popup||!this._map)){sn(y);var C=y.layer||y.target;if(this._popup._source===C&&!(C instanceof bl)){this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(y.latlng);return}this._popup._source=C,this.openPopup(y.latlng)}},_movePopup:function(y){this._popup.setLatLng(y.latlng)},_onKeyPress:function(y){y.originalEvent.keyCode===13&&this._openPopup(y)}});var B1=dc.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(y){dc.prototype.onAdd.call(this,y),this.setOpacity(this.options.opacity),y.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(y){dc.prototype.onRemove.call(this,y),y.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var y=dc.prototype.getEvents.call(this);return this.options.permanent||(y.preclick=this.close),y},_initLayout:function(){var y="leaflet-tooltip",C=y+" "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=In("div",C),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+l(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(y){var C,N,Y=this._map,me=this._container,Pe=Y.latLngToContainerPoint(Y.getCenter()),st=Y.layerPointToContainerPoint(y),wt=this.options.direction,It=me.offsetWidth,rn=me.offsetHeight,Fn=W(this.options.offset),hi=this._getAnchor();wt==="top"?(C=It/2,N=rn):wt==="bottom"?(C=It/2,N=0):wt==="center"?(C=It/2,N=rn/2):wt==="right"?(C=0,N=rn/2):wt==="left"?(C=It,N=rn/2):st.xthis.options.maxZoom||NY?this._retainParent(me,Pe,st,Y):!1)},_retainChildren:function(y,C,N,Y){for(var me=2*y;me<2*y+2;me++)for(var Pe=2*C;Pe<2*C+2;Pe++){var st=new D(me,Pe);st.z=N+1;var wt=this._tileCoordsToKey(st),It=this._tiles[wt];if(It&&It.active){It.retain=!0;continue}else It&&It.loaded&&(It.retain=!0);N+1this.options.maxZoom||this.options.minZoom!==void 0&&me1){this._setView(y,N);return}for(var hi=me.min.y;hi<=me.max.y;hi++)for(var Ki=me.min.x;Ki<=me.max.x;Ki++){var Po=new D(Ki,hi);if(Po.z=this._tileZoom,!!this._isValidTile(Po)){var $r=this._tiles[this._tileCoordsToKey(Po)];$r?$r.current=!0:st.push(Po)}}if(st.sort(function(Qo,Ep){return Qo.distanceTo(Pe)-Ep.distanceTo(Pe)}),st.length!==0){this._loading||(this._loading=!0,this.fire("loading"));var Va=document.createDocumentFragment();for(Ki=0;KiN.max.x)||!C.wrapLat&&(y.yN.max.y))return!1}if(!this.options.bounds)return!0;var Y=this._tileCoordsToBounds(y);return ce(this.options.bounds).overlaps(Y)},_keyToBounds:function(y){return this._tileCoordsToBounds(this._keyToTileCoords(y))},_tileCoordsToNwSe:function(y){var C=this._map,N=this.getTileSize(),Y=y.scaleBy(N),me=Y.add(N),Pe=C.unproject(Y,y.z),st=C.unproject(me,y.z);return[Pe,st]},_tileCoordsToBounds:function(y){var C=this._tileCoordsToNwSe(y),N=new ne(C[0],C[1]);return this.options.noWrap||(N=this._map.wrapLatLngBounds(N)),N},_tileCoordsToKey:function(y){return y.x+":"+y.y+":"+y.z},_keyToTileCoords:function(y){var C=y.split(":"),N=new D(+C[0],+C[1]);return N.z=+C[2],N},_removeTile:function(y){var C=this._tiles[y];C&&(ai(C.el),delete this._tiles[y],this.fire("tileunload",{tile:C.el,coords:this._keyToTileCoords(y)}))},_initTile:function(y){On(y,"leaflet-tile");var C=this.getTileSize();y.style.width=C.x+"px",y.style.height=C.y+"px",y.onselectstart=d,y.onmousemove=d,An.ielt9&&this.options.opacity<1&&cr(y,this.options.opacity)},_addTile:function(y,C){var N=this._getTilePos(y),Y=this._tileCoordsToKey(y),me=this.createTile(this._wrapCoords(y),o(this._tileReady,this,y));this._initTile(me),this.createTile.length<2&&B(o(this._tileReady,this,y,null,me)),Ni(me,N),this._tiles[Y]={el:me,coords:y,current:!0},C.appendChild(me),this.fire("tileloadstart",{tile:me,coords:y})},_tileReady:function(y,C,N){C&&this.fire("tileerror",{error:C,tile:N,coords:y});var Y=this._tileCoordsToKey(y);N=this._tiles[Y],N&&(N.loaded=+new Date,this._map._fadeAnimated?(cr(N.el,0),R(this._fadeFrame),this._fadeFrame=B(this._updateOpacity,this)):(N.active=!0,this._pruneTiles()),C||(On(N.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:N.el,coords:y})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),An.ielt9||!this._map._fadeAnimated?B(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(y){return y.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(y){var C=new D(this._wrapX?u(y.x,this._wrapX):y.x,this._wrapY?u(y.y,this._wrapY):y.y);return C.z=y.z,C},_pxBoundsToTileRange:function(y){var C=this.getTileSize();return new Q(y.min.unscaleBy(C).floor(),y.max.unscaleBy(C).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var y in this._tiles)if(!this._tiles[y].loaded)return!1;return!0}});function lq(y){return new av(y)}var Sp=av.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(y,C){this._url=y,C=m(this,C),C.detectRetina&&An.retina&&C.maxZoom>0?(C.tileSize=Math.floor(C.tileSize/2),C.zoomReverse?(C.zoomOffset--,C.minZoom=Math.min(C.maxZoom,C.minZoom+1)):(C.zoomOffset++,C.maxZoom=Math.max(C.minZoom,C.maxZoom-1)),C.minZoom=Math.max(0,C.minZoom)):C.zoomReverse?C.minZoom=Math.min(C.maxZoom,C.minZoom):C.maxZoom=Math.max(C.minZoom,C.maxZoom),typeof C.subdomains=="string"&&(C.subdomains=C.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(y,C){return this._url===y&&C===void 0&&(C=!0),this._url=y,C||this.redraw(),this},createTile:function(y,C){var N=document.createElement("img");return je(N,"load",o(this._tileOnLoad,this,C,N)),je(N,"error",o(this._tileOnError,this,C,N)),(this.options.crossOrigin||this.options.crossOrigin==="")&&(N.crossOrigin=this.options.crossOrigin===!0?"":this.options.crossOrigin),typeof this.options.referrerPolicy=="string"&&(N.referrerPolicy=this.options.referrerPolicy),N.alt="",N.src=this.getTileUrl(y),N},getTileUrl:function(y){var C={r:An.retina?"@2x":"",s:this._getSubdomain(y),x:y.x,y:y.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var N=this._globalTileRange.max.y-y.y;this.options.tms&&(C.y=N),C["-y"]=N}return x(this._url,s(C,this.options))},_tileOnLoad:function(y,C){An.ielt9?setTimeout(o(y,this,null,C),0):y(null,C)},_tileOnError:function(y,C,N){var Y=this.options.errorTileUrl;Y&&C.getAttribute("src")!==Y&&(C.src=Y),y(N,C)},_onTileRemove:function(y){y.tile.onload=null},_getZoomForUrl:function(){var y=this._tileZoom,C=this.options.maxZoom,N=this.options.zoomReverse,Y=this.options.zoomOffset;return N&&(y=C-y),y+Y},_getSubdomain:function(y){var C=Math.abs(y.x+y.y)%this.options.subdomains.length;return this.options.subdomains[C]},_abortLoading:function(){var y,C;for(y in this._tiles)if(this._tiles[y].coords.z!==this._tileZoom&&(C=this._tiles[y].el,C.onload=d,C.onerror=d,!C.complete)){C.src=E;var N=this._tiles[y].coords;ai(C),delete this._tiles[y],this.fire("tileabort",{tile:C,coords:N})}},_removeTile:function(y){var C=this._tiles[y];if(C)return C.el.setAttribute("src",E),av.prototype._removeTile.call(this,y)},_tileReady:function(y,C,N){if(!(!this._map||N&&N.getAttribute("src")===E))return av.prototype._tileReady.call(this,y,C,N)}});function eL(y,C){return new Sp(y,C)}var tL=Sp.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(y,C){this._url=y;var N=s({},this.defaultWmsParams);for(var Y in C)Y in this.options||(N[Y]=C[Y]);C=m(this,C);var me=C.detectRetina&&An.retina?2:1,Pe=this.getTileSize();N.width=Pe.x*me,N.height=Pe.y*me,this.wmsParams=N},onAdd:function(y){this._crs=this.options.crs||y.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var C=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[C]=this._crs.code,Sp.prototype.onAdd.call(this,y)},getTileUrl:function(y){var C=this._tileCoordsToNwSe(y),N=this._crs,Y=ie(N.project(C[0]),N.project(C[1])),me=Y.min,Pe=Y.max,st=(this._wmsVersion>=1.3&&this._crs===cc?[me.y,me.x,Pe.y,Pe.x]:[me.x,me.y,Pe.x,Pe.y]).join(","),wt=Sp.prototype.getTileUrl.call(this,y);return wt+b(this.wmsParams,wt,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+st},setParams:function(y,C){return s(this.wmsParams,y),C||this.redraw(),this}});function cq(y,C){return new tL(y,C)}Sp.WMS=tL,eL.wms=cq;var cu=xa.extend({options:{padding:.1},initialize:function(y){m(this,y),l(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),On(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var y={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(y.zoomanim=this._onAnimZoom),y},_onAnimZoom:function(y){this._updateTransform(y.center,y.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(y,C){var N=this._map.getZoomScale(C,this._zoom),Y=this._map.getSize().multiplyBy(.5+this.options.padding),me=this._map.project(this._center,C),Pe=Y.multiplyBy(-N).add(me).subtract(this._map._getNewPixelOrigin(y,C));An.any3d?Ys(this._container,Pe,N):Ni(this._container,Pe)},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);for(var y in this._layers)this._layers[y]._reset()},_onZoomEnd:function(){for(var y in this._layers)this._layers[y]._project()},_updatePaths:function(){for(var y in this._layers)this._layers[y]._update()},_update:function(){var y=this.options.padding,C=this._map.getSize(),N=this._map.containerPointToLayerPoint(C.multiplyBy(-y)).round();this._bounds=new Q(N,N.add(C.multiplyBy(1+y*2)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),nL=cu.extend({options:{tolerance:0},getEvents:function(){var y=cu.prototype.getEvents.call(this);return y.viewprereset=this._onViewPreReset,y},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){cu.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var y=this._container=document.createElement("canvas");je(y,"mousemove",this._onMouseMove,this),je(y,"click dblclick mousedown mouseup contextmenu",this._onClick,this),je(y,"mouseout",this._handleMouseOut,this),y._leaflet_disable_events=!0,this._ctx=y.getContext("2d")},_destroyContainer:function(){R(this._redrawRequest),delete this._ctx,ai(this._container),nt(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){var y;this._redrawBounds=null;for(var C in this._layers)y=this._layers[C],y._update();this._redraw()}},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){cu.prototype._update.call(this);var y=this._bounds,C=this._container,N=y.getSize(),Y=An.retina?2:1;Ni(C,y.min),C.width=Y*N.x,C.height=Y*N.y,C.style.width=N.x+"px",C.style.height=N.y+"px",An.retina&&this._ctx.scale(2,2),this._ctx.translate(-y.min.x,-y.min.y),this.fire("update")}},_reset:function(){cu.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(y){this._updateDashArray(y),this._layers[l(y)]=y;var C=y._order={layer:y,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=C),this._drawLast=C,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(y){this._requestRedraw(y)},_removePath:function(y){var C=y._order,N=C.next,Y=C.prev;N?N.prev=Y:this._drawLast=Y,Y?Y.next=N:this._drawFirst=N,delete y._order,delete this._layers[l(y)],this._requestRedraw(y)},_updatePath:function(y){this._extendRedrawBounds(y),y._project(),y._update(),this._requestRedraw(y)},_updateStyle:function(y){this._updateDashArray(y),this._requestRedraw(y)},_updateDashArray:function(y){if(typeof y.options.dashArray=="string"){var C=y.options.dashArray.split(/[, ]+/),N=[],Y,me;for(me=0;me')}}catch{}return function(y){return document.createElement("<"+y+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}})(),uq={_initContainer:function(){this._container=In("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(cu.prototype._update.call(this),this.fire("update"))},_initPath:function(y){var C=y._container=lv("shape");On(C,"leaflet-vml-shape "+(this.options.className||"")),C.coordsize="1 1",y._path=lv("path"),C.appendChild(y._path),this._updateStyle(y),this._layers[l(y)]=y},_addPath:function(y){var C=y._container;this._container.appendChild(C),y.options.interactive&&y.addInteractiveTarget(C)},_removePath:function(y){var C=y._container;ai(C),y.removeInteractiveTarget(C),delete this._layers[l(y)]},_updateStyle:function(y){var C=y._stroke,N=y._fill,Y=y.options,me=y._container;me.stroked=!!Y.stroke,me.filled=!!Y.fill,Y.stroke?(C||(C=y._stroke=lv("stroke")),me.appendChild(C),C.weight=Y.weight+"px",C.color=Y.color,C.opacity=Y.opacity,Y.dashArray?C.dashStyle=S(Y.dashArray)?Y.dashArray.join(" "):Y.dashArray.replace(/( *, *)/g," "):C.dashStyle="",C.endcap=Y.lineCap.replace("butt","flat"),C.joinstyle=Y.lineJoin):C&&(me.removeChild(C),y._stroke=null),Y.fill?(N||(N=y._fill=lv("fill")),me.appendChild(N),N.color=Y.fillColor||Y.color,N.opacity=Y.fillOpacity):N&&(me.removeChild(N),y._fill=null)},_updateCircle:function(y){var C=y._point.round(),N=Math.round(y._radius),Y=Math.round(y._radiusY||N);this._setPath(y,y._empty()?"M0 0":"AL "+C.x+","+C.y+" "+N+","+Y+" 0,"+65535*360)},_setPath:function(y,C){y._path.v=C},_bringToFront:function(y){vi(y._container)},_bringToBack:function(y){Nn(y._container)}},F1=An.vml?lv:Qe,cv=cu.extend({_initContainer:function(){this._container=F1("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=F1("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ai(this._container),nt(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!(this._map._animatingZoom&&this._bounds)){cu.prototype._update.call(this);var y=this._bounds,C=y.getSize(),N=this._container;(!this._svgSize||!this._svgSize.equals(C))&&(this._svgSize=C,N.setAttribute("width",C.x),N.setAttribute("height",C.y)),Ni(N,y.min),N.setAttribute("viewBox",[y.min.x,y.min.y,C.x,C.y].join(" ")),this.fire("update")}},_initPath:function(y){var C=y._path=F1("path");y.options.className&&On(C,y.options.className),y.options.interactive&&On(C,"leaflet-interactive"),this._updateStyle(y),this._layers[l(y)]=y},_addPath:function(y){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(y._path),y.addInteractiveTarget(y._path)},_removePath:function(y){ai(y._path),y.removeInteractiveTarget(y._path),delete this._layers[l(y)]},_updatePath:function(y){y._project(),y._update()},_updateStyle:function(y){var C=y._path,N=y.options;C&&(N.stroke?(C.setAttribute("stroke",N.color),C.setAttribute("stroke-opacity",N.opacity),C.setAttribute("stroke-width",N.weight),C.setAttribute("stroke-linecap",N.lineCap),C.setAttribute("stroke-linejoin",N.lineJoin),N.dashArray?C.setAttribute("stroke-dasharray",N.dashArray):C.removeAttribute("stroke-dasharray"),N.dashOffset?C.setAttribute("stroke-dashoffset",N.dashOffset):C.removeAttribute("stroke-dashoffset")):C.setAttribute("stroke","none"),N.fill?(C.setAttribute("fill",N.fillColor||N.color),C.setAttribute("fill-opacity",N.fillOpacity),C.setAttribute("fill-rule",N.fillRule||"evenodd")):C.setAttribute("fill","none"))},_updatePoly:function(y,C){this._setPath(y,G(y._parts,C))},_updateCircle:function(y){var C=y._point,N=Math.max(Math.round(y._radius),1),Y=Math.max(Math.round(y._radiusY),1)||N,me="a"+N+","+Y+" 0 1,0 ",Pe=y._empty()?"M0 0":"M"+(C.x-N)+","+C.y+me+N*2+",0 "+me+-N*2+",0 ";this._setPath(y,Pe)},_setPath:function(y,C){y._path.setAttribute("d",C)},_bringToFront:function(y){vi(y._path)},_bringToBack:function(y){Nn(y._path)}});An.vml&&cv.include(uq);function sL(y){return An.svg||An.vml?new cv(y):null}bn.include({getRenderer:function(y){var C=y.options.renderer||this._getPaneRenderer(y.options.pane)||this.options.renderer||this._renderer;return C||(C=this._renderer=this._createRenderer()),this.hasLayer(C)||this.addLayer(C),C},_getPaneRenderer:function(y){if(y==="overlayPane"||y===void 0)return!1;var C=this._paneRenderers[y];return C===void 0&&(C=this._createRenderer({pane:y}),this._paneRenderers[y]=C),C},_createRenderer:function(y){return this.options.preferCanvas&&iL(y)||sL(y)}});var rL=wp.extend({initialize:function(y,C){wp.prototype.initialize.call(this,this._boundsToLatLngs(y),C)},setBounds:function(y){return this.setLatLngs(this._boundsToLatLngs(y))},_boundsToLatLngs:function(y){return y=ce(y),[y.getSouthWest(),y.getNorthWest(),y.getNorthEast(),y.getSouthEast()]}});function dq(y,C){return new rL(y,C)}cv.create=F1,cv.pointsToPath=G,lu.geometryToLayer=L1,lu.coordsToLatLng=CS,lu.coordsToLatLngs=I1,lu.latLngToCoords=TS,lu.latLngsToCoords=R1,lu.getFeature=xp,lu.asFeature=O1,bn.mergeOptions({boxZoom:!0});var oL=Is.extend({initialize:function(y){this._map=y,this._container=y._container,this._pane=y._panes.overlayPane,this._resetStateTimeout=0,y.on("unload",this._destroy,this)},addHooks:function(){je(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){nt(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ai(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){this._resetStateTimeout!==0&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(y){if(!y.shiftKey||y.which!==1&&y.button!==1)return!1;this._clearDeferredResetState(),this._resetState(),ba(),$(),this._startPoint=this._map.mouseEventToContainerPoint(y),je(document,{contextmenu:sn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(y){this._moved||(this._moved=!0,this._box=In("div","leaflet-zoom-box",this._container),On(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(y);var C=new Q(this._point,this._startPoint),N=C.getSize();Ni(this._box,C.min),this._box.style.width=N.x+"px",this._box.style.height=N.y+"px"},_finish:function(){this._moved&&(ai(this._box),yi(this._container,"leaflet-crosshair")),w(),te(),nt(document,{contextmenu:sn,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(y){if(!(y.which!==1&&y.button!==1)&&(this._finish(),!!this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var C=new ne(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(C).fire("boxzoomend",{boxZoomBounds:C})}},_onKeyDown:function(y){y.keyCode===27&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});bn.addInitHook("addHandler","boxZoom",oL),bn.mergeOptions({doubleClickZoom:!0});var aL=Is.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(y){var C=this._map,N=C.getZoom(),Y=C.options.zoomDelta,me=y.originalEvent.shiftKey?N-Y:N+Y;C.options.doubleClickZoom==="center"?C.setZoom(me):C.setZoomAround(y.containerPoint,me)}});bn.addInitHook("addHandler","doubleClickZoom",aL),bn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var lL=Is.extend({addHooks:function(){if(!this._draggable){var y=this._map;this._draggable=new mr(y._mapPane,y._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),y.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),y.on("zoomend",this._onZoomEnd,this),y.whenReady(this._onZoomEnd,this))}On(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){yi(this._map._container,"leaflet-grab"),yi(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var y=this._map;if(y._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var C=ce(this._map.options.maxBounds);this._offsetLimit=ie(this._map.latLngToContainerPoint(C.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(C.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;y.fire("movestart").fire("dragstart"),y.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(y){if(this._map.options.inertia){var C=this._lastTime=+new Date,N=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(N),this._times.push(C),this._prunePositions(C)}this._map.fire("move",y).fire("drag",y)},_prunePositions:function(y){for(;this._positions.length>1&&y-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var y=this._map.getSize().divideBy(2),C=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=C.subtract(y).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(y,C){return y-(y-C)*this._viscosity},_onPreDragLimit:function(){if(!(!this._viscosity||!this._offsetLimit)){var y=this._draggable._newPos.subtract(this._draggable._startPos),C=this._offsetLimit;y.xC.max.x&&(y.x=this._viscousLimit(y.x,C.max.x)),y.y>C.max.y&&(y.y=this._viscousLimit(y.y,C.max.y)),this._draggable._newPos=this._draggable._startPos.add(y)}},_onPreDragWrap:function(){var y=this._worldWidth,C=Math.round(y/2),N=this._initialWorldOffset,Y=this._draggable._newPos.x,me=(Y-C+N)%y+C-N,Pe=(Y+C+N)%y-C-N,st=Math.abs(me+N)0?Pe:-Pe))-C;this._delta=0,this._startTime=null,st&&(y.options.scrollWheelZoom==="center"?y.setZoom(C+st):y.setZoomAround(this._lastMousePos,C+st))}});bn.addInitHook("addHandler","scrollWheelZoom",uL);var hq=600;bn.mergeOptions({tapHold:An.touchNative&&An.safari&&An.mobile,tapTolerance:15});var dL=Is.extend({addHooks:function(){je(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){nt(this._map._container,"touchstart",this._onDown,this)},_onDown:function(y){if(clearTimeout(this._holdTimeout),y.touches.length===1){var C=y.touches[0];this._startPos=this._newPos=new D(C.clientX,C.clientY),this._holdTimeout=setTimeout(o(function(){this._cancel(),this._isTapValid()&&(je(document,"touchend",hn),je(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",C))},this),hq),je(document,"touchend touchcancel contextmenu",this._cancel,this),je(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function y(){nt(document,"touchend",hn),nt(document,"touchend touchcancel",y)},_cancel:function(){clearTimeout(this._holdTimeout),nt(document,"touchend touchcancel contextmenu",this._cancel,this),nt(document,"touchmove",this._onMove,this)},_onMove:function(y){var C=y.touches[0];this._newPos=new D(C.clientX,C.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(y,C){var N=new MouseEvent(y,{bubbles:!0,cancelable:!0,view:window,screenX:C.screenX,screenY:C.screenY,clientX:C.clientX,clientY:C.clientY});N._simulated=!0,C.target.dispatchEvent(N)}});bn.addInitHook("addHandler","tapHold",dL),bn.mergeOptions({touchZoom:An.touch,bounceAtZoomLimits:!0});var hL=Is.extend({addHooks:function(){On(this._map._container,"leaflet-touch-zoom"),je(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){yi(this._map._container,"leaflet-touch-zoom"),nt(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(y){var C=this._map;if(!(!y.touches||y.touches.length!==2||C._animatingZoom||this._zooming)){var N=C.mouseEventToContainerPoint(y.touches[0]),Y=C.mouseEventToContainerPoint(y.touches[1]);this._centerPoint=C.getSize()._divideBy(2),this._startLatLng=C.containerPointToLatLng(this._centerPoint),C.options.touchZoom!=="center"&&(this._pinchStartLatLng=C.containerPointToLatLng(N.add(Y)._divideBy(2))),this._startDist=N.distanceTo(Y),this._startZoom=C.getZoom(),this._moved=!1,this._zooming=!0,C._stop(),je(document,"touchmove",this._onTouchMove,this),je(document,"touchend touchcancel",this._onTouchEnd,this),hn(y)}},_onTouchMove:function(y){if(!(!y.touches||y.touches.length!==2||!this._zooming)){var C=this._map,N=C.mouseEventToContainerPoint(y.touches[0]),Y=C.mouseEventToContainerPoint(y.touches[1]),me=N.distanceTo(Y)/this._startDist;if(this._zoom=C.getScaleZoom(me,this._startZoom),!C.options.bounceAtZoomLimits&&(this._zoomC.getMaxZoom()&&me>1)&&(this._zoom=C._limitZoom(this._zoom)),C.options.touchZoom==="center"){if(this._center=this._startLatLng,me===1)return}else{var Pe=N._add(Y)._divideBy(2)._subtract(this._centerPoint);if(me===1&&Pe.x===0&&Pe.y===0)return;this._center=C.unproject(C.project(this._pinchStartLatLng,this._zoom).subtract(Pe),this._zoom)}this._moved||(C._moveStart(!0,!1),this._moved=!0),R(this._animRequest);var st=o(C._move,C,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=B(st,this,!0),hn(y)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,R(this._animRequest),nt(document,"touchmove",this._onTouchMove,this),nt(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});bn.addInitHook("addHandler","touchZoom",hL),bn.BoxZoom=oL,bn.DoubleClickZoom=aL,bn.Drag=lL,bn.Keyboard=cL,bn.ScrollWheelZoom=uL,bn.TapHold=dL,bn.TouchZoom=hL,n.Bounds=Q,n.Browser=An,n.CRS=ke,n.Canvas=nL,n.Circle=ov,n.CircleMarker=Hh,n.Class=q,n.Control=jn,n.DivIcon=QP,n.DivOverlay=dc,n.DomEvent=ti,n.DomUtil=Ve,n.Draggable=mr,n.Evented=V,n.FeatureGroup=yl,n.GeoJSON=lu,n.GridLayer=av,n.Handler=Is,n.Icon=yd,n.ImageOverlay=D1,n.LatLng=ae,n.LatLngBounds=ne,n.Layer=xa,n.LayerGroup=vd,n.LineUtil=A1,n.Map=bn,n.Marker=Vh,n.Mixin=io,n.Path=bl,n.Point=D,n.PolyUtil=wa,n.Polygon=wp,n.Polyline=au,n.Popup=N1,n.PosAnimation=Zn,n.Projection=sv,n.Rectangle=rL,n.Renderer=cu,n.SVG=cv,n.SVGOverlay=JP,n.TileLayer=Sp,n.Tooltip=B1,n.Transformation=ve,n.Util=H,n.VideoOverlay=ZP,n.bind=o,n.bounds=ie,n.canvas=iL,n.circle=JK,n.circleMarker=ES,n.control=fn,n.divIcon=aq,n.extend=s,n.featureGroup=P1,n.geoJSON=XP,n.geoJson=tq,n.gridLayer=lq,n.icon=xS,n.imageOverlay=nq,n.latLng=_e,n.latLngBounds=ce,n.layerGroup=k1,n.map=Gn,n.marker=SS,n.point=W,n.polygon=eq,n.polyline=QK,n.popup=rq,n.rectangle=dq,n.setOptions=m,n.stamp=l,n.svg=sL,n.svgOverlay=sq,n.tileLayer=eL,n.tooltip=oq,n.transformation=fe,n.version=i,n.videoOverlay=iq;var fq=window.L;n.noConflict=function(){return window.L=fq,this},window.L=n}))})(zv,zv.exports)),zv.exports}var qi=MJ();const is=wi(null),du=X({}),HS=wi(null),Mr=wi(null),q1=new Map;let Ap=null;function Fy(){const t=Xo();function e(){return is.value}function n(){return HS.value}function i(){return Mr.value}function s(B){if(!document.getElementById(B))throw console.error("Map element not found:",B),new Error(`Map element not found: ${B}`);try{return is.value=qi.map(B,{zoomControl:!1,doubleClickZoom:!1}).setView(Ll.MAP_DEFAULT_CENTER,Ll.MAP_DEFAULT_ZOOM),r(),HS.value=qi.layerGroup().addTo(is.value),is.value.on("mousemove",H=>{const{lat:q,lng:oe}=H.latlng;t.setCursorCoords(`${q.toFixed(6)}, ${oe.toFixed(6)}`)}),is.value}catch(H){throw console.error("Error initializing Leaflet map:",H),H}}function r(){if(!is.value)return;const B=Ll.TILE_LAYERS;du.value.osm=qi.tileLayer(B.osm.url,B.osm.options),du.value.satellite=qi.tileLayer(B.satellite.url,B.satellite.options),du.value.topo=qi.tileLayer(B.topo.url,B.topo.options),du.value.osm?.addTo(is.value),t.setCurrentBaseLayer("osm")}function o(B){if(!is.value||!du.value[B])return;const R=t.currentBaseLayer;R&&du.value[R]&&is.value.removeLayer(du.value[R]),du.value[B]?.addTo(is.value),t.setCurrentBaseLayer(B)}function a(){is.value?.zoomIn()}function l(){is.value?.zoomOut()}function c(){Mr.value&&is.value&&is.value.fitBounds(Mr.value.getBounds())}function u(B){if(!is.value||!B.geometry)return;const H=qi.geoJSON(B).getBounds();H.isValid()&&is.value.fitBounds(H,{padding:[50,50],maxZoom:18})}function d(B){if(!is.value||!Mr.value)return;const R=qi.latLngBounds([]);Mr.value.eachLayer(H=>{H.feature?.properties?.layer===B&&("getBounds"in H&&typeof H.getBounds=="function"?R.extend(H.getBounds()):"getLatLng"in H&&typeof H.getLatLng=="function"&&R.extend(H.getLatLng()))}),R.isValid()&&is.value.fitBounds(R,{padding:[50,50],maxZoom:18})}function h(B){const R=B?.properties??{},H=t.viewMode;let q;if(H==="gis")q={color:R.color??"#3b82f6",weight:2,opacity:.9,dashArray:"",fillColor:R.color??"#3b82f6",fillOpacity:.15,fill:!0};else{const Z=R.lineweight??2;q={color:R.color??"#3b82f6",weight:Math.max(2,Z),opacity:.95},R.dashArray&&Array.isArray(R.dashArray)&&(q.dashArray=R.dashArray.join(" ")),R.entityType==="HATCH"&&R.hatchPattern?(q.fillColor=R.color??"#3b82f6",q.fillOpacity=.25,q.fill=!0):(q.fillOpacity=0,q.fill=!1)}const oe=R.handle??Math.random().toString();return q1.set(oe,{...q}),q}function f(B,R){const H=B?.properties??{};return H.text?qi.marker(R,{icon:qi.divIcon({className:"cad-text-label",html:`${H.text}`,iconSize:[100,20],iconAnchor:[0,10]})}):qi.circleMarker(R,{radius:Math.max(3,(H.lineweight??2)*1.5),fillColor:H.color??"#3b82f6",color:"#fff",weight:1,fillOpacity:.8})}function p(B,R){const H=B;if(H.setStyle){const q=R==="selected"?{color:"#f59e0b",weight:4,opacity:1}:{color:"#3b82f6",weight:3,opacity:1};H.setStyle(q)}}function m(B,R){const H=q1.get(R),q=B;H&&q.setStyle&&q.setStyle(H)}function b(B,R){g(),p(R,"selected"),Ap=R,t.setSelectedFeature(B)}function g(){if(Ap){const R=Ap.feature?.properties?.handle??"";m(Ap,R),Ap=null}t.setSelectedFeature(null)}function x(B,R){const H=B.properties??{},q=H.handle??"";R.on("click",Z=>{t.activeTool||(qi.DomEvent.stopPropagation(Z),b(B,R))}),R.on("mouseover",()=>{t.selectedFeature?.properties?.handle!==q&&p(R,"hover"),t.setHoveredFeature(B)}),R.on("mouseout",()=>{t.selectedFeature?.properties?.handle!==q&&m(R,q),t.setHoveredFeature(null)});const oe=`
${H.layer??"Unknown"}
${H.entityType??B.geometry.type}
`;R.bindTooltip(oe,{sticky:!0,className:"cad-tooltip",direction:"top",offset:[0,-5]})}function S(B){is.value&&(Mr.value&&is.value.removeLayer(Mr.value),q1.clear(),Ap=null,t.clearSelection(),Mr.value=qi.geoJSON(B,{style:R=>h(R),pointToLayer:(R,H)=>f(R,H),onEachFeature:(R,H)=>x(R,H)}).addTo(is.value),is.value.on("click",()=>{g()}),is.value.fitBounds(Mr.value.getBounds()))}function _(){Mr.value&&Mr.value.eachLayer(B=>{const R=B;if(R.feature){const H=h(R.feature);R.setStyle&&R.setStyle(H)}})}function E(){Mr.value&&is.value&&(is.value.removeLayer(Mr.value),Mr.value=null)}function T(B){is.value&&(is.value.getContainer().style.cursor=B)}function A(B,R,H=1){return is.value?qi.imageOverlay(B,R,{opacity:H}).addTo(is.value):null}function I(B,R){Mr.value&&Mr.value.eachLayer(H=>{const q=H;q.feature?.properties?.layer===B&&(R?(q._path&&(q._path.style.display=""),q._container&&(q._container.style.display="")):(q._path&&(q._path.style.display="none"),q._container&&(q._container.style.display="none")))})}function P(B){Mr.value&&Mr.value.eachLayer(R=>{const H=R;B?(H._path&&(H._path.style.display=""),H._container&&(H._container.style.display="")):(H._path&&(H._path.style.display="none"),H._container&&(H._container.style.display="none"))})}function k(){is.value&&(is.value.remove(),is.value=null),du.value={},HS.value=null,Mr.value=null,q1.clear()}return{getMap:e,getMeasureLayer:n,getGeojsonLayer:i,initMap:s,switchBaseLayer:o,zoomIn:a,zoomOut:l,fitBounds:c,zoomToFeature:u,zoomToLayer:d,displayGeoJSON:S,clearGeoJSON:E,refreshViewMode:_,selectFeature:b,deselectCurrentFeature:g,setCursor:T,addImageOverlay:A,setLayerVisibility:I,setAllLayersVisibility:P,destroy:k}}const AJ=3,kJ=2500,ea=X([]);let PJ=0;const LJ=[{pattern:/^(📍\s*)?Đã ghim tại \d+\.\d+, \d+\.\d+$/,key:"pin_location"},{pattern:/^Đã chọn vùng/,key:"area_selection"},{pattern:/^Click .* để/,key:"click_instruction"},{pattern:/^🗑️\s*Đã xóa/,key:"delete_action"}];function IJ(t){for(const{pattern:e,key:n}of LJ)if(e.test(t))return n}function RJ(t,e,n){switch(t){case"pin_location":return`Đã ghim ${e} điểm`;case"area_selection":return`Đã chọn ${e} vùng`;default:return n}}function dd(){function t(d,h="info"){const f=++PJ,p=Date.now(),m=IJ(d);if(m){const x=ea.value.findIndex(S=>S.groupKey===m&&S.type===h&&S.visible);if(x!==-1){const S=ea.value[x];if(!S)return;const _=S.count+1,E=RJ(m,_,d);ea.value=ea.value.map((T,A)=>A===x?{...T,count:_,message:E,timestamp:p}:T),i(S.id);return}}const b={id:f,message:d,type:h,visible:!1,count:1,groupKey:m,timestamp:p};let g=[...ea.value,b];if(g.length>AJ){const x=g[0];x&&s(x.id),g=g.slice(1)}ea.value=g,setTimeout(()=>{ea.value=ea.value.map(x=>x.id===f?{...x,visible:!0}:x)},10),n(f)}const e=new Map;function n(d){const h=setTimeout(()=>{s(d),e.delete(d)},kJ);e.set(d,h)}function i(d){const h=e.get(d);h&&clearTimeout(h),n(d)}function s(d){const h=e.get(d);h&&(clearTimeout(h),e.delete(d)),ea.value=ea.value.map(f=>f.id===d?{...f,visible:!1}:f),setTimeout(()=>{ea.value=ea.value.filter(f=>f.id!==d)},300)}function r(){ea.value.forEach(d=>s(d.id))}function o(d){t(d,"info")}function a(d){t(d,"success")}function l(d){t(d,"error")}function c(d){t(d,"warn")}function u(d){s(d)}return{toasts:Vc(ea),show:t,hide:s,remove:u,clearAll:r,info:o,success:a,error:l,warn:c}}function Ng(){const t=Xo();function e(p,m="info"){const g=new Date().toLocaleTimeString("vi-VN",{hour:"2-digit",minute:"2-digit"}),x={time:g,type:m,message:p};t.addLog(x),console[m==="error"?"error":m==="warn"?"warn":"log"](`[${g}] ${p}`)}function n(){t.setSystemStatus("busy")}function i(){t.setSystemStatus("ready")}function s(){t.setSystemStatus("error")}function r(p){t.setLoading(p)}function o(p){if(!p||isNaN(p))return"0.00 m";switch(t.measureUnits.distance){case"km":return(p/1e3).toFixed(3)+" km";case"ft":return(p*3.28084).toFixed(2)+" ft";default:return p.toFixed(2)+" m"}}function a(p){if(!p||isNaN(p))return"0.00 m²";switch(t.measureUnits.area){case"ha":return(p/1e4).toFixed(4)+" ha";case"km2":return(p/1e6).toFixed(6)+" km²";default:return p.toFixed(2)+" m²"}}function l(p){let m=0;for(let b=1;b_+E.lat,0)/b,x=111319.9,S=x*Math.cos(g*Math.PI/180);return Math.abs(m/2)*x*S}function u(p,m){const b=document.createElement("a");b.href=URL.createObjectURL(p),b.download=m,b.click(),URL.revokeObjectURL(b.href)}function d(p){return p!==null&&p.name.toLowerCase().endsWith(".dxf")}function h(p){return p<1024?p+" B":p<1024*1024?(p/1024).toFixed(1)+" KB":(p/(1024*1024)).toFixed(2)+" MB"}function f(){t.reset(),e("Hệ thống đã reset","info")}return{log:e,busy:n,ready:i,setError:s,showLoading:r,formatDistance:o,formatArea:a,formatFileSize:h,calculateTotalDistance:l,calculateArea:c,downloadBlob:u,isValidDxfFile:d,reset:f}}rr.create({baseURL:Ll.API_URL,timeout:3e4});const xI=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),OJ=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,n,i)=>i?i.toUpperCase():n.toLowerCase()),DJ=t=>{const e=OJ(t);return e.charAt(0).toUpperCase()+e.slice(1)},NJ=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim(),SI=t=>t==="";var pv={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const BJ=({name:t,iconNode:e,absoluteStrokeWidth:n,"absolute-stroke-width":i,strokeWidth:s,"stroke-width":r,size:o=pv.width,color:a=pv.stroke,...l},{slots:c})=>tn("svg",{...pv,...l,width:o,height:o,stroke:a,"stroke-width":SI(n)||SI(i)||n===!0||i===!0?Number(s||r||pv["stroke-width"])*24/Number(o):s||r||pv["stroke-width"],class:NJ("lucide",l.class,...t?[`lucide-${xI(DJ(t))}-icon`,`lucide-${xI(t)}`]:["lucide-icon"])},[...e.map(u=>tn(...u)),...c.default?[c.default()]:[]]);const ui=(t,e)=>(n,{slots:i,attrs:s})=>tn(BJ,{...s,...n,iconNode:e,name:t},i);const FJ=ui("braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const zJ=ui("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);const l0=ui("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const UJ=ui("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);const $J=ui("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);const VJ=ui("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);const vT=ui("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const HJ=ui("cloud-download",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);const NF=ui("crosshair",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"22",x2:"18",y1:"12",y2:"12",key:"l9bcsi"}],["line",{x1:"6",x2:"2",y1:"12",y2:"12",key:"13hhkx"}],["line",{x1:"12",x2:"12",y1:"6",y2:"2",key:"10w3f3"}],["line",{x1:"12",x2:"12",y1:"22",y2:"18",key:"15g9kq"}]]);const yT=ui("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);const BF=ui("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);const WJ=ui("earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);const GJ=ui("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]);const bT=ui("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);const jJ=ui("file-cog",[["path",{d:"M13.85 22H18a2 2 0 0 0 2-2V8a2 2 0 0 0-.586-1.414l-4-4A2 2 0 0 0 14 2H6a2 2 0 0 0-2 2v6.6",key:"1l4p50"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m3.305 19.53.923-.382",key:"ao1pio"}],["path",{d:"m4.228 16.852-.924-.383",key:"1fv9zy"}],["path",{d:"m5.852 15.228-.383-.923",key:"1a9hc2"}],["path",{d:"m5.852 20.772-.383.924",key:"1sh9ke"}],["path",{d:"m8.148 15.228.383-.923",key:"4yu6lf"}],["path",{d:"m8.53 21.696-.382-.924",key:"18b0s9"}],["path",{d:"m9.773 16.852.922-.383",key:"ti6xop"}],["path",{d:"m9.773 19.148.922.383",key:"rws47d"}],["circle",{cx:"7",cy:"18",r:"3",key:"lvkj7j"}]]);const KJ=ui("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const qJ=ui("file-up",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"m15 15-3-3-3 3",key:"15xj92"}]]);const YJ=ui("flask-conical",[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]);const XJ=ui("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);const ZJ=ui("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);const FF=ui("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);const JJ=ui("inbox",[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]]);const zF=ui("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);const QJ=ui("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);const eQ=ui("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);const D0=ui("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);const tQ=ui("map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);const nQ=ui("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]);const iQ=ui("mountain",[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]]);const sQ=ui("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);const UF=ui("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);const rQ=ui("play",[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]);const oQ=ui("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const aQ=ui("radio",[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]);const U_=ui("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);const EI=ui("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);const c0=ui("ruler",[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]);const lQ=ui("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);const _T=ui("scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);const $F=ui("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);const OA=ui("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);const cQ=ui("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);const uQ=ui("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);const VF=ui("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);const dQ=ui("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const hQ=ui("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);const fQ=ui("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);const Lh=ui("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);const pQ=ui("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);const mQ=ui("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),gQ={class:"upload-section"},vQ={class:"upload-icon-small"},yQ={key:0,class:"file-card"},bQ={class:"file-meta"},_Q={class:"file-name"},wQ={class:"file-stats"},xQ=Be({__name:"FileUpload",setup(t){const e=Xo(),{hasFile:n,filename:i,layerCount:s}=cd(e),{uploadFile:r,getDxfFileUrl:o,saveFileToClientStorage:a}=Dg(),{log:l,busy:c,ready:u,showLoading:d,isValidDxfFile:h,setError:f}=Ng(),p=dd(),m=X(!1),b=X(null);function g(I){I.preventDefault(),m.value=!0}function x(){m.value=!1}function S(I){I.preventDefault(),m.value=!1;const P=I.dataTransfer?.files[0];P&&T(P)}function _(I){const P=I.target,k=P.files?.[0];k&&T(k),P&&(P.value="")}function E(){b.value?.click()}async function T(I){if(!h(I)){p.error("Chỉ chấp nhận file .DXF");return}l(`Đang tải: ${I.name}`,"info"),c(),d(!0);try{const P=await r(I);e.setFileLoaded(P.file_id,I.name),e.setLayers(P.layers);const k=o(P.file_id);e.setDxfFileUrl(k);try{const B=await I.arrayBuffer();await a({id:P.file_id,filename:I.name,size:I.size,uploadDate:new Date,rawContent:B,layers:P.layers.map(R=>({name:R.name,entityCount:R.entity_count,color:R.color}))}),l("Đã lưu vào kho dữ liệu cục bộ","info")}catch(B){console.warn("Could not save to client storage:",B)}l(`Tải thành công: ${P.layers.length} layers`,"success"),p.success(`Đã tải ${I.name}`),d(!1),u()}catch(P){l(`Lỗi upload: ${P.message}`,"error"),p.error("Lỗi tải file"),d(!1),f()}}function A(){e.clearFile(),l("Đã xóa file","info"),p.info("Đã xóa file")}return(I,P)=>(z(),se("div",gQ,[Ue(I.$slots,"trigger",{triggerUpload:E},()=>[v(n)?Le("",!0):(z(),se("div",{key:0,class:J(["upload-zone-compact",{dragover:m.value}]),onClick:E,onDragover:g,onDragleave:x,onDrop:S},[U("div",vQ,[de(v(qJ),{size:20})]),P[0]||(P[0]=U("div",{class:"upload-text"},[U("span",{class:"upload-main"},"Kéo thả hoặc click"),U("span",{class:"upload-sub"},"Chỉ hỗ trợ file .DXF")],-1))],34))],!0),U("input",{ref_key:"fileInput",ref:b,type:"file",accept:".dxf",onChange:_,style:{display:"none"}},null,544),v(n)&&!I.$slots.trigger?(z(),se("div",yQ,[de(v(jJ),{size:20,class:"file-icon"}),U("div",bQ,[U("span",_Q,Xe(v(i)),1),U("span",wQ,Xe(v(s))+" layers",1)]),U("button",{class:"file-remove",onClick:A,title:"Xóa"},[de(v(Lh),{size:14})])])):Le("",!0)]))}}),Zo=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},SQ=Zo(xQ,[["__scopeId","data-v-18c82a37"]]),EQ={class:"disc-selector"},CQ={class:"disc-modes"},TQ={key:0,class:"disc-scale"},MQ=["value"],AQ=["value"],kQ={class:"disc-info"},PQ={key:0,class:"info-text"},LQ={key:1,class:"info-text"},IQ=Be({__name:"DiscretizationSelector",props:{modelValue:{default:"legal"},mapScale:{default:2e3}},emits:["update:modelValue","update:mapScale"],setup(t,{emit:e}){const n=t,i=e,s=X(n.modelValue),r=X(n.mapScale),o=[500,1e3,2e3,5e3,1e4];We(()=>n.modelValue,c=>{s.value=c}),We(()=>n.mapScale,c=>{r.value=c});function a(c){s.value=c,i("update:modelValue",c)}function l(c){const u=parseInt(c.target.value,10);r.value=u,i("update:mapScale",u)}return(c,u)=>(z(),se("div",EQ,[u[5]||(u[5]=U("div",{class:"disc-header"},[U("span",{class:"disc-label"},"Độ chính xác:"),U("span",{class:"disc-badge"},"v2.0")],-1)),U("div",CQ,[U("button",{class:J(["disc-mode-btn",{active:s.value==="legal"}]),onClick:u[0]||(u[0]=d=>a("legal"))},[...u[2]||(u[2]=[U("span",{class:"mode-icon"},"📜",-1),U("span",{class:"mode-text"},"Pháp lý",-1),U("span",{class:"mode-desc"},"≤1.5cm",-1)])],2),U("button",{class:J(["disc-mode-btn",{active:s.value==="field"}]),onClick:u[1]||(u[1]=d=>a("field"))},[...u[3]||(u[3]=[U("span",{class:"mode-icon"},"🗺️",-1),U("span",{class:"mode-text"},"Thực địa",-1),U("span",{class:"mode-desc"},"Theo tỷ lệ",-1)])],2)]),s.value==="field"?(z(),se("div",TQ,[u[4]||(u[4]=U("label",{class:"scale-label"},"Tỷ lệ bản đồ:",-1)),U("select",{class:"scale-select",value:r.value,onChange:l},[(z(),se(At,null,yn(o,d=>U("option",{key:d,value:d}," 1:"+Xe(d.toLocaleString()),9,AQ)),64))],40,MQ)])):Le("",!0),U("div",kQ,[s.value==="legal"?(z(),se("span",PQ," Tuân thủ TT 26/2024/TT-BTNMT, sai số ≤ 1.5cm ")):(z(),se("span",LQ," Tối ưu hiển thị tỷ lệ 1:"+Xe(r.value.toLocaleString()),1))])]))}}),RQ=Zo(IQ,[["__scopeId","data-v-34d3e8e2"]]),OQ={key:0,class:"autofill-notice"},DQ={class:"mode-tabs"},NQ={key:1,class:"params-group"},BQ=["value"],FQ={class:"search-wrapper"},zQ={class:"search-input-wrap"},UQ=["value"],$Q={key:0,class:"search-dropdown"},VQ=["onMousedown"],HQ={class:"province-info"},WQ={class:"province-name"},GQ={class:"province-meridian"},jQ={key:0,class:"selected-zone-info"},KQ={class:"zone-display"},qQ={class:"zone-detail"},YQ={class:"zone-name"},XQ={class:"zone-meridian"},ZQ={class:"checkbox-wrap"},JQ=["checked"],QQ={key:2,class:"params-group"},eee={class:"ref-points-list"},tee={class:"ref-point-header"},nee=["onClick"],iee={class:"ref-inputs"},see={class:"input-row"},ree=["value","onInput"],oee={class:"input-row"},aee=["value","onInput"],lee={class:"input-row"},cee=["value","onInput"],uee={class:"input-row"},dee=["value","onInput"],hee={key:0,class:"ref-empty"},fee=["disabled"],pee=Be({__name:"CoordinateConverter",setup(t){const e=Xo(),{hasFile:n,fileId:i,layers:s,coordinateMode:r,coordinateStandard:o,referencePoints:a,lastConversionSettings:l}=cd(e),{getProvinces:c,convertCoordinates:u}=Dg(),{log:d,busy:h,ready:f,showLoading:p,setError:m}=Ng(),{displayGeoJSON:b}=Fy(),g=dd(),x=X([]),S=X(""),_=X(""),E=X(!1),T=X(!1),A=X(!1),I=X("legal"),P=X(2e3),k=F(()=>{const ce=_.value.toLowerCase().trim();return ce?x.value.filter(ae=>ae.name.toLowerCase().includes(ce)).slice(0,10):x.value}),B=F(()=>{const ce=S.value;return ce&&x.value.find(ae=>ae.code===ce)||null}),R=F(()=>n.value?r.value==="vn2000"?!!S.value:a.value.length>=2:!1);mn(async()=>{await H()}),We(l,ce=>{ce?.coordinate_system&&ce.province&&q(ce)},{immediate:!0});async function H(){try{x.value=await c()}catch(ce){d(`Lỗi tải provinces: ${ce.message}`,"error")}}function q(ce){const ae=()=>{if(x.value.length>0&&ce.province){const _e=x.value.find(ke=>ke.code===ce.province||ke.name.toLowerCase().includes(ce.province.toLowerCase()));_e&&(S.value=_e.code,_.value=`${_e.name} (${_e.meridian_display})`,A.value=!0,setTimeout(()=>{A.value=!1},5e3))}};x.value.length>0?ae():setTimeout(ae,500)}function oe(ce){e.setCoordinateMode(ce)}function Z(ce){const ae=ce.target.value;_.value=ae,E.value=!0}function V(){setTimeout(()=>{E.value=!1},200)}function D(ce){S.value=ce.code,_.value=`${ce.name} (${ce.meridian_display})`,E.value=!1}function K(ce){const ae=ce.target.value;e.setCoordinateStandard(ae)}function W(){const ce={cad:{x:0,y:0},geo:{lat:0,lng:0}};e.addReferencePoint(ce)}function Q(ce){e.removeReferencePoint(ce)}function ie(ce,ae,_e,ke){const Te=parseFloat(ke.target.value)||0,Ke=a.value[ce];if(!Ke)return;const Fe={cad:{x:Ke.cad.x,y:Ke.cad.y},geo:{lat:Ke.geo.lat,lng:Ke.geo.lng}};ae==="cad"?_e==="x"?Fe.cad.x=Te:_e==="y"&&(Fe.cad.y=Te):_e==="lat"?Fe.geo.lat=Te:_e==="lng"&&(Fe.geo.lng=Te),e.updateReferencePoint(ce,Fe)}async function ne(){if(!i.value){g.error("Vui lòng tải file DXF trước");return}const ce=s.value.map(_e=>_e.name);if(ce.length===0){g.error("Không có layer nào để chuyển đổi");return}d(`Bắt đầu chuyển đổi ${ce.length} layers...`,"info"),h(),p(!0);const ae={file_id:i.value,coordinate_system:r.value,zone_standard:o.value,swap_xy:T.value,selected_layers:ce,discretization_mode:I.value,map_scale:I.value==="field"?P.value:void 0};r.value==="vn2000"?ae.province=S.value:ae.reference_points=a.value;try{const _e=await u(ae),ke=_e.geojson||_e;b(ke),_e.performance&&d(`Chuyển đổi ${_e.performance.geometry_count} hình học trong ${_e.performance.total_time_ms}ms`,"info"),d("Chuyển đổi thành công!","success"),g.success(`Đã chuyển đổi ${ce.length} layers`),p(!1),f()}catch(_e){d(`Lỗi chuyển đổi: ${_e.message}`,"error"),g.error("Lỗi chuyển đổi tọa độ"),p(!1),m()}}return(ce,ae)=>(z(),se("div",{class:J(["coord-section",{disabled:!v(n)}])},[A.value?(z(),se("div",OQ,[de(v(vT),{size:12}),ae[6]||(ae[6]=U("span",null,"Đã tự động điền từ lần chuyển đổi trước",-1))])):Le("",!0),U("div",DQ,[U("button",{class:J(["mode-tab",{active:v(r)==="vn2000"}]),onClick:ae[0]||(ae[0]=_e=>oe("vn2000"))},[de(v(D0),{size:14}),ae[7]||(ae[7]=cn(" VN-2000 ",-1))],2),U("button",{class:J(["mode-tab",{active:v(r)==="local"}]),onClick:ae[1]||(ae[1]=_e=>oe("local"))},[de(v(NF),{size:14}),ae[8]||(ae[8]=cn(" Ghép điểm ",-1))],2)]),v(r)==="vn2000"?(z(),se("div",NQ,[ae[13]||(ae[13]=U("label",{class:"input-label"},"Bộ quy chuẩn:",-1)),U("select",{class:"input-field",value:v(o),onChange:K},[...ae[9]||(ae[9]=[U("option",{value:"v1"},"QCVN 80:2024 - Múi 3°",-1),U("option",{value:"v2"},"TT 24/2025 - Múi 3°",-1)])],40,BQ),ae[14]||(ae[14]=U("label",{class:"input-label"},"Chọn Tỉnh/Thành phố:",-1)),U("div",FQ,[U("div",zQ,[de(v($F),{size:14,class:"search-icon"}),U("input",{type:"text",class:"input-field search-input",placeholder:"Tìm tỉnh/thành phố...",value:_.value,onInput:Z,onFocus:ae[2]||(ae[2]=_e=>E.value=!0),onBlur:V},null,40,UQ)]),E.value&&k.value.length>0?(z(),se("div",$Q,[(z(!0),se(At,null,yn(k.value,_e=>(z(),se("div",{key:_e.code,class:J(["dropdown-item",{selected:S.value===_e.code}]),onMousedown:ke=>D(_e)},[U("div",HQ,[U("span",WQ,Xe(_e.name),1),U("span",GQ,Xe(_e.meridian_display),1)])],42,VQ))),128))])):Le("",!0)]),B.value?(z(),se("div",jQ,[U("div",KQ,[ae[10]||(ae[10]=U("span",{class:"zone-label"},"Hệ tọa độ đã chọn:",-1)),U("div",qQ,[U("span",YQ,Xe(B.value?.name),1),U("span",XQ,"Kinh tuyến trục: "+Xe(B.value?.meridian_display),1)])])])):Le("",!0),U("label",ZQ,[U("input",{type:"checkbox",checked:T.value,onChange:ae[3]||(ae[3]=_e=>T.value=!T.value)},null,40,JQ),ae[11]||(ae[11]=U("span",{class:"checkbox-custom"},null,-1)),ae[12]||(ae[12]=U("span",{class:"checkbox-text"},"Đảo trục X ↔ Y",-1))])])):Le("",!0),v(r)==="local"?(z(),se("div",QQ,[ae[20]||(ae[20]=U("p",{class:"input-hint"},"Ghép ít nhất 2 điểm CAD với vị trí trên bản đồ",-1)),U("div",eee,[(z(!0),se(At,null,yn(v(a),(_e,ke)=>(z(),se("div",{key:ke,class:"ref-point-card"},[U("div",tee,[U("span",null,"Điểm "+Xe(ke+1),1),U("button",{class:"btn-remove",onClick:Te=>Q(ke)},[de(v(Lh),{size:12})],8,nee)]),U("div",iee,[U("div",see,[ae[15]||(ae[15]=U("label",null,"CAD X:",-1)),U("input",{type:"number",class:"input-small",value:_e.cad.x,onInput:Te=>ie(ke,"cad","x",Te)},null,40,ree)]),U("div",oee,[ae[16]||(ae[16]=U("label",null,"CAD Y:",-1)),U("input",{type:"number",class:"input-small",value:_e.cad.y,onInput:Te=>ie(ke,"cad","y",Te)},null,40,aee)]),U("div",lee,[ae[17]||(ae[17]=U("label",null,"Lat:",-1)),U("input",{type:"number",class:"input-small",value:_e.geo.lat,step:"0.000001",onInput:Te=>ie(ke,"geo","lat",Te)},null,40,cee)]),U("div",uee,[ae[18]||(ae[18]=U("label",null,"Lng:",-1)),U("input",{type:"number",class:"input-small",value:_e.geo.lng,step:"0.000001",onInput:Te=>ie(ke,"geo","lng",Te)},null,40,dee)])])]))),128)),v(a).length===0?(z(),se("div",hee," Chưa có điểm tham chiếu ")):Le("",!0)]),U("button",{class:"btn-add",onClick:W},[de(v(oQ),{size:14}),ae[19]||(ae[19]=cn(" Thêm điểm ",-1))])])):Le("",!0),de(RQ,{modelValue:I.value,"onUpdate:modelValue":ae[4]||(ae[4]=_e=>I.value=_e),"map-scale":P.value,"onUpdate:mapScale":ae[5]||(ae[5]=_e=>P.value=_e)},null,8,["modelValue","map-scale"]),U("button",{class:"btn-confirm",disabled:!R.value,onClick:ne},[de(v(vT),{size:16}),ae[21]||(ae[21]=cn(" Xác nhận thông số ",-1))],8,fee)],2))}}),mee=Zo(pee,[["__scopeId","data-v-67256858"]]),gee={class:"layers-header"},vee={class:"select-all-wrap"},yee=["checked","indeterminate","disabled"],bee={class:"selected-count"},_ee={class:"search-input-wrap"},wee=["value","disabled"],xee={class:"layers-list"},See=["checked","onChange"],Eee={class:"layer-name"},Cee={class:"layer-count"},Tee={key:0,class:"layers-empty"},Mee=Be({__name:"LayerVisibility",setup(t){const e=Xo(),{hasFile:n,layers:i,selectedLayers:s,layerCount:r,allLayersSelected:o}=cd(e),{setLayerVisibility:a}=Fy(),l=X(""),c=F(()=>{const m=l.value.toLowerCase();return m?i.value.filter(b=>b.name.toLowerCase().includes(m)):i.value}),u=F(()=>{const m=s.value.size,b=r.value;return m>0&&m{a(g.name,!0)})):(e.deselectAllLayers(),i.value.forEach(g=>{a(g.name,!1)}))}function f(m){e.toggleLayerSelection(m);const b=s.value.has(m);a(m,b)}function p(m){const b=m.target;l.value=b.value}return(m,b)=>(z(),se("div",{class:J(["layers-section",{disabled:!v(n)}])},[U("div",gee,[U("label",vee,[U("input",{type:"checkbox",checked:v(o),indeterminate:u.value,onChange:h,disabled:!v(n)},null,40,yee),b[0]||(b[0]=U("span",{class:"select-label"},"Chọn tất cả",-1))]),U("span",bee,Xe(v(s).size)+"/"+Xe(v(r)),1)]),U("div",_ee,[de(v($F),{size:14,class:"search-icon"}),U("input",{type:"text",placeholder:"Tìm layer...",class:"input-field search-input",value:l.value,onInput:p,disabled:!v(n)},null,40,wee)]),U("div",xee,[(z(!0),se(At,null,yn(c.value,g=>(z(),se("label",{key:g.name,class:J(["layer-row",{selected:d(g.name)}])},[U("input",{type:"checkbox",checked:d(g.name),onChange:x=>f(g.name)},null,40,See),U("div",{class:"layer-color",style:Ht({background:g.color||"#3b82f6"})},null,4),U("span",Eee,Xe(g.name),1),U("span",Cee,Xe(g.entity_count),1)],2))),128)),c.value.length===0?(z(),se("div",Tee,[l.value?(z(),se(At,{key:0},[cn("Không tìm thấy layer")],64)):v(n)?(z(),se(At,{key:1},[cn("Không có layer")],64)):(z(),se(At,{key:2},[cn("Chưa có dữ liệu")],64))])):Le("",!0)])],2))}}),Aee=Zo(Mee,[["__scopeId","data-v-7dc245e0"]]),kee={class:"modal-container"},Pee={class:"modal-header"},Lee={class:"header-title"},Iee={class:"header-actions"},Ree=["disabled"],Oee={key:0,class:"stats-bar"},Dee={class:"stat"},Nee={class:"stat-value"},Bee={class:"stat"},Fee={class:"stat-value"},zee={class:"modal-body"},Uee={key:0,class:"empty-state"},$ee={key:1,class:"empty-state"},Vee={key:2,class:"file-list"},Hee=["onClick"],Wee={class:"file-icon"},Gee={class:"file-info"},jee=["title"],Kee={class:"file-meta"},qee={key:0,class:"layer-count"},Yee={class:"file-actions"},Xee=["onClick","disabled"],Zee=["onClick"],Jee=Be({__name:"FileStorageModal",emits:["close","fileLoaded"],setup(t,{emit:e}){const n=e,i=Dg(),s=Xo(),r=dd(),o=X([]),a=X(null),l=X(!0),c=X(null),u=X(null),d=F(()=>o.value.length>0);async function h(){l.value=!0;try{o.value=await i.getStoredFiles()}catch(E){console.error("Failed to load files:",E),r.error("Không thể tải danh sách file")}finally{l.value=!1}}async function f(){try{a.value=await i.getStorageStats()}catch(E){console.error("Failed to load stats:",E)}}function p(E){u.value=E.file_id}async function m(E){c.value=E.file_id;try{const T=await i.loadFileFromStorage(E.file_id);s.setFileLoaded(T.file_id,T.filename);const A=T.layers.map(P=>({name:P.name,entity_count:P.entity_count,color:P.color||"#ffffff",visible:!0}));s.setLayers(A),T.last_conversion&&(s.setLastConversionSettings({coordinate_system:T.last_conversion.coordinate_system,province:T.last_conversion.province,district:T.last_conversion.district}),T.last_conversion.coordinate_system==="vn2000"?s.setCoordinateMode("vn2000"):T.last_conversion.coordinate_system==="local"&&s.setCoordinateMode("local"));const I=i.getDxfFileUrl(T.file_id);s.setDxfFileUrl(I),n("fileLoaded",{file_id:T.file_id,layers:T.layers}),r.success(`Đã tải file: ${T.filename}${T.from_storage?" (từ kho lưu trữ)":""}`),n("close")}catch(T){console.error("Failed to load file:",T),r.error("Không thể tải file")}finally{c.value=null}}async function b(E){if(!confirm(`Bạn có chắc muốn xóa file "${E.filename}"?`))return;const T=[...o.value];o.value=o.value.filter(A=>A.file_id!==E.file_id);try{await i.deleteFile(E.file_id),r.success(`Đã xóa file: ${E.filename}`),f()}catch(A){o.value=T,console.error("Failed to delete file:",A),r.error("Không thể xóa file")}}function g(E){return E<1024?`${E.toFixed(1)} KB`:`${(E/1024).toFixed(1)} MB`}function x(E){return new Date(E).toLocaleDateString("vi-VN",{day:"2-digit",month:"2-digit",year:"numeric"})}function S(E,T=25){if(E.length<=T)return E;const A=E.split(".").pop()||"";return E.slice(0,E.length-A.length-1).slice(0,T-A.length-4)+"..."+A}function _(E){E.target.classList.contains("modal-backdrop")&&n("close")}return mn(()=>{h(),f()}),(E,T)=>(z(),se("div",{class:"modal-backdrop",onClick:_},[U("div",kee,[U("div",Pee,[U("div",Lee,[de(v(XJ),{size:20,class:"header-icon"}),T[1]||(T[1]=U("h3",null,"Kho Dữ Liệu",-1))]),U("div",Iee,[U("button",{class:"btn-icon",onClick:h,disabled:l.value,title:"Làm mới"},[de(v(U_),{size:16,class:J({spinning:l.value})},null,8,["class"])],8,Ree),U("button",{class:"btn-icon btn-close",onClick:T[0]||(T[0]=A=>n("close")),title:"Đóng"},[de(v(Lh),{size:16})])])]),a.value?(z(),se("div",Oee,[U("div",Dee,[U("span",Nee,Xe(a.value.total_files),1),T[2]||(T[2]=U("span",{class:"stat-label"},"Files",-1))]),U("div",Bee,[U("span",Fee,Xe(a.value.total_size_mb.toFixed(1))+" MB",1),T[3]||(T[3]=U("span",{class:"stat-label"},"Tổng",-1))])])):Le("",!0),U("div",zee,[l.value?(z(),se("div",Uee,[de(v(U_),{size:36,class:"spinning"}),T[4]||(T[4]=U("p",null,"Đang tải...",-1))])):d.value?(z(),se("div",Vee,[(z(!0),se(At,null,yn(o.value,A=>(z(),se("div",{key:A.file_id,class:J(["file-item",{selected:u.value===A.file_id}]),onClick:I=>p(A)},[U("div",Wee,[de(v(KJ),{size:20})]),U("div",Gee,[U("div",{class:"file-name",title:A.filename},Xe(S(A.filename)),9,jee),U("div",Kee,[cn(Xe(g(A.size_kb))+" • "+Xe(x(A.upload_date))+" ",1),A.layer_count?(z(),se("span",qee," • "+Xe(A.layer_count)+" layers ",1)):Le("",!0)])]),U("div",Yee,[U("button",{class:"btn-action btn-load",onClick:un(I=>m(A),["stop"]),disabled:c.value===A.file_id,title:"Tải vào để sử dụng"},[c.value!==A.file_id?(z(),De(v(rQ),{key:0,size:14})):(z(),De(v(U_),{key:1,size:14,class:"spinning"}))],8,Xee),U("button",{class:"btn-action btn-delete",onClick:un(I=>b(A),["stop"]),title:"Xóa file"},[de(v(VF),{size:14})],8,Zee)])],10,Hee))),128))])):(z(),se("div",$ee,[de(v(JJ),{size:48}),T[5]||(T[5]=U("p",null,"Chưa có file nào",-1)),T[6]||(T[6]=U("small",null,"Upload file DXF để bắt đầu",-1))]))])])]))}}),Qee=Zo(Jee,[["__scopeId","data-v-5d8dd29f"]]),ete={class:"panel-scroll"},tte={href:"https://cmbvn.com.vn",target:"_blank",rel:"noopener",class:"brand-header"},nte={class:"section-card"},ite={key:0,class:"card-content source-content"},ste={class:"source-buttons"},rte={class:"section-card"},ote={key:0,class:"card-content"},ate={class:"section-card section-layers"},lte={key:0,class:"card-content layers-content"},cte=Be({__name:"LeftPanel",setup(t,{expose:e}){const n=Xo(),{layers:i}=cd(n),s=X(!1),r=X(new Set),o=X(!1);We(()=>n.appState,(m,b)=>{if(b==="busy"&&m==="ready"&&i.value.length>0){const g=new Set(r.value);g.add("coords"),r.value=g}});function a(){s.value=!s.value}function l(m){const b=new Set(r.value);b.has(m)?b.delete(m):b.add(m),r.value=b}function c(m){return r.value.has(m)}function u(){o.value=!0}function d(){o.value=!1}function h(){o.value=!1}function f(){const m=document.querySelector('.hidden-upload input[type="file"]');m&&m.click()}function p(){const m=new Set(r.value);m.add("coords"),r.value=m}return e({collapseCoords:p}),(m,b)=>(z(),se(At,null,[U("aside",{class:J(["panel panel-left",{collapsed:s.value}])},[U("button",{class:"panel-toggle",onClick:a},[de(v(UJ),{size:14})]),U("div",ete,[U("a",tte,[b[3]||(b[3]=U("img",{src:"https://cmbvn.com.vn/wp-content/uploads/2022/01/Logo.png",alt:"CMB Logo",class:"brand-logo"},null,-1)),b[4]||(b[4]=U("div",{class:"brand-info"},[U("span",{class:"brand-name"},"CAD2MAP"),U("span",{class:"brand-sub"},"CMB-AI Tool")],-1)),de(v(bT),{size:12,class:"brand-external"})]),U("div",nte,[U("div",{class:"card-header-mini",onClick:b[0]||(b[0]=g=>l("source"))},[de(v(yT),{size:16,class:"header-icon"}),b[5]||(b[5]=U("span",{class:"header-title"},"NGUỒN DỮ LIỆU",-1)),de(v(l0),{size:14,class:J(["chevron",{collapsed:c("source")}])},null,8,["class"])]),c("source")?Le("",!0):(z(),se("div",ite,[U("div",ste,[U("button",{class:"source-btn",onClick:u,title:"Mở kho dữ liệu"},[de(v(yT),{size:20}),b[6]||(b[6]=U("span",null,"Kho dữ liệu",-1))]),U("button",{class:"source-btn upload-btn",onClick:f,title:"Tải lên file DXF"},[de(v(hQ),{size:20}),b[7]||(b[7]=U("span",null,"Tải lên",-1))])]),de(SQ,{ref:"fileUploadRef",class:"hidden-upload"},null,512)]))]),U("div",rte,[U("div",{class:"card-header-mini",onClick:b[1]||(b[1]=g=>l("coords"))},[de(v(WJ),{size:16,class:"header-icon"}),b[8]||(b[8]=U("span",{class:"header-title"},"HỆ TỌA ĐỘ",-1)),de(v(l0),{size:14,class:J(["chevron",{collapsed:c("coords")}])},null,8,["class"])]),c("coords")?Le("",!0):(z(),se("div",ote,[de(mee)]))]),U("div",ate,[U("div",{class:"card-header-mini",onClick:b[2]||(b[2]=g=>l("layers"))},[de(v(QJ),{size:16,class:"header-icon"}),b[9]||(b[9]=U("span",{class:"header-title"},"QUẢN LÝ LỚP",-1)),de(v(l0),{size:14,class:J(["chevron",{collapsed:c("layers")}])},null,8,["class"])]),c("layers")?Le("",!0):(z(),se("div",lte,[de(Aee)]))])])],2),(z(),De(uh,{to:"body"},[o.value?(z(),De(Qee,{key:0,onClose:d,onFileLoaded:h})):Le("",!0)]))],64))}}),ute=Zo(cte,[["__scopeId","data-v-0f67abbf"]]),CI=X(0);function qw(){const t=Xo(),{getMap:e,getMeasureLayer:n,setCursor:i}=Fy(),s=Ng(),r=dd(),o=F(()=>t.activeTool),a=F(()=>t.activeMeasures),l=F(()=>t.measureStyles);function c(Z){if(t.activeTool===Z)t.setActiveTool(null),i("");else{t.setActiveTool(Z),i("crosshair"),Z==="line"?E("area"):Z==="area"&&E("line");const D={pin:"Ghim điểm",line:"Đo khoảng cách",area:"Đo diện tích"};Z&&r.info(`🛠️ ${D[Z]} - Click để thêm điểm. Click phải để xóa.`)}}function u(Z){const V=t.activeTool;if(V)switch(V){case"pin":d(Z);break;case"line":f(Z);break;case"area":g(Z);break}}function d(Z){const V=n();if(!V)return;const D=t.activeMeasures,K=D.pins||[],W=K.length+1,Q=qi.marker(Z,{icon:qi.divIcon({className:"pin-marker",html:`
${W}
`,iconSize:[28,28],iconAnchor:[14,28]})});Q._pinIndex=W-1,Q.bindPopup(`
📍 Ghim #${W}
Lat: ${Z.lat.toFixed(6)}
Lng: ${Z.lng.toFixed(6)}
`),Q.on("click",()=>Q.openPopup()),Q.on("contextmenu",ne=>{qi.DomEvent.preventDefault(ne.originalEvent),qi.DomEvent.stopPropagation(ne.originalEvent),h(Q._pinIndex)}),Q.addTo(V);const ie={id:`pin_${W}`,latlng:Z,marker:Q,label:`P${W}`};t.setActiveMeasures({...D,pins:[...K,ie]}),r.success(`📍 Ghim #${W} tại ${Z.lat.toFixed(4)}, ${Z.lng.toFixed(4)}`)}function h(Z){const V=n(),D=t.activeMeasures;if(!V||!D.pins)return;const K=D.pins;if(Z<0||Z>=K.length)return;const W=K[Z];if(!W)return;V.removeLayer(W.marker);const Q=K.filter((ie,ne)=>ne!==Z);Q.forEach((ie,ne)=>{const ce=ne+1;ie.marker._pinIndex=ne,ie.label=`P${ce}`,ie.marker.setIcon(qi.divIcon({className:"pin-marker",html:`
${ce}
`,iconSize:[28,28],iconAnchor:[14,28]})),ie.marker.setPopupContent(`
📍 Ghim #${ce}
Lat: ${ie.latlng.lat.toFixed(6)}
Lng: ${ie.latlng.lng.toFixed(6)}
`)}),t.setActiveMeasures({...D,pins:Q}),r.info("🗑️ Đã xóa ghim")}function f(Z){const V=n();if(!V)return;const D=t.activeMeasures,K=t.measureStyles;if(D.line){const W=D.line.points,Q=D.line.markers,ie=W.length,ne=p(Z,ie,K.lineColor);ne.addTo(V),t.setActiveMeasures({...D,line:{...D.line,points:[...W,Z],markers:[...Q,ne]}}),b()}else{const W={id:`line_${++CI.value}`,points:[Z],markers:[]},Q=p(Z,0,K.lineColor);Q.addTo(V),W.markers.push(Q),t.setActiveMeasures({...D,line:W})}}function p(Z,V,D){const K=V+1,W=qi.marker(Z,{draggable:!0,icon:qi.divIcon({className:"measure-point",html:`
${K}
`,iconSize:[20,20],iconAnchor:[10,10]})});return W._pointIndex=V,W.on("drag",()=>{const Q=W._pointIndex,ie=t.activeMeasures;if(ie.line){const ne=[...ie.line.points];ne[Q]=W.getLatLng(),t.setActiveMeasures({...ie,line:{...ie.line,points:ne}}),b()}}),W.on("dragend",()=>{b()}),W.on("contextmenu",Q=>{qi.DomEvent.preventDefault(Q.originalEvent),qi.DomEvent.stopPropagation(Q.originalEvent),m(W._pointIndex)}),W}function m(Z){const V=n(),D=t.activeMeasures;if(!V||!D.line)return;const K=D.line,W=K.points,Q=K.markers;if(W.length<=1){E("line"),r.info("🗑️ Đã xóa đường đo");return}V.removeLayer(Q[Z]);const ie=W.filter((ae,_e)=>_e!==Z),ne=Q.filter((ae,_e)=>_e!==Z),ce=t.measureStyles;ne.forEach((ae,_e)=>{ae._pointIndex=_e,q(ae,_e,ce.lineColor)}),t.setActiveMeasures({...D,line:{...D.line,points:ie,markers:ne}}),b(),r.info("🗑️ Đã xóa điểm")}function b(){const Z=n(),V=e(),D=t.activeMeasures;if(!Z||!D.line)return;const K=D.line,W=K.points,Q=K.markers,ie=t.measureStyles;K.polyline&&Z.removeLayer(K.polyline),K.distanceLabels&&K.distanceLabels.forEach(ae=>Z.removeLayer(ae));let ne;const ce=[];if(W.length>=2){if(ne=qi.polyline(W,{color:ie.lineColor,weight:ie.lineWeight}).addTo(Z),ie.showDistanceLabels&&V)for(let ae=0;aeae.setZIndexOffset(1e3))}t.setActiveMeasures({...D,line:{...D.line,polyline:ne,distanceLabels:ce}})}function g(Z){const V=n();if(!V)return;const D=t.activeMeasures,K=t.measureStyles;if(D.area){const W=D.area.points,Q=D.area.markers,ie=W.length,ne=x(Z,ie,K.areaColor);ne.addTo(V),t.setActiveMeasures({...D,area:{...D.area,points:[...W,Z],markers:[...Q,ne]}}),_()}else{const W={id:`area_${++CI.value}`,points:[Z],markers:[]},Q=x(Z,0,K.areaColor);Q.addTo(V),W.markers.push(Q),t.setActiveMeasures({...D,area:W})}}function x(Z,V,D){const K=V+1,W=qi.marker(Z,{draggable:!0,icon:qi.divIcon({className:"measure-point",html:`
${K}
`,iconSize:[20,20],iconAnchor:[10,10]})});return W._pointIndex=V,W.on("drag",()=>{const Q=W._pointIndex,ie=t.activeMeasures;if(ie.area){const ne=[...ie.area.points];ne[Q]=W.getLatLng(),t.setActiveMeasures({...ie,area:{...ie.area,points:ne}}),_()}}),W.on("dragend",()=>{_()}),W.on("contextmenu",Q=>{qi.DomEvent.preventDefault(Q.originalEvent),qi.DomEvent.stopPropagation(Q.originalEvent),S(W._pointIndex)}),W}function S(Z){const V=n(),D=t.activeMeasures;if(!V||!D.area)return;const K=D.area,W=K.points,Q=K.markers;if(W.length<=1){E("area"),r.info("🗑️ Đã xóa vùng đo");return}V.removeLayer(Q[Z]);const ie=W.filter((ae,_e)=>_e!==Z),ne=Q.filter((ae,_e)=>_e!==Z),ce=t.measureStyles;ne.forEach((ae,_e)=>{ae._pointIndex=_e,q(ae,_e,ce.areaColor)}),t.setActiveMeasures({...D,area:{...D.area,points:ie,markers:ne}}),_(),r.info("🗑️ Đã xóa điểm")}function _(){const Z=n(),V=e(),D=t.activeMeasures;if(!Z||!D.area)return;const K=D.area,W=K.points,Q=K.markers,ie=t.measureStyles;K.polygon&&Z.removeLayer(K.polygon),K.distanceLabels&&K.distanceLabels.forEach(ae=>Z.removeLayer(ae));let ne;const ce=[];if(W.length>=3){if(ne=qi.polygon(W,{color:ie.areaColor,fillColor:ie.areaColor,fillOpacity:ie.areaFillOpacity,weight:ie.areaWeight}).addTo(Z),ie.showDistanceLabels&&V)for(let ae=0;ae=60){const Fe=ae.distanceTo(_e),ve=qi.latLng((ae.lat+_e.lat)/2,(ae.lng+_e.lng)/2),fe=oe(ve,Fe,ie.areaColor);fe.addTo(Z),ce.push(fe)}}Q.forEach(ae=>ae.setZIndexOffset(1e3)),t.setActiveMeasures({...D,area:{...D.area,polygon:ne,distanceLabels:ce}})}function E(Z){const V=n(),D=t.activeMeasures;if(!V)return;const K=D[Z];K&&(K.markers.forEach(Q=>V.removeLayer(Q)),K.distanceLabels&&K.distanceLabels.forEach(Q=>V.removeLayer(Q)),K.polyline&&V.removeLayer(K.polyline),K.polygon&&V.removeLayer(K.polygon),t.setActiveMeasures({...D,[Z]:null}))}function T(){E("line"),E("area"),n()?.clearLayers(),t.setActiveTool(null),i(""),r.info("🗑️ Đã xóa tất cả đo đạc")}function A(){const Z=t.activeMeasures;if(!Z.line)return 0;const V=Z.line.points;return V.length<2?0:s.calculateTotalDistance(V)}function I(){return s.formatDistance(A())}function P(){const Z=t.activeMeasures;if(!Z.area)return 0;const V=Z.area.points;return V.length<3?0:s.calculateArea(V)}function k(){return s.formatArea(P())}function B(){const Z=t.activeMeasures;if(!Z.area)return 0;const V=Z.area.points;if(V.length<3)return 0;let D=s.calculateTotalDistance(V);return D+=V[V.length-1].distanceTo(V[0]),D}function R(){return s.formatDistance(B())}function H(){const Z=t.activeMeasures;Z.line&&b(),Z.area&&_()}function q(Z,V,D){const K=V+1,W=qi.divIcon({className:"measure-point",html:`
${K}
`,iconSize:[20,20],iconAnchor:[10,10]});Z.setIcon(W)}function oe(Z,V,D){const K=s.formatDistance(V);return qi.marker(Z,{icon:qi.divIcon({className:"distance-label",html:`
${K}
`,iconSize:[0,0],iconAnchor:[0,0]}),interactive:!1})}return{activeTool:o,activeMeasures:a,measureStyles:l,toggleTool:c,onMeasureClick:u,clearMeasureType:E,clearAll:T,getTotalDistance:A,getFormattedDistance:I,getTotalArea:P,getFormattedArea:k,getAreaPerimeter:B,getFormattedPerimeter:R,refreshLabels:H}}const dte=["disabled"],hte=["disabled"],fte=["disabled"],pte=["disabled"],mte=Be({__name:"ExportButtons",setup(t){const e=Xo(),n=Dg(),i=Ng(),s=dd(),r=F(()=>!!e.fileId);async function o(a){const l=e.fileId;if(!l){s.error("Không có file để xuất");return}i.log(`Đang xuất ${a.toUpperCase()}...`,"info"),i.showLoading(!0);try{const c=await n.exportFile(l,a),d=(e.filename||"export").replace(/\.dxf$/i,""),h=URL.createObjectURL(c),f=document.createElement("a");f.href=h,f.download=`${d}.${a}`,f.click(),URL.revokeObjectURL(h),i.log(`Xuất ${a.toUpperCase()} thành công`,"success"),s.success(`Đã tải ${a.toUpperCase()}`)}catch(c){const u=c;i.log(`Lỗi xuất file: ${u.message}`,"error"),s.error("Lỗi xuất file")}finally{i.showLoading(!1)}}return(a,l)=>(z(),se("div",{class:J(["export-grid",{disabled:!r.value}])},[U("button",{class:"export-btn",onClick:l[0]||(l[0]=c=>o("kml")),disabled:!r.value},[de(v(ZJ),{size:18}),l[4]||(l[4]=U("span",null,"KML",-1))],8,dte),U("button",{class:"export-btn",onClick:l[1]||(l[1]=c=>o("kmz")),disabled:!r.value},[de(v(sQ),{size:18}),l[5]||(l[5]=U("span",null,"KMZ",-1))],8,hte),U("button",{class:"export-btn",onClick:l[2]||(l[2]=c=>o("geojson")),disabled:!r.value},[de(v(FJ),{size:18}),l[6]||(l[6]=U("span",null,"GeoJSON",-1))],8,fte),U("button",{class:"export-btn gpkg-btn",onClick:l[3]||(l[3]=c=>o("gpkg")),disabled:!r.value,title:"GeoPackage - Chuẩn GIS theo TT16/2025"},[de(v(yT),{size:18}),l[7]||(l[7]=U("span",null,"GPKG",-1))],8,pte)],2))}}),gte=Zo(mte,[["__scopeId","data-v-070a623d"]]),vte={class:"panel-scroll"},yte={class:"panel-title"},bte={class:"section-card measurement-section"},_te={key:0,class:"card-content"},wte={class:"measure-results-unified"},xte={key:0,class:"result-row line"},Ste={class:"result-icon"},Ete={class:"result-info"},Cte={class:"result-value"},Tte={class:"result-meta"},Mte={key:1,class:"result-row area"},Ate={class:"result-icon"},kte={class:"result-info"},Pte={class:"result-value"},Lte={class:"result-sub"},Ite={class:"sub-value"},Rte={class:"result-meta"},Ote={key:2,class:"result-row pin"},Dte={class:"result-icon"},Nte={class:"result-info"},Bte={class:"result-label"},Fte={class:"pin-list"},zte={class:"pin-index"},Ute={class:"pin-coord"},$te={key:2,class:"measure-hint"},Vte={key:0},Hte={key:1},Wte={key:2},Gte={class:"cursor-coords-display"},jte={class:"coords-value"},Kte={key:3,class:"unit-info"},qte={class:"section-card"},Yte={class:"card-header-mini"},Xte={class:"card-content"},Zte={class:"section-card section-logs"},Jte={key:0,class:"card-content logs-content"},Qte={class:"logs-container"},ene={class:"log-time"},tne={class:"log-message"},nne={key:0,class:"logs-empty"},ine=Be({__name:"RightPanel",setup(t){const e=Xo(),{logs:n,activeTool:i,activeMeasures:s,measureUnits:r,cursorCoords:o}=cd(e),a=qw(),l=X(!1),c=X(new Set),u=F(()=>(s.value.pins?.length||0)>0),d=F(()=>(s.value.line?.points.length||0)>0),h=F(()=>(s.value.area?.points.length||0)>0),f=F(()=>u.value||d.value||h.value),p=F(()=>s.value.line?.points.length||0),m=F(()=>s.value.area?.points.length||0),b=F(()=>s.value.pins?.length||0),g=F(()=>(s.value.pins||[]).map((B,R)=>({index:R+1,lat:B.latlng.lat.toFixed(6),lng:B.latlng.lng.toFixed(6)}))),x=F(()=>{const k=r.value.distance;return{m:"m",km:"km",ft:"ft"}[k]||"m"}),S=F(()=>{const k=r.value.area;return{m2:"m²",ha:"ha",km2:"km²"}[k]||"m²"});function _(){l.value=!l.value}function E(k){const B=new Set(c.value);B.has(k)?B.delete(k):B.add(k),c.value=B}function T(k){return c.value.has(k)}function A(k){return`log-${k}`}function I(){e.setActiveTool(null)}function P(){a.clearAll()}return(k,B)=>(z(),se("aside",{class:J(["panel panel-right",{collapsed:l.value}])},[U("button",{class:"panel-toggle",onClick:_},[de(v($J),{size:14})]),U("div",vte,[U("div",yte,[de(v(BF),{size:16}),B[2]||(B[2]=cn(" KẾT QUẢ VÀ XUẤT DỮ LIỆU ",-1))]),U("div",bte,[U("div",{class:"card-header-mini",onClick:B[0]||(B[0]=R=>E("measurement"))},[de(v(c0),{size:16,class:"header-icon icon-measure"}),B[3]||(B[3]=U("span",{class:"header-title"},"KẾT QUẢ ĐO ĐẠC",-1)),v(i)?(z(),se("button",{key:0,class:"btn-close-tool",onClick:un(I,["stop"]),title:"Đóng công cụ"},[de(v(Lh),{size:14})])):Le("",!0),de(v(l0),{size:14,class:J(["chevron",{collapsed:T("measurement")}])},null,8,["class"])]),T("measurement")?Le("",!0):(z(),se("div",_te,[v(i)?(z(),se("div",{key:0,class:J(["active-tool-badge",v(i)])},[(z(),De(Sn(v(i)==="line"?v(c0):v(i)==="area"?v(_T):v(D0)),{size:14})),U("span",null,Xe(v(i)==="line"?"Đo khoảng cách":v(i)==="area"?"Đo diện tích":"Ghim điểm"),1)],2)):Le("",!0),U("div",wte,[d.value?(z(),se("div",xte,[U("div",Ste,[de(v(c0),{size:16})]),U("div",Ete,[B[4]||(B[4]=U("span",{class:"result-label"},"Khoảng cách",-1)),U("span",Cte,Xe(v(a).getFormattedDistance()),1),U("span",Tte,Xe(p.value)+" điểm",1)])])):Le("",!0),h.value?(z(),se("div",Mte,[U("div",Ate,[de(v(_T),{size:16})]),U("div",kte,[B[6]||(B[6]=U("span",{class:"result-label"},"Diện tích",-1)),U("span",Pte,Xe(v(a).getFormattedArea()),1),U("div",Lte,[B[5]||(B[5]=U("span",{class:"sub-label"},"Chu vi:",-1)),U("span",Ite,Xe(v(a).getFormattedPerimeter()),1)]),U("span",Rte,Xe(m.value)+" điểm",1)])])):Le("",!0),u.value?(z(),se("div",Ote,[U("div",Dte,[de(v(D0),{size:16})]),U("div",Nte,[U("span",Bte,"Ghim điểm ("+Xe(b.value)+")",1),U("div",Fte,[(z(!0),se(At,null,yn(g.value,R=>(z(),se("div",{key:R.index,class:"pin-item"},[U("span",zte,"#"+Xe(R.index),1),U("span",Ute,Xe(R.lat)+", "+Xe(R.lng),1)]))),128))])])])):Le("",!0)]),f.value?(z(),se("button",{key:1,class:"btn-clear",onClick:P},[de(v(VF),{size:14}),B[7]||(B[7]=U("span",null,"Xóa tất cả kết quả",-1))])):Le("",!0),v(i)&&!f.value?(z(),se("div",$te,[v(i)==="pin"?(z(),se("span",Vte,"Click trên bản đồ để đặt ghim")):v(i)==="line"?(z(),se("span",Hte,"Click để thêm điểm đo khoảng cách")):v(i)==="area"?(z(),se("span",Wte,"Click để vẽ vùng đo diện tích")):Le("",!0)])):Le("",!0),U("div",Gte,[de(v(NF),{size:14,class:"coords-icon"}),U("span",jte,Xe(v(o)||"----, ----"),1)]),f.value?(z(),se("div",Kte,[U("span",null,"Đơn vị: "+Xe(x.value)+" / "+Xe(S.value),1)])):Le("",!0)]))]),U("div",qte,[U("div",Yte,[de(v(lQ),{size:16,class:"header-icon"}),B[8]||(B[8]=U("span",{class:"header-title"},"TẢI XUỐNG",-1))]),U("div",Xte,[de(gte)])]),U("div",Zte,[U("div",{class:"card-header-mini",onClick:B[1]||(B[1]=R=>E("logs"))},[de(v(uQ),{size:16,class:"header-icon"}),B[9]||(B[9]=U("span",{class:"header-title"},"NHẬT KÝ HỆ THỐNG",-1)),de(v(l0),{size:14,class:J(["chevron",{collapsed:T("logs")}])},null,8,["class"])]),T("logs")?Le("",!0):(z(),se("div",Jte,[U("div",Qte,[(z(!0),se(At,null,yn(v(n),(R,H)=>(z(),se("div",{key:H,class:J(["log-entry",A(R.type)])},[U("span",ene,Xe(R.time),1),U("span",tne,Xe(R.message),1)],2))),128)),v(n).length===0?(z(),se("div",nne," Chưa có nhật ký ")):Le("",!0)])]))])])],2))}}),sne=Zo(ine,[["__scopeId","data-v-c51d0cf7"]]),rne={class:"modal-container"},one={class:"modal-header"},ane={class:"header-title"},lne={class:"tab-nav-wrapper"},cne={class:"tab-nav-pill"},une={class:"modal-content"},dne={key:0,class:"loading-overlay"},hne={class:"settings-group"},fne={class:"form-row"},pne={class:"form-row"},mne={class:"settings-group"},gne={class:"form-row"},vne={class:"form-row"},yne={class:"settings-group"},bne={class:"form-row"},_ne={class:"form-row"},wne={class:"form-row"},xne={class:"settings-group"},Sne={class:"form-row checkbox-row"},Ene={class:"reset-section"},Cne=["disabled"],Tne={class:"settings-group"},Mne={class:"form-row"},Ane={class:"form-row"},kne={class:"settings-group"},Pne={key:0,class:"category-section"},Lne={class:"category-label"},Ine={class:"source-label"},Rne=["value","checked","onChange"],One={class:"source-name"},Dne={key:1,class:"warning-badge"},Nne={key:0,class:"api-key-row"},Bne=["value","onBlur"],Fne={key:1,class:"source-warning"},zne={class:"reset-section"},Une=["disabled"],$ne={class:"modal-footer"},Vne=Be({__name:"SettingsModal",emits:["close"],setup(t,{emit:e}){const n=e,i=Xo(),s=Dg(),r=dd(),o=X("measure"),a=X(i.measureUnits.distance),l=X(i.measureUnits.area),c=X(i.measureStyles.lineColor),u=X(i.measureStyles.lineWeight),d=X(i.measureStyles.areaColor),h=X(Math.round(i.measureStyles.areaFillOpacity*100)),f=X(i.measureStyles.areaWeight),p=X(i.measureStyles.showDistanceLabels),m=X(i.downloadSettings.max_concurrent),b=X(i.downloadSettings.timeout),g=X(i.downloadSettings.current_source),x=X([]),S=X({}),_=X(!1),E=X(!1),T=X(!1),A=F(()=>`${h.value}%`);let I=null,P=null;function k(){I&&clearTimeout(I),I=setTimeout(async()=>{try{await s.updateMeasureSettings({distance_unit:a.value,area_unit:l.value,line_color:c.value,line_weight:u.value,area_color:d.value,area_fill_opacity:h.value/100,area_weight:f.value,show_distance_labels:p.value}),r.success("Đã lưu cài đặt đo đạc")}catch(ie){console.error("Failed to save measure settings:",ie)}},800)}function B(){P&&clearTimeout(P),P=setTimeout(async()=>{const ie={...i.downloadSettings.api_keys,...S.value},ne=Object.fromEntries(Object.entries(ie).filter(([,ce])=>ce&&ce.trim()!==""));try{await s.updateDownloadSettings({max_concurrent:m.value,timeout:b.value,map_source:g.value,api_keys:ne}),i.setDownloadSettings({max_concurrent:m.value,timeout:b.value,current_source:g.value,api_keys:ne}),S.value={},r.success("Đã lưu cài đặt tải về")}catch(ce){console.error("Failed to save download settings:",ce)}},800)}We(a,ie=>{i.setMeasureUnits({...i.measureUnits,distance:ie}),k()}),We(l,ie=>{i.setMeasureUnits({...i.measureUnits,area:ie}),k()}),We(c,ie=>{i.setMeasureStyles({...i.measureStyles,lineColor:ie}),k()}),We(u,ie=>{i.setMeasureStyles({...i.measureStyles,lineWeight:ie}),k()}),We(d,ie=>{i.setMeasureStyles({...i.measureStyles,areaColor:ie}),k()}),We(h,ie=>{i.setMeasureStyles({...i.measureStyles,areaFillOpacity:ie/100}),k()}),We(f,ie=>{i.setMeasureStyles({...i.measureStyles,areaWeight:ie}),k()}),We(p,ie=>{i.setMeasureStyles({...i.measureStyles,showDistanceLabels:ie}),k()}),We(m,ie=>{i.setDownloadSettings({max_concurrent:ie}),B()}),We(b,ie=>{i.setDownloadSettings({timeout:ie}),B()}),We(g,ie=>{i.setDownloadSettings({current_source:ie}),B()});function R(ie){ie.target.classList.contains("modal-backdrop")&&n("close")}async function H(){try{const ie=await s.getMeasureSettings();ie&&(a.value=ie.distance_unit,l.value=ie.area_unit,c.value=ie.line_color,u.value=ie.line_weight,d.value=ie.area_color,h.value=Math.round(ie.area_fill_opacity*100),f.value=ie.area_weight,p.value=ie.show_distance_labels,i.setMeasureUnits({distance:ie.distance_unit,area:ie.area_unit}),i.setMeasureStyles({lineColor:ie.line_color,lineWeight:ie.line_weight,areaColor:ie.area_color,areaFillOpacity:ie.area_fill_opacity,areaWeight:ie.area_weight,showDistanceLabels:ie.show_distance_labels}))}catch(ie){console.error("Failed to load measure settings:",ie)}}async function q(){_.value=!0;try{const ie=await s.resetMeasureSettings();ie&&(a.value=ie.distance_unit,l.value=ie.area_unit,c.value=ie.line_color,u.value=ie.line_weight,d.value=ie.area_color,h.value=Math.round(ie.area_fill_opacity*100),f.value=ie.area_weight,p.value=ie.show_distance_labels,i.setMeasureUnits({distance:ie.distance_unit,area:ie.area_unit}),i.setMeasureStyles({lineColor:ie.line_color,lineWeight:ie.line_weight,areaColor:ie.area_color,areaFillOpacity:ie.area_fill_opacity,areaWeight:ie.area_weight,showDistanceLabels:ie.show_distance_labels}),r.success("Đã khôi phục cài đặt mặc định"))}catch(ie){console.error("Failed to reset measure settings:",ie),r.error("Không thể khôi phục cài đặt")}finally{_.value=!1}}async function oe(){E.value=!0;try{m.value=5,b.value=10,g.value="esri_world",S.value={},await s.updateDownloadSettings({max_concurrent:5,timeout:10,map_source:"esri_world",api_keys:{}}),i.setDownloadSettings({max_concurrent:5,timeout:10,current_source:"esri_world",api_keys:{}}),r.success("Đã khôi phục cài đặt mặc định")}catch(ie){console.error("Failed to reset download settings:",ie),r.error("Không thể khôi phục cài đặt")}finally{E.value=!1}}async function Z(){try{const ie=await s.getMapSources();ie&&ie.sources&&(x.value=ie.sources,i.setMapSources(ie.sources),ie.current&&(g.value=ie.current))}catch(ie){console.error("Failed to load map sources:",ie)}try{const ie=await s.getDownloadSettings();ie&&(m.value=ie.max_concurrent??5,b.value=ie.timeout??10)}catch(ie){console.error("Failed to load download settings:",ie)}}function V(ie){return{satellite:"🛰️ Ảnh vệ tinh",street:"🛣️ Bản đồ đường",topo:"🏔️ Địa hình"}[ie]||ie}function D(ie){return x.value.filter(ne=>ne.category===ie)}function K(ie){g.value=ie}function W(ie){return S.value[ie]||i.downloadSettings.api_keys[ie]||""}function Q(ie,ne){const ce=ne.target.value;S.value={...S.value,[ie]:ce},B()}return We(o,ie=>{ie==="download"&&x.value.length===0&&Z()}),mn(async()=>{T.value=!0,await H(),T.value=!1}),(ie,ne)=>(z(),se("div",{class:"modal-backdrop",onClick:R},[U("div",rne,[U("div",one,[U("div",ane,[de(v(OA),{size:20}),ne[14]||(ne[14]=U("span",null,"Cài đặt",-1))]),U("button",{class:"btn-close",onClick:ne[0]||(ne[0]=ce=>n("close"))},[de(v(Lh),{size:18})])]),U("div",lne,[U("div",cne,[U("button",{class:J(["tab-pill-btn",{active:o.value==="measure"}]),onClick:ne[1]||(ne[1]=ce=>o.value="measure")},[de(v(c0),{size:16}),ne[15]||(ne[15]=U("span",null,"Đo đạc",-1))],2),U("button",{class:J(["tab-pill-btn",{active:o.value==="download"}]),onClick:ne[2]||(ne[2]=ce=>o.value="download")},[de(v(BF),{size:16}),ne[16]||(ne[16]=U("span",null,"Tải về",-1))],2)])]),U("div",une,[T.value?(z(),se("div",dne,[...ne[17]||(ne[17]=[U("span",null,"Đang tải cài đặt...",-1)])])):Le("",!0),o.value==="measure"?(z(),se(At,{key:1},[U("div",hne,[ne[22]||(ne[22]=U("h4",{class:"group-title"},"📏 Đơn vị đo",-1)),U("div",fne,[ne[19]||(ne[19]=U("label",null,"Khoảng cách:",-1)),_n(U("select",{"onUpdate:modelValue":ne[3]||(ne[3]=ce=>a.value=ce),class:"setting-select"},[...ne[18]||(ne[18]=[U("option",{value:"m"},"Mét (m)",-1),U("option",{value:"km"},"Kilomet (km)",-1),U("option",{value:"ft"},"Feet (ft)",-1)])],512),[[G1,a.value]])]),U("div",pne,[ne[21]||(ne[21]=U("label",null,"Diện tích:",-1)),_n(U("select",{"onUpdate:modelValue":ne[4]||(ne[4]=ce=>l.value=ce),class:"setting-select"},[...ne[20]||(ne[20]=[U("option",{value:"m2"},"Mét vuông (m²)",-1),U("option",{value:"ha"},"Hecta (ha)",-1),U("option",{value:"km2"},"Km vuông (km²)",-1)])],512),[[G1,l.value]])])]),U("div",mne,[ne[24]||(ne[24]=U("h4",{class:"group-title"},"🎨 Kiểu dáng đo khoảng cách",-1)),U("div",gne,[ne[23]||(ne[23]=U("label",null,"Màu đường:",-1)),_n(U("input",{type:"color","onUpdate:modelValue":ne[5]||(ne[5]=ce=>c.value=ce),class:"setting-color"},null,512),[[Mc,c.value]])]),U("div",vne,[U("label",null,"Độ dày: "+Xe(u.value)+"px",1),_n(U("input",{type:"range",min:"2",max:"8","onUpdate:modelValue":ne[6]||(ne[6]=ce=>u.value=ce),class:"setting-range"},null,512),[[Mc,u.value,void 0,{number:!0}]])])]),U("div",yne,[ne[26]||(ne[26]=U("h4",{class:"group-title"},"🔳 Kiểu dáng đo diện tích",-1)),U("div",bne,[ne[25]||(ne[25]=U("label",null,"Màu vùng:",-1)),_n(U("input",{type:"color","onUpdate:modelValue":ne[7]||(ne[7]=ce=>d.value=ce),class:"setting-color"},null,512),[[Mc,d.value]])]),U("div",_ne,[U("label",null,"Độ fill: "+Xe(A.value),1),_n(U("input",{type:"range",min:"10",max:"80","onUpdate:modelValue":ne[8]||(ne[8]=ce=>h.value=ce),class:"setting-range"},null,512),[[Mc,h.value,void 0,{number:!0}]])]),U("div",wne,[U("label",null,"Độ dày viền: "+Xe(f.value)+"px",1),_n(U("input",{type:"range",min:"1",max:"6","onUpdate:modelValue":ne[9]||(ne[9]=ce=>f.value=ce),class:"setting-range"},null,512),[[Mc,f.value,void 0,{number:!0}]])])]),U("div",xne,[ne[28]||(ne[28]=U("h4",{class:"group-title"},"👁️ Hiển thị",-1)),U("label",Sne,[ne[27]||(ne[27]=U("span",null,"Hiển thị khoảng cách trên đường đo",-1)),_n(U("input",{type:"checkbox","onUpdate:modelValue":ne[10]||(ne[10]=ce=>p.value=ce),class:"setting-checkbox"},null,512),[[dx,p.value]])])]),U("div",Ene,[U("button",{class:"btn-reset",onClick:q,disabled:_.value},[de(v(EI),{size:16}),U("span",null,Xe(_.value?"Đang khôi phục...":"Khôi phục mặc định"),1)],8,Cne)])],64)):Le("",!0),o.value==="download"?(z(),se(At,{key:2},[U("div",Tne,[ne[33]||(ne[33]=U("h4",{class:"group-title"},"⚡ Hiệu suất tải về",-1)),U("div",Mne,[ne[30]||(ne[30]=U("label",null,"Số mảnh tải đồng thời:",-1)),_n(U("select",{"onUpdate:modelValue":ne[11]||(ne[11]=ce=>m.value=ce),class:"setting-select"},[...ne[29]||(ne[29]=[U("option",{value:1},"1 (An toàn nhất)",-1),U("option",{value:3},"3 (Khuyến nghị)",-1),U("option",{value:5},"5 (Mặc định)",-1),U("option",{value:8},"8 (Nhanh)",-1),U("option",{value:10},"10 (Rất nhanh)",-1),U("option",{value:15},"15 (Cảnh báo)",-1),U("option",{value:20},"20 (Tối đa)",-1)])],512),[[G1,m.value,void 0,{number:!0}]])]),U("div",Ane,[ne[32]||(ne[32]=U("label",null,"Timeout (giây):",-1)),_n(U("select",{"onUpdate:modelValue":ne[12]||(ne[12]=ce=>b.value=ce),class:"setting-select"},[...ne[31]||(ne[31]=[U("option",{value:5},"5s",-1),U("option",{value:10},"10s (Mặc định)",-1),U("option",{value:15},"15s",-1),U("option",{value:20},"20s",-1),U("option",{value:30},"30s (Mạng chậm)",-1)])],512),[[G1,b.value,void 0,{number:!0}]])]),ne[34]||(ne[34]=U("div",{class:"warning-box"},[U("strong",null,"⚠️ Lưu ý:"),U("span",null,"Số concurrent càng cao → tốc độ nhanh hơn nhưng rủi ro bị chặn IP cao hơn.")],-1))]),U("div",kne,[ne[35]||(ne[35]=U("h4",{class:"group-title"},"🗺️ Nguồn bản đồ",-1)),(z(),se(At,null,yn(["satellite","street","topo"],ce=>(z(),se(At,{key:ce},[D(ce).length>0?(z(),se("div",Pne,[U("span",Lne,Xe(V(ce)),1),(z(!0),se(At,null,yn(D(ce),ae=>(z(),se("div",{key:ae.id,class:J(["source-item",{selected:g.value===ae.id}])},[U("label",Ine,[U("input",{type:"radio",name:"mapSource",value:ae.id,checked:g.value===ae.id,onChange:_e=>K(ae.id)},null,40,Rne),U("span",One,Xe(ae.name),1),ae.requires_api_key?(z(),se("span",{key:0,class:J(["api-badge",{"has-key":ae.has_api_key}])},Xe(ae.has_api_key?"🔑":"🔒"),3)):Le("",!0),ae.warning?(z(),se("span",Dne,"⚠️")):Le("",!0)]),ae.requires_api_key?(z(),se("div",Nne,[U("input",{type:"password",placeholder:"Nhập API Key...",value:W(ae.id),onBlur:_e=>Q(ae.id,_e),class:"api-key-input"},null,40,Bne)])):Le("",!0),ae.warning?(z(),se("div",Fne,Xe(ae.warning),1)):Le("",!0)],2))),128))])):Le("",!0)],64))),64))]),U("div",zne,[U("button",{class:"btn-reset",onClick:oe,disabled:E.value},[de(v(EI),{size:16}),U("span",null,Xe(E.value?"Đang khôi phục...":"Khôi phục mặc định"),1)],8,Une)])],64)):Le("",!0)]),U("div",$ne,[ne[36]||(ne[36]=U("span",{class:"auto-save-hint"},"💾 Tự động lưu khi thay đổi",-1)),U("button",{class:"btn-cancel",onClick:ne[13]||(ne[13]=ce=>n("close"))},"Đóng")])])]))}}),Hne=Zo(Vne,[["__scopeId","data-v-9d01fb42"]]),Wne={class:"modal-container"},Gne={class:"modal-header"},jne={class:"header-title"},Kne=["disabled"],qne={class:"modal-content"},Yne={key:0,class:"bounds-info"},Xne={class:"bounds-grid"},Zne={class:"bound-item"},Jne={class:"bound-value"},Qne={class:"bound-item"},eie={class:"bound-value"},tie={class:"bound-item"},nie={class:"bound-value"},iie={class:"bound-item"},sie={class:"bound-value"},rie={class:"area-info"},oie={key:1,class:"source-info"},aie={class:"source-header"},lie={class:"source-name"},cie={key:2,class:"scale-selection"},uie={key:0,class:"scale-list"},die=["value"],hie={class:"scale-value"},fie={class:"scale-desc"},pie={key:0,class:"suggested-badge"},mie={class:"scale-hint"},gie={key:3,class:"progress-area"},vie={class:"progress-header"},yie={class:"progress-status"},bie={class:"progress-percent"},_ie={class:"progress-track"},wie={class:"modal-footer"},xie={key:1,class:"btn-secondary",disabled:""},Sie=Be({__name:"OverlayConfirmModal",emits:["close","redraw","openSettings"],setup(t,{emit:e}){const n=e,i=Xo(),s=Dg(),r=Ng(),o=dd(),{overlayBounds:a,downloadSettings:l}=cd(i),c=[{scale:"1:500",zoom:20,maxArea:.25,label:"1/500 - Chi tiết cao"},{scale:"1:2.000",zoom:18,maxArea:4,label:"1/2.000 - Tổng mặt bằng"},{scale:"1:5.000",zoom:16,maxArea:25,label:"1/5.000 - Quy hoạch phường"},{scale:"1:10.000",zoom:15,maxArea:100,label:"1/10.000 - Quy hoạch quận"},{scale:"1:20.000",zoom:14,maxArea:400,label:"1/20.000 - Quy hoạch thành phố"},{scale:"1:50.000",zoom:12,maxArea:2500,label:"1/50.000 - Vùng rộng"}],u=X(!1),d=X("Đang xử lý..."),h=X(0),f=X("1:2.000"),p=X(!0),m=F(()=>a.value),b=F(()=>m.value?{south:m.value.getSouth().toFixed(6),north:m.value.getNorth().toFixed(6),west:m.value.getWest().toFixed(6),east:m.value.getEast().toFixed(6)}:null),g=F(()=>{if(!m.value)return 0;const B=m.value.getNorth()-m.value.getSouth(),R=m.value.getEast()-m.value.getWest(),H=B*111,q=R*111*Math.cos(m.value.getCenter().lat*Math.PI/180);return H*q}),x=F(()=>{const B=g.value;for(const R of c)if(B<=R.maxArea)return R.scale;return"1:50.000"}),S=F(()=>{const B=p.value?x.value:f.value;return c.find(H=>H.scale===B)?.zoom||18}),_=F(()=>{const B=l.value.current_source,R=i.mapSources.find(q=>q.id===B);return R?R.name:{esri_world:"ESRI World Imagery",esri_satellite:"ESRI World Imagery",google_satellite:"Google Satellite",google_hybrid:"Google Hybrid",mapbox_satellite:"Mapbox Satellite",here_satellite:"HERE Satellite",osm:"OpenStreetMap",carto_light:"Carto Light",carto_dark:"Carto Dark",stadia_smooth:"Stadia Alidade Smooth"}[B]||B});We(p,B=>{B&&(f.value=x.value)}),We(x,B=>{p.value&&(f.value=B)});async function E(){if(m.value){u.value=!0,h.value=0,d.value="Đang khởi tạo...";try{const B=i.fileId,R=i.filename||"overlay.dxf";if(!B){o.error("Chưa có file DXF"),u.value=!1;return}r.log(`Đang gửi yêu cầu tải ảnh vệ tinh (zoom: ${S.value})...`,"info"),d.value="Đang tải file DXF...",h.value=10;let H=null;try{H=await s.getDxfBlobFromStorage(B),H&&r.log("Đã lấy file từ kho dữ liệu cục bộ","info")}catch(D){console.warn("IndexedDB read failed:",D)}if(!H)try{const D=s.getDxfFileUrl(B),K=await fetch(D);K.ok&&(H=await K.blob(),r.log("Đã lấy file từ server","info"))}catch(D){console.warn("Server fetch failed:",D)}if(!H){o.error("Không tìm thấy file DXF. Vui lòng upload lại."),u.value=!1;return}d.value="Đang xử lý ảnh vệ tinh...",h.value=20;const q=i.lastConversionSettings,oe=await s.requestOverlayDirect(H,R,{min_lat:m.value.getSouth(),max_lat:m.value.getNorth(),min_lng:m.value.getWest(),max_lng:m.value.getEast()},S.value,l.value.current_source,q?.coordinate_system||"vn2000",q?.province,!1);h.value=90,d.value="Đang tải về...";const V=`${R.replace(/\.dxf$/i,"")}_satellite_overlay.zip`;r.downloadBlob(oe,V),h.value=100,d.value="Hoàn thành!",r.log("Tải ảnh vệ tinh thành công!","success"),o.success("Đã tải file thành công"),setTimeout(()=>{u.value=!1,n("close")},1e3)}catch(B){const R=B;r.log(`Lỗi yêu cầu overlay: ${R.message}`,"error"),o.error("Lỗi xử lý: "+R.message),u.value=!1}}}function T(){n("redraw")}function A(){n("close")}function I(){n("openSettings")}function P(B){B.target===B.currentTarget&&!u.value&&A()}function k(B){return B<.01?`${(B*1e6).toFixed(0)} m²`:B<1?`${(B*100).toFixed(2)} ha`:`${B.toFixed(2)} km²`}return mn(()=>{f.value=x.value}),(B,R)=>(z(),se("div",{class:"modal-backdrop",onClick:P},[U("div",Wne,[U("div",Gne,[U("div",jne,[de(v(FF),{size:20,class:"header-icon"}),R[2]||(R[2]=U("span",null,"Tải ảnh vệ tinh",-1))]),U("button",{class:"btn-close",onClick:A,disabled:u.value},[de(v(Lh),{size:18})],8,Kne)]),U("div",qne,[b.value?(z(),se("div",Yne,[R[8]||(R[8]=U("h4",{class:"section-title"},"📍 Vùng đã chọn",-1)),U("div",Xne,[U("div",Zne,[R[3]||(R[3]=U("span",{class:"bound-label"},"Bắc:",-1)),U("span",Jne,Xe(b.value.north)+"°",1)]),U("div",Qne,[R[4]||(R[4]=U("span",{class:"bound-label"},"Nam:",-1)),U("span",eie,Xe(b.value.south)+"°",1)]),U("div",tie,[R[5]||(R[5]=U("span",{class:"bound-label"},"Đông:",-1)),U("span",nie,Xe(b.value.east)+"°",1)]),U("div",iie,[R[6]||(R[6]=U("span",{class:"bound-label"},"Tây:",-1)),U("span",sie,Xe(b.value.west)+"°",1)])]),U("div",rie,[U("span",null,[R[7]||(R[7]=cn("Diện tích: ",-1)),U("strong",null,Xe(k(g.value)),1)])])])):Le("",!0),u.value?Le("",!0):(z(),se("div",oie,[U("div",aie,[R[9]||(R[9]=U("span",{class:"source-label"},"🛰️ Nguồn ảnh:",-1)),U("span",lie,Xe(_.value),1)]),U("button",{class:"btn-change-source",onClick:I},[de(v(OA),{size:14}),R[10]||(R[10]=cn(" Đổi nguồn ",-1))])])),u.value?Le("",!0):(z(),se("div",cie,[R[12]||(R[12]=U("h4",{class:"section-title"},"📏 Tỷ lệ bản đồ",-1)),U("label",{class:J(["auto-scale-toggle",{active:p.value}])},[_n(U("input",{type:"checkbox","onUpdate:modelValue":R[0]||(R[0]=H=>p.value=H)},null,512),[[dx,p.value]]),de(v(cQ),{size:14}),U("span",null,"Tự động chọn ("+Xe(x.value)+")",1)],2),p.value?Le("",!0):(z(),se("div",uie,[(z(),se(At,null,yn(c,H=>U("label",{key:H.scale,class:J(["scale-option",{selected:f.value===H.scale,suggested:H.scale===x.value}])},[_n(U("input",{type:"radio",value:H.scale,"onUpdate:modelValue":R[1]||(R[1]=q=>f.value=q),name:"map-scale"},null,8,die),[[kA,f.value]]),U("span",hie,Xe(H.scale),1),U("span",fie,Xe(H.label.split(" - ")[1]),1),H.scale===x.value?(z(),se("span",pie,"Gợi ý")):Le("",!0)],2)),64))])),U("div",mie,[de(v(zF),{size:14}),R[11]||(R[11]=U("span",null,"Tỷ lệ nhỏ hơn = chi tiết cao hơn nhưng file lớn hơn",-1))])])),u.value?(z(),se("div",gie,[R[13]||(R[13]=U("h4",{class:"section-title"},"⏳ Đang xử lý",-1)),U("div",vie,[U("span",yie,Xe(d.value),1),U("span",bie,Xe(h.value)+"%",1)]),U("div",_ie,[U("div",{class:"progress-fill",style:Ht({width:`${h.value}%`})},null,4)])])):Le("",!0)]),U("div",wie,[u.value?Le("",!0):(z(),se(At,{key:0},[U("button",{class:"btn-secondary",onClick:T},[de(v(U_),{size:14}),R[14]||(R[14]=cn(" Chọn lại vùng ",-1))]),U("button",{class:"btn-primary",onClick:E},[de(v(HJ),{size:14}),R[15]||(R[15]=cn(" Tải ảnh vệ tinh ",-1))])],64)),u.value?(z(),se("button",xie,[de(v(eQ),{size:14,class:"spin"}),R[16]||(R[16]=cn(" Đang xử lý... ",-1))])):Le("",!0),u.value?Le("",!0):(z(),se("button",{key:2,class:"btn-secondary",onClick:T},[de(v(D0),{size:14}),R[17]||(R[17]=cn(" Chọn khu vực khác ",-1))]))])])]))}}),Eie=Zo(Sie,[["__scopeId","data-v-59267670"]]),Cie={class:"modal-container"},Tie={class:"modal-header"},Mie={class:"modal-content"},Aie={class:"warning-badge"},kie={class:"info-cards"},Pie={class:"info-card"},Lie={class:"info-card"},Iie=Be({__name:"WelcomeModal",props:{visible:{type:Boolean}},emits:["close"],setup(t,{emit:e}){const n=e;function i(){n("close")}function s(){window.open("https://zalo.me/0904004920","_blank")}function r(){window.open("https://cmbvn.com.vn","_blank")}return(o,a)=>(z(),De(uh,{to:"body"},[t.visible?(z(),se("div",{key:0,class:"modal-backdrop",onClick:un(i,["self"])},[U("div",Cie,[U("div",Tie,[U("div",{class:"header-brand",onClick:r},[a[0]||(a[0]=U("img",{src:"https://cmbvn.com.vn/wp-content/uploads/2022/01/Logo.png",alt:"CMB Logo",class:"brand-logo"},null,-1)),a[1]||(a[1]=U("div",{class:"brand-info"},[U("span",{class:"brand-name"},"CAD2MAP"),U("span",{class:"brand-sub"},"CMB-AI Tool")],-1)),de(v(bT),{size:14,class:"external-icon"})]),U("button",{class:"btn-close",onClick:i},[de(v(Lh),{size:18})])]),U("div",Mie,[U("div",Aie,[de(v(YJ),{size:16}),a[2]||(a[2]=U("span",null,"Sản phẩm thử nghiệm",-1))]),a[6]||(a[6]=U("p",{class:"description"}," Công cụ chuyển đổi file CAD (DXF) sang bản đồ trực tuyến với các tính năng đo đạc, xuất dữ liệu và tải ảnh vệ tinh. ",-1)),U("div",kie,[U("div",Pie,[de(v(zJ),{size:20,class:"card-icon"}),a[3]||(a[3]=U("div",{class:"card-content"},[U("span",{class:"card-label"},"Đơn vị phát triển"),U("span",{class:"card-value-full"},"Phòng CNTT và AI"),U("span",{class:"card-sub"},"Công ty CP Tư vấn Xây dựng Công trình Hàng hải (CMB)")],-1))]),U("div",Lie,[de(v(fQ),{size:20,class:"card-icon"}),a[4]||(a[4]=U("div",{class:"card-content"},[U("span",{class:"card-label"},"Tác giả"),U("span",{class:"card-value"},"Nguyễn Duy Tùng")],-1))]),U("div",{class:"info-card contact",onClick:s},[de(v(UF),{size:20,class:"card-icon"}),a[5]||(a[5]=U("div",{class:"card-content"},[U("span",{class:"card-label"},"Liên hệ (SĐT/Zalo)"),U("span",{class:"card-value phone"},"0904 004 920")],-1)),de(v(bT),{size:14,class:"card-arrow"})])]),a[7]||(a[7]=U("div",{class:"disclaimer"},[U("strong",null,"⚠️ Lưu ý:"),cn(" Đây là phiên bản thử nghiệm. Dữ liệu và kết quả có thể không chính xác 100%. Vui lòng liên hệ tác giả nếu gặp vấn đề. ")],-1))]),U("div",{class:"modal-footer"},[U("button",{class:"btn-primary",onClick:i}," Đóng ")])])])):Le("",!0)]))}}),Rie=Zo(Iie,[["__scopeId","data-v-91750cf1"]]),Oie={class:"panel panel-bottom"},Die={class:"bottom-group"},Nie={class:"tool-buttons"},Bie={class:"bottom-group"},Fie={class:"tool-buttons"},zie={class:"bottom-group"},Uie={class:"tool-buttons"},$ie={class:"bottom-group"},Vie={class:"tool-buttons"},Hie=["disabled"],Wie={class:"bottom-group"},Gie={class:"tool-buttons"},jie=Be({__name:"BottomToolbar",setup(t){const e=Xo(),n=dd(),{currentBaseLayer:i,activeTool:s,hasFile:r,isDrawingOverlay:o,overlayBounds:a}=cd(e),{switchBaseLayer:l,zoomIn:c,zoomOut:u,fitBounds:d,setCursor:h,getMap:f}=Fy(),{toggleTool:p}=qw(),m=X(!1),b=X(!1),g=X(!1);function x(K){l(K)}function S(){m.value=!0}function _(){m.value=!1}function E(){g.value=!0}function T(){g.value=!1}let A=null,I=null;const P=K=>{I=K.latlng},k=K=>{if(!I)return;const W=f();if(!W)return;const Q=qi.latLngBounds(I,K.latlng);A?A.setBounds(Q):A=qi.rectangle(Q,{color:"#005198",weight:2,fillOpacity:.2,dashArray:"5, 5"}).addTo(W)},B=K=>{const W=f();if(!W||!I)return;W.off("mousedown",P),W.off("mousemove",k),W.off("mouseup",B);const Q=qi.latLngBounds(I,K.latlng);H(Q)};function R(){const K=f();if(!K||!r.value)return;const{clearAll:W}=qw();W(),e.setDrawingOverlay(!0),h("crosshair"),K.dragging.disable(),K.on("mousedown",P),K.on("mousemove",k),K.on("mouseup",B)}function H(K){e.setDrawingOverlay(!1),h(""),I=null;const W=f();W&&W.dragging.enable(),e.setOverlayBounds(K),A&&(A.setStyle({color:"#16a34a",weight:3,fillOpacity:.15,dashArray:""}),A.on("click",()=>{b.value=!0}),n.info("Click vào vùng đã chọn để xác nhận tải ảnh"))}function q(){e.setDrawingOverlay(!1),h(""),I=null;const K=f();K&&(K.off("mousedown",P),K.off("mousemove",k),K.off("mouseup",B),K.dragging.enable()),oe()}function oe(){if(A){const K=f();K&&K.removeLayer(A),A=null}e.setOverlayBounds(null)}function Z(){b.value=!1,oe()}function V(){b.value=!1,oe(),R()}function D(){b.value=!1,m.value=!0}return eo(()=>{oe()}),(K,W)=>(z(),se(At,null,[U("div",Oie,[U("div",Die,[U("div",Nie,[U("button",{class:J(["tool-btn-vertical",{active:v(i)==="osm"}]),onClick:W[0]||(W[0]=Q=>x("osm")),title:"Bản đồ đường"},[de(v(tQ),{size:18}),W[9]||(W[9]=U("span",{class:"tool-label"},"Đường",-1))],2),U("button",{class:J(["tool-btn-vertical",{active:v(i)==="satellite"}]),onClick:W[1]||(W[1]=Q=>x("satellite")),title:"Ảnh vệ tinh"},[de(v(aQ),{size:18}),W[10]||(W[10]=U("span",{class:"tool-label"},"Vệ tinh",-1))],2),U("button",{class:J(["tool-btn-vertical",{active:v(i)==="topo"}]),onClick:W[2]||(W[2]=Q=>x("topo")),title:"Địa hình"},[de(v(iQ),{size:18}),W[11]||(W[11]=U("span",{class:"tool-label"},"Địa hình",-1))],2)])]),W[22]||(W[22]=U("div",{class:"bottom-divider"},null,-1)),U("div",Bie,[U("div",Fie,[U("button",{class:"tool-btn-vertical",onClick:W[3]||(W[3]=(...Q)=>v(c)&&v(c)(...Q)),title:"Phóng to"},[de(v(pQ),{size:18}),W[12]||(W[12]=U("span",{class:"tool-label"},"Phóng to",-1))]),U("button",{class:"tool-btn-vertical",onClick:W[4]||(W[4]=(...Q)=>v(u)&&v(u)(...Q)),title:"Thu nhỏ"},[de(v(mQ),{size:18}),W[13]||(W[13]=U("span",{class:"tool-label"},"Thu nhỏ",-1))]),U("button",{class:"tool-btn-vertical",onClick:W[5]||(W[5]=(...Q)=>v(d)&&v(d)(...Q)),title:"Vừa khung"},[de(v(nQ),{size:18}),W[14]||(W[14]=U("span",{class:"tool-label"},"Vừa khung",-1))])])]),W[23]||(W[23]=U("div",{class:"bottom-divider"},null,-1)),U("div",zie,[U("div",Uie,[U("button",{class:J(["tool-btn-vertical",{active:v(s)==="pin"}]),onClick:W[6]||(W[6]=Q=>v(p)("pin")),title:"Ghim điểm"},[de(v(D0),{size:18}),W[15]||(W[15]=U("span",{class:"tool-label"},"Ghim",-1))],2),U("button",{class:J(["tool-btn-vertical",{active:v(s)==="line"}]),onClick:W[7]||(W[7]=Q=>v(p)("line")),title:"Đo khoảng cách"},[de(v(c0),{size:18}),W[16]||(W[16]=U("span",{class:"tool-label"},"Đo dài",-1))],2),U("button",{class:J(["tool-btn-vertical",{active:v(s)==="area"}]),onClick:W[8]||(W[8]=Q=>v(p)("area")),title:"Đo diện tích"},[de(v(_T),{size:18}),W[17]||(W[17]=U("span",{class:"tool-label"},"Diện tích",-1))],2)])]),W[24]||(W[24]=U("div",{class:"bottom-divider"},null,-1)),U("div",$ie,[U("div",Vie,[v(o)?(z(),se("button",{key:1,class:"tool-btn-vertical cancel-btn active",onClick:q,title:"Hủy khoanh vùng"},[de(v(GJ),{size:18}),W[19]||(W[19]=U("span",{class:"tool-label"},"Hủy",-1))])):(z(),se("button",{key:0,class:J(["tool-btn-vertical overlay-btn",{disabled:!v(r)}]),disabled:!v(r),onClick:R,title:"Tải ảnh vệ tinh"},[de(v(FF),{size:18}),W[18]||(W[18]=U("span",{class:"tool-label"},"Tải ảnh",-1))],10,Hie))])]),W[25]||(W[25]=U("div",{class:"bottom-divider"},null,-1)),U("div",Wie,[U("div",Gie,[U("button",{class:"tool-btn-vertical",onClick:S,title:"Cài đặt"},[de(v(OA),{size:18}),W[20]||(W[20]=U("span",{class:"tool-label"},"Cài đặt",-1))]),U("button",{class:"tool-btn-vertical contact-btn",onClick:E,title:"Liên hệ & Giới thiệu"},[de(v(UF),{size:18}),W[21]||(W[21]=U("span",{class:"tool-label"},"Liên hệ",-1))])])])]),(z(),De(uh,{to:"body"},[m.value?(z(),De(Hne,{key:0,onClose:_})):Le("",!0)])),(z(),De(uh,{to:"body"},[de(Rie,{visible:g.value,onClose:T},null,8,["visible"])])),(z(),De(uh,{to:"body"},[b.value&&v(a)?(z(),De(Eie,{key:0,onClose:Z,onRedraw:V,onOpenSettings:D})):Le("",!0)]))],64))}}),Kie=Zo(jie,[["__scopeId","data-v-e59383dd"]]),qie={class:"map-wrapper"},Yie=Be({__name:"MapContainer",setup(t){const e=Xo(),{activeTool:n,isDrawingOverlay:i}=cd(e),{initMap:s,destroy:r}=Fy(),{onMeasureClick:o}=qw(),a=X(!1);mn(()=>{setTimeout(()=>l(),50)}),eo(()=>{r()});function l(c=0){const u=document.getElementById("map");if(!u){c<10?setTimeout(()=>l(c+1),100):console.error("Failed to initialize map: container not found after 10 retries");return}if(u.classList.contains("leaflet-container"))return;const d=s("map");a.value=!0,setTimeout(()=>d.invalidateSize(),100),setTimeout(()=>d.invalidateSize(),300),setTimeout(()=>d.invalidateSize(),500),setTimeout(()=>d.invalidateSize(),1e3),window.addEventListener("resize",()=>{d.invalidateSize()}),d.on("click",h=>{i.value||n.value&&o(h.latlng)})}return(c,u)=>(z(),se("div",qie,[...u[0]||(u[0]=[U("div",{id:"map",class:"map-container"},null,-1)])]))}}),Xie=Zo(Yie,[["__scopeId","data-v-6515d6a4"]]),Zie={key:0,class:"loading-overlay"},Jie=Be({__name:"LoadingOverlay",setup(t){const e=Xo(),{isLoading:n}=cd(e);return(i,s)=>(z(),De(uh,{to:"body"},[de(Rr,{name:"fade"},{default:xe(()=>[v(n)?(z(),se("div",Zie,[...s[0]||(s[0]=[U("div",{class:"loading-content"},[U("div",{class:"spinner"}),U("p",{class:"loading-text"},"Đang xử lý...")],-1)])])):Le("",!0)]),_:1})]))}}),Qie=Zo(Jie,[["__scopeId","data-v-94504cd8"]]),ese={class:"toast-container"},tse={class:"toast-message"},nse={key:0,class:"toast-count"},ise=["onClick"],sse=Be({__name:"ToastContainer",setup(t){const{toasts:e,remove:n}=dd();function i(s){switch(s){case"success":return vT;case"error":return VJ;case"warn":return dQ;default:return zF}}return(s,r)=>(z(),De(uh,{to:"body"},[U("div",ese,[de(AA,{name:"toast"},{default:xe(()=>[(z(!0),se(At,null,yn(v(e),o=>(z(),se("div",{key:o.id,class:J(["toast",[`toast-${o.type}`,{visible:o.visible}]])},[(z(),De(Sn(i(o.type)),{size:16,class:"toast-icon"})),U("span",tse,Xe(o.message),1),o.count>1?(z(),se("span",nse,Xe(o.count),1)):Le("",!0),U("button",{class:"toast-close",onClick:a=>v(n)(o.id)},[de(v(Lh),{size:14})],8,ise)],2))),128))]),_:1})])]))}}),rse=Zo(sse,[["__scopeId","data-v-c66114f3"]]),ose={class:"app-container"},ase={class:"main-content"},lse={class:"map-area"},cse=Be({__name:"App",setup(t){const{log:e}=Ng();return mn(()=>{e("Ứng dụng CAD2MAP Vue 3 đã khởi động","success")}),(n,i)=>(z(),se("div",ose,[U("div",ase,[U("div",lse,[de(Xie)]),de(ute),de(sne),de(Kie)]),de(v(Qie)),de(v(rse))]))}}),use="2.13.0",TI=Symbol("INSTALLED_KEY"),HF=Symbol(),u0="el",dse="is-",Kh=(t,e,n,i,s)=>{let r=`${t}-${e}`;return n&&(r+=`-${n}`),i&&(r+=`__${i}`),s&&(r+=`--${s}`),r},WF=Symbol("namespaceContextKey"),DA=t=>{const e=t||(xn()?zt(WF,X(u0)):X(u0));return F(()=>v(e)||u0)},ht=(t,e)=>{const n=DA(e);return{namespace:n,b:(m="")=>Kh(n.value,t,m,"",""),e:m=>m?Kh(n.value,t,"",m,""):"",m:m=>m?Kh(n.value,t,"","",m):"",be:(m,b)=>m&&b?Kh(n.value,t,m,b,""):"",em:(m,b)=>m&&b?Kh(n.value,t,"",m,b):"",bm:(m,b)=>m&&b?Kh(n.value,t,m,"",b):"",bem:(m,b,g)=>m&&b&&g?Kh(n.value,t,m,b,g):"",is:(m,...b)=>{const g=b.length>=1?b[0]:!0;return m&&g?`${dse}${m}`:""},cssVar:m=>{const b={};for(const g in m)m[g]&&(b[`--${n.value}-${g}`]=m[g]);return b},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const b={};for(const g in m)m[g]&&(b[`--${n.value}-${t}-${g}`]=m[g]);return b},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}};var GF=typeof global=="object"&&global&&global.Object===Object&&global,hse=typeof self=="object"&&self&&self.Object===Object&&self,nc=GF||hse||Function("return this")(),cl=nc.Symbol,jF=Object.prototype,fse=jF.hasOwnProperty,pse=jF.toString,mv=cl?cl.toStringTag:void 0;function mse(t){var e=fse.call(t,mv),n=t[mv];try{t[mv]=void 0;var i=!0}catch{}var s=pse.call(t);return i&&(e?t[mv]=n:delete t[mv]),s}var gse=Object.prototype,vse=gse.toString;function yse(t){return vse.call(t)}var bse="[object Null]",_se="[object Undefined]",MI=cl?cl.toStringTag:void 0;function lp(t){return t==null?t===void 0?_se:bse:MI&&MI in Object(t)?mse(t):yse(t)}function Hc(t){return t!=null&&typeof t=="object"}var wse="[object Symbol]";function yx(t){return typeof t=="symbol"||Hc(t)&&lp(t)==wse}function NA(t,e){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n0){if(++e>=Yse)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Qse(t){return function(){return t}}var Yw=(function(){try{var t=up(Object,"defineProperty");return t({},"",{}),t}catch{}})(),ere=Yw?function(t,e){return Yw(t,"toString",{configurable:!0,enumerable:!1,value:Qse(e),writable:!0})}:BA,YF=Jse(ere);function tre(t,e){for(var n=-1,i=t==null?0:t.length;++n-1}var ore=9007199254740991,are=/^(?:0|[1-9]\d*)$/;function bx(t,e){var n=typeof t;return e=e??ore,!!e&&(n=="number"||n!="symbol"&&are.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=ure}function zg(t){return t!=null&&VA(t.length)&&!FA(t)}function JF(t,e,n){if(!qo(n))return!1;var i=typeof e;return(i=="number"?zg(n)&&bx(e,n.length):i=="string"&&e in n)?Bg(n[e],t):!1}function dre(t){return $A(function(e,n){var i=-1,s=n.length,r=s>1?n[s-1]:void 0,o=s>2?n[2]:void 0;for(r=t.length>3&&typeof r=="function"?(s--,r):void 0,o&&JF(n[0],n[1],o)&&(r=s<3?void 0:r,s=1),e=Object(e);++i-1}function woe(t,e){var n=this.__data__,i=_x(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function hd(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e0&&n(a)?e>1?Uy(a,e-1,n,i,s):KA(s,a):i||(s[s.length]=a)}return s}function s9(t){var e=t==null?0:t.length;return e?Uy(t,1):[]}function r9(t){return YF(ZF(t,void 0,s9),t+"")}var qA=i9(Object.getPrototypeOf,Object),Noe="[object Object]",Boe=Function.prototype,Foe=Object.prototype,o9=Boe.toString,zoe=Foe.hasOwnProperty,Uoe=o9.call(Object);function a9(t){if(!Hc(t)||lp(t)!=Noe)return!1;var e=qA(t);if(e===null)return!0;var n=zoe.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&o9.call(n)==Uoe}function $oe(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var r=Array(s);++i=e?t:e)),t}function Ex(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=d0(n),n=n===n?n:0),e!==void 0&&(e=d0(e),e=e===e?e:0),Voe(d0(t),e,n)}function Hoe(){this.__data__=new hd,this.size=0}function Woe(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Goe(t){return this.__data__.get(t)}function joe(t){return this.__data__.has(t)}var Koe=200;function qoe(t,e){var n=this.__data__;if(n instanceof hd){var i=n.__data__;if(!z0||i.lengtha))return!1;var c=r.get(t),u=r.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Sle?new U0:void 0;for(r.set(t,e),r.set(e,t);++d=e||A<0||d&&I>=r}function g(){var T=KS();if(b(T))return x(T);a=setTimeout(g,m(T))}function x(T){return a=void 0,h&&i?f(T):(i=s=void 0,o)}function S(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function _(){return a===void 0?o:x(KS())}function E(){var T=KS(),A=b(T);if(i=arguments,s=this,l=T,A){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(g,e),f(l)}return a===void 0&&(a=setTimeout(g,e)),o}return E.cancel=S,E.flush=_,E}var T9=Object.prototype,hce=T9.hasOwnProperty,fce=$A(function(t,e){t=Object(t);var n=-1,i=e.length,s=i>2?e[2]:void 0;for(s&&JF(e[0],e[1],s)&&(i=1);++n1),r}),Fg(t,f9(t),n),i&&(n=$m(n,Cce|Tce|Mce,Ece));for(var s=e.length;s--;)Sce(n,e[s]);return n});function I9(t,e,n,i){if(!qo(t))return t;e=$g(e,t);for(var s=-1,r=e.length,o=r-1,a=t;a!=null&&++s=Oce){var c=Rce(t);if(c)return ZA(c);o=!1,s=b9,l=new U0}else l=a;e:for(;++it===void 0,Mi=t=>typeof t=="boolean",Xt=t=>typeof t=="number",Go=t=>!t&&t!==0||pt(t)&&t.length===0||Mn(t)&&!Object.keys(t).length,ca=t=>typeof Element>"u"?!1:t instanceof Element,ua=t=>Ws(t),Nce=t=>Gt(t)?!Number.isNaN(Number(t)):!1,Hy=t=>t===window;function R9(t,e){var n;const i=wi();return jo(()=>{i.value=t()},{...e,flush:(n=void 0)!=null?n:"sync"}),Vc(i)}function dp(t){return Ly()?(Z2(t),!0):!1}function Ia(t){return typeof t=="function"?t():v(t)}function Bce(t){if(!Li(t))return ni(t);const e=new Proxy({},{get(n,i,s){return v(Reflect.get(t.value,i,s))},set(n,i,s){return Li(t.value[i])&&!Li(s)?t.value[i].value=s:t.value[i]=s,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return ni(e)}function Fce(t){return Bce(F(t))}const pi=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zce=t=>typeof t<"u",O9=t=>t!=null,Uce=Object.prototype.toString,$ce=t=>Uce.call(t)==="[object Object]",D9=(t,e,n)=>Math.min(n,Math.max(e,t)),Fl=()=>{},Jw=Vce();function Vce(){var t,e;return pi&&((t=window?.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window?.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function N9(t,e){function n(...i){return new Promise((s,r)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return n}function Hce(t,e={}){let n,i,s=Fl;const r=a=>{clearTimeout(a),s(),s=Fl};return a=>{const l=Ia(t),c=Ia(e.maxWait);return n&&r(n),l<=0||c!==void 0&&c<=0?(i&&(r(i),i=null),Promise.resolve(a())):new Promise((u,d)=>{s=e.rejectOnCancel?d:u,c&&!i&&(i=setTimeout(()=>{n&&r(n),i=null,u(a())},c)),n=setTimeout(()=>{i&&r(i),i=null,u(a())},l)})}}function Wce(...t){let e=0,n,i=!0,s=Fl,r,o,a,l,c;!Li(t[0])&&typeof t[0]=="object"?{delay:o,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[o,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,s(),s=Fl)};return h=>{const f=Ia(o),p=Date.now()-e,m=()=>r=h();return u(),f<=0?(e=Date.now(),m()):(p>f&&(l||!i)?(e=Date.now(),m()):a&&(r=new Promise((b,g)=>{s=c?g:b,n=setTimeout(()=>{e=Date.now(),i=!0,b(m()),u()},Math.max(0,f-p))})),!l&&!n&&(n=setTimeout(()=>i=!0,f)),i=!1,r)}}function Gce(t){return xn()}function Wy(t,e=200,n={}){return N9(Hce(e,n),t)}function jce(t,e=200,n={}){const i=X(t.value),s=Wy(()=>{i.value=t.value},e,n);return We(t,()=>s()),i}function B9(t,e=200,n=!1,i=!0,s=!1){return N9(Wce(e,n,i,s),t)}function JA(t,e=!0,n){Gce()?mn(t,n):e?t():Nt(t)}function og(t,e,n={}){const{immediate:i=!0}=n,s=X(!1);let r=null;function o(){r&&(clearTimeout(r),r=null)}function a(){s.value=!1,o()}function l(...c){o(),s.value=!0,r=setTimeout(()=>{s.value=!1,r=null,t(...c)},Ia(e))}return i&&(s.value=!0,pi&&l()),dp(a),{isPending:Vc(s),start:l,stop:a}}function nr(t){var e;const n=Ia(t);return(e=n?.$el)!=null?e:n}const ic=pi?window:void 0,Kce=pi?window.document:void 0;function xi(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=ic):[e,n,i,s]=t,!e)return Fl;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const r=[],o=()=>{r.forEach(u=>u()),r.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=We(()=>[nr(e),Ia(s)],([u,d])=>{if(o(),!u)return;const h=$ce(d)?{...d}:d;r.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),o()};return dp(c),c}let i8=!1;function QA(t,e,n={}){const{window:i=ic,ignore:s=[],capture:r=!0,detectIframe:o=!1}=n;if(!i)return Fl;Jw&&!i8&&(i8=!0,Array.from(i.document.body.children).forEach(h=>h.addEventListener("click",Fl)),i.document.documentElement.addEventListener("click",Fl));let a=!0;const l=h=>s.some(f=>{if(typeof f=="string")return Array.from(i.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=nr(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[xi(i,"click",h=>{const f=nr(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:r}),xi(i,"pointerdown",h=>{const f=nr(t);a=!l(h)&&!!(f&&!h.composedPath().includes(f))},{passive:!0}),o&&xi(i,"blur",h=>{setTimeout(()=>{var f;const p=nr(t);((f=i.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!p?.contains(i.document.activeElement)&&e(h)},0)})].filter(Boolean);return()=>u.forEach(h=>h())}function qce(){const t=X(!1),e=xn();return e&&mn(()=>{t.value=!0},e),t}function Tx(t){const e=qce();return F(()=>(e.value,!!t()))}function Gy(t,e,n={}){const{window:i=ic,...s}=n;let r;const o=Tx(()=>i&&"MutationObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=F(()=>{const h=Ia(t),f=(Array.isArray(h)?h:[h]).map(nr).filter(O9);return new Set(f)}),c=We(()=>l.value,h=>{a(),o.value&&h.size&&(r=new MutationObserver(e),h.forEach(f=>r.observe(f,s)))},{immediate:!0,flush:"post"}),u=()=>r?.takeRecords(),d=()=>{a(),c()};return dp(d),{isSupported:o,stop:d,takeRecords:u}}function Yce(t={}){var e;const{window:n=ic,deep:i=!0,triggerOnRemoval:s=!1}=t,r=(e=t.document)!=null?e:n?.document,o=()=>{var c;let u=r?.activeElement;if(i)for(;u?.shadowRoot;)u=(c=u?.shadowRoot)==null?void 0:c.activeElement;return u},a=X(),l=()=>{a.value=o()};return n&&(xi(n,"blur",c=>{c.relatedTarget===null&&l()},!0),xi(n,"focus",l,!0)),s&&Gy(r,c=>{c.filter(u=>u.removedNodes.length).map(u=>Array.from(u.removedNodes)).flat().forEach(u=>{u===a.value&&l()})},{childList:!0,subtree:!0}),l(),a}function Xce(t,e={}){const{window:n=ic}=e,i=Tx(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const r=X(!1),o=c=>{r.value=c.matches},a=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",o):s.removeListener(o))},l=jo(()=>{i.value&&(a(),s=n.matchMedia(Ia(t)),"addEventListener"in s?s.addEventListener("change",o):s.addListener(o),r.value=s.matches)});return dp(()=>{l(),a(),s=void 0}),r}function Zce(t){return JSON.parse(JSON.stringify(t))}function Jce(t,e,n={}){const{window:i=ic,initialValue:s="",observe:r=!1}=n,o=X(s),a=F(()=>{var c;return nr(e)||((c=i?.document)==null?void 0:c.documentElement)});function l(){var c;const u=Ia(t),d=Ia(a);if(d&&i){const h=(c=i.getComputedStyle(d).getPropertyValue(u))==null?void 0:c.trim();o.value=h||s}}return r&&Gy(a,l,{attributeFilter:["style","class"],window:i}),We([a,()=>Ia(t)],l,{immediate:!0}),We(o,c=>{var u;(u=a.value)!=null&&u.style&&a.value.style.setProperty(Ia(t),c)}),o}function Qce(t={}){const{document:e=Kce}=t;if(!e)return X("visible");const n=X(e.visibilityState);return xi(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function as(t,e,n={}){const{window:i=ic,...s}=n;let r;const o=Tx(()=>i&&"ResizeObserver"in i),a=()=>{r&&(r.disconnect(),r=void 0)},l=F(()=>Array.isArray(t)?t.map(d=>nr(d)):[nr(t)]),c=We(l,d=>{if(a(),o.value&&i){r=new ResizeObserver(e);for(const h of d)h&&r.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return dp(u),{isSupported:o,stop:u}}function s8(t,e={}){const{reset:n=!0,windowResize:i=!0,windowScroll:s=!0,immediate:r=!0}=e,o=X(0),a=X(0),l=X(0),c=X(0),u=X(0),d=X(0),h=X(0),f=X(0);function p(){const m=nr(t);if(!m){n&&(o.value=0,a.value=0,l.value=0,c.value=0,u.value=0,d.value=0,h.value=0,f.value=0);return}const b=m.getBoundingClientRect();o.value=b.height,a.value=b.bottom,l.value=b.left,c.value=b.right,u.value=b.top,d.value=b.width,h.value=b.x,f.value=b.y}return as(t,p),We(()=>nr(t),m=>!m&&p()),Gy(t,p,{attributeFilter:["style","class"]}),s&&xi("scroll",p,{capture:!0,passive:!0}),i&&xi("resize",p,{passive:!0}),JA(()=>{r&&p()}),{height:o,bottom:a,left:l,right:c,top:u,width:d,x:h,y:f,update:p}}function MT(t,e={width:0,height:0},n={}){const{window:i=ic,box:s="content-box"}=n,r=F(()=>{var d,h;return(h=(d=nr(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),o=X(e.width),a=X(e.height),{stop:l}=as(t,([d])=>{const h=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(i&&r.value){const f=nr(t);if(f){const p=f.getBoundingClientRect();o.value=p.width,a.value=p.height}}else if(h){const f=Array.isArray(h)?h:[h];o.value=f.reduce((p,{inlineSize:m})=>p+m,0),a.value=f.reduce((p,{blockSize:m})=>p+m,0)}else o.value=d.contentRect.width,a.value=d.contentRect.height},n);JA(()=>{const d=nr(t);d&&(o.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=We(()=>nr(t),d=>{o.value=d?e.width:0,a.value=d?e.height:0});function u(){l(),c()}return{width:o,height:a,stop:u}}function eue(t,e,n={}){const{root:i,rootMargin:s="0px",threshold:r=.1,window:o=ic,immediate:a=!0}=n,l=Tx(()=>o&&"IntersectionObserver"in o),c=F(()=>{const p=Ia(t);return(Array.isArray(p)?p:[p]).map(nr).filter(O9)});let u=Fl;const d=X(a),h=l.value?We(()=>[c.value,nr(i),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const b=new IntersectionObserver(e,{root:nr(m),rootMargin:s,threshold:r});p.forEach(g=>g&&b.observe(g)),u=()=>{b.disconnect(),u=Fl}},{immediate:a,flush:"post"}):Fl,f=()=>{u(),h(),d.value=!1};return dp(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function F9(t,e,n,i={}){var s,r,o;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:h}=i,f=xn(),p=n||f?.emit||((s=f?.$emit)==null?void 0:s.bind(f))||((o=(r=f?.proxy)==null?void 0:r.$emit)==null?void 0:o.bind(f?.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const b=S=>a?typeof a=="function"?a(S):Zce(S):S,g=()=>zce(t[e])?b(t[e]):d,x=S=>{h?h(S)&&p(m,S):p(m,S)};if(l){const S=g(),_=X(S);let E=!1;return We(()=>t[e],T=>{E||(E=!0,_.value=b(T),Nt(()=>E=!1))}),We(_,T=>{!E&&(T!==t[e]||u)&&x(T)},{deep:u}),_}else return F({get(){return g()},set(S){x(S)}})}function tue(t={}){const{window:e=ic}=t;if(!e)return X(!1);const n=X(e.document.hasFocus());return xi(e,"blur",()=>{n.value=!1}),xi(e,"focus",()=>{n.value=!0}),n}function ek(t={}){const{window:e=ic,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:r=!0}=t,o=X(n),a=X(i),l=()=>{e&&(r?(o.value=e.innerWidth,a.value=e.innerHeight):(o.value=e.document.documentElement.clientWidth,a.value=e.document.documentElement.clientHeight))};if(l(),JA(l),xi("resize",l,{passive:!0}),s){const c=Xce("(orientation: portrait)");We(c,()=>l())}return{width:o,height:a}}class nue extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function Ks(t,e){throw new nue(`[${t}] ${e}`)}const r8={current:0},o8=X(0),z9=2e3,a8=Symbol("elZIndexContextKey"),U9=Symbol("zIndexContextKey"),jy=t=>{const e=xn()?zt(a8,r8):r8,n=t||(xn()?zt(U9,void 0):void 0),i=F(()=>{const o=v(n);return Xt(o)?o:z9}),s=F(()=>i.value+o8.value),r=()=>(e.current++,o8.value=e.current,s.value);return!pi&&zt(a8),{initialZIndex:i,currentZIndex:s,nextZIndex:r}};var $9={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const iue=t=>(e,n)=>sue(e,n,v(t)),sue=(t,e,n)=>js(n,t,t).replace(/\{(\w+)\}/g,(i,s)=>{var r;return`${(r=e?.[s])!=null?r:`{${s}}`}`}),rue=t=>{const e=F(()=>v(t).name),n=Li(t)?t:X(t);return{lang:e,locale:n,t:iue(t)}},V9=Symbol("localeContextKey"),Jn=t=>{const e=t||zt(V9,X());return rue(F(()=>e.value||$9))},H9="__epPropKey",Re=t=>t,oue=t=>Mn(t)&&!!t[H9],sc=(t,e)=>{if(!Mn(t)||oue(t))return t;const{values:n,required:i,default:s,type:r,validator:o}=t,l={type:r,required:!!i,validator:n||o?c=>{let u=!1,d=[];if(n&&(d=Array.from(n),fi(t,"default")&&d.push(s),u||(u=d.includes(c))),o&&(u||(u=o(c))),!u&&d.length>0){const h=[...new Set(d)].map(f=>JSON.stringify(f)).join(", ");aX(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[H9]:!0};return fi(t,"default")&&(l.default=s),l},_t=t=>$0(Object.entries(t).map(([e,n])=>[e,sc(n,e)])),Qc=["","default","small","large"],or=sc({type:String,values:Qc,required:!1}),W9=Symbol("size"),G9=()=>{const t=zt(W9,{});return F(()=>v(t.size)||"")},j9=Symbol("emptyValuesContextKey"),aue=["",void 0,null],lue=void 0,hp=_t({emptyValues:Array,valueOnClear:{type:Re([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=Kt(t)?t():t,pt(t)?t.every(e=>!e):!t)}}),Ky=(t,e)=>{const n=xn()?zt(j9,X({})):X({}),i=F(()=>t.emptyValues||n.value.emptyValues||aue),s=F(()=>Kt(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:Kt(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:lue),r=o=>{let a=!0;return pt(o)?a=i.value.some(l=>Ms(o,l)):a=i.value.includes(o),a};return r(s.value),{emptyValues:i,valueOnClear:s,isEmptyValue:r}},V0=t=>Object.keys(t),K9=t=>Object.entries(t),f0=(t,e,n)=>({get value(){return js(t,e,n)},set value(i){Pce(t,e,i)}}),Qw=X();function Hg(t,e=void 0){const n=xn()?zt(HF,Qw):Qw;return t?F(()=>{var i,s;return(s=(i=n.value)==null?void 0:i[t])!=null?s:e}):n}function Mx(t,e){const n=Hg(),i=ht(t,F(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||u0})),s=Jn(F(()=>{var a;return(a=n.value)==null?void 0:a.locale})),r=jy(F(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||z9})),o=F(()=>{var a;return v(e)||((a=n.value)==null?void 0:a.size)||""});return tk(F(()=>v(n)||{})),{ns:i,locale:s,zIndex:r,size:o}}const tk=(t,e,n=!1)=>{var i;const s=!!xn(),r=s?Hg():void 0,o=(i=e?.provide)!=null?i:s?Xn:void 0;if(!o)return;const a=F(()=>{const l=v(t);return r?.value?cue(r.value,l):l});return o(HF,a),o(V9,F(()=>a.value.locale)),o(WF,F(()=>a.value.namespace)),o(U9,F(()=>a.value.zIndex)),o(W9,{size:F(()=>a.value.size||"")}),o(j9,F(()=>({emptyValues:a.value.emptyValues,valueOnClear:a.value.valueOnClear}))),(n||!Qw.value)&&(Qw.value=a.value),a},cue=(t,e)=>{const n=[...new Set([...V0(t),...V0(e)])],i={};for(const s of n)i[s]=e[s]!==void 0?e[s]:t[s];return i},uue=(t=[])=>({version:use,install:(n,i)=>{n[TI]||(n[TI]=!0,t.forEach(s=>n.use(s)),i&&tk(i,n,!0))}}),qy=_t({to:{type:Re([String,Object]),required:!0},disabled:Boolean});var xt=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};const due=Be({__name:"teleport",props:qy,setup(t){return(e,n)=>e.disabled?Ue(e.$slots,"default",{key:0}):(z(),De(uh,{key:1,to:e.to},[Ue(e.$slots,"default")],8,["to"]))}});var hue=xt(due,[["__file","/home/runner/work/element-plus/element-plus/packages/components/teleport/src/teleport.vue"]]);const En=(t,e)=>{if(t.install=n=>{for(const i of[t,...Object.values(e??{})])n.component(i.name,i)},e)for(const[n,i]of Object.entries(e))t[n]=i;return t},q9=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),fue=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Ss=t=>(t.install=_i,t),Wg=En(hue),wn="update:modelValue",Wn="change",Qs="input",pue=_t({zIndex:{type:Re([Number,String]),default:100},target:{type:String,default:""},offset:{type:Number,default:0},position:{type:String,values:["top","bottom"],default:"top"},teleported:Boolean,appendTo:{type:qy.to.type,default:"body"}}),mue={scroll:({scrollTop:t,fixed:e})=>Xt(t)&&Mi(e),[Wn]:t=>Mi(t)};function gue(t,e,n,i){const s=n-e;return t/=i/2,t<1?s/2*t*t*t+e:s/2*((t-=2)*t*t+2)+e}const Gc=t=>pi?window.requestAnimationFrame(t):setTimeout(t,16),nd=t=>pi?window.cancelAnimationFrame(t):clearTimeout(t),Y9=(t="")=>t.split(" ").filter(e=>!!e.trim()),Oc=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},nl=(t,e)=>{!t||!e.trim()||t.classList.add(...Y9(e))},xo=(t,e)=>{!t||!e.trim()||t.classList.remove(...Y9(e))},Ou=(t,e)=>{var n;if(!pi||!t||!e)return"";let i=Co(e);i==="float"&&(i="cssFloat");try{const s=t.style[i];if(s)return s;const r=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return r?r[i]:""}catch{return t.style[i]}},X9=(t,e,n)=>{if(!(!t||!e))if(Mn(e))K9(e).forEach(([i,s])=>X9(t,i,s));else{const i=Co(e);t.style[i]=n}};function xs(t,e="px"){if(!t&&t!==0)return"";if(Xt(t)||Nce(t))return`${t}${e}`;if(Gt(t))return t}const vue=(t,e)=>{if(!pi)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],i=Ou(t,n);return["scroll","auto","overlay"].some(s=>i.includes(s))},nk=(t,e)=>{if(!pi)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(vue(n,e))return n;n=n.parentNode}return n};let X1;const Z9=t=>{var e;if(!pi)return 0;if(X1!==void 0)return X1;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const i=n.offsetWidth;n.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",n.appendChild(s);const r=s.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),X1=i-r,X1};function ik(t,e){if(!pi)return;if(!e){t.scrollTop=0;return}const n=[];let i=e.offsetParent;for(;i!==null&&t!==i&&t.contains(i);)n.push(i),i=i.offsetParent;const s=e.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),r=s+e.offsetHeight,o=t.scrollTop,a=o+t.clientHeight;sa&&(t.scrollTop=r-t.clientHeight)}function yue(t,e,n,i,s){const r=Date.now();let o;const a=()=>{const c=Date.now()-r,u=gue(c>i?i:c,e,n,i);Hy(t)?t.scrollTo(window.pageXOffset,u):t.scrollTop=u,c{o&&nd(o)}}const l8=(t,e)=>Hy(e)?t.ownerDocument.documentElement:e,c8=t=>Hy(t)?window.scrollY:t.scrollTop,u8="ElAffix",bue=Be({name:u8,__name:"affix",props:pue,emits:mue,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("affix"),o=wi(),a=wi(),l=wi(),{height:c}=ek(),{height:u,width:d,top:h,bottom:f,left:p,update:m}=s8(a,{windowScroll:!1}),b=s8(o),g=X(!1),x=X(0),S=X(0),_=F(()=>!i.teleported||!g.value),E=F(()=>({height:g.value?`${u.value}px`:"",width:g.value?`${d.value}px`:""})),T=F(()=>{if(!g.value)return{};const k=xs(i.offset);return{height:`${u.value}px`,width:`${d.value}px`,top:i.position==="top"?k:"",bottom:i.position==="bottom"?k:"",left:i.teleported?`${p.value}px`:"",transform:S.value?`translateY(${S.value}px)`:"",zIndex:i.zIndex}}),A=()=>{if(!l.value)return;x.value=l.value instanceof Window?document.documentElement.scrollTop:l.value.scrollTop||0;const{position:k,target:B,offset:R}=i,H=R+u.value;if(k==="top")if(B){const q=b.bottom.value-H;g.value=R>h.value&&b.bottom.value>0,S.value=q<0?q:0}else g.value=R>h.value;else if(B){const q=c.value-b.top.value-H;g.value=c.value-Rb.top.value,S.value=q<0?-q:0}else g.value=c.value-R{if(!g.value){m();return}g.value=!1,await Nt(),m(),g.value=!0},P=async()=>{m(),await Nt(),s("scroll",{scrollTop:x.value,fixed:g.value})};return We(g,k=>s(Wn,k)),mn(()=>{var k;i.target?(o.value=(k=document.querySelector(i.target))!=null?k:void 0,o.value||Ks(u8,`Target does not exist: ${i.target}`)):o.value=document.documentElement,l.value=nk(a.value,!0),m()}),xi(l,"scroll",P),jo(A),e({update:A,updateRoot:I}),(k,B)=>(z(),se("div",{ref_key:"root",ref:a,class:J(v(r).b()),style:Ht(E.value)},[de(v(Wg),{disabled:_.value,to:k.appendTo},{default:xe(()=>[U("div",{class:J({[v(r).m("fixed")]:g.value}),style:Ht(T.value)},[Ue(k.$slots,"default")],6)]),_:3},8,["disabled","to"])],6))}});var _ue=xt(bue,[["__file","/home/runner/work/element-plus/element-plus/packages/components/affix/src/affix.vue"]]);const wue=En(_ue),xue=_t({size:{type:Re([Number,String])},color:{type:String}}),Sue=Be({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:xue,setup(t){const e=t,n=ht("icon"),i=F(()=>{const{size:s,color:r}=e,o=xs(s);return!o&&!r?{}:{fontSize:o,"--color":r}});return(s,r)=>(z(),se("i",Dn({class:v(n).b(),style:i.value},s.$attrs),[Ue(s.$slots,"default")],16))}});var Eue=xt(Sue,[["__file","/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);const Ut=En(Eue);var Cue=Be({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),eu=Cue,Tue=Be({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),id=Tue,Mue=Be({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),So=Mue,Aue=Be({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Ax=Aue,kue=Be({name:"Back",__name:"back",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),U("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"})]))}}),Pue=kue,Lue=Be({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Iue=Lue,Rue=Be({name:"CaretRight",__name:"caret-right",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M384 192v640l384-320.064z"})]))}}),J9=Rue,Oue=Be({name:"CaretTop",__name:"caret-top",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 320 192 704h639.936z"})]))}}),Due=Oue,Nue=Be({name:"Check",__name:"check",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Yy=Nue,Bue=Be({name:"CircleCheckFilled",__name:"circle-check-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),Fue=Bue,zue=Be({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"}),U("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),sk=zue,Uue=Be({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),rk=Uue,$ue=Be({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"}),U("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"})]))}}),pd=$ue,Vue=Be({name:"Clock",__name:"clock",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"}),U("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),U("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),Q9=Vue,Hue=Be({name:"Close",__name:"close",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),ul=Hue,Wue=Be({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),xh=Wue,Gue=Be({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Sh=Gue,jue=Be({name:"Delete",__name:"delete",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Kue=jue,que=Be({name:"Document",__name:"document",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Yue=que,Xue=Be({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),Zue=Xue,Jue=Be({name:"Hide",__name:"hide",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),U("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),Que=Jue,ede=Be({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),H0=ede,tde=Be({name:"Loading",__name:"loading",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),jc=tde,nde=Be({name:"Minus",__name:"minus",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),ide=nde,sde=Be({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),d8=sde,rde=Be({name:"More",__name:"more",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),ode=rde,ade=Be({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),lde=ade,cde=Be({name:"Plus",__name:"plus",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),e7=cde,ude=Be({name:"QuestionFilled",__name:"question-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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.592q0-64.416-42.24-101.376c-28.16-25.344-65.472-37.312-111.232-37.312m-12.672 406.208a54.27 54.27 0 0 0-38.72 14.784 49.4 49.4 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.85 54.85 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.97 51.97 0 0 0-15.488-38.016 55.94 55.94 0 0 0-39.424-14.784"})]))}}),dde=ude,hde=Be({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),fde=hde,pde=Be({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),mde=pde,gde=Be({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),vde=gde,yde=Be({name:"Search",__name:"search",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),bde=yde,_de=Be({name:"SortDown",__name:"sort-down",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),wde=_de,xde=Be({name:"SortUp",__name:"sort-up",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Sde=xde,Ede=Be({name:"StarFilled",__name:"star-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M313.6 924.48a70.4 70.4 0 0 1-74.152-5.365 70.4 70.4 0 0 1-27.992-68.875l37.888-220.928L88.96 472.96a70.4 70.4 0 0 1 3.788-104.225A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 100.246-28.595 70.4 70.4 0 0 1 25.962 28.595l99.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"})]))}}),Z1=Ede,Cde=Be({name:"Star",__name:"star",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Tde=Cde,Mde=Be({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),t7=Mde,Ade=Be({name:"View",__name:"view",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),kde=Ade,Pde=Be({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),kx=Pde,Lde=Be({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),n7=Lde,Ide=Be({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Rde=Ide;const Ai=Re([String,Object,Function]),i7={Close:ul},ok={Close:ul,SuccessFilled:t7,InfoFilled:H0,WarningFilled:kx,CircleCloseFilled:rk},Eh={primary:H0,success:t7,warning:kx,error:rk,info:H0},Px={validating:jc,success:sk,error:pd},Ode=["light","dark"],Dde=_t({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:V0(Eh),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Ode,default:"light"},showAfter:Number,hideAfter:Number,autoClose:Number}),Nde={close:t=>t instanceof MouseEvent},Bde=Be({name:"ElAlert",__name:"alert",props:Dde,emits:Nde,setup(t,{emit:e}){const{Close:n}=ok,i=t,s=e,r=tr(),o=ht("alert"),a=X(!0),l=F(()=>Eh[i.type]),c=F(()=>!!(i.description||r.default)),u=d=>{a.value=!1,s("close",d)};return i.showAfter||i.hideAfter||i.autoClose,(d,h)=>(z(),De(Rr,{name:v(o).b("fade"),persisted:""},{default:xe(()=>[_n(U("div",{class:J([v(o).b(),v(o).m(d.type),v(o).is("center",d.center),v(o).is(d.effect)]),role:"alert"},[d.showIcon&&(d.$slots.icon||l.value)?(z(),De(v(Ut),{key:0,class:J([v(o).e("icon"),v(o).is("big",c.value)])},{default:xe(()=>[Ue(d.$slots,"icon",{},()=>[(z(),De(Sn(l.value)))])]),_:3},8,["class"])):Le("v-if",!0),U("div",{class:J(v(o).e("content"))},[d.title||d.$slots.title?(z(),se("span",{key:0,class:J([v(o).e("title"),{"with-description":c.value}])},[Ue(d.$slots,"title",{},()=>[cn(Xe(d.title),1)])],2)):Le("v-if",!0),c.value?(z(),se("p",{key:1,class:J(v(o).e("description"))},[Ue(d.$slots,"default",{},()=>[cn(Xe(d.description),1)])],2)):Le("v-if",!0),d.closable?(z(),se(At,{key:2},[d.closeText?(z(),se("div",{key:0,class:J([v(o).e("close-btn"),v(o).is("customed")]),onClick:u},Xe(d.closeText),3)):(z(),De(v(Ut),{key:1,class:J(v(o).e("close-btn")),onClick:u},{default:xe(()=>[de(v(n))]),_:1},8,["class"]))],64)):Le("v-if",!0)],2)],2),[[ci,a.value]])]),_:3},8,["name"]))}});var Fde=xt(Bde,[["__file","/home/runner/work/element-plus/element-plus/packages/components/alert/src/alert.vue"]]);const zde=En(Fde),ak=()=>pi&&/firefox/i.test(window.navigator.userAgent),s7=()=>pi&&/android/i.test(window.navigator.userAgent);let ta;const Ude={height:"0",visibility:"hidden",overflow:ak()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},$de=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],h8=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Vde(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),i=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),s=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:$de.map(o=>[o,e.getPropertyValue(o)]),paddingSize:i,borderSize:s,boxSizing:n}}function f8(t,e=1,n){var i,s;ta||(ta=document.createElement("textarea"),((i=t.parentNode)!=null?i:document.body).appendChild(ta));const{paddingSize:r,borderSize:o,boxSizing:a,contextStyle:l}=Vde(t);l.forEach(([h,f])=>ta?.style.setProperty(h,f)),Object.entries(Ude).forEach(([h,f])=>ta?.style.setProperty(h,f,"important")),ta.value=t.value||t.placeholder||"";let c=ta.scrollHeight;const u={};a==="border-box"?c=c+o:a==="content-box"&&(c=c-r),ta.value="";const d=ta.scrollHeight-r;if(Xt(e)){let h=d*e;a==="border-box"&&(h=h+r+o),c=Math.max(h,c),u.minHeight=`${h}px`}if(Xt(n)){let h=d*n;a==="border-box"&&(h=h+r+o),c=Math.min(h,c)}return u.height=`${c}px`,(s=ta.parentNode)==null||s.removeChild(ta),ta=void 0,u}const ws=t=>t,Hde=_t({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),To=t=>td(Hde,t),Xy=_t({id:{type:String,default:void 0},size:or,disabled:{type:Boolean,default:void 0},modelValue:{type:Re([String,Number,Object]),default:""},modelModifiers:{type:Re(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:Re(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:Re([Boolean,Object]),default:!1},autocomplete:{type:Re(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:Ai,default:pd},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:Ai},prefixIcon:{type:Ai},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:Re([Object,Array,String]),default:()=>ws({})},autofocus:Boolean,rows:{type:Number,default:2},...To(["ariaLabel"]),inputmode:{type:Re(String),default:void 0},name:String}),Wde={[wn]:t=>Gt(t),input:t=>Gt(t),change:(t,e)=>Gt(t)&&(e instanceof Event||e===void 0),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent},Gde=["class","style"],jde=/^on[A-Z]/,Lx=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=F(()=>(n?.value||[]).concat(Gde)),s=xn();return F(s?()=>{var r;return $0(Object.entries((r=s.proxy)==null?void 0:r.$attrs).filter(([o])=>!i.value.includes(o)&&!(e&&jde.test(o))))}:()=>({}))},p8={prefix:Math.floor(Math.random()*1e4),current:0},Kde=Symbol("elIdInjection"),lk=()=>xn()?zt(Kde,p8):p8,jr=t=>{const e=lk(),n=DA();return R9(()=>v(t)||`${n.value}-id-${e.prefix}-${e.current++}`)},fp=Symbol("formContextKey"),Kc=Symbol("formItemContextKey"),zr=()=>{const t=zt(fp,void 0),e=zt(Kc,void 0);return{form:t,formItem:e}},Ba=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=X(!1)),i||(i=X(!1));const s=xn(),r=()=>{let c=s?.parent;for(;c;){if(c.type.name==="ElFormItem")return!1;if(c.type.name==="ElLabelWrap")return!0;c=c.parent}return!1},o=X();let a;const l=F(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return mn(()=>{a=We([Ei(t,"id"),n],([c,u])=>{const d=c??(u?void 0:jr().value);d!==o.value&&(e?.removeInputId&&!r()&&(o.value&&e.removeInputId(o.value),!i?.value&&!u&&d&&e.addInputId(d)),o.value=d)},{immediate:!0})}),eo(()=>{a&&a(),e?.removeInputId&&o.value&&e.removeInputId(o.value)}),{isLabeledByFormItem:l,inputId:o}},r7=t=>{const e=xn();return F(()=>{var n,i;return(i=(n=e?.proxy)==null?void 0:n.$props)==null?void 0:i[t]})},er=(t,e={})=>{const n=X(void 0),i=e.prop?n:r7("size"),s=e.global?n:G9(),r=e.form?{size:void 0}:zt(fp,void 0),o=e.formItem?{size:void 0}:zt(Kc,void 0);return F(()=>i.value||v(t)||o?.size||r?.size||s.value||"")},Es=t=>{const e=r7("disabled"),n=zt(fp,void 0);return F(()=>{var i,s,r;return(r=(s=(i=e.value)!=null?i:v(t))!=null?s:n?.disabled)!=null?r:!1})},qde='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',m8=t=>typeof Element>"u"?!1:t instanceof Element,Yde=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,g8=t=>Array.from(t.querySelectorAll(qde)).filter(e=>W0(e)&&Yde(e)),W0=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},$_=function(t,e,...n){let i;e.includes("mouse")||e.includes("click")?i="MouseEvents":e.includes("key")?i="KeyboardEvent":i="HTMLEvents";const s=document.createEvent(i);return s.initEvent(e,...n),t.dispatchEvent(s),t},o7=t=>!t.getAttribute("aria-owns"),a7=(t,e,n)=>{const{parentNode:i}=t;if(!i)return null;const s=i.querySelectorAll(n),r=Array.prototype.indexOf.call(s,t);return s[r+e]||null},Zy=(t,e)=>{if(!t||!t.focus)return;let n=!1;m8(t)&&!W0(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),m8(t)&&n&&t.removeAttribute("tabindex")},V_=t=>{t&&(Zy(t),!o7(t)&&t.click())};function md(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:s,afterBlur:r}={}){const o=xn(),{emit:a}=o,l=wi(),c=X(!1),u=f=>{const p=Kt(n)?n(f):!1;v(e)||c.value||p||(c.value=!0,a("focus",f),i?.())},d=f=>{var p;const m=Kt(s)?s(f):!1;v(e)||f.relatedTarget&&((p=l.value)!=null&&p.contains(f.relatedTarget))||m||(c.value=!1,a("blur",f),r?.())},h=f=>{var p,m;v(e)||W0(f.target)||(p=l.value)!=null&&p.contains(document.activeElement)&&l.value!==document.activeElement||(m=t.value)==null||m.focus()};return We([l,()=>v(e)],([f,p])=>{f&&(p?f.removeAttribute("tabindex"):f.setAttribute("tabindex","-1"))}),xi(l,"focus",u,!0),xi(l,"blur",d,!0),xi(l,"click",h,!0),{isFocused:c,wrapperRef:l,handleFocus:u,handleBlur:d}}const Xde=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t);function Jy({afterComposition:t,emit:e}){const n=X(!1),i=a=>{e?.("compositionstart",a),n.value=!0},s=a=>{var l;e?.("compositionupdate",a);const c=(l=a.target)==null?void 0:l.value,u=c[c.length-1]||"";n.value=!Xde(u)},r=a=>{e?.("compositionend",a),n.value&&(n.value=!1,Nt(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?r(a):s(a)},handleCompositionStart:i,handleCompositionUpdate:s,handleCompositionEnd:r}}function Zde(t){let e;function n(){if(t.value==null)return;const{selectionStart:s,selectionEnd:r,value:o}=t.value;if(s==null||r==null)return;const a=o.slice(0,Math.max(0,s)),l=o.slice(Math.max(0,r));e={selectionStart:s,selectionEnd:r,value:o,beforeTxt:a,afterTxt:l}}function i(){if(t.value==null||e==null)return;const{value:s}=t.value,{beforeTxt:r,afterTxt:o,selectionStart:a}=e;if(r==null||o==null||a==null)return;let l=s.length;if(s.endsWith(o))l=s.length-o.length;else if(s.startsWith(r))l=r.length;else{const c=r[a-1],u=s.indexOf(c,a-1);u!==-1&&(l=u+1)}t.value.setSelectionRange(l,l)}return[n,i]}const Jde=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Qde=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role"],ehe="ElInput",the=Be({name:ehe,inheritAttrs:!1,__name:"input",props:Xy,emits:Wde,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ld(),o=Lx(),a=tr(),l=F(()=>[i.type==="textarea"?b.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",ne.value),{[m.b("group")]:a.prepend||a.append,[m.m("prefix")]:a.prefix||i.prefixIcon,[m.m("suffix")]:a.suffix||i.suffixIcon||i.clearable||i.showPassword,[m.bm("suffix","password-clear")]:K.value&&W.value,[m.b("hidden")]:i.type==="hidden"},r.class]),c=F(()=>[m.e("wrapper"),m.is("focus",P.value)]),{form:u,formItem:d}=zr(),{inputId:h}=Ba(i,{formItemContext:d}),f=er(),p=Es(),m=ht("input"),b=ht("textarea"),g=wi(),x=wi(),S=X(!1),_=X(!1),E=X(),T=wi(i.inputStyle),A=F(()=>g.value||x.value),{wrapperRef:I,isFocused:P,handleFocus:k,handleBlur:B}=md(A,{disabled:p,afterBlur(){var $e;i.validateEvent&&(($e=d?.validate)==null||$e.call(d,"blur").catch(ot=>void 0))}}),R=F(()=>{var $e;return($e=u?.statusIcon)!=null?$e:!1}),H=F(()=>d?.validateState||""),q=F(()=>H.value&&Px[H.value]),oe=F(()=>_.value?kde:Que),Z=F(()=>[r.style]),V=F(()=>[i.inputStyle,T.value,{resize:i.resize}]),D=F(()=>Ws(i.modelValue)?"":String(i.modelValue)),K=F(()=>i.clearable&&!p.value&&!i.readonly&&!!D.value&&(P.value||S.value)),W=F(()=>i.showPassword&&!p.value&&!!D.value),Q=F(()=>i.showWordLimit&&!!i.maxlength&&(i.type==="text"||i.type==="textarea")&&!p.value&&!i.readonly&&!i.showPassword),ie=F(()=>D.value.length),ne=F(()=>!!Q.value&&ie.value>Number(i.maxlength)),ce=F(()=>!!a.suffix||!!i.suffixIcon||K.value||i.showPassword||Q.value||!!H.value&&R.value),ae=F(()=>!!Object.keys(i.modelModifiers).length),[_e,ke]=Zde(g);as(x,$e=>{if(Fe(),!Q.value||i.resize!=="both"&&i.resize!=="horizontal")return;const ot=$e[0],{width:dt}=ot.contentRect;E.value={right:`calc(100% - ${dt+22-10}px)`}});const Te=()=>{const{type:$e,autosize:ot}=i;if(!(!pi||$e!=="textarea"||!x.value))if(ot){const dt=Mn(ot)?ot.minRows:void 0,Jt=Mn(ot)?ot.maxRows:void 0,at=f8(x.value,dt,Jt);T.value={overflowY:"hidden",...at},Nt(()=>{x.value.offsetHeight,T.value=at})}else T.value={minHeight:f8(x.value).minHeight}},Fe=($e=>{let ot=!1;return()=>{var dt;if(ot||!i.autosize)return;((dt=x.value)==null?void 0:dt.offsetParent)===null||(setTimeout($e),ot=!0)}})(Te),ve=()=>{const $e=A.value,ot=i.formatter?i.formatter(D.value):D.value;!$e||$e.value===ot||i.type==="file"||($e.value=ot)},fe=$e=>{const{trim:ot,number:dt}=i.modelModifiers;return ot&&($e=$e.trim()),dt&&($e=`${h8($e)}`),i.formatter&&i.parser&&($e=i.parser($e)),$e},Me=async $e=>{if(Qe.value)return;const{lazy:ot}=i.modelModifiers;let{value:dt}=$e.target;if(ot){s(Qs,dt);return}if(dt=fe(dt),String(dt)===D.value){i.formatter&&ve();return}_e(),s(wn,dt),s(Qs,dt),await Nt(),(i.formatter&&i.parser||!ae.value)&&ve(),ke()},ge=async $e=>{let{value:ot}=$e.target;ot=fe(ot),i.modelModifiers.lazy&&s(wn,ot),s(Wn,ot,$e),await Nt(),ve()},{isComposing:Qe,handleCompositionStart:G,handleCompositionUpdate:ee,handleCompositionEnd:j}=Jy({emit:s,afterComposition:Me}),he=()=>{_.value=!_.value},be=()=>{var $e;return($e=A.value)==null?void 0:$e.focus()},re=()=>{var $e;return($e=A.value)==null?void 0:$e.blur()},le=$e=>{S.value=!1,s("mouseleave",$e)},Ce=$e=>{S.value=!0,s("mouseenter",$e)},Ee=$e=>{s("keydown",$e)},Oe=()=>{var $e;($e=A.value)==null||$e.select()},Ge=()=>{s(wn,""),s(Wn,""),s("clear"),s(Qs,"")};return We(()=>i.modelValue,()=>{var $e;Nt(()=>Te()),i.validateEvent&&(($e=d?.validate)==null||$e.call(d,"change").catch(ot=>void 0))}),We(D,$e=>{if(!A.value)return;const{trim:ot,number:dt}=i.modelModifiers,Jt=A.value.value,at=(dt||i.type==="number")&&!/^0\d/.test(Jt)?`${h8(Jt)}`:Jt;at!==$e&&(document.activeElement===A.value&&A.value.type!=="range"&&ot&&at.trim()===$e||ve())}),We(()=>i.type,async()=>{await Nt(),ve(),Te()}),mn(()=>{!i.formatter&&i.parser,ve(),Nt(Te)}),e({input:g,textarea:x,ref:A,textareaStyle:V,autosize:Ei(i,"autosize"),isComposing:Qe,focus:be,blur:re,select:Oe,clear:Ge,resizeTextarea:Te}),($e,ot)=>(z(),se("div",{class:J([l.value,{[v(m).bm("group","append")]:$e.$slots.append,[v(m).bm("group","prepend")]:$e.$slots.prepend}]),style:Ht(Z.value),onMouseenter:Ce,onMouseleave:le},[Le(" input "),$e.type!=="textarea"?(z(),se(At,{key:0},[Le(" prepend slot "),$e.$slots.prepend?(z(),se("div",{key:0,class:J(v(m).be("group","prepend"))},[Ue($e.$slots,"prepend")],2)):Le("v-if",!0),U("div",{ref_key:"wrapperRef",ref:I,class:J(c.value)},[Le(" prefix slot "),$e.$slots.prefix||$e.prefixIcon?(z(),se("span",{key:0,class:J(v(m).e("prefix"))},[U("span",{class:J(v(m).e("prefix-inner"))},[Ue($e.$slots,"prefix"),$e.prefixIcon?(z(),De(v(Ut),{key:0,class:J(v(m).e("icon"))},{default:xe(()=>[(z(),De(Sn($e.prefixIcon)))]),_:1},8,["class"])):Le("v-if",!0)],2)],2)):Le("v-if",!0),U("input",Dn({id:v(h),ref_key:"input",ref:g,class:v(m).e("inner")},v(o),{name:$e.name,minlength:$e.minlength,maxlength:$e.maxlength,type:$e.showPassword?_.value?"text":"password":$e.type,disabled:v(p),readonly:$e.readonly,autocomplete:$e.autocomplete,tabindex:$e.tabindex,"aria-label":$e.ariaLabel,placeholder:$e.placeholder,style:$e.inputStyle,form:$e.form,autofocus:$e.autofocus,role:$e.containerRole,inputmode:$e.inputmode,onCompositionstart:ot[0]||(ot[0]=(...dt)=>v(G)&&v(G)(...dt)),onCompositionupdate:ot[1]||(ot[1]=(...dt)=>v(ee)&&v(ee)(...dt)),onCompositionend:ot[2]||(ot[2]=(...dt)=>v(j)&&v(j)(...dt)),onInput:Me,onChange:ge,onKeydown:Ee}),null,16,Jde),Le(" suffix slot "),ce.value?(z(),se("span",{key:1,class:J(v(m).e("suffix"))},[U("span",{class:J(v(m).e("suffix-inner"))},[!K.value||!W.value||!Q.value?(z(),se(At,{key:0},[Ue($e.$slots,"suffix"),$e.suffixIcon?(z(),De(v(Ut),{key:0,class:J(v(m).e("icon"))},{default:xe(()=>[(z(),De(Sn($e.suffixIcon)))]),_:1},8,["class"])):Le("v-if",!0)],64)):Le("v-if",!0),K.value?(z(),De(v(Ut),{key:1,class:J([v(m).e("icon"),v(m).e("clear")]),onMousedown:un(v(_i),["prevent"]),onClick:Ge},{default:xe(()=>[(z(),De(Sn($e.clearIcon)))]),_:1},8,["class","onMousedown"])):Le("v-if",!0),W.value?(z(),De(v(Ut),{key:2,class:J([v(m).e("icon"),v(m).e("password")]),onClick:he,onMousedown:un(v(_i),["prevent"]),onMouseup:un(v(_i),["prevent"])},{default:xe(()=>[(z(),De(Sn(oe.value)))]),_:1},8,["class","onMousedown","onMouseup"])):Le("v-if",!0),Q.value?(z(),se("span",{key:3,class:J([v(m).e("count"),v(m).is("outside",$e.wordLimitPosition==="outside")])},[U("span",{class:J(v(m).e("count-inner"))},Xe(ie.value)+" / "+Xe($e.maxlength),3)],2)):Le("v-if",!0),H.value&&q.value&&R.value?(z(),De(v(Ut),{key:4,class:J([v(m).e("icon"),v(m).e("validateIcon"),v(m).is("loading",H.value==="validating")])},{default:xe(()=>[(z(),De(Sn(q.value)))]),_:1},8,["class"])):Le("v-if",!0)],2)],2)):Le("v-if",!0)],2),Le(" append slot "),$e.$slots.append?(z(),se("div",{key:1,class:J(v(m).be("group","append"))},[Ue($e.$slots,"append")],2)):Le("v-if",!0)],64)):(z(),se(At,{key:1},[Le(" textarea "),U("textarea",Dn({id:v(h),ref_key:"textarea",ref:x,class:[v(b).e("inner"),v(m).is("focus",v(P))]},v(o),{name:$e.name,minlength:$e.minlength,maxlength:$e.maxlength,tabindex:$e.tabindex,disabled:v(p),readonly:$e.readonly,autocomplete:$e.autocomplete,style:V.value,"aria-label":$e.ariaLabel,placeholder:$e.placeholder,form:$e.form,autofocus:$e.autofocus,rows:$e.rows,role:$e.containerRole,onCompositionstart:ot[3]||(ot[3]=(...dt)=>v(G)&&v(G)(...dt)),onCompositionupdate:ot[4]||(ot[4]=(...dt)=>v(ee)&&v(ee)(...dt)),onCompositionend:ot[5]||(ot[5]=(...dt)=>v(j)&&v(j)(...dt)),onInput:Me,onFocus:ot[6]||(ot[6]=(...dt)=>v(k)&&v(k)(...dt)),onBlur:ot[7]||(ot[7]=(...dt)=>v(B)&&v(B)(...dt)),onChange:ge,onKeydown:Ee}),null,16,Qde),Q.value?(z(),se("span",{key:0,style:Ht(E.value),class:J([v(m).e("count"),v(m).is("outside",$e.wordLimitPosition==="outside")])},Xe(ie.value)+" / "+Xe($e.maxlength),7)):Le("v-if",!0)],64))],38))}});var nhe=xt(the,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input/src/input.vue"]]);const wo=En(nhe),kp=4,l7={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"}},ihe=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),ck=Symbol("scrollbarContextKey"),she=_t({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),rhe="Thumb",ohe=Be({__name:"thumb",props:she,setup(t){const e=t,n=zt(ck),i=ht("scrollbar");n||Ks(rhe,"can not inject scrollbar context");const s=X(),r=X(),o=X({}),a=X(!1);let l=!1,c=!1,u=0,d=0,h=pi?document.onselectstart:null;const f=F(()=>l7[e.vertical?"vertical":"horizontal"]),p=F(()=>ihe({size:e.size,move:e.move,bar:f.value})),m=F(()=>s.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/r.value[f.value.offset]),b=I=>{var P;if(I.stopPropagation(),I.ctrlKey||[1,2].includes(I.button))return;(P=window.getSelection())==null||P.removeAllRanges(),x(I);const k=I.currentTarget;k&&(o.value[f.value.axis]=k[f.value.offset]-(I[f.value.client]-k.getBoundingClientRect()[f.value.direction]))},g=I=>{if(!r.value||!s.value||!n.wrapElement)return;const P=Math.abs(I.target.getBoundingClientRect()[f.value.direction]-I[f.value.client]),k=r.value[f.value.offset]/2,B=(P-k)*100*m.value/s.value[f.value.offset];n.wrapElement[f.value.scroll]=B*n.wrapElement[f.value.scrollSize]/100},x=I=>{I.stopImmediatePropagation(),l=!0,u=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",S),document.addEventListener("mouseup",_),h=document.onselectstart,document.onselectstart=()=>!1},S=I=>{if(!s.value||!r.value||l===!1)return;const P=o.value[f.value.axis];if(!P)return;const k=(s.value.getBoundingClientRect()[f.value.direction]-I[f.value.client])*-1,B=r.value[f.value.offset]-P,R=(k-B)*100*m.value/s.value[f.value.offset];f.value.scroll==="scrollLeft"?n.wrapElement[f.value.scroll]=R*d/100:n.wrapElement[f.value.scroll]=R*u/100},_=()=>{l=!1,o.value[f.value.axis]=0,document.removeEventListener("mousemove",S),document.removeEventListener("mouseup",_),A(),c&&(a.value=!1)},E=()=>{c=!1,a.value=!!e.size},T=()=>{c=!0,a.value=l};gi(()=>{A(),document.removeEventListener("mouseup",_)});const A=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return xi(Ei(n,"scrollbarElement"),"mousemove",E),xi(Ei(n,"scrollbarElement"),"mouseleave",T),(I,P)=>(z(),De(Rr,{name:v(i).b("fade"),persisted:""},{default:xe(()=>[_n(U("div",{ref_key:"instance",ref:s,class:J([v(i).e("bar"),v(i).is(f.value.key)]),onMousedown:g,onClick:P[0]||(P[0]=un(()=>{},["stop"]))},[U("div",{ref_key:"thumb",ref:r,class:J(v(i).e("thumb")),style:Ht(p.value),onMousedown:b},null,38)],34),[[ci,I.always||a.value]])]),_:1},8,["name"]))}});var v8=xt(ohe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/thumb.vue"]]);const ahe=_t({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),lhe=Be({__name:"bar",props:ahe,setup(t,{expose:e}){const n=t,i=zt(ck),s=X(0),r=X(0),o=X(""),a=X(""),l=X(1),c=X(1);return e({handleScroll:h=>{if(h){const f=h.offsetHeight-kp,p=h.offsetWidth-kp;r.value=h.scrollTop*100/f*l.value,s.value=h.scrollLeft*100/p*c.value}},update:()=>{const h=i?.wrapElement;if(!h)return;const f=h.offsetHeight-kp,p=h.offsetWidth-kp,m=f**2/h.scrollHeight,b=p**2/h.scrollWidth,g=Math.max(m,n.minSize),x=Math.max(b,n.minSize);l.value=m/(f-m)/(g/(f-g)),c.value=b/(p-b)/(x/(p-x)),a.value=g+kp(z(),se(At,null,[de(v8,{move:s.value,ratio:c.value,size:o.value,always:h.always},null,8,["move","ratio","size","always"]),de(v8,{move:r.value,ratio:l.value,size:a.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}});var che=xt(lhe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/bar.vue"]]);const uhe=_t({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:Re([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,...To(["ariaLabel","ariaOrientation"])}),c7={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(Xt)},dhe=["tabindex"],hhe="ElScrollbar",fhe=Be({name:hhe,__name:"scrollbar",props:uhe,emits:c7,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("scrollbar");let o,a,l,c=0,u=0,d="";const h={bottom:!1,top:!1,right:!1,left:!1},f=X(),p=X(),m=X(),b=X(),g=F(()=>{const R={},H=xs(i.height),q=xs(i.maxHeight);return H&&(R.height=H),q&&(R.maxHeight=q),[i.wrapStyle,R]}),x=F(()=>[i.wrapClass,r.e("wrap"),{[r.em("wrap","hidden-default")]:!i.native}]),S=F(()=>[r.e("view"),i.viewClass]),_=R=>{var H;return(H=h[R])!=null?H:!1},E={top:"bottom",bottom:"top",left:"right",right:"left"},T=R=>{const H=E[d];if(!H)return;const q=R[d],oe=R[H];q&&!h[d]&&(h[d]=!0),!oe&&h[H]&&(h[H]=!1)},A=()=>{var R;if(p.value){(R=b.value)==null||R.handleScroll(p.value);const H=c,q=u;c=p.value.scrollTop,u=p.value.scrollLeft;const oe={bottom:c+p.value.clientHeight>=p.value.scrollHeight-i.distance,top:c<=i.distance&&H!==0,right:u+p.value.clientWidth>=p.value.scrollWidth-i.distance&&q!==u,left:u<=i.distance&&q!==0};if(s("scroll",{scrollTop:c,scrollLeft:u}),H!==c&&(d=c>H?"bottom":"top"),q!==u&&(d=u>q?"right":"left"),i.distance>0){if(_(d))return;T(oe)}oe[d]&&s("end-reached",d)}};function I(R,H){Mn(R)?p.value.scrollTo(R):Xt(R)&&Xt(H)&&p.value.scrollTo(R,H)}const P=R=>{Xt(R)&&(p.value.scrollTop=R)},k=R=>{Xt(R)&&(p.value.scrollLeft=R)},B=()=>{var R;(R=b.value)==null||R.update(),h[d]=!1};return We(()=>i.noresize,R=>{R?(o?.(),a?.(),l?.()):({stop:o}=as(m,B),{stop:a}=as(p,B),l=xi("resize",B))},{immediate:!0}),We(()=>[i.maxHeight,i.height],()=>{i.native||Nt(()=>{var R;B(),p.value&&((R=b.value)==null||R.handleScroll(p.value))})}),Xn(ck,ni({scrollbarElement:f,wrapElement:p})),rx(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),mn(()=>{i.native||Nt(()=>{B()})}),ec(()=>B()),e({wrapRef:p,update:B,scrollTo:I,setScrollTop:P,setScrollLeft:k,handleScroll:A}),(R,H)=>(z(),se("div",{ref_key:"scrollbarRef",ref:f,class:J(v(r).b())},[U("div",{ref_key:"wrapRef",ref:p,class:J(x.value),style:Ht(g.value),tabindex:R.tabindex,onScroll:A},[(z(),De(Sn(R.tag),{id:R.id,ref_key:"resizeRef",ref:m,class:J(S.value),style:Ht(R.viewStyle),role:R.role,"aria-label":R.ariaLabel,"aria-orientation":R.ariaOrientation},{default:xe(()=>[Ue(R.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,dhe),R.native?Le("v-if",!0):(z(),De(che,{key:0,ref_key:"barRef",ref:b,always:R.always,"min-size":R.minSize},null,8,["always","min-size"]))],2))}});var phe=xt(fhe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/scrollbar/src/scrollbar.vue"]]);const Wl=En(phe),uk=Symbol("popper"),u7=Symbol("popperContent"),d7=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],h7=_t({role:{type:String,values:d7,default:"tooltip"}}),mhe=Be({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:h7,setup(t,{expose:e}){const n=t,i=X(),s=X(),r=X(),o=X(),a=F(()=>n.role),l={triggerRef:i,popperInstanceRef:s,contentRef:r,referenceRef:o,role:a};return e(l),Xn(uk,l),(c,u)=>Ue(c.$slots,"default")}});var ghe=xt(mhe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/popper.vue"]]);const vhe=Be({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=ht("popper"),{arrowRef:i,arrowStyle:s}=zt(u7,void 0);return gi(()=>{i.value=void 0}),e({arrowRef:i}),(r,o)=>(z(),se("span",{ref_key:"arrowRef",ref:i,class:J(v(n).e("arrow")),style:Ht(v(s)),"data-popper-arrow":""},null,6))}});var yhe=xt(vhe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/arrow.vue"]]);const f7=_t({virtualRef:{type:Re(Object)},virtualTriggering:Boolean,onMouseenter:{type:Re(Function)},onMouseleave:{type:Re(Function)},onClick:{type:Re(Function)},onKeydown:{type:Re(Function)},onFocus:{type:Re(Function)},onBlur:{type:Re(Function)},onContextmenu:{type:Re(Function)},id:String,open:Boolean}),p7=Symbol("elForwardRef"),bhe=t=>{Xn(p7,{setForwardRef:n=>{t.value=n}})},_he=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),whe="ElOnlyChild",m7=Be({name:whe,setup(t,{slots:e,attrs:n}){var i;const s=zt(p7),r=_he((i=s?.setForwardRef)!=null?i:_i);return()=>{var o;const a=(o=e.default)==null?void 0:o.call(e,n);if(!a)return null;const[l,c]=g7(a);return l?_n(ed(l,n),[[r]]):null}}});function g7(t){if(!t)return[null,0];const e=t,n=e.filter(i=>i.type!==Hs).length;for(const i of e){if(Mn(i))switch(i.type){case Hs:continue;case ap:case"svg":return[y8(i),n];case At:return g7(i.children);default:return[i,n]}return[y8(i),n]}return[null,0]}function y8(t){const e=ht("only-child");return de("span",{class:e.e("content")},[t])}const xhe=Be({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:f7,setup(t,{expose:e}){const n=t,{role:i,triggerRef:s}=zt(uk,void 0);bhe(s);const r=F(()=>a.value?n.id:void 0),o=F(()=>{if(i&&i.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=F(()=>{if(i&&i.value!=="tooltip")return i.value}),l=F(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return mn(()=>{We(()=>n.virtualRef,d=>{d&&(s.value=nr(d))},{immediate:!0}),We(s,(d,h)=>{c?.(),c=void 0,ca(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),ca(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),W0(d)&&(c=We([r,o,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{Ws(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),ca(h)&&W0(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),gi(()=>{if(c?.(),c=void 0,s.value&&ca(s.value)){const d=s.value;u.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(h))}),s.value=void 0}}),e({triggerRef:s}),(d,h)=>d.virtualTriggering?Le("v-if",!0):(z(),De(v(m7),Dn({key:0},d.$attrs,{"aria-controls":r.value,"aria-describedby":o.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:xe(()=>[Ue(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var She=xt(xhe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/trigger.vue"]]);const YS="focus-trap.focus-after-trapped",XS="focus-trap.focus-after-released",Ehe="focus-trap.focusout-prevented",b8={cancelable:!0,bubbles:!1},Che={cancelable:!0,bubbles:!1},_8="focusAfterTrapped",w8="focusAfterReleased",v7=Symbol("elFocusTrap"),dk=X(),Ix=X(0),hk=X(0);let J1=0;const y7=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},x8=(t,e)=>{for(const n of t)if(!The(n,e))return n},The=(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},Mhe=t=>{const e=y7(t),n=x8(e,t),i=x8(e.reverse(),t);return[n,i]},Ahe=t=>t instanceof HTMLInputElement&&"select"in t,Vd=(t,e)=>{if(t){const n=document.activeElement;Zy(t,{preventScroll:!0}),hk.value=window.performance.now(),t!==n&&Ahe(t)&&e&&t.select()}};function S8(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const khe=()=>{let t=[];return{push:i=>{const s=t[0];s&&i!==s&&s.pause(),t=S8(t,i),t.unshift(i)},remove:i=>{var s,r;t=S8(t,i),(r=(s=t[0])==null?void 0:s.resume)==null||r.call(s)}}},Phe=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Vd(i,e),document.activeElement!==n)return},E8=khe(),Lhe=()=>Ix.value>hk.value,Q1=()=>{dk.value="pointer",Ix.value=window.performance.now()},C8=()=>{dk.value="keyboard",Ix.value=window.performance.now()},Ihe=()=>(mn(()=>{J1===0&&(document.addEventListener("mousedown",Q1),document.addEventListener("touchstart",Q1),document.addEventListener("keydown",C8)),J1++}),gi(()=>{J1--,J1<=0&&(document.removeEventListener("mousedown",Q1),document.removeEventListener("touchstart",Q1),document.removeEventListener("keydown",C8))}),{focusReason:dk,lastUserFocusTimestamp:Ix,lastAutomatedFocusTimestamp:hk}),eb=t=>new CustomEvent(Ehe,{...Che,detail:t}),gt={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"},_r=(t,e,{checkForDefaultPrevented:n=!0}={})=>s=>{const r=t?.(s);if(n===!1||!r)return e?.(s)},T8=t=>e=>e.pointerType==="mouse"?t(e):void 0,Oi=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=b7(t);return e?Object.values(gt).includes(e)?e:e===" "?gt.space:"":""},b7=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&s7()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e};let xm=[];const M8=t=>{Oi(t)===gt.esc&&xm.forEach(n=>n(t))},Rhe=t=>{mn(()=>{xm.length===0&&document.addEventListener("keydown",M8),pi&&xm.push(t)}),gi(()=>{xm=xm.filter(e=>e!==t),xm.length===0&&pi&&document.removeEventListener("keydown",M8)})},Ohe=Be({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[_8,w8,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=X();let i,s;const{focusReason:r}=Ihe();Rhe(p=>{t.trapped&&!o.paused&&e("release-requested",p)});const o={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!t.loop&&!t.trapped||o.paused)return;const{altKey:m,ctrlKey:b,metaKey:g,currentTarget:x,shiftKey:S}=p,{loop:_}=t,T=Oi(p)===gt.tab&&!m&&!b&&!g,A=document.activeElement;if(T&&A){const I=x,[P,k]=Mhe(I);if(P&&k){if(!S&&A===k){const R=eb({focusReason:r.value});e("focusout-prevented",R),R.defaultPrevented||(p.preventDefault(),_&&Vd(P,!0))}else if(S&&[P,I].includes(A)){const R=eb({focusReason:r.value});e("focusout-prevented",R),R.defaultPrevented||(p.preventDefault(),_&&Vd(k,!0))}}else if(A===I){const R=eb({focusReason:r.value});e("focusout-prevented",R),R.defaultPrevented||p.preventDefault()}}};Xn(v7,{focusTrapRef:n,onKeydown:a}),We(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),We([n],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",u),p.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",u),m.removeEventListener("focusout",d))});const l=p=>{e(_8,p)},c=p=>e(w8,p),u=p=>{const m=v(n);if(!m)return;const b=p.target,g=p.relatedTarget,x=b&&m.contains(b);t.trapped||g&&m.contains(g)||(i=g),x&&e("focusin",p),!o.paused&&t.trapped&&(x?s=b:Vd(s,!0))},d=p=>{const m=v(n);if(!(o.paused||!m))if(t.trapped){const b=p.relatedTarget;!Ws(b)&&!m.contains(b)&&setTimeout(()=>{if(!o.paused&&t.trapped){const g=eb({focusReason:r.value});e("focusout-prevented",g),g.defaultPrevented||Vd(s,!0)}},0)}else{const b=p.target;b&&m.contains(b)||e("focusout",p)}};async function h(){await Nt();const p=v(n);if(p){E8.push(o);const m=p.contains(document.activeElement)?i:document.activeElement;if(i=m,!p.contains(m)){const g=new Event(YS,b8);p.addEventListener(YS,l),p.dispatchEvent(g),g.defaultPrevented||Nt(()=>{let x=t.focusStartEl;Gt(x)||(Vd(x),document.activeElement!==x&&(x="first")),x==="first"&&Phe(y7(p),!0),(document.activeElement===m||x==="container")&&Vd(p)})}}}function f(){const p=v(n);if(p){p.removeEventListener(YS,l);const m=new CustomEvent(XS,{...b8,detail:{focusReason:r.value}});p.addEventListener(XS,c),p.dispatchEvent(m),!m.defaultPrevented&&(r.value=="keyboard"||!Lhe()||p.contains(document.activeElement))&&Vd(i??document.body),p.removeEventListener(XS,c),E8.remove(o),i=null,s=null}}return mn(()=>{t.trapped&&h(),We(()=>t.trapped,p=>{p?h():f()})}),gi(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",u),n.value.removeEventListener("focusout",d),n.value=void 0),i=null,s=null}),{onKeydown:a}}});function Dhe(t,e,n,i,s,r){return Ue(t.$slots,"default",{handleKeydown:t.onKeydown})}var Gg=xt(Ohe,[["render",Dhe],["__file","/home/runner/work/element-plus/element-plus/packages/components/focus-trap/src/focus-trap.vue"]]),fa="top",dl="bottom",hl="right",pa="left",fk="auto",Qy=[fa,dl,hl,pa],ag="start",G0="end",Nhe="clippingParents",_7="viewport",gv="popper",Bhe="reference",A8=Qy.reduce(function(t,e){return t.concat([e+"-"+ag,e+"-"+G0])},[]),gd=[].concat(Qy,[fk]).reduce(function(t,e){return t.concat([e,e+"-"+ag,e+"-"+G0])},[]),Fhe="beforeRead",zhe="read",Uhe="afterRead",$he="beforeMain",Vhe="main",Hhe="afterMain",Whe="beforeWrite",Ghe="write",jhe="afterWrite",Khe=[Fhe,zhe,Uhe,$he,Vhe,Hhe,Whe,Ghe,jhe];function qc(t){return t?(t.nodeName||"").toLowerCase():null}function rc(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function lg(t){var e=rc(t).Element;return t instanceof e||t instanceof Element}function al(t){var e=rc(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function pk(t){if(typeof ShadowRoot>"u")return!1;var e=rc(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function qhe(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},r=e.elements[n];!al(r)||!qc(r)||(Object.assign(r.style,i),Object.keys(s).forEach(function(o){var a=s[o];a===!1?r.removeAttribute(o):r.setAttribute(o,a===!0?"":a)}))})}function Yhe(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],r=e.attributes[i]||{},o=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=o.reduce(function(l,c){return l[c]="",l},{});!al(s)||!qc(s)||(Object.assign(s.style,a),Object.keys(r).forEach(function(l){s.removeAttribute(l)}))})}}var w7={name:"applyStyles",enabled:!0,phase:"write",fn:qhe,effect:Yhe,requires:["computeStyles"]};function Dc(t){return t.split("-")[0]}var Nf=Math.max,e2=Math.min,cg=Math.round;function ug(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),i=1,s=1;if(al(t)&&e){var r=t.offsetHeight,o=t.offsetWidth;o>0&&(i=cg(n.width)/o||1),r>0&&(s=cg(n.height)/r||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function mk(t){var e=ug(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function x7(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&pk(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function sd(t){return rc(t).getComputedStyle(t)}function Xhe(t){return["table","td","th"].indexOf(qc(t))>=0}function Ih(t){return((lg(t)?t.ownerDocument:t.document)||window.document).documentElement}function Rx(t){return qc(t)==="html"?t:t.assignedSlot||t.parentNode||(pk(t)?t.host:null)||Ih(t)}function k8(t){return!al(t)||sd(t).position==="fixed"?null:t.offsetParent}function Zhe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&al(t)){var i=sd(t);if(i.position==="fixed")return null}var s=Rx(t);for(pk(s)&&(s=s.host);al(s)&&["html","body"].indexOf(qc(s))<0;){var r=sd(s);if(r.transform!=="none"||r.perspective!=="none"||r.contain==="paint"||["transform","perspective"].indexOf(r.willChange)!==-1||e&&r.willChange==="filter"||e&&r.filter&&r.filter!=="none")return s;s=s.parentNode}return null}function e1(t){for(var e=rc(t),n=k8(t);n&&Xhe(n)&&sd(n).position==="static";)n=k8(n);return n&&(qc(n)==="html"||qc(n)==="body"&&sd(n).position==="static")?e:n||Zhe(t)||e}function gk(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function p0(t,e,n){return Nf(t,e2(e,n))}function Jhe(t,e,n){var i=p0(t,e,n);return i>n?n:i}function S7(){return{top:0,right:0,bottom:0,left:0}}function E7(t){return Object.assign({},S7(),t)}function C7(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var Qhe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,E7(typeof t!="number"?t:C7(t,Qy))};function efe(t){var e,n=t.state,i=t.name,s=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Dc(n.placement),l=gk(a),c=[pa,hl].indexOf(a)>=0,u=c?"height":"width";if(!(!r||!o)){var d=Qhe(s.padding,n),h=mk(r),f=l==="y"?fa:pa,p=l==="y"?dl:hl,m=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],b=o[l]-n.rects.reference[l],g=e1(r),x=g?l==="y"?g.clientHeight||0:g.clientWidth||0:0,S=m/2-b/2,_=d[f],E=x-h[u]-d[p],T=x/2-h[u]/2+S,A=p0(_,T,E),I=l;n.modifiersData[i]=(e={},e[I]=A,e.centerOffset=A-T,e)}}function tfe(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||!x7(e.elements.popper,s)||(e.elements.arrow=s))}var nfe={name:"arrow",enabled:!0,phase:"main",fn:efe,effect:tfe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function dg(t){return t.split("-")[1]}var ife={top:"auto",right:"auto",bottom:"auto",left:"auto"};function sfe(t){var e=t.x,n=t.y,i=window,s=i.devicePixelRatio||1;return{x:cg(e*s)/s||0,y:cg(n*s)/s||0}}function P8(t){var e,n=t.popper,i=t.popperRect,s=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=o.x,f=h===void 0?0:h,p=o.y,m=p===void 0?0:p,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var g=o.hasOwnProperty("x"),x=o.hasOwnProperty("y"),S=pa,_=fa,E=window;if(c){var T=e1(n),A="clientHeight",I="clientWidth";if(T===rc(n)&&(T=Ih(n),sd(T).position!=="static"&&a==="absolute"&&(A="scrollHeight",I="scrollWidth")),T=T,s===fa||(s===pa||s===hl)&&r===G0){_=dl;var P=d&&T===E&&E.visualViewport?E.visualViewport.height:T[A];m-=P-i.height,m*=l?1:-1}if(s===pa||(s===fa||s===dl)&&r===G0){S=hl;var k=d&&T===E&&E.visualViewport?E.visualViewport.width:T[I];f-=k-i.width,f*=l?1:-1}}var B=Object.assign({position:a},c&&ife),R=u===!0?sfe({x:f,y:m}):{x:f,y:m};if(f=R.x,m=R.y,l){var H;return Object.assign({},B,(H={},H[_]=x?"0":"",H[S]=g?"0":"",H.transform=(E.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",H))}return Object.assign({},B,(e={},e[_]=x?m+"px":"",e[S]=g?f+"px":"",e.transform="",e))}function rfe(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,r=n.adaptive,o=r===void 0?!0:r,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:Dc(e.placement),variation:dg(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,P8(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,P8(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var T7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:rfe,data:{}},tb={passive:!0};function ofe(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,r=s===void 0?!0:s,o=i.resize,a=o===void 0?!0:o,l=rc(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach(function(u){u.addEventListener("scroll",n.update,tb)}),a&&l.addEventListener("resize",n.update,tb),function(){r&&c.forEach(function(u){u.removeEventListener("scroll",n.update,tb)}),a&&l.removeEventListener("resize",n.update,tb)}}var M7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ofe,data:{}},afe={left:"right",right:"left",bottom:"top",top:"bottom"};function H_(t){return t.replace(/left|right|bottom|top/g,function(e){return afe[e]})}var lfe={start:"end",end:"start"};function L8(t){return t.replace(/start|end/g,function(e){return lfe[e]})}function vk(t){var e=rc(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function yk(t){return ug(Ih(t)).left+vk(t).scrollLeft}function cfe(t){var e=rc(t),n=Ih(t),i=e.visualViewport,s=n.clientWidth,r=n.clientHeight,o=0,a=0;return i&&(s=i.width,r=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(o=i.offsetLeft,a=i.offsetTop)),{width:s,height:r,x:o+yk(t),y:a}}function ufe(t){var e,n=Ih(t),i=vk(t),s=(e=t.ownerDocument)==null?void 0:e.body,r=Nf(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),o=Nf(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+yk(t),l=-i.scrollTop;return sd(s||n).direction==="rtl"&&(a+=Nf(n.clientWidth,s?s.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}function bk(t){var e=sd(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function A7(t){return["html","body","#document"].indexOf(qc(t))>=0?t.ownerDocument.body:al(t)&&bk(t)?t:A7(Rx(t))}function m0(t,e){var n;e===void 0&&(e=[]);var i=A7(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),r=rc(i),o=s?[r].concat(r.visualViewport||[],bk(i)?i:[]):i,a=e.concat(o);return s?a:a.concat(m0(Rx(o)))}function AT(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function dfe(t){var e=ug(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 I8(t,e){return e===_7?AT(cfe(t)):lg(e)?dfe(e):AT(ufe(Ih(t)))}function hfe(t){var e=m0(Rx(t)),n=["absolute","fixed"].indexOf(sd(t).position)>=0,i=n&&al(t)?e1(t):t;return lg(i)?e.filter(function(s){return lg(s)&&x7(s,i)&&qc(s)!=="body"}):[]}function ffe(t,e,n){var i=e==="clippingParents"?hfe(t):[].concat(e),s=[].concat(i,[n]),r=s[0],o=s.reduce(function(a,l){var c=I8(t,l);return a.top=Nf(c.top,a.top),a.right=e2(c.right,a.right),a.bottom=e2(c.bottom,a.bottom),a.left=Nf(c.left,a.left),a},I8(t,r));return o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}function k7(t){var e=t.reference,n=t.element,i=t.placement,s=i?Dc(i):null,r=i?dg(i):null,o=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case fa:l={x:o,y:e.y-n.height};break;case dl:l={x:o,y:e.y+e.height};break;case hl:l={x:e.x+e.width,y:a};break;case pa:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?gk(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(r){case ag:l[c]=l[c]-(e[u]/2-n[u]/2);break;case G0:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function j0(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,r=n.boundary,o=r===void 0?Nhe:r,a=n.rootBoundary,l=a===void 0?_7:a,c=n.elementContext,u=c===void 0?gv:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=E7(typeof p!="number"?p:C7(p,Qy)),b=u===gv?Bhe:gv,g=t.rects.popper,x=t.elements[h?b:u],S=ffe(lg(x)?x:x.contextElement||Ih(t.elements.popper),o,l),_=ug(t.elements.reference),E=k7({reference:_,element:g,placement:s}),T=AT(Object.assign({},g,E)),A=u===gv?T:_,I={top:S.top-A.top+m.top,bottom:A.bottom-S.bottom+m.bottom,left:S.left-A.left+m.left,right:A.right-S.right+m.right},P=t.modifiersData.offset;if(u===gv&&P){var k=P[s];Object.keys(I).forEach(function(B){var R=[hl,dl].indexOf(B)>=0?1:-1,H=[fa,dl].indexOf(B)>=0?"y":"x";I[B]+=k[H]*R})}return I}function pfe(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?gd:l,u=dg(i),d=u?a?A8:A8.filter(function(p){return dg(p)===u}):Qy,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=j0(t,{placement:m,boundary:s,rootBoundary:r,padding:o})[Dc(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function mfe(t){if(Dc(t)===fk)return[];var e=H_(t);return[L8(t),e,L8(e)]}function gfe(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,b=e.options.placement,g=Dc(b),x=g===b,S=l||(x||!p?[H_(b)]:mfe(b)),_=[b].concat(S).reduce(function(ce,ae){return ce.concat(Dc(ae)===fk?pfe(e,{placement:ae,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ae)},[]),E=e.rects.reference,T=e.rects.popper,A=new Map,I=!0,P=_[0],k=0;k<_.length;k++){var B=_[k],R=Dc(B),H=dg(B)===ag,q=[fa,dl].indexOf(R)>=0,oe=q?"width":"height",Z=j0(e,{placement:B,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),V=q?H?hl:pa:H?dl:fa;E[oe]>T[oe]&&(V=H_(V));var D=H_(V),K=[];if(r&&K.push(Z[R]<=0),a&&K.push(Z[V]<=0,Z[D]<=0),K.every(function(ce){return ce})){P=B,I=!1;break}A.set(B,K)}if(I)for(var W=p?3:1,Q=function(ce){var ae=_.find(function(_e){var ke=A.get(_e);if(ke)return ke.slice(0,ce).every(function(Te){return Te})});if(ae)return P=ae,"break"},ie=W;ie>0;ie--){var ne=Q(ie);if(ne==="break")break}e.placement!==P&&(e.modifiersData[i]._skip=!0,e.placement=P,e.reset=!0)}}var vfe={name:"flip",enabled:!0,phase:"main",fn:gfe,requiresIfExists:["offset"],data:{_skip:!1}};function R8(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 O8(t){return[fa,hl,dl,pa].some(function(e){return t[e]>=0})}function yfe(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,r=e.modifiersData.preventOverflow,o=j0(e,{elementContext:"reference"}),a=j0(e,{altBoundary:!0}),l=R8(o,i),c=R8(a,s,r),u=O8(l),d=O8(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var bfe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:yfe};function _fe(t,e,n){var i=Dc(t),s=[pa,fa].indexOf(i)>=0?-1:1,r=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*s,[pa,hl].indexOf(i)>=0?{x:a,y:o}:{x:o,y:a}}function wfe(t){var e=t.state,n=t.options,i=t.name,s=n.offset,r=s===void 0?[0,0]:s,o=gd.reduce(function(u,d){return u[d]=_fe(d,e.rects,r),u},{}),a=o[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=o}var xfe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wfe};function Sfe(t){var e=t.state,n=t.name;e.modifiersData[n]=k7({reference:e.rects.reference,element:e.rects.popper,placement:e.placement})}var P7={name:"popperOffsets",enabled:!0,phase:"read",fn:Sfe,data:{}};function Efe(t){return t==="x"?"y":"x"}function Cfe(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,r=s===void 0?!0:s,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,b=j0(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),g=Dc(e.placement),x=dg(e.placement),S=!x,_=gk(g),E=Efe(_),T=e.modifiersData.popperOffsets,A=e.rects.reference,I=e.rects.popper,P=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,k=typeof P=="number"?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),B=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,R={x:0,y:0};if(T){if(r){var H,q=_==="y"?fa:pa,oe=_==="y"?dl:hl,Z=_==="y"?"height":"width",V=T[_],D=V+b[q],K=V-b[oe],W=f?-I[Z]/2:0,Q=x===ag?A[Z]:I[Z],ie=x===ag?-I[Z]:-A[Z],ne=e.elements.arrow,ce=f&&ne?mk(ne):{width:0,height:0},ae=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:S7(),_e=ae[q],ke=ae[oe],Te=p0(0,A[Z],ce[Z]),Ke=S?A[Z]/2-W-Te-_e-k.mainAxis:Q-Te-_e-k.mainAxis,Fe=S?-A[Z]/2+W+Te+ke+k.mainAxis:ie+Te+ke+k.mainAxis,ve=e.elements.arrow&&e1(e.elements.arrow),fe=ve?_==="y"?ve.clientTop||0:ve.clientLeft||0:0,Me=(H=B?.[_])!=null?H:0,ge=V+Ke-Me-fe,Qe=V+Fe-Me,G=p0(f?e2(D,ge):D,V,f?Nf(K,Qe):K);T[_]=G,R[_]=G-V}if(a){var ee,j=_==="x"?fa:pa,he=_==="x"?dl:hl,be=T[E],re=E==="y"?"height":"width",le=be+b[j],Ce=be-b[he],Ee=[fa,pa].indexOf(g)!==-1,Oe=(ee=B?.[E])!=null?ee:0,Ge=Ee?le:be-A[re]-I[re]-Oe+k.altAxis,$e=Ee?be+A[re]+I[re]-Oe-k.altAxis:Ce,ot=f&&Ee?Jhe(Ge,be,$e):p0(f?Ge:le,be,f?$e:Ce);T[E]=ot,R[E]=ot-be}e.modifiersData[i]=R}}var Tfe={name:"preventOverflow",enabled:!0,phase:"main",fn:Cfe,requiresIfExists:["offset"]};function Mfe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Afe(t){return t===rc(t)||!al(t)?vk(t):Mfe(t)}function kfe(t){var e=t.getBoundingClientRect(),n=cg(e.width)/t.offsetWidth||1,i=cg(e.height)/t.offsetHeight||1;return n!==1||i!==1}function Pfe(t,e,n){n===void 0&&(n=!1);var i=al(e),s=al(e)&&kfe(e),r=Ih(e),o=ug(t,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((qc(e)!=="body"||bk(r))&&(a=Afe(e)),al(e)?(l=ug(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):r&&(l.x=yk(r))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function Lfe(t){var e=new Map,n=new Set,i=[];t.forEach(function(r){e.set(r.name,r)});function s(r){n.add(r.name);var o=[].concat(r.requires||[],r.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(r)}return t.forEach(function(r){n.has(r.name)||s(r)}),i}function Ife(t){var e=Lfe(t);return Khe.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function Rfe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Ofe(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var D8={placement:"bottom",modifiers:[],strategy:"absolute"};function N8(){for(var t=arguments.length,e=new Array(t),n=0;n({})},strategy:{type:String,values:Ffe,default:"absolute"}}),I7=_t({...zfe,...L7,id:String,style:{type:Re([String,Array,Object])},className:{type:Re([String,Array,Object])},effect:{type:Re(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:Re([String,Array,Object])},popperStyle:{type:Re([String,Array,Object])},referenceEl:{type:Re(Object)},triggerTargetEl:{type:Re(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...To(["ariaLabel"]),loop:Boolean}),Ufe={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},$fe=(t,e)=>{const n=X(!1),i=X(),s=()=>{e("focus")},r=c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(i.value="first",e("blur"))},o=c=>{t.visible&&!n.value&&(c.target&&(i.value=c.target),n.value=!0)},a=c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},l=()=>{n.value=!1,e("close")};return gi(()=>{i.value=void 0}),{focusStartRef:i,trapped:n,onFocusAfterReleased:r,onFocusAfterTrapped:s,onFocusInTrap:o,onFocusoutPrevented:a,onReleaseRequested:l}},Vfe=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:s}=t,r={placement:n,strategy:i,...s,modifiers:[...Wfe(t),...e]};return Gfe(r,s?.modifiers),r},Hfe=t=>{if(pi)return nr(t)};function Wfe(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:i}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Gfe(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const jfe=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Kfe(l);Object.assign(o.value,c)},requires:["computeStyles"]},s=F(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=v(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],i,{name:"applyStyles",enabled:!1}]}}),r=wi(),o=X({styles:{popper:{position:v(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{r.value&&(r.value.destroy(),r.value=void 0)};return We(s,l=>{const c=v(r);c&&c.setOptions(l)},{deep:!0}),We([t,e],([l,c])=>{a(),!(!l||!c)&&(r.value=Bfe(l,c,v(s)))}),gi(()=>{a()}),{state:F(()=>{var l;return{...((l=v(r))==null?void 0:l.state)||{}}}),styles:F(()=>v(o).styles),attributes:F(()=>v(o).attributes),update:()=>{var l;return(l=v(r))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=v(r))==null?void 0:l.forceUpdate()},instanceRef:F(()=>v(r))}};function Kfe(t){const e=Object.keys(t.elements),n=$0(e.map(s=>[s,t.styles[s]||{}])),i=$0(e.map(s=>[s,t.attributes[s]]));return{styles:n,attributes:i}}const qfe=0,Yfe=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:s}=zt(uk,void 0),r=X(),o=F(()=>t.arrowOffset),a=F(()=>({name:"eventListeners",enabled:!!t.visible})),l=F(()=>{var g;const x=v(r),S=(g=v(o))!=null?g:qfe;return{name:"arrow",enabled:!xce(x),options:{element:x,padding:S}}}),c=F(()=>({onFirstUpdate:()=>{p()},...Vfe(t,[v(l),v(a)])})),u=F(()=>Hfe(t.referenceEl)||v(i)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:b}=jfe(u,n,c);return We(b,g=>e.value=g,{flush:"sync"}),mn(()=>{We(()=>{var g,x;return(x=(g=v(u))==null?void 0:g.getBoundingClientRect)==null?void 0:x.call(g)},()=>{p()})}),gi(()=>{e.value=void 0}),{attributes:d,arrowRef:r,contentRef:n,instanceRef:b,state:h,styles:f,role:s,forceUpdate:m,update:p}},Xfe=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:s}=jy(),r=ht("popper"),o=F(()=>v(e).popper),a=X(Xt(t.zIndex)?t.zIndex:s()),l=F(()=>[r.b(),r.is("pure",t.pure),r.is(t.effect),t.popperClass]),c=F(()=>[{zIndex:v(a)},v(n).popper,t.popperStyle||{}]),u=F(()=>i.value==="dialog"?"false":void 0),d=F(()=>v(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:o,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=Xt(t.zIndex)?t.zIndex:s()}}},Zfe=Be({name:"ElPopperContent",__name:"content",props:I7,emits:Ufe,setup(t,{expose:e,emit:n}){const i=n,s=t,{focusStartRef:r,trapped:o,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=$fe(s,i),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:b,role:g,update:x}=Yfe(s),{ariaModal:S,arrowStyle:_,contentAttrs:E,contentClass:T,contentStyle:A,updateZIndex:I}=Xfe(s,{styles:m,attributes:h,role:g}),P=zt(Kc,void 0);Xn(u7,{arrowStyle:_,arrowRef:f}),P&&Xn(Kc,{...P,addInputId:_i,removeInputId:_i});let k;const B=(H=!0)=>{x(),H&&I()},R=()=>{B(!1),s.visible&&s.focusOnShow?o.value=!0:s.visible===!1&&(o.value=!1)};return mn(()=>{We(()=>s.triggerTargetEl,(H,q)=>{k?.(),k=void 0;const oe=v(H||p.value),Z=v(q||p.value);ca(oe)&&(k=We([g,()=>s.ariaLabel,S,()=>s.id],V=>{["role","aria-label","aria-modal","id"].forEach((D,K)=>{Ws(V[K])?oe.removeAttribute(D):oe.setAttribute(D,V[K])})},{immediate:!0})),Z!==oe&&ca(Z)&&["role","aria-label","aria-modal","id"].forEach(V=>{Z.removeAttribute(V)})},{immediate:!0}),We(()=>s.visible,R,{immediate:!0})}),gi(()=>{k?.(),k=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:b,updatePopper:B,contentStyle:A}),(H,q)=>(z(),se("div",Dn({ref_key:"contentRef",ref:p},v(E),{style:v(A),class:v(T),tabindex:"-1",onMouseenter:q[0]||(q[0]=oe=>H.$emit("mouseenter",oe)),onMouseleave:q[1]||(q[1]=oe=>H.$emit("mouseleave",oe))}),[de(v(Gg),{loop:H.loop,trapped:v(o),"trap-on-focus-in":!0,"focus-trap-el":v(p),"focus-start-el":v(r),onFocusAfterTrapped:v(l),onFocusAfterReleased:v(a),onFocusin:v(c),onFocusoutPrevented:v(u),onReleaseRequested:v(d)},{default:xe(()=>[Ue(H.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}});var Jfe=xt(Zfe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popper/src/content.vue"]]);const R7=En(ghe),wk=Symbol("elTooltip");function B8(){let t;const e=(i,s)=>{n(),t=window.setTimeout(i,s)},n=()=>window.clearTimeout(t);return dp(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Qfe=_t({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),epe=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:s})=>{const{registerTimeout:r}=B8(),{registerTimeout:o,cancelTimeout:a}=B8();return{onOpen:(u,d=v(t))=>{r(()=>{i(u);const h=v(n);Xt(h)&&h>0&&o(()=>{s(u)},h)},d)},onClose:(u,d=v(e))=>{a(),r(()=>{s(u)},d)}}},Ri=_t({...Qfe,...I7,appendTo:{type:qy.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:Re(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...To(["ariaLabel"])}),Nc=_t({...f7,disabled:Boolean,trigger:{type:Re([String,Array]),default:"hover"},triggerKeys:{type:Re(Array),default:()=>[gt.enter,gt.numpadEnter,gt.space]},focusOnTarget:Boolean}),tpe=sc({type:Re(Boolean),default:null}),npe=sc({type:Re(Function)}),ipe=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],s={[t]:tpe,[n]:npe};return{useModelToggle:({indicator:o,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=xn(),{emit:f}=h,p=h.props,m=F(()=>Kt(p[n])),b=F(()=>p[t]===null),g=A=>{o.value!==!0&&(o.value=!0,a&&(a.value=A),Kt(u)&&u(A))},x=A=>{o.value!==!1&&(o.value=!1,a&&(a.value=A),Kt(d)&&d(A))},S=A=>{if(p.disabled===!0||Kt(c)&&!c())return;const I=m.value&πI&&f(e,!0),(b.value||!I)&&g(A)},_=A=>{if(p.disabled===!0||!pi)return;const I=m.value&πI&&f(e,!1),(b.value||!I)&&x(A)},E=A=>{Mi(A)&&(p.disabled&&A?m.value&&f(e,!1):o.value!==A&&(A?g():x()))},T=()=>{o.value?_():S()};return We(()=>p[t],E),l&&h.appContext.config.globalProperties.$route!==void 0&&We(()=>({...h.proxy.$route}),()=>{l.value&&o.value&&_()}),mn(()=>{E(p[t])}),{hide:_,show:S,toggle:T,hasUpdateHandler:m}},useModelToggleProps:s,useModelToggleEmits:i}},{useModelToggleProps:spe,useModelToggleEmits:rpe,useModelToggle:ope}=ipe("visible"),ape=_t({...h7,...spe,...Ri,...Nc,...L7,showArrow:{type:Boolean,default:!0}}),lpe=[...rpe,"before-show","before-hide","show","hide","open","close"],kT=(t,e)=>pt(t)?t.includes(e):t===e,Pp=(t,e,n)=>i=>{kT(v(t),e)&&n(i)},cpe=Be({name:"ElTooltipTrigger",__name:"trigger",props:Nc,setup(t,{expose:e}){const n=t,i=ht("tooltip"),{controlled:s,id:r,open:o,onOpen:a,onClose:l,onToggle:c}=zt(wk,void 0),u=X(null),d=()=>{if(v(s)||n.disabled)return!0},h=Ei(n,"trigger"),f=_r(d,Pp(h,"hover",_=>{a(_),n.focusOnTarget&&_.target&&Nt(()=>{Zy(_.target,{preventScroll:!0})})})),p=_r(d,Pp(h,"hover",l)),m=_r(d,Pp(h,"click",_=>{_.button===0&&c(_)})),b=_r(d,Pp(h,"focus",a)),g=_r(d,Pp(h,"focus",l)),x=_r(d,Pp(h,"contextmenu",_=>{_.preventDefault(),c(_)})),S=_r(d,_=>{const E=Oi(_);n.triggerKeys.includes(E)&&(_.preventDefault(),c(_))});return e({triggerRef:u}),(_,E)=>(z(),De(v(She),{id:v(r),"virtual-ref":_.virtualRef,open:v(o),"virtual-triggering":_.virtualTriggering,class:J(v(i).e("trigger")),onBlur:v(g),onClick:v(m),onContextmenu:v(x),onFocus:v(b),onMouseenter:v(f),onMouseleave:v(p),onKeydown:v(S)},{default:xe(()=>[Ue(_.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var upe=xt(cpe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/trigger.vue"]]);const O7=()=>{const t=DA(),e=lk(),n=F(()=>`${t.value}-popper-container-${e.prefix}`),i=F(()=>`#${n.value}`);return{id:n,selector:i}},dpe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},hpe=()=>{const{id:t,selector:e}=O7();return ax(()=>{pi&&(document.body.querySelector(e.value)||dpe(t.value))}),{id:t,selector:e}},F8=t=>[...new Set(t)],vv=t=>pt(t)?t[0]:t,bo=t=>!t&&t!==0?[]:pt(t)?t:[t],fpe=Be({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:Ri,setup(t,{expose:e}){const n=t,{selector:i}=O7(),s=ht("tooltip"),r=X(),o=R9(()=>{var D;return(D=r.value)==null?void 0:D.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:b,onBeforeHide:g}=zt(wk,void 0),x=F(()=>n.transition||`${s.namespace.value}-fade-in-linear`),S=F(()=>n.persistent);gi(()=>{a?.()});const _=F(()=>v(S)?!0:v(u)),E=F(()=>n.disabled?!1:v(u)),T=F(()=>n.appendTo||i.value),A=F(()=>{var D;return(D=n.style)!=null?D:{}}),I=X(!0),P=()=>{m(),V()&&Zy(document.body,{preventScroll:!0}),I.value=!0},k=()=>{if(v(l))return!0},B=_r(k,()=>{n.enterable&&kT(v(d),"hover")&&f()}),R=_r(k,()=>{kT(v(d),"hover")&&h()}),H=()=>{var D,K;(K=(D=r.value)==null?void 0:D.updatePopper)==null||K.call(D),b?.()},q=()=>{g?.()},oe=()=>{p()},Z=()=>{n.virtualTriggering||h()},V=D=>{var K;const W=(K=r.value)==null?void 0:K.popperContentRef,Q=D?.relatedTarget||document.activeElement;return W?.contains(Q)};return We(()=>v(u),D=>{D?(I.value=!1,a=QA(o,()=>{if(v(l))return;bo(v(d)).every(W=>W!=="hover"&&W!=="focus")&&h()},{detectIframe:!0})):a?.()},{flush:"post"}),We(()=>n.content,()=>{var D,K;(K=(D=r.value)==null?void 0:D.updatePopper)==null||K.call(D)}),e({contentRef:r,isFocusInsideContent:V}),(D,K)=>(z(),De(v(Wg),{disabled:!D.teleported,to:T.value},{default:xe(()=>[_.value||!I.value?(z(),De(Rr,{key:0,name:x.value,appear:!S.value,onAfterLeave:P,onBeforeEnter:H,onAfterEnter:oe,onBeforeLeave:q,persisted:""},{default:xe(()=>[_n(de(v(Jfe),Dn({id:v(c),ref_key:"contentRef",ref:r},D.$attrs,{"aria-label":D.ariaLabel,"aria-hidden":I.value,"boundaries-padding":D.boundariesPadding,"fallback-placements":D.fallbackPlacements,"gpu-acceleration":D.gpuAcceleration,offset:D.offset,placement:D.placement,"popper-options":D.popperOptions,"arrow-offset":D.arrowOffset,strategy:D.strategy,effect:D.effect,enterable:D.enterable,pure:D.pure,"popper-class":D.popperClass,"popper-style":[D.popperStyle,A.value],"reference-el":D.referenceEl,"trigger-target-el":D.triggerTargetEl,visible:E.value,"z-index":D.zIndex,loop:D.loop,onMouseenter:v(B),onMouseleave:v(R),onBlur:Z,onClose:v(h)}),{default:xe(()=>[Ue(D.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[ci,E.value]])]),_:3},8,["name","appear"])):Le("v-if",!0)]),_:3},8,["disabled","to"]))}});var ppe=xt(fpe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/content.vue"]]);const mpe=["innerHTML"],gpe={key:1},vpe=Be({name:"ElTooltip",__name:"tooltip",props:ape,emits:lpe,setup(t,{expose:e,emit:n}){const i=t,s=n;hpe();const r=ht("tooltip"),o=jr(),a=X(),l=X(),c=()=>{var _;const E=v(a);E&&((_=E.popperInstanceRef)==null||_.update())},u=X(!1),d=X(),{show:h,hide:f,hasUpdateHandler:p}=ope({indicator:u,toggleReason:d}),{onOpen:m,onClose:b}=epe({showAfter:Ei(i,"showAfter"),hideAfter:Ei(i,"hideAfter"),autoClose:Ei(i,"autoClose"),open:h,close:f}),g=F(()=>Mi(i.visible)&&!p.value),x=F(()=>[r.b(),i.popperClass]);Xn(wk,{controlled:g,id:o,open:Vc(u),trigger:Ei(i,"trigger"),onOpen:m,onClose:b,onToggle:_=>{v(u)?b(_):m(_)},onShow:()=>{s("show",d.value)},onHide:()=>{s("hide",d.value)},onBeforeShow:()=>{s("before-show",d.value)},onBeforeHide:()=>{s("before-hide",d.value)},updatePopper:c}),We(()=>i.disabled,_=>{_&&u.value&&(u.value=!1)});const S=_=>{var E;return(E=l.value)==null?void 0:E.isFocusInsideContent(_)};return SB(()=>u.value&&f()),gi(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:S,updatePopper:c,onOpen:m,onClose:b,hide:f}),(_,E)=>(z(),De(v(R7),{ref_key:"popperRef",ref:a,role:_.role},{default:xe(()=>[de(upe,{disabled:_.disabled,trigger:_.trigger,"trigger-keys":_.triggerKeys,"virtual-ref":_.virtualRef,"virtual-triggering":_.virtualTriggering,"focus-on-target":_.focusOnTarget},{default:xe(()=>[_.$slots.default?Ue(_.$slots,"default",{key:0}):Le("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),de(ppe,{ref_key:"contentRef",ref:l,"aria-label":_.ariaLabel,"boundaries-padding":_.boundariesPadding,content:_.content,disabled:_.disabled,effect:_.effect,enterable:_.enterable,"fallback-placements":_.fallbackPlacements,"hide-after":_.hideAfter,"gpu-acceleration":_.gpuAcceleration,offset:_.offset,persistent:_.persistent,"popper-class":x.value,"popper-style":_.popperStyle,placement:_.placement,"popper-options":_.popperOptions,"arrow-offset":_.arrowOffset,pure:_.pure,"raw-content":_.rawContent,"reference-el":_.referenceEl,"trigger-target-el":_.triggerTargetEl,"show-after":_.showAfter,strategy:_.strategy,teleported:_.teleported,transition:_.transition,"virtual-triggering":_.virtualTriggering,"z-index":_.zIndex,"append-to":_.appendTo,loop:_.loop},{default:xe(()=>[Ue(_.$slots,"content",{},()=>[_.rawContent?(z(),se("span",{key:0,innerHTML:_.content},null,8,mpe)):(z(),se("span",gpe,Xe(_.content),1))]),_.showArrow?(z(),De(v(yhe),{key:0})):Le("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}});var ype=xt(vpe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tooltip/src/tooltip.vue"]]);const Or=En(ype),bpe=_t({...Xy,valueKey:{type:String,default:"value"},modelValue:{type:[String,Number],default:""},debounce:{type:Number,default:300},placement:{type:Re(String),values:["top","top-start","top-end","bottom","bottom-start","bottom-end"],default:"bottom-start"},fetchSuggestions:{type:Re([Function,Array]),default:_i},popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,triggerOnFocus:{type:Boolean,default:!0},selectWhenUnmatched:Boolean,hideLoading:Boolean,teleported:Ri.teleported,appendTo:Ri.appendTo,highlightFirstItem:Boolean,fitInputWidth:Boolean,loopNavigation:{type:Boolean,default:!0}}),_pe={[wn]:t=>Gt(t)||Xt(t),[Qs]:t=>Gt(t)||Xt(t),[Wn]:t=>Gt(t)||Xt(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,select:t=>Mn(t)},wpe=["aria-expanded","aria-owns"],xpe={key:0},Spe=["id","aria-selected","onClick"],z8="ElAutocomplete",Epe=Be({name:z8,inheritAttrs:!1,__name:"autocomplete",props:bpe,emits:_pe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=F(()=>td(i,Object.keys(Xy))),o=ld(),a=Es(),l=ht("autocomplete"),c=X(),u=X(),d=X(),h=X();let f=!1,p=!1;const m=X([]),b=X(-1),g=X(""),x=X(!1),S=X(!1),_=X(!1),E=jr(),T=F(()=>o.style),A=F(()=>(m.value.length>0||_.value)&&x.value),I=F(()=>!i.hideLoading&&_.value),P=F(()=>c.value?Array.from(c.value.$el.querySelectorAll("input")):[]),k=()=>{A.value&&(g.value=`${c.value.$el.offsetWidth}px`)},B=()=>{b.value=-1},R=async ve=>{if(S.value)return;const fe=Me=>{_.value=!1,!S.value&&(pt(Me)?(m.value=Me,b.value=i.highlightFirstItem?0:-1):Ks(z8,"autocomplete suggestions must be an array"))};if(_.value=!0,pt(i.fetchSuggestions))fe(i.fetchSuggestions);else{const Me=await i.fetchSuggestions(ve,fe);pt(Me)&&fe(Me)}},H=F(()=>i.debounce),q=Wy(R,H),oe=ve=>{const fe=!!ve;if(s(Qs,ve),s(wn,ve),S.value=!1,x.value||(x.value=fe),!i.triggerOnFocus&&!ve){S.value=!0,m.value=[];return}q(ve)},Z=ve=>{var fe;a.value||(((fe=ve.target)==null?void 0:fe.tagName)!=="INPUT"||P.value.includes(document.activeElement))&&(x.value=!0)},V=ve=>{s(Wn,ve)},D=ve=>{var fe;if(p)p=!1;else{x.value=!0,s("focus",ve);const Me=(fe=i.modelValue)!=null?fe:"";i.triggerOnFocus&&!f&&q(String(Me))}},K=ve=>{setTimeout(()=>{var fe;if((fe=d.value)!=null&&fe.isFocusInsideContent()){p=!0;return}x.value&&ne(),s("blur",ve)})},W=()=>{x.value=!1,s(wn,""),s("clear")},Q=async()=>{var ve;(ve=c.value)!=null&&ve.isComposing||(A.value&&b.value>=0&&b.value{A.value&&(ve.preventDefault(),ve.stopPropagation(),ne())},ne=()=>{x.value=!1},ce=()=>{var ve;(ve=c.value)==null||ve.focus()},ae=()=>{var ve;(ve=c.value)==null||ve.blur()},_e=async ve=>{s(Qs,ve[i.valueKey]),s(wn,ve[i.valueKey]),s("select",ve),m.value=[],b.value=-1},ke=ve=>{var fe,Me;if(!A.value||_.value)return;if(ve<0){if(!i.loopNavigation){b.value=-1;return}ve=m.value.length-1}ve>=m.value.length&&(ve=i.loopNavigation?0:m.value.length-1);const[ge,Qe]=Te(),G=Qe[ve],ee=ge.scrollTop,{offsetTop:j,scrollHeight:he}=G;j+he>ee+ge.clientHeight&&(ge.scrollTop=j+he-ge.clientHeight),j{const ve=u.value.querySelector(`.${l.be("suggestion","wrap")}`),fe=ve.querySelectorAll(`.${l.be("suggestion","list")} li`);return[ve,fe]},Ke=QA(h,()=>{var ve;(ve=d.value)!=null&&ve.isFocusInsideContent()||A.value&&ne()}),Fe=ve=>{switch(Oi(ve)){case gt.up:ve.preventDefault(),ke(b.value-1);break;case gt.down:ve.preventDefault(),ke(b.value+1);break;case gt.enter:case gt.numpadEnter:ve.preventDefault(),Q();break;case gt.tab:ne();break;case gt.esc:ie(ve);break;case gt.home:ve.preventDefault(),ke(0);break;case gt.end:ve.preventDefault(),ke(m.value.length-1);break;case gt.pageUp:ve.preventDefault(),ke(Math.max(0,b.value-10));break;case gt.pageDown:ve.preventDefault(),ke(Math.min(m.value.length-1,b.value+10));break}};return gi(()=>{Ke?.()}),mn(()=>{var ve;const fe=(ve=c.value)==null?void 0:ve.ref;fe&&([{key:"role",value:"textbox"},{key:"aria-autocomplete",value:"list"},{key:"aria-controls",value:"id"},{key:"aria-activedescendant",value:`${E.value}-item-${b.value}`}].forEach(({key:Me,value:ge})=>fe.setAttribute(Me,ge)),f=fe.hasAttribute("readonly"))}),e({highlightedIndex:b,activated:x,loading:_,inputRef:c,popperRef:d,suggestions:m,handleSelect:_e,handleKeyEnter:Q,focus:ce,blur:ae,close:ne,highlight:ke,getData:R}),(ve,fe)=>(z(),De(v(Or),{ref_key:"popperRef",ref:d,visible:A.value,placement:ve.placement,"fallback-placements":["bottom-start","top-start"],"popper-class":[v(l).e("popper"),ve.popperClass],"popper-style":ve.popperStyle,teleported:ve.teleported,"append-to":ve.appendTo,"gpu-acceleration":!1,pure:"","manual-mode":"",effect:"light",trigger:"click",transition:`${v(l).namespace.value}-zoom-in-top`,persistent:"",role:"listbox",onBeforeShow:k,onHide:B},{content:xe(()=>[U("div",{ref_key:"regionRef",ref:u,class:J([v(l).b("suggestion"),v(l).is("loading",I.value)]),style:Ht({[ve.fitInputWidth?"width":"minWidth"]:g.value,outline:"none"}),role:"region"},[ve.$slots.header?(z(),se("div",{key:0,class:J(v(l).be("suggestion","header")),onClick:fe[0]||(fe[0]=un(()=>{},["stop"]))},[Ue(ve.$slots,"header")],2)):Le("v-if",!0),de(v(Wl),{id:v(E),tag:"ul","wrap-class":v(l).be("suggestion","wrap"),"view-class":v(l).be("suggestion","list"),role:"listbox"},{default:xe(()=>[I.value?(z(),se("li",xpe,[Ue(ve.$slots,"loading",{},()=>[de(v(Ut),{class:J(v(l).is("loading"))},{default:xe(()=>[de(v(jc))]),_:1},8,["class"])])])):(z(!0),se(At,{key:1},yn(m.value,(Me,ge)=>(z(),se("li",{id:`${v(E)}-item-${ge}`,key:ge,class:J({highlighted:b.value===ge}),role:"option","aria-selected":b.value===ge,onClick:Qe=>_e(Me)},[Ue(ve.$slots,"default",{item:Me},()=>[cn(Xe(Me[ve.valueKey]),1)])],10,Spe))),128))]),_:3},8,["id","wrap-class","view-class"]),ve.$slots.footer?(z(),se("div",{key:1,class:J(v(l).be("suggestion","footer")),onClick:fe[1]||(fe[1]=un(()=>{},["stop"]))},[Ue(ve.$slots,"footer")],2)):Le("v-if",!0)],6)]),default:xe(()=>[U("div",{ref_key:"listboxRef",ref:h,class:J([v(l).b(),ve.$attrs.class]),style:Ht(T.value),role:"combobox","aria-haspopup":"listbox","aria-expanded":A.value,"aria-owns":v(E)},[de(v(wo),Dn({ref_key:"inputRef",ref:c},Dn(r.value,ve.$attrs),{"model-value":ve.modelValue,disabled:v(a),onInput:oe,onChange:V,onFocus:D,onBlur:K,onClear:W,onKeydown:Fe,onMousedown:Z}),va({_:2},[ve.$slots.prepend?{name:"prepend",fn:xe(()=>[Ue(ve.$slots,"prepend")]),key:"0"}:void 0,ve.$slots.append?{name:"append",fn:xe(()=>[Ue(ve.$slots,"append")]),key:"1"}:void 0,ve.$slots.prefix?{name:"prefix",fn:xe(()=>[Ue(ve.$slots,"prefix")]),key:"2"}:void 0,ve.$slots.suffix?{name:"suffix",fn:xe(()=>[Ue(ve.$slots,"suffix")]),key:"3"}:void 0]),1040,["model-value","disabled"])],14,wpe)]),_:3},8,["visible","placement","popper-class","popper-style","teleported","append-to","transition"]))}});var Cpe=xt(Epe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/autocomplete/src/autocomplete.vue"]]);const Tpe=En(Cpe),Mpe=_t({size:{type:[Number,String],values:Qc,default:"",validator:t=>Xt(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:Ai},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:Re(String),default:"cover"}}),Ape={error:t=>t instanceof Event},kpe=["src","alt","srcset"],Ppe=Be({name:"ElAvatar",__name:"avatar",props:Mpe,emits:Ape,setup(t,{emit:e}){const n=t,i=e,s=ht("avatar"),r=X(!1),o=F(()=>{const{size:u,icon:d,shape:h}=n,f=[s.b()];return Gt(u)&&f.push(s.m(u)),d&&f.push(s.m("icon")),h&&f.push(s.m(h)),f}),a=F(()=>{const{size:u}=n;return Xt(u)?s.cssVarBlock({size:xs(u)}):void 0}),l=F(()=>({objectFit:n.fit}));We(()=>n.src,()=>r.value=!1);function c(u){r.value=!0,i("error",u)}return(u,d)=>(z(),se("span",{class:J(o.value),style:Ht(a.value)},[(u.src||u.srcSet)&&!r.value?(z(),se("img",{key:0,src:u.src,alt:u.alt,srcset:u.srcSet,style:Ht(l.value),onError:c},null,44,kpe)):u.icon?(z(),De(v(Ut),{key:1},{default:xe(()=>[(z(),De(Sn(u.icon)))]),_:1})):Ue(u.$slots,"default",{key:2})],6))}});var Lpe=xt(Ppe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/avatar/src/avatar.vue"]]);const Ipe=En(Lpe),Rpe={visibilityHeight:{type:Number,default:200},target:{type:String,default:""},right:{type:Number,default:40},bottom:{type:Number,default:40}},Ope={click:t=>t instanceof MouseEvent},Dpe=(t,e,n)=>{const i=wi(),s=wi(),r=X(!1),o=()=>{i.value&&(r.value=i.value.scrollTop>=t.visibilityHeight)},a=c=>{var u;(u=i.value)==null||u.scrollTo({top:0,behavior:"smooth"}),e("click",c)},l=B9(o,300,!0);return xi(s,"scroll",l),mn(()=>{var c;s.value=document,i.value=document.documentElement,t.target&&(i.value=(c=document.querySelector(t.target))!=null?c:void 0,i.value||Ks(n,`target does not exist: ${t.target}`),s.value=i.value),o()}),{visible:r,handleClick:a}},U8="ElBacktop",Npe=Be({name:U8,__name:"backtop",props:Rpe,emits:Ope,setup(t,{emit:e}){const n=t,i=e,s=ht("backtop"),{handleClick:r,visible:o}=Dpe(n,i,U8),a=F(()=>({right:`${n.right}px`,bottom:`${n.bottom}px`}));return(l,c)=>(z(),De(Rr,{name:`${v(s).namespace.value}-fade-in`},{default:xe(()=>[v(o)?(z(),se("div",{key:0,style:Ht(a.value),class:J(v(s).b()),onClick:c[0]||(c[0]=un((...u)=>v(r)&&v(r)(...u),["stop"]))},[Ue(l.$slots,"default",{},()=>[de(v(Ut),{class:J(v(s).e("icon"))},{default:xe(()=>[de(v(Due))]),_:1},8,["class"])])],6)):Le("v-if",!0)]),_:3},8,["name"]))}});var Bpe=xt(Npe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/backtop/src/backtop.vue"]]);const Fpe=En(Bpe),zpe=_t({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:Re([String,Object,Array])},offset:{type:Re(Array),default:[0,0]},badgeClass:{type:String}}),Upe=Be({name:"ElBadge",__name:"badge",props:zpe,setup(t,{expose:e}){const n=t,i=ht("badge"),s=F(()=>n.isDot?"":Xt(n.value)&&Xt(n.max)?n.max{var o;return[{backgroundColor:n.color,marginRight:xs(-n.offset[0]),marginTop:xs(n.offset[1])},(o=n.badgeStyle)!=null?o:{}]});return e({content:s}),(o,a)=>(z(),se("div",{class:J(v(i).b())},[Ue(o.$slots,"default"),de(Rr,{name:`${v(i).namespace.value}-zoom-in-center`,persisted:""},{default:xe(()=>[_n(U("sup",{class:J([v(i).e("content"),v(i).em("content",o.type),v(i).is("fixed",!!o.$slots.default),v(i).is("dot",o.isDot),v(i).is("hide-zero",!o.showZero&&o.value===0),o.badgeClass]),style:Ht(r.value)},[Ue(o.$slots,"content",{value:s.value},()=>[cn(Xe(s.value),1)])],6),[[ci,!o.hidden&&(s.value||o.isDot||o.$slots.content)]])]),_:3},8,["name"])],2))}});var $pe=xt(Upe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);const D7=En($pe),N7=Symbol("breadcrumbKey"),Vpe=_t({separator:{type:String,default:"/"},separatorIcon:{type:Ai}}),Hpe=["aria-label"],Wpe=Be({name:"ElBreadcrumb",__name:"breadcrumb",props:Vpe,setup(t){const{t:e}=Jn(),n=t,i=ht("breadcrumb"),s=X();return Xn(N7,n),mn(()=>{const r=s.value.querySelectorAll(`.${i.e("item")}`);r.length&&r[r.length-1].setAttribute("aria-current","page")}),(r,o)=>(z(),se("div",{ref_key:"breadcrumb",ref:s,class:J(v(i).b()),"aria-label":v(e)("el.breadcrumb.label"),role:"navigation"},[Ue(r.$slots,"default")],10,Hpe))}});var Gpe=xt(Wpe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb.vue"]]);const jpe=_t({to:{type:Re([String,Object]),default:""},replace:Boolean}),Kpe=Be({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:jpe,setup(t){const e=t,n=xn(),i=zt(N7,void 0),s=ht("breadcrumb"),r=n.appContext.config.globalProperties.$router,o=()=>{!e.to||!r||(e.replace?r.replace(e.to):r.push(e.to))};return(a,l)=>{var c,u;return z(),se("span",{class:J(v(s).e("item"))},[U("span",{class:J([v(s).e("inner"),v(s).is("link",!!a.to)]),role:"link",onClick:o},[Ue(a.$slots,"default")],2),(c=v(i))!=null&&c.separatorIcon?(z(),De(v(Ut),{key:0,class:J(v(s).e("separator"))},{default:xe(()=>[(z(),De(Sn(v(i).separatorIcon)))]),_:1},8,["class"])):(z(),se("span",{key:1,class:J(v(s).e("separator")),role:"presentation"},Xe((u=v(i))==null?void 0:u.separator),3))],2)}}});var B7=xt(Kpe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/breadcrumb/src/breadcrumb-item.vue"]]);const qpe=En(Gpe,{BreadcrumbItem:B7}),Ype=Ss(B7),F7=Symbol("buttonGroupContextKey"),Bc=({from:t,replacement:e,scope:n,version:i,ref:s,type:r="API"},o)=>{We(()=>v(o),a=>{},{immediate:!0})},Xpe=(t,e)=>{Bc({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},F(()=>t.type==="text"));const n=zt(F7,void 0),i=Hg("button"),{form:s}=zr(),r=er(F(()=>n?.size)),o=Es(),a=X(),l=tr(),c=F(()=>{var g;return t.type||n?.type||((g=i.value)==null?void 0:g.type)||""}),u=F(()=>{var g,x,S;return(S=(x=t.autoInsertSpace)!=null?x:(g=i.value)==null?void 0:g.autoInsertSpace)!=null?S:!1}),d=F(()=>{var g,x,S;return(S=(x=t.plain)!=null?x:(g=i.value)==null?void 0:g.plain)!=null?S:!1}),h=F(()=>{var g,x,S;return(S=(x=t.round)!=null?x:(g=i.value)==null?void 0:g.round)!=null?S:!1}),f=F(()=>{var g,x,S;return(S=(x=t.text)!=null?x:(g=i.value)==null?void 0:g.text)!=null?S:!1}),p=F(()=>t.tag==="button"?{ariaDisabled:o.value||t.loading,disabled:o.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),m=F(()=>{var g;const x=(g=l.default)==null?void 0:g.call(l);if(u.value&&x?.length===1){const S=x[0];if(S?.type===ap){const _=S.children;return new RegExp("^\\p{Unified_Ideograph}{2}$","u").test(_.trim())}}return!1});return{_disabled:o,_size:r,_type:c,_ref:a,_props:p,_plain:d,_round:h,_text:f,shouldAddSpace:m,handleClick:g=>{if(o.value||t.loading){g.stopPropagation();return}t.nativeType==="reset"&&s?.resetFields(),e("click",g)}}},PT=["default","primary","success","warning","info","danger","text",""],Zpe=["button","submit","reset"],LT=_t({size:or,disabled:{type:Boolean,default:void 0},type:{type:String,values:PT,default:""},icon:{type:Ai},nativeType:{type:String,values:Zpe,default:"button"},loading:Boolean,loadingIcon:{type:Ai,default:()=>jc},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:Re([String,Object]),default:"button"}}),Jpe={click:t=>t instanceof MouseEvent};function Jr(t,e){Qpe(t)&&(t="100%");var n=eme(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 nb(t){return Math.min(1,Math.max(0,t))}function Qpe(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function eme(t){return typeof t=="string"&&t.indexOf("%")!==-1}function z7(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function ib(t){return t<=1?"".concat(Number(t)*100,"%"):t}function wf(t){return t.length===1?"0"+t:String(t)}function tme(t,e,n){return{r:Jr(t,255)*255,g:Jr(e,255)*255,b:Jr(n,255)*255}}function $8(t,e,n){t=Jr(t,255),e=Jr(e,255),n=Jr(n,255);var i=Math.max(t,e,n),s=Math.min(t,e,n),r=0,o=0,a=(i+s)/2;if(i===s)o=0,r=0;else{var l=i-s;switch(o=a>.5?l/(2-i-s):l/(i+s),i){case t:r=(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 nme(t,e,n){var i,s,r;if(t=Jr(t,360),e=Jr(e,100),n=Jr(n,100),e===0)s=n,r=n,i=n;else{var o=n<.5?n*(1+e):n+e-n*e,a=2*n-o;i=ZS(a,o,t+1/3),s=ZS(a,o,t),r=ZS(a,o,t-1/3)}return{r:i*255,g:s*255,b:r*255}}function V8(t,e,n){t=Jr(t,255),e=Jr(e,255),n=Jr(n,255);var i=Math.max(t,e,n),s=Math.min(t,e,n),r=0,o=i,a=i-s,l=i===0?0:a/i;if(i===s)r=0;else{switch(i){case t:r=(e-n)/a+(e>16,g:(t&65280)>>8,b:t&255}}var IT={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 ame(t){var e={r:0,g:0,b:0},n=1,i=null,s=null,r=null,o=!1,a=!1;return typeof t=="string"&&(t=ume(t)),typeof t=="object"&&(hu(t.r)&&hu(t.g)&&hu(t.b)?(e=tme(t.r,t.g,t.b),o=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):hu(t.h)&&hu(t.s)&&hu(t.v)?(i=ib(t.s),s=ib(t.v),e=ime(t.h,i,s),o=!0,a="hsv"):hu(t.h)&&hu(t.s)&&hu(t.l)&&(i=ib(t.s),r=ib(t.l),e=nme(t.h,i,r),o=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=z7(n),{ok:o,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}var lme="[-\\+]?\\d+%?",cme="[-\\+]?\\d*\\.\\d+%?",sh="(?:".concat(cme,")|(?:").concat(lme,")"),JS="[\\s|\\(]+(".concat(sh,")[,|\\s]+(").concat(sh,")[,|\\s]+(").concat(sh,")\\s*\\)?"),QS="[\\s|\\(]+(".concat(sh,")[,|\\s]+(").concat(sh,")[,|\\s]+(").concat(sh,")[,|\\s]+(").concat(sh,")\\s*\\)?"),Tl={CSS_UNIT:new RegExp(sh),rgb:new RegExp("rgb"+JS),rgba:new RegExp("rgba"+QS),hsl:new RegExp("hsl"+JS),hsla:new RegExp("hsla"+QS),hsv:new RegExp("hsv"+JS),hsva:new RegExp("hsva"+QS),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 ume(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(IT[t])t=IT[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Tl.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Tl.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Tl.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Tl.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Tl.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Tl.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Tl.hex8.exec(t),n?{r:Aa(n[1]),g:Aa(n[2]),b:Aa(n[3]),a:W8(n[4]),format:e?"name":"hex8"}:(n=Tl.hex6.exec(t),n?{r:Aa(n[1]),g:Aa(n[2]),b:Aa(n[3]),format:e?"name":"hex"}:(n=Tl.hex4.exec(t),n?{r:Aa(n[1]+n[1]),g:Aa(n[2]+n[2]),b:Aa(n[3]+n[3]),a:W8(n[4]+n[4]),format:e?"name":"hex8"}:(n=Tl.hex3.exec(t),n?{r:Aa(n[1]+n[1]),g:Aa(n[2]+n[2]),b:Aa(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function hu(t){return!!Tl.CSS_UNIT.exec(String(t))}var Lm=(function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var i;if(e instanceof t)return e;typeof e=="number"&&(e=ome(e)),this.originalInput=e;var s=ame(e);this.originalInput=e,this.r=s.r,this.g=s.g,this.b=s.b,this.a=s.a,this.roundA=Math.round(100*this.a)/100,this.format=(i=n.format)!==null&&i!==void 0?i:s.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=s.ok}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,i,s,r=e.r/255,o=e.g/255,a=e.b/255;return r<=.03928?n=r/12.92:n=Math.pow((r+.055)/1.055,2.4),o<=.03928?i=o/12.92:i=Math.pow((o+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*s},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=z7(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=V8(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=V8(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(i,"%, ").concat(s,"%)"):"hsva(".concat(n,", ").concat(i,"%, ").concat(s,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=$8(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=$8(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(i,"%, ").concat(s,"%)"):"hsla(".concat(n,", ").concat(i,"%, ").concat(s,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),H8(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),sme(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(i,")"):"rgba(".concat(e,", ").concat(n,", ").concat(i,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Jr(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(Jr(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="#"+H8(this.r,this.g,this.b,!1),n=0,i=Object.entries(IT);n=0,r=!n&&s&&(e.startsWith("hex")||e==="name");return r?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),i||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=nb(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=nb(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=nb(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=nb(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var i=this.toRgb(),s=new t(e).toRgb(),r=n/100,o={r:(s.r-i.r)*r+i.r,g:(s.g-i.g)*r+i.g,b:(s.b-i.b)*r+i.b,a:(s.a-i.a)*r+i.a};return new t(o)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var i=this.toHsl(),s=360/n,r=[this];for(i.h=(i.h-(s*e>>1)+720)%360;--e;)i.h=(i.h+s)%360,r.push(new t(i));return r},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),i=n.h,s=n.s,r=n.v,o=[],a=1/e;e--;)o.push(new t({h:i,s,v:r})),r=(r+a)%1;return o},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),i=new t(e).toRgb(),s=n.a+i.a*(1-n.a);return new t({r:(n.r*n.a+i.r*i.a*(1-n.a))/s,g:(n.g*n.a+i.g*i.a*(1-n.a))/s,b:(n.b*n.a+i.b*i.a*(1-n.a))/s,a:s})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),i=n.h,s=[this],r=360/e,o=1;o{let i={},s=t.color;if(s){const r=s.match(/var\((.*?)\)/);r&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(r[1]));const o=new Lm(s),a=t.dark?o.tint(20).toString():wd(o,20);if(t.plain)i=n.cssVarBlock({"bg-color":t.dark?wd(o,90):o.tint(90).toString(),"text-color":s,"border-color":t.dark?wd(o,50):o.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(i[n.cssVarBlockName("disabled-bg-color")]=t.dark?wd(o,90):o.tint(90).toString(),i[n.cssVarBlockName("disabled-text-color")]=t.dark?wd(o,50):o.tint(50).toString(),i[n.cssVarBlockName("disabled-border-color")]=t.dark?wd(o,80):o.tint(80).toString());else{const l=t.dark?wd(o,30):o.tint(30).toString(),c=o.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(i=n.cssVarBlock({"bg-color":s,"text-color":c,"border-color":s,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const u=t.dark?wd(o,50):o.tint(50).toString();i[n.cssVarBlockName("disabled-bg-color")]=u,i[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,i[n.cssVarBlockName("disabled-border-color")]=u}}}return i})}const hme=Be({name:"ElButton",__name:"button",props:LT,emits:Jpe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=dme(i),o=ht("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,shouldAddSpace:m,handleClick:b}=Xpe(i,s),g=F(()=>[o.b(),o.m(c.value),o.m(l.value),o.is("disabled",u.value),o.is("loading",i.loading),o.is("plain",h.value),o.is("round",f.value),o.is("circle",i.circle),o.is("text",p.value),o.is("link",i.link),o.is("has-bg",i.bg)]);return e({ref:a,size:l,type:c,disabled:u,shouldAddSpace:m}),(x,S)=>(z(),De(Sn(x.tag),Dn({ref_key:"_ref",ref:a},v(d),{class:g.value,style:v(r),onClick:v(b)}),{default:xe(()=>[x.loading?(z(),se(At,{key:0},[x.$slots.loading?Ue(x.$slots,"loading",{key:0}):(z(),De(v(Ut),{key:1,class:J(v(o).is("loading"))},{default:xe(()=>[(z(),De(Sn(x.loadingIcon)))]),_:1},8,["class"]))],64)):x.icon||x.$slots.icon?(z(),De(v(Ut),{key:1},{default:xe(()=>[x.icon?(z(),De(Sn(x.icon),{key:0})):Ue(x.$slots,"icon",{key:1})]),_:3})):Le("v-if",!0),x.$slots.default?(z(),se("span",{key:2,class:J({[v(o).em("text","expand")]:v(m)})},[Ue(x.$slots,"default")],2)):Le("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var fme=xt(hme,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);const pme={size:LT.size,type:LT.type,direction:{type:Re(String),values:["horizontal","vertical"],default:"horizontal"}},mme=Be({name:"ElButtonGroup",__name:"button-group",props:pme,setup(t){const e=t;Xn(F7,ni({size:Ei(e,"size"),type:Ei(e,"type")}));const n=ht("button");return(i,s)=>(z(),se("div",{class:J([v(n).b("group"),v(n).bm("group",e.direction)])},[Ue(i.$slots,"default")],2))}});var U7=xt(mme,[["__file","/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);const Sr=En(fme,{ButtonGroup:U7}),xk=Ss(U7);var W_={exports:{}},gme=W_.exports,G8;function vme(){return G8||(G8=1,(function(t,e){(function(n,i){t.exports=i()})(gme,(function(){var n=1e3,i=6e4,s=36e5,r="millisecond",o="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,x={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(q){var oe=["th","st","nd","rd"],Z=q%100;return"["+q+(oe[(Z-20)%10]||oe[Z]||oe[0])+"]"}},S=function(q,oe,Z){var V=String(q);return!V||V.length>=oe?q:""+Array(oe+1-V.length).join(Z)+q},_={s:S,z:function(q){var oe=-q.utcOffset(),Z=Math.abs(oe),V=Math.floor(Z/60),D=Z%60;return(oe<=0?"+":"-")+S(V,2,"0")+":"+S(D,2,"0")},m:function q(oe,Z){if(oe.date()1)return q(W[0])}else{var Q=oe.name;T[Q]=oe,D=Q}return!V&&D&&(E=D),D||!V&&E},k=function(q,oe){if(I(q))return q.clone();var Z=typeof oe=="object"?oe:{};return Z.date=q,Z.args=arguments,new R(Z)},B=_;B.l=P,B.i=I,B.w=function(q,oe){return k(q,{locale:oe.$L,utc:oe.$u,x:oe.$x,$offset:oe.$offset})};var R=(function(){function q(Z){this.$L=P(Z.locale,null,!0),this.parse(Z),this.$x=this.$x||Z.x||{},this[A]=!0}var oe=q.prototype;return oe.parse=function(Z){this.$d=(function(V){var D=V.date,K=V.utc;if(D===null)return new Date(NaN);if(B.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var W=D.match(b);if(W){var Q=W[2]-1||0,ie=(W[7]||"0").substring(0,3);return K?new Date(Date.UTC(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ie)):new Date(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ie)}}return new Date(D)})(Z),this.init()},oe.init=function(){var Z=this.$d;this.$y=Z.getFullYear(),this.$M=Z.getMonth(),this.$D=Z.getDate(),this.$W=Z.getDay(),this.$H=Z.getHours(),this.$m=Z.getMinutes(),this.$s=Z.getSeconds(),this.$ms=Z.getMilliseconds()},oe.$utils=function(){return B},oe.isValid=function(){return this.$d.toString()!==m},oe.isSame=function(Z,V){var D=k(Z);return this.startOf(V)<=D&&D<=this.endOf(V)},oe.isAfter=function(Z,V){return k(Z)[t>0?t-1:void 0,t,tArray.from(Array.from({length:t}).keys()),$7=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),V7=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),j8=function(t,e){const n=bh(t),i=bh(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},H7=function(t,e){const n=pt(t),i=pt(e);return n&&i?t.length!==e.length?!1:t.every((s,r)=>j8(s,e[r])):!n&&!i?j8(t,e):!1},K8=function(t,e,n){const i=Go(e)||e==="x"?Tn(t).locale(n):Tn(t,e).locale(n);return i.isValid()?i:void 0},q8=function(t,e,n){return Go(e)?t:e==="x"?+t:Tn(t).locale(n).format(e)},tE=(t,e)=>{var n;const i=[],s=e?.();for(let r=0;rpt(t)?t.map(e=>e.toDate()):t.toDate(),bme=(t,e)=>{const n=t.subtract(1,"month").endOf("month").date();return dh(e).map((i,s)=>n-(e-s-1))},_me=t=>{const e=t.daysInMonth();return dh(e).map((n,i)=>i+1)},wme=t=>dh(t.length/7).map(e=>{const n=e*7;return t.slice(n,n+7)}),xme=_t({selectedDay:{type:Re(Object)},range:{type:Re(Array)},date:{type:Re(Object),required:!0},hideHeader:{type:Boolean}}),Sme={pick:t=>Mn(t)};var j_={exports:{}},Eme=j_.exports,Y8;function Cme(){return Y8||(Y8=1,(function(t,e){(function(n,i){t.exports=i()})(Eme,(function(){return function(n,i,s){var r=i.prototype,o=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,m){var b=d.name?d:d.$locale(),g=o(b[h]),x=o(b[f]),S=g||x.map((function(E){return E.slice(0,p)}));if(!m)return S;var _=b.weekStart;return S.map((function(E,T){return S[(T+(_||0))%7]}))},l=function(){return s.Ls[s.locale()]},c=function(d,h){return d.formats[h]||(function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(p,m,b){return m||b.slice(1)}))})(d.formats[h.toUpperCase()])},u=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return u.bind(this)()},s.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},s.months=function(){return a(l(),"months")},s.monthsShort=function(){return a(l(),"monthsShort","months",3)},s.weekdays=function(d){return a(l(),"weekdays",null,null,d)},s.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},s.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}}))})(j_)),j_.exports}var Tme=Cme();const W7=ud(Tme),Mme=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],nE=["sun","mon","tue","wed","thu","fri","sat"],Ame=(t,e)=>{Tn.extend(W7);const n=Tn.localeData().firstDayOfWeek(),{t:i,lang:s}=Jn(),r=Tn().locale(s.value),o=F(()=>!!t.range&&!!t.range.length),a=F(()=>{let h=[];if(o.value){const[f,p]=t.range,m=dh(p.date()-f.date()+1).map(x=>({text:f.date()+x,type:"current"}));let b=m.length%7;b=b===0?0:7-b;const g=dh(b).map((x,S)=>({text:S+1,type:"next"}));h=m.concat(g)}else{const f=t.date.startOf("month").day(),p=bme(t.date,(f-n+7)%7).map(x=>({text:x,type:"prev"})),m=_me(t.date).map(x=>({text:x,type:"current"}));h=[...p,...m];const b=7-(h.length%7||7),g=dh(b).map((x,S)=>({text:S+1,type:"next"}));h=h.concat(g)}return wme(h)}),l=F(()=>{const h=n;return h===0?nE.map(f=>i(`el.datepicker.weeks.${f}`)):nE.slice(h).concat(nE.slice(0,h)).map(f=>i(`el.datepicker.weeks.${f}`))}),c=(h,f)=>{switch(f){case"prev":return t.date.startOf("month").subtract(1,"month").date(h);case"next":return t.date.startOf("month").add(1,"month").date(h);case"current":return t.date.date(h)}};return{now:r,isInRange:o,rows:a,weekDays:l,getFormattedDate:c,handlePickDay:({text:h,type:f})=>{const p=c(h,f);e("pick",p)},getSlotData:({text:h,type:f})=>{const p=c(h,f);return{isSelected:p.isSame(t.selectedDay),type:`${f}-month`,day:p.format("YYYY-MM-DD"),date:p.toDate()}}}},kme={key:0},Pme=["onClick"],Lme=Be({name:"DateTable",__name:"date-table",props:xme,emits:Sme,setup(t,{expose:e,emit:n}){const i=t,s=n,{isInRange:r,now:o,rows:a,weekDays:l,getFormattedDate:c,handlePickDay:u,getSlotData:d}=Ame(i,s),h=ht("calendar-table"),f=ht("calendar-day"),p=({text:m,type:b})=>{const g=[b];if(b==="current"){const x=c(m,b);x.isSame(i.selectedDay,"day")&&g.push(f.is("selected")),x.isSame(o,"day")&&g.push(f.is("today"))}return g};return e({getFormattedDate:c}),(m,b)=>(z(),se("table",{class:J([v(h).b(),v(h).is("range",v(r))]),cellspacing:"0",cellpadding:"0"},[m.hideHeader?Le("v-if",!0):(z(),se("thead",kme,[U("tr",null,[(z(!0),se(At,null,yn(v(l),g=>(z(),se("th",{key:g,scope:"col"},Xe(g),1))),128))])])),U("tbody",null,[(z(!0),se(At,null,yn(v(a),(g,x)=>(z(),se("tr",{key:x,class:J({[v(h).e("row")]:!0,[v(h).em("row","hide-border")]:x===0&&m.hideHeader})},[(z(!0),se(At,null,yn(g,(S,_)=>(z(),se("td",{key:_,class:J(p(S)),onClick:E=>v(u)(S)},[U("div",{class:J(v(f).b())},[Ue(m.$slots,"date-cell",{data:v(d)(S)},()=>[U("span",null,Xe(S.text),1)])],2)],10,Pme))),128))],2))),128))])],2))}});var X8=xt(Lme,[["__file","/home/runner/work/element-plus/element-plus/packages/components/calendar/src/date-table.vue"]]);const Ime=(t,e)=>{const n=t.endOf("month"),i=e.startOf("month"),r=n.isSame(i,"week")?i.add(1,"week"):i;return[[t,n],[r.startOf("week"),e]]},Rme=(t,e)=>{const n=t.endOf("month"),i=t.add(1,"month").startOf("month"),s=n.isSame(i,"week")?i.add(1,"week"):i,r=s.endOf("month"),o=e.startOf("month"),a=r.isSame(o,"week")?o.add(1,"week"):o;return[[t,n],[s.startOf("week"),r],[a.startOf("week"),e]]},Ome=(t,e,n)=>{const{lang:i}=Jn(),s=X(),r=Tn().locale(i.value),o=F({get(){return t.modelValue?l.value:s.value},set(b){if(!b)return;s.value=b;const g=b.toDate();e(Qs,g),e(wn,g)}}),a=F(()=>{if(!t.range||!pt(t.range)||t.range.length!==2||t.range.some(S=>!bh(S)))return[];const b=t.range.map(S=>Tn(S).locale(i.value)),[g,x]=b;return g.isAfter(x)?[]:g.isSame(x,"month")?f(g,x):g.add(1,"month").month()!==x.month()?[]:f(g,x)}),l=F(()=>t.modelValue?Tn(t.modelValue).locale(i.value):o.value||(a.value.length?a.value[0][0]:r)),c=F(()=>l.value.subtract(1,"month").date(1)),u=F(()=>l.value.add(1,"month").date(1)),d=F(()=>l.value.subtract(1,"year").date(1)),h=F(()=>l.value.add(1,"year").date(1)),f=(b,g)=>{const x=b.startOf("week"),S=g.endOf("week"),_=x.get("month"),E=S.get("month");return _===E?[[x,S]]:(_+1)%12===E?Ime(x,S):_+2===E||(_+1)%11===E?Rme(x,S):[]},p=b=>{o.value=b};return{calculateValidatedDateRange:f,date:l,realSelectedDay:o,pickDay:p,selectDate:b=>{const x={"prev-month":c.value,"next-month":u.value,"prev-year":d.value,"next-year":h.value,today:r}[b];x.isSame(l.value,"day")||p(x)},validatedRange:a}},Dme=t=>pt(t)&&t.length===2&&t.every(e=>bh(e)),Nme=_t({modelValue:{type:Date},range:{type:Re(Array),validator:Dme}}),Bme={[wn]:t=>bh(t),[Qs]:t=>bh(t)},Fme="ElCalendar",zme=Be({name:Fme,__name:"calendar",props:Nme,emits:Bme,setup(t,{expose:e,emit:n}){const i=ht("calendar"),s=t,r=n,{calculateValidatedDateRange:o,date:a,pickDay:l,realSelectedDay:c,selectDate:u,validatedRange:d}=Ome(s,r),{t:h}=Jn(),f=F(()=>{const p=`el.datepicker.month${a.value.format("M")}`;return`${a.value.year()} ${h("el.datepicker.year")} ${h(p)}`});return e({selectedDay:c,pickDay:l,selectDate:u,calculateValidatedDateRange:o}),(p,m)=>(z(),se("div",{class:J(v(i).b())},[U("div",{class:J(v(i).e("header"))},[Ue(p.$slots,"header",{date:f.value},()=>[U("div",{class:J(v(i).e("title"))},Xe(f.value),3),v(d).length===0?(z(),se("div",{key:0,class:J(v(i).e("button-group"))},[de(v(xk),null,{default:xe(()=>[de(v(Sr),{size:"small",onClick:m[0]||(m[0]=b=>v(u)("prev-month"))},{default:xe(()=>[cn(Xe(v(h)("el.datepicker.prevMonth")),1)]),_:1}),de(v(Sr),{size:"small",onClick:m[1]||(m[1]=b=>v(u)("today"))},{default:xe(()=>[cn(Xe(v(h)("el.datepicker.today")),1)]),_:1}),de(v(Sr),{size:"small",onClick:m[2]||(m[2]=b=>v(u)("next-month"))},{default:xe(()=>[cn(Xe(v(h)("el.datepicker.nextMonth")),1)]),_:1})]),_:1})],2)):Le("v-if",!0)])],2),v(d).length===0?(z(),se("div",{key:0,class:J(v(i).e("body"))},[de(X8,{date:v(a),"selected-day":v(c),onPick:v(l)},va({_:2},[p.$slots["date-cell"]?{name:"date-cell",fn:xe(b=>[Ue(p.$slots,"date-cell",Wu(Gu(b)))]),key:"0"}:void 0]),1032,["date","selected-day","onPick"])],2)):(z(),se("div",{key:1,class:J(v(i).e("body"))},[(z(!0),se(At,null,yn(v(d),(b,g)=>(z(),De(X8,{key:g,date:b[0],"selected-day":v(c),range:b,"hide-header":g!==0,onPick:v(l)},va({_:2},[p.$slots["date-cell"]?{name:"date-cell",fn:xe(x=>[Ue(p.$slots,"date-cell",Dn({ref_for:!0},x))]),key:"0"}:void 0]),1032,["date","selected-day","range","hide-header","onPick"]))),128))],2))],2))}});var Ume=xt(zme,[["__file","/home/runner/work/element-plus/element-plus/packages/components/calendar/src/calendar.vue"]]);const $me=En(Ume),Vme=_t({header:{type:String,default:""},footer:{type:String,default:""},bodyStyle:{type:Re([String,Object,Array]),default:""},headerClass:String,bodyClass:String,footerClass:String,shadow:{type:String,values:["always","hover","never"],default:void 0}}),Hme=Be({name:"ElCard",__name:"card",props:Vme,setup(t){const e=Hg("card"),n=ht("card");return(i,s)=>{var r;return z(),se("div",{class:J([v(n).b(),v(n).is(`${i.shadow||((r=v(e))==null?void 0:r.shadow)||"always"}-shadow`)])},[i.$slots.header||i.header?(z(),se("div",{key:0,class:J([v(n).e("header"),i.headerClass])},[Ue(i.$slots,"header",{},()=>[cn(Xe(i.header),1)])],2)):Le("v-if",!0),U("div",{class:J([v(n).e("body"),i.bodyClass]),style:Ht(i.bodyStyle)},[Ue(i.$slots,"default")],6),i.$slots.footer||i.footer?(z(),se("div",{key:1,class:J([v(n).e("footer"),i.footerClass])},[Ue(i.$slots,"footer",{},()=>[cn(Xe(i.footer),1)])],2)):Le("v-if",!0)],2)}}});var Wme=xt(Hme,[["__file","/home/runner/work/element-plus/element-plus/packages/components/card/src/card.vue"]]);const Gme=En(Wme),jme=_t({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}),Kme={change:(t,e)=>[t,e].every(Xt)},G7=Symbol("carouselContextKey"),RT="ElCarouselItem";var Za=(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))(Za||{});function OT(t){return Yi(t)&&t.type===At}function qme(t){return Yi(t)&&t.type===Hs}function Yme(t){return Yi(t)&&!OT(t)&&!qme(t)}const Xme=t=>{if(!Yi(t))return{};const e=t.props||{},n=(Yi(t.type)?t.type.props:void 0)||{},i={};return Object.keys(n).forEach(s=>{fi(n[s],"default")&&(i[s]=n[s].default)}),Object.keys(e).forEach(s=>{i[Co(s)]=e[s]}),i},Il=t=>{const e=pt(t)?t:[t],n=[];return e.forEach(i=>{var s;pt(i)?n.push(...Il(i)):Yi(i)&&((s=i.component)!=null&&s.subTree)?n.push(i,...Il(i.component.subTree)):Yi(i)&&pt(i.children)?n.push(...Il(i.children)):Yi(i)&&i.shapeFlag===2?n.push(...Il(i.type())):n.push(i)}),n},Zme=(t,e,n)=>Il(t.subTree).filter(r=>{var o;return Yi(r)&&((o=r.type)==null?void 0:o.name)===e&&!!r.component}).map(r=>r.component.uid).map(r=>n[r]).filter(r=>!!r),Ox=(t,e)=>{const n=wi({}),i=wi([]),s=new WeakMap,r=u=>{n.value[u.uid]=u,I_(n),mn(()=>{const d=u.getVnode().el,h=d.parentNode;if(!s.has(h)){s.set(h,[]);const f=h.insertBefore.bind(h);h.insertBefore=(p,m)=>(s.get(h).some(g=>p===g||m===g)&&I_(n),f(p,m))}s.get(h).push(d)})},o=u=>{delete n.value[u.uid],I_(n);const d=u.getVnode().el,h=d.parentNode,f=s.get(h),p=f.indexOf(d);f.splice(p,1)},a=()=>{i.value=Zme(t,e,n.value)},l=u=>u.render();return{children:i,addChild:r,removeChild:o,ChildrenSorter:Be({setup(u,{slots:d}){return()=>(a(),d.default?tn(l,{render:d.default}):null)}})}},Z8=300,Jme=(t,e,n)=>{const{children:i,addChild:s,removeChild:r,ChildrenSorter:o}=Ox(xn(),RT),a=tr(),l=X(-1),c=X(null),u=X(!1),d=X(),h=X(0),f=X(!0),p=F(()=>t.arrow!=="never"&&!v(g)),m=F(()=>i.value.some(ae=>ae.props.label.toString().length>0)),b=F(()=>t.type==="card"),g=F(()=>t.direction==="vertical"),x=F(()=>t.height!=="auto"?{height:t.height}:{height:`${h.value}px`,overflow:"hidden"}),S=ih(ae=>{P(ae)},Z8,{trailing:!0}),_=ih(ae=>{V(ae)},Z8),E=ae=>f.value?l.value<=1?ae<=1:ae>1:!0;function T(){c.value&&(clearInterval(c.value),c.value=null)}function A(){t.interval<=0||!t.autoplay||c.value||(c.value=setInterval(()=>I(),t.interval))}const I=()=>{l.valueKe.props.name===ae);Te.length>0&&(ae=i.value.indexOf(Te[0]))}if(ae=Number(ae),Number.isNaN(ae)||ae!==Math.floor(ae))return;const _e=i.value.length,ke=l.value;ae<0?l.value=t.loop?_e-1:0:ae>=_e?l.value=t.loop?0:_e-1:l.value=ae,ke===l.value&&k(ke),W()}function k(ae){i.value.forEach((_e,ke)=>{_e.translateItem(ke,l.value,ae)})}function B(ae,_e){var ke,Te,Ke,Fe;const ve=v(i),fe=ve.length;if(fe===0||!ae.states.inStage)return!1;const Me=_e+1,ge=_e-1,Qe=fe-1,G=ve[Qe].states.active,ee=ve[0].states.active,j=(Te=(ke=ve[Me])==null?void 0:ke.states)==null?void 0:Te.active,he=(Fe=(Ke=ve[ge])==null?void 0:Ke.states)==null?void 0:Fe.active;return _e===Qe&&ee||j?"left":_e===0&&G||he?"right":!1}function R(){u.value=!0,t.pauseOnHover&&T()}function H(){u.value=!1,A()}function q(ae){v(g)||i.value.forEach((_e,ke)=>{ae===B(_e,ke)&&(_e.states.hover=!0)})}function oe(){v(g)||i.value.forEach(ae=>{ae.states.hover=!1})}function Z(ae){l.value=ae}function V(ae){t.trigger==="hover"&&ae!==l.value&&(l.value=ae)}function D(){P(l.value-1)}function K(){P(l.value+1)}function W(){T(),t.pauseOnHover||A()}function Q(ae){t.height==="auto"&&(h.value=ae)}function ie(){var ae;const _e=(ae=a.default)==null?void 0:ae.call(a);if(!_e)return null;const Te=Il(_e).filter(Ke=>Yi(Ke)&&Ke.type.name===RT);return Te?.length===2&&t.loop&&!b.value?(f.value=!0,Te):(f.value=!1,null)}We(()=>l.value,(ae,_e)=>{k(_e),f.value&&(ae=ae%2,_e=_e%2),_e>-1&&e(Wn,ae,_e)});const ne=F({get:()=>f.value?l.value%2:l.value,set:ae=>l.value=ae});We(()=>t.autoplay,ae=>{ae?A():T()}),We(()=>t.loop,()=>{P(l.value)}),We(()=>t.interval,()=>{W()});const ce=wi();return mn(()=>{We(()=>i.value,()=>{i.value.length>0&&P(t.initialIndex)},{immediate:!0}),ce.value=as(d.value,()=>{k()}),A()}),gi(()=>{T(),d.value&&ce.value&&ce.value.stop()}),Xn(G7,{root:d,isCardType:b,isVertical:g,items:i,loop:t.loop,cardScale:t.cardScale,addItem:s,removeItem:r,setActiveItem:P,setContainerHeight:Q}),{root:d,activeIndex:l,exposeActiveIndex:ne,arrowDisplay:p,hasLabel:m,hover:u,isCardType:b,items:i,isVertical:g,containerStyle:x,isItemsTwoLength:f,handleButtonEnter:q,handleButtonLeave:oe,handleIndicatorClick:Z,handleMouseEnter:R,handleMouseLeave:H,setActiveItem:P,prev:D,next:K,PlaceholderItem:ie,isTwoLengthShow:E,ItemsSorter:o,throttledArrowClick:S,throttledIndicatorHover:_}},Qme=["aria-label"],ege=["aria-label"],tge=["onMouseenter","onClick"],nge=["aria-label"],ige={key:0},sge={key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},rge="ElCarousel",oge=Be({name:rge,__name:"carousel",props:jme,emits:Kme,setup(t,{expose:e,emit:n}){const i=t,s=n,{root:r,activeIndex:o,exposeActiveIndex:a,arrowDisplay:l,hasLabel:c,hover:u,isCardType:d,items:h,isVertical:f,containerStyle:p,handleButtonEnter:m,handleButtonLeave:b,handleIndicatorClick:g,handleMouseEnter:x,handleMouseLeave:S,setActiveItem:_,prev:E,next:T,PlaceholderItem:A,isTwoLengthShow:I,ItemsSorter:P,throttledArrowClick:k,throttledIndicatorHover:B}=Jme(i,s),R=ht("carousel"),{t:H}=Jn(),q=F(()=>{const D=[R.b(),R.m(i.direction)];return v(d)&&D.push(R.m("card")),D}),oe=F(()=>{const D=[R.e("indicators"),R.em("indicators",i.direction)];return v(c)&&D.push(R.em("indicators","labels")),i.indicatorPosition==="outside"&&D.push(R.em("indicators","outside")),v(f)&&D.push(R.em("indicators","right")),D});function Z(D){if(!i.motionBlur)return;const K=v(f)?`${R.namespace.value}-transitioning-vertical`:`${R.namespace.value}-transitioning`;D.currentTarget.classList.add(K)}function V(D){if(!i.motionBlur)return;const K=v(f)?`${R.namespace.value}-transitioning-vertical`:`${R.namespace.value}-transitioning`;D.currentTarget.classList.remove(K)}return e({activeIndex:a,setActiveItem:_,prev:E,next:T}),(D,K)=>(z(),se("div",{ref_key:"root",ref:r,class:J(q.value),onMouseenter:K[6]||(K[6]=un((...W)=>v(x)&&v(x)(...W),["stop"])),onMouseleave:K[7]||(K[7]=un((...W)=>v(S)&&v(S)(...W),["stop"]))},[v(l)?(z(),De(Rr,{key:0,name:"carousel-arrow-left",persisted:""},{default:xe(()=>[_n(U("button",{type:"button",class:J([v(R).e("arrow"),v(R).em("arrow","left")]),"aria-label":v(H)("el.carousel.leftArrow"),onMouseenter:K[0]||(K[0]=W=>v(m)("left")),onMouseleave:K[1]||(K[1]=(...W)=>v(b)&&v(b)(...W)),onClick:K[2]||(K[2]=un(W=>v(k)(v(o)-1),["stop"]))},[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1})],42,Qme),[[ci,(D.arrow==="always"||v(u))&&(D.loop||v(o)>0)]])]),_:1})):Le("v-if",!0),v(l)?(z(),De(Rr,{key:1,name:"carousel-arrow-right",persisted:""},{default:xe(()=>[_n(U("button",{type:"button",class:J([v(R).e("arrow"),v(R).em("arrow","right")]),"aria-label":v(H)("el.carousel.rightArrow"),onMouseenter:K[3]||(K[3]=W=>v(m)("right")),onMouseleave:K[4]||(K[4]=(...W)=>v(b)&&v(b)(...W)),onClick:K[5]||(K[5]=un(W=>v(k)(v(o)+1),["stop"]))},[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})],42,ege),[[ci,(D.arrow==="always"||v(u))&&(D.loop||v(o)[D.indicatorPosition!=="none"?(z(),se("ul",{key:0,class:J(oe.value)},[(z(!0),se(At,null,yn(v(h),(W,Q)=>_n((z(),se("li",{key:Q,class:J([v(R).e("indicator"),v(R).em("indicator",D.direction),v(R).is("active",Q===v(o))]),onMouseenter:ie=>v(B)(Q),onClick:un(ie=>v(g)(Q),["stop"])},[U("button",{class:J(v(R).e("button")),"aria-label":v(H)("el.carousel.indicator",{index:Q+1})},[v(c)?(z(),se("span",ige,Xe(W.props.label),1)):Le("v-if",!0)],10,nge)],42,tge)),[[ci,v(I)(Q)]])),128))],2)):Le("v-if",!0)]),_:1}),D.motionBlur?(z(),se("svg",sge,[...K[8]||(K[8]=[U("defs",null,[U("filter",{id:"elCarouselHorizontal"},[U("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),U("filter",{id:"elCarouselVertical"},[U("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])],-1)])])):Le("v-if",!0)],34))}});var age=xt(oge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel.vue"]]);const lge=_t({name:{type:String,default:""},label:{type:[String,Number],default:""}}),cge=t=>{const e=zt(G7),n=xn(),i=X(),s=X(!1),r=X(0),o=X(1),a=X(!1),l=X(!1),c=X(!1),u=X(!1),{isCardType:d,isVertical:h,cardScale:f}=e;function p(_,E,T){const A=T-1,I=E-1,P=E+1,k=T/2;return E===0&&_===A?-1:E===A&&_===0?T:_=k?T+1:_>P&&_-E>=k?-2:_}function m(_,E){var T,A;const I=v(h)?((T=e.root.value)==null?void 0:T.offsetHeight)||0:((A=e.root.value)==null?void 0:A.offsetWidth)||0;return c.value?I*((2-f)*(_-E)+1)/4:_{var A;const I=v(d),P=(A=e.items.value.length)!=null?A:Number.NaN,k=_===E;!I&&!ri(T)&&(u.value=k||_===T),!k&&P>2&&e.loop&&(_=p(_,E,P));const B=v(h);a.value=k,I?(c.value=Math.round(Math.abs(_-E))<=1,r.value=m(_,E),o.value=v(a)?1:f):r.value=b(_,E,B),l.value=!0,k&&i.value&&e.setContainerHeight(i.value.offsetHeight)};function x(){if(e&&v(d)){const _=e.items.value.findIndex(({uid:E})=>E===n.uid);e.setActiveItem(_)}}const S={props:t,states:ni({hover:s,translate:r,scale:o,active:a,ready:l,inStage:c,animating:u}),uid:n.uid,getVnode:()=>n.vnode,translateItem:g};return e.addItem(S),gi(()=>{e.removeItem(S)}),{carouselItemRef:i,active:a,animating:u,hover:s,inStage:c,isVertical:h,translate:r,isCardType:d,scale:o,ready:l,handleItemClick:x}},uge=Be({name:RT,__name:"carousel-item",props:lge,setup(t){const e=t,n=ht("carousel"),{carouselItemRef:i,active:s,animating:r,hover:o,inStage:a,isVertical:l,translate:c,isCardType:u,scale:d,ready:h,handleItemClick:f}=cge(e),p=F(()=>[n.e("item"),n.is("active",s.value),n.is("in-stage",a.value),n.is("hover",o.value),n.is("animating",r.value),{[n.em("item","card")]:u.value,[n.em("item","card-vertical")]:u.value&&l.value}]),m=F(()=>{const g=`${`translate${v(l)?"Y":"X"}`}(${v(c)}px)`,x=`scale(${v(d)})`;return{transform:[g,x].join(" ")}});return(b,g)=>_n((z(),se("div",{ref_key:"carouselItemRef",ref:i,class:J(p.value),style:Ht(m.value),onClick:g[0]||(g[0]=(...x)=>v(f)&&v(f)(...x))},[v(u)?_n((z(),se("div",{key:0,class:J(v(n).e("mask"))},null,2)),[[ci,!v(s)]]):Le("v-if",!0),Ue(b.$slots,"default")],6)),[[ci,v(h)]])}});var j7=xt(uge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/carousel/src/carousel-item.vue"]]);const dge=En(age,{CarouselItem:j7}),hge=Ss(j7),K7={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:or,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...To(["ariaControls"])},q7={[wn]:t=>Gt(t)||Xt(t)||Mi(t),change:t=>Gt(t)||Xt(t)||Mi(t)},jg=Symbol("checkboxGroupContextKey"),fge=({model:t,isChecked:e})=>{const n=zt(jg,void 0),i=zt(fp,void 0),s=F(()=>{var o,a;const l=(o=n?.max)==null?void 0:o.value,c=(a=n?.min)==null?void 0:a.value;return!ri(l)&&t.value.length>=l&&!e.value||!ri(c)&&t.value.length<=c&&e.value});return{isDisabled:Es(F(()=>{var o,a;return n===void 0?(o=i?.disabled)!=null?o:s.value:((a=n.disabled)==null?void 0:a.value)||s.value})),isLimitDisabled:s}},pge=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:s,isLabeledByFormItem:r})=>{const o=zt(jg,void 0),{formItem:a}=zr(),{emit:l}=xn();function c(p){var m,b,g,x;return[!0,t.trueValue,t.trueLabel].includes(p)?(b=(m=t.trueValue)!=null?m:t.trueLabel)!=null?b:!0:(x=(g=t.falseValue)!=null?g:t.falseLabel)!=null?x:!1}function u(p,m){l(Wn,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(Wn,c(m.checked),p)}async function h(p){n.value||!i.value&&!s.value&&r.value&&(p.composedPath().some(g=>g.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await Nt(),u(e.value,p)))}const f=F(()=>o?.validateEvent||t.validateEvent);return We(()=>t.modelValue,()=>{f.value&&a?.validate("change").catch(p=>void 0)}),{handleChange:d,onClickRoot:h}},mge=t=>{const e=X(!1),{emit:n}=xn(),i=zt(jg,void 0),s=F(()=>ri(i)===!1),r=X(!1),o=F({get(){var a,l;return s.value?(a=i?.modelValue)==null?void 0:a.value:(l=t.modelValue)!=null?l:e.value},set(a){var l,c;s.value&&pt(a)?(r.value=((l=i?.max)==null?void 0:l.value)!==void 0&&a.length>i?.max.value&&a.length>o.value.length,r.value===!1&&((c=i?.changeEvent)==null||c.call(i,a))):(n(wn,a),e.value=a)}});return{model:o,isGroup:s,isLimitExceeded:r}},gge=(t,e,{model:n})=>{const i=zt(jg,void 0),s=X(!1),r=F(()=>ua(t.value)?t.label:t.value),o=F(()=>{const u=n.value;return Mi(u)?u:pt(u)?Mn(r.value)?u.map(Hi).some(d=>Ms(d,r.value)):u.map(Hi).includes(r.value):u!=null?u===t.trueValue||u===t.trueLabel:!!u}),a=er(F(()=>{var u;return(u=i?.size)==null?void 0:u.value}),{prop:!0}),l=er(F(()=>{var u;return(u=i?.size)==null?void 0:u.value})),c=F(()=>!!e.default||!ua(r.value));return{checkboxButtonSize:a,isChecked:o,isFocused:s,checkboxSize:l,hasOwnLabel:c,actualValue:r}},Y7=(t,e)=>{const{formItem:n}=zr(),{model:i,isGroup:s,isLimitExceeded:r}=mge(t),{isFocused:o,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=gge(t,e,{model:i}),{isDisabled:h}=fge({model:i,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Ba(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:m,onClickRoot:b}=pge(t,{model:i,isLimitExceeded:r,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function x(){var S,_;pt(i.value)&&!i.value.includes(d.value)?i.value.push(d.value):i.value=(_=(S=t.trueValue)!=null?S:t.trueLabel)!=null?_:!0}t.checked&&x()})(),Bc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},F(()=>s.value&&ua(t.value))),Bc({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},F(()=>!!t.trueLabel)),Bc({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},F(()=>!!t.falseLabel)),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:h,isFocused:o,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:i,actualValue:d,handleChange:m,onClickRoot:b}},vge=["id","indeterminate","name","tabindex","disabled"],yge=Be({name:"ElCheckbox",__name:"checkbox",props:K7,emits:q7,setup(t){const e=t,n=tr(),{inputId:i,isLabeledByFormItem:s,isChecked:r,isDisabled:o,isFocused:a,checkboxSize:l,hasOwnLabel:c,model:u,actualValue:d,handleChange:h,onClickRoot:f}=Y7(e,n),p=F(()=>{var x,S,_,E;return e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":(S=(x=e.trueValue)!=null?x:e.trueLabel)!=null?S:!0,"false-value":(E=(_=e.falseValue)!=null?_:e.falseLabel)!=null?E:!1}:{value:d.value}}),m=ht("checkbox"),b=F(()=>[m.b(),m.m(l.value),m.is("disabled",o.value),m.is("bordered",e.border),m.is("checked",r.value)]),g=F(()=>[m.e("input"),m.is("disabled",o.value),m.is("checked",r.value),m.is("indeterminate",e.indeterminate),m.is("focus",a.value)]);return(x,S)=>(z(),De(Sn(!v(c)&&v(s)?"span":"label"),{for:!v(c)&&v(s)?null:v(i),class:J(b.value),"aria-controls":x.indeterminate?x.ariaControls:null,"aria-checked":x.indeterminate?"mixed":void 0,"aria-label":x.ariaLabel,onClick:v(f)},{default:xe(()=>[U("span",{class:J(g.value)},[_n(U("input",Dn({id:v(i),"onUpdate:modelValue":S[0]||(S[0]=_=>Li(u)?u.value=_:null),class:v(m).e("original"),type:"checkbox",indeterminate:x.indeterminate,name:x.name,tabindex:x.tabindex,disabled:v(o)},p.value,{onChange:S[1]||(S[1]=(..._)=>v(h)&&v(h)(..._)),onFocus:S[2]||(S[2]=_=>a.value=!0),onBlur:S[3]||(S[3]=_=>a.value=!1),onClick:S[4]||(S[4]=un(()=>{},["stop"]))}),null,16,vge),[[dx,v(u)]]),U("span",{class:J(v(m).e("inner"))},null,2)],2),v(c)?(z(),se("span",{key:0,class:J(v(m).e("label"))},[Ue(x.$slots,"default"),x.$slots.default?Le("v-if",!0):(z(),se(At,{key:0},[cn(Xe(x.label),1)],64))],2)):Le("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}});var X7=xt(yge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox.vue"]]);const bge=["name","tabindex","disabled"],_ge=Be({name:"ElCheckboxButton",__name:"checkbox-button",props:K7,emits:q7,setup(t){const e=t,n=tr(),{isFocused:i,isChecked:s,isDisabled:r,checkboxButtonSize:o,model:a,actualValue:l,handleChange:c}=Y7(e,n),u=F(()=>{var m,b,g,x;return e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":(b=(m=e.trueValue)!=null?m:e.trueLabel)!=null?b:!0,"false-value":(x=(g=e.falseValue)!=null?g:e.falseLabel)!=null?x:!1}:{value:l.value}}),d=zt(jg,void 0),h=ht("checkbox"),f=F(()=>{var m,b,g,x;const S=(b=(m=d?.fill)==null?void 0:m.value)!=null?b:"";return{backgroundColor:S,borderColor:S,color:(x=(g=d?.textColor)==null?void 0:g.value)!=null?x:"",boxShadow:S?`-1px 0 0 0 ${S}`:void 0}}),p=F(()=>[h.b("button"),h.bm("button",o.value),h.is("disabled",r.value),h.is("checked",s.value),h.is("focus",i.value)]);return(m,b)=>(z(),se("label",{class:J(p.value)},[_n(U("input",Dn({"onUpdate:modelValue":b[0]||(b[0]=g=>Li(a)?a.value=g:null),class:v(h).be("button","original"),type:"checkbox",name:m.name,tabindex:m.tabindex,disabled:v(r)},u.value,{onChange:b[1]||(b[1]=(...g)=>v(c)&&v(c)(...g)),onFocus:b[2]||(b[2]=g=>i.value=!0),onBlur:b[3]||(b[3]=g=>i.value=!1),onClick:b[4]||(b[4]=un(()=>{},["stop"]))}),null,16,bge),[[dx,v(a)]]),m.$slots.default||m.label?(z(),se("span",{key:0,class:J(v(h).be("button","inner")),style:Ht(v(s)?f.value:void 0)},[Ue(m.$slots,"default",{},()=>[cn(Xe(m.label),1)])],6)):Le("v-if",!0)],2))}});var Sk=xt(_ge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-button.vue"]]);const wge=_t({modelValue:{type:Re(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:or,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:Re(Array)},props:{type:Re(Object),default:()=>Z7},type:{type:String,values:["checkbox","button"],default:"checkbox"},...To(["ariaLabel"])}),xge={[wn]:t=>pt(t),change:t=>pt(t)},Z7={label:"label",value:"value",disabled:"disabled"},Sge=Be({name:"ElCheckboxGroup",__name:"checkbox-group",props:wge,emits:xge,setup(t,{emit:e}){const n=t,i=e,s=ht("checkbox"),r=Es(),{formItem:o}=zr(),{inputId:a,isLabeledByFormItem:l}=Ba(n,{formItemContext:o}),c=async p=>{i(wn,p),await Nt(),i(Wn,p)},u=F({get(){return n.modelValue},set(p){c(p)}}),d=F(()=>({...Z7,...n.props})),h=p=>{const{label:m,value:b,disabled:g}=d.value,x={label:p[m],value:p[b],disabled:p[g]};return{...Vy(p,[m,b,g]),...x}},f=F(()=>n.type==="button"?Sk:X7);return Xn(jg,{...td(hr(n),["size","min","max","validateEvent","fill","textColor"]),disabled:r,modelValue:u,changeEvent:c}),We(()=>n.modelValue,(p,m)=>{n.validateEvent&&!Ms(p,m)&&o?.validate("change").catch(b=>void 0)}),(p,m)=>{var b;return z(),De(Sn(p.tag),{id:v(a),class:J(v(s).b("group")),role:"group","aria-label":v(l)?void 0:p.ariaLabel||"checkbox-group","aria-labelledby":v(l)?(b=v(o))==null?void 0:b.labelId:void 0},{default:xe(()=>[Ue(p.$slots,"default",{},()=>[(z(!0),se(At,null,yn(p.options,(g,x)=>(z(),De(Sn(f.value),Dn({key:x},{ref_for:!0},h(g)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var J7=xt(Sge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/checkbox/src/checkbox-group.vue"]]);const Gl=En(X7,{CheckboxButton:Sk,CheckboxGroup:J7}),Ege=Ss(Sk),Ek=Ss(J7),Q7=_t({modelValue:{type:[String,Number,Boolean],default:void 0},size:or,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Cge=_t({...Q7,border:Boolean}),ez={[wn]:t=>Gt(t)||Xt(t)||Mi(t),[Wn]:t=>Gt(t)||Xt(t)||Mi(t)},tz=Symbol("radioGroupKey"),nz=(t,e)=>{const n=X(),i=zt(tz,void 0),s=F(()=>!!i),r=F(()=>ua(t.value)?t.label:t.value),o=F({get(){return s.value?i.modelValue:t.modelValue},set(d){s.value?i.changeEvent(d):e&&e(wn,d),n.value.checked=t.modelValue===r.value}}),a=er(F(()=>i?.size)),l=Es(F(()=>i?.disabled)),c=X(!1),u=F(()=>l.value||s.value&&o.value!==r.value?-1:0);return Bc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},F(()=>s.value&&ua(t.value))),{radioRef:n,isGroup:s,radioGroup:i,focus:c,size:a,disabled:l,tabIndex:u,modelValue:o,actualValue:r}},Tge=["value","name","disabled","checked"],Mge=Be({name:"ElRadio",__name:"radio",props:Cge,emits:ez,setup(t,{emit:e}){const n=t,i=e,s=ht("radio"),{radioRef:r,radioGroup:o,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=nz(n,i);function h(){Nt(()=>i(Wn,u.value))}return(f,p)=>{var m;return z(),se("label",{class:J([v(s).b(),v(s).is("disabled",v(c)),v(s).is("focus",v(a)),v(s).is("bordered",f.border),v(s).is("checked",v(u)===v(d)),v(s).m(v(l))])},[U("span",{class:J([v(s).e("input"),v(s).is("disabled",v(c)),v(s).is("checked",v(u)===v(d))])},[_n(U("input",{ref_key:"radioRef",ref:r,"onUpdate:modelValue":p[0]||(p[0]=b=>Li(u)?u.value=b:null),class:J(v(s).e("original")),value:v(d),name:f.name||((m=v(o))==null?void 0:m.name),disabled:v(c),checked:v(u)===v(d),type:"radio",onFocus:p[1]||(p[1]=b=>a.value=!0),onBlur:p[2]||(p[2]=b=>a.value=!1),onChange:h,onClick:p[3]||(p[3]=un(()=>{},["stop"]))},null,42,Tge),[[kA,v(u)]]),U("span",{class:J(v(s).e("inner"))},null,2)],2),U("span",{class:J(v(s).e("label")),onKeydown:p[4]||(p[4]=un(()=>{},["stop"]))},[Ue(f.$slots,"default",{},()=>[cn(Xe(f.label),1)])],34)],2)}}});var iz=xt(Mge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio.vue"]]);const Age=_t({...Q7}),kge=["value","name","disabled"],Pge=Be({name:"ElRadioButton",__name:"radio-button",props:Age,setup(t){const e=t,n=ht("radio"),{radioRef:i,focus:s,size:r,disabled:o,modelValue:a,radioGroup:l,actualValue:c}=nz(e),u=F(()=>({backgroundColor:l?.fill||"",borderColor:l?.fill||"",boxShadow:l?.fill?`-1px 0 0 0 ${l.fill}`:"",color:l?.textColor||""}));return(d,h)=>{var f;return z(),se("label",{class:J([v(n).b("button"),v(n).is("active",v(a)===v(c)),v(n).is("disabled",v(o)),v(n).is("focus",v(s)),v(n).bm("button",v(r))])},[_n(U("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h[0]||(h[0]=p=>Li(a)?a.value=p:null),class:J(v(n).be("button","original-radio")),value:v(c),type:"radio",name:d.name||((f=v(l))==null?void 0:f.name),disabled:v(o),onFocus:h[1]||(h[1]=p=>s.value=!0),onBlur:h[2]||(h[2]=p=>s.value=!1),onClick:h[3]||(h[3]=un(()=>{},["stop"]))},null,42,kge),[[kA,v(a)]]),U("span",{class:J(v(n).be("button","inner")),style:Ht(v(a)===v(c)?u.value:{}),onKeydown:h[4]||(h[4]=un(()=>{},["stop"]))},[Ue(d.$slots,"default",{},()=>[cn(Xe(d.label),1)])],38)],2)}}});var Ck=xt(Pge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-button.vue"]]);const Lge=_t({id:{type:String,default:void 0},size:or,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:Re(Array)},props:{type:Re(Object),default:()=>sz},type:{type:String,values:["radio","button"],default:"radio"},...To(["ariaLabel"])}),Ige=ez,sz={label:"label",value:"value",disabled:"disabled"},Rge=["id","aria-label","aria-labelledby"],Oge=Be({name:"ElRadioGroup",__name:"radio-group",props:Lge,emits:Ige,setup(t,{emit:e}){const n=t,i=e,s=ht("radio"),r=jr(),o=X(),{formItem:a}=zr(),{inputId:l,isLabeledByFormItem:c}=Ba(n,{formItemContext:a}),u=m=>{i(wn,m),Nt(()=>i(Wn,m))};mn(()=>{const m=o.value.querySelectorAll("[type=radio]"),b=m[0];!Array.from(m).some(g=>g.checked)&&b&&(b.tabIndex=0)});const d=F(()=>n.name||r.value),h=F(()=>({...sz,...n.props})),f=m=>{const{label:b,value:g,disabled:x}=h.value,S={label:m[b],value:m[g],disabled:m[x]};return{...Vy(m,[b,g,x]),...S}},p=F(()=>n.type==="button"?Ck:iz);return Xn(tz,ni({...hr(n),changeEvent:u,name:d})),We(()=>n.modelValue,(m,b)=>{n.validateEvent&&!Ms(m,b)&&a?.validate("change").catch(g=>void 0)}),(m,b)=>(z(),se("div",{id:v(l),ref_key:"radioGroupRef",ref:o,class:J(v(s).b("group")),role:"radiogroup","aria-label":v(c)?void 0:m.ariaLabel||"radio-group","aria-labelledby":v(c)?v(a).labelId:void 0},[Ue(m.$slots,"default",{},()=>[(z(!0),se(At,null,yn(m.options,(g,x)=>(z(),De(Sn(p.value),Dn({key:x},{ref_for:!0},f(g)),null,16))),128))])],10,Rge))}});var rz=xt(Oge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/radio/src/radio-group.vue"]]);const oz=En(iz,{RadioButton:Ck,RadioGroup:rz}),Dge=Ss(rz),Nge=Ss(Ck),Dx=Symbol();function Bge(t){return!!(pt(t)?t.every(({type:e})=>e===Hs):t?.type===Hs)}var Fge=Be({name:"NodeContent",props:{node:{type:Object,required:!0}},setup(t){const e=ht("cascader-node"),{renderLabelFn:n}=zt(Dx),{node:i}=t,{data:s,label:r}=i,o=()=>{const a=n?.({node:i,data:s});return Bge(a)?r:a??r};return()=>de("span",{class:e.e("label")},[o()])}});const zge=["id","aria-haspopup","aria-owns","aria-expanded","tabindex"],Uge=Be({name:"ElCascaderNode",__name:"node",props:{node:{type:Object,required:!0},menuId:String},emits:["expand"],setup(t,{emit:e}){const n=t,i=e,s=zt(Dx),r=ht("cascader-node"),o=F(()=>s.isHoverMenu),a=F(()=>s.config.multiple),l=F(()=>s.config.checkStrictly),c=F(()=>s.config.showPrefix),u=F(()=>{var P;return(P=s.checkedNodes[0])==null?void 0:P.uid}),d=F(()=>n.node.isDisabled),h=F(()=>n.node.isLeaf),f=F(()=>l.value&&!h.value||!d.value),p=F(()=>b(s.expandingNode)),m=F(()=>l.value&&s.checkedNodes.some(b)),b=P=>{var k;const{level:B,uid:R}=n.node;return((k=P?.pathNodes[B-1])==null?void 0:k.uid)===R},g=()=>{p.value||s.expandNode(n.node)},x=P=>{const{node:k}=n;P!==k.checked&&s.handleCheckChange(k,P)},S=()=>{s.lazyLoad(n.node,()=>{h.value||g()})},_=P=>{o.value&&(E(),!h.value&&i("expand",P))},E=()=>{const{node:P}=n;!f.value||P.loading||(P.loaded?g():S())},T=()=>{h.value&&!d.value&&!l.value&&!a.value?I(!0):(s.config.checkOnClickNode&&(a.value||l.value)||h.value&&s.config.checkOnClickLeaf)&&!d.value?A(!n.node.checked):o.value||E()},A=P=>{l.value?(x(P),n.node.loaded&&g()):I(P)},I=P=>{n.node.loaded?(x(P),!l.value&&g()):S()};return(P,k)=>(z(),se("li",{id:`${t.menuId}-${t.node.uid}`,role:"menuitem","aria-haspopup":!h.value,"aria-owns":h.value?void 0:t.menuId,"aria-expanded":p.value,tabindex:f.value?-1:void 0,class:J([v(r).b(),v(r).is("selectable",l.value),v(r).is("active",t.node.checked),v(r).is("disabled",!f.value),p.value&&"in-active-path",m.value&&"in-checked-path"]),onMouseenter:_,onFocus:_,onClick:T},[Le(" prefix "),a.value&&c.value?(z(),De(v(Gl),{key:0,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:d.value,onClick:k[0]||(k[0]=un(()=>{},["stop"])),"onUpdate:modelValue":A},null,8,["model-value","indeterminate","disabled"])):l.value&&c.value?(z(),De(v(oz),{key:1,"model-value":u.value,label:t.node.uid,disabled:d.value,"onUpdate:modelValue":A,onClick:k[1]||(k[1]=un(()=>{},["stop"]))},{default:xe(()=>[Le(` Add an empty element to avoid render label, do not use empty fragment here for https://github.com/vuejs/vue-next/pull/2485 `),k[2]||(k[2]=U("span",null,null,-1))]),_:1},8,["model-value","label","disabled"])):h.value&&t.node.checked?(z(),De(v(Ut),{key:2,class:J(v(r).e("prefix"))},{default:xe(()=>[de(v(Yy))]),_:1},8,["class"])):Le("v-if",!0),Le(" content "),de(v(Fge),{node:t.node},null,8,["node"]),Le(" postfix "),h.value?Le("v-if",!0):(z(),se(At,{key:3},[t.node.loading?(z(),De(v(Ut),{key:0,class:J([v(r).is("loading"),v(r).e("postfix")])},{default:xe(()=>[de(v(jc))]),_:1},8,["class"])):(z(),De(v(Ut),{key:1,class:J(["arrow-right",v(r).e("postfix")])},{default:xe(()=>[de(v(So))]),_:1},8,["class"]))],64))],42,zge))}});var $ge=xt(Uge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/node.vue"]]);const Vge=Be({name:"ElCascaderMenu",__name:"menu",props:{nodes:{type:Array,required:!0},index:{type:Number,required:!0}},setup(t){const e=t,n=xn(),i=ht("cascader-menu"),{t:s}=Jn(),r=jr();let o,a;const l=zt(Dx),c=X(),u=F(()=>!e.nodes.length),d=F(()=>!l.initialLoaded),h=F(()=>`${r.value}-${e.index}`),f=g=>{o=g.target},p=g=>{var x;if(!(!l.isHoverMenu||!o||!c.value))if(o.contains(g.target)){m();const S=n.vnode.el,{left:_}=S.getBoundingClientRect(),{offsetWidth:E,offsetHeight:T}=S,A=g.clientX-_,I=o.offsetTop,P=I+o.offsetHeight,k=((x=S.querySelector(`.${i.e("wrap")}`))==null?void 0:x.scrollTop)||0;c.value.innerHTML=` `}else a||(a=window.setTimeout(b,l.config.hoverThreshold))},m=()=>{a&&(clearTimeout(a),a=void 0)},b=()=>{c.value&&(c.value.innerHTML="",m())};return(g,x)=>(z(),De(v(Wl),{key:h.value,tag:"ul",role:"menu",class:J(v(i).b()),"wrap-class":v(i).e("wrap"),"view-class":[v(i).e("list"),v(i).is("empty",u.value)],onMousemove:p,onMouseleave:b},{default:xe(()=>{var S;return[(z(!0),se(At,null,yn(t.nodes,_=>(z(),De($ge,{key:_.uid,node:_,"menu-id":h.value,onExpand:f},null,8,["node","menu-id"]))),128)),d.value?(z(),se("div",{key:0,class:J(v(i).e("empty-text"))},[de(v(Ut),{size:"14",class:J(v(i).is("loading"))},{default:xe(()=>[de(v(jc))]),_:1},8,["class"]),cn(" "+Xe(v(s)("el.cascader.loading")),1)],2)):u.value?(z(),se("div",{key:1,class:J(v(i).e("empty-text"))},[Ue(g.$slots,"empty",{},()=>[cn(Xe(v(s)("el.cascader.noData")),1)])],2)):(S=v(l))!=null&&S.isHoverMenu?(z(),se(At,{key:2},[Le(" eslint-disable-next-line vue/html-self-closing "),(z(),se("svg",{ref_key:"hoverZone",ref:c,class:J(v(i).e("hover-zone"))},null,2))],2112)):Le("v-if",!0)]}),_:3},8,["class","wrap-class","view-class"]))}});var Hge=xt(Vge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/menu.vue"]]);let Wge=0;const Gge=t=>{const e=[t];let{parent:n}=t;for(;n;)e.unshift(n),n=n.parent;return e};let DT=class NT{constructor(e,n,i,s=!1){this.data=e,this.config=n,this.parent=i,this.root=s,this.uid=Wge++,this.checked=!1,this.indeterminate=!1,this.loading=!1;const{value:r,label:o,children:a}=n,l=e[a],c=Gge(this);this.level=s?0:i?i.level+1:1,this.value=e[r],this.label=e[o],this.pathNodes=c,this.pathValues=c.map(u=>u.value),this.pathLabels=c.map(u=>u.label),this.childrenData=l,this.children=(l||[]).map(u=>new NT(u,n,this)),this.loaded=!n.lazy||this.isLeaf||!Go(l),this.text=""}get isDisabled(){const{data:e,parent:n,config:i}=this,{disabled:s,checkStrictly:r}=i;return(Kt(s)?s(e,this):!!e[s])||!r&&!!n?.isDisabled}get isLeaf(){const{data:e,config:n,childrenData:i,loaded:s}=this,{lazy:r,leaf:o}=n,a=Kt(o)?o(e,this):e[o];return ri(a)?r&&!s?!1:!(pt(i)&&i.length):!!a}get valueByOption(){return this.config.emitPath?this.pathValues:this.value}appendChild(e){const{childrenData:n,children:i}=this,s=new NT(e,this.config,this);return pt(n)?n.push(e):this.childrenData=[e],i.push(s),s}calcText(e,n){const i=e?this.pathLabels.join(n):this.label;return this.text=i,i}broadcast(e){this.children.forEach(n=>{var i;n&&(n.broadcast(e),(i=n.onParentCheck)==null||i.call(n,e))})}emit(){var e;const{parent:n}=this;n&&((e=n.onChildCheck)==null||e.call(n),n.emit())}onParentCheck(e){this.isDisabled||this.setCheckState(e)}onChildCheck(){const{children:e}=this,n=e.filter(s=>!s.isDisabled),i=n.length?n.every(s=>s.checked):!1;this.setCheckState(i)}setCheckState(e){const n=this.children.length,i=this.children.reduce((s,r)=>{const o=r.checked?1:r.indeterminate?.5:0;return s+o},0);this.checked=this.loaded&&this.children.filter(s=>!s.isDisabled).every(s=>s.loaded&&s.checked)&&e,this.indeterminate=this.loaded&&i!==n&&i>0}doCheck(e){if(this.checked===e)return;const{checkStrictly:n,multiple:i}=this.config;n||!i?this.checked=e:(this.broadcast(e),this.setCheckState(e),this.emit())}};const BT=(t,e)=>t.reduce((n,i)=>(i.isLeaf?n.push(i):(!e&&n.push(i),n=n.concat(BT(i.children,e))),n),[]);class J8{constructor(e,n){this.config=n;const i=(e||[]).map(s=>new DT(s,this.config));this.nodes=i,this.allNodes=BT(i,!1),this.leafNodes=BT(i,!0)}getNodes(){return this.nodes}getFlattedNodes(e){return e?this.leafNodes:this.allNodes}appendNode(e,n){const i=n?n.appendChild(e):new DT(e,this.config);n||this.nodes.push(i),this.appendAllNodesAndLeafNodes(i)}appendNodes(e,n){e.length>0?e.forEach(i=>this.appendNode(i,n)):n&&n.isLeaf&&this.leafNodes.push(n)}appendAllNodesAndLeafNodes(e){this.allNodes.push(e),e.isLeaf&&this.leafNodes.push(e),e.children&&e.children.forEach(n=>{this.appendAllNodesAndLeafNodes(n)})}getNodeByValue(e,n=!1){return ua(e)?null:this.getFlattedNodes(n).find(s=>Ms(s.value,e)||Ms(s.pathValues,e))||null}getSameNode(e){return e&&this.getFlattedNodes(!1).find(({value:i,level:s})=>Ms(e.value,i)&&e.level===s)||null}}const az=_t({modelValue:{type:Re([Number,String,Array,Object])},options:{type:Re(Array),default:()=>[]},props:{type:Re(Object),default:()=>({})}}),jge={expandTrigger:"click",multiple:!1,checkStrictly:!1,emitPath:!0,lazy:!1,lazyLoad:_i,value:"value",label:"label",children:"children",leaf:"leaf",disabled:"disabled",hoverThreshold:500,checkOnClickNode:!1,checkOnClickLeaf:!0,showPrefix:!0},Kge=_t({...az,border:{type:Boolean,default:!0},renderLabel:{type:Function}}),Q8=t=>!0,qge={[wn]:Q8,[Wn]:Q8,close:()=>!0,"expand-change":t=>t},Yge=t=>F(()=>({...jge,...t.props})),e6=t=>{if(!t)return 0;const e=t.id.split("-");return Number(e[e.length-2])},Xge=t=>{if(!t)return;const e=t.querySelector("input");e?e.click():o7(t)&&t.click()},Zge=(t,e)=>{const n=e.slice(0),i=n.map(r=>r.uid),s=t.reduce((r,o)=>{const a=i.indexOf(o.uid);return a>-1&&(r.push(o),n.splice(a,1),i.splice(a,1)),r},[]);return s.push(...n),s},Jge=Be({name:"ElCascaderPanel",__name:"index",props:Kge,emits:qge,setup(t,{expose:e,emit:n}){const i=t,s=n;let r=!1;const o=ht("cascader"),a=Yge(i),l=tr();let c;const u=X(!0),d=X(!1),h=X([]),f=X(),p=X([]),m=X(),b=X([]),g=F(()=>a.value.expandTrigger==="hover"),x=F(()=>i.renderLabel||l.default),S=()=>{const{options:V}=i,D=a.value;r=!1,c=new J8(V,D),p.value=[c.getNodes()],D.lazy&&Go(i.options)?(u.value=!1,_(void 0,K=>{K&&(c=new J8(K,D),p.value=[c.getNodes()]),u.value=!0,R(!1,!0)})):R(!1,!0)},_=(V,D)=>{const K=a.value;V=V||new DT({},K,void 0,!0),V.loading=!0;const W=ie=>{const ne=V,ce=ne.root?null:ne;ne.loading=!1,ne.loaded=!0,ne.childrenData=ne.childrenData||[],ie&&c?.appendNodes(ie,ce),ie&&D?.(ie),V.level===0&&(d.value=!0)},Q=()=>{V.loading=!1,V.loaded=!1,V.level===0&&(u.value=!0)};K.lazyLoad(V,W,Q)},E=(V,D)=>{var K;const{level:W}=V,Q=p.value.slice(0,W);let ie;V.isLeaf?ie=V.pathNodes[W-2]:(ie=V,Q.push(V.children)),((K=m.value)==null?void 0:K.uid)!==ie?.uid&&(m.value=V,p.value=Q,!D&&s("expand-change",V?.pathValues||[]))},T=(V,D,K=!0)=>{const{checkStrictly:W,multiple:Q}=a.value,ie=b.value[0];r=!0,!Q&&ie?.doCheck(!1),V.doCheck(D),B(),K&&!Q&&!W&&s("close"),!K&&!Q&&A(V)},A=V=>{V&&(V=V.parent,A(V),V&&E(V))},I=V=>c?.getFlattedNodes(V),P=V=>{var D;return(D=I(V))==null?void 0:D.filter(({checked:K})=>K!==!1)},k=()=>{b.value.forEach(V=>V.doCheck(!1)),B(),p.value=p.value.slice(0,1),m.value=void 0,s("expand-change",[])},B=()=>{var V;const{checkStrictly:D,multiple:K}=a.value,W=b.value,Q=P(!D),ie=Zge(W,Q),ne=ie.map(ce=>ce.valueByOption);b.value=ie,f.value=K?ne:(V=ne[0])!=null?V:null},R=(V=!1,D=!1)=>{const{modelValue:K}=i,{lazy:W,multiple:Q,checkStrictly:ie}=a.value,ne=!ie;if(!(!u.value||r||!D&&Ms(K,f.value)))if(W&&!V){const ae=F8(_ce(bo(K))).map(_e=>c?.getNodeByValue(_e)).filter(_e=>!!_e&&!_e.loaded&&!_e.loading);ae.length?ae.forEach(_e=>{_(_e,()=>R(!1,D))}):R(!0,D)}else{const ce=Q?bo(K):[K],ae=F8(ce.map(_e=>c?.getNodeByValue(_e,ne)));H(ae,D),f.value=Zw(K??void 0)}},H=(V,D=!0)=>{const{checkStrictly:K}=a.value,W=b.value,Q=V.filter(ce=>!!ce&&(K||ce.isLeaf)),ie=c?.getSameNode(m.value),ne=D&&ie||Q[0];ne?ne.pathNodes.forEach(ce=>E(ce,!0)):m.value=void 0,W.forEach(ce=>ce.doCheck(!1)),ni(Q).forEach(ce=>ce.doCheck(!0)),b.value=Q,Nt(q)},q=()=>{pi&&h.value.forEach(V=>{const D=V?.$el;if(D){const K=D.querySelector(`.${o.namespace.value}-scrollbar__wrap`),W=D.querySelector(`.${o.b("node")}.${o.is("active")}:last-child`)||D.querySelector(`.${o.b("node")}.in-active-path`);ik(K,W)}})},oe=V=>{const D=V.target,K=Oi(V);switch(K){case gt.up:case gt.down:{V.preventDefault();const W=K===gt.up?-1:1;V_(a7(D,W,`.${o.b("node")}[tabindex="-1"]`));break}case gt.left:{V.preventDefault();const W=h.value[e6(D)-1],Q=W?.$el.querySelector(`.${o.b("node")}[aria-expanded="true"]`);V_(Q);break}case gt.right:{V.preventDefault();const W=h.value[e6(D)+1],Q=W?.$el.querySelector(`.${o.b("node")}[tabindex="-1"]`);V_(Q);break}case gt.enter:case gt.numpadEnter:Xge(D);break}};Xn(Dx,ni({config:a,expandingNode:m,checkedNodes:b,isHoverMenu:g,initialLoaded:u,renderLabelFn:x,lazyLoad:_,expandNode:E,handleCheckChange:T})),We(a,(V,D)=>{Ms(V,D)||S()},{immediate:!0}),We(()=>i.options,S,{deep:!0}),We(()=>i.modelValue,()=>{r=!1,R()},{deep:!0}),We(()=>f.value,V=>{Ms(V,i.modelValue)||(s(wn,V),s(Wn,V))});const Z=()=>{d.value||S()};return lx(()=>h.value=[]),mn(()=>!Go(i.modelValue)&&R()),e({menuList:h,menus:p,checkedNodes:b,handleKeyDown:oe,handleCheckChange:T,getFlattedNodes:I,getCheckedNodes:P,clearCheckedNodes:k,calculateCheckedValue:B,scrollToExpandingNode:q,loadLazyRootNodes:Z}),(V,D)=>(z(),se("div",{class:J([v(o).b("panel"),v(o).is("bordered",V.border)]),onKeydown:oe},[(z(!0),se(At,null,yn(p.value,(K,W)=>(z(),De(Hge,{key:W,ref_for:!0,ref:Q=>h.value[W]=Q,index:W,nodes:[...K]},{empty:xe(()=>[Ue(V.$slots,"empty")]),_:3},8,["index","nodes"]))),128))],34))}});var Qge=xt(Jge,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader-panel/src/index.vue"]]);const lz=En(Qge),rd=_t({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Qc},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),eve={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},tve=["aria-label"],nve=["aria-label"],ive=Be({name:"ElTag",__name:"tag",props:rd,emits:eve,setup(t,{emit:e}){const n=t,i=e,s=er(),{t:r}=Jn(),o=ht("tag"),a=F(()=>{const{type:d,hit:h,effect:f,closable:p,round:m}=n;return[o.b(),o.is("closable",p),o.m(d||"primary"),o.m(s.value),o.m(f),o.is("hit",h),o.is("round",m)]}),l=d=>{i("close",d)},c=d=>{i("click",d)},u=d=>{var h,f,p;(p=(f=(h=d?.component)==null?void 0:h.subTree)==null?void 0:f.component)!=null&&p.bum&&(d.component.subTree.component.bum=null)};return(d,h)=>d.disableTransitions?(z(),se("span",{key:0,class:J(a.value),style:Ht({backgroundColor:d.color}),onClick:c},[U("span",{class:J(v(o).e("content"))},[Ue(d.$slots,"default")],2),d.closable?(z(),se("button",{key:0,"aria-label":v(r)("el.tag.close"),class:J(v(o).e("close")),type:"button",onClick:un(l,["stop"])},[de(v(Ut),null,{default:xe(()=>[de(v(ul))]),_:1})],10,tve)):Le("v-if",!0)],6)):(z(),De(Rr,{key:1,name:`${v(o).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:xe(()=>[U("span",{class:J(a.value),style:Ht({backgroundColor:d.color}),onClick:c},[U("span",{class:J(v(o).e("content"))},[Ue(d.$slots,"default")],2),d.closable?(z(),se("button",{key:0,"aria-label":v(r)("el.tag.close"),class:J(v(o).e("close")),type:"button",onClick:un(l,["stop"])},[de(v(Ut),null,{default:xe(()=>[de(v(ul))]),_:1})],10,nve)):Le("v-if",!0)],6)]),_:3},8,["name"]))}});var sve=xt(ive,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);const ju=En(sve),rve=_t({...az,size:or,placeholder:String,disabled:{type:Boolean,default:void 0},clearable:Boolean,clearIcon:{type:Ai,default:pd},filterable:Boolean,filterMethod:{type:Re(Function),default:(t,e)=>t.text.includes(e)},separator:{type:String,default:" / "},showAllLevels:{type:Boolean,default:!0},collapseTags:Boolean,maxCollapseTags:{type:Number,default:1},collapseTagsTooltip:Boolean,maxCollapseTagsTooltipHeight:{type:[String,Number]},debounce:{type:Number,default:300},beforeFilter:{type:Re(Function),default:()=>!0},placement:{type:Re(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:Re(Array),default:["bottom-start","bottom","top-start","top","right","left"]},popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,teleported:Ri.teleported,effect:{type:Re(String),default:"light"},tagType:{...rd.type,default:"info"},tagEffect:{...rd.effect,default:"light"},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},showCheckedStrategy:{type:String,values:["parent","child"],default:"child"},checkOnClickNode:Boolean,showPrefix:{type:Boolean,default:!0},...hp}),t6=t=>!0,ove={[wn]:t6,[Wn]:t6,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,visibleChange:t=>Mi(t),expandChange:t=>!!t,removeTag:t=>!!t},Hd=new Map;if(pi){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Hd.values())for(const{documentHandler:i}of n)i(e,t);t=void 0}})}function n6(t,e){let n=[];return pt(e.arg)?n=e.arg:ca(e.arg)&&n.push(e.arg),function(i,s){const r=e.instance.popperRef,o=i.target,a=s?.target,l=!e||!e.instance,c=!o||!a,u=t.contains(o)||t.contains(a),d=t===o,h=n.length&&n.some(p=>p?.contains(o))||n.length&&n.includes(a),f=r&&(r.contains(o)||r.contains(a));l||c||u||d||h||f||e.value(i,s)}}const Ch={beforeMount(t,e){Hd.has(t)||Hd.set(t,[]),Hd.get(t).push({documentHandler:n6(t,e),bindingFn:e.value})},updated(t,e){Hd.has(t)||Hd.set(t,[]);const n=Hd.get(t),i=n.findIndex(r=>r.bindingFn===e.oldValue),s={documentHandler:n6(t,e),bindingFn:e.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(t){Hd.delete(t)}},ave=["placeholder"],lve=["onClick"],cve=Be({name:"ElCascader",__name:"cascader",props:rve,emits:ove,setup(t,{expose:e,emit:n}){const i={modifiers:[{name:"arrowPosition",enabled:!0,phase:"main",fn:({state:Ne})=>{const{modifiersData:et,placement:ut}=Ne;["right","left","bottom","top"].includes(ut)||et.arrow&&(et.arrow.x=35)},requires:["arrow"]}]},s=t,r=n,o=ld();let a=0,l=0;const c=ht("cascader"),u=ht("input"),{t:d}=Jn(),{formItem:h}=zr(),f=Es(),{valueOnClear:p}=Ky(s),{isComposing:m,handleComposition:b}=Jy({afterComposition(Ne){var et;const ut=(et=Ne.target)==null?void 0:et.value;qe(ut)}}),g=X(),x=X(),S=X(),_=X(),E=X(),T=X(),A=X(!1),I=X(!1),P=X(!1),k=X(""),B=X(""),R=X([]),H=X([]),q=F(()=>s.props.multiple?s.collapseTags?R.value.slice(0,s.maxCollapseTags):R.value:[]),oe=F(()=>s.props.multiple?s.collapseTags?R.value.slice(s.maxCollapseTags):[]:[]),Z=F(()=>o.style),V=F(()=>{var Ne;return(Ne=s.placeholder)!=null?Ne:d("el.cascader.placeholder")}),D=F(()=>B.value||R.value.length>0||m.value?"":V.value),K=er(),W=F(()=>K.value==="small"?"small":"default"),Q=F(()=>!!s.props.multiple),ie=F(()=>!s.filterable||Q.value),ne=F(()=>Q.value?B.value:k.value),ce=F(()=>{var Ne;return((Ne=E.value)==null?void 0:Ne.checkedNodes)||[]}),{wrapperRef:ae,isFocused:_e,handleBlur:ke}=md(S,{disabled:f,beforeBlur(Ne){var et,ut;return((et=g.value)==null?void 0:et.isFocusInsideContent(Ne))||((ut=x.value)==null?void 0:ut.isFocusInsideContent(Ne))},afterBlur(){var Ne;s.validateEvent&&((Ne=h?.validate)==null||Ne.call(h,"blur").catch(et=>void 0))}}),Te=F(()=>!s.clearable||f.value||P.value||!I.value&&!_e.value?!1:!!ce.value.length),Ke=F(()=>{const{showAllLevels:Ne,separator:et}=s,ut=ce.value;return ut.length?Q.value?"":ut[0].calcText(Ne,et):""}),Fe=F(()=>h?.validateState||""),ve=F({get(){return Zw(s.modelValue)},set(Ne){const et=Ne??p.value;r(wn,et),r(Wn,et),s.validateEvent&&h?.validate("change").catch(ut=>void 0)}}),fe=F(()=>[c.b(),c.m(K.value),c.is("disabled",f.value),o.class]),Me=F(()=>[u.e("icon"),"icon-arrow-down",c.is("reverse",A.value)]),ge=F(()=>c.is("focus",_e.value)),Qe=F(()=>{var Ne,et;return(et=(Ne=g.value)==null?void 0:Ne.popperRef)==null?void 0:et.contentRef}),G=Ne=>{if(_e.value){const et=new FocusEvent("blur",Ne);ke(et)}ee(!1)},ee=Ne=>{var et,ut;f.value||(Ne=Ne??!A.value,Ne!==A.value&&(A.value=Ne,(ut=(et=S.value)==null?void 0:et.input)==null||ut.setAttribute("aria-expanded",`${Ne}`),Ne?(j(),E.value&&Nt(E.value.scrollToExpandingNode)):s.filterable&&at(),r("visibleChange",Ne)))},j=()=>{Nt(()=>{var Ne;(Ne=g.value)==null||Ne.updatePopper()})},he=()=>{P.value=!1},be=Ne=>{const{showAllLevels:et,separator:ut}=s;return{node:Ne,key:Ne.uid,text:Ne.calcText(et,ut),hitState:!1,closable:!f.value&&!Ne.isDisabled}},re=Ne=>{var et;const ut=Ne.node;ut.doCheck(!1),(et=E.value)==null||et.calculateCheckedValue(),r("removeTag",ut.valueByOption)},le=()=>{switch(s.showCheckedStrategy){case"child":return ce.value;case"parent":{const Ne=$e(!1),et=Ne.map(Qt=>Qt.value);return Ne.filter(Qt=>!Qt.parent||!et.includes(Qt.parent.value))}default:return[]}},Ce=()=>{if(!Q.value)return;const Ne=le(),et=[];Ne.forEach(ut=>et.push(be(ut))),R.value=et},Ee=()=>{var Ne,et;const{filterMethod:ut,showAllLevels:Qt,separator:Cn}=s,ei=(et=(Ne=E.value)==null?void 0:Ne.getFlattedNodes(!s.props.checkStrictly))==null?void 0:et.filter(Tt=>Tt.isDisabled?!1:(Tt.calcText(Qt,Cn),ut(Tt,ne.value)));Q.value&&R.value.forEach(Tt=>{Tt.hitState=!1}),P.value=!0,H.value=ei,j()},Oe=()=>{var Ne;let et;P.value&&T.value?et=T.value.$el.querySelector(`.${c.e("suggestion-item")}`):et=(Ne=E.value)==null?void 0:Ne.$el.querySelector(`.${c.b("node")}[tabindex="-1"]`),et&&(et.focus(),!P.value&&et.click())},Ge=()=>{var Ne,et;const ut=(Ne=S.value)==null?void 0:Ne.input,Qt=_.value,Cn=(et=T.value)==null?void 0:et.$el;if(!(!pi||!ut)){if(Cn){const ei=Cn.querySelector(`.${c.e("suggestion-list")}`);ei.style.minWidth=`${ut.offsetWidth}px`}if(Qt){const{offsetHeight:ei}=Qt,Tt=R.value.length>0?`${Math.max(ei,a)-2}px`:`${a}px`;ut.style.height=Tt,j()}}},$e=Ne=>{var et;return(et=E.value)==null?void 0:et.getCheckedNodes(Ne)},ot=Ne=>{j(),r("expandChange",Ne)},dt=Ne=>{if(m.value)return;switch(Oi(Ne)){case gt.enter:case gt.numpadEnter:ee();break;case gt.down:ee(!0),Nt(Oe),Ne.preventDefault();break;case gt.esc:A.value===!0&&(Ne.preventDefault(),Ne.stopPropagation(),ee(!1));break;case gt.tab:ee(!1);break}},Jt=()=>{var Ne;(Ne=E.value)==null||Ne.clearCheckedNodes(),!A.value&&s.filterable&&at(),ee(!1),r("clear")},at=()=>{const{value:Ne}=Ke;k.value=Ne,B.value=Ne},Mt=Ne=>{var et,ut;const{checked:Qt}=Ne;Q.value?(et=E.value)==null||et.handleCheckChange(Ne,!Qt,!1):(!Qt&&((ut=E.value)==null||ut.handleCheckChange(Ne,!0,!1)),ee(!1))},Bt=Ne=>{const et=Ne.target,ut=Oi(Ne);switch(ut){case gt.up:case gt.down:{Ne.preventDefault();const Qt=ut===gt.up?-1:1;V_(a7(et,Qt,`.${c.e("suggestion-item")}[tabindex="-1"]`));break}case gt.enter:case gt.numpadEnter:et.click();break}},$t=()=>{const Ne=R.value[R.value.length-1];l=B.value?0:l+1,!(!Ne||!l||s.collapseTags&&R.value.length>1)&&(Ne.hitState?re(Ne):Ne.hitState=!0)},Ze=F(()=>s.debounce),vt=Wy(()=>{const{value:Ne}=ne;if(!Ne)return;const et=s.beforeFilter(Ne);Vf(et)?et.then(Ee).catch(()=>{}):et!==!1?Ee():he()},Ze),qe=(Ne,et)=>{!A.value&&ee(!0),!et?.isComposing&&(Ne?vt():he())},kt=Ne=>Number.parseFloat(Jce(u.cssVarName("input-height"),Ne).value)-2,Je=()=>{var Ne;(Ne=S.value)==null||Ne.focus()},Ft=()=>{var Ne;(Ne=S.value)==null||Ne.blur()};return We(P,j),We([ce,f,()=>s.collapseTags,()=>s.maxCollapseTags],Ce),We(R,()=>{Nt(()=>Ge())}),We(K,async()=>{await Nt();const Ne=S.value.input;a=kt(Ne)||a,Ge()}),We(Ke,at,{immediate:!0}),We(()=>A.value,Ne=>{var et;Ne&&s.props.lazy&&s.props.lazyLoad&&((et=E.value)==null||et.loadLazyRootNodes())}),mn(()=>{const Ne=S.value.input,et=kt(Ne);a=Ne.offsetHeight||et,as(Ne,Ge)}),e({getCheckedNodes:$e,cascaderPanelRef:E,togglePopperVisible:ee,contentRef:Qe,presentText:Ke,focus:Je,blur:Ft}),(Ne,et)=>(z(),De(v(Or),{ref_key:"tooltipRef",ref:g,visible:A.value,teleported:Ne.teleported,"popper-class":[v(c).e("dropdown"),Ne.popperClass],"popper-style":Ne.popperStyle,"popper-options":i,"fallback-placements":Ne.fallbackPlacements,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,placement:Ne.placement,transition:`${v(c).namespace.value}-zoom-in-top`,effect:Ne.effect,pure:"",persistent:Ne.persistent,onHide:he},{default:xe(()=>[_n((z(),se("div",{ref_key:"wrapperRef",ref:ae,class:J(fe.value),style:Ht(Z.value),onClick:et[8]||(et[8]=()=>ee(ie.value?void 0:!0)),onKeydown:dt,onMouseenter:et[9]||(et[9]=ut=>I.value=!0),onMouseleave:et[10]||(et[10]=ut=>I.value=!1)},[de(v(wo),{ref_key:"inputRef",ref:S,modelValue:k.value,"onUpdate:modelValue":et[1]||(et[1]=ut=>k.value=ut),placeholder:D.value,readonly:ie.value,disabled:v(f),"validate-event":!1,size:v(K),class:J(ge.value),tabindex:Q.value&&Ne.filterable&&!v(f)?-1:void 0,onCompositionstart:v(b),onCompositionupdate:v(b),onCompositionend:v(b),onInput:qe},va({suffix:xe(()=>[Te.value?(z(),De(v(Ut),{key:"clear",class:J([v(u).e("icon"),"icon-circle-close"]),onClick:un(Jt,["stop"])},{default:xe(()=>[(z(),De(Sn(Ne.clearIcon)))]),_:1},8,["class"])):(z(),De(v(Ut),{key:"arrow-down",class:J(Me.value),onClick:et[0]||(et[0]=un(ut=>ee(),["stop"]))},{default:xe(()=>[de(v(eu))]),_:1},8,["class"]))]),_:2},[Ne.$slots.prefix?{name:"prefix",fn:xe(()=>[Ue(Ne.$slots,"prefix")]),key:"0"}:void 0]),1032,["modelValue","placeholder","readonly","disabled","size","class","tabindex","onCompositionstart","onCompositionupdate","onCompositionend"]),Q.value?(z(),se("div",{key:0,ref_key:"tagWrapper",ref:_,class:J([v(c).e("tags"),v(c).is("validate",!!Fe.value)])},[Ue(Ne.$slots,"tag",{data:R.value,deleteTag:re},()=>[(z(!0),se(At,null,yn(q.value,ut=>(z(),De(v(ju),{key:ut.key,type:Ne.tagType,size:W.value,effect:Ne.tagEffect,hit:ut.hitState,closable:ut.closable,"disable-transitions":"",onClose:Qt=>re(ut)},{default:xe(()=>[U("span",null,Xe(ut.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))),128))]),Ne.collapseTags&&R.value.length>Ne.maxCollapseTags?(z(),De(v(Or),{key:0,ref_key:"tagTooltipRef",ref:x,disabled:A.value||!Ne.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],placement:"bottom","popper-class":Ne.popperClass,"popper-style":Ne.popperStyle,effect:Ne.effect,persistent:Ne.persistent},{default:xe(()=>[de(v(ju),{closable:!1,size:W.value,type:Ne.tagType,effect:Ne.tagEffect,"disable-transitions":""},{default:xe(()=>[U("span",{class:J(v(c).e("tags-text"))}," + "+Xe(R.value.length-Ne.maxCollapseTags),3)]),_:1},8,["size","type","effect"])]),content:xe(()=>[de(v(Wl),{"max-height":Ne.maxCollapseTagsTooltipHeight},{default:xe(()=>[U("div",{class:J(v(c).e("collapse-tags"))},[(z(!0),se(At,null,yn(oe.value,(ut,Qt)=>(z(),se("div",{key:Qt,class:J(v(c).e("collapse-tag"))},[(z(),De(v(ju),{key:ut.key,class:"in-tooltip",type:Ne.tagType,size:W.value,effect:Ne.tagEffect,hit:ut.hitState,closable:ut.closable,"disable-transitions":"",onClose:Cn=>re(ut)},{default:xe(()=>[U("span",null,Xe(ut.text),1)]),_:2},1032,["type","size","effect","hit","closable","onClose"]))],2))),128))],2)]),_:1},8,["max-height"])]),_:1},8,["disabled","popper-class","popper-style","effect","persistent"])):Le("v-if",!0),Ne.filterable&&!v(f)?_n((z(),se("input",{key:1,"onUpdate:modelValue":et[2]||(et[2]=ut=>B.value=ut),type:"text",class:J(v(c).e("search-input")),placeholder:Ke.value?"":V.value,onInput:et[3]||(et[3]=ut=>qe(B.value,ut)),onClick:et[4]||(et[4]=un(ut=>ee(!0),["stop"])),onKeydown:_s($t,["delete"]),onCompositionstart:et[5]||(et[5]=(...ut)=>v(b)&&v(b)(...ut)),onCompositionupdate:et[6]||(et[6]=(...ut)=>v(b)&&v(b)(...ut)),onCompositionend:et[7]||(et[7]=(...ut)=>v(b)&&v(b)(...ut))},null,42,ave)),[[Mc,B.value]]):Le("v-if",!0)],2)):Le("v-if",!0)],38)),[[v(Ch),G,Qe.value]])]),content:xe(()=>[Ne.$slots.header?(z(),se("div",{key:0,class:J(v(c).e("header")),onClick:et[11]||(et[11]=un(()=>{},["stop"]))},[Ue(Ne.$slots,"header")],2)):Le("v-if",!0),_n(de(v(lz),{ref_key:"cascaderPanelRef",ref:E,modelValue:ve.value,"onUpdate:modelValue":et[12]||(et[12]=ut=>ve.value=ut),options:Ne.options,props:s.props,border:!1,"render-label":Ne.$slots.default,onExpandChange:ot,onClose:et[13]||(et[13]=ut=>Ne.$nextTick(()=>ee(!1)))},{empty:xe(()=>[Ue(Ne.$slots,"empty")]),_:3},8,["modelValue","options","props","render-label"]),[[ci,!P.value]]),Ne.filterable?_n((z(),De(v(Wl),{key:1,ref_key:"suggestionPanel",ref:T,tag:"ul",class:J(v(c).e("suggestion-panel")),"view-class":v(c).e("suggestion-list"),onKeydown:Bt},{default:xe(()=>[H.value.length?(z(!0),se(At,{key:0},yn(H.value,ut=>(z(),se("li",{key:ut.uid,class:J([v(c).e("suggestion-item"),v(c).is("checked",ut.checked)]),tabindex:-1,onClick:Qt=>Mt(ut)},[Ue(Ne.$slots,"suggestion-item",{item:ut},()=>[U("span",null,Xe(ut.text),1),ut.checked?(z(),De(v(Ut),{key:0},{default:xe(()=>[de(v(Yy))]),_:1})):Le("v-if",!0)])],10,lve))),128)):Ue(Ne.$slots,"empty",{key:1},()=>[U("li",{class:J(v(c).e("empty-text"))},Xe(v(d)("el.cascader.noMatch")),3)])]),_:3},8,["class","view-class"])),[[ci,P.value]]):Le("v-if",!0),Ne.$slots.footer?(z(),se("div",{key:2,class:J(v(c).e("footer")),onClick:et[14]||(et[14]=un(()=>{},["stop"]))},[Ue(Ne.$slots,"footer")],2)):Le("v-if",!0)]),_:3},8,["visible","teleported","popper-class","popper-style","fallback-placements","placement","transition","effect","persistent"]))}});var uve=xt(cve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/cascader/src/cascader.vue"]]);const dve=En(uve),hve=_t({checked:Boolean,disabled:Boolean,type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"}}),fve={"update:checked":t=>Mi(t),[Wn]:t=>Mi(t)},pve=Be({name:"ElCheckTag",__name:"check-tag",props:hve,emits:fve,setup(t,{emit:e}){const n=t,i=e,s=ht("check-tag"),r=F(()=>[s.b(),s.is("checked",n.checked),s.is("disabled",n.disabled),s.m(n.type||"primary")]),o=()=>{if(n.disabled)return;const a=!n.checked;i(Wn,a),i("update:checked",a)};return(a,l)=>(z(),se("span",{class:J(r.value),onClick:o},[Ue(a.$slots,"default")],2))}});var mve=xt(pve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/check-tag/src/check-tag.vue"]]);const gve=En(mve),vve=_t({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:Re([Number,Object]),default:()=>ws({})},sm:{type:Re([Number,Object]),default:()=>ws({})},md:{type:Re([Number,Object]),default:()=>ws({})},lg:{type:Re([Number,Object]),default:()=>ws({})},xl:{type:Re([Number,Object]),default:()=>ws({})}}),cz=Symbol("rowContextKey"),yve=Be({name:"ElCol",__name:"col",props:vve,setup(t){const e=t,{gutter:n}=zt(cz,{gutter:F(()=>0)}),i=ht("col"),s=F(()=>{const o={};return n.value&&(o.paddingLeft=o.paddingRight=`${n.value/2}px`),o}),r=F(()=>{const o=[];return["span","offset","pull","push"].forEach(c=>{const u=e[c];Xt(u)&&(c==="span"?o.push(i.b(`${e[c]}`)):u>0&&o.push(i.b(`${c}-${e[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{Xt(e[c])?o.push(i.b(`${c}-${e[c]}`)):Mn(e[c])&&Object.entries(e[c]).forEach(([u,d])=>{o.push(u!=="span"?i.b(`${c}-${u}-${d}`):i.b(`${c}-${d}`))})}),n.value&&o.push(i.is("guttered")),[i.b(),o]});return(o,a)=>(z(),De(Sn(o.tag),{class:J(r.value),style:Ht(s.value)},{default:xe(()=>[Ue(o.$slots,"default")]),_:3},8,["class","style"]))}});var bve=xt(yve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/col/src/col.vue"]]);const _ve=En(bve),i6=t=>Xt(t)||Gt(t)||pt(t),wve=_t({accordion:Boolean,modelValue:{type:Re([Array,String,Number]),default:()=>ws([])},expandIconPosition:{type:Re([String]),default:"right"},beforeCollapse:{type:Re(Function)}}),xve={[wn]:i6,[Wn]:i6},uz=Symbol("collapseContextKey"),Sve="ElCollapse",Eve=(t,e)=>{const n=X(Pr(t.modelValue)),i=o=>{n.value=o;const a=t.accordion?n.value[0]:n.value;e(wn,a),e(Wn,a)},s=o=>{if(t.accordion)i([n.value[0]===o?"":o]);else{const a=[...n.value],l=a.indexOf(o);l>-1?a.splice(l,1):a.push(o),i(a)}},r=async o=>{const{beforeCollapse:a}=t;if(!a){s(o);return}const l=a(o);[Vf(l),Mi(l)].includes(!0)||Ks(Sve,"beforeCollapse must return type `Promise` or `boolean`"),Vf(l)?l.then(u=>{u!==!1&&s(o)}).catch(u=>{}):l&&s(o)};return We(()=>t.modelValue,()=>n.value=Pr(t.modelValue),{deep:!0}),Xn(uz,{activeNames:n,handleItemClick:r}),{activeNames:n,setActiveNames:i}},Cve=t=>{const e=ht("collapse");return{rootKls:F(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}},Tve=Be({name:"ElCollapse",__name:"collapse",props:wve,emits:xve,setup(t,{expose:e,emit:n}){const i=t,s=n,{activeNames:r,setActiveNames:o}=Eve(i,s),{rootKls:a}=Cve(i);return e({activeNames:r,setActiveNames:o}),(l,c)=>(z(),se("div",{class:J(v(a))},[Ue(l.$slots,"default")],2))}});var Mve=xt(Tve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse.vue"]]);const Ave=Be({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=ht("collapse-transition"),n=s=>{s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom},i={beforeEnter(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.style.height&&(s.dataset.elExistsHeight=s.style.height),s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0},enter(s){requestAnimationFrame(()=>{s.dataset.oldOverflow=s.style.overflow,s.dataset.elExistsHeight?s.style.maxHeight=s.dataset.elExistsHeight:s.scrollHeight!==0?s.style.maxHeight=`${s.scrollHeight}px`:s.style.maxHeight=0,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom,s.style.overflow="hidden"})},afterEnter(s){s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow},enterCancelled(s){n(s)},beforeLeave(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.dataset.oldOverflow=s.style.overflow,s.style.maxHeight=`${s.scrollHeight}px`,s.style.overflow="hidden"},leave(s){s.scrollHeight!==0&&(s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0)},afterLeave(s){n(s)},leaveCancelled(s){n(s)}};return(s,r)=>(z(),De(Rr,Dn({name:v(e).b()},EY(i)),{default:xe(()=>[Ue(s.$slots,"default")]),_:3},16,["name"]))}});var kve=xt(Ave,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse-transition/src/collapse-transition.vue"]]);const Nx=En(kve),Pve=_t({title:{type:String,default:""},name:{type:Re([String,Number]),default:void 0},icon:{type:Ai,default:So},disabled:Boolean}),Lve=t=>{const e=zt(uz),{namespace:n}=ht("collapse"),i=X(!1),s=X(!1),r=lk(),o=F(()=>r.current++),a=F(()=>{var h;return(h=t.name)!=null?h:`${n.value}-id-${r.prefix}-${v(o)}`}),l=F(()=>e?.activeNames.value.includes(v(a)));return{focusing:i,id:o,isActive:l,handleFocus:()=>{setTimeout(()=>{s.value?s.value=!1:i.value=!0},50)},handleHeaderClick:h=>{if(t.disabled)return;const f=h.target;f?.closest("input, textarea, select")||(e?.handleItemClick(v(a)),i.value=!1,s.value=!0)},handleEnterClick:h=>{const f=h.target;f?.closest("input, textarea, select")||(h.preventDefault(),e?.handleItemClick(v(a)))}}},Ive=(t,{focusing:e,isActive:n,id:i})=>{const s=ht("collapse"),r=F(()=>[s.b("item"),s.is("active",v(n)),s.is("disabled",t.disabled)]),o=F(()=>[s.be("item","header"),s.is("active",v(n)),{focusing:v(e)&&!t.disabled}]),a=F(()=>[s.be("item","arrow"),s.is("active",v(n))]),l=F(()=>[s.be("item","title")]),c=F(()=>s.be("item","wrap")),u=F(()=>s.be("item","content")),d=F(()=>s.b(`content-${v(i)}`)),h=F(()=>s.b(`head-${v(i)}`));return{itemTitleKls:l,arrowKls:a,headKls:o,rootKls:r,itemWrapperKls:c,itemContentKls:u,scopedContentId:d,scopedHeadId:h}},Rve=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Ove=["id","aria-hidden","aria-labelledby"],Dve=Be({name:"ElCollapseItem",__name:"collapse-item",props:Pve,setup(t,{expose:e}){const n=t,{focusing:i,id:s,isActive:r,handleFocus:o,handleHeaderClick:a,handleEnterClick:l}=Lve(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:b}=Ive(n,{focusing:i,isActive:r,id:s});return e({isActive:r}),(g,x)=>(z(),se("div",{class:J(v(d))},[U("div",{id:v(b),class:J(v(u)),"aria-expanded":v(r),"aria-controls":v(m),"aria-describedby":v(m),tabindex:g.disabled?void 0:0,"aria-disabled":g.disabled,role:"button",onClick:x[0]||(x[0]=(...S)=>v(a)&&v(a)(...S)),onKeydown:x[1]||(x[1]=_s(un((...S)=>v(l)&&v(l)(...S),["stop"]),["space","enter"])),onFocus:x[2]||(x[2]=(...S)=>v(o)&&v(o)(...S)),onBlur:x[3]||(x[3]=S=>i.value=!1)},[U("span",{class:J(v(h))},[Ue(g.$slots,"title",{isActive:v(r)},()=>[cn(Xe(g.title),1)])],2),Ue(g.$slots,"icon",{isActive:v(r)},()=>[de(v(Ut),{class:J(v(c))},{default:xe(()=>[(z(),De(Sn(g.icon)))]),_:1},8,["class"])])],42,Rve),de(v(Nx),null,{default:xe(()=>[_n(U("div",{id:v(m),role:"region",class:J(v(f)),"aria-hidden":!v(r),"aria-labelledby":v(b)},[U("div",{class:J(v(p))},[Ue(g.$slots,"default")],2)],10,Ove),[[ci,v(r)]])]),_:3})],2))}});var dz=xt(Dve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/collapse/src/collapse-item.vue"]]);const Nve=En(Mve,{CollapseItem:dz}),Bve=Ss(dz),hz=_t({color:{type:Re(Object),required:!0},vertical:Boolean,disabled:Boolean}),Fve=hz;let iE=!1;function FT(t,e){if(!pi)return;const n=function(r){var o;(o=e.drag)==null||o.call(e,r)},i=function(r){var o;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",i),document.onselectstart=null,document.ondragstart=null,iE=!1,(o=e.end)==null||o.call(e,r)},s=function(r){var o;iE||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),iE=!0,(o=e.start)==null||o.call(e,r))};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1})}const s6=t=>{let e=0,n=t;for(;n;)e+=n.offsetTop,n=n.offsetParent;return e},zT=(t,e)=>Math.abs(s6(t)-s6(e)),fz=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}},pz=(t,{key:e,minValue:n,maxValue:i})=>{const s=xn(),r=wi(),o=wi(),a=F(()=>t.color.get(e));function l(h){var f;if(t.disabled)return;h.target!==r.value&&c(h),(f=r.value)==null||f.focus()}function c(h){if(!o.value||!r.value||t.disabled)return;const p=s.vnode.el.getBoundingClientRect(),{clientX:m,clientY:b}=fz(h);let g;if(t.vertical){let x=b-p.top;x=Math.max(r.value.offsetHeight/2,x),x=Math.min(x,p.height-r.value.offsetHeight/2),g=Math.round((x-r.value.offsetHeight/2)/(p.height-r.value.offsetHeight)*i)}else{let x=m-p.left;x=Math.max(r.value.offsetWidth/2,x),x=Math.min(x,p.width-r.value.offsetWidth/2),g=Math.round((x-r.value.offsetWidth/2)/(p.width-r.value.offsetWidth)*i)}t.color.set(e,g)}function u(h){if(t.disabled)return;const{shiftKey:f}=h,p=Oi(h),m=f?10:1,b=e==="hue"?-1:1;let g=!0;switch(p){case gt.left:case gt.down:d(-m*b);break;case gt.right:case gt.up:d(m*b);break;case gt.home:t.color.set(e,e==="hue"?i:n);break;case gt.end:t.color.set(e,e==="hue"?n:i);break;case gt.pageDown:d(-4*b);break;case gt.pageUp:d(4*b);break;default:g=!1;break}g&&h.preventDefault()}function d(h){let f=a.value+h;f=fi?i:f,t.color.set(e,f)}return{thumb:r,bar:o,currentValue:a,handleDrag:c,handleClick:l,handleKeydown:u}},mz=(t,{namespace:e,maxValue:n,bar:i,thumb:s,currentValue:r,handleDrag:o,getBackground:a})=>{const l=xn(),c=ht(e),u=X(0),d=X(0),h=X();function f(){if(!s.value||t.vertical)return 0;const E=l.vnode.el,T=r.value;return E?Math.round(T*(E.offsetWidth-s.value.offsetWidth/2)/n):0}function p(){if(!s.value)return 0;const E=l.vnode.el;if(!t.vertical)return 0;const T=r.value;return E?Math.round(T*(E.offsetHeight-s.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a?.()}mn(()=>{if(!i.value||!s.value)return;const E={drag:T=>{o(T)},end:T=>{o(T)}};FT(i.value,E),FT(s.value,E),m()}),We(r,()=>m()),We(()=>t.color.value,()=>m());const b=F(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),g=F(()=>c.e("bar")),x=F(()=>c.e("thumb")),S=F(()=>({background:h.value})),_=F(()=>({left:xs(u.value),top:xs(d.value)}));return{rootKls:b,barKls:g,barStyle:S,thumbKls:x,thumbStyle:_,thumbLeft:u,thumbTop:d,update:m}},zve=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],r6=0,sE=100,Uve=Be({name:"ElColorAlphaSlider",__name:"alpha-slider",props:hz,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:r,handleDrag:o,handleClick:a,handleKeydown:l}=pz(n,{key:"alpha",minValue:r6,maxValue:sE}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=mz(n,{namespace:"color-alpha-slider",maxValue:sE,currentValue:i,bar:s,thumb:r,handleDrag:o,getBackground:x}),{t:m}=Jn(),b=F(()=>m("el.colorpicker.alphaLabel")),g=F(()=>m("el.colorpicker.alphaDescription",{alpha:i.value,color:n.color.value}));function x(){if(n.color&&n.color.value){const{r:S,g:_,b:E}=n.color.toRgb();return`linear-gradient(to right, rgba(${S}, ${_}, ${E}, 0) 0%, rgba(${S}, ${_}, ${E}, 1) 100%)`}return""}return e({update:p,bar:s,thumb:r}),(S,_)=>(z(),se("div",{class:J(v(c))},[U("div",{ref_key:"bar",ref:s,class:J(v(u)),style:Ht(v(d)),onClick:_[0]||(_[0]=(...E)=>v(a)&&v(a)(...E))},null,6),U("div",{ref_key:"thumb",ref:r,class:J(v(h)),style:Ht(v(f)),"aria-label":b.value,"aria-valuenow":v(i),"aria-valuetext":g.value,"aria-orientation":S.vertical?"vertical":"horizontal","aria-valuemin":r6,"aria-valuemax":sE,role:"slider",tabindex:S.disabled?void 0:0,"aria-disabled":S.disabled,onKeydown:_[1]||(_[1]=(...E)=>v(l)&&v(l)(...E))},null,46,zve)],2))}});var $ve=xt(Uve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/alpha-slider.vue"]]);const Vve=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],o6=0,rE=360,Hve=Be({name:"ElColorHueSlider",__name:"hue-slider",props:Fve,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:r,handleDrag:o,handleClick:a,handleKeydown:l}=pz(n,{key:"hue",minValue:o6,maxValue:rE}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=mz(n,{namespace:"color-hue-slider",maxValue:rE,currentValue:i,bar:s,thumb:r,handleDrag:o}),{t:m}=Jn(),b=F(()=>m("el.colorpicker.hueLabel")),g=F(()=>m("el.colorpicker.hueDescription",{hue:i.value,color:n.color.value}));return e({bar:s,thumb:r,thumbTop:f,update:p}),(x,S)=>(z(),se("div",{class:J(v(c))},[U("div",{ref_key:"bar",ref:s,class:J(v(u)),onClick:S[0]||(S[0]=(..._)=>v(a)&&v(a)(..._))},null,2),U("div",{ref_key:"thumb",ref:r,class:J(v(d)),style:Ht(v(h)),"aria-label":b.value,"aria-valuenow":v(i),"aria-valuetext":g.value,"aria-orientation":x.vertical?"vertical":"horizontal","aria-valuemin":o6,"aria-valuemax":rE,role:"slider",tabindex:x.disabled?void 0:0,"aria-disabled":x.disabled,onKeydown:S[1]||(S[1]=(..._)=>v(l)&&v(l)(..._))},null,46,Vve)],2))}});var Wve=xt(Hve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/hue-slider.vue"]]);const Gve=_t({colors:{type:Re(Array),required:!0},color:{type:Re(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean}),gz=_t({modelValue:{type:Re(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:String,disabled:Boolean,predefine:{type:Re(Array)},validateEvent:{type:Boolean,default:!0}}),jve={[wn]:t=>Gt(t)||Ws(t)},vz=Symbol("colorCommonPickerKey"),yz=Symbol("colorPickerPanelContextKey");let t2=class{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Lm,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const n in e)fi(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const i in e)fi(e,i)&&this.set(i,e[i]);return}this[`_${e}`]=n,this._isValid=!0,this.doOnChange()}get(e){return["hue","saturation","value","alpha"].includes(e)?Math.round(this[`_${e}`]):this[`_${e}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(e){const n=new Lm(e);if(this._isValid=n.isValid,n.isValid){const{h:i,s,v:r,a:o}=n.toHsv();this._hue=i,this._saturation=s*100,this._value=r*100,this._alpha=o*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(e){const n=new Lm({h:e._hue,s:e._saturation/100,v:e._value/100,a:e._alpha/100});return this._tiny.equals(n)}doOnChange(){const{_hue:e,_saturation:n,_value:i,_alpha:s,format:r,enableAlpha:o}=this;let a=r||(o?"rgb":"hex");r==="hex"&&o&&(a="hex8"),this._tiny=new Lm({h:e,s:n/100,v:i/100,a:s/100}),this.value=this._isValid?this._tiny.toString(a):""}};const Kve=t=>{const{currentColor:e}=zt(yz),n=X(s(t.colors,t.color));We(()=>e.value,r=>{const o=new t2({value:r,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=o.compare(a)})}),jo(()=>{n.value=s(t.colors,t.color)});function i(r){t.color.fromString(t.colors[r])}function s(r,o){return r.map(a=>{const l=new t2({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(o),l})}return{rgbaColors:n,handleSelect:i}},qve=t=>{const e=ht("color-predefine"),n=F(()=>[e.b(),e.is("disabled",t.disabled)]),i=F(()=>e.e("colors"));function s(r){return[e.e("color-selector"),e.is("alpha",r.get("alpha")<100),{selected:r.selected}]}return{rootKls:n,colorsKls:i,colorSelectorKls:s}},Yve=["disabled","aria-label","onClick"],Xve=Be({name:"ElColorPredefine",__name:"predefine",props:Gve,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=Kve(e),{rootKls:s,colorsKls:r,colorSelectorKls:o}=qve(e),{t:a}=Jn(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(z(),se("div",{class:J(v(s))},[U("div",{class:J(v(r))},[(z(!0),se(At,null,yn(v(n),(d,h)=>(z(),se("button",{key:c.colors[h],type:"button",disabled:c.disabled,"aria-label":l(d.value),class:J(v(o)(d)),onClick:f=>v(i)(h)},[U("div",{style:Ht({backgroundColor:d.value})},null,4)],10,Yve))),128))],2)],2))}});var Zve=xt(Xve,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/predefine.vue"]]);const Jve=_t({color:{type:Re(Object),required:!0},disabled:Boolean}),Qve=t=>{const e=xn(),n=X(),i=X(0),s=X(0),r=X("hsl(0, 100%, 50%)"),o=F(()=>t.color.get("saturation")),a=F(()=>t.color.get("value")),l=F(()=>t.color.get("hue"));function c(p){var m;if(t.disabled)return;p.target!==n.value&&u(p),(m=n.value)==null||m.focus({preventScroll:!0})}function u(p){if(t.disabled)return;const b=e.vnode.el.getBoundingClientRect(),{clientX:g,clientY:x}=fz(p);let S=g-b.left,_=x-b.top;S=Math.max(0,S),S=Math.min(S,b.width),_=Math.max(0,_),_=Math.min(_,b.height),s.value=S,i.value=_,t.color.set({saturation:S/b.width*100,value:100-_/b.height*100})}function d(p){if(t.disabled)return;const{shiftKey:m}=p,b=Oi(p),g=m?10:1;let x=!0;switch(b){case gt.left:h(-g);break;case gt.right:h(g);break;case gt.up:f(g);break;case gt.down:f(-g);break;default:x=!1;break}x&&p.preventDefault()}function h(p){let m=o.value+p;m=m<0?0:m>100?100:m,t.color.set("saturation",m)}function f(p){let m=a.value+p;m=m<0?0:m>100?100:m,t.color.set("value",m)}return{cursorRef:n,cursorTop:i,cursorLeft:s,background:r,saturation:o,brightness:a,hue:l,handleClick:c,handleDrag:u,handleKeydown:d}},e0e=(t,{cursorTop:e,cursorLeft:n,background:i,handleDrag:s})=>{const r=xn(),o=ht("color-svpanel");function a(){const h=t.color.get("saturation"),f=t.color.get("value"),p=r.vnode.el,{clientWidth:m,clientHeight:b}=p;n.value=h*m/100,e.value=(100-f)*b/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}mn(()=>{FT(r.vnode.el,{drag:h=>{s(h)},end:h=>{s(h)}}),a()}),We([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a());const l=F(()=>o.b()),c=F(()=>o.e("cursor")),u=F(()=>({backgroundColor:i.value})),d=F(()=>({top:xs(e.value),left:xs(n.value)}));return{rootKls:l,cursorKls:c,rootStyle:u,cursorStyle:d,update:a}},t0e=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"],n0e=Be({name:"ElSvPanel",__name:"sv-panel",props:Jve,setup(t,{expose:e}){const n=t,{cursorRef:i,cursorTop:s,cursorLeft:r,background:o,saturation:a,brightness:l,handleClick:c,handleDrag:u,handleKeydown:d}=Qve(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:b}=e0e(n,{cursorTop:s,cursorLeft:r,background:o,handleDrag:u}),{t:g}=Jn(),x=F(()=>g("el.colorpicker.svLabel")),S=F(()=>g("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:b}),(_,E)=>(z(),se("div",{class:J(v(h)),style:Ht(v(p)),onClick:E[1]||(E[1]=(...T)=>v(c)&&v(c)(...T))},[U("div",{ref_key:"cursorRef",ref:i,class:J(v(f)),style:Ht(v(m)),tabindex:_.disabled?void 0:0,"aria-disabled":_.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":x.value,"aria-valuenow":`${v(a)},${v(l)}`,"aria-valuetext":S.value,onKeydown:E[0]||(E[0]=(...T)=>v(d)&&v(d)(...T))},null,46,t0e)],6))}});var i0e=xt(n0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/components/sv-panel.vue"]]);const bz=(t,e)=>{const n=ni(new t2({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return We(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(wn,n.value)}),{color:n}},s0e=Be({name:"ElColorPickerPanel",__name:"color-picker-panel",props:gz,emits:jve,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("color-picker-panel"),{formItem:o}=zr(),a=Es(),l=X(),c=X(),u=X(),d=X(),h=X(""),{color:f}=zt(vz,()=>bz(i,s),!0);function p(){f.fromString(h.value),f.value!==h.value&&(h.value=f.value)}function m(){var g;i.validateEvent&&((g=o?.validate)==null||g.call(o,"blur").catch(x=>void 0))}function b(){var g,x,S;(g=l.value)==null||g.update(),(x=c.value)==null||x.update(),(S=u.value)==null||S.update()}return mn(()=>{i.modelValue&&(h.value=f.value),Nt(b)}),We(()=>i.modelValue,g=>{g!==f.value&&(g?f.fromString(g):f.clear())}),We(()=>f.value,g=>{s(wn,g),h.value=g,i.validateEvent&&o?.validate("change").catch(x=>void 0)}),Xn(yz,{currentColor:F(()=>f.value)}),e({color:f,inputRef:d,update:b}),(g,x)=>(z(),se("div",{class:J([v(r).b(),v(r).is("disabled",v(a)),v(r).is("border",g.border)]),onFocusout:m},[U("div",{class:J(v(r).e("wrapper"))},[de(Wve,{ref_key:"hueRef",ref:l,class:"hue-slider",color:v(f),vertical:"",disabled:v(a)},null,8,["color","disabled"]),de(i0e,{ref_key:"svRef",ref:c,color:v(f),disabled:v(a)},null,8,["color","disabled"])],2),g.showAlpha?(z(),De($ve,{key:0,ref_key:"alphaRef",ref:u,color:v(f),disabled:v(a)},null,8,["color","disabled"])):Le("v-if",!0),g.predefine?(z(),De(Zve,{key:1,ref:"predefine","enable-alpha":g.showAlpha,color:v(f),colors:g.predefine,disabled:v(a)},null,8,["enable-alpha","color","colors","disabled"])):Le("v-if",!0),U("div",{class:J(v(r).e("footer"))},[de(v(wo),{ref_key:"inputRef",ref:d,modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=S=>h.value=S),"validate-event":!1,size:"small",disabled:v(a),onChange:p},null,8,["modelValue","disabled"]),Ue(g.$slots,"footer")],2)],34))}});var r0e=xt(s0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker-panel/src/color-picker-panel.vue"]]);const Tk=En(r0e),o0e=_t({persistent:{type:Boolean,default:!0},modelValue:{type:Re(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:String,disabled:{type:Boolean,default:void 0},size:or,popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,tabindex:{type:[String,Number],default:0},teleported:Ri.teleported,appendTo:Ri.appendTo,predefine:{type:Re(Array)},validateEvent:{type:Boolean,default:!0},...hp,...To(["ariaLabel"])}),a0e={[wn]:t=>Gt(t)||Ws(t),[Wn]:t=>Gt(t)||Ws(t),activeChange:t=>Gt(t)||Ws(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},l0e=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"],c0e=Be({name:"ElColorPicker",__name:"color-picker",props:o0e,emits:a0e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:r}=Jn(),o=ht("color"),{formItem:a}=zr(),l=er(),c=Es(),{valueOnClear:u,isEmptyValue:d}=Ky(i,null),h=bz(i,s),{inputId:f,isLabeledByFormItem:p}=Ba(i,{formItemContext:a}),m=X(),b=X(),g=X(),x=X(!1),S=X(!1);let _=!0;const{isFocused:E,handleFocus:T,handleBlur:A}=md(b,{disabled:c,beforeBlur(Fe){var ve;return(ve=m.value)==null?void 0:ve.isFocusInsideContent(Fe)},afterBlur(){var Fe;Z(!1),W(),i.validateEvent&&((Fe=a?.validate)==null||Fe.call(a,"blur").catch(ve=>void 0))}}),I=Fce(()=>{var Fe,ve;return(ve=(Fe=g.value)==null?void 0:Fe.color)!=null?ve:h.color}),P=F(()=>td(i,Object.keys(gz))),k=F(()=>!i.modelValue&&!S.value?"transparent":oe(I,i.showAlpha)),B=F(()=>!i.modelValue&&!S.value?"":I.value),R=F(()=>p.value?void 0:i.ariaLabel||r("el.colorpicker.defaultLabel")),H=F(()=>p.value?a?.labelId:void 0),q=F(()=>[o.b("picker"),o.is("disabled",c.value),o.bm("picker",l.value),o.is("focused",E.value)]);function oe(Fe,ve){const{r:fe,g:Me,b:ge,a:Qe}=Fe.toRgb();return ve?`rgba(${fe}, ${Me}, ${ge}, ${Qe})`:`rgb(${fe}, ${Me}, ${ge})`}function Z(Fe){x.value=Fe}const V=Wc(Z,100,{leading:!0});function D(){c.value||Z(!0)}function K(){V(!1),W()}function W(){Nt(()=>{i.modelValue?I.fromString(i.modelValue):(I.value="",Nt(()=>{S.value=!1}))})}function Q(){c.value||(x.value&&W(),V(!x.value))}function ie(){const Fe=d(I.value)?u.value:I.value;s(wn,Fe),s(Wn,Fe),i.validateEvent&&a?.validate("change").catch(ve=>void 0),V(!1),Nt(()=>{const ve=new t2({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});I.compare(ve)||W()})}function ne(){V(!1),s(wn,u.value),s(Wn,u.value),i.modelValue!==u.value&&i.validateEvent&&a?.validate("change").catch(Fe=>void 0),W()}function ce(){var Fe,ve;(ve=(Fe=g?.value)==null?void 0:Fe.inputRef)==null||ve.focus()}function ae(){x.value&&(K(),E.value&&Te())}function _e(Fe){Fe.preventDefault(),Fe.stopPropagation(),Z(!1),W()}function ke(Fe){switch(Oi(Fe)){case gt.enter:case gt.numpadEnter:case gt.space:Fe.preventDefault(),Fe.stopPropagation(),D();break;case gt.esc:_e(Fe);break}}function Te(){b.value.focus()}function Ke(){b.value.blur()}return We(()=>B.value,Fe=>{_&&s("activeChange",Fe),_=!0}),We(()=>I.value,()=>{!i.modelValue&&!S.value&&(S.value=!0)}),We(()=>i.modelValue,Fe=>{Fe?Fe&&Fe!==I.value&&(_=!1,I.fromString(Fe)):S.value=!1}),We(()=>x.value,()=>{g.value&&Nt(g.value.update)}),Xn(vz,h),e({color:I,show:D,hide:K,focus:Te,blur:Ke}),(Fe,ve)=>(z(),De(v(Or),{ref_key:"popper",ref:m,visible:x.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[v(o).be("picker","panel"),Fe.popperClass],"popper-style":Fe.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:Fe.teleported,transition:`${v(o).namespace.value}-zoom-in-top`,persistent:Fe.persistent,"append-to":Fe.appendTo,onShow:ce,onHide:ve[2]||(ve[2]=fe=>Z(!1))},{content:xe(()=>[_n((z(),De(v(Tk),Dn({ref_key:"pickerPanelRef",ref:g},P.value,{border:!1,"validate-event":!1,onKeydown:_s(_e,["esc"])}),{footer:xe(()=>[U("div",null,[de(v(Sr),{class:J(v(o).be("footer","link-btn")),text:"",size:"small",onClick:ne},{default:xe(()=>[cn(Xe(v(r)("el.colorpicker.clear")),1)]),_:1},8,["class"]),de(v(Sr),{plain:"",size:"small",class:J(v(o).be("footer","btn")),onClick:ie},{default:xe(()=>[cn(Xe(v(r)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[v(Ch),ae,b.value]])]),default:xe(()=>[U("div",Dn({id:v(f),ref_key:"triggerRef",ref:b},Fe.$attrs,{class:q.value,role:"button","aria-label":R.value,"aria-labelledby":H.value,"aria-description":v(r)("el.colorpicker.description",{color:Fe.modelValue||""}),"aria-disabled":v(c),tabindex:v(c)?void 0:Fe.tabindex,onKeydown:ke,onFocus:ve[0]||(ve[0]=(...fe)=>v(T)&&v(T)(...fe)),onBlur:ve[1]||(ve[1]=(...fe)=>v(A)&&v(A)(...fe))}),[U("div",{class:J(v(o).be("picker","trigger")),onClick:Q},[U("span",{class:J([v(o).be("picker","color"),v(o).is("alpha",Fe.showAlpha)])},[U("span",{class:J(v(o).be("picker","color-inner")),style:Ht({backgroundColor:k.value})},[_n(de(v(Ut),{class:J([v(o).be("picker","icon"),v(o).is("icon-arrow-down")])},{default:xe(()=>[de(v(eu))]),_:1},8,["class"]),[[ci,Fe.modelValue||S.value]]),_n(de(v(Ut),{class:J([v(o).be("picker","empty"),v(o).is("icon-close")])},{default:xe(()=>[de(v(ul))]),_:1},8,["class"]),[[ci,!Fe.modelValue&&!S.value]])],6)],2)],2)],16,l0e)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}});var u0e=xt(c0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/color-picker/src/color-picker.vue"]]);const d0e=En(u0e),h0e=_t({a11y:{type:Boolean,default:!0},locale:{type:Re(Object)},size:or,button:{type:Re(Object)},card:{type:Re(Object)},dialog:{type:Re(Object)},link:{type:Re(Object)},experimentalFeatures:{type:Re(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:Re(Object)},zIndex:Number,namespace:{type:String,default:"el"},...hp}),po={placement:"top"},f0e=Be({name:"ElConfigProvider",props:h0e,setup(t,{slots:e}){const n=tk(t);return We(()=>t.message,i=>{var s,r;Object.assign(po,(r=(s=n?.value)==null?void 0:s.message)!=null?r:{},i??{})},{immediate:!0,deep:!0}),()=>Ue(e,"default",{config:n?.value})}}),p0e=En(f0e),m0e=Be({name:"ElContainer",__name:"container",props:_t({direction:{type:String,values:["horizontal","vertical"]}}),setup(t){const e=t,n=tr(),i=ht("container"),s=F(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(o=>{const a=o.type.name;return a==="ElHeader"||a==="ElFooter"}):!1);return(r,o)=>(z(),se("section",{class:J([v(i).b(),v(i).is("vertical",s.value)])},[Ue(r.$slots,"default")],2))}});var g0e=xt(m0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/container.vue"]]);const v0e=Be({name:"ElAside",__name:"aside",props:{width:{type:String,default:null}},setup(t){const e=t,n=ht("aside"),i=F(()=>e.width?n.cssVarBlock({width:e.width}):{});return(s,r)=>(z(),se("aside",{class:J(v(n).b()),style:Ht(i.value)},[Ue(s.$slots,"default")],6))}});var _z=xt(v0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/aside.vue"]]);const y0e=Be({name:"ElFooter",__name:"footer",props:{height:{type:String,default:null}},setup(t){const e=t,n=ht("footer"),i=F(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,r)=>(z(),se("footer",{class:J(v(n).b()),style:Ht(i.value)},[Ue(s.$slots,"default")],6))}});var wz=xt(y0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/footer.vue"]]);const b0e=Be({name:"ElHeader",__name:"header",props:{height:{type:String,default:null}},setup(t){const e=t,n=ht("header"),i=F(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,r)=>(z(),se("header",{class:J(v(n).b()),style:Ht(i.value)},[Ue(s.$slots,"default")],6))}});var xz=xt(b0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/header.vue"]]);const _0e=Be({name:"ElMain",__name:"main",setup(t){const e=ht("main");return(n,i)=>(z(),se("main",{class:J(v(e).b())},[Ue(n.$slots,"default")],2))}});var Sz=xt(_0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/container/src/main.vue"]]);const w0e=En(g0e,{Aside:_z,Footer:wz,Header:xz,Main:Sz}),x0e=Ss(_z),S0e=Ss(wz),E0e=Ss(xz),C0e=Ss(Sz);var K_={exports:{}},T0e=K_.exports,a6;function M0e(){return a6||(a6=1,(function(t,e){(function(n,i){t.exports=i()})(T0e,(function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,r=/\d\d/,o=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(g){this[b]=+g}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=(function(g){if(!g||g==="Z")return 0;var x=g.match(/([+-]|\d\d)/g),S=60*x[1]+(+x[2]||0);return S===0?0:x[0]==="+"?-S:S})(b)}],h=function(b){var g=l[b];return g&&(g.indexOf?g:g.s.concat(g.f))},f=function(b,g){var x,S=l.meridiem;if(S){for(var _=1;_<=24;_+=1)if(b.indexOf(S(_,0,g))>-1){x=_>12;break}}else x=b===(g?"pm":"PM");return x},p={A:[a,function(b){this.afternoon=f(b,!1)}],a:[a,function(b){this.afternoon=f(b,!0)}],Q:[s,function(b){this.month=3*(b-1)+1}],S:[s,function(b){this.milliseconds=100*+b}],SS:[r,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[r,u("day")],Do:[a,function(b){var g=l.ordinal,x=b.match(/\d+/);if(this.day=x[0],g)for(var S=1;S<=31;S+=1)g(S).replace(/\[|\]/g,"")===b&&(this.day=S)}],w:[o,u("week")],ww:[r,u("week")],M:[o,u("month")],MM:[r,u("month")],MMM:[a,function(b){var g=h("months"),x=(h("monthsShort")||g.map((function(S){return S.slice(0,3)}))).indexOf(b)+1;if(x<1)throw new Error;this.month=x%12||x}],MMMM:[a,function(b){var g=h("months").indexOf(b)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[r,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(b){var g,x;g=b,x=l&&l.formats;for(var S=(b=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(k,B,R){var H=R&&R.toUpperCase();return B||x[R]||n[R]||x[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(q,oe,Z){return oe||Z.slice(1)}))}))).match(i),_=S.length,E=0;E<_;E+=1){var T=S[E],A=p[T],I=A&&A[0],P=A&&A[1];S[E]=P?{regex:I,parser:P}:T.replace(/^\[|\]$/g,"")}return function(k){for(var B={},R=0,H=0;R<_;R+=1){var q=S[R];if(typeof q=="string")H+=q.length;else{var oe=q.regex,Z=q.parser,V=k.slice(H),D=oe.exec(V)[0];Z.call(B,D),k=k.replace(D,"")}}return(function(K){var W=K.afternoon;if(W!==void 0){var Q=K.hours;W?Q<12&&(K.hours+=12):Q===12&&(K.hours=0),delete K.afternoon}})(B),B}}return function(b,g,x){x.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var S=g.prototype,_=S.parse;S.parse=function(E){var T=E.date,A=E.utc,I=E.args;this.$u=A;var P=I[1];if(typeof P=="string"){var k=I[2]===!0,B=I[3]===!0,R=k||B,H=I[2];B&&(H=I[2]),l=this.$locale(),!k&&H&&(l=x.Ls[H]),this.$d=(function(V,D,K,W){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*V);var Q=m(D)(V),ie=Q.year,ne=Q.month,ce=Q.day,ae=Q.hours,_e=Q.minutes,ke=Q.seconds,Te=Q.milliseconds,Ke=Q.zone,Fe=Q.week,ve=new Date,fe=ce||(ie||ne?1:ve.getDate()),Me=ie||ve.getFullYear(),ge=0;ie&&!ne||(ge=ne>0?ne-1:ve.getMonth());var Qe,G=ae||0,ee=_e||0,j=ke||0,he=Te||0;return Ke?new Date(Date.UTC(Me,ge,fe,G,ee,j,he+60*Ke.offset*1e3)):K?new Date(Date.UTC(Me,ge,fe,G,ee,j,he)):(Qe=new Date(Me,ge,fe,G,ee,j,he),Fe&&(Qe=W(Qe).week(Fe).toDate()),Qe)}catch{return new Date("")}})(T,P,A,x),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),R&&T!=this.format(P)&&(this.$d=new Date("")),l={}}else if(P instanceof Array)for(var q=P.length,oe=1;oe<=q;oe+=1){I[1]=P[oe-1];var Z=x.apply(this,I);if(Z.isValid()){this.$d=Z.$d,this.$L=Z.$L,this.init();break}oe===q&&(this.$d=new Date(""))}else _.call(this,E)}}}))})(K_)),K_.exports}var A0e=M0e();const Mk=ud(A0e),l6=["hours","minutes","seconds"],jl="EP_PICKER_BASE",Ak="ElPopperOptions",Ez=Symbol("commonPickerContextKey"),hg="HH:mm:ss",eh="YYYY-MM-DD",k0e={date:eh,dates:eh,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${eh} ${hg}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:eh,datetimerange:`${eh} ${hg}`},Cz=(t,e)=>{const{lang:n}=Jn(),i=X(!1),s=X(!1),r=X(null),o=F(()=>{const{modelValue:p}=t;return!p||pt(p)&&!p.filter(Boolean).length}),a=p=>{if(!H7(t.modelValue,p)){let m;pt(p)?m=p.map(g=>q8(g,t.valueFormat,n.value)):p&&(m=q8(p,t.valueFormat,n.value)),e(wn,p&&m,n.value)}},l=F(()=>{var p;let m;if(o.value?c.value.getDefaultValue&&(m=c.value.getDefaultValue()):pt(t.modelValue)?m=t.modelValue.map(b=>K8(b,t.valueFormat,n.value)):m=K8((p=t.modelValue)!=null?p:"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const b=c.value.getRangeAvailableTime(m);Ms(b,m)||(m=b,o.value||a(G_(m)))}return pt(m)&&m.some(b=>!b)&&(m=[]),m}),c=X({});return{parsedValue:l,pickerActualVisible:s,pickerOptions:c,pickerVisible:i,userInput:r,valueIsEmpty:o,emitInput:a,onCalendarChange:p=>{e("calendar-change",p)},onPanelChange:(p,m,b)=>{e("panel-change",p,m,b)},onPick:(p="",m=!1)=>{i.value=m;let b;pt(p)?b=p.map(g=>g.toDate()):b=p&&p.toDate(),r.value=null,a(b)},onSetPickerOption:p=>{c.value[p[0]]=p[1],c.value.panelReady=!0}}},kk=_t({disabledHours:{type:Re(Function)},disabledMinutes:{type:Re(Function)},disabledSeconds:{type:Re(Function)}}),Tz=_t({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),Pk=_t({automaticDropdown:{type:Boolean,default:!0},id:{type:Re([Array,String])},name:{type:Re([Array,String])},popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:Re([String,Object]),default:pd},editable:{type:Boolean,default:!0},prefixIcon:{type:Re([String,Object]),default:""},size:or,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:Re(Object),default:()=>({})},modelValue:{type:Re([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:Re([Date,Array])},defaultTime:{type:Re([Date,Array])},isRange:Boolean,...kk,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:Re([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:Re(String),values:gd,default:"bottom"},fallbackPlacements:{type:Re(Array),default:["bottom","top","right","left"]},...hp,...To(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),P0e=_t({id:{type:Re(Array)},name:{type:Re(Array)},modelValue:{type:Re([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),L0e=["id","name","placeholder","value","disabled"],I0e=["id","name","placeholder","value","disabled"],R0e=Be({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:P0e,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:r}=zr(),{inputId:o}=Ba(ni({id:F(()=>{var I;return(I=i.id)==null?void 0:I[0]})}),{formItemContext:r}),a=Lx(),l=ht("date"),c=ht("range"),u=X(),d=X(),{wrapperRef:h,isFocused:f}=md(u,{disabled:F(()=>i.disabled)}),p=I=>{s("click",I)},m=I=>{s("mouseenter",I)},b=I=>{s("mouseleave",I)},g=I=>{s("touchstart",I)},x=I=>{s("startInput",I)},S=I=>{s("endInput",I)},_=I=>{s("startChange",I)},E=I=>{s("endChange",I)};return e({focus:()=>{var I;(I=u.value)==null||I.focus()},blur:()=>{var I,P;(I=u.value)==null||I.blur(),(P=d.value)==null||P.blur()}}),(I,P)=>(z(),se("div",{ref_key:"wrapperRef",ref:h,class:J([v(l).is("active",v(f)),I.$attrs.class]),style:Ht(I.$attrs.style),onClick:p,onMouseenter:m,onMouseleave:b,onTouchstartPassive:g},[Ue(I.$slots,"prefix"),U("input",Dn(v(a),{id:v(o),ref_key:"inputRef",ref:u,name:I.name&&I.name[0],placeholder:I.startPlaceholder,value:I.modelValue&&I.modelValue[0],class:v(c).b("input"),disabled:I.disabled,onInput:x,onChange:_}),null,16,L0e),Ue(I.$slots,"range-separator"),U("input",Dn(v(a),{id:I.id&&I.id[1],ref_key:"endInputRef",ref:d,name:I.name&&I.name[1],placeholder:I.endPlaceholder,value:I.modelValue&&I.modelValue[1],class:v(c).b("input"),disabled:I.disabled,onInput:S,onChange:E}),null,16,I0e),Ue(I.$slots,"suffix")],38))}});var O0e=xt(R0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker-range-trigger.vue"]]);const D0e=Be({name:"Picker",__name:"picker",props:Pk,emits:[wn,Wn,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const i=t,s=n,r=ld(),o=ht("date"),a=ht("input"),l=ht("range"),{formItem:c}=zr(),u=zt(Ak,{}),d=Ky(i,null),h=X(),f=X(),p=X(null);let m=!1;const b=Es(),g=Cz(i,s),{parsedValue:x,pickerActualVisible:S,userInput:_,pickerVisible:E,pickerOptions:T,valueIsEmpty:A,emitInput:I,onPick:P,onSetPickerOption:k,onCalendarChange:B,onPanelChange:R}=g,{isFocused:H,handleFocus:q,handleBlur:oe}=md(f,{disabled:b,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(E.value=!0)},beforeBlur(qe){var kt;return!m&&((kt=h.value)==null?void 0:kt.isFocusInsideContent(qe))},afterBlur(){Oe(),E.value=!1,m=!1,i.validateEvent&&c?.validate("blur").catch(qe=>void 0)}}),Z=X(!1),V=F(()=>[o.b("editor"),o.bm("editor",i.type),a.e("wrapper"),o.is("disabled",b.value),o.is("active",E.value),l.b("editor"),le?l.bm("editor",le.value):"",r.class]),D=F(()=>[a.e("icon"),l.e("close-icon"),Qe.value?"":l.em("close-icon","hidden")]);We(E,qe=>{qe?Nt(()=>{qe&&(p.value=i.modelValue)}):(_.value=null,Nt(()=>{K(i.modelValue)}))});const K=(qe,kt)=>{(kt||!H7(qe,p.value))&&(s(Wn,qe),kt&&(p.value=qe),i.validateEvent&&c?.validate("change").catch(Je=>void 0))},W=qe=>{s("keydown",qe)},Q=F(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ie=(qe,kt,Je)=>{const Ft=Q.value;Ft.length&&(!Je||Je==="min"?(Ft[0].setSelectionRange(qe,kt),Ft[0].focus()):Je==="max"&&(Ft[1].setSelectionRange(qe,kt),Ft[1].focus()))},ne=()=>{S.value=!0},ce=()=>{s("visible-change",!0)},ae=()=>{S.value=!1,E.value=!1,s("visible-change",!1)},_e=()=>{E.value=!0},ke=()=>{E.value=!1},Te=F(()=>{const qe=$e(x.value);return pt(_.value)?[_.value[0]||qe&&qe[0]||"",_.value[1]||qe&&qe[1]||""]:_.value!==null?_.value:!Fe.value&&A.value||!E.value&&A.value?"":qe?ve.value||fe.value||Me.value?qe.join(", "):qe:""}),Ke=F(()=>i.type.includes("time")),Fe=F(()=>i.type.startsWith("time")),ve=F(()=>i.type==="dates"),fe=F(()=>i.type==="months"),Me=F(()=>i.type==="years"),ge=F(()=>i.prefixIcon||(Ke.value?Q9:Iue)),Qe=F(()=>i.clearable&&!b.value&&!i.readonly&&!A.value&&(Z.value||H.value)),G=qe=>{i.readonly||b.value||(Qe.value&&(qe.stopPropagation(),T.value.handleClear?T.value.handleClear():I(d.valueOnClear.value),K(d.valueOnClear.value,!0),ae()),s("clear"))},ee=async qe=>{var kt;i.readonly||b.value||(((kt=qe.target)==null?void 0:kt.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(E.value=!0)},j=()=>{i.readonly||b.value||!A.value&&i.clearable&&(Z.value=!0)},he=()=>{Z.value=!1},be=qe=>{var kt;i.readonly||b.value||(((kt=qe.touches[0].target)==null?void 0:kt.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(E.value=!0)},re=F(()=>i.type.includes("range")),le=er(),Ce=F(()=>{var qe,kt;return(kt=(qe=v(h))==null?void 0:qe.popperRef)==null?void 0:kt.contentRef}),Ee=QA(f,qe=>{const kt=v(Ce),Je=nr(f);kt&&(qe.target===kt||qe.composedPath().includes(kt))||qe.target===Je||Je&&qe.composedPath().includes(Je)||(E.value=!1)});gi(()=>{Ee?.()});const Oe=()=>{if(_.value){const qe=Ge(Te.value);qe&&(ot(qe)&&I(G_(qe)),_.value=null)}_.value===""&&(I(d.valueOnClear.value),K(d.valueOnClear.value,!0),_.value=null)},Ge=qe=>qe?T.value.parseUserInput(qe):null,$e=qe=>qe?pt(qe)?qe.map(Je=>Je.format(i.format)):qe.format(i.format):null,ot=qe=>T.value.isValidValue(qe),dt=async qe=>{if(i.readonly||b.value)return;const kt=Oi(qe);if(W(qe),kt===gt.esc){E.value===!0&&(E.value=!1,qe.preventDefault(),qe.stopPropagation());return}if(kt===gt.down&&(T.value.handleFocusPicker&&(qe.preventDefault(),qe.stopPropagation()),E.value===!1&&(E.value=!0,await Nt()),T.value.handleFocusPicker)){T.value.handleFocusPicker();return}if(kt===gt.tab){m=!0;return}if(kt===gt.enter||kt===gt.numpadEnter){E.value?(_.value===null||_.value===""||ot(Ge(Te.value)))&&(Oe(),E.value=!1):E.value=!0,qe.preventDefault(),qe.stopPropagation();return}if(_.value){qe.stopPropagation();return}T.value.handleKeydownInput&&T.value.handleKeydownInput(qe)},Jt=qe=>{_.value=qe,E.value||(E.value=!0)},at=qe=>{const kt=qe.target;_.value?_.value=[kt.value,_.value[1]]:_.value=[kt.value,null]},Mt=qe=>{const kt=qe.target;_.value?_.value=[_.value[0],kt.value]:_.value=[null,kt.value]},Bt=()=>{var qe;const kt=_.value,Je=Ge(kt&&kt[0]),Ft=v(x);if(Je&&Je.isValid()){_.value=[$e(Je),((qe=Te.value)==null?void 0:qe[1])||null];const Ne=[Je,Ft&&(Ft[1]||null)];ot(Ne)&&(I(G_(Ne)),_.value=null)}},$t=()=>{var qe;const kt=v(_),Je=Ge(kt&&kt[1]),Ft=v(x);if(Je&&Je.isValid()){_.value=[((qe=v(Te))==null?void 0:qe[0])||null,$e(Je)];const Ne=[Ft&&Ft[0],Je];ot(Ne)&&(I(G_(Ne)),_.value=null)}},Ze=()=>{var qe;(qe=f.value)==null||qe.focus()},vt=()=>{var qe;(qe=f.value)==null||qe.blur()};return Xn(jl,{props:i,emptyValues:d}),Xn(Ez,g),e({focus:Ze,blur:vt,handleOpen:_e,handleClose:ke,onPick:P}),(qe,kt)=>(z(),De(v(Or),Dn({ref_key:"refPopper",ref:h,visible:v(E),effect:"light",pure:"",trigger:"click"},qe.$attrs,{role:"dialog",teleported:"",transition:`${v(o).namespace.value}-zoom-in-top`,"popper-class":[`${v(o).namespace.value}-picker__popper`,qe.popperClass],"popper-style":qe.popperStyle,"popper-options":v(u),"fallback-placements":qe.fallbackPlacements,"gpu-acceleration":!1,placement:qe.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:ne,onShow:ce,onHide:ae}),{default:xe(()=>[re.value?(z(),De(O0e,{key:1,id:qe.id,ref_key:"inputRef",ref:f,"model-value":Te.value,name:qe.name,disabled:v(b),readonly:!qe.editable||qe.readonly,"start-placeholder":qe.startPlaceholder,"end-placeholder":qe.endPlaceholder,class:J(V.value),style:Ht(qe.$attrs.style),"aria-label":qe.ariaLabel,tabindex:qe.tabindex,autocomplete:"off",role:"combobox",onClick:ee,onFocus:v(q),onBlur:v(oe),onStartInput:at,onStartChange:Bt,onEndInput:Mt,onEndChange:$t,onMousedown:ee,onMouseenter:j,onMouseleave:he,onTouchstartPassive:be,onKeydown:dt},{prefix:xe(()=>[ge.value?(z(),De(v(Ut),{key:0,class:J([v(a).e("icon"),v(l).e("icon")])},{default:xe(()=>[(z(),De(Sn(ge.value)))]),_:1},8,["class"])):Le("v-if",!0)]),"range-separator":xe(()=>[Ue(qe.$slots,"range-separator",{},()=>[U("span",{class:J(v(l).b("separator"))},Xe(qe.rangeSeparator),3)])]),suffix:xe(()=>[qe.clearIcon?(z(),De(v(Ut),{key:0,class:J(D.value),onMousedown:un(v(_i),["prevent"]),onClick:G},{default:xe(()=>[(z(),De(Sn(qe.clearIcon)))]),_:1},8,["class","onMousedown"])):Le("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(z(),De(v(wo),{key:0,id:qe.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":Te.value,name:qe.name,size:v(le),disabled:v(b),placeholder:qe.placeholder,class:J([v(o).b("editor"),v(o).bm("editor",qe.type),v(o).is("focus",v(E)),qe.$attrs.class]),style:Ht(qe.$attrs.style),readonly:!qe.editable||qe.readonly||ve.value||fe.value||Me.value||qe.type==="week","aria-label":qe.ariaLabel,tabindex:qe.tabindex,"validate-event":!1,onInput:Jt,onFocus:v(q),onBlur:v(oe),onKeydown:dt,onChange:Oe,onMousedown:ee,onMouseenter:j,onMouseleave:he,onTouchstartPassive:be,onClick:kt[0]||(kt[0]=un(()=>{},["stop"]))},{prefix:xe(()=>[ge.value?(z(),De(v(Ut),{key:0,class:J(v(a).e("icon")),onMousedown:un(ee,["prevent"]),onTouchstartPassive:be},{default:xe(()=>[(z(),De(Sn(ge.value)))]),_:1},8,["class"])):Le("v-if",!0)]),suffix:xe(()=>[Qe.value&&qe.clearIcon?(z(),De(v(Ut),{key:0,class:J(`${v(a).e("icon")} clear-icon`),onMousedown:un(v(_i),["prevent"]),onClick:G},{default:xe(()=>[(z(),De(Sn(qe.clearIcon)))]),_:1},8,["class","onMousedown"])):Le("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:xe(()=>[Ue(qe.$slots,"default",{visible:v(E),actualVisible:v(S),parsedValue:v(x),format:qe.format,dateFormat:qe.dateFormat,timeFormat:qe.timeFormat,unlinkPanels:qe.unlinkPanels,type:qe.type,defaultValue:qe.defaultValue,showNow:qe.showNow,showConfirm:qe.showConfirm,showFooter:qe.showFooter,showWeekNumber:qe.showWeekNumber,onPick:kt[1]||(kt[1]=(...Je)=>v(P)&&v(P)(...Je)),onSelectRange:ie,onSetPickerOption:kt[2]||(kt[2]=(...Je)=>v(k)&&v(k)(...Je)),onCalendarChange:kt[3]||(kt[3]=(...Je)=>v(B)&&v(B)(...Je)),onPanelChange:kt[4]||(kt[4]=(...Je)=>v(R)&&v(R)(...Je)),onMousedown:kt[5]||(kt[5]=un(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}});var Mz=xt(D0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/common/picker.vue"]]);const N0e=_t({...Tz,datetimeRole:String,parsedValue:{type:Re(Object)}}),Az=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const i=(o,a,l,c)=>{const u={hour:t,minute:e,second:n};let d=o;return["hour","minute","second"].forEach(h=>{if(u[h]){let f;const p=u[h];switch(h){case"minute":{f=p(d.hour(),a,c);break}case"second":{f=p(d.hour(),d.minute(),a,c);break}default:{f=p(a,c);break}}if(f?.length&&!f.includes(d[h]())){const m=l?0:f.length-1;d=d[h](f[m])}}}),d},s={};return{timePickerOptions:s,getAvailableTime:i,onSetOption:([o,a])=>{s[o]=a}}},oE=t=>{const e=(i,s)=>i||s,n=i=>i!==!0;return t.map(e).filter(n)},kz=(t,e,n)=>({getHoursList:(o,a)=>tE(24,t&&(()=>t?.(o,a))),getMinutesList:(o,a,l)=>tE(60,e&&(()=>e?.(o,a,l))),getSecondsList:(o,a,l,c)=>tE(60,n&&(()=>n?.(o,a,l,c)))}),Pz=(t,e,n)=>{const{getHoursList:i,getMinutesList:s,getSecondsList:r}=kz(t,e,n);return{getAvailableHours:(c,u)=>oE(i(c,u)),getAvailableMinutes:(c,u,d)=>oE(s(c,u,d)),getAvailableSeconds:(c,u,d,h)=>oE(r(c,u,d,h))}},Lz=t=>{const e=X(t.parsedValue);return We(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},B0e=_t({role:{type:String,required:!0},spinnerDate:{type:Re(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:Re(String),default:""},...kk}),F0e=100,z0e=600,sb="_RepeatClick",n2={beforeMount(t,e){const n=e.value,{interval:i=F0e,delay:s=z0e}=Kt(n)?{}:n;let r,o;const a=()=>Kt(n)?n():n.handler(),l=()=>{o&&(clearTimeout(o),o=void 0),r&&(clearInterval(r),r=void 0)},c=u=>{u.button===0&&(l(),a(),document.addEventListener("mouseup",l,{once:!0}),o=setTimeout(()=>{r=setInterval(()=>{a()},i)},s))};t[sb]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[sb])return;const{start:e,clear:n}=t[sb];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[sb]=null}},U0e=["onClick"],$0e=["onMouseenter"],V0e=Be({__name:"basic-time-spinner",props:B0e,emits:[Wn,"select-range","set-option"],setup(t,{emit:e}){const n=t,i=zt(jl),{isRange:s,format:r}=i.props,o=e,a=ht("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=kz(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const h=X(),f=X(),p=X(),m=X(),b={hours:f,minutes:p,seconds:m},g=F(()=>n.showSeconds?l6:l6.slice(0,2)),x=F(()=>{const{spinnerDate:ne}=n,ce=ne.hour(),ae=ne.minute(),_e=ne.second();return{hours:ce,minutes:ae,seconds:_e}}),S=F(()=>{const{hours:ne,minutes:ce}=v(x),{role:ae,spinnerDate:_e}=n,ke=s?void 0:_e;return{hours:l(ae,ke),minutes:c(ne,ae,ke),seconds:u(ne,ce,ae,ke)}}),_=F(()=>{const{hours:ne,minutes:ce,seconds:ae}=v(x);return{hours:eE(ne,23),minutes:eE(ce,59),seconds:eE(ae,59)}}),E=Wc(ne=>{d=!1,I(ne)},200),T=ne=>{if(!!!n.amPmMode)return"";const ae=n.amPmMode==="A";let _e=ne<12?" am":" pm";return ae&&(_e=_e.toUpperCase()),_e},A=ne=>{let ce=[0,0];const ae=r||hg,_e=ae.indexOf("HH"),ke=ae.indexOf("mm"),Te=ae.indexOf("ss");switch(ne){case"hours":_e!==-1&&(ce=[_e,_e+2]);break;case"minutes":ke!==-1&&(ce=[ke,ke+2]);break;case"seconds":Te!==-1&&(ce=[Te,Te+2]);break}const[Ke,Fe]=ce;o("select-range",Ke,Fe),h.value=ne},I=ne=>{B(ne,v(x)[ne])},P=()=>{I("hours"),I("minutes"),I("seconds")},k=ne=>ne.querySelector(`.${a.namespace.value}-scrollbar__wrap`),B=(ne,ce)=>{if(n.arrowControl)return;const ae=v(b[ne]);ae&&ae.$el&&(k(ae.$el).scrollTop=Math.max(0,ce*R(ne)))},R=ne=>{const ce=v(b[ne]),ae=ce?.$el.querySelector("li");return ae&&Number.parseFloat(Ou(ae,"height"))||0},H=()=>{oe(1)},q=()=>{oe(-1)},oe=ne=>{h.value||A("hours");const ce=h.value,ae=v(x)[ce],_e=h.value==="hours"?24:60,ke=Z(ce,ae,ne,_e);V(ce,ke),B(ce,ke),Nt(()=>A(ce))},Z=(ne,ce,ae,_e)=>{let ke=(ce+ae+_e)%_e;const Te=v(S)[ne];for(;Te[ke]&&ke!==ce;)ke=(ke+ae+_e)%_e;return ke},V=(ne,ce)=>{if(v(S)[ne][ce])return;const{hours:ke,minutes:Te,seconds:Ke}=v(x);let Fe;switch(ne){case"hours":Fe=n.spinnerDate.hour(ce).minute(Te).second(Ke);break;case"minutes":Fe=n.spinnerDate.hour(ke).minute(ce).second(Ke);break;case"seconds":Fe=n.spinnerDate.hour(ke).minute(Te).second(ce);break}o(Wn,Fe)},D=(ne,{value:ce,disabled:ae})=>{ae||(V(ne,ce),A(ne),B(ne,ce))},K=ne=>{const ce=v(b[ne]);if(!ce)return;d=!0,E(ne);const ae=Math.min(Math.round((k(ce.$el).scrollTop-(W(ne)*.5-10)/R(ne)+3)/R(ne)),ne==="hours"?23:59);V(ne,ae)},W=ne=>v(b[ne]).$el.offsetHeight,Q=()=>{const ne=ce=>{const ae=v(b[ce]);ae&&ae.$el&&(k(ae.$el).onscroll=()=>{K(ce)})};ne("hours"),ne("minutes"),ne("seconds")};mn(()=>{Nt(()=>{!n.arrowControl&&Q(),P(),n.role==="start"&&A("hours")})});const ie=(ne,ce)=>{b[ce].value=ne??void 0};return o("set-option",[`${n.role}_scrollDown`,oe]),o("set-option",[`${n.role}_emitSelectRange`,A]),We(()=>n.spinnerDate,()=>{d||P()}),(ne,ce)=>(z(),se("div",{class:J([v(a).b("spinner"),{"has-seconds":ne.showSeconds}])},[ne.arrowControl?Le("v-if",!0):(z(!0),se(At,{key:0},yn(g.value,ae=>(z(),De(v(Wl),{key:ae,ref_for:!0,ref:_e=>ie(_e,ae),class:J(v(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":v(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:_e=>A(ae),onMousemove:_e=>I(ae)},{default:xe(()=>[(z(!0),se(At,null,yn(S.value[ae],(_e,ke)=>(z(),se("li",{key:ke,class:J([v(a).be("spinner","item"),v(a).is("active",ke===x.value[ae]),v(a).is("disabled",_e)]),onClick:Te=>D(ae,{value:ke,disabled:_e})},[ae==="hours"?(z(),se(At,{key:0},[cn(Xe(("0"+(ne.amPmMode?ke%12||12:ke)).slice(-2))+Xe(T(ke)),1)],64)):(z(),se(At,{key:1},[cn(Xe(("0"+ke).slice(-2)),1)],64))],10,U0e))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),ne.arrowControl?(z(!0),se(At,{key:1},yn(g.value,ae=>(z(),se("div",{key:ae,class:J([v(a).be("spinner","wrapper"),v(a).is("arrow")]),onMouseenter:_e=>A(ae)},[_n((z(),De(v(Ut),{class:J(["arrow-up",v(a).be("spinner","arrow")])},{default:xe(()=>[de(v(Ax))]),_:1},8,["class"])),[[v(n2),q]]),_n((z(),De(v(Ut),{class:J(["arrow-down",v(a).be("spinner","arrow")])},{default:xe(()=>[de(v(eu))]),_:1},8,["class"])),[[v(n2),H]]),U("ul",{class:J(v(a).be("spinner","list"))},[(z(!0),se(At,null,yn(_.value[ae],(_e,ke)=>(z(),se("li",{key:ke,class:J([v(a).be("spinner","item"),v(a).is("active",_e===x.value[ae]),v(a).is("disabled",S.value[ae][_e])])},[v(Xt)(_e)?(z(),se(At,{key:0},[ae==="hours"?(z(),se(At,{key:0},[cn(Xe(("0"+(ne.amPmMode?_e%12||12:_e)).slice(-2))+Xe(T(_e)),1)],64)):(z(),se(At,{key:1},[cn(Xe(("0"+_e).slice(-2)),1)],64))],64)):Le("v-if",!0)],2))),128))],2)],42,$0e))),128)):Le("v-if",!0)],2))}});var UT=xt(V0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/basic-time-spinner.vue"]]);const H0e=Be({__name:"panel-time-pick",props:N0e,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=zt(jl),{arrowControl:r,disabledHours:o,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=s.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=Pz(o,a,l),f=ht("time"),{t:p,lang:m}=Jn(),b=X([0,2]),g=Lz(n),x=F(()=>ri(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),S=F(()=>n.format.includes("ss")),_=F(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),E=D=>{const K=Tn(D).locale(m.value),W=oe(K);return K.isSame(W)},T=()=>{const D=g.value;i("pick",D,!1),Nt(()=>{g.value=D})},A=(D=!1,K=!1)=>{K||i("pick",n.parsedValue,D)},I=D=>{if(!n.visible)return;const K=oe(D).millisecond(0);i("pick",K,!0)},P=(D,K)=>{i("select-range",D,K),b.value=[D,K]},k=D=>{const K=n.format,W=K.indexOf("HH"),Q=K.indexOf("mm"),ie=K.indexOf("ss"),ne=[],ce=[];W!==-1&&(ne.push(W),ce.push("hours")),Q!==-1&&(ne.push(Q),ce.push("minutes")),ie!==-1&&S.value&&(ne.push(ie),ce.push("seconds"));const _e=(ne.indexOf(b.value[0])+D+ne.length)%ne.length;R.start_emitSelectRange(ce[_e])},B=D=>{const K=Oi(D),{left:W,right:Q,up:ie,down:ne}=gt;if([W,Q].includes(K)){k(K===W?-1:1),D.preventDefault();return}if([ie,ne].includes(K)){const ce=K===ie?-1:1;R.start_scrollDown(ce),D.preventDefault();return}},{timePickerOptions:R,onSetOption:H,getAvailableTime:q}=Az({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),oe=D=>q(D,n.datetimeRole||"",!0),Z=D=>D?Tn(D,n.format).locale(m.value):null,V=()=>Tn(c).locale(m.value);return i("set-picker-option",["isValidValue",E]),i("set-picker-option",["parseUserInput",Z]),i("set-picker-option",["handleKeydownInput",B]),i("set-picker-option",["getRangeAvailableTime",oe]),i("set-picker-option",["getDefaultValue",V]),(D,K)=>(z(),De(Rr,{name:x.value},{default:xe(()=>[D.actualVisible||D.visible?(z(),se("div",{key:0,class:J(v(f).b("panel"))},[U("div",{class:J([v(f).be("panel","content"),{"has-seconds":S.value}])},[de(UT,{ref:"spinner",role:D.datetimeRole||"start","arrow-control":v(r),"show-seconds":S.value,"am-pm-mode":_.value,"spinner-date":D.parsedValue,"disabled-hours":v(o),"disabled-minutes":v(a),"disabled-seconds":v(l),onChange:I,onSetOption:v(H),onSelectRange:P},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),U("div",{class:J(v(f).be("panel","footer"))},[U("button",{type:"button",class:J([v(f).be("panel","btn"),"cancel"]),onClick:T},Xe(v(p)("el.datepicker.cancel")),3),U("button",{type:"button",class:J([v(f).be("panel","btn"),"confirm"]),onClick:K[0]||(K[0]=W=>A())},Xe(v(p)("el.datepicker.confirm")),3)],2)],2)):Le("v-if",!0)]),_:1},8,["name"]))}});var i2=xt(H0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-pick.vue"]]);const W0e=_t({...Tz,parsedValue:{type:Re(Array)}}),G0e=["disabled"],j0e=Be({__name:"panel-time-range",props:W0e,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=(ve,fe)=>{const Me=[];for(let ge=ve;ge<=fe;ge++)Me.push(ge);return Me},{t:r,lang:o}=Jn(),a=ht("time"),l=ht("picker"),c=zt(jl),{arrowControl:u,disabledHours:d,disabledMinutes:h,disabledSeconds:f,defaultValue:p}=c.props,m=F(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),E.value?"has-seconds":""]),b=F(()=>[a.be("range-picker","body"),a.be("panel","content"),a.is("arrow",u),E.value?"has-seconds":""]),g=F(()=>n.parsedValue[0]),x=F(()=>n.parsedValue[1]),S=Lz(n),_=()=>{const ve=S.value;i("pick",ve,!1),Nt(()=>{S.value=ve})},E=F(()=>n.format.includes("ss")),T=F(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),A=(ve=!1)=>{i("pick",[g.value,x.value],ve)},I=ve=>{B(ve.millisecond(0),x.value)},P=ve=>{B(g.value,ve.millisecond(0))},k=ve=>{const fe=ve.map(ge=>Tn(ge).locale(o.value)),Me=ie(fe);return fe[0].isSame(Me[0])&&fe[1].isSame(Me[1])},B=(ve,fe)=>{n.visible&&i("pick",[ve,fe],!0)},R=F(()=>g.value>x.value),H=X([0,2]),q=(ve,fe)=>{i("select-range",ve,fe,"min"),H.value=[ve,fe]},oe=F(()=>E.value?11:8),Z=(ve,fe)=>{i("select-range",ve,fe,"max");const Me=v(oe);H.value=[ve+Me,fe+Me]},V=ve=>{const fe=E.value?[0,3,6,11,14,17]:[0,3,8,11],Me=["hours","minutes"].concat(E.value?["seconds"]:[]),Qe=(fe.indexOf(H.value[0])+ve+fe.length)%fe.length,G=fe.length/2;Qe{const fe=Oi(ve),{left:Me,right:ge,up:Qe,down:G}=gt;if([Me,ge].includes(fe)){V(fe===Me?-1:1),ve.preventDefault();return}if([Qe,G].includes(fe)){const ee=fe===Qe?-1:1,j=H.value[0]{const Me=d?d(ve):[],ge=ve==="start",G=(fe||(ge?x.value:g.value)).hour(),ee=ge?s(G+1,23):s(0,G-1);return qS(Me,ee)},W=(ve,fe,Me)=>{const ge=h?h(ve,fe):[],Qe=fe==="start",G=Me||(Qe?x.value:g.value),ee=G.hour();if(ve!==ee)return ge;const j=G.minute(),he=Qe?s(j+1,59):s(0,j-1);return qS(ge,he)},Q=(ve,fe,Me,ge)=>{const Qe=f?f(ve,fe,Me):[],G=Me==="start",ee=ge||(G?x.value:g.value),j=ee.hour(),he=ee.minute();if(ve!==j||fe!==he)return Qe;const be=ee.second(),re=G?s(be+1,59):s(0,be-1);return qS(Qe,re)},ie=([ve,fe])=>[ke(ve,"start",!0,fe),ke(fe,"end",!1,ve)],{getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:ae}=Pz(K,W,Q),{timePickerOptions:_e,getAvailableTime:ke,onSetOption:Te}=Az({getAvailableHours:ne,getAvailableMinutes:ce,getAvailableSeconds:ae}),Ke=ve=>ve?pt(ve)?ve.map(fe=>Tn(fe,n.format).locale(o.value)):Tn(ve,n.format).locale(o.value):null,Fe=()=>{if(pt(p))return p.map(fe=>Tn(fe).locale(o.value));const ve=Tn(p).locale(o.value);return[ve,ve.add(60,"m")]};return i("set-picker-option",["parseUserInput",Ke]),i("set-picker-option",["isValidValue",k]),i("set-picker-option",["handleKeydownInput",D]),i("set-picker-option",["getDefaultValue",Fe]),i("set-picker-option",["getRangeAvailableTime",ie]),(ve,fe)=>ve.actualVisible?(z(),se("div",{key:0,class:J([v(a).b("range-picker"),v(l).b("panel")])},[U("div",{class:J(v(a).be("range-picker","content"))},[U("div",{class:J(v(a).be("range-picker","cell"))},[U("div",{class:J(v(a).be("range-picker","header"))},Xe(v(r)("el.datepicker.startTime")),3),U("div",{class:J(m.value)},[de(UT,{ref:"minSpinner",role:"start","show-seconds":E.value,"am-pm-mode":T.value,"arrow-control":v(u),"spinner-date":g.value,"disabled-hours":K,"disabled-minutes":W,"disabled-seconds":Q,onChange:I,onSetOption:v(Te),onSelectRange:q},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2),U("div",{class:J(v(a).be("range-picker","cell"))},[U("div",{class:J(v(a).be("range-picker","header"))},Xe(v(r)("el.datepicker.endTime")),3),U("div",{class:J(b.value)},[de(UT,{ref:"maxSpinner",role:"end","show-seconds":E.value,"am-pm-mode":T.value,"arrow-control":v(u),"spinner-date":x.value,"disabled-hours":K,"disabled-minutes":W,"disabled-seconds":Q,onChange:P,onSetOption:v(Te),onSelectRange:Z},null,8,["show-seconds","am-pm-mode","arrow-control","spinner-date","onSetOption"])],2)],2)],2),U("div",{class:J(v(a).be("panel","footer"))},[U("button",{type:"button",class:J([v(a).be("panel","btn"),"cancel"]),onClick:fe[0]||(fe[0]=Me=>_())},Xe(v(r)("el.datepicker.cancel")),3),U("button",{type:"button",class:J([v(a).be("panel","btn"),"confirm"]),disabled:R.value,onClick:fe[1]||(fe[1]=Me=>A())},Xe(v(r)("el.datepicker.confirm")),11,G0e)],2)],2)):Le("v-if",!0)}});var K0e=xt(j0e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-picker/src/time-picker-com/panel-time-range.vue"]]);Tn.extend(Mk);var q0e=Be({name:"ElTimePicker",install:null,props:{...Pk,isRange:Boolean},emits:[wn],setup(t,e){const n=X(),[i,s]=t.isRange?["timerange",K0e]:["time",i2],r=o=>e.emit(wn,o);return Xn(Ak,t.popperOptions),e.expose({focus:()=>{var o;(o=n.value)==null||o.focus()},blur:()=>{var o;(o=n.value)==null||o.blur()},handleOpen:()=>{var o;(o=n.value)==null||o.handleOpen()},handleClose:()=>{var o;(o=n.value)==null||o.handleClose()}}),()=>{var o;const a=(o=t.format)!=null?o:hg;return de(Mz,Dn(t,{ref:n,type:i,format:a,"onUpdate:modelValue":r}),{default:l=>de(s,l,null)})}}});const Y0e=En(q0e);var q_={exports:{}},X0e=q_.exports,c6;function Z0e(){return c6||(c6=1,(function(t,e){(function(n,i){t.exports=i()})(X0e,(function(){return function(n,i){var s=i.prototype,r=s.format;s.format=function(o){var a=this,l=this.$locale();if(!this.isValid())return r.bind(this)(o);var c=this.$utils(),u=(o||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}}));return r.bind(this)(u)}}}))})(q_)),q_.exports}var J0e=Z0e();const Q0e=ud(J0e);var Y_={exports:{}},eye=Y_.exports,u6;function tye(){return u6||(u6=1,(function(t,e){(function(n,i){t.exports=i()})(eye,(function(){var n="week",i="year";return function(s,r,o){var a=r.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=o(this).startOf(i).add(1,i).date(c),d=o(this).endOf(n);if(u.isBefore(d))return 1}var h=o(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?o(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}}))})(Y_)),Y_.exports}var nye=tye();const iye=ud(nye);var X_={exports:{}},sye=X_.exports,d6;function rye(){return d6||(d6=1,(function(t,e){(function(n,i){t.exports=i()})(sye,(function(){return function(n,i){i.prototype.weekYear=function(){var s=this.month(),r=this.week(),o=this.year();return r===1&&s===11?o+1:s===0&&r>=52?o-1:o}}}))})(X_)),X_.exports}var oye=rye();const aye=ud(oye);var Z_={exports:{}},lye=Z_.exports,h6;function cye(){return h6||(h6=1,(function(t,e){(function(n,i){t.exports=i()})(lye,(function(){return function(n,i,s){i.prototype.dayOfYear=function(r){var o=Math.round((s(this).startOf("day")-s(this).startOf("year"))/864e5)+1;return r==null?o:this.add(r-o,"day")}}}))})(Z_)),Z_.exports}var uye=cye();const dye=ud(uye);var J_={exports:{}},hye=J_.exports,f6;function fye(){return f6||(f6=1,(function(t,e){(function(n,i){t.exports=i()})(hye,(function(){return function(n,i){i.prototype.isSameOrAfter=function(s,r){return this.isSame(s,r)||this.isAfter(s,r)}}}))})(J_)),J_.exports}var pye=fye();const mye=ud(pye);var Q_={exports:{}},gye=Q_.exports,p6;function vye(){return p6||(p6=1,(function(t,e){(function(n,i){t.exports=i()})(gye,(function(){return function(n,i){i.prototype.isSameOrBefore=function(s,r){return this.isSame(s,r)||this.isBefore(s,r)}}}))})(Q_)),Q_.exports}var yye=vye();const bye=ud(yye),_ye=_t({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:Re([Date,Array,String,Number]),default:""},defaultValue:{type:Re([Date,Array])},defaultTime:{type:Re([Date,Array])},isRange:Boolean,...kk,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:Re(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),Lk=Symbol("rootPickerContextKey"),t1="ElIsDefaultFormat",wye=["date","dates","year","years","month","months","week","range"],Ik=_t({cellClassName:{type:Re(Function)},disabledDate:{type:Re(Function)},date:{type:Re(Object),required:!0},minDate:{type:Re(Object)},maxDate:{type:Re(Object)},parsedValue:{type:Re([Object,Array])},rangeState:{type:Re(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),Iz=_t({type:{type:Re(String),required:!0,values:Mme},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),Rk=_t({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:Re(Array)}}),Ok=t=>({type:String,values:wye,default:t}),xye=_t({...Iz,parsedValue:{type:Re([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),K0=t=>{if(!pt(t))return!1;const[e,n]=t;return Tn.isDayjs(e)&&Tn.isDayjs(n)&&Tn(e).isValid()&&Tn(n).isValid()&&e.isSameOrBefore(n)},Bx=(t,{lang:e,step:n=1,unit:i,unlinkPanels:s})=>{let r;if(pt(t)){let[o,a]=t.map(l=>Tn(l).locale(e));return s||(a=o.add(n,i)),[o,a]}else t?r=Tn(t):r=Tn();return r=r.locale(e),[r,r.add(n,i)]},Sye=(t,e,{columnIndexOffset:n,startDate:i,nextEndDate:s,now:r,unit:o,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:c})=>{for(let u=0;u{const s=Tn().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second()),r=s.daysInMonth();return dh(r).map(o=>s.add(o,"day").toDate())},fg=(t,e,n,i,s)=>{const r=Tn().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),o=s2(t,e,n,i).find(a=>!s?.(a));return o?Tn(o).locale(i):r.locale(i)},r2=(t,e,n)=>{const i=t.year();if(!n?.(t.toDate()))return t.locale(e);const s=t.month();if(!s2(t,i,s,e).every(n))return fg(t,i,s,e,n);for(let r=0;r<12;r++)if(!s2(t,i,r,e).every(n))return fg(t,i,r,e,n);return t},pg=(t,e,n,i)=>{if(pt(t))return t.map(s=>pg(s,e,n,i));if(Gt(t)){const s=i?.value?Tn(t):Tn(t,e);if(!s.isValid())return s}return Tn(t,e).locale(n)},Eye=_t({...Ik,showWeekNumber:Boolean,selectionMode:Ok("date")}),Cye=["changerange","pick","select"],o2=(t="")=>["normal","today"].includes(t),Tye=(t,e)=>{const{lang:n}=Jn(),i=X(),s=X(),r=X(),o=X(),a=X([[],[],[],[],[],[]]);let l=!1;const c=t.date.$locale().weekStart||7,u=t.date.locale("en").localeData().weekdaysShort().map(K=>K.toLowerCase()),d=F(()=>c>3?7-c:-c),h=F(()=>{const K=t.date.startOf("month");return K.subtract(K.day()||7,"day")}),f=F(()=>u.concat(u).slice(c,c+7)),p=F(()=>s9(v(_)).some(K=>K.isCurrent)),m=F(()=>{const K=t.date.startOf("month"),W=K.day()||7,Q=K.daysInMonth(),ie=K.subtract(1,"month").daysInMonth();return{startOfMonthDay:W,dateCountOfMonth:Q,dateCountOfLastMonth:ie}}),b=F(()=>t.selectionMode==="dates"?bo(t.parsedValue):[]),g=(K,{count:W,rowIndex:Q,columnIndex:ie})=>{const{startOfMonthDay:ne,dateCountOfMonth:ce,dateCountOfLastMonth:ae}=v(m),_e=v(d);if(Q>=0&&Q<=1){const ke=ne+_e<0?7+ne+_e:ne+_e;if(ie+Q*7>=ke)return K.text=W,!0;K.text=ae-(ke-ie%7)+1+Q*7,K.type="prev-month"}else return W<=ce?K.text=W:(K.text=W-ce,K.type="next-month"),!0;return!1},x=(K,{columnIndex:W,rowIndex:Q},ie)=>{const{disabledDate:ne,cellClassName:ce}=t,ae=v(b),_e=g(K,{count:ie,rowIndex:Q,columnIndex:W}),ke=K.dayjs.toDate();return K.selected=ae.find(Te=>Te.isSame(K.dayjs,"day")),K.isSelected=!!K.selected,K.isCurrent=T(K),K.disabled=ne?.(ke),K.customClass=ce?.(ke),_e},S=K=>{if(t.selectionMode==="week"){const[W,Q]=t.showWeekNumber?[1,7]:[0,6],ie=D(K[W+1]);K[W].inRange=ie,K[W].start=ie,K[Q].inRange=ie,K[Q].end=ie}},_=F(()=>{const{minDate:K,maxDate:W,rangeState:Q,showWeekNumber:ie}=t,ne=v(d),ce=v(a),ae="day";let _e=1;if(Sye({row:6,column:7},ce,{startDate:K,columnIndexOffset:ie?1:0,nextEndDate:Q.endDate||W||Q.selecting&&K||null,now:Tn().locale(v(n)).startOf(ae),unit:ae,relativeDateGetter:ke=>v(h).add(ke-ne,ae),setCellMetadata:(...ke)=>{x(...ke,_e)&&(_e+=1)},setRowMetadata:S}),ie)for(let ke=0;ke<6;ke++)ce[ke][1].dayjs&&(ce[ke][0]={type:"week",text:ce[ke][1].dayjs.week()});return ce});We(()=>t.date,async()=>{var K;(K=v(i))!=null&&K.contains(document.activeElement)&&(await Nt(),await E())});const E=async()=>{var K;return(K=v(s))==null?void 0:K.focus()},T=K=>t.selectionMode==="date"&&o2(K.type)&&A(K,t.parsedValue),A=(K,W)=>W?Tn(W).locale(v(n)).isSame(t.date.date(Number(K.text)),"day"):!1,I=(K,W)=>{const Q=K*7+(W-(t.showWeekNumber?1:0))-v(d);return v(h).add(Q,"day")},P=K=>{var W;if(!t.rangeState.selecting)return;let Q=K.target;if(Q.tagName==="SPAN"&&(Q=(W=Q.parentNode)==null?void 0:W.parentNode),Q.tagName==="DIV"&&(Q=Q.parentNode),Q.tagName!=="TD")return;const ie=Q.parentNode.rowIndex-1,ne=Q.cellIndex;v(_)[ie][ne].disabled||(ie!==v(r)||ne!==v(o))&&(r.value=ie,o.value=ne,e("changerange",{selecting:!0,endDate:I(ie,ne)}))},k=K=>!v(p)&&K?.text===1&&o2(K.type)||K.isCurrent,B=K=>{l||v(p)||t.selectionMode!=="date"||V(K,!0)},R=K=>{K.target.closest("td")&&(l=!0)},H=K=>{K.target.closest("td")&&(l=!1)},q=K=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:K,maxDate:null}),e("select",!0)):(K>=t.minDate?e("pick",{minDate:t.minDate,maxDate:K}):e("pick",{minDate:K,maxDate:t.minDate}),e("select",!1))},oe=K=>{const W=K.week(),Q=`${K.year()}w${W}`;e("pick",{year:K.year(),week:W,value:Q,date:K.startOf("week")})},Z=(K,W)=>{const Q=W?bo(t.parsedValue).filter(ie=>ie?.valueOf()!==K.valueOf()):bo(t.parsedValue).concat([K]);e("pick",Q)},V=(K,W=!1)=>{if(t.disabled)return;const Q=K.target.closest("td");if(!Q)return;const ie=Q.parentNode.rowIndex-1,ne=Q.cellIndex,ce=v(_)[ie][ne];if(ce.disabled||ce.type==="week")return;const ae=I(ie,ne);switch(t.selectionMode){case"range":{q(ae);break}case"date":{e("pick",ae,W);break}case"week":{oe(ae);break}case"dates":{Z(ae,!!ce.selected);break}}},D=K=>{if(t.selectionMode!=="week")return!1;let W=t.date.startOf("day");if(K.type==="prev-month"&&(W=W.subtract(1,"month")),K.type==="next-month"&&(W=W.add(1,"month")),W=W.date(Number.parseInt(K.text,10)),t.parsedValue&&!pt(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(W,"day")}return!1};return{WEEKS:f,rows:_,tbodyRef:i,currentCellRef:s,focus:E,isCurrent:T,isWeekActive:D,isSelectedCell:k,handlePickDate:V,handleMouseUp:H,handleMouseDown:R,handleMouseMove:P,handleFocus:B}},Mye=(t,{isCurrent:e,isWeekActive:n})=>{const i=ht("date-table"),{t:s}=Jn(),r=F(()=>[i.b(),i.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),o=F(()=>s("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return o2(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(o2(c.type)||t.selectionMode==="week")&&(u.push("in-range"),c.start&&u.push("start-date"),c.end&&u.push("end-date")),(c.disabled||t.disabled)&&u.push("disabled"),c.selected&&u.push("selected"),c.customClass&&u.push(c.customClass),u.join(" ")},l=c=>[i.e("row"),{current:n(c)}];return{tableKls:r,tableLabel:o,weekHeaderClass:i.e("week-header"),getCellClasses:a,getRowKls:l,t:s}},Aye=_t({cell:{type:Re(Object)}});var Dk=Be({name:"ElDatePickerCell",props:Aye,setup(t){const e=ht("date-table-cell"),{slots:n}=zt(Lk);return()=>{const{cell:i}=t;return Ue(n,"default",{...i},()=>{var s;return[de("div",{class:e.b()},[de("span",{class:e.e("text")},[(s=i?.renderText)!=null?s:i?.text])])]})}}});const kye=["aria-label"],Pye=["aria-label"],Lye=["aria-current","aria-selected","tabindex","aria-disabled"],Iye=Be({__name:"basic-date-table",props:Eye,emits:Cye,setup(t,{expose:e,emit:n}){const i=t,s=n,{WEEKS:r,rows:o,tbodyRef:a,currentCellRef:l,focus:c,isCurrent:u,isWeekActive:d,isSelectedCell:h,handlePickDate:f,handleMouseUp:p,handleMouseDown:m,handleMouseMove:b,handleFocus:g}=Tye(i,s),{tableLabel:x,tableKls:S,getCellClasses:_,getRowKls:E,weekHeaderClass:T,t:A}=Mye(i,{isCurrent:u,isWeekActive:d});let I=!1;return gi(()=>{I=!0}),e({focus:c}),(P,k)=>(z(),se("table",{"aria-label":v(x),class:J(v(S)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:k[1]||(k[1]=(...B)=>v(f)&&v(f)(...B)),onMousemove:k[2]||(k[2]=(...B)=>v(b)&&v(b)(...B)),onMousedown:k[3]||(k[3]=(...B)=>v(m)&&v(m)(...B)),onMouseup:k[4]||(k[4]=(...B)=>v(p)&&v(p)(...B))},[U("tbody",{ref_key:"tbodyRef",ref:a},[U("tr",null,[P.showWeekNumber?(z(),se("th",{key:0,scope:"col",class:J(v(T))},null,2)):Le("v-if",!0),(z(!0),se(At,null,yn(v(r),(B,R)=>(z(),se("th",{key:R,"aria-label":v(A)("el.datepicker.weeksFull."+B),scope:"col"},Xe(v(A)("el.datepicker.weeks."+B)),9,Pye))),128))]),(z(!0),se(At,null,yn(v(o),(B,R)=>(z(),se("tr",{key:R,class:J(v(E)(P.showWeekNumber?B[2]:B[1]))},[(z(!0),se(At,null,yn(B,(H,q)=>(z(),se("td",{key:`${R}.${q}`,ref_for:!0,ref:oe=>!v(I)&&v(h)(H)&&(l.value=oe),class:J(v(_)(H)),"aria-current":H.isCurrent?"date":void 0,"aria-selected":H.isCurrent,tabindex:P.disabled?void 0:v(h)(H)?0:-1,"aria-disabled":P.disabled,onFocus:k[0]||(k[0]=(...oe)=>v(g)&&v(g)(...oe))},[de(v(Dk),{cell:H},null,8,["cell"])],42,Lye))),128))],2))),128))],512)],42,kye))}});var $T=xt(Iye,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-date-table.vue"]]);const Rye=_t({...Ik,selectionMode:Ok("month")}),Oye=["aria-label"],Dye=["aria-selected","aria-label","tabindex","onKeydown"],Nye=Be({__name:"basic-month-table",props:Rye,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("month-table"),{t:o,lang:a}=Jn(),l=X(),c=X(),u=X(i.date.locale("en").localeData().monthsShort().map(_=>_.toLowerCase())),d=X([[],[],[]]),h=X(),f=X(),p=F(()=>{var _,E,T;const A=d.value,I=Tn().locale(a.value).startOf("month");for(let P=0;P<3;P++){const k=A[P];for(let B=0;B<4;B++){const R=k[B]||(k[B]={row:P,column:B,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});R.type="normal";const H=P*4+B,q=i.date.startOf("year").month(H),oe=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;R.inRange=!!(i.minDate&&q.isSameOrAfter(i.minDate,"month")&&oe&&q.isSameOrBefore(oe,"month"))||!!(i.minDate&&q.isSameOrBefore(i.minDate,"month")&&oe&&q.isSameOrAfter(oe,"month")),(_=i.minDate)!=null&&_.isSameOrAfter(oe)?(R.start=!!(oe&&q.isSame(oe,"month")),R.end=i.minDate&&q.isSame(i.minDate,"month")):(R.start=!!(i.minDate&&q.isSame(i.minDate,"month")),R.end=!!(oe&&q.isSame(oe,"month"))),I.isSame(q)&&(R.type="today");const V=q.toDate();R.text=H,R.disabled=((E=i.disabledDate)==null?void 0:E.call(i,V))||!1,R.date=V,R.customClass=(T=i.cellClassName)==null?void 0:T.call(i,V),R.dayjs=q,R.timestamp=q.valueOf(),R.isSelected=g(R)}}return A}),m=()=>{var _;(_=c.value)==null||_.focus()},b=_=>{const E={},T=i.date.year(),A=new Date,I=_.text;return E.disabled=i.disabled||(i.disabledDate?s2(i.date,T,I,a.value).every(i.disabledDate):!1),E.current=bo(i.parsedValue).some(P=>Tn.isDayjs(P)&&P.year()===T&&P.month()===I),E.today=A.getFullYear()===T&&A.getMonth()===I,_.customClass&&(E[_.customClass]=!0),_.inRange&&(E["in-range"]=!0,_.start&&(E["start-date"]=!0),_.end&&(E["end-date"]=!0)),E},g=_=>{const E=i.date.year(),T=_.text;return bo(i.date).some(A=>A.year()===E&&A.month()===T)},x=_=>{var E;if(!i.rangeState.selecting)return;let T=_.target;if(T.tagName==="SPAN"&&(T=(E=T.parentNode)==null?void 0:E.parentNode),T.tagName==="DIV"&&(T=T.parentNode),T.tagName!=="TD")return;const A=T.parentNode.rowIndex,I=T.cellIndex;p.value[A][I].disabled||(A!==h.value||I!==f.value)&&(h.value=A,f.value=I,s("changerange",{selecting:!0,endDate:i.date.startOf("year").month(A*4+I)}))},S=_=>{var E;if(i.disabled)return;const T=(E=_.target)==null?void 0:E.closest("td");if(T?.tagName!=="TD"||Oc(T,"disabled"))return;const A=T.cellIndex,P=T.parentNode.rowIndex*4+A,k=i.date.startOf("year").month(P);if(i.selectionMode==="months"){if(_.type==="keydown"){s("pick",bo(i.parsedValue),!1);return}const B=fg(i.date,i.date.year(),P,a.value,i.disabledDate),R=Oc(T,"current")?bo(i.parsedValue).filter(H=>H?.year()!==B.year()||H?.month()!==B.month()):bo(i.parsedValue).concat([Tn(B)]);s("pick",R)}else i.selectionMode==="range"?i.rangeState.selecting?(i.minDate&&k>=i.minDate?s("pick",{minDate:i.minDate,maxDate:k}):s("pick",{minDate:k,maxDate:i.minDate}),s("select",!1)):(s("pick",{minDate:k,maxDate:null}),s("select",!0)):s("pick",P)};return We(()=>i.date,async()=>{var _,E;(_=l.value)!=null&&_.contains(document.activeElement)&&(await Nt(),(E=c.value)==null||E.focus())}),e({focus:m}),(_,E)=>(z(),se("table",{role:"grid","aria-label":v(o)("el.datepicker.monthTablePrompt"),class:J(v(r).b()),onClick:S,onMousemove:x},[U("tbody",{ref_key:"tbodyRef",ref:l},[(z(!0),se(At,null,yn(p.value,(T,A)=>(z(),se("tr",{key:A},[(z(!0),se(At,null,yn(T,(I,P)=>(z(),se("td",{key:P,ref_for:!0,ref:k=>I.isSelected&&(c.value=k),class:J(b(I)),"aria-selected":!!I.isSelected,"aria-label":v(o)(`el.datepicker.month${+I.text+1}`),tabindex:I.isSelected?0:-1,onKeydown:[_s(un(S,["prevent","stop"]),["space"]),_s(un(S,["prevent","stop"]),["enter"])]},[de(v(Dk),{cell:{...I,renderText:v(o)("el.datepicker.months."+u.value[I.text])}},null,8,["cell"])],42,Dye))),128))]))),128))],512)],42,Oye))}});var q0=xt(Nye,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-month-table.vue"]]);const Bye=_t({...Ik,selectionMode:Ok("year")}),Fye=["aria-label"],zye=["aria-selected","aria-label","tabindex","onKeydown"],Uye=Be({__name:"basic-year-table",props:Bye,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(E,T)=>{const A=Tn(String(E)).locale(T).startOf("year"),P=A.endOf("year").dayOfYear();return dh(P).map(k=>A.add(k,"day").toDate())},s=t,r=n,o=ht("year-table"),{t:a,lang:l}=Jn(),c=X(),u=X(),d=F(()=>Math.floor(s.date.year()/10)*10),h=X([[],[],[]]),f=X(),p=X(),m=F(()=>{var E,T,A;const I=h.value,P=Tn().locale(l.value).startOf("year");for(let k=0;k<3;k++){const B=I[k];for(let R=0;R<4&&!(k*4+R>=10);R++){let H=B[R];H||(H={row:k,column:R,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),H.type="normal";const q=k*4+R+d.value,oe=Tn().year(q),Z=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;H.inRange=!!(s.minDate&&oe.isSameOrAfter(s.minDate,"year")&&Z&&oe.isSameOrBefore(Z,"year"))||!!(s.minDate&&oe.isSameOrBefore(s.minDate,"year")&&Z&&oe.isSameOrAfter(Z,"year")),(E=s.minDate)!=null&&E.isSameOrAfter(Z)?(H.start=!!(Z&&oe.isSame(Z,"year")),H.end=!!(s.minDate&&oe.isSame(s.minDate,"year"))):(H.start=!!(s.minDate&&oe.isSame(s.minDate,"year")),H.end=!!(Z&&oe.isSame(Z,"year"))),P.isSame(oe)&&(H.type="today"),H.text=q;const D=oe.toDate();H.disabled=((T=s.disabledDate)==null?void 0:T.call(s,D))||!1,H.date=D,H.customClass=(A=s.cellClassName)==null?void 0:A.call(s,D),H.dayjs=oe,H.timestamp=oe.valueOf(),H.isSelected=x(H),B[R]=H}}return I}),b=()=>{var E;(E=u.value)==null||E.focus()},g=E=>{const T={},A=Tn().locale(l.value),I=E.text;return T.disabled=s.disabled||(s.disabledDate?i(I,l.value).every(s.disabledDate):!1),T.today=A.year()===I,T.current=bo(s.parsedValue).some(P=>P.year()===I),E.customClass&&(T[E.customClass]=!0),E.inRange&&(T["in-range"]=!0,E.start&&(T["start-date"]=!0),E.end&&(T["end-date"]=!0)),T},x=E=>{const T=E.text;return bo(s.date).some(A=>A.year()===T)},S=E=>{var T;if(s.disabled)return;const A=(T=E.target)==null?void 0:T.closest("td");if(!A||!A.textContent||Oc(A,"disabled"))return;const I=A.cellIndex,k=A.parentNode.rowIndex*4+I+d.value,B=Tn().year(k);if(s.selectionMode==="range")s.rangeState.selecting?(s.minDate&&B>=s.minDate?r("pick",{minDate:s.minDate,maxDate:B}):r("pick",{minDate:B,maxDate:s.minDate}),r("select",!1)):(r("pick",{minDate:B,maxDate:null}),r("select",!0));else if(s.selectionMode==="years"){if(E.type==="keydown"){r("pick",bo(s.parsedValue),!1);return}const R=r2(B.startOf("year"),l.value,s.disabledDate),H=Oc(A,"current")?bo(s.parsedValue).filter(q=>q?.year()!==k):bo(s.parsedValue).concat([R]);r("pick",H)}else r("pick",k)},_=E=>{var T;if(!s.rangeState.selecting)return;const A=(T=E.target)==null?void 0:T.closest("td");if(!A)return;const I=A.parentNode.rowIndex,P=A.cellIndex;m.value[I][P].disabled||(I!==f.value||P!==p.value)&&(f.value=I,p.value=P,r("changerange",{selecting:!0,endDate:Tn().year(d.value).add(I*4+P,"year")}))};return We(()=>s.date,async()=>{var E,T;(E=c.value)!=null&&E.contains(document.activeElement)&&(await Nt(),(T=u.value)==null||T.focus())}),e({focus:b}),(E,T)=>(z(),se("table",{role:"grid","aria-label":v(a)("el.datepicker.yearTablePrompt"),class:J(v(o).b()),onClick:S,onMousemove:_},[U("tbody",{ref_key:"tbodyRef",ref:c},[(z(!0),se(At,null,yn(m.value,(A,I)=>(z(),se("tr",{key:I},[(z(!0),se(At,null,yn(A,(P,k)=>(z(),se("td",{key:`${I}_${k}`,ref_for:!0,ref:B=>P.isSelected&&(u.value=B),class:J(["available",g(P)]),"aria-selected":P.isSelected,"aria-label":String(P.text),tabindex:P.isSelected?0:-1,onKeydown:[_s(un(S,["prevent","stop"]),["space"]),_s(un(S,["prevent","stop"]),["enter"])]},[de(v(Dk),{cell:P},null,8,["cell"])],42,zye))),128))]))),128))],512)],42,Fye))}});var Y0=xt(Uye,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/basic-year-table.vue"]]);const $ye=["disabled","onClick"],Vye=["aria-label","disabled"],Hye=["aria-label","disabled"],Wye=["tabindex","aria-disabled"],Gye=["tabindex","aria-disabled"],jye=["aria-label","disabled"],Kye=["aria-label","disabled"],qye=Be({__name:"panel-date-pick",props:xye,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(Ze,vt,qe)=>!0,i=t,s=e,r=ht("picker-panel"),o=ht("date-picker"),a=ld(),l=tr(),{t:c,lang:u}=Jn(),d=zt(jl),h=zt(t1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:b}=d.props,g=Ei(d.props,"defaultValue"),x=X(),S=X(Tn().locale(u.value)),_=X(!1);let E=!1;const T=F(()=>Tn(b).locale(u.value)),A=F(()=>S.value.month()),I=F(()=>S.value.year()),P=X([]),k=X(null),B=X(null),R=Ze=>P.value.length>0?n(Ze,P.value,i.format||"HH:mm:ss"):!0,H=Ze=>b&&!j.value&&!_.value&&!E?T.value.year(Ze.year()).month(Ze.month()).date(Ze.date()):Ke.value?Ze.millisecond(0):Ze.startOf("day"),q=(Ze,...vt)=>{if(!Ze)s("pick",Ze,...vt);else if(pt(Ze)){const qe=Ze.map(H);s("pick",qe,...vt)}else s("pick",H(Ze),...vt);k.value=null,B.value=null,_.value=!1,E=!1},oe=async(Ze,vt)=>{if(Q.value==="date"&&Tn.isDayjs(Ze)){const qe=vv(i.parsedValue);let kt=qe?qe.year(Ze.year()).month(Ze.month()).date(Ze.date()):Ze;R(kt),S.value=kt,q(kt,Ke.value||vt)}else Q.value==="week"?q(Ze.date):Q.value==="dates"&&q(Ze,!0)},Z=Ze=>{const vt=Ze?"add":"subtract";S.value=S.value[vt](1,"month"),$t("month")},V=Ze=>{const vt=S.value,qe=Ze?"add":"subtract";S.value=D.value==="year"?vt[qe](10,"year"):vt[qe](1,"year"),$t("year")},D=X("date"),K=F(()=>{const Ze=c("el.datepicker.year");if(D.value==="year"){const vt=Math.floor(I.value/10)*10;return Ze?`${vt} ${Ze} - ${vt+9} ${Ze}`:`${vt} - ${vt+9}`}return`${I.value} ${Ze}`}),W=Ze=>{const vt=Kt(Ze.value)?Ze.value():Ze.value;if(vt){E=!0,q(Tn(vt).locale(u.value));return}Ze.onClick&&Ze.onClick({attrs:a,slots:l,emit:s})},Q=F(()=>{const{type:Ze}=i;return["week","month","months","year","years","dates"].includes(Ze)?Ze:"date"}),ie=F(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),ne=F(()=>Q.value==="date"?D.value:Q.value),ce=F(()=>!!f.length),ae=async(Ze,vt)=>{Q.value==="month"?(S.value=fg(S.value,S.value.year(),Ze,u.value,p),q(S.value,!1)):Q.value==="months"?q(Ze,vt??!0):(S.value=fg(S.value,S.value.year(),Ze,u.value,p),D.value="date",["month","year","date","week"].includes(Q.value)&&(q(S.value,!0),await Nt(),Jt())),$t("month")},_e=async(Ze,vt)=>{if(Q.value==="year"){const qe=S.value.startOf("year").year(Ze);S.value=r2(qe,u.value,p),q(S.value,!1)}else if(Q.value==="years")q(Ze,vt??!0);else{const qe=S.value.year(Ze);S.value=r2(qe,u.value,p),D.value="month",["month","year","date","week"].includes(Q.value)&&(q(S.value,!0),await Nt(),Jt())}$t("year")},ke=Es(),Te=async Ze=>{ke.value||(D.value=Ze,await Nt(),Jt())},Ke=F(()=>i.type==="datetime"||i.type==="datetimerange"),Fe=F(()=>{const Ze=Ke.value||Q.value==="dates",vt=Q.value==="years",qe=Q.value==="months",kt=D.value==="date",Je=D.value==="year",Ft=D.value==="month";return Ze&&kt||vt&&Je||qe&&Ft}),ve=F(()=>!ie.value&&i.showNow||i.showConfirm),fe=F(()=>p?i.parsedValue?pt(i.parsedValue)?p(i.parsedValue[0].toDate()):p(i.parsedValue.toDate()):!0:!1),Me=()=>{if(ie.value)q(i.parsedValue);else{let Ze=vv(i.parsedValue);if(!Ze){const vt=Tn(b).locale(u.value),qe=dt();Ze=vt.year(qe.year()).month(qe.month()).date(qe.date())}S.value=Ze,q(Ze)}},ge=F(()=>p?p(Tn().locale(u.value).toDate()):!1),Qe=()=>{const vt=Tn().locale(u.value).toDate();_.value=!0,(!p||!p(vt))&&R(vt)&&(S.value=Tn().locale(u.value),q(S.value))},G=F(()=>i.timeFormat||V7(i.format)||hg),ee=F(()=>i.dateFormat||$7(i.format)||eh),j=F(()=>B.value?B.value:!i.parsedValue&&!g.value?void 0:(vv(i.parsedValue)||S.value).format(G.value)),he=F(()=>k.value?k.value:!i.parsedValue&&!g.value?void 0:(vv(i.parsedValue)||S.value).format(ee.value)),be=X(!1),re=()=>{be.value=!0},le=()=>{be.value=!1},Ce=Ze=>({hour:Ze.hour(),minute:Ze.minute(),second:Ze.second(),year:Ze.year(),month:Ze.month(),date:Ze.date()}),Ee=(Ze,vt,qe)=>{const{hour:kt,minute:Je,second:Ft}=Ce(Ze),Ne=vv(i.parsedValue),et=Ne?Ne.hour(kt).minute(Je).second(Ft):Ze;S.value=et,q(S.value,!0),qe||(be.value=vt)},Oe=Ze=>{const vt=Tn(Ze,G.value).locale(u.value);if(vt.isValid()&&R(vt)){const{year:qe,month:kt,date:Je}=Ce(S.value);S.value=vt.year(qe).month(kt).date(Je),B.value=null,be.value=!1,q(S.value,!0)}},Ge=Ze=>{const vt=pg(Ze,ee.value,u.value,h);if(vt.isValid()){if(p&&p(vt.toDate()))return;const{hour:qe,minute:kt,second:Je}=Ce(S.value);S.value=vt.hour(qe).minute(kt).second(Je),k.value=null,q(S.value,!0)}},$e=Ze=>Tn.isDayjs(Ze)&&Ze.isValid()&&(p?!p(Ze.toDate()):!0),ot=Ze=>pg(Ze,i.format,u.value,h),dt=()=>{const Ze=Tn(g.value).locale(u.value);if(!g.value){const vt=T.value;return Tn().hour(vt.hour()).minute(vt.minute()).second(vt.second()).locale(u.value)}return Ze},Jt=()=>{var Ze;["week","month","year","date"].includes(Q.value)&&((Ze=x.value)==null||Ze.focus())},at=()=>{Jt(),Q.value==="week"&&Bt(gt.down)},Mt=Ze=>{const vt=Oi(Ze);[gt.up,gt.down,gt.left,gt.right,gt.home,gt.end,gt.pageUp,gt.pageDown].includes(vt)&&(Bt(vt),Ze.stopPropagation(),Ze.preventDefault()),[gt.enter,gt.space,gt.numpadEnter].includes(vt)&&k.value===null&&B.value===null&&(Ze.preventDefault(),q(S.value,!1))},Bt=Ze=>{var vt;const{up:qe,down:kt,left:Je,right:Ft,home:Ne,end:et,pageUp:ut,pageDown:Qt}=gt,Cn={year:{[qe]:-4,[kt]:4,[Je]:-1,[Ft]:1,offset:(Tt,rt)=>Tt.setFullYear(Tt.getFullYear()+rt)},month:{[qe]:-4,[kt]:4,[Je]:-1,[Ft]:1,offset:(Tt,rt)=>Tt.setMonth(Tt.getMonth()+rt)},week:{[qe]:-1,[kt]:1,[Je]:-1,[Ft]:1,offset:(Tt,rt)=>Tt.setDate(Tt.getDate()+rt*7)},date:{[qe]:-7,[kt]:7,[Je]:-1,[Ft]:1,[Ne]:Tt=>-Tt.getDay(),[et]:Tt=>-Tt.getDay()+6,[ut]:Tt=>-new Date(Tt.getFullYear(),Tt.getMonth(),0).getDate(),[Qt]:Tt=>new Date(Tt.getFullYear(),Tt.getMonth()+1,0).getDate(),offset:(Tt,rt)=>Tt.setDate(Tt.getDate()+rt)}},ei=S.value.toDate();for(;Math.abs(S.value.diff(ei,"year",!0))<1;){const Tt=Cn[ne.value];if(!Tt)return;if(Tt.offset(ei,Kt(Tt[Ze])?Tt[Ze](ei):(vt=Tt[Ze])!=null?vt:0),p&&p(ei))break;const rt=Tn(ei).locale(u.value);S.value=rt,s("pick",rt,!0);break}},$t=Ze=>{s("panel-change",S.value.toDate(),Ze,D.value)};return We(()=>Q.value,Ze=>{if(["month","year"].includes(Ze)){D.value=Ze;return}else if(Ze==="years"){D.value="year";return}else if(Ze==="months"){D.value="month";return}D.value="date"},{immediate:!0}),We(()=>g.value,Ze=>{Ze&&(S.value=dt())},{immediate:!0}),We(()=>i.parsedValue,Ze=>{if(Ze){if(ie.value||pt(Ze))return;S.value=Ze}else S.value=dt()},{immediate:!0}),s("set-picker-option",["isValidValue",$e]),s("set-picker-option",["parseUserInput",ot]),s("set-picker-option",["handleFocusPicker",at]),(Ze,vt)=>(z(),se("div",{class:J([v(r).b(),v(o).b(),v(r).is("border",Ze.border),v(r).is("disabled",v(ke)),{"has-sidebar":Ze.$slots.sidebar||ce.value,"has-time":Ke.value}])},[U("div",{class:J(v(r).e("body-wrapper"))},[Ue(Ze.$slots,"sidebar",{class:J(v(r).e("sidebar"))}),ce.value?(z(),se("div",{key:0,class:J(v(r).e("sidebar"))},[(z(!0),se(At,null,yn(v(f),(qe,kt)=>(z(),se("button",{key:kt,type:"button",disabled:v(ke),class:J(v(r).e("shortcut")),onClick:Je=>W(qe)},Xe(qe.text),11,$ye))),128))],2)):Le("v-if",!0),U("div",{class:J(v(r).e("body"))},[Ke.value?(z(),se("div",{key:0,class:J(v(o).e("time-header"))},[U("span",{class:J(v(o).e("editor-wrap"))},[de(v(wo),{placeholder:v(c)("el.datepicker.selectDate"),"model-value":he.value,size:"small","validate-event":!1,disabled:v(ke),readonly:!Ze.editable,onInput:vt[0]||(vt[0]=qe=>k.value=qe),onChange:Ge},null,8,["placeholder","model-value","disabled","readonly"])],2),_n((z(),se("span",{class:J(v(o).e("editor-wrap"))},[de(v(wo),{placeholder:v(c)("el.datepicker.selectTime"),"model-value":j.value,size:"small","validate-event":!1,disabled:v(ke),readonly:!Ze.editable,onFocus:re,onInput:vt[1]||(vt[1]=qe=>B.value=qe),onChange:Oe},null,8,["placeholder","model-value","disabled","readonly"]),de(v(i2),{visible:be.value,format:G.value,"parsed-value":S.value,onPick:Ee},null,8,["visible","format","parsed-value"])],2)),[[v(Ch),le]])],2)):Le("v-if",!0),_n(U("div",{class:J([v(o).e("header"),(D.value==="year"||D.value==="month")&&v(o).em("header","bordered")])},[U("span",{class:J(v(o).e("prev-btn"))},[U("button",{type:"button","aria-label":v(c)("el.datepicker.prevYear"),class:J(["d-arrow-left",v(r).e("icon-btn")]),disabled:v(ke),onClick:vt[2]||(vt[2]=qe=>V(!1))},[Ue(Ze.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,Vye),_n(U("button",{type:"button","aria-label":v(c)("el.datepicker.prevMonth"),class:J([v(r).e("icon-btn"),"arrow-left"]),disabled:v(ke),onClick:vt[3]||(vt[3]=qe=>Z(!1))},[Ue(Ze.$slots,"prev-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1})])],10,Hye),[[ci,D.value==="date"]])],2),U("span",{role:"button",class:J(v(o).e("header-label")),"aria-live":"polite",tabindex:Ze.disabled?void 0:0,"aria-disabled":Ze.disabled,onKeydown:vt[4]||(vt[4]=_s(qe=>Te("year"),["enter"])),onClick:vt[5]||(vt[5]=qe=>Te("year"))},Xe(K.value),43,Wye),_n(U("span",{role:"button","aria-live":"polite",tabindex:Ze.disabled?void 0:0,"aria-disabled":Ze.disabled,class:J([v(o).e("header-label"),{active:D.value==="month"}]),onKeydown:vt[6]||(vt[6]=_s(qe=>Te("month"),["enter"])),onClick:vt[7]||(vt[7]=qe=>Te("month"))},Xe(v(c)(`el.datepicker.month${A.value+1}`)),43,Gye),[[ci,D.value==="date"]]),U("span",{class:J(v(o).e("next-btn"))},[_n(U("button",{type:"button","aria-label":v(c)("el.datepicker.nextMonth"),class:J([v(r).e("icon-btn"),"arrow-right"]),disabled:v(ke),onClick:vt[8]||(vt[8]=qe=>Z(!0))},[Ue(Ze.$slots,"next-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})])],10,jye),[[ci,D.value==="date"]]),U("button",{type:"button","aria-label":v(c)("el.datepicker.nextYear"),class:J([v(r).e("icon-btn"),"d-arrow-right"]),disabled:v(ke),onClick:vt[9]||(vt[9]=qe=>V(!0))},[Ue(Ze.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,Kye)],2)],2),[[ci,D.value!=="time"]]),U("div",{class:J(v(r).e("content")),onKeydown:Mt},[D.value==="date"?(z(),De($T,{key:0,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:S.value,"parsed-value":Ze.parsedValue,"disabled-date":v(p),disabled:v(ke),"cell-class-name":v(m),"show-week-number":Ze.showWeekNumber,onPick:oe},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):Le("v-if",!0),D.value==="year"?(z(),De(Y0,{key:1,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:S.value,"disabled-date":v(p),disabled:v(ke),"parsed-value":Ze.parsedValue,"cell-class-name":v(m),onPick:_e},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):Le("v-if",!0),D.value==="month"?(z(),De(q0,{key:2,ref_key:"currentViewRef",ref:x,"selection-mode":Q.value,date:S.value,"parsed-value":Ze.parsedValue,"disabled-date":v(p),disabled:v(ke),"cell-class-name":v(m),onPick:ae},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):Le("v-if",!0)],34)],2)],2),Ze.showFooter&&Fe.value&&ve.value?(z(),se("div",{key:0,class:J(v(r).e("footer"))},[_n(de(v(Sr),{text:"",size:"small",class:J(v(r).e("link-btn")),disabled:ge.value,onClick:Qe},{default:xe(()=>[cn(Xe(v(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[ci,!ie.value&&Ze.showNow]]),Ze.showConfirm?(z(),De(v(Sr),{key:0,plain:"",size:"small",class:J(v(r).e("link-btn")),disabled:fe.value,onClick:Me},{default:xe(()=>[cn(Xe(v(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):Le("v-if",!0)],2)):Le("v-if",!0)],2))}});var Yye=xt(qye,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-date-pick.vue"]]);const Xye=_t({...Iz,...Rk}),Zye=t=>{const{emit:e}=xn(),n=ld(),i=tr();return r=>{const o=Kt(r.value)?r.value():r.value;if(o){e("pick",[Tn(o[0]).locale(t.value),Tn(o[1]).locale(t.value)]);return}r.onClick&&r.onClick({attrs:n,slots:i,emit:e})}},Nk=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:s,step:r,unit:o,sortDates:a})=>{const{emit:l}=xn(),{pickerNs:c}=zt(Lk),u=ht("date-range-picker"),{t:d,lang:h}=Jn(),f=Zye(h),p=X(),m=X(),b=X({endDate:null,selecting:!1}),g=T=>{b.value=T},x=(T=!1)=>{const A=v(p),I=v(m);K0([A,I])&&l("pick",[A,I],T)},S=T=>{b.value.selecting=T,T||(b.value.endDate=null)},_=T=>{if(pt(T)&&T.length===2){const[A,I]=T;p.value=A,i.value=A,m.value=I,a(v(p),v(m))}else E()},E=()=>{let[T,A]=Bx(v(e),{lang:v(h),step:r,unit:o,unlinkPanels:t.unlinkPanels});const I=k=>k.diff(k.startOf("d"),"ms"),P=v(n);if(P){let k=0,B=0;if(pt(P)){const[R,H]=P.map(Tn);k=I(R),B=I(H)}else{const R=I(Tn(P));k=R,B=R}T=T.startOf("d").add(k,"ms"),A=A.startOf("d").add(B,"ms")}p.value=void 0,m.value=void 0,i.value=T,s.value=A};return We(e,T=>{T&&E()},{immediate:!0}),We(()=>t.parsedValue,T=>{(!T?.length||!Ms(T,[p.value,m.value]))&&_(T)},{immediate:!0}),We(()=>t.visible,()=>{t.visible&&_(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:b,lang:h,ppNs:c,drpNs:u,handleChangeRange:g,handleRangeConfirm:x,handleShortcutClick:f,onSelect:S,parseValue:_,t:d}},Jye=(t,e,n,i)=>{const s=X("date"),r=X(),o=X("date"),a=X(),l=zt(jl),{disabledDate:c}=l.props,{t:u,lang:d}=Jn(),h=F(()=>n.value.year()),f=F(()=>n.value.month()),p=F(()=>i.value.year()),m=F(()=>i.value.month());function b(T,A){const I=u("el.datepicker.year");if(T.value==="year"){const P=Math.floor(A.value/10)*10;return I?`${P} ${I} - ${P+9} ${I}`:`${P} - ${P+9}`}return`${A.value} ${I}`}function g(T){T?.focus()}async function x(T,A){if(t.disabled)return;const I=T==="left"?s:o,P=T==="left"?r:a;I.value=A,await Nt(),g(P.value)}async function S(T,A,I){if(t.disabled)return;const P=A==="left",k=P?n:i,B=P?i:n,R=P?s:o,H=P?r:a;if(T==="year"){const q=k.value.year(I);k.value=r2(q,d.value,c)}T==="month"&&(k.value=fg(k.value,k.value.year(),I,d.value,c)),t.unlinkPanels||(B.value=A==="left"?k.value.add(1,"month"):k.value.subtract(1,"month")),R.value=T==="year"?"month":"date",await Nt(),g(H.value),_(T)}function _(T){e("panel-change",[n.value.toDate(),i.value.toDate()],T)}function E(T,A,I){const P=I?"add":"subtract";return T==="year"?A[P](10,"year"):A[P](1,"year")}return{leftCurrentView:s,rightCurrentView:o,leftCurrentViewRef:r,rightCurrentViewRef:a,leftYear:h,rightYear:p,leftMonth:f,rightMonth:m,leftYearLabel:F(()=>b(s,h)),rightYearLabel:F(()=>b(o,p)),showLeftPicker:T=>x("left",T),showRightPicker:T=>x("right",T),handleLeftYearPick:T=>S("year","left",T),handleRightYearPick:T=>S("year","right",T),handleLeftMonthPick:T=>S("month","left",T),handleRightMonthPick:T=>S("month","right",T),handlePanelChange:_,adjustDateByView:E}},Qye=["disabled","onClick"],e1e=["aria-label","disabled"],t1e=["aria-label","disabled"],n1e=["disabled","aria-label"],i1e=["disabled","aria-label"],s1e=["tabindex","aria-disabled"],r1e=["tabindex","aria-disabled"],o1e=["disabled","aria-label"],a1e=["disabled","aria-label"],l1e=["aria-label","disabled"],c1e=["disabled","aria-label"],u1e=["tabindex","aria-disabled"],d1e=["tabindex","aria-disabled"],rb="month",h1e=Be({__name:"panel-date-range",props:Xye,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,i=e,s=zt(jl),r=zt(t1,void 0),{disabledDate:o,cellClassName:a,defaultTime:l,clearable:c}=s.props,u=Ei(s.props,"format"),d=Ei(s.props,"shortcuts"),h=Ei(s.props,"defaultValue"),{lang:f}=Jn(),p=X(Tn().locale(f.value)),m=X(Tn().locale(f.value).add(1,rb)),{minDate:b,maxDate:g,rangeState:x,ppNs:S,drpNs:_,handleChangeRange:E,handleRangeConfirm:T,handleShortcutClick:A,onSelect:I,parseValue:P,t:k}=Nk(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:rb,sortDates:ei});We(()=>n.visible,Tt=>{!Tt&&x.value.selecting&&(P(n.parsedValue),I(!1))});const B=X({min:null,max:null}),R=X({min:null,max:null}),{leftCurrentView:H,rightCurrentView:q,leftCurrentViewRef:oe,rightCurrentViewRef:Z,leftYear:V,rightYear:D,leftMonth:K,rightMonth:W,leftYearLabel:Q,rightYearLabel:ie,showLeftPicker:ne,showRightPicker:ce,handleLeftYearPick:ae,handleRightYearPick:_e,handleLeftMonthPick:ke,handleRightMonthPick:Te,handlePanelChange:Ke,adjustDateByView:Fe}=Jye(n,i,p,m),ve=F(()=>!!d.value.length),fe=F(()=>B.value.min!==null?B.value.min:b.value?b.value.format(ee.value):""),Me=F(()=>B.value.max!==null?B.value.max:g.value||b.value?(g.value||b.value).format(ee.value):""),ge=F(()=>R.value.min!==null?R.value.min:b.value?b.value.format(G.value):""),Qe=F(()=>R.value.max!==null?R.value.max:g.value||b.value?(g.value||b.value).format(G.value):""),G=F(()=>n.timeFormat||V7(u.value||"")||hg),ee=F(()=>n.dateFormat||$7(u.value||"")||eh),j=Tt=>K0(Tt)&&(o?!o(Tt[0].toDate())&&!o(Tt[1].toDate()):!0),he=()=>{p.value=Fe(H.value,p.value,!1),n.unlinkPanels||(m.value=p.value.add(1,"month")),Ke("year")},be=()=>{p.value=p.value.subtract(1,"month"),n.unlinkPanels||(m.value=p.value.add(1,"month")),Ke("month")},re=()=>{n.unlinkPanels?m.value=Fe(q.value,m.value,!0):(p.value=Fe(q.value,p.value,!0),m.value=p.value.add(1,"month")),Ke("year")},le=()=>{n.unlinkPanels?m.value=m.value.add(1,"month"):(p.value=p.value.add(1,"month"),m.value=p.value.add(1,"month")),Ke("month")},Ce=()=>{p.value=Fe(H.value,p.value,!0),Ke("year")},Ee=()=>{p.value=p.value.add(1,"month"),Ke("month")},Oe=()=>{m.value=Fe(q.value,m.value,!1),Ke("year")},Ge=()=>{m.value=m.value.subtract(1,"month"),Ke("month")},$e=F(()=>{const Tt=(K.value+1)%12,rt=K.value+1>=12?1:0;return n.unlinkPanels&&new Date(V.value+rt,Tt)n.unlinkPanels&&D.value*12+W.value-(V.value*12+K.value+1)>=12),dt=Es(),Jt=F(()=>!(b.value&&g.value&&!x.value.selecting&&K0([b.value,g.value])&&!dt.value)),at=F(()=>n.type==="datetime"||n.type==="datetimerange"),Mt=(Tt,rt)=>{if(Tt)return l?Tn(l[rt]||l).locale(f.value).year(Tt.year()).month(Tt.month()).date(Tt.date()):Tt},Bt=(Tt,rt=!0)=>{const jt=Tt.minDate,Di=Tt.maxDate,ms=Mt(jt,0),pe=Mt(Di,1);g.value===pe&&b.value===ms||(i("calendar-change",[jt.toDate(),Di&&Di.toDate()]),g.value=pe,b.value=ms,!at.value&&rt&&(rt=!ms||!pe),T(rt))},$t=X(!1),Ze=X(!1),vt=()=>{$t.value=!1},qe=()=>{Ze.value=!1},kt=(Tt,rt)=>{B.value[rt]=Tt;const jt=Tn(Tt,ee.value).locale(f.value);if(jt.isValid()){if(o&&o(jt.toDate()))return;rt==="min"?(p.value=jt,b.value=(b.value||p.value).year(jt.year()).month(jt.month()).date(jt.date()),!n.unlinkPanels&&(!g.value||g.value.isBefore(b.value))&&(m.value=jt.add(1,"month"),g.value=b.value.add(1,"month"))):(m.value=jt,g.value=(g.value||m.value).year(jt.year()).month(jt.month()).date(jt.date()),!n.unlinkPanels&&(!b.value||b.value.isAfter(g.value))&&(p.value=jt.subtract(1,"month"),b.value=g.value.subtract(1,"month"))),ei(b.value,g.value),T(!0)}},Je=(Tt,rt)=>{B.value[rt]=null},Ft=(Tt,rt)=>{R.value[rt]=Tt;const jt=Tn(Tt,G.value).locale(f.value);jt.isValid()&&(rt==="min"?($t.value=!0,b.value=(b.value||p.value).hour(jt.hour()).minute(jt.minute()).second(jt.second()),p.value=b.value):(Ze.value=!0,g.value=(g.value||m.value).hour(jt.hour()).minute(jt.minute()).second(jt.second()),m.value=g.value))},Ne=(Tt,rt)=>{R.value[rt]=null,rt==="min"?(p.value=b.value,$t.value=!1,(!g.value||g.value.isBefore(b.value))&&(g.value=b.value)):(m.value=g.value,Ze.value=!1,g.value&&g.value.isBefore(b.value)&&(b.value=g.value)),T(!0)},et=(Tt,rt,jt)=>{R.value.min||(Tt&&(b.value=(b.value||p.value).hour(Tt.hour()).minute(Tt.minute()).second(Tt.second())),jt||($t.value=rt),(!g.value||g.value.isBefore(b.value))&&(g.value=b.value,m.value=Tt,Nt(()=>{P(n.parsedValue)})),T(!0))},ut=(Tt,rt,jt)=>{R.value.max||(Tt&&(g.value=(g.value||m.value).hour(Tt.hour()).minute(Tt.minute()).second(Tt.second())),jt||(Ze.value=rt),g.value&&g.value.isBefore(b.value)&&(b.value=g.value),T(!0))},Qt=()=>{let Tt=null;s?.emptyValues&&(Tt=s.emptyValues.valueOnClear.value),p.value=Bx(v(h),{lang:v(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),g.value=void 0,b.value=void 0,T(!0),i("pick",Tt)},Cn=Tt=>pg(Tt,u.value||"",f.value,r);function ei(Tt,rt){if(n.unlinkPanels&&rt){const jt=Tt?.year()||0,Di=Tt?.month()||0,ms=rt.year(),pe=rt.month();m.value=jt===ms&&Di===pe?rt.add(1,rb):rt}else m.value=p.value.add(1,rb),rt&&(m.value=m.value.hour(rt.hour()).minute(rt.minute()).second(rt.second()))}return i("set-picker-option",["isValidValue",j]),i("set-picker-option",["parseUserInput",Cn]),i("set-picker-option",["handleClear",Qt]),(Tt,rt)=>(z(),se("div",{class:J([v(S).b(),v(_).b(),v(S).is("border",Tt.border),v(S).is("disabled",v(dt)),{"has-sidebar":Tt.$slots.sidebar||ve.value,"has-time":at.value}])},[U("div",{class:J(v(S).e("body-wrapper"))},[Ue(Tt.$slots,"sidebar",{class:J(v(S).e("sidebar"))}),ve.value?(z(),se("div",{key:0,class:J(v(S).e("sidebar"))},[(z(!0),se(At,null,yn(d.value,(jt,Di)=>(z(),se("button",{key:Di,type:"button",disabled:v(dt),class:J(v(S).e("shortcut")),onClick:ms=>v(A)(jt)},Xe(jt.text),11,Qye))),128))],2)):Le("v-if",!0),U("div",{class:J(v(S).e("body"))},[at.value?(z(),se("div",{key:0,class:J(v(_).e("time-header"))},[U("span",{class:J(v(_).e("editors-wrap"))},[U("span",{class:J(v(_).e("time-picker-wrap"))},[de(v(wo),{size:"small",disabled:v(x).selecting||v(dt),placeholder:v(k)("el.datepicker.startDate"),class:J(v(_).e("editor")),"model-value":fe.value,"validate-event":!1,readonly:!Tt.editable,onInput:rt[0]||(rt[0]=jt=>kt(jt,"min")),onChange:rt[1]||(rt[1]=jt=>Je(jt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),_n((z(),se("span",{class:J(v(_).e("time-picker-wrap"))},[de(v(wo),{size:"small",class:J(v(_).e("editor")),disabled:v(x).selecting||v(dt),placeholder:v(k)("el.datepicker.startTime"),"model-value":ge.value,"validate-event":!1,readonly:!Tt.editable,onFocus:rt[2]||(rt[2]=jt=>$t.value=!0),onInput:rt[3]||(rt[3]=jt=>Ft(jt,"min")),onChange:rt[4]||(rt[4]=jt=>Ne(jt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),de(v(i2),{visible:$t.value,format:G.value,"datetime-role":"start","parsed-value":v(b)||p.value,onPick:et},null,8,["visible","format","parsed-value"])],2)),[[v(Ch),vt]])],2),U("span",null,[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})]),U("span",{class:J([v(_).e("editors-wrap"),"is-right"])},[U("span",{class:J(v(_).e("time-picker-wrap"))},[de(v(wo),{size:"small",class:J(v(_).e("editor")),disabled:v(x).selecting||v(dt),placeholder:v(k)("el.datepicker.endDate"),"model-value":Me.value,readonly:!v(b)||!Tt.editable,"validate-event":!1,onInput:rt[5]||(rt[5]=jt=>kt(jt,"max")),onChange:rt[6]||(rt[6]=jt=>Je(jt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),_n((z(),se("span",{class:J(v(_).e("time-picker-wrap"))},[de(v(wo),{size:"small",class:J(v(_).e("editor")),disabled:v(x).selecting||v(dt),placeholder:v(k)("el.datepicker.endTime"),"model-value":Qe.value,readonly:!v(b)||!Tt.editable,"validate-event":!1,onFocus:rt[7]||(rt[7]=jt=>v(b)&&(Ze.value=!0)),onInput:rt[8]||(rt[8]=jt=>Ft(jt,"max")),onChange:rt[9]||(rt[9]=jt=>Ne(jt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),de(v(i2),{"datetime-role":"end",visible:Ze.value,format:G.value,"parsed-value":v(g)||m.value,onPick:ut},null,8,["visible","format","parsed-value"])],2)),[[v(Ch),qe]])],2)],2)):Le("v-if",!0),U("div",{class:J([[v(S).e("content"),v(_).e("content")],"is-left"])},[U("div",{class:J(v(_).e("header"))},[U("button",{type:"button",class:J([v(S).e("icon-btn"),"d-arrow-left"]),"aria-label":v(k)("el.datepicker.prevYear"),disabled:v(dt),onClick:he},[Ue(Tt.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,e1e),_n(U("button",{type:"button",class:J([v(S).e("icon-btn"),"arrow-left"]),"aria-label":v(k)("el.datepicker.prevMonth"),disabled:v(dt),onClick:be},[Ue(Tt.$slots,"prev-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1})])],10,t1e),[[ci,v(H)==="date"]]),Tt.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!ot.value||v(dt),class:J([[v(S).e("icon-btn"),v(S).is("disabled",!ot.value||v(dt))],"d-arrow-right"]),"aria-label":v(k)("el.datepicker.nextYear"),onClick:Ce},[Ue(Tt.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,n1e)):Le("v-if",!0),Tt.unlinkPanels&&v(H)==="date"?(z(),se("button",{key:1,type:"button",disabled:!$e.value||v(dt),class:J([[v(S).e("icon-btn"),v(S).is("disabled",!$e.value||v(dt))],"arrow-right"]),"aria-label":v(k)("el.datepicker.nextMonth"),onClick:Ee},[Ue(Tt.$slots,"next-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})])],10,i1e)):Le("v-if",!0),U("div",null,[U("span",{role:"button",class:J(v(_).e("header-label")),"aria-live":"polite",tabindex:Tt.disabled?void 0:0,"aria-disabled":Tt.disabled,onKeydown:rt[10]||(rt[10]=_s(jt=>v(ne)("year"),["enter"])),onClick:rt[11]||(rt[11]=jt=>v(ne)("year"))},Xe(v(Q)),43,s1e),_n(U("span",{role:"button","aria-live":"polite",tabindex:Tt.disabled?void 0:0,"aria-disabled":Tt.disabled,class:J([v(_).e("header-label"),{active:v(H)==="month"}]),onKeydown:rt[12]||(rt[12]=_s(jt=>v(ne)("month"),["enter"])),onClick:rt[13]||(rt[13]=jt=>v(ne)("month"))},Xe(v(k)(`el.datepicker.month${p.value.month()+1}`)),43,r1e),[[ci,v(H)==="date"]])])],2),v(H)==="date"?(z(),De($T,{key:0,ref_key:"leftCurrentViewRef",ref:oe,"selection-mode":"range",date:p.value,"min-date":v(b),"max-date":v(g),"range-state":v(x),"disabled-date":v(o),"cell-class-name":v(a),"show-week-number":Tt.showWeekNumber,disabled:v(dt),onChangerange:v(E),onPick:Bt,onSelect:v(I)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):Le("v-if",!0),v(H)==="year"?(z(),De(Y0,{key:1,ref_key:"leftCurrentViewRef",ref:oe,"selection-mode":"year",date:p.value,"disabled-date":v(o),"parsed-value":Tt.parsedValue,disabled:v(dt),onPick:v(ae)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):Le("v-if",!0),v(H)==="month"?(z(),De(q0,{key:2,ref_key:"leftCurrentViewRef",ref:oe,"selection-mode":"month",date:p.value,"parsed-value":Tt.parsedValue,"disabled-date":v(o),disabled:v(dt),onPick:v(ke)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):Le("v-if",!0)],2),U("div",{class:J([[v(S).e("content"),v(_).e("content")],"is-right"])},[U("div",{class:J(v(_).e("header"))},[Tt.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!ot.value||v(dt),class:J([v(S).e("icon-btn"),"d-arrow-left"]),"aria-label":v(k)("el.datepicker.prevYear"),onClick:Oe},[Ue(Tt.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,o1e)):Le("v-if",!0),Tt.unlinkPanels&&v(q)==="date"?(z(),se("button",{key:1,type:"button",disabled:!$e.value||v(dt),class:J([v(S).e("icon-btn"),"arrow-left"]),"aria-label":v(k)("el.datepicker.prevMonth"),onClick:Ge},[Ue(Tt.$slots,"prev-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1})])],10,a1e)):Le("v-if",!0),U("button",{type:"button","aria-label":v(k)("el.datepicker.nextYear"),class:J([v(S).e("icon-btn"),"d-arrow-right"]),disabled:v(dt),onClick:re},[Ue(Tt.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,l1e),_n(U("button",{type:"button",class:J([v(S).e("icon-btn"),"arrow-right"]),disabled:v(dt),"aria-label":v(k)("el.datepicker.nextMonth"),onClick:le},[Ue(Tt.$slots,"next-month",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})])],10,c1e),[[ci,v(q)==="date"]]),U("div",null,[U("span",{role:"button",class:J(v(_).e("header-label")),"aria-live":"polite",tabindex:Tt.disabled?void 0:0,"aria-disabled":Tt.disabled,onKeydown:rt[14]||(rt[14]=_s(jt=>v(ce)("year"),["enter"])),onClick:rt[15]||(rt[15]=jt=>v(ce)("year"))},Xe(v(ie)),43,u1e),_n(U("span",{role:"button","aria-live":"polite",tabindex:Tt.disabled?void 0:0,"aria-disabled":Tt.disabled,class:J([v(_).e("header-label"),{active:v(q)==="month"}]),onKeydown:rt[16]||(rt[16]=_s(jt=>v(ce)("month"),["enter"])),onClick:rt[17]||(rt[17]=jt=>v(ce)("month"))},Xe(v(k)(`el.datepicker.month${m.value.month()+1}`)),43,d1e),[[ci,v(q)==="date"]])])],2),v(q)==="date"?(z(),De($T,{key:0,ref_key:"rightCurrentViewRef",ref:Z,"selection-mode":"range",date:m.value,"min-date":v(b),"max-date":v(g),"range-state":v(x),"disabled-date":v(o),"cell-class-name":v(a),"show-week-number":Tt.showWeekNumber,disabled:v(dt),onChangerange:v(E),onPick:Bt,onSelect:v(I)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):Le("v-if",!0),v(q)==="year"?(z(),De(Y0,{key:1,ref_key:"rightCurrentViewRef",ref:Z,"selection-mode":"year",date:m.value,"disabled-date":v(o),"parsed-value":Tt.parsedValue,disabled:v(dt),onPick:v(_e)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):Le("v-if",!0),v(q)==="month"?(z(),De(q0,{key:2,ref_key:"rightCurrentViewRef",ref:Z,"selection-mode":"month",date:m.value,"parsed-value":Tt.parsedValue,"disabled-date":v(o),disabled:v(dt),onPick:v(Te)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):Le("v-if",!0)],2)],2)],2),Tt.showFooter&&at.value&&(Tt.showConfirm||v(c))?(z(),se("div",{key:0,class:J(v(S).e("footer"))},[v(c)?(z(),De(v(Sr),{key:0,text:"",size:"small",class:J(v(S).e("link-btn")),onClick:Qt},{default:xe(()=>[cn(Xe(v(k)("el.datepicker.clear")),1)]),_:1},8,["class"])):Le("v-if",!0),Tt.showConfirm?(z(),De(v(Sr),{key:1,plain:"",size:"small",class:J(v(S).e("link-btn")),disabled:Jt.value,onClick:rt[18]||(rt[18]=jt=>v(T)(!1))},{default:xe(()=>[cn(Xe(v(k)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):Le("v-if",!0)],2)):Le("v-if",!0)],2))}});var f1e=xt(h1e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-date-range.vue"]]);const p1e=_t({...Rk}),m1e=["pick","set-picker-option","calendar-change"],g1e=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:i}=Jn(),s=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},r=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},o=()=>{e.value=e.value.add(1,"year")},a=()=>{n.value=n.value.subtract(1,"year")},l=F(()=>`${e.value.year()} ${i("el.datepicker.year")}`),c=F(()=>`${n.value.year()} ${i("el.datepicker.year")}`),u=F(()=>e.value.year()),d=F(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:s,rightNextYear:r,leftNextYear:o,rightPrevYear:a,leftLabel:l,rightLabel:c,leftYear:u,rightYear:d}},v1e=["disabled","onClick"],y1e=["disabled"],b1e=["disabled"],_1e=["disabled"],w1e=["disabled"],ob="year",x1e=Be({name:"DatePickerMonthRange",__name:"panel-month-range",props:p1e,emits:m1e,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Jn(),r=zt(jl),o=zt(t1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=r.props,u=Ei(r.props,"format"),d=Ei(r.props,"defaultValue"),h=X(Tn().locale(s.value)),f=X(Tn().locale(s.value).add(1,ob)),{minDate:p,maxDate:m,rangeState:b,ppNs:g,drpNs:x,handleChangeRange:S,handleRangeConfirm:_,handleShortcutClick:E,onSelect:T,parseValue:A}=Nk(n,{defaultValue:d,leftDate:h,rightDate:f,unit:ob,sortDates:Q}),I=F(()=>!!a.length),{leftPrevYear:P,rightNextYear:k,leftNextYear:B,rightPrevYear:R,leftLabel:H,rightLabel:q,leftYear:oe,rightYear:Z}=g1e({unlinkPanels:Ei(n,"unlinkPanels"),leftDate:h,rightDate:f}),V=F(()=>n.unlinkPanels&&Z.value>oe.value+1),D=(ne,ce=!0)=>{const ae=ne.minDate,_e=ne.maxDate;m.value===_e&&p.value===ae||(i("calendar-change",[ae.toDate(),_e&&_e.toDate()]),m.value=_e,p.value=ae,ce&&_())},K=()=>{let ne=null;r?.emptyValues&&(ne=r.emptyValues.valueOnClear.value),h.value=Bx(v(d),{lang:v(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),i("pick",ne)},W=ne=>pg(ne,u.value,s.value,o);function Q(ne,ce){if(n.unlinkPanels&&ce){const ae=ne?.year()||0,_e=ce.year();f.value=ae===_e?ce.add(1,ob):ce}else f.value=h.value.add(1,ob)}const ie=Es();return We(()=>n.visible,ne=>{!ne&&b.value.selecting&&(A(n.parsedValue),T(!1))}),i("set-picker-option",["isValidValue",K0]),i("set-picker-option",["parseUserInput",W]),i("set-picker-option",["handleClear",K]),(ne,ce)=>(z(),se("div",{class:J([v(g).b(),v(x).b(),v(g).is("border",ne.border),v(g).is("disabled",v(ie)),{"has-sidebar":!!ne.$slots.sidebar||I.value}])},[U("div",{class:J(v(g).e("body-wrapper"))},[Ue(ne.$slots,"sidebar",{class:J(v(g).e("sidebar"))}),I.value?(z(),se("div",{key:0,class:J(v(g).e("sidebar"))},[(z(!0),se(At,null,yn(v(a),(ae,_e)=>(z(),se("button",{key:_e,type:"button",class:J(v(g).e("shortcut")),disabled:v(ie),onClick:ke=>v(E)(ae)},Xe(ae.text),11,v1e))),128))],2)):Le("v-if",!0),U("div",{class:J(v(g).e("body"))},[U("div",{class:J([[v(g).e("content"),v(x).e("content")],"is-left"])},[U("div",{class:J(v(x).e("header"))},[U("button",{type:"button",class:J([v(g).e("icon-btn"),"d-arrow-left"]),disabled:v(ie),onClick:ce[0]||(ce[0]=(...ae)=>v(P)&&v(P)(...ae))},[Ue(ne.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,y1e),ne.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!V.value||v(ie),class:J([[v(g).e("icon-btn"),v(g).is("disabled",!V.value||v(ie))],"d-arrow-right"]),onClick:ce[1]||(ce[1]=(...ae)=>v(B)&&v(B)(...ae))},[Ue(ne.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,b1e)):Le("v-if",!0),U("div",null,Xe(v(H)),1)],2),de(q0,{"selection-mode":"range",date:h.value,"min-date":v(p),"max-date":v(m),"range-state":v(b),"disabled-date":v(l),disabled:v(ie),"cell-class-name":v(c),onChangerange:v(S),onPick:D,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),U("div",{class:J([[v(g).e("content"),v(x).e("content")],"is-right"])},[U("div",{class:J(v(x).e("header"))},[ne.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!V.value||v(ie),class:J([[v(g).e("icon-btn"),v(g).is("disabled",!V.value||v(ie))],"d-arrow-left"]),onClick:ce[2]||(ce[2]=(...ae)=>v(R)&&v(R)(...ae))},[Ue(ne.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,_1e)):Le("v-if",!0),U("button",{type:"button",class:J([v(g).e("icon-btn"),"d-arrow-right"]),disabled:v(ie),onClick:ce[3]||(ce[3]=(...ae)=>v(k)&&v(k)(...ae))},[Ue(ne.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,w1e),U("div",null,Xe(v(q)),1)],2),de(q0,{"selection-mode":"range",date:f.value,"min-date":v(p),"max-date":v(m),"range-state":v(b),"disabled-date":v(l),disabled:v(ie),"cell-class-name":v(c),onChangerange:v(S),onPick:D,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}});var S1e=xt(x1e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-month-range.vue"]]);const E1e=_t({...Rk}),C1e=["pick","set-picker-option","calendar-change"],T1e=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const i=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},s=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},r=()=>{e.value=e.value.add(10,"year")},o=()=>{n.value=n.value.subtract(10,"year")},a=F(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=F(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),c=F(()=>Math.floor(e.value.year()/10)*10+9),u=F(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:i,rightNextYear:s,leftNextYear:r,rightPrevYear:o,leftLabel:a,rightLabel:l,leftYear:c,rightYear:u}},M1e=["disabled","onClick"],A1e=["disabled"],k1e=["disabled"],P1e=["disabled"],L1e=["disabled"],Lp=10,yv="year",I1e=Be({name:"DatePickerYearRange",__name:"panel-year-range",props:E1e,emits:C1e,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Jn(),r=X(Tn().locale(s.value)),o=X(Tn().locale(s.value).add(Lp,yv)),a=zt(t1,void 0),l=zt(jl),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Ei(l.props,"format"),f=Ei(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:b,ppNs:g,drpNs:x,handleChangeRange:S,handleRangeConfirm:_,handleShortcutClick:E,onSelect:T,parseValue:A}=Nk(n,{defaultValue:f,leftDate:r,rightDate:o,step:Lp,unit:yv,sortDates:_e}),{leftPrevYear:I,rightNextYear:P,leftNextYear:k,rightPrevYear:B,leftLabel:R,rightLabel:H,leftYear:q,rightYear:oe}=T1e({unlinkPanels:Ei(n,"unlinkPanels"),leftDate:r,rightDate:o}),Z=Es(),V=F(()=>!!c.length),D=F(()=>[g.b(),x.b(),g.is("border",n.border),g.is("disabled",Z.value),{"has-sidebar":!!tr().sidebar||V.value}]),K=F(()=>({content:[g.e("content"),x.e("content"),"is-left"],arrowLeftBtn:[g.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[g.e("icon-btn"),g.is("disabled",!Q.value||Z.value),"d-arrow-right"]})),W=F(()=>({content:[g.e("content"),x.e("content"),"is-right"],arrowLeftBtn:[g.e("icon-btn"),g.is("disabled",!Q.value||Z.value),"d-arrow-left"],arrowRightBtn:[g.e("icon-btn"),"d-arrow-right"]})),Q=F(()=>n.unlinkPanels&&oe.value>q.value+1),ie=(ke,Te=!0)=>{const Ke=ke.minDate,Fe=ke.maxDate;m.value===Fe&&p.value===Ke||(i("calendar-change",[Ke.toDate(),Fe&&Fe.toDate()]),m.value=Fe,p.value=Ke,Te&&_())},ne=ke=>pg(ke,h.value,s.value,a),ce=ke=>K0(ke)&&(u?!u(ke[0].toDate())&&!u(ke[1].toDate()):!0),ae=()=>{let ke=null;l?.emptyValues&&(ke=l.emptyValues.valueOnClear.value);const Te=Bx(v(f),{lang:v(s),step:Lp,unit:yv,unlinkPanels:n.unlinkPanels});r.value=Te[0],o.value=Te[1],i("pick",ke)};function _e(ke,Te){if(n.unlinkPanels&&Te){const Ke=ke?.year()||0,Fe=Te.year();o.value=Ke+Lp>Fe?Te.add(Lp,yv):Te}else o.value=r.value.add(Lp,yv)}return We(()=>n.visible,ke=>{!ke&&b.value.selecting&&(A(n.parsedValue),T(!1))}),i("set-picker-option",["isValidValue",ce]),i("set-picker-option",["parseUserInput",ne]),i("set-picker-option",["handleClear",ae]),(ke,Te)=>(z(),se("div",{class:J(D.value)},[U("div",{class:J(v(g).e("body-wrapper"))},[Ue(ke.$slots,"sidebar",{class:J(v(g).e("sidebar"))}),V.value?(z(),se("div",{key:0,class:J(v(g).e("sidebar"))},[(z(!0),se(At,null,yn(v(c),(Ke,Fe)=>(z(),se("button",{key:Fe,type:"button",class:J(v(g).e("shortcut")),disabled:v(Z),onClick:ve=>v(E)(Ke)},Xe(Ke.text),11,M1e))),128))],2)):Le("v-if",!0),U("div",{class:J(v(g).e("body"))},[U("div",{class:J(K.value.content)},[U("div",{class:J(v(x).e("header"))},[U("button",{type:"button",class:J(K.value.arrowLeftBtn),disabled:v(Z),onClick:Te[0]||(Te[0]=(...Ke)=>v(I)&&v(I)(...Ke))},[Ue(ke.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,A1e),ke.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!Q.value||v(Z),class:J(K.value.arrowRightBtn),onClick:Te[1]||(Te[1]=(...Ke)=>v(k)&&v(k)(...Ke))},[Ue(ke.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,k1e)):Le("v-if",!0),U("div",null,Xe(v(R)),1)],2),de(Y0,{"selection-mode":"range",date:r.value,"min-date":v(p),"max-date":v(m),"range-state":v(b),"disabled-date":v(u),disabled:v(Z),"cell-class-name":v(d),onChangerange:v(S),onPick:ie,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),U("div",{class:J(W.value.content)},[U("div",{class:J(v(x).e("header"))},[ke.unlinkPanels?(z(),se("button",{key:0,type:"button",disabled:!Q.value||v(Z),class:J(W.value.arrowLeftBtn),onClick:Te[2]||(Te[2]=(...Ke)=>v(B)&&v(B)(...Ke))},[Ue(ke.$slots,"prev-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(xh))]),_:1})])],10,P1e)):Le("v-if",!0),U("button",{type:"button",class:J(W.value.arrowRightBtn),disabled:v(Z),onClick:Te[3]||(Te[3]=(...Ke)=>v(P)&&v(P)(...Ke))},[Ue(ke.$slots,"next-year",{},()=>[de(v(Ut),null,{default:xe(()=>[de(v(Sh))]),_:1})])],10,L1e),U("div",null,Xe(v(H)),1)],2),de(Y0,{"selection-mode":"range",date:o.value,"min-date":v(p),"max-date":v(m),"range-state":v(b),"disabled-date":v(u),disabled:v(Z),"cell-class-name":v(d),onChangerange:v(S),onPick:ie,onSelect:v(T)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}});var R1e=xt(I1e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/date-picker-panel/src/date-picker-com/panel-year-range.vue"]]);const O1e=function(t){switch(t){case"daterange":case"datetimerange":return f1e;case"monthrange":return S1e;case"yearrange":return R1e;default:return Yye}};function D1e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}Tn.extend(W7);Tn.extend(Q0e);Tn.extend(Mk);Tn.extend(iye);Tn.extend(aye);Tn.extend(dye);Tn.extend(mye);Tn.extend(bye);var N1e=Be({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:_ye,emits:[wn,"calendar-change","panel-change","visible-change"],setup(t,{slots:e,emit:n,attrs:i}){const s=ht("picker-panel"),r=zt(jl,void 0);if(ri(r)){const d=ni({...hr(t)});Xn(jl,{props:d})}Xn(Lk,{slots:e,pickerNs:s});const{parsedValue:o,onCalendarChange:a,onPanelChange:l,onSetPickerOption:c,onPick:u}=zt(Ez,()=>Cz(t,n),!0);return()=>{const d=O1e(t.type);return de(d,Dn(Vy(i,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":c,"onCalendar-change":a,"onPanel-change":l,onPick:u}),D1e(e)?e:{default:()=>[e]})}}});const Rz=En(N1e),B1e=_t({...Pk,type:{type:Re(String),default:"date"}});function F1e(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}var z1e=Be({name:"ElDatePicker",install:null,props:B1e,emits:[wn],setup(t,{expose:e,emit:n,slots:i}){const s=F(()=>!t.format);Xn(t1,s),Xn(Ak,ni(Ei(t,"popperOptions")));const r=X();e({focus:()=>{var l;(l=r.value)==null||l.focus()},blur:()=>{var l;(l=r.value)==null||l.blur()},handleOpen:()=>{var l;(l=r.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=r.value)==null||l.handleClose()}});const a=l=>{n(wn,l)};return()=>{var l;const c=(l=t.format)!=null?l:k0e[t.type]||eh;return de(Mz,Dn(t,{format:c,type:t.type,ref:r,"onUpdate:modelValue":a}),{default:u=>de(Rz,Dn({disabled:t.disabled,editable:t.editable,border:!1},u),F1e(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const U1e=En(z1e),Bk=Symbol("elDescriptions");var bv=Be({name:"ElDescriptionsCell",props:{cell:{type:Object},tag:{type:String,default:"td"},type:{type:String}},setup(){return{descriptions:zt(Bk,{})}},render(){var t,e,n,i;const s=Xme(this.cell),r=(((t=this.cell)==null?void 0:t.dirs)||[]).map(_=>{const{dir:E,arg:T,modifiers:A,value:I}=_;return[E,I,T,A]}),{border:o,direction:a}=this.descriptions,l=a==="vertical",c=()=>{var _,E,T;return((T=(E=(_=this.cell)==null?void 0:_.children)==null?void 0:E.label)==null?void 0:T.call(E))||s.label},u=()=>{var _,E,T;return(T=(E=(_=this.cell)==null?void 0:_.children)==null?void 0:E.default)==null?void 0:T.call(E)},d=s.span,h=s.rowspan,f=s.align?`is-${s.align}`:"",p=s.labelAlign?`is-${s.labelAlign}`:f,m=s.className,b=s.labelClassName,g=this.type==="label"&&(n=(e=s.labelWidth)!=null?e:this.descriptions.labelWidth)!=null?n:s.width,x={width:xs(g),minWidth:xs(s.minWidth)},S=ht("descriptions");switch(this.type){case"label":return _n(tn(this.tag,{style:x,class:[S.e("cell"),S.e("label"),S.is("bordered-label",o),S.is("vertical-label",l),p,b],colSpan:l?d:1,rowspan:l?1:h},c()),r);case"content":return _n(tn(this.tag,{style:x,class:[S.e("cell"),S.e("content"),S.is("bordered-content",o),S.is("vertical-content",l),f,m],colSpan:l?d:d*2-1,rowspan:l?h*2-1:h},u()),r);default:{const _=c(),E={},T=xs((i=s.labelWidth)!=null?i:this.descriptions.labelWidth);return T&&(E.width=T,E.display="inline-block"),_n(tn("td",{style:x,class:[S.e("cell"),f],colSpan:d,rowspan:h},[Ws(_)?void 0:tn("span",{style:E,class:[S.e("label"),b]},_),tn("span",{class:[S.e("content"),m]},u())]),r)}}}});const $1e=_t({row:{type:Re(Array),default:()=>[]}}),V1e={key:1},H1e=Be({name:"ElDescriptionsRow",__name:"descriptions-row",props:$1e,setup(t){const e=zt(Bk,{});return(n,i)=>v(e).direction==="vertical"?(z(),se(At,{key:0},[U("tr",null,[(z(!0),se(At,null,yn(n.row,(s,r)=>(z(),De(v(bv),{key:`tr1-${r}`,cell:s,tag:"th",type:"label"},null,8,["cell"]))),128))]),U("tr",null,[(z(!0),se(At,null,yn(n.row,(s,r)=>(z(),De(v(bv),{key:`tr2-${r}`,cell:s,tag:"td",type:"content"},null,8,["cell"]))),128))])],64)):(z(),se("tr",V1e,[(z(!0),se(At,null,yn(n.row,(s,r)=>(z(),se(At,{key:`tr3-${r}`},[v(e).border?(z(),se(At,{key:0},[de(v(bv),{cell:s,tag:"td",type:"label"},null,8,["cell"]),de(v(bv),{cell:s,tag:"td",type:"content"},null,8,["cell"])],64)):(z(),De(v(bv),{key:1,cell:s,tag:"td",type:"both"},null,8,["cell"]))],64))),128))]))}});var W1e=xt(H1e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/descriptions-row.vue"]]);const G1e=_t({border:Boolean,column:{type:Number,default:3},direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},size:or,title:{type:String,default:""},extra:{type:String,default:""},labelWidth:{type:[String,Number]}}),Oz="ElDescriptionsItem",j1e=Be({name:"ElDescriptions",__name:"description",props:G1e,setup(t){const e=t,n=ht("descriptions"),i=er(),s=tr();Xn(Bk,e);const r=F(()=>[n.b(),n.m(i.value)]),o=(l,c,u,d=!1)=>(l.props||(l.props={}),c>u&&(l.props.span=u),d&&(l.props.span=c),l),a=()=>{if(!s.default)return[];const l=Il(s.default()).filter(p=>{var m;return((m=p?.type)==null?void 0:m.name)===Oz}),c=[];let u=[],d=e.column,h=0;const f=[];return l.forEach((p,m)=>{var b,g,x;const S=((b=p.props)==null?void 0:b.span)||1,_=((g=p.props)==null?void 0:g.rowspan)||1,E=c.length;if(f[E]||(f[E]=0),_>1)for(let T=1;T<_;T++)f[x=E+T]||(f[x]=0),f[E+T]++,h++;if(f[E]>0&&(d-=f[E],f[E]=0),md?d:S),m===l.length-1){const T=e.column-h%e.column;u.push(o(p,T,d,!0)),c.push(u);return}S(z(),se("div",{class:J(r.value)},[l.title||l.extra||l.$slots.title||l.$slots.extra?(z(),se("div",{key:0,class:J(v(n).e("header"))},[U("div",{class:J(v(n).e("title"))},[Ue(l.$slots,"title",{},()=>[cn(Xe(l.title),1)])],2),U("div",{class:J(v(n).e("extra"))},[Ue(l.$slots,"extra",{},()=>[cn(Xe(l.extra),1)])],2)],2)):Le("v-if",!0),U("div",{class:J(v(n).e("body"))},[U("table",{class:J([v(n).e("table"),v(n).is("bordered",l.border)])},[U("tbody",null,[(z(!0),se(At,null,yn(a(),(u,d)=>(z(),De(W1e,{key:d,row:u},null,8,["row"]))),128))])],2)],2)],2))}});var K1e=xt(j1e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/descriptions/src/description.vue"]]);const m6=["left","center","right"],q1e=_t({label:{type:String,default:""},span:{type:Number,default:1},rowspan:{type:Number,default:1},width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},labelWidth:{type:[String,Number]},align:{type:String,values:m6,default:"left"},labelAlign:{type:String,values:m6},className:{type:String,default:""},labelClassName:{type:String,default:""}}),Dz=Be({name:Oz,props:q1e}),Y1e=En(K1e,{DescriptionsItem:Dz}),X1e=Ss(Dz),Fk=t=>{if(!t)return{onClick:_i,onMousedown:_i,onMouseup:_i};let e=!1,n=!1;return{onClick:o=>{e&&n&&t(o),e=n=!1},onMousedown:o=>{e=o.target===o.currentTarget},onMouseup:o=>{n=o.target===o.currentTarget}}},Z1e=_t({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:Re([String,Array,Object])},zIndex:{type:Re([String,Number])}}),J1e={click:t=>t instanceof MouseEvent},Q1e="overlay";var ebe=Be({name:"ElOverlay",props:Z1e,emits:J1e,setup(t,{slots:e,emit:n}){const i=ht(Q1e),s=l=>{n("click",l)},{onClick:r,onMousedown:o,onMouseup:a}=Fk(t.customMaskEvent?void 0:s);return()=>t.mask?de("div",{class:[i.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:r,onMousedown:o,onMouseup:a},[Ue(e,"default")],Za.STYLE|Za.CLASS|Za.PROPS,["onClick","onMouseup","onMousedown"]):tn("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[Ue(e,"default")])}});const zk=ebe,Nz=Symbol("dialogInjectionKey"),g6="dialog-fade",Bz=_t({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:Ai},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),tbe={close:()=>!0},Fz=(t,e,n,i)=>{const s={offsetX:0,offsetY:0},r=X(!1),o=(h,f)=>{if(t.value){const{offsetX:p,offsetY:m}=s,b=t.value.getBoundingClientRect(),g=b.left,x=b.top,S=b.width,_=b.height,E=document.documentElement.clientWidth,T=document.documentElement.clientHeight,A=-g+p,I=-x+m,P=E-g-S+p,k=T-x-(_{const f=h.clientX,p=h.clientY,{offsetX:m,offsetY:b}=s,g=S=>{r.value||(r.value=!0);const _=m+S.clientX-f,E=b+S.clientY-p;o(_,E)},x=()=>{r.value=!1,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",x)};document.addEventListener("mousemove",g),document.addEventListener("mouseup",x)},l=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",d))},c=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",d))},u=()=>{s.offsetX=0,s.offsetY=0,t.value&&(t.value.style.transform="")},d=()=>{const{offsetX:h,offsetY:f}=s;o(h,f)};return mn(()=>{jo(()=>{n.value?l():c()})}),gi(()=>{c()}),{isDragging:r,resetPosition:u,updatePosition:d}},Uk=(...t)=>e=>{t.forEach(n=>{n.value=e})},nbe=["aria-level"],ibe=["aria-label"],sbe=["id"],rbe=Be({name:"ElDialogContent",__name:"dialog-content",props:Bz,emits:tbe,setup(t,{expose:e}){const{t:n}=Jn(),{Close:i}=i7,s=t,{dialogRef:r,headerRef:o,bodyId:a,ns:l,style:c}=zt(Nz),{focusTrapRef:u}=zt(v7),d=Uk(u,r),h=F(()=>!!s.draggable),f=F(()=>!!s.overflow),{resetPosition:p,updatePosition:m,isDragging:b}=Fz(r,o,h,f),g=F(()=>[l.b(),l.is("fullscreen",s.fullscreen),l.is("draggable",h.value),l.is("dragging",b.value),l.is("align-center",!!s.alignCenter),{[l.m("center")]:s.center}]);return e({resetPosition:p,updatePosition:m}),(x,S)=>(z(),se("div",{ref:v(d),class:J(g.value),style:Ht(v(c)),tabindex:"-1"},[U("header",{ref_key:"headerRef",ref:o,class:J([v(l).e("header"),x.headerClass,{"show-close":x.showClose}])},[Ue(x.$slots,"header",{},()=>[U("span",{role:"heading","aria-level":x.ariaLevel,class:J(v(l).e("title"))},Xe(x.title),11,nbe)]),x.showClose?(z(),se("button",{key:0,"aria-label":v(n)("el.dialog.close"),class:J(v(l).e("headerbtn")),type:"button",onClick:S[0]||(S[0]=_=>x.$emit("close"))},[de(v(Ut),{class:J(v(l).e("close"))},{default:xe(()=>[(z(),De(Sn(x.closeIcon||v(i))))]),_:1},8,["class"])],10,ibe)):Le("v-if",!0)],2),U("div",{id:v(a),class:J([v(l).e("body"),x.bodyClass])},[Ue(x.$slots,"default")],10,sbe),x.$slots.footer?(z(),se("footer",{key:0,class:J([v(l).e("footer"),x.footerClass])},[Ue(x.$slots,"footer")],2)):Le("v-if",!0)],6))}});var obe=xt(rbe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog-content.vue"]]);const zz=_t({...Bz,appendToBody:Boolean,appendTo:{type:qy.to.type,default:"body"},beforeClose:{type:Re(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:Re([String,Object]),default:void 0}}),Uz={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[wn]:t=>Mi(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Fx=(t,e={})=>{Li(t)||Ks("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||ht("popup"),i=F(()=>n.bm("parent","hidden"));let s=0,r=!1,o="0";const a=()=>{setTimeout(()=>{typeof document>"u"||r&&document&&(document.body.style.width=o,xo(document.body,i.value))},200)};We(t,l=>{if(!l){a();return}r=!Oc(document.body,i.value),r&&(o=document.body.style.width,nl(document.body,i.value)),s=Z9(n.namespace.value);const c=document.documentElement.clientHeight0&&(c||u==="scroll")&&r&&(document.body.style.width=`calc(100% - ${s}px)`)}),Z2(()=>a())},$z=(t,e)=>{var n;const s=xn().emit,{nextZIndex:r}=jy();let o="";const a=jr(),l=jr(),c=X(!1),u=X(!1),d=X(!1),h=X((n=t.zIndex)!=null?n:r()),f=X(!1);let p,m;const b=Hg(),g=F(()=>{var ie,ne;return(ne=(ie=b.value)==null?void 0:ie.namespace)!=null?ne:u0}),x=F(()=>{var ie;return(ie=b.value)==null?void 0:ie.dialog}),S=F(()=>{const ie={},ne=`--${g.value}-dialog`;if(!t.fullscreen){t.top&&(ie[`${ne}-margin-top`]=t.top);const ce=xs(t.width);ce&&(ie[`${ne}-width`]=ce)}return ie}),_=F(()=>{var ie,ne,ce;return((ce=(ne=t.draggable)!=null?ne:(ie=x.value)==null?void 0:ie.draggable)!=null?ce:!1)&&!t.fullscreen}),E=F(()=>{var ie,ne,ce;return(ce=(ne=t.alignCenter)!=null?ne:(ie=x.value)==null?void 0:ie.alignCenter)!=null?ce:!1}),T=F(()=>{var ie,ne,ce;return(ce=(ne=t.overflow)!=null?ne:(ie=x.value)==null?void 0:ie.overflow)!=null?ce:!1}),A=F(()=>E.value?{display:"flex"}:{}),I=F(()=>{var ie,ne,ce;const ae=(ce=(ne=t.transition)!=null?ne:(ie=x.value)==null?void 0:ie.transition)!=null?ce:g6,_e={name:ae,onAfterEnter:P,onBeforeLeave:B,onAfterLeave:k};if(Mn(ae)){const ke={...ae},Te=(Ke,Fe)=>ve=>{pt(Ke)?Ke.forEach(fe=>{Kt(fe)&&fe(ve)}):Kt(Ke)&&Ke(ve),Fe()};return ke.onAfterEnter=Te(ke.onAfterEnter,P),ke.onBeforeLeave=Te(ke.onBeforeLeave,B),ke.onAfterLeave=Te(ke.onAfterLeave,k),ke.name||(ke.name=g6),ke}return _e});function P(){s("opened")}function k(){s("closed"),s(wn,!1),t.destroyOnClose&&(d.value=!1),f.value=!1}function B(){f.value=!0,s("close")}function R(){m?.(),p?.(),t.openDelay&&t.openDelay>0?{stop:p}=og(()=>Z(),t.openDelay):Z()}function H(){p?.(),m?.(),t.closeDelay&&t.closeDelay>0?{stop:m}=og(()=>V(),t.closeDelay):V()}function q(){function ie(ne){ne||(u.value=!0,c.value=!1)}t.beforeClose?t.beforeClose(ie):H()}function oe(){t.closeOnClickModal&&q()}function Z(){pi&&(c.value=!0)}function V(){c.value=!1}function D(){s("openAutoFocus")}function K(){s("closeAutoFocus")}function W(ie){var ne;((ne=ie.detail)==null?void 0:ne.focusReason)==="pointer"&&ie.preventDefault()}t.lockScroll&&Fx(c);function Q(){t.closeOnPressEscape&&q()}return We(()=>t.zIndex,()=>{var ie;h.value=(ie=t.zIndex)!=null?ie:r()}),We(()=>t.modelValue,ie=>{var ne;ie?(u.value=!1,R(),d.value=!0,h.value=(ne=t.zIndex)!=null?ne:r(),Nt(()=>{s("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):c.value&&H()}),We(()=>t.fullscreen,ie=>{e.value&&(ie?(o=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=o)}),mn(()=>{t.modelValue&&(c.value=!0,d.value=!0,R())}),{afterEnter:P,afterLeave:k,beforeLeave:B,handleClose:q,onModalClick:oe,close:H,doClose:V,onOpenAutoFocus:D,onCloseAutoFocus:K,onCloseRequested:Q,onFocusoutPrevented:W,titleId:a,bodyId:l,closed:u,style:S,overlayDialogStyle:A,rendered:d,visible:c,zIndex:h,transitionConfig:I,_draggable:_,_alignCenter:E,_overflow:T,closing:f}},abe=["aria-label","aria-labelledby","aria-describedby"],lbe=Be({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:zz,emits:Uz,setup(t,{expose:e}){const n=t,i=tr();Bc({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"},F(()=>!!i.title));const s=ht("dialog"),r=X(),o=X(),a=X(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,transitionConfig:p,zIndex:m,_draggable:b,_alignCenter:g,_overflow:x,handleClose:S,onModalClick:_,onOpenAutoFocus:E,onCloseAutoFocus:T,onCloseRequested:A,onFocusoutPrevented:I,closing:P}=$z(n,r);Xn(Nz,{dialogRef:r,headerRef:o,bodyId:u,ns:s,rendered:f,style:d});const k=Fk(_),B=F(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var H;(H=a.value)==null||H.resetPosition()},handleClose:S}),(H,q)=>(z(),De(v(Wg),{to:H.appendTo,disabled:H.appendTo!=="body"?!1:!H.appendToBody},{default:xe(()=>[de(Rr,Dn(v(p),{persisted:""}),{default:xe(()=>{var oe;return[_n(de(v(zk),{"custom-mask-event":"",mask:H.modal,"overlay-class":[(oe=H.modalClass)!=null?oe:"",`${v(s).namespace.value}-modal-dialog`,v(s).is("penetrable",B.value)],"z-index":v(m)},{default:xe(()=>[U("div",{role:"dialog","aria-modal":"true","aria-label":H.title||void 0,"aria-labelledby":H.title?void 0:v(c),"aria-describedby":v(u),class:J([`${v(s).namespace.value}-overlay-dialog`,v(s).is("closing",v(P))]),style:Ht(v(h)),onClick:q[0]||(q[0]=(...Z)=>v(k).onClick&&v(k).onClick(...Z)),onMousedown:q[1]||(q[1]=(...Z)=>v(k).onMousedown&&v(k).onMousedown(...Z)),onMouseup:q[2]||(q[2]=(...Z)=>v(k).onMouseup&&v(k).onMouseup(...Z))},[de(v(Gg),{loop:"",trapped:v(l),"focus-start-el":"container",onFocusAfterTrapped:v(E),onFocusAfterReleased:v(T),onFocusoutPrevented:v(I),onReleaseRequested:v(A)},{default:xe(()=>[v(f)?(z(),De(obe,Dn({key:0,ref_key:"dialogContentRef",ref:a},H.$attrs,{center:H.center,"align-center":v(g),"close-icon":H.closeIcon,draggable:v(b),overflow:v(x),fullscreen:H.fullscreen,"header-class":H.headerClass,"body-class":H.bodyClass,"footer-class":H.footerClass,"show-close":H.showClose,title:H.title,"aria-level":H.headerAriaLevel,onClose:v(S)}),va({header:xe(()=>[H.$slots.title?Ue(H.$slots,"title",{key:1}):Ue(H.$slots,"header",{key:0,close:v(S),titleId:v(c),titleClass:v(s).e("title")})]),default:xe(()=>[Ue(H.$slots,"default")]),_:2},[H.$slots.footer?{name:"footer",fn:xe(()=>[Ue(H.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):Le("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,abe)]),_:3},8,["mask","overlay-class","z-index"]),[[ci,v(l)]])]}),_:3},16)]),_:3},8,["to","disabled"]))}});var cbe=xt(lbe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/dialog/src/dialog.vue"]]);const ube=En(cbe),dbe=_t({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:Re(String),default:"solid"}}),hbe=Be({name:"ElDivider",__name:"divider",props:dbe,setup(t){const e=t,n=ht("divider"),i=F(()=>n.cssVar({"border-style":e.borderStyle}));return(s,r)=>(z(),se("div",{class:J([v(n).b(),v(n).m(s.direction)]),style:Ht(i.value),role:"separator"},[s.$slots.default&&s.direction!=="vertical"?(z(),se("div",{key:0,class:J([v(n).e("text"),v(n).is(s.contentPosition)])},[Ue(s.$slots,"default")],2)):Le("v-if",!0)],6))}});var fbe=xt(hbe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/divider/src/divider.vue"]]);const Vz=En(fbe),pbe=_t({...zz,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),mbe={...Uz,"resize-start":(t,e)=>t instanceof MouseEvent&&typeof e=="number",resize:(t,e)=>t instanceof MouseEvent&&typeof e=="number","resize-end":(t,e)=>t instanceof MouseEvent&&typeof e=="number"};function gbe(t,e,n){const{width:i,height:s}=ek(),r=F(()=>["ltr","rtl"].includes(t.direction)),o=F(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=F(()=>r.value?i.value:s.value),l=F(()=>D9(c.value+o.value*u.value,4,a.value)),c=X(0),u=X(0),d=X(!1),h=X(!1);let f=[],p=[];const m=()=>{var _;const E=(_=e.value)==null?void 0:_.closest('[aria-modal="true"]');return E?r.value?E.offsetWidth:E.offsetHeight:100};We(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,x()});const b=_=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[_.pageX,_.pageY],d.value=!0,n("resize-start",_,c.value),p.push(xi(window,"mouseup",x),xi(window,"mousemove",g)))},g=_=>{const{pageX:E,pageY:T}=_,A=E-f[0],I=T-f[1];u.value=r.value?A:I,n("resize",_,l.value)},x=_=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(E=>E?.()),p=[],_&&n("resize-end",_,c.value))},S=xi(e,"mousedown",b);return gi(()=>{S(),x()}),{size:F(()=>h.value?`${l.value}px`:xs(t.size)),isResizing:d,isHorizontal:r}}const vbe=["aria-label","aria-labelledby","aria-describedby"],ybe=["id","aria-level"],bbe=["aria-label"],_be=["id"],wbe=Be({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:pbe,emits:mbe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=tr();Bc({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"},F(()=>!!r.title));const o=X(),a=X(),l=X(),c=ht("drawer"),{t:u}=Jn(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:b,bodyId:g,zIndex:x,onModalClick:S,onOpenAutoFocus:_,onCloseAutoFocus:E,onFocusoutPrevented:T,onCloseRequested:A,handleClose:I}=$z(i,o),{isHorizontal:P,size:k,isResizing:B}=gbe(i,l,s),R=F(()=>i.modalPenetrable&&!i.modal);return e({handleClose:I,afterEnter:d,afterLeave:h}),(H,q)=>(z(),De(v(Wg),{to:H.appendTo,disabled:H.appendTo!=="body"?!1:!H.appendToBody},{default:xe(()=>[de(Rr,{name:v(c).b("fade"),onAfterEnter:v(d),onAfterLeave:v(h),onBeforeLeave:v(f),persisted:""},{default:xe(()=>{var oe;return[_n(de(v(zk),{mask:H.modal,"overlay-class":[v(c).is("drawer"),(oe=H.modalClass)!=null?oe:"",`${v(c).namespace.value}-modal-drawer`,v(c).is("penetrable",R.value)],"z-index":v(x),onClick:v(S)},{default:xe(()=>[de(v(Gg),{loop:"",trapped:v(p),"focus-trap-el":o.value,"focus-start-el":a.value,onFocusAfterTrapped:v(_),onFocusAfterReleased:v(E),onFocusoutPrevented:v(T),onReleaseRequested:v(A)},{default:xe(()=>[U("div",Dn({ref_key:"drawerRef",ref:o,"aria-modal":"true","aria-label":H.title||void 0,"aria-labelledby":H.title?void 0:v(b),"aria-describedby":v(g)},H.$attrs,{class:[v(c).b(),H.direction,v(p)&&"open",v(c).is("dragging",v(B))],style:{[v(P)?"width":"height"]:v(k)},role:"dialog",onClick:q[1]||(q[1]=un(()=>{},["stop"]))}),[U("span",{ref_key:"focusStartRef",ref:a,class:J(v(c).e("sr-focus")),tabindex:"-1"},null,2),H.withHeader?(z(),se("header",{key:0,class:J([v(c).e("header"),H.headerClass])},[H.$slots.title?Ue(H.$slots,"title",{key:1},()=>[Le(" DEPRECATED SLOT ")]):Ue(H.$slots,"header",{key:0,close:v(I),titleId:v(b),titleClass:v(c).e("title")},()=>[U("span",{id:v(b),role:"heading","aria-level":H.headerAriaLevel,class:J(v(c).e("title"))},Xe(H.title),11,ybe)]),H.showClose?(z(),se("button",{key:2,"aria-label":v(u)("el.drawer.close"),class:J(v(c).e("close-btn")),type:"button",onClick:q[0]||(q[0]=(...Z)=>v(I)&&v(I)(...Z))},[de(v(Ut),{class:J(v(c).e("close"))},{default:xe(()=>[de(v(ul))]),_:1},8,["class"])],10,bbe)):Le("v-if",!0)],2)):Le("v-if",!0),v(m)?(z(),se("div",{key:1,id:v(g),class:J([v(c).e("body"),H.bodyClass])},[Ue(H.$slots,"default")],10,_be)):Le("v-if",!0),H.$slots.footer?(z(),se("div",{key:2,class:J([v(c).e("footer"),H.footerClass])},[Ue(H.$slots,"footer")],2)):Le("v-if",!0),H.resizable?(z(),se("div",{key:3,ref_key:"draggerRef",ref:l,style:Ht({zIndex:v(x)}),class:J(v(c).e("dragger"))},null,6)):Le("v-if",!0)],16,vbe)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[ci,v(p)]])]}),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var xbe=xt(wbe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/drawer/src/drawer.vue"]]);const Sbe=En(xbe),Ebe=Be({inheritAttrs:!1});function Cbe(t,e,n,i,s,r){return Ue(t.$slots,"default")}var Tbe=xt(Ebe,[["render",Cbe],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection.vue"]]);const Mbe=Be({name:"ElCollectionItem",inheritAttrs:!1});function Abe(t,e,n,i,s,r){return Ue(t.$slots,"default")}var kbe=xt(Mbe,[["render",Abe],["__file","/home/runner/work/element-plus/element-plus/packages/components/collection/src/collection-item.vue"]]);const Hz="data-el-collection-item",Pbe=t=>{const e=`El${t}Collection`,n=`${e}Item`,i=Symbol(e),s=Symbol(n),r=Object.assign({},Tbe,{name:e,setup(){const a=X(),l=new Map;Xn(i,{itemMap:l,getItems:()=>{const u=v(a);if(!u)return[];const d=Array.from(u.querySelectorAll(`[${Hz}]`));return[...l.values()].sort((f,p)=>d.indexOf(f.ref)-d.indexOf(p.ref))},collectionRef:a})}}),o=Object.assign({},kbe,{name:n,setup(a,{attrs:l}){const c=X(),u=zt(i,void 0);Xn(s,{collectionItemRef:c}),mn(()=>{const d=v(c);d&&u.itemMap.set(d,{ref:d,...l})}),gi(()=>{const d=v(c);u.itemMap.delete(d)})}});return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:s,ElCollection:r,ElCollectionItem:o}},Lbe=_t({style:{type:Re([String,Array,Object])},currentTabId:{type:Re(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:Re(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Ibe,ElCollectionItem:Rbe,COLLECTION_INJECTION_KEY:Wz,COLLECTION_ITEM_INJECTION_KEY:Obe}=Pbe("RovingFocusGroup"),$k=Symbol("elRovingFocusGroup"),Gz=Symbol("elRovingFocusGroupItem"),Dbe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Nbe=(t,e)=>t,Bbe=(t,e,n)=>{const i=Oi(t),s=Nbe(i);return Dbe[s]},Fbe=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),v6=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},y6="currentTabIdChange",b6="rovingFocusGroup.entryFocus",zbe={bubbles:!1,cancelable:!0},Ube=Be({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Lbe,emits:[y6,"entryFocus"],setup(t,{emit:e}){var n;const i=X((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),s=X(!1),r=X(!1),o=X(),{getItems:a}=zt(Wz,void 0),l=F(()=>[{outline:"none"},t.style]),c=b=>{e(y6,b)},u=()=>{s.value=!0},d=_r(b=>{var g;(g=t.onMousedown)==null||g.call(t,b)},()=>{r.value=!0}),h=_r(b=>{var g;(g=t.onFocus)==null||g.call(t,b)},b=>{const g=!v(r),{target:x,currentTarget:S}=b;if(x===S&&g&&!v(s)){const _=new Event(b6,zbe);if(S?.dispatchEvent(_),!_.defaultPrevented){const E=a().filter(k=>k.focusable),T=E.find(k=>k.active),A=E.find(k=>k.id===v(i)),P=[T,A,...E].filter(Boolean).map(k=>k.ref);v6(P)}}r.value=!1}),f=_r(b=>{var g;(g=t.onBlur)==null||g.call(t,b)},()=>{s.value=!1}),p=(...b)=>{e("entryFocus",...b)},m=b=>{const g=Bbe(b);if(g){b.preventDefault();let S=a().filter(_=>_.focusable).map(_=>_.ref);switch(g){case"last":{S.reverse();break}case"prev":case"next":{g==="prev"&&S.reverse();const _=S.indexOf(b.currentTarget);S=t.loop?Fbe(S,_+1):S.slice(_+1);break}}Nt(()=>{v6(S)})}};Xn($k,{currentTabbedId:Vc(i),loop:Ei(t,"loop"),tabIndex:F(()=>v(s)?-1:0),rovingFocusGroupRef:o,rovingFocusGroupRootStyle:l,orientation:Ei(t,"orientation"),dir:Ei(t,"dir"),onItemFocus:c,onItemShiftTab:u,onBlur:f,onFocus:h,onMousedown:d,onKeydown:m}),We(()=>t.currentTabId,b=>{i.value=b??null}),xi(o,b6,p)}});function $be(t,e,n,i,s,r){return Ue(t.$slots,"default")}var Vbe=xt(Ube,[["render",$be],["__file","/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group-impl.vue"]]);const Hbe=Be({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Ibe,ElRovingFocusGroupImpl:Vbe}});function Wbe(t,e,n,i,s,r){const o=Zt("el-roving-focus-group-impl"),a=Zt("el-focus-group-collection");return z(),De(a,null,{default:xe(()=>[de(o,Wu(Gu(t.$attrs)),{default:xe(()=>[Ue(t.$slots,"default")]),_:3},16)]),_:3})}var Gbe=xt(Hbe,[["render",Wbe],["__file","/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-group.vue"]]);const ew=_t({trigger:{...Nc.trigger,type:Re([String,Array])},triggerKeys:{type:Re(Array),default:()=>[gt.enter,gt.numpadEnter,gt.space,gt.down]},virtualTriggering:Nc.virtualTriggering,virtualRef:Nc.virtualRef,effect:{...Ri.effect,default:"light"},type:{type:Re(String)},placement:{type:Re(String),default:"bottom"},popperOptions:{type:Re(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:Re([Number,String]),default:0},maxHeight:{type:Re([Number,String]),default:""},popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,disabled:Boolean,role:{type:String,values:d7,default:"menu"},buttonProps:{type:Re(Object)},teleported:Ri.teleported,appendTo:Ri.appendTo,persistent:{type:Boolean,default:!0}}),jz=_t({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:Ai}}),jbe=_t({onKeydown:{type:Re(Function)}}),zx=Symbol("elDropdown"),Kz="elDropdown",{ButtonGroup:Kbe}=Sr,qbe=Be({name:"ElDropdown",components:{ElButton:Sr,ElButtonGroup:Kbe,ElScrollbar:Wl,ElTooltip:Or,ElRovingFocusGroup:Gbe,ElOnlyChild:m7,ElIcon:Ut,ArrowDown:eu},props:ew,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=xn(),i=ht("dropdown"),{t:s}=Jn(),r=X(),o=X(),a=X(),l=X(),c=X(null),u=X(null),d=X(!1),h=F(()=>({maxHeight:xs(t.maxHeight)})),f=F(()=>[i.m(_.value)]),p=F(()=>Pr(t.trigger)),m=jr().value,b=F(()=>t.id||m);function g(){var H;(H=a.value)==null||H.onClose(void 0,0)}function x(){var H;(H=a.value)==null||H.onClose()}function S(){var H;(H=a.value)==null||H.onOpen()}const _=er();function E(...H){e("command",...H)}function T(){}function A(){const H=v(l);p.value.includes("hover")&&H?.focus({preventScroll:!0}),u.value=null}function I(H){u.value=H}function P(){e("visible-change",!0)}function k(H){var q;d.value=H?.type==="keydown",(q=l.value)==null||q.focus()}function B(){e("visible-change",!1)}return Xn(zx,{contentRef:l,role:F(()=>t.role),triggerId:b,isUsingKeyboard:d,onItemEnter:T,onItemLeave:A,handleClose:x}),Xn(Kz,{instance:n,dropdownSize:_,handleClick:g,commandHandler:E,trigger:Ei(t,"trigger"),hideOnClick:Ei(t,"hideOnClick")}),{t:s,ns:i,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:_,triggerId:b,currentTabId:u,handleCurrentTabIdChange:I,handlerMainButtonClick:H=>{e("click",H)},handleClose:x,handleOpen:S,handleBeforeShowTooltip:P,handleShowTooltip:k,handleBeforeHideTooltip:B,popperRef:a,contentRef:l,triggeringElementRef:r,referenceElementRef:o}}});function Ybe(t,e,n,i,s,r){var o;const a=Zt("el-roving-focus-group"),l=Zt("el-scrollbar"),c=Zt("el-only-child"),u=Zt("el-tooltip"),d=Zt("el-button"),h=Zt("arrow-down"),f=Zt("el-icon"),p=Zt("el-button-group");return z(),se("div",{class:J([t.ns.b(),t.ns.is("disabled",t.disabled)])},[de(u,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"popper-style":t.popperStyle,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-arrow":t.showArrow,"show-after":t.trigger==="hover"?t.showTimeout:0,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"virtual-ref":(o=t.virtualRef)!=null?o:t.triggeringElementRef,"virtual-triggering":t.virtualTriggering||t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,"append-to":t.appendTo,pure:"","focus-on-target":"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},va({content:xe(()=>[de(l,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:xe(()=>[de(a,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:xe(()=>[Ue(t.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:xe(()=>[de(c,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:xe(()=>[Ue(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(z(),De(p,{key:0},{default:xe(()=>[de(d,Dn({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:xe(()=>[Ue(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),de(d,Dn({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:xe(()=>[de(f,{class:J(t.ns.e("icon"))},{default:xe(()=>[de(h)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):Le("v-if",!0)],2)}var Xbe=xt(qbe,[["render",Ybe],["__file","/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown.vue"]]);const Zbe=Be({components:{ElRovingFocusCollectionItem:Rbe},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,onItemFocus:i,onItemShiftTab:s,onKeydown:r}=zt($k,void 0),o=jr(),a=X(),l=_r(h=>{e("mousedown",h)},h=>{t.focusable?i(v(o)):h.preventDefault()}),c=_r(h=>{e("focus",h)},()=>{i(v(o))}),u=_r(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(Oi(h)===gt.tab&&f){s();return}p===m&&r(h)}),d=F(()=>n.value===v(o));return Xn(Gz,{rovingFocusGroupItemRef:a,tabIndex:F(()=>v(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:o,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function Jbe(t,e,n,i,s,r){const o=Zt("el-roving-focus-collection-item");return z(),De(o,{id:t.id,focusable:t.focusable,active:t.active},{default:xe(()=>[Ue(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var Qbe=xt(Zbe,[["render",Jbe],["__file","/home/runner/work/element-plus/element-plus/packages/components/roving-focus-group/src/roving-focus-item.vue"]]);const e_e=Be({name:"DropdownItemImpl",components:{ElIcon:Ut},props:jz,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=ht("dropdown"),{role:i}=zt(zx,void 0),{collectionItemRef:s}=zt(Obe,void 0),{rovingFocusGroupItemRef:r,tabIndex:o,handleFocus:a,handleKeydown:l,handleMousedown:c}=zt(Gz,void 0),u=Uk(s,r),d=F(()=>i.value==="menu"?"menuitem":i.value==="navigation"?"link":"button"),h=_r(f=>{const p=Oi(f);if([gt.enter,gt.numpadEnter,gt.space].includes(p))return f.preventDefault(),f.stopImmediatePropagation(),e("clickimpl",f),!0},l);return{ns:n,itemRef:u,dataset:{[Hz]:""},role:d,tabIndex:o,handleFocus:a,handleKeydown:h,handleMousedown:c}}}),t_e=["aria-disabled","tabindex","role"];function n_e(t,e,n,i,s,r){const o=Zt("el-icon");return z(),se(At,null,[t.divided?(z(),se("li",{key:0,role:"separator",class:J(t.ns.bem("menu","item","divided"))},null,2)):Le("v-if",!0),U("li",Dn({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:e[0]||(e[0]=a=>t.$emit("clickimpl",a)),onFocus:e[1]||(e[1]=(...a)=>t.handleFocus&&t.handleFocus(...a)),onKeydown:e[2]||(e[2]=un((...a)=>t.handleKeydown&&t.handleKeydown(...a),["self"])),onMousedown:e[3]||(e[3]=(...a)=>t.handleMousedown&&t.handleMousedown(...a)),onPointermove:e[4]||(e[4]=a=>t.$emit("pointermove",a)),onPointerleave:e[5]||(e[5]=a=>t.$emit("pointerleave",a))}),[t.icon?(z(),De(o,{key:0},{default:xe(()=>[(z(),De(Sn(t.icon)))]),_:1})):Le("v-if",!0),Ue(t.$slots,"default")],16,t_e)],64)}var i_e=xt(e_e,[["render",n_e],["__file","/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item-impl.vue"]]);const qz=()=>{const t=zt(Kz,{}),e=F(()=>t?.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},s_e=Be({name:"ElDropdownItem",components:{ElRovingFocusItem:Qbe,ElDropdownItemImpl:i_e},inheritAttrs:!1,props:jz,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=qz(),s=xn(),{onItemEnter:r,onItemLeave:o}=zt(zx,void 0),a=_r(d=>(e("pointermove",d),d.defaultPrevented),T8(d=>{if(t.disabled){o(d);return}const h=d.currentTarget;h===document.activeElement||h.contains(document.activeElement)||(r(d),d.defaultPrevented||h?.focus({preventScroll:!0}))})),l=_r(d=>(e("pointerleave",d),d.defaultPrevented),T8(o)),c=_r(d=>{if(!t.disabled)return e("click",d),d.type!=="keydown"&&d.defaultPrevented},d=>{var h,f,p;if(t.disabled){d.stopImmediatePropagation();return}(h=i?.hideOnClick)!=null&&h.value&&((f=i.handleClick)==null||f.call(i)),(p=i.commandHandler)==null||p.call(i,t.command,s,d)}),u=F(()=>({...t,...n}));return{handleClick:c,handlePointerMove:a,handlePointerLeave:l,propsAndAttrs:u}}});function r_e(t,e,n,i,s,r){const o=Zt("el-dropdown-item-impl"),a=Zt("el-roving-focus-item");return z(),De(a,{focusable:!t.disabled},{default:xe(()=>[de(o,Dn(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:xe(()=>[Ue(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var Yz=xt(s_e,[["render",r_e],["__file","/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-item.vue"]]);const o_e=Be({name:"ElDropdownMenu",props:jbe,setup(t){const e=ht("dropdown"),{_elDropdownSize:n}=qz(),i=n.value,{contentRef:s,role:r,triggerId:o,isUsingKeyboard:a,handleClose:l}=zt(zx,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=zt($k,void 0),{collectionRef:m}=zt(Wz,void 0),b=F(()=>[e.b("menu"),e.bm("menu",i?.value)]),g=Uk(s,c,m),x=_r(_=>{var E;(E=t.onKeydown)==null||E.call(t,_)},_=>{const{currentTarget:E,target:T}=_,A=Oi(_);if(E.contains(T),gt.tab===A)return l();f(_)});function S(_){a.value&&h(_)}return{size:i,rovingFocusGroupRootStyle:u,dropdownKls:b,role:r,triggerId:o,dropdownListWrapperRef:g,handleKeydown:x,onBlur:d,handleFocus:S,onMousedown:p}}}),a_e=["role","aria-labelledby"];function l_e(t,e,n,i,s,r){return z(),se("ul",{ref:t.dropdownListWrapperRef,class:J(t.dropdownKls),style:Ht(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onFocusin:e[0]||(e[0]=(...o)=>t.handleFocus&&t.handleFocus(...o)),onFocusout:e[1]||(e[1]=(...o)=>t.onBlur&&t.onBlur(...o)),onKeydown:e[2]||(e[2]=un((...o)=>t.handleKeydown&&t.handleKeydown(...o),["self"])),onMousedown:e[3]||(e[3]=un((...o)=>t.onMousedown&&t.onMousedown(...o),["self"]))},[Ue(t.$slots,"default")],46,a_e)}var Xz=xt(o_e,[["render",l_e],["__file","/home/runner/work/element-plus/element-plus/packages/components/dropdown/src/dropdown-menu.vue"]]);const Zz=En(Xbe,{DropdownItem:Yz,DropdownMenu:Xz}),Jz=Ss(Yz),Qz=Ss(Xz),c_e={viewBox:"0 0 79 86",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},u_e=["id"],d_e=["stop-color"],h_e=["stop-color"],f_e=["id"],p_e=["stop-color"],m_e=["stop-color"],g_e=["id"],v_e={stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},y_e={transform:"translate(-1268.000000, -535.000000)"},b_e={transform:"translate(1268.000000, 535.000000)"},__e=["fill"],w_e=["fill"],x_e={transform:"translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"},S_e=["fill"],E_e=["fill"],C_e=["fill"],T_e=["fill"],M_e=["fill"],A_e={transform:"translate(53.000000, 45.000000)"},k_e=["fill","xlink:href"],P_e=["fill","mask"],L_e=["fill"],I_e=Be({name:"ImgEmpty",__name:"img-empty",setup(t){const e=ht("empty"),n=jr();return(i,s)=>(z(),se("svg",c_e,[U("defs",null,[U("linearGradient",{id:`linearGradient-1-${v(n)}`,x1:"38.8503086%",y1:"0%",x2:"61.1496914%",y2:"100%"},[U("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,d_e),U("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-4")})`,offset:"100%"},null,8,h_e)],8,u_e),U("linearGradient",{id:`linearGradient-2-${v(n)}`,x1:"0%",y1:"9.5%",x2:"100%",y2:"90.5%"},[U("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-1")})`,offset:"0%"},null,8,p_e),U("stop",{"stop-color":`var(${v(e).cssVarBlockName("fill-color-6")})`,offset:"100%"},null,8,m_e)],8,f_e),U("rect",{id:`path-3-${v(n)}`,x:"0",y:"0",width:"17",height:"36"},null,8,g_e)]),U("g",v_e,[U("g",y_e,[U("g",b_e,[U("path",{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(${v(e).cssVarBlockName("fill-color-3")})`},null,8,__e),U("polygon",{fill:`var(${v(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,w_e),U("g",x_e,[U("polygon",{fill:`var(${v(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,S_e),U("polygon",{fill:`var(${v(e).cssVarBlockName("fill-color-5")})`,points:"-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"},null,8,E_e),U("rect",{fill:`url(#linearGradient-1-${v(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,C_e),U("polygon",{fill:`var(${v(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,T_e)]),U("rect",{fill:`url(#linearGradient-2-${v(n)})`,x:"13",y:"45",width:"40",height:"36"},null,8,M_e),U("g",A_e,[U("use",{fill:`var(${v(e).cssVarBlockName("fill-color-8")})`,transform:"translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) ","xlink:href":`#path-3-${v(n)}`},null,8,k_e),U("polygon",{fill:`var(${v(e).cssVarBlockName("fill-color-9")})`,mask:`url(#mask-4-${v(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,P_e)]),U("polygon",{fill:`var(${v(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,L_e)])])])]))}});var R_e=xt(I_e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/empty/src/img-empty.vue"]]);const O_e=_t({image:{type:String,default:""},imageSize:Number,description:{type:String,default:""}}),D_e=["src"],N_e={key:1},B_e=Be({name:"ElEmpty",__name:"empty",props:O_e,setup(t){const e=t,{t:n}=Jn(),i=ht("empty"),s=F(()=>e.description||n("el.table.emptyText")),r=F(()=>({width:xs(e.imageSize)}));return(o,a)=>(z(),se("div",{class:J(v(i).b())},[U("div",{class:J(v(i).e("image")),style:Ht(r.value)},[o.image?(z(),se("img",{key:0,src:o.image,ondragstart:"return false"},null,8,D_e)):Ue(o.$slots,"image",{key:1},()=>[de(R_e)])],6),U("div",{class:J(v(i).e("description"))},[o.$slots.description?Ue(o.$slots,"description",{key:0}):(z(),se("p",N_e,Xe(s.value),1))],2),o.$slots.default?(z(),se("div",{key:0,class:J(v(i).e("bottom"))},[Ue(o.$slots,"default")],2)):Le("v-if",!0)],2))}});var F_e=xt(B_e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/empty/src/empty.vue"]]);const eU=En(F_e),z_e=_t({size:{type:String,values:Qc},disabled:Boolean}),U_e=_t({...z_e,model:Object,rules:{type:Re(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:Re([Object,Boolean]),default:!0}}),$_e={validate:(t,e,n)=>(pt(t)||Gt(t))&&Mi(e)&&Gt(n)};function V_e(){const t=X([]),e=F(()=>{if(!t.value.length)return"0";const r=Math.max(...t.value);return r?`${r}px`:""});function n(r){const o=t.value.indexOf(r);return o===-1&&e.value,o}function i(r,o){if(r&&o){const a=n(o);t.value.splice(a,1,r)}else r&&t.value.push(r)}function s(r){const o=n(r);o>-1&&t.value.splice(o,1)}return{autoLabelWidth:e,registerLabelWidth:i,deregisterLabelWidth:s}}const ab=(t,e)=>{const n=Pr(e).map(i=>pt(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},H_e="ElForm",W_e=Be({name:H_e,__name:"form",props:U_e,emits:$_e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=X(),o=ni([]),a=er(),l=ht("form"),c=F(()=>{const{labelPosition:E,inline:T}=i;return[l.b(),l.m(a.value||"default"),{[l.m(`label-${E}`)]:E,[l.m("inline")]:T}]}),u=E=>ab(o,[E])[0],d=E=>{o.push(E)},h=E=>{E.prop&&o.splice(o.indexOf(E),1)},f=(E=[])=>{i.model&&ab(o,E).forEach(T=>T.resetField())},p=(E=[])=>{ab(o,E).forEach(T=>T.clearValidate())},m=F(()=>!!i.model),b=E=>{if(o.length===0)return[];const T=ab(o,E);return T.length?T:[]},g=async E=>S(void 0,E),x=async(E=[])=>{if(!m.value)return!1;const T=b(E);if(T.length===0)return!0;let A={};for(const I of T)try{await I.validate(""),I.validateState==="error"&&!I.error&&I.resetField()}catch(P){A={...A,...P}}return Object.keys(A).length===0?!0:Promise.reject(A)},S=async(E=[],T)=>{let A=!1;const I=!Kt(T);try{return A=await x(E),A===!0&&await T?.(A),A}catch(P){if(P instanceof Error)throw P;const k=P;if(i.scrollToError&&r.value){const B=r.value.querySelector(`.${l.b()}-item.is-error`);B?.scrollIntoView(i.scrollIntoViewOptions)}return!A&&await T?.(!1,k),I&&Promise.reject(k)}},_=E=>{var T;const A=u(E);A&&((T=A.$el)==null||T.scrollIntoView(i.scrollIntoViewOptions))};return We(()=>i.rules,()=>{i.validateOnRuleChange&&g().catch(E=>void 0)},{deep:!0,flush:"post"}),Xn(fp,ni({...hr(i),emit:s,resetFields:f,clearValidate:p,validateField:S,getField:u,addField:d,removeField:h,...V_e()})),e({validate:g,validateField:S,resetFields:f,clearValidate:p,scrollToField:_,getField:u,fields:o}),(E,T)=>(z(),se("form",{ref_key:"formRef",ref:r,class:J(c.value)},[Ue(E.$slots,"default")],2))}});var G_e=xt(W_e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form.vue"]]);function xf(){return xf=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tw(t,e,n){return K_e()?tw=Reflect.construct.bind():tw=function(s,r,o){var a=[null];a.push.apply(a,r);var l=Function.bind.apply(s,a),c=new l;return o&&X0(c,o.prototype),c},tw.apply(null,arguments)}function q_e(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function HT(t){var e=typeof Map=="function"?new Map:void 0;return HT=function(i){if(i===null||!q_e(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,s)}function s(){return tw(i,arguments,VT(this).constructor)}return s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),X0(s,i)},HT(t)}var Y_e=/%[sdj%]/g,X_e=function(){};function WT(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Ra(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i=r)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return o}return t}function Z_e(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Dr(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||Z_e(e)&&typeof t=="string"&&!t)}function J_e(t,e,n){var i=[],s=0,r=t.length;function o(a){i.push.apply(i,a||[]),s++,s===r&&n(i)}t.forEach(function(a){e(a,o)})}function _6(t,e,n){var i=0,s=t.length;function r(o){if(o&&o.length){n(o);return}var a=i;i=i+1,a()\[\]\\.,;:\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},Uv={integer:function(e){return Uv.number(e)&&parseInt(e,10)===e},float:function(e){return Uv.number(e)&&!Uv.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"&&!Uv.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(E6.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(swe())},hex:function(e){return typeof e=="string"&&!!e.match(E6.hex)}},rwe=function(e,n,i,s,r){if(e.required&&n===void 0){tU(e,n,i,s,r);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;o.indexOf(a)>-1?Uv[a](n)||s.push(Ra(r.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&s.push(Ra(r.messages.types[a],e.fullField,e.type))},owe=function(e,n,i,s,r){var o=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",f=typeof n=="string",p=Array.isArray(n);if(h?d="number":f?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),f&&(u=n.replace(c,"_").length),o?u!==e.len&&s.push(Ra(r.messages[d].len,e.fullField,e.len)):a&&!l&&ue.max?s.push(Ra(r.messages[d].max,e.fullField,e.max)):a&&l&&(ue.max)&&s.push(Ra(r.messages[d].range,e.fullField,e.min,e.max))},Ip="enum",awe=function(e,n,i,s,r){e[Ip]=Array.isArray(e[Ip])?e[Ip]:[],e[Ip].indexOf(n)===-1&&s.push(Ra(r.messages[Ip],e.fullField,e[Ip].join(", ")))},lwe=function(e,n,i,s,r){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||s.push(Ra(r.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(n)||s.push(Ra(r.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},Xi={required:tU,whitespace:iwe,type:rwe,range:owe,enum:awe,pattern:lwe},cwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n,"string")&&!e.required)return i();Xi.required(e,n,s,o,r,"string"),Dr(n,"string")||(Xi.type(e,n,s,o,r),Xi.range(e,n,s,o,r),Xi.pattern(e,n,s,o,r),e.whitespace===!0&&Xi.whitespace(e,n,s,o,r))}i(o)},uwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&Xi.type(e,n,s,o,r)}i(o)},dwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&(Xi.type(e,n,s,o,r),Xi.range(e,n,s,o,r))}i(o)},hwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&Xi.type(e,n,s,o,r)}i(o)},fwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),Dr(n)||Xi.type(e,n,s,o,r)}i(o)},pwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&(Xi.type(e,n,s,o,r),Xi.range(e,n,s,o,r))}i(o)},mwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&(Xi.type(e,n,s,o,r),Xi.range(e,n,s,o,r))}i(o)},gwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return i();Xi.required(e,n,s,o,r,"array"),n!=null&&(Xi.type(e,n,s,o,r),Xi.range(e,n,s,o,r))}i(o)},vwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&Xi.type(e,n,s,o,r)}i(o)},ywe="enum",bwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r),n!==void 0&&Xi[ywe](e,n,s,o,r)}i(o)},_we=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n,"string")&&!e.required)return i();Xi.required(e,n,s,o,r),Dr(n,"string")||Xi.pattern(e,n,s,o,r)}i(o)},wwe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n,"date")&&!e.required)return i();if(Xi.required(e,n,s,o,r),!Dr(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),Xi.type(e,l,s,o,r),l&&Xi.range(e,l.getTime(),s,o,r)}}i(o)},xwe=function(e,n,i,s,r){var o=[],a=Array.isArray(n)?"array":typeof n;Xi.required(e,n,s,o,r,a),i(o)},aE=function(e,n,i,s,r){var o=e.type,a=[],l=e.required||!e.required&&s.hasOwnProperty(e.field);if(l){if(Dr(n,o)&&!e.required)return i();Xi.required(e,n,s,a,r,o),Dr(n,o)||Xi.type(e,n,s,a,r)}i(a)},Swe=function(e,n,i,s,r){var o=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Dr(n)&&!e.required)return i();Xi.required(e,n,s,o,r)}i(o)},g0={string:cwe,method:uwe,number:dwe,boolean:hwe,regexp:fwe,integer:pwe,float:mwe,array:gwe,object:vwe,enum:bwe,pattern:_we,date:wwe,url:aE,hex:aE,email:aE,required:xwe,any:Swe};function GT(){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 jT=GT(),n1=(function(){function t(n){this.rules=null,this._messages=jT,this.define(n)}var e=t.prototype;return e.define=function(i){var s=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(r){var o=i[r];s.rules[r]=Array.isArray(o)?o:[o]})},e.messages=function(i){return i&&(this._messages=S6(GT(),i)),this._messages},e.validate=function(i,s,r){var o=this;s===void 0&&(s={}),r===void 0&&(r=function(){});var a=i,l=s,c=r;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(m){var b=[],g={};function x(_){if(Array.isArray(_)){var E;b=(E=b).concat.apply(E,_)}else b.push(_)}for(var S=0;S");const s=ht("form"),r=X(),o=X(0),a=()=>{var u;if((u=r.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(r.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(u="update")=>{Nt(()=>{e.default&&t.isAutoWidth&&(u==="update"?o.value=a():u==="remove"&&n?.deregisterLabelWidth(o.value))})},c=()=>l("update");return mn(()=>{c()}),gi(()=>{l("remove")}),ec(()=>c()),We(o,(u,d)=>{t.updateAll&&n?.registerLabelWidth(u,d)}),as(F(()=>{var u,d;return(d=(u=r.value)==null?void 0:u.firstElementChild)!=null?d:null}),c),()=>{var u,d;if(!e)return null;const{isAutoWidth:h}=t;if(h){const f=n?.autoLabelWidth,p=i?.hasLabel,m={};if(p&&f&&f!=="auto"){const b=Math.max(0,Number.parseInt(f,10)-o.value),x=(i.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";b&&(m[x]=`${b}px`)}return de("div",{ref:r,class:[s.be("item","label-wrap")],style:m},[(u=e.default)==null?void 0:u.call(e)])}else return de(At,{ref:r},[(d=e.default)==null?void 0:d.call(e)])}}});const Mwe=["role","aria-labelledby"],Awe=Be({name:"ElFormItem",__name:"form-item",props:Cwe,setup(t,{expose:e}){const n=t,i=tr(),s=zt(fp,void 0),r=zt(Kc,void 0),o=er(void 0,{formItem:!1}),a=ht("form-item"),l=jr().value,c=X([]),u=X(""),d=jce(u,100),h=X(""),f=X();let p,m=!1;const b=F(()=>n.labelPosition||s?.labelPosition),g=F(()=>{var Te;return b.value==="top"?{}:{width:xs((Te=n.labelWidth)!=null?Te:s?.labelWidth)}}),x=F(()=>{var Te;if(b.value==="top"||s?.inline)return{};if(!n.label&&!n.labelWidth&&k)return{};const Ke=xs((Te=n.labelWidth)!=null?Te:s?.labelWidth);return!n.label&&!i.label?{marginLeft:Ke}:{}}),S=F(()=>[a.b(),a.m(o.value),a.is("error",u.value==="error"),a.is("validating",u.value==="validating"),a.is("success",u.value==="success"),a.is("required",oe.value||n.required),a.is("no-asterisk",s?.hideRequiredAsterisk),s?.requireAsteriskPosition==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:s?.statusIcon,[a.m(`label-${b.value}`)]:b.value}]),_=F(()=>Mi(n.inlineMessage)?n.inlineMessage:s?.inlineMessage||!1),E=F(()=>[a.e("error"),{[a.em("error","inline")]:_.value}]),T=F(()=>n.prop?pt(n.prop)?n.prop.join("."):n.prop:""),A=F(()=>!!(n.label||i.label)),I=F(()=>{var Te;return(Te=n.for)!=null?Te:c.value.length===1?c.value[0]:void 0}),P=F(()=>!I.value&&A.value),k=!!r,B=F(()=>{const Te=s?.model;if(!(!Te||!n.prop))return f0(Te,n.prop).value}),R=F(()=>{const{required:Te}=n,Ke=[];n.rules&&Ke.push(...Pr(n.rules));const Fe=s?.rules;if(Fe&&n.prop){const ve=f0(Fe,n.prop).value;ve&&Ke.push(...Pr(ve))}if(Te!==void 0){const ve=Ke.map((fe,Me)=>[fe,Me]).filter(([fe])=>"required"in fe);if(ve.length>0)for(const[fe,Me]of ve)fe.required!==Te&&(Ke[Me]={...fe,required:Te});else Ke.push({required:Te})}return Ke}),H=F(()=>R.value.length>0),q=Te=>R.value.filter(Fe=>!Fe.trigger||!Te?!0:pt(Fe.trigger)?Fe.trigger.includes(Te):Fe.trigger===Te).map(({trigger:Fe,...ve})=>ve),oe=F(()=>R.value.some(Te=>Te.required)),Z=F(()=>{var Te;return d.value==="error"&&n.showMessage&&((Te=s?.showMessage)!=null?Te:!0)}),V=F(()=>`${n.label||""}${s?.labelSuffix||""}`),D=Te=>{u.value=Te},K=Te=>{var Ke,Fe;const{errors:ve,fields:fe}=Te;(!ve||!fe)&&console.error(Te),D("error"),h.value=ve?(Fe=(Ke=ve?.[0])==null?void 0:Ke.message)!=null?Fe:`${n.prop} is required`:"",s?.emit("validate",n.prop,!1,h.value)},W=()=>{D("success"),s?.emit("validate",n.prop,!0,"")},Q=async Te=>{const Ke=T.value;return new n1({[Ke]:Te}).validate({[Ke]:B.value},{firstFields:!0}).then(()=>(W(),!0)).catch(ve=>(K(ve),Promise.reject(ve)))},ie=async(Te,Ke)=>{if(m||!n.prop)return!1;const Fe=Kt(Ke);if(!H.value)return Ke?.(!1),!1;const ve=q(Te);return ve.length===0?(Ke?.(!0),!0):(D("validating"),Q(ve).then(()=>(Ke?.(!0),!0)).catch(fe=>{const{fields:Me}=fe;return Ke?.(!1,Me),Fe?!1:Promise.reject(Me)}))},ne=()=>{D(""),h.value="",m=!1},ce=async()=>{const Te=s?.model;if(!Te||!n.prop)return;const Ke=f0(Te,n.prop);m=!0,Ke.value=JI(p),await Nt(),ne(),m=!1},ae=Te=>{c.value.includes(Te)||c.value.push(Te)},_e=Te=>{c.value=c.value.filter(Ke=>Ke!==Te)};We(()=>n.error,Te=>{h.value=Te||"",D(Te?"error":"")},{immediate:!0}),We(()=>n.validateStatus,Te=>D(Te||""));const ke=ni({...hr(n),$el:f,size:o,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:P,hasLabel:A,fieldValue:B,addInputId:ae,removeInputId:_e,resetField:ce,clearValidate:ne,validate:ie,propString:T});return Xn(Kc,ke),mn(()=>{n.prop&&(s?.addField(ke),p=JI(B.value))}),gi(()=>{s?.removeField(ke)}),e({size:o,validateMessage:h,validateState:u,validate:ie,clearValidate:ne,resetField:ce}),(Te,Ke)=>{var Fe;return z(),se("div",{ref_key:"formItemRef",ref:f,class:J(S.value),role:P.value?"group":void 0,"aria-labelledby":P.value?v(l):void 0},[de(v(Twe),{"is-auto-width":g.value.width==="auto","update-all":((Fe=v(s))==null?void 0:Fe.labelWidth)==="auto"},{default:xe(()=>[Te.label||Te.$slots.label?(z(),De(Sn(I.value?"label":"div"),{key:0,id:v(l),for:I.value,class:J(v(a).e("label")),style:Ht(g.value)},{default:xe(()=>[Ue(Te.$slots,"label",{label:V.value},()=>[cn(Xe(V.value),1)])]),_:3},8,["id","for","class","style"])):Le("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),U("div",{class:J(v(a).e("content")),style:Ht(x.value)},[Ue(Te.$slots,"default"),de(AA,{name:`${v(a).namespace.value}-zoom-in-top`},{default:xe(()=>[Z.value?Ue(Te.$slots,"error",{key:0,error:h.value},()=>[U("div",{class:J(E.value)},Xe(h.value),3)]):Le("v-if",!0)]),_:3},8,["name"])],6)],10,Mwe)}}});var nU=xt(Awe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/form/src/form-item.vue"]]);const kwe=En(G_e,{FormItem:nU}),Pwe=Ss(nU),Lwe=_t({urlList:{type:Re(Array),default:()=>ws([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:Re(String)}}),Iwe={close:()=>!0,error:t=>t instanceof Event,switch:t=>Xt(t),rotate:t=>Xt(t)},Rwe=["src","crossorigin"],Owe=Be({name:"ElImageViewer",__name:"image-viewer",props:Lwe,emits:Iwe,setup(t,{expose:e,emit:n}){var i;const s={CONTAIN:{name:"contain",icon:Da(Zue)},ORIGINAL:{name:"original",icon:Da(vde)}},r=t,o=n;let a;const{t:l}=Jn(),c=ht("image-viewer"),{nextZIndex:u}=jy(),d=X(),h=X(),f=X2(),p=F(()=>{const{scale:Fe,minScale:ve,maxScale:fe}=r;return D9(Fe,ve,fe)}),m=X(!0),b=X(!1),g=X(!1),x=X(r.initialIndex),S=wi(s.CONTAIN),_=X({scale:p.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),E=X((i=r.zIndex)!=null?i:u());Fx(g,{ns:c});const T=F(()=>{const{urlList:Fe}=r;return Fe.length<=1}),A=F(()=>x.value===0),I=F(()=>x.value===r.urlList.length-1),P=F(()=>r.urlList[x.value]),k=F(()=>[c.e("btn"),c.e("prev"),c.is("disabled",!r.infinite&&A.value)]),B=F(()=>[c.e("btn"),c.e("next"),c.is("disabled",!r.infinite&&I.value)]),R=F(()=>{const{scale:Fe,deg:ve,offsetX:fe,offsetY:Me,enableTransition:ge}=_.value;let Qe=fe/Fe,G=Me/Fe;const ee=ve*Math.PI/180,j=Math.cos(ee),he=Math.sin(ee);Qe=Qe*j+G*he,G=G*j-fe/Fe*he;const be={transform:`scale(${Fe}) rotate(${ve}deg) translate(${Qe}px, ${G}px)`,transition:ge?"transform .3s":""};return S.value.name===s.CONTAIN.name&&(be.maxWidth=be.maxHeight="100%"),be}),H=F(()=>`${x.value+1} / ${r.urlList.length}`);function q(){Z(),a?.(),g.value=!1,o("close")}function oe(){const Fe=ih(fe=>{switch(Oi(fe)){case gt.esc:r.closeOnPressEscape&&q();break;case gt.space:ie();break;case gt.left:ce();break;case gt.up:_e("zoomIn");break;case gt.right:ae();break;case gt.down:_e("zoomOut");break}}),ve=ih(fe=>{const Me=fe.deltaY||fe.deltaX;_e(Me<0?"zoomIn":"zoomOut",{zoomRate:r.zoomRate,enableTransition:!1})});f.run(()=>{xi(document,"keydown",Fe),xi(d,"wheel",ve)})}function Z(){f.stop()}function V(){m.value=!1}function D(Fe){b.value=!0,m.value=!1,o("error",Fe),Fe.target.alt=l("el.image.error")}function K(Fe){if(m.value||Fe.button!==0||!d.value)return;_.value.enableTransition=!1;const{offsetX:ve,offsetY:fe}=_.value,Me=Fe.pageX,ge=Fe.pageY,Qe=ih(j=>{_.value={..._.value,offsetX:ve+j.pageX-Me,offsetY:fe+j.pageY-ge}}),G=xi(document,"mousemove",Qe),ee=xi(document,"mouseup",()=>{G(),ee()});Fe.preventDefault()}function W(Fe){if(m.value||!d.value||Fe.touches.length!==1)return;_.value.enableTransition=!1;const{offsetX:ve,offsetY:fe}=_.value,{pageX:Me,pageY:ge}=Fe.touches[0],Qe=ih(j=>{const he=j.touches[0];_.value={..._.value,offsetX:ve+he.pageX-Me,offsetY:fe+he.pageY-ge}}),G=xi(document,"touchmove",Qe),ee=xi(document,"touchend",()=>{G(),ee()});Fe.preventDefault()}function Q(){_.value={scale:p.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function ie(){if(m.value||b.value)return;const Fe=V0(s),ve=Object.values(s),fe=S.value.name,ge=(ve.findIndex(Qe=>Qe.name===fe)+1)%Fe.length;S.value=s[Fe[ge]],Q()}function ne(Fe){b.value=!1;const ve=r.urlList.length;x.value=(Fe+ve)%ve}function ce(){A.value&&!r.infinite||ne(x.value-1)}function ae(){I.value&&!r.infinite||ne(x.value+1)}function _e(Fe,ve={}){if(m.value||b.value)return;const{minScale:fe,maxScale:Me}=r,{zoomRate:ge,rotateDeg:Qe,enableTransition:G}={zoomRate:r.zoomRate,rotateDeg:90,enableTransition:!0,...ve};switch(Fe){case"zoomOut":_.value.scale>fe&&(_.value.scale=Number.parseFloat((_.value.scale/ge).toFixed(3)));break;case"zoomIn":_.value.scale0)return Fe.preventDefault(),!1}}return We(()=>p.value,Fe=>{_.value.scale=Fe}),We(P,()=>{Nt(()=>{const Fe=h.value;Fe?.complete||(m.value=!0)})}),We(x,Fe=>{Q(),o("switch",Fe)}),mn(()=>{g.value=!0,oe(),a=xi("wheel",Ke,{passive:!1})}),e({setActiveItem:ne}),(Fe,ve)=>(z(),De(v(Wg),{to:"body",disabled:!Fe.teleported},{default:xe(()=>[de(Rr,{name:"viewer-fade",appear:""},{default:xe(()=>[U("div",{ref_key:"wrapper",ref:d,tabindex:-1,class:J(v(c).e("wrapper")),style:Ht({zIndex:E.value})},[de(v(Gg),{loop:"",trapped:"","focus-trap-el":d.value,"focus-start-el":"container",onFocusoutPrevented:ke,onReleaseRequested:Te},{default:xe(()=>[U("div",{class:J(v(c).e("mask")),onClick:ve[0]||(ve[0]=un(fe=>Fe.hideOnClickModal&&q(),["self"]))},null,2),Le(" CLOSE "),U("span",{class:J([v(c).e("btn"),v(c).e("close")]),onClick:q},[de(v(Ut),null,{default:xe(()=>[de(v(ul))]),_:1})],2),Le(" ARROW "),T.value?Le("v-if",!0):(z(),se(At,{key:0},[U("span",{class:J(k.value),onClick:ce},[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1})],2),U("span",{class:J(B.value),onClick:ae},[de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})],2)],64)),Fe.$slots.progress||Fe.showProgress?(z(),se("div",{key:1,class:J([v(c).e("btn"),v(c).e("progress")])},[Ue(Fe.$slots,"progress",{activeIndex:x.value,total:Fe.urlList.length},()=>[cn(Xe(H.value),1)])],2)):Le("v-if",!0),Le(" ACTIONS "),U("div",{class:J([v(c).e("btn"),v(c).e("actions")])},[U("div",{class:J(v(c).e("actions__inner"))},[Ue(Fe.$slots,"toolbar",{actions:_e,prev:ce,next:ae,reset:ie,activeIndex:x.value,setActiveItem:ne},()=>[de(v(Ut),{onClick:ve[1]||(ve[1]=fe=>_e("zoomOut"))},{default:xe(()=>[de(v(Rde))]),_:1}),de(v(Ut),{onClick:ve[2]||(ve[2]=fe=>_e("zoomIn"))},{default:xe(()=>[de(v(n7))]),_:1}),U("i",{class:J(v(c).e("actions__divider"))},null,2),de(v(Ut),{onClick:ie},{default:xe(()=>[(z(),De(Sn(S.value.icon)))]),_:1}),U("i",{class:J(v(c).e("actions__divider"))},null,2),de(v(Ut),{onClick:ve[3]||(ve[3]=fe=>_e("anticlockwise"))},{default:xe(()=>[de(v(fde))]),_:1}),de(v(Ut),{onClick:ve[4]||(ve[4]=fe=>_e("clockwise"))},{default:xe(()=>[de(v(mde))]),_:1})])],2)],2),Le(" CANVAS "),U("div",{class:J(v(c).e("canvas"))},[b.value&&Fe.$slots["viewer-error"]?Ue(Fe.$slots,"viewer-error",{key:0,activeIndex:x.value,src:P.value}):(z(),se("img",{ref_key:"imgRef",ref:h,key:P.value,src:P.value,style:Ht(R.value),class:J(v(c).e("img")),crossorigin:Fe.crossorigin,onLoad:V,onError:D,onMousedown:K,onTouchstart:W},null,46,Rwe))],2),Ue(Fe.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}});var Dwe=xt(Owe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/image-viewer/src/image-viewer.vue"]]);const iU=En(Dwe),Nwe=_t({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:Re([String,Object])},previewSrcList:{type:Re(Array),default:()=>ws([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:Re(String)}}),Bwe={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>Xt(t),close:()=>!0,show:()=>!0},Fwe=["src","loading","crossorigin"],zwe={key:0},Uwe=Be({name:"ElImage",inheritAttrs:!1,__name:"image",props:Nwe,emits:Bwe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:r}=Jn(),o=ht("image"),a=ld(),l=F(()=>$0(Object.entries(a).filter(([V])=>/^(data-|on[A-Z])/i.test(V)||["id","style"].includes(V)))),c=Lx({excludeListeners:!0,excludeKeys:F(()=>Object.keys(l.value))}),u=X(),d=X(!1),h=X(!0),f=X(!1),p=X(),m=X(),b=pi&&"loading"in HTMLImageElement.prototype;let g;const x=F(()=>[o.e("inner"),_.value&&o.e("preview"),h.value&&o.is("loading")]),S=F(()=>{const{fit:V}=i;return pi&&V?{objectFit:V}:{}}),_=F(()=>{const{previewSrcList:V}=i;return pt(V)&&V.length>0}),E=F(()=>{const{previewSrcList:V,initialIndex:D}=i;let K=D;return D>V.length-1&&(K=0),K}),T=F(()=>i.loading==="eager"?!1:!b&&i.loading==="lazy"||i.lazy),A=()=>{pi&&(h.value=!0,d.value=!1,u.value=i.src)};function I(V){h.value=!1,d.value=!1,s("load",V)}function P(V){h.value=!1,d.value=!0,s("error",V)}function k(V){V&&(A(),H())}const B=B9(k,200,!0);async function R(){var V;if(!pi)return;await Nt();const{scrollContainer:D}=i;if(ca(D))m.value=D;else if(Gt(D)&&D!=="")m.value=(V=document.querySelector(D))!=null?V:void 0;else if(p.value){const W=nk(p.value);m.value=Hy(W)?void 0:W}const{stop:K}=eue(p,([W])=>{B(W.isIntersecting)},{root:m});g=K}function H(){!pi||!B||(g?.(),m.value=void 0,g=void 0)}function q(){_.value&&(f.value=!0,s("show"))}function oe(){f.value=!1,s("close")}function Z(V){s("switch",V)}return We(()=>i.src,()=>{T.value?(h.value=!0,d.value=!1,H(),R()):A()}),mn(()=>{T.value?R():A()}),e({showPreview:q}),(V,D)=>(z(),se("div",Dn({ref_key:"container",ref:p},l.value,{class:[v(o).b(),V.$attrs.class]}),[d.value?Ue(V.$slots,"error",{key:0},()=>[U("div",{class:J(v(o).e("error"))},Xe(v(r)("el.image.error")),3)]):(z(),se(At,{key:1},[u.value!==void 0?(z(),se("img",Dn({key:0},v(c),{src:u.value,loading:V.loading,style:S.value,class:x.value,crossorigin:V.crossorigin,onClick:q,onLoad:I,onError:P}),null,16,Fwe)):Le("v-if",!0),h.value?(z(),se("div",{key:1,class:J(v(o).e("wrapper"))},[Ue(V.$slots,"placeholder",{},()=>[U("div",{class:J(v(o).e("placeholder"))},null,2)])],2)):Le("v-if",!0)],64)),_.value?(z(),se(At,{key:2},[f.value?(z(),De(v(iU),{key:0,"z-index":V.zIndex,"initial-index":E.value,infinite:V.infinite,"zoom-rate":V.zoomRate,"min-scale":V.minScale,"max-scale":V.maxScale,"show-progress":V.showProgress,"url-list":V.previewSrcList,scale:V.scale,crossorigin:V.crossorigin,"hide-on-click-modal":V.hideOnClickModal,teleported:V.previewTeleported,"close-on-press-escape":V.closeOnPressEscape,onClose:oe,onSwitch:Z},va({toolbar:xe(K=>[Ue(V.$slots,"toolbar",Wu(Gu(K)))]),default:xe(()=>[V.$slots.viewer?(z(),se("div",zwe,[Ue(V.$slots,"viewer")])):Le("v-if",!0)]),_:2},[V.$slots.progress?{name:"progress",fn:xe(K=>[Ue(V.$slots,"progress",Wu(Gu(K)))]),key:"0"}:void 0,V.$slots["viewer-error"]?{name:"viewer-error",fn:xe(K=>[Ue(V.$slots,"viewer-error",Wu(Gu(K)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):Le("v-if",!0)],64)):Le("v-if",!0)],16))}});var $we=xt(Uwe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/image/src/image.vue"]]);const Vwe=En($we),Hwe=_t({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:or,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:Re([String,Number,null]),validator:t=>t===null||Xt(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},...To(["ariaLabel"]),inputmode:{type:Re(String),default:void 0},align:{type:Re(String),default:"center"},disabledScientific:Boolean}),Wwe={[Wn]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Qs]:t=>Xt(t)||Ws(t),[wn]:t=>Xt(t)||Ws(t)},Gwe=["aria-label"],jwe=["aria-label"],Kwe=Be({name:"ElInputNumber",__name:"input-number",props:Hwe,emits:Wwe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:r}=Jn(),o=ht("input-number"),a=X(),l=ni({currentValue:i.modelValue,userInput:null}),{formItem:c}=zr(),u=F(()=>Xt(i.modelValue)&&i.modelValue<=i.min),d=F(()=>Xt(i.modelValue)&&i.modelValue>=i.max),h=F(()=>{const V=x(i.step);return ri(i.precision)?Math.max(x(i.modelValue),V):(V>i.precision,i.precision)}),f=F(()=>i.controls&&i.controlsPosition==="right"),p=er(),m=Es(),b=F(()=>{if(l.userInput!==null)return l.userInput;let V=l.currentValue;if(Ws(V))return"";if(Xt(V)){if(Number.isNaN(V))return"";ri(i.precision)||(V=V.toFixed(i.precision))}return V}),g=(V,D)=>{if(ri(D)&&(D=h.value),D===0)return Math.round(V);let K=String(V);const W=K.indexOf(".");if(W===-1||!K.replace(".","").split("")[W+D])return V;const ne=K.length;return K.charAt(ne-1)==="5"&&(K=`${K.slice(0,Math.max(0,ne-1))}6`),Number.parseFloat(Number(K).toFixed(D))},x=V=>{if(Ws(V))return 0;const D=V.toString(),K=D.indexOf(".");let W=0;return K!==-1&&(W=D.length-K-1),W},S=(V,D=1)=>Xt(V)?V>=Number.MAX_SAFE_INTEGER&&D===1||V<=Number.MIN_SAFE_INTEGER&&D===-1?V:g(V+i.step*D):l.currentValue,_=V=>{const D=Oi(V),K=b7(V);if(i.disabledScientific&&["e","E"].includes(K)){V.preventDefault();return}switch(D){case gt.up:{V.preventDefault(),E();break}case gt.down:{V.preventDefault(),T();break}}},E=()=>{if(i.readonly||m.value||d.value)return;const V=Number(b.value)||0,D=S(V);I(D),s(Qs,l.currentValue),oe()},T=()=>{if(i.readonly||m.value||u.value)return;const V=Number(b.value)||0,D=S(V,-1);I(D),s(Qs,l.currentValue),oe()},A=(V,D)=>{const{max:K,min:W,step:Q,precision:ie,stepStrictly:ne,valueOnClear:ce}=i;KK||aeK?K:W,D&&s(wn,ae)),ae},I=(V,D=!0)=>{var K;const W=l.currentValue,Q=A(V);if(!D){s(wn,Q);return}l.userInput=null,!(W===Q&&V)&&(s(wn,Q),W!==Q&&s(Wn,Q,W),i.validateEvent&&((K=c?.validate)==null||K.call(c,"change").catch(ie=>void 0)),l.currentValue=Q)},P=V=>{l.userInput=V;const D=V===""?null:Number(V);s(Qs,D),I(D,!1)},k=V=>{const D=V!==""?Number(V):"";(Xt(D)&&!Number.isNaN(D)||V==="")&&I(D),oe(),l.userInput=null},B=()=>{var V,D;(D=(V=a.value)==null?void 0:V.focus)==null||D.call(V)},R=()=>{var V,D;(D=(V=a.value)==null?void 0:V.blur)==null||D.call(V)},H=V=>{s("focus",V)},q=V=>{var D,K;l.userInput=null,l.currentValue===null&&((D=a.value)!=null&&D.input)&&(a.value.input.value=""),s("blur",V),i.validateEvent&&((K=c?.validate)==null||K.call(c,"blur").catch(W=>void 0))},oe=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},Z=V=>{document.activeElement===V.target&&V.preventDefault()};return We(()=>i.modelValue,(V,D)=>{const K=A(V,!0);l.userInput===null&&K!==D&&(l.currentValue=K)},{immediate:!0}),We(()=>i.precision,()=>{l.currentValue=A(i.modelValue)}),mn(()=>{var V;const{min:D,max:K,modelValue:W}=i,Q=(V=a.value)==null?void 0:V.input;if(Q.setAttribute("role","spinbutton"),Number.isFinite(K)?Q.setAttribute("aria-valuemax",String(K)):Q.removeAttribute("aria-valuemax"),Number.isFinite(D)?Q.setAttribute("aria-valuemin",String(D)):Q.removeAttribute("aria-valuemin"),Q.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),Q.setAttribute("aria-disabled",String(m.value)),!Xt(W)&&W!=null){let ie=Number(W);Number.isNaN(ie)&&(ie=null),s(wn,ie)}Q.addEventListener("wheel",Z,{passive:!1})}),ec(()=>{var V,D;const K=(V=a.value)==null?void 0:V.input;K?.setAttribute("aria-valuenow",`${(D=l.currentValue)!=null?D:""}`)}),e({focus:B,blur:R}),(V,D)=>(z(),se("div",{class:J([v(o).b(),v(o).m(v(p)),v(o).is("disabled",v(m)),v(o).is("without-controls",!V.controls),v(o).is("controls-right",f.value),v(o).is(V.align,!!V.align)]),onDragstart:D[0]||(D[0]=un(()=>{},["prevent"]))},[V.controls?_n((z(),se("span",{key:0,role:"button","aria-label":v(r)("el.inputNumber.decrease"),class:J([v(o).e("decrease"),v(o).is("disabled",u.value)]),onKeydown:_s(T,["enter"])},[Ue(V.$slots,"decrease-icon",{},()=>[de(v(Ut),null,{default:xe(()=>[f.value?(z(),De(v(eu),{key:0})):(z(),De(v(ide),{key:1}))]),_:1})])],42,Gwe)),[[v(n2),T]]):Le("v-if",!0),V.controls?_n((z(),se("span",{key:1,role:"button","aria-label":v(r)("el.inputNumber.increase"),class:J([v(o).e("increase"),v(o).is("disabled",d.value)]),onKeydown:_s(E,["enter"])},[Ue(V.$slots,"increase-icon",{},()=>[de(v(Ut),null,{default:xe(()=>[f.value?(z(),De(v(Ax),{key:0})):(z(),De(v(e7),{key:1}))]),_:1})])],42,jwe)),[[v(n2),E]]):Le("v-if",!0),de(v(wo),{id:V.id,ref_key:"input",ref:a,type:"number",step:V.step,"model-value":b.value,placeholder:V.placeholder,readonly:V.readonly,disabled:v(m),size:v(p),max:V.max,min:V.min,name:V.name,"aria-label":V.ariaLabel,"validate-event":!1,inputmode:V.inputmode,onKeydown:_,onBlur:q,onFocus:H,onInput:P,onChange:k},va({_:2},[V.$slots.prefix?{name:"prefix",fn:xe(()=>[Ue(V.$slots,"prefix")]),key:"0"}:void 0,V.$slots.suffix?{name:"suffix",fn:xe(()=>[Ue(V.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}});var qwe=xt(Kwe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input-number/src/input-number.vue"]]);const sU=En(qwe),Ywe=_t({modelValue:{type:Re(Array)},max:Number,tagType:{...rd.type,default:"info"},tagEffect:rd.effect,trigger:{type:Re(String),default:gt.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:or,clearable:Boolean,clearIcon:{type:Ai,default:pd},disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:Re(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),Xwe={[wn]:t=>pt(t)||ri(t),[Wn]:t=>pt(t)||ri(t),[Qs]:t=>Gt(t),"add-tag":t=>Gt(t)||pt(t),"remove-tag":(t,e)=>Gt(t)&&Xt(e),"drag-tag":(t,e,n)=>Xt(t)&&Xt(e)&&Gt(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function Zwe({props:t,emit:e,formItem:n}){const i=Es(),s=er(),r=wi(),o=X(),a=X(),l=F(()=>["small"].includes(s.value)?"small":"default"),c=F(()=>{var oe;return(oe=t.modelValue)!=null&&oe.length?void 0:t.placeholder}),u=F(()=>!(t.readonly||i.value)),d=F(()=>{var oe,Z;return ri(t.max)?!1:((Z=(oe=t.modelValue)==null?void 0:oe.length)!=null?Z:0)>=t.max}),h=F(()=>{var oe;return t.collapseTags?(oe=t.modelValue)==null?void 0:oe.slice(0,t.maxCollapseTags):t.modelValue}),f=F(()=>{var oe;return t.collapseTags?(oe=t.modelValue)==null?void 0:oe.slice(t.maxCollapseTags):[]}),p=oe=>{var Z;const V=[...(Z=t.modelValue)!=null?Z:[],...Pr(oe)];e(wn,V),e(Wn,V),e("add-tag",oe),o.value=void 0},m=oe=>{var Z,V;const D=oe.split(t.delimiter).filter(K=>K&&K!==oe);if(t.max){const K=t.max-((V=(Z=t.modelValue)==null?void 0:Z.length)!=null?V:0);D.splice(K)}return D.length===1?D[0]:D},b=oe=>{if(d.value){o.value=void 0;return}if(!B.value){if(t.delimiter&&o.value){const Z=m(o.value);Z.length&&p(Z)}e(Qs,oe.target.value)}},g=oe=>{var Z;if(B.value)return;switch(Oi(oe)){case t.trigger:oe.preventDefault(),oe.stopPropagation(),S();break;case gt.numpadEnter:t.trigger===gt.enter&&(oe.preventDefault(),oe.stopPropagation(),S());break;case gt.backspace:!o.value&&((Z=t.modelValue)!=null&&Z.length)&&(oe.preventDefault(),oe.stopPropagation(),_(t.modelValue.length-1));break}},x=oe=>{if(B.value||!s7())return;Oi(oe)===gt.space&&t.trigger===gt.space&&(oe.preventDefault(),oe.stopPropagation(),S())},S=()=>{var oe;const Z=(oe=o.value)==null?void 0:oe.trim();!Z||d.value||p(Z)},_=oe=>{var Z;const V=((Z=t.modelValue)!=null?Z:[]).slice(),[D]=V.splice(oe,1);e(wn,V),e(Wn,V),e("remove-tag",D,oe)},E=()=>{o.value=void 0,e(wn,void 0),e(Wn,void 0),e("clear")},T=(oe,Z,V)=>{var D;const K=((D=t.modelValue)!=null?D:[]).slice(),[W]=K.splice(oe,1),Q=Z>oe&&V==="before"?-1:Z{var oe;(oe=r.value)==null||oe.focus()},I=()=>{var oe;(oe=r.value)==null||oe.blur()},{wrapperRef:P,isFocused:k}=md(r,{disabled:i,beforeBlur(oe){var Z;return(Z=a.value)==null?void 0:Z.isFocusInsideContent(oe)},afterBlur(){var oe;t.saveOnBlur?S():o.value=void 0,t.validateEvent&&((oe=n?.validate)==null||oe.call(n,"blur").catch(Z=>void 0))}}),{isComposing:B,handleCompositionStart:R,handleCompositionUpdate:H,handleCompositionEnd:q}=Jy({afterComposition:b});return We(()=>t.modelValue,()=>{var oe;t.validateEvent&&((oe=n?.validate)==null||oe.call(n,Wn).catch(Z=>void 0))}),{inputRef:r,wrapperRef:P,tagTooltipRef:a,isFocused:k,isComposing:B,inputValue:o,size:s,tagSize:l,placeholder:c,closable:u,disabled:i,inputLimit:d,showTagList:h,collapseTagList:f,handleDragged:T,handleInput:b,handleKeydown:g,handleKeyup:x,handleAddTag:S,handleRemoveTag:_,handleClear:E,handleCompositionStart:R,handleCompositionUpdate:H,handleCompositionEnd:q,focus:A,blur:I}}function Jwe(){const t=X(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}const Ux=11,rU=2;function Vk(){const t=wi(),e=X(0),n=F(()=>({minWidth:`${Math.max(e.value,Ux)}px`}));return as(t,()=>{var s,r;e.value=(r=(s=t.value)==null?void 0:s.getBoundingClientRect().width)!=null?r:0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}function Qwe({wrapperRef:t,handleDragged:e,afterDragged:n}){const i=ht("input-tag"),s=wi(),r=X(!1);let o,a,l,c;function u(p){return`.${i.e("inner")} .${i.namespace.value}-tag:nth-child(${p+1})`}function d(p,m){o=m,a=t.value.querySelector(u(m)),a&&(a.style.opacity="0.5"),p.dataTransfer.effectAllowed="move"}function h(p,m){if(l=m,p.preventDefault(),p.dataTransfer.dropEffect="move",ri(o)||o===m){r.value=!1;return}const b=t.value.querySelector(u(m)).getBoundingClientRect(),g=o+1!==m,x=o-1!==m,S=p.clientX-b.left,_=g?x?.5:1:-1,E=x?g?.5:0:1;S<=b.width*_?c="before":S>b.width*E?c="after":c=void 0;const T=t.value.querySelector(`.${i.e("inner")}`),A=T.getBoundingClientRect(),I=Number.parseFloat(Ou(T,"gap"))/2,P=b.top-A.top;let k=-9999;if(c==="before")k=Math.max(b.left-A.left-I,Math.floor(-I/2));else if(c==="after"){const B=b.right-A.left;k=B+(A.width===B?Math.floor(I/2):I)}X9(s.value,{top:`${P}px`,left:`${k}px`}),r.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!ri(o)&&!ri(l)&&o!==l&&e(o,l,c),r.value=!1,o=void 0,a=null,l=void 0,c=void 0,n?.()}return{dropIndicatorRef:s,showDropIndicator:r,handleDragStart:d,handleDragOver:h,handleDragEnd:f}}function e2e({props:t,isFocused:e,hovering:n,disabled:i,inputValue:s,size:r,validateState:o,validateIcon:a,needStatusIcon:l}){const c=ld(),u=tr(),d=ht("input-tag"),h=ht("input"),f=X(),p=X(),m=F(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",i.value),d.m(r.value),d.e("wrapper"),c.class]),b=F(()=>[c.style]),g=F(()=>{var P,k;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((P=t.modelValue)!=null&&P.length)&&!u.prefix),d.is("right-space",!((k=t.modelValue)!=null&&k.length)&&!S.value)]}),x=F(()=>{var P;return t.clearable&&!i.value&&!t.readonly&&(((P=t.modelValue)==null?void 0:P.length)||s.value)&&(e.value||n.value)}),S=F(()=>u.suffix||x.value||o.value&&a.value&&l.value),_=ni({innerWidth:0,collapseItemWidth:0}),E=()=>{if(!p.value)return 0;const P=window.getComputedStyle(p.value);return Number.parseFloat(P.gap||"6px")},T=()=>{_.innerWidth=Number.parseFloat(window.getComputedStyle(p.value).width)},A=()=>{_.collapseItemWidth=f.value.getBoundingClientRect().width},I=F(()=>{if(!t.collapseTags)return{};const P=E(),k=P+Ux,B=f.value&&t.maxCollapseTags===1?_.innerWidth-_.collapseItemWidth-P-k:_.innerWidth-k;return{maxWidth:`${Math.max(B,0)}px`}});return as(p,T),as(f,A),{ns:d,nsInput:h,containerKls:m,containerStyle:b,innerKls:g,showClear:x,showSuffix:S,tagStyle:I,collapseItemRef:f,innerRef:p}}const t2e=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],n2e=["textContent"],i2e=Be({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:Ywe,emits:Xwe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=Lx(),o=tr(),{form:a,formItem:l}=zr(),{inputId:c}=Ba(i,{formItemContext:l}),u=F(()=>{var be;return(be=a?.statusIcon)!=null?be:!1}),d=F(()=>l?.validateState||""),h=F(()=>d.value&&Px[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:b,inputValue:g,size:x,tagSize:S,placeholder:_,closable:E,disabled:T,showTagList:A,collapseTagList:I,handleDragged:P,handleInput:k,handleKeydown:B,handleKeyup:R,handleRemoveTag:H,handleClear:q,handleCompositionStart:oe,handleCompositionUpdate:Z,handleCompositionEnd:V,focus:D,blur:K}=Zwe({props:i,emit:s,formItem:l}),{hovering:W,handleMouseEnter:Q,handleMouseLeave:ie}=Jwe(),{calculatorRef:ne,inputStyle:ce}=Vk(),{dropIndicatorRef:ae,showDropIndicator:_e,handleDragStart:ke,handleDragOver:Te,handleDragEnd:Ke}=Qwe({wrapperRef:p,handleDragged:P,afterDragged:D}),{ns:Fe,nsInput:ve,containerKls:fe,containerStyle:Me,innerKls:ge,showClear:Qe,showSuffix:G,tagStyle:ee,collapseItemRef:j,innerRef:he}=e2e({props:i,hovering:W,isFocused:b,inputValue:g,disabled:T,size:x,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:D,blur:K}),(be,re)=>(z(),se("div",{ref_key:"wrapperRef",ref:p,class:J(v(fe)),style:Ht(v(Me)),onMouseenter:re[8]||(re[8]=(...le)=>v(Q)&&v(Q)(...le)),onMouseleave:re[9]||(re[9]=(...le)=>v(ie)&&v(ie)(...le))},[v(o).prefix?(z(),se("div",{key:0,class:J(v(Fe).e("prefix"))},[Ue(be.$slots,"prefix")],2)):Le("v-if",!0),U("div",{ref_key:"innerRef",ref:he,class:J(v(ge))},[(z(!0),se(At,null,yn(v(A),(le,Ce)=>(z(),De(v(ju),{key:Ce,size:v(S),closable:v(E),type:be.tagType,effect:be.tagEffect,draggable:v(E)&&be.draggable,style:Ht(v(ee)),"disable-transitions":"",onClose:Ee=>v(H)(Ce),onDragstart:Ee=>v(ke)(Ee,Ce),onDragover:Ee=>v(Te)(Ee,Ce),onDragend:v(Ke),onDrop:re[0]||(re[0]=un(()=>{},["stop"]))},{default:xe(()=>[Ue(be.$slots,"tag",{value:le,index:Ce},()=>[cn(Xe(le),1)])]),_:2},1032,["size","closable","type","effect","draggable","style","onClose","onDragstart","onDragover","onDragend"]))),128)),be.collapseTags&&be.modelValue&&be.modelValue.length>be.maxCollapseTags?(z(),De(v(Or),{key:0,ref_key:"tagTooltipRef",ref:m,disabled:!be.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:be.tagEffect,placement:"bottom"},{default:xe(()=>[U("div",{ref_key:"collapseItemRef",ref:j},[de(v(ju),{closable:!1,size:v(S),type:be.tagType,effect:be.tagEffect,"disable-transitions":""},{default:xe(()=>[cn(" + "+Xe(be.modelValue.length-be.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],512)]),content:xe(()=>[U("div",{class:J(v(Fe).e("input-tag-list"))},[(z(!0),se(At,null,yn(v(I),(le,Ce)=>(z(),De(v(ju),{key:Ce,size:v(S),closable:v(E),type:be.tagType,effect:be.tagEffect,"disable-transitions":"",onClose:Ee=>v(H)(Ce+be.maxCollapseTags)},{default:xe(()=>[Ue(be.$slots,"tag",{value:le,index:Ce+be.maxCollapseTags},()=>[cn(Xe(le),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):Le("v-if",!0),U("div",{class:J(v(Fe).e("input-wrapper"))},[_n(U("input",Dn({id:v(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":re[1]||(re[1]=le=>Li(g)?g.value=le:null)},v(r),{type:"text",minlength:be.minlength,maxlength:be.maxlength,disabled:v(T),readonly:be.readonly,autocomplete:be.autocomplete,tabindex:be.tabindex,placeholder:v(_),autofocus:be.autofocus,ariaLabel:be.ariaLabel,class:v(Fe).e("input"),style:v(ce),onCompositionstart:re[2]||(re[2]=(...le)=>v(oe)&&v(oe)(...le)),onCompositionupdate:re[3]||(re[3]=(...le)=>v(Z)&&v(Z)(...le)),onCompositionend:re[4]||(re[4]=(...le)=>v(V)&&v(V)(...le)),onInput:re[5]||(re[5]=(...le)=>v(k)&&v(k)(...le)),onKeydown:re[6]||(re[6]=(...le)=>v(B)&&v(B)(...le)),onKeyup:re[7]||(re[7]=(...le)=>v(R)&&v(R)(...le))}),null,16,t2e),[[Mc,v(g)]]),U("span",{ref_key:"calculatorRef",ref:ne,"aria-hidden":"true",class:J(v(Fe).e("input-calculator")),textContent:Xe(v(g))},null,10,n2e)],2),_n(U("div",{ref_key:"dropIndicatorRef",ref:ae,class:J(v(Fe).e("drop-indicator"))},null,2),[[ci,v(_e)]])],2),v(G)?(z(),se("div",{key:1,class:J(v(Fe).e("suffix"))},[Ue(be.$slots,"suffix"),v(Qe)?(z(),De(v(Ut),{key:0,class:J([v(Fe).e("icon"),v(Fe).e("clear")]),onMousedown:un(v(_i),["prevent"]),onClick:v(q)},{default:xe(()=>[(z(),De(Sn(be.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):Le("v-if",!0),d.value&&h.value&&u.value?(z(),De(v(Ut),{key:1,class:J([v(ve).e("icon"),v(ve).e("validateIcon"),v(ve).is("loading",d.value==="validating")])},{default:xe(()=>[(z(),De(Sn(h.value)))]),_:1},8,["class"])):Le("v-if",!0)],2)):Le("v-if",!0)],38))}});var s2e=xt(i2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/input-tag/src/input-tag.vue"]]);const r2e=En(s2e),o2e=_t({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:Ai}}),a2e={click:t=>t instanceof MouseEvent},l2e=["href","target"],c2e=Be({name:"ElLink",__name:"link",props:o2e,emits:a2e,setup(t,{emit:e}){const n=t,i=e,s=Hg("link");Bc({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},F(()=>Mi(n.underline)));const r=ht("link"),o=F(()=>{var c,u,d;return[r.b(),r.m((d=(u=n.type)!=null?u:(c=s.value)==null?void 0:c.type)!=null?d:"default"),r.is("disabled",n.disabled),r.is("underline",a.value==="always"),r.is("hover-underline",a.value==="hover"&&!n.disabled)]}),a=F(()=>{var c,u,d;return Mi(n.underline)?n.underline?"hover":"never":(d=(u=n.underline)!=null?u:(c=s.value)==null?void 0:c.underline)!=null?d:"hover"});function l(c){n.disabled||i("click",c)}return(c,u)=>(z(),se("a",{class:J(o.value),href:c.disabled||!c.href?void 0:c.href,target:c.disabled||!c.href?void 0:c.target,onClick:l},[c.icon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(c.icon)))]),_:1})):Le("v-if",!0),c.$slots.default?(z(),se("span",{key:1,class:J(v(r).e("inner"))},[Ue(c.$slots,"default")],2)):Le("v-if",!0),c.$slots.icon?Ue(c.$slots,"icon",{key:2}):Le("v-if",!0)],10,l2e))}});var u2e=xt(c2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/link/src/link.vue"]]);const d2e=En(u2e);let h2e=class{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",i=>{const s=Oi(i);let r=!1;switch(s){case gt.down:{this.gotoSubIndex(this.subIndex+1),r=!0;break}case gt.up:{this.gotoSubIndex(this.subIndex-1),r=!0;break}case gt.tab:{$_(e,"mouseleave");break}case gt.enter:case gt.numpadEnter:case gt.space:{r=!0,i.currentTarget.click();break}}return r&&(i.preventDefault(),i.stopPropagation()),!1})})}},f2e=class{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 h2e(this,n)),this.addListeners()}addListeners(){this.domNode.addEventListener("keydown",e=>{const n=Oi(e);let i=!1;switch(n){case gt.down:{$_(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(0),i=!0;break}case gt.up:{$_(e.currentTarget,"mouseenter"),this.submenu&&this.submenu.gotoSubIndex(this.submenu.subMenuItems.length-1),i=!0;break}case gt.tab:{$_(e.currentTarget,"mouseleave");break}case gt.enter:case gt.numpadEnter:case gt.space:{i=!0,e.currentTarget.click();break}}i&&e.preventDefault()})}},p2e=class{constructor(e,n){this.domNode=e,this.init(n)}init(e){const n=this.domNode.childNodes;Array.from(n).forEach(i=>{i.nodeType===1&&new f2e(i,e)})}};const m2e=Be({name:"ElMenuCollapseTransition",__name:"menu-collapse-transition",setup(t){const e=ht("menu"),n={onBeforeEnter:i=>i.style.opacity="0.2",onEnter(i,s){nl(i,`${e.namespace.value}-opacity-transition`),i.style.opacity="1",s()},onAfterEnter(i){xo(i,`${e.namespace.value}-opacity-transition`),i.style.opacity=""},onBeforeLeave(i){i.dataset||(i.dataset={}),Oc(i,e.m("collapse"))?(xo(i,e.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),nl(i,e.m("collapse"))):(nl(i,e.m("collapse")),i.dataset.oldOverflow=i.style.overflow,i.dataset.scrollWidth=i.clientWidth.toString(),xo(i,e.m("collapse"))),i.style.width=`${i.scrollWidth}px`,i.style.overflow="hidden"},onLeave(i){nl(i,"horizontal-collapse-transition"),i.style.width=`${i.dataset.scrollWidth}px`}};return(i,s)=>(z(),De(Rr,Dn({mode:"out-in"},n),{default:xe(()=>[Ue(i.$slots,"default")]),_:3},16))}});var g2e=xt(m2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-collapse-transition.vue"]]);function oU(t,e){const n=F(()=>{let s=t.parent;const r=[e.value];for(;s.type.name!=="ElMenu";)s.props.index&&r.unshift(s.props.index),s=s.parent;return r});return{parentMenu:F(()=>{let s=t.parent;for(;s&&!["ElMenu","ElSubMenu"].includes(s.type.name);)s=s.parent;return s}),indexPath:n}}function v2e(t){return F(()=>{const n=t.backgroundColor;return n?new Lm(n).shade(20).toString():""})}const aU=(t,e)=>{const n=ht("menu");return F(()=>n.cssVarBlock({"text-color":t.textColor||"","hover-text-color":t.textColor||"","bg-color":t.backgroundColor||"","hover-bg-color":v2e(t).value||"","active-color":t.activeTextColor||"",level:`${e}`}))},Hk="rootMenu",a2="subMenu:",y2e=_t({index:{type:String,required:!0},showTimeout:Number,hideTimeout:Number,popperClass:String,popperStyle:{type:Re([String,Object])},disabled:Boolean,teleported:{type:Boolean,default:void 0},popperOffset:Number,expandCloseIcon:{type:Ai},expandOpenIcon:{type:Ai},collapseCloseIcon:{type:Ai},collapseOpenIcon:{type:Ai}}),lE="ElSubMenu";var Wk=Be({name:lE,props:y2e,setup(t,{slots:e,expose:n}){const i=xn(),{indexPath:s,parentMenu:r}=oU(i,F(()=>t.index)),o=ht("menu"),a=ht("sub-menu"),l=zt(Hk);l||Ks(lE,"can not inject root menu");const c=zt(`${a2}${r.value.uid}`);c||Ks(lE,"can not inject sub menu");const u=X({}),d=X({});let h;const f=X(!1),p=X(),m=X(),b=F(()=>c.level===0),g=F(()=>I.value==="horizontal"&&b.value?"bottom-start":"right-start"),x=F(()=>I.value==="horizontal"&&b.value||I.value==="vertical"&&!l.props.collapse?t.expandCloseIcon&&t.expandOpenIcon?T.value?t.expandOpenIcon:t.expandCloseIcon:eu:t.collapseCloseIcon&&t.collapseOpenIcon?T.value?t.collapseOpenIcon:t.collapseCloseIcon:So),S=F(()=>{const ie=t.teleported;return ri(ie)?b.value:ie}),_=F(()=>l.props.collapse?`${o.namespace.value}-zoom-in-left`:`${o.namespace.value}-zoom-in-top`),E=F(()=>I.value==="horizontal"&&b.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"]),T=F(()=>l.openedMenus.includes(t.index)),A=F(()=>[...Object.values(u.value),...Object.values(d.value)].some(({active:ie})=>ie)),I=F(()=>l.props.mode),P=F(()=>l.props.persistent),k=ni({index:t.index,indexPath:s,active:A}),B=aU(l.props,c.level+1),R=F(()=>{var ie;return(ie=t.popperOffset)!=null?ie:l.props.popperOffset}),H=F(()=>{var ie;return(ie=t.popperClass)!=null?ie:l.props.popperClass}),q=F(()=>{var ie;return(ie=t.popperStyle)!=null?ie:l.props.popperStyle}),oe=F(()=>{var ie;return(ie=t.showTimeout)!=null?ie:l.props.showTimeout}),Z=F(()=>{var ie;return(ie=t.hideTimeout)!=null?ie:l.props.hideTimeout}),V=()=>{var ie,ne,ce;return(ce=(ne=(ie=m.value)==null?void 0:ie.popperRef)==null?void 0:ne.popperInstanceRef)==null?void 0:ce.destroy()},D=ie=>{ie||V()},K=()=>{l.props.menuTrigger==="hover"&&l.props.mode==="horizontal"||l.props.collapse&&l.props.mode==="vertical"||t.disabled||l.handleSubMenuClick({index:t.index,indexPath:s.value,active:A.value})},W=(ie,ne=oe.value)=>{var ce;if(ie.type!=="focus"){if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"||t.disabled){c.mouseInChild.value=!0;return}c.mouseInChild.value=!0,h?.(),{stop:h}=og(()=>{l.openMenu(t.index,s.value)},ne),S.value&&((ce=r.value.vnode.el)==null||ce.dispatchEvent(new MouseEvent("mouseenter"))),ie.type==="mouseenter"&&ie.target&&Nt(()=>{Zy(ie.target,{preventScroll:!0})})}},Q=(ie=!1)=>{var ne;if(l.props.menuTrigger==="click"&&l.props.mode==="horizontal"||!l.props.collapse&&l.props.mode==="vertical"){c.mouseInChild.value=!1;return}h?.(),c.mouseInChild.value=!1,{stop:h}=og(()=>!f.value&&l.closeMenu(t.index,s.value),Z.value),S.value&&ie&&((ne=c.handleMouseleave)==null||ne.call(c,!0))};We(()=>l.props.collapse,ie=>D(!!ie));{const ie=ce=>{d.value[ce.index]=ce},ne=ce=>{delete d.value[ce.index]};Xn(`${a2}${i.uid}`,{addSubMenu:ie,removeSubMenu:ne,handleMouseleave:Q,mouseInChild:f,level:c.level+1})}return n({opened:T}),mn(()=>{l.addSubMenu(k),c.addSubMenu(k)}),gi(()=>{c.removeSubMenu(k),l.removeSubMenu(k)}),()=>{var ie;const ne=[(ie=e.title)==null?void 0:ie.call(e),tn(Ut,{class:a.e("icon-arrow"),style:{transform:T.value?t.expandCloseIcon&&t.expandOpenIcon||t.collapseCloseIcon&&t.collapseOpenIcon&&l.props.collapse?"none":"rotateZ(180deg)":"none"}},{default:()=>Gt(x.value)?tn(i.appContext.components[x.value]):tn(x.value)})],ce=l.isMenuPopup?tn(Or,{ref:m,visible:T.value,effect:"light",pure:!0,offset:R.value,showArrow:!1,persistent:P.value,popperClass:H.value,popperStyle:q.value,placement:g.value,teleported:S.value,fallbackPlacements:E.value,transition:_.value,gpuAcceleration:!1},{content:()=>{var ae;return tn("div",{class:[o.m(I.value),o.m("popup-container"),H.value],onMouseenter:_e=>W(_e,100),onMouseleave:()=>Q(!0),onFocus:_e=>W(_e,100)},[tn("ul",{class:[o.b(),o.m("popup"),o.m(`popup-${g.value}`)],style:B.value},[(ae=e.default)==null?void 0:ae.call(e)])])},default:()=>tn("div",{class:a.e("title"),onClick:K},ne)}):tn(At,{},[tn("div",{class:a.e("title"),ref:p,onClick:K},ne),tn(Nx,{},{default:()=>{var ae;return _n(tn("ul",{role:"menu",class:[o.b(),o.m("inline")],style:B.value},[(ae=e.default)==null?void 0:ae.call(e)]),[[ci,T.value]])}})]);return tn("li",{class:[a.b(),a.is("active",A.value),a.is("opened",T.value),a.is("disabled",t.disabled)],role:"menuitem",ariaHaspopup:!0,ariaExpanded:T.value,onMouseenter:W,onMouseleave:()=>Q(),onFocus:W},[ce])}}});const b2e=_t({mode:{type:String,values:["horizontal","vertical"],default:"vertical"},defaultActive:{type:String,default:""},defaultOpeneds:{type:Re(Array),default:()=>ws([])},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:Ai,default:()=>ode},popperEffect:{type:Re(String),default:"dark"},popperClass:String,popperStyle:{type:Re([String,Object])},showTimeout:{type:Number,default:300},hideTimeout:{type:Number,default:300},persistent:{type:Boolean,default:!0}}),cE=t=>pt(t)&&t.every(e=>Gt(e)),_2e={close:(t,e)=>Gt(t)&&cE(e),open:(t,e)=>Gt(t)&&cE(e),select:(t,e,n,i)=>Gt(t)&&cE(e)&&Mn(n)&&(ri(i)||i instanceof Promise)},T6=64;var w2e=Be({name:"ElMenu",props:b2e,emits:_2e,setup(t,{emit:e,slots:n,expose:i}){const s=xn(),r=s.appContext.config.globalProperties.$router,o=X(),a=X(),l=ht("menu"),c=ht("sub-menu");let u=T6;const d=X(-1),h=X(t.defaultOpeneds&&!t.collapse?t.defaultOpeneds.slice(0):[]),f=X(t.defaultActive),p=X({}),m=X({}),b=F(()=>t.mode==="horizontal"||t.mode==="vertical"&&t.collapse),g=()=>{const V=f.value&&p.value[f.value];if(!V||t.mode==="horizontal"||t.collapse)return;V.indexPath.forEach(K=>{const W=m.value[K];W&&x(K,W.indexPath)})},x=(V,D)=>{h.value.includes(V)||(t.uniqueOpened&&(h.value=h.value.filter(K=>D.includes(K))),h.value.push(V),e("open",V,D))},S=V=>{const D=h.value.indexOf(V);D!==-1&&h.value.splice(D,1)},_=(V,D)=>{S(V),e("close",V,D)},E=({index:V,indexPath:D})=>{h.value.includes(V)?_(V,D):x(V,D)},T=V=>{(t.mode==="horizontal"||t.collapse)&&(h.value=[]);const{index:D,indexPath:K}=V;if(!(Ws(D)||Ws(K)))if(t.router&&r){const W=V.route||D,Q=r.push(W).then(ie=>(ie||(f.value=D),ie));e("select",D,K,{index:D,indexPath:K,route:W},Q)}else f.value=D,e("select",D,K,{index:D,indexPath:K})},A=V=>{var D;const K=p.value,W=K[V]||f.value&&K[f.value]||K[t.defaultActive];f.value=(D=W?.index)!=null?D:V},I=V=>{const D=getComputedStyle(V),K=Number.parseInt(D.marginLeft,10),W=Number.parseInt(D.marginRight,10);return V.offsetWidth+K+W||0},P=()=>{if(!o.value)return-1;const V=Array.from(o.value.childNodes).filter(ce=>ce.nodeName!=="#comment"&&(ce.nodeName!=="#text"||ce.nodeValue)),D=getComputedStyle(o.value),K=Number.parseInt(D.paddingLeft,10),W=Number.parseInt(D.paddingRight,10),Q=o.value.clientWidth-K-W;let ie=0,ne=0;return V.forEach((ce,ae)=>{ie+=I(ce),ie<=Q-u&&(ne=ae+1)}),ne===V.length?-1:ne},k=V=>m.value[V].indexPath,B=(V,D=33.34)=>{let K;return()=>{K&&clearTimeout(K),K=setTimeout(()=>{V()},D)}};let R=!0;const H=()=>{const V=nr(a);if(V&&(u=I(V)||T6),d.value===P())return;const D=()=>{d.value=-1,Nt(()=>{d.value=P()})};R?D():B(D)(),R=!1};We(()=>t.defaultActive,V=>{p.value[V]||(f.value=""),A(V)}),We(()=>t.collapse,V=>{V&&(h.value=[])}),We(p.value,g);let q;jo(()=>{t.mode==="horizontal"&&t.ellipsis?q=as(o,H).stop:q?.()});const oe=X(!1);{const V=Q=>{m.value[Q.index]=Q},D=Q=>{delete m.value[Q.index]};Xn(Hk,ni({props:t,openedMenus:h,items:p,subMenus:m,activeIndex:f,isMenuPopup:b,addMenuItem:Q=>{p.value[Q.index]=Q},removeMenuItem:Q=>{delete p.value[Q.index]},addSubMenu:V,removeSubMenu:D,openMenu:x,closeMenu:_,handleMenuItemClick:T,handleSubMenuClick:E})),Xn(`${a2}${s.uid}`,{addSubMenu:V,removeSubMenu:D,mouseInChild:oe,level:0})}mn(()=>{t.mode==="horizontal"&&new p2e(s.vnode.el,l.namespace.value)}),i({open:D=>{const{indexPath:K}=m.value[D];K.forEach(W=>x(W,K))},close:S,updateActiveIndex:A,handleResize:H});const Z=aU(t,0);return()=>{var V,D;let K=(D=(V=n.default)==null?void 0:V.call(n))!=null?D:[];const W=[];if(t.mode==="horizontal"&&o.value){const ne=Il(K).filter(_e=>_e?.shapeFlag!==8),ce=d.value===-1?ne:ne.slice(0,d.value),ae=d.value===-1?[]:ne.slice(d.value);ae?.length&&t.ellipsis&&(K=ce,W.push(tn(Wk,{ref:a,index:"sub-menu-more",class:c.e("hide-arrow"),popperOffset:t.popperOffset},{title:()=>tn(Ut,{class:c.e("icon-more")},{default:()=>tn(t.ellipsisIcon)}),default:()=>ae})))}const Q=t.closeOnClickOutside?[[Ch,()=>{h.value.length&&(oe.value||(h.value.forEach(ne=>e("close",ne,k(ne))),h.value=[]))}]]:[],ie=_n(tn("ul",{key:String(t.collapse),role:"menubar",ref:o,style:Z.value,class:{[l.b()]:!0,[l.m(t.mode)]:!0,[l.m("collapse")]:t.collapse}},[...K,...W]),Q);return t.collapseTransition&&t.mode==="vertical"?tn(g2e,()=>ie):ie}}});const x2e=_t({index:{type:Re([String,null]),default:null},route:{type:Re([String,Object])},disabled:Boolean}),S2e={click:t=>Gt(t.index)&&pt(t.indexPath)},uE="ElMenuItem",E2e=Be({name:uE,__name:"menu-item",props:x2e,emits:S2e,setup(t,{expose:e,emit:n}){const i=t,s=n;ua(i.index)&&void 0;const r=xn(),o=zt(Hk),a=ht("menu"),l=ht("menu-item");o||Ks(uE,"can not inject root menu");const{parentMenu:c,indexPath:u}=oU(r,Ei(i,"index")),d=zt(`${a2}${c.value.uid}`);d||Ks(uE,"can not inject sub menu");const h=F(()=>i.index===o.activeIndex),f=ni({index:i.index,indexPath:u,active:h}),p=()=>{i.disabled||(o.handleMenuItemClick({index:i.index,indexPath:u.value,route:i.route}),s("click",f))};return mn(()=>{d.addSubMenu(f),o.addMenuItem(f)}),gi(()=>{d.removeSubMenu(f),o.removeMenuItem(f)}),e({parentMenu:c,rootMenu:o,active:h,nsMenu:a,nsMenuItem:l,handleClick:p}),(m,b)=>(z(),se("li",{class:J([v(l).b(),v(l).is("active",h.value),v(l).is("disabled",m.disabled)]),role:"menuitem",tabindex:"-1",onClick:p},[v(c).type.name==="ElMenu"&&v(o).props.collapse&&m.$slots.title?(z(),De(v(Or),{key:0,effect:v(o).props.popperEffect,placement:"right","fallback-placements":["left"],"popper-class":v(o).props.popperClass,"popper-style":v(o).props.popperStyle,persistent:v(o).props.persistent,"focus-on-target":""},{content:xe(()=>[Ue(m.$slots,"title")]),default:xe(()=>[U("div",{class:J(v(a).be("tooltip","trigger"))},[Ue(m.$slots,"default")],2)]),_:3},8,["effect","popper-class","popper-style","persistent"])):(z(),se(At,{key:1},[Ue(m.$slots,"default"),Ue(m.$slots,"title")],64))],2))}});var lU=xt(E2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item.vue"]]);const C2e={title:String},T2e=Be({name:"ElMenuItemGroup",__name:"menu-item-group",props:C2e,setup(t){const e=ht("menu-item-group");return(n,i)=>(z(),se("li",{class:J(v(e).b())},[U("div",{class:J(v(e).e("title"))},[n.$slots.title?Ue(n.$slots,"title",{key:1}):(z(),se(At,{key:0},[cn(Xe(n.title),1)],64))],2),U("ul",null,[Ue(n.$slots,"default")])],2))}});var cU=xt(T2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/menu/src/menu-item-group.vue"]]);const M2e=En(w2e,{MenuItem:lU,MenuItemGroup:cU,SubMenu:Wk}),A2e=Ss(lU),k2e=Ss(cU),P2e=Ss(Wk),L2e=_t({icon:{type:Ai,default:()=>Pue},title:String,content:{type:String,default:""}}),I2e={back:()=>!0},R2e=["aria-label"],O2e=Be({name:"ElPageHeader",__name:"page-header",props:L2e,emits:I2e,setup(t,{emit:e}){const n=e,{t:i}=Jn(),s=ht("page-header");function r(){n("back")}return(o,a)=>(z(),se("div",{class:J([v(s).b(),v(s).is("contentful",!!o.$slots.default),{[v(s).m("has-breadcrumb")]:!!o.$slots.breadcrumb,[v(s).m("has-extra")]:!!o.$slots.extra}])},[o.$slots.breadcrumb?(z(),se("div",{key:0,class:J(v(s).e("breadcrumb"))},[Ue(o.$slots,"breadcrumb")],2)):Le("v-if",!0),U("div",{class:J(v(s).e("header"))},[U("div",{class:J(v(s).e("left"))},[U("div",{class:J(v(s).e("back")),role:"button",tabindex:"0",onClick:r},[o.icon||o.$slots.icon?(z(),se("div",{key:0,"aria-label":o.title||v(i)("el.pageHeader.title"),class:J(v(s).e("icon"))},[Ue(o.$slots,"icon",{},()=>[o.icon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(o.icon)))]),_:1})):Le("v-if",!0)])],10,R2e)):Le("v-if",!0),U("div",{class:J(v(s).e("title"))},[Ue(o.$slots,"title",{},()=>[cn(Xe(o.title||v(i)("el.pageHeader.title")),1)])],2)],2),de(v(Vz),{direction:"vertical"}),U("div",{class:J(v(s).e("content"))},[Ue(o.$slots,"content",{},()=>[cn(Xe(o.content),1)])],2)],2),o.$slots.extra?(z(),se("div",{key:0,class:J(v(s).e("extra"))},[Ue(o.$slots,"extra")],2)):Le("v-if",!0)],2),o.$slots.default?(z(),se("div",{key:1,class:J(v(s).e("main"))},[Ue(o.$slots,"default")],2)):Le("v-if",!0)],2))}});var D2e=xt(O2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/page-header/src/page-header.vue"]]);const N2e=En(D2e),uU=Symbol("elPaginationKey"),B2e=_t({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:Ai}}),F2e={click:t=>t instanceof MouseEvent},z2e=["disabled","aria-label","aria-disabled"],U2e={key:0},$2e=Be({name:"ElPaginationPrev",__name:"prev",props:B2e,emits:F2e,setup(t){const e=t,{t:n}=Jn(),i=F(()=>e.disabled||e.currentPage<=1);return(s,r)=>(z(),se("button",{type:"button",class:"btn-prev",disabled:i.value,"aria-label":s.prevText||v(n)("el.pagination.prev"),"aria-disabled":i.value,onClick:r[0]||(r[0]=o=>s.$emit("click",o))},[s.prevText?(z(),se("span",U2e,Xe(s.prevText),1)):(z(),De(v(Ut),{key:1},{default:xe(()=>[(z(),De(Sn(s.prevIcon)))]),_:1}))],8,z2e))}});var V2e=xt($2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/prev.vue"]]);const H2e=_t({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:Ai}}),W2e=["disabled","aria-label","aria-disabled"],G2e={key:0},j2e=Be({name:"ElPaginationNext",__name:"next",props:H2e,emits:["click"],setup(t){const e=t,{t:n}=Jn(),i=F(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(s,r)=>(z(),se("button",{type:"button",class:"btn-next",disabled:i.value,"aria-label":s.nextText||v(n)("el.pagination.next"),"aria-disabled":i.value,onClick:r[0]||(r[0]=o=>s.$emit("click",o))},[s.nextText?(z(),se("span",G2e,Xe(s.nextText),1)):(z(),De(v(Ut),{key:1},{default:xe(()=>[(z(),De(Sn(s.nextIcon)))]),_:1}))],8,W2e))}});var K2e=xt(j2e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/next.vue"]]);const l2={label:"label",value:"value",disabled:"disabled",options:"options"};function i1(t){const e=X({...l2,...t.props});let n={...t.props};return We(()=>t.props,a=>{Ms(a,n)||(e.value={...l2,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>js(a,e.value.label),getValue:a=>js(a,e.value.value),getDisabled:a=>js(a,e.value.disabled),getOptions:a=>js(a,e.value.options)}}const dU=Symbol("ElSelectGroup"),s1=Symbol("ElSelect"),KT="ElOption",q2e=_t({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean}),Gk=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),th=t=>Py(t);function Y2e(t,e){const n=zt(s1);n||Ks(KT,"usage: ");const i=zt(dU,{disabled:!1}),s=F(()=>u(Pr(n.props.modelValue),t.value)),r=F(()=>{var f;if(n.props.multiple){const p=Pr((f=n.props.modelValue)!=null?f:[]);return!s.value&&p.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),o=F(()=>{var f;return(f=t.label)!=null?f:Mn(t.value)?"":t.value}),a=F(()=>t.value||t.label||""),l=F(()=>t.disabled||e.groupDisabled||r.value),c=xn(),u=(f=[],p)=>{if(Mn(t.value)){const m=n.props.valueKey;return f&&f.some(b=>Hi(js(b,m))===js(p,m))}else return f&&f.includes(p)},d=()=>{l.value||(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},h=f=>{const p=new RegExp(Gk(f),"i");e.visible=p.test(String(o.value))||t.created};return We(()=>o.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),We(()=>t.value,(f,p)=>{const{remote:m,valueKey:b}=n.props;if((m?f!==p:!Ms(f,p))&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(b&&Mn(f)&&Mn(p)&&f[b]===p[b])return;n.setSelected()}}),We(()=>i.disabled,()=>{e.groupDisabled=i.disabled},{immediate:!0}),{select:n,currentLabel:o,currentValue:a,itemSelected:s,isDisabled:l,hoverItem:d,updateOption:h}}const X2e=Be({name:KT,componentName:KT,props:q2e,setup(t){const e=ht("select"),n=jr(),i=F(()=>[e.be("dropdown","item"),e.is("disabled",v(a)),e.is("selected",v(o)),e.is("hovering",v(h))]),s=ni({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:r,itemSelected:o,isDisabled:a,select:l,hoverItem:c,updateOption:u}=Y2e(t,s),{visible:d,hover:h}=hr(s),f=xn().proxy;l.onOptionCreate(f),gi(()=>{const m=f.value;Nt(()=>{const{selected:b}=l.states,g=b.some(x=>x.value===f.value);l.states.cachedOptions.get(m)===f&&!g&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:i,currentLabel:r,itemSelected:o,isDisabled:a,select:l,visible:d,hover:h,states:s,hoverItem:c,updateOption:u,selectOptionClick:p}}}),Z2e=["id","aria-disabled","aria-selected"];function J2e(t,e,n,i,s,r){return _n((z(),se("li",{id:t.id,class:J(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:e[0]||(e[0]=(...o)=>t.hoverItem&&t.hoverItem(...o)),onClick:e[1]||(e[1]=un((...o)=>t.selectOptionClick&&t.selectOptionClick(...o),["stop"])),onMousedown:e[2]||(e[2]=un(()=>{},["prevent"]))},[Ue(t.$slots,"default",{},()=>[U("span",null,Xe(t.currentLabel),1)])],42,Z2e)),[[ci,t.visible]])}var jk=xt(X2e,[["render",J2e],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option.vue"]]);const Q2e=Be({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=zt(s1),e=ht("select"),n=F(()=>t.props.popperClass),i=F(()=>t.props.multiple),s=F(()=>t.props.fitInputWidth),r=X("");function o(){var a;const l=(a=t.selectRef)==null?void 0:a.offsetWidth;l?r.value=`${l-rU}px`:r.value=""}return mn(()=>{o(),as(t.selectRef,o)}),{ns:e,minWidth:r,popperClass:n,isMultiple:i,isFitInputWidth:s}}});function exe(t,e,n,i,s,r){return z(),se("div",{class:J([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:Ht({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(z(),se("div",{key:0,class:J(t.ns.be("dropdown","header"))},[Ue(t.$slots,"header")],2)):Le("v-if",!0),Ue(t.$slots,"default"),t.$slots.footer?(z(),se("div",{key:1,class:J(t.ns.be("dropdown","footer"))},[Ue(t.$slots,"footer")],2)):Le("v-if",!0)],6)}var txe=xt(Q2e,[["render",exe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select-dropdown.vue"]]);const nxe=(t,e)=>{const{t:n}=Jn(),i=jr(),s=ht("select"),r=ht("input"),o=ni({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),a=X(),l=X(),c=X(),u=X(),d=X(),h=X(),f=X(),p=X(),m=X(),b=X(),g=X(),x=X(!1),S=X(),_=X(!1),{form:E,formItem:T}=zr(),{inputId:A}=Ba(t,{formItemContext:T}),{valueOnClear:I,isEmptyValue:P}=Ky(t),{isComposing:k,handleCompositionStart:B,handleCompositionUpdate:R,handleCompositionEnd:H}=Jy({afterComposition:mt=>dt(mt)}),q=Es(),{wrapperRef:oe,isFocused:Z,handleBlur:V}=md(d,{disabled:q,afterFocus(){t.automaticDropdown&&!x.value&&(x.value=!0,o.menuVisibleOnFocus=!0)},beforeBlur(mt){var on,ln;return((on=c.value)==null?void 0:on.isFocusInsideContent(mt))||((ln=u.value)==null?void 0:ln.isFocusInsideContent(mt))},afterBlur(){var mt;x.value=!1,o.menuVisibleOnFocus=!1,t.validateEvent&&((mt=T?.validate)==null||mt.call(T,"blur").catch(on=>void 0))}}),D=F(()=>pt(t.modelValue)?t.modelValue.length>0:!P(t.modelValue)),K=F(()=>{var mt;return(mt=E?.statusIcon)!=null?mt:!1}),W=F(()=>t.clearable&&!q.value&&D.value&&(Z.value||o.inputHovering)),Q=F(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),ie=F(()=>s.is("reverse",!!(Q.value&&x.value))),ne=F(()=>T?.validateState||""),ce=F(()=>ne.value&&Px[ne.value]),ae=F(()=>t.remote?t.debounce:0),_e=F(()=>t.remote&&!o.inputValue&&o.options.size===0),ke=F(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&o.inputValue&&o.options.size>0&&Te.value===0?t.noMatchText||n("el.select.noMatch"):o.options.size===0?t.noDataText||n("el.select.noData"):null),Te=F(()=>Ke.value.filter(mt=>mt.visible).length),Ke=F(()=>{const mt=Array.from(o.options.values()),on=[];return o.optionValues.forEach(ln=>{const Ci=mt.findIndex(ji=>ji.value===ln);Ci>-1&&on.push(mt[Ci])}),on.length>=mt.length?on:mt}),Fe=F(()=>Array.from(o.cachedOptions.values())),ve=F(()=>{const mt=Ke.value.filter(on=>!on.created).some(on=>on.currentLabel===o.inputValue);return t.filterable&&t.allowCreate&&o.inputValue!==""&&!mt}),fe=()=>{t.filterable&&Kt(t.filterMethod)||t.filterable&&t.remote&&Kt(t.remoteMethod)||Ke.value.forEach(mt=>{var on;(on=mt.updateOption)==null||on.call(mt,o.inputValue)})},Me=er(),ge=F(()=>["small"].includes(Me.value)?"small":"default"),Qe=F({get(){return x.value&&(t.loading||!_e.value)&&(!_.value||!Go(o.previousQuery))},set(mt){x.value=mt}}),G=F(()=>{if(t.multiple&&!ri(t.modelValue))return Pr(t.modelValue).length===0&&!o.inputValue;const mt=pt(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||ri(mt)?!o.inputValue:!0}),ee=F(()=>{var mt;const on=(mt=t.placeholder)!=null?mt:n("el.select.placeholder");return t.multiple||!D.value?on:o.selectedLabel}),j=F(()=>Jw?null:"mouseenter");We(()=>t.modelValue,(mt,on)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(o.inputValue="",he("")),re(),!Ms(mt,on)&&t.validateEvent&&T?.validate("change").catch(ln=>void 0)},{flush:"post",deep:!0}),We(()=>x.value,mt=>{mt?he(o.inputValue):(o.inputValue="",o.previousQuery=null,o.isBeforeHide=!0)}),We(()=>o.options.entries(),()=>{pi&&(re(),t.defaultFirstOption&&(t.filterable||t.remote)&&Te.value&&be())},{flush:"post"}),We([()=>o.hoveringIndex,Ke],([mt])=>{Xt(mt)&&mt>-1?S.value=Ke.value[mt]||{}:S.value={},Ke.value.forEach(on=>{on.hover=S.value===on})}),jo(()=>{o.isBeforeHide||fe()});const he=mt=>{o.previousQuery===mt||k.value||(o.previousQuery=mt,t.filterable&&Kt(t.filterMethod)?t.filterMethod(mt):t.filterable&&t.remote&&Kt(t.remoteMethod)&&t.remoteMethod(mt),t.defaultFirstOption&&(t.filterable||t.remote)&&Te.value?Nt(be):Nt(Ce))},be=()=>{const mt=Ke.value.filter(ji=>ji.visible&&!ji.disabled&&!ji.states.groupDisabled),on=mt.find(ji=>ji.created),ln=mt[0],Ci=Ke.value.map(ji=>ji.value);o.hoveringIndex=qe(Ci,on||ln)},re=()=>{if(t.multiple)o.selectedLabel="";else{const on=pt(t.modelValue)?t.modelValue[0]:t.modelValue,ln=le(on);o.selectedLabel=ln.currentLabel,o.selected=[ln];return}const mt=[];ri(t.modelValue)||Pr(t.modelValue).forEach(on=>{mt.push(le(on))}),o.selected=mt},le=mt=>{let on;const ln=A0(mt);for(let Ie=o.cachedOptions.size-1;Ie>=0;Ie--){const tt=Fe.value[Ie];if(ln?js(tt.value,t.valueKey)===js(mt,t.valueKey):tt.value===mt){on={index:Ke.value.filter(St=>!St.created).indexOf(tt),value:mt,currentLabel:tt.currentLabel,get isDisabled(){return tt.isDisabled}};break}}if(on)return on;const Ci=ln?mt.label:mt??"";return{index:-1,value:mt,currentLabel:Ci}},Ce=()=>{const mt=o.selected.length;if(mt>0){const on=o.selected[mt-1];o.hoveringIndex=Ke.value.findIndex(ln=>Di(on)===Di(ln))}else o.hoveringIndex=-1},Ee=()=>{o.selectionWidth=Number.parseFloat(window.getComputedStyle(l.value).width)},Oe=()=>{o.collapseItemWidth=b.value.getBoundingClientRect().width},Ge=()=>{var mt,on;(on=(mt=c.value)==null?void 0:mt.updatePopper)==null||on.call(mt)},$e=()=>{var mt,on;(on=(mt=u.value)==null?void 0:mt.updatePopper)==null||on.call(mt)},ot=()=>{o.inputValue.length>0&&!x.value&&(x.value=!0),he(o.inputValue)},dt=mt=>{if(o.inputValue=mt.target.value,t.remote)_.value=!0,Jt();else return ot()},Jt=Wy(()=>{ot(),_.value=!1},ae),at=mt=>{Ms(t.modelValue,mt)||e(Wn,mt)},Mt=mt=>k9(mt,on=>{const ln=o.cachedOptions.get(on);return!ln?.disabled&&!ln?.states.groupDisabled}),Bt=mt=>{const on=Oi(mt);if(t.multiple&&on!==gt.delete&&mt.target.value.length<=0){const ln=Pr(t.modelValue).slice(),Ci=Mt(ln);if(Ci<0)return;const ji=ln[Ci];ln.splice(Ci,1),e(wn,ln),at(ln),e("remove-tag",ji)}},$t=(mt,on)=>{const ln=o.selected.indexOf(on);if(ln>-1&&!q.value){const Ci=Pr(t.modelValue).slice();Ci.splice(ln,1),e(wn,Ci),at(Ci),e("remove-tag",on.value)}mt.stopPropagation(),ut()},Ze=mt=>{mt.stopPropagation();const on=t.multiple?[]:I.value;if(t.multiple)for(const ln of o.selected)ln.isDisabled&&on.push(ln.value);e(wn,on),at(on),o.hoveringIndex=-1,x.value=!1,e("clear"),ut()},vt=mt=>{var on;if(t.multiple){const ln=Pr((on=t.modelValue)!=null?on:[]).slice(),Ci=qe(ln,mt);Ci>-1?ln.splice(Ci,1):(t.multipleLimit<=0||ln.length{kt(mt)})},qe=(mt,on)=>ri(on)?-1:Mn(on.value)?mt.findIndex(ln=>Ms(js(ln,t.valueKey),Di(on))):mt.indexOf(on.value),kt=mt=>{var on,ln,Ci,ji,Ie;const tt=pt(mt)?mt[mt.length-1]:mt;let bt=null;if(!Ws(tt?.value)){const St=Ke.value.filter(ft=>ft.value===tt.value);St.length>0&&(bt=St[0].$el)}if(c.value&&bt){const St=(ji=(Ci=(ln=(on=c.value)==null?void 0:on.popperRef)==null?void 0:ln.contentRef)==null?void 0:Ci.querySelector)==null?void 0:ji.call(Ci,`.${s.be("dropdown","wrap")}`);St&&ik(St,bt)}(Ie=g.value)==null||Ie.handleScroll()},Je=mt=>{o.options.set(mt.value,mt),o.cachedOptions.set(mt.value,mt)},Ft=(mt,on)=>{o.options.get(mt)===on&&o.options.delete(mt)},Ne=F(()=>{var mt,on;return(on=(mt=c.value)==null?void 0:mt.popperRef)==null?void 0:on.contentRef}),et=()=>{o.isBeforeHide=!1,Nt(()=>{var mt;(mt=g.value)==null||mt.update(),kt(o.selected)})},ut=()=>{var mt;(mt=d.value)==null||mt.focus()},Qt=()=>{var mt;if(x.value){x.value=!1,Nt(()=>{var on;return(on=d.value)==null?void 0:on.blur()});return}(mt=d.value)==null||mt.blur()},Cn=mt=>{Ze(mt)},ei=mt=>{if(x.value=!1,Z.value){const on=new FocusEvent("blur",mt);Nt(()=>V(on))}},Tt=()=>{o.inputValue.length>0?o.inputValue="":x.value=!1},rt=mt=>{var on;q.value||t.filterable&&x.value&&mt&&!((on=f.value)!=null&&on.contains(mt.target))||(Jw&&(o.inputHovering=!0),o.menuVisibleOnFocus?o.menuVisibleOnFocus=!1:x.value=!x.value)},jt=()=>{if(!x.value)rt();else{const mt=Ke.value[o.hoveringIndex];mt&&!mt.isDisabled&&vt(mt)}},Di=mt=>Mn(mt.value)?js(mt.value,t.valueKey):mt.value,ms=F(()=>Ke.value.filter(mt=>mt.visible).every(mt=>mt.isDisabled)),pe=F(()=>t.multiple?t.collapseTags?o.selected.slice(0,t.maxCollapseTags):o.selected:[]),Qn=F(()=>t.multiple?t.collapseTags?o.selected.slice(t.maxCollapseTags):[]:[]),gs=mt=>{if(!x.value){x.value=!0;return}if(!(o.options.size===0||Te.value===0||k.value)&&!ms.value){mt==="next"?(o.hoveringIndex++,o.hoveringIndex===o.options.size&&(o.hoveringIndex=0)):mt==="prev"&&(o.hoveringIndex--,o.hoveringIndex<0&&(o.hoveringIndex=o.options.size-1));const on=Ke.value[o.hoveringIndex];(on.isDisabled||!on.visible)&&gs(mt),Nt(()=>kt(S.value))}},An=(mt,on,ln,Ci)=>{for(let ji=on;ji>=0&&ji{var ln;const Ci=o.options.size;if(Ci===0)return;const ji=Ex(mt,0,Ci-1),Ie=Ke.value,tt=on==="up"?-1:1,bt=(ln=An(Ie,ji,tt,Ci))!=null?ln:An(Ie,ji-tt,-tt,Ci);bt!=null&&(o.hoveringIndex=bt,Nt(()=>kt(S.value)))},Ur=mt=>{const on=Oi(mt);let ln=!0;switch(on){case gt.up:gs("prev");break;case gt.down:gs("next");break;case gt.enter:case gt.numpadEnter:k.value||jt();break;case gt.esc:Tt();break;case gt.backspace:ln=!1,Bt(mt);return;case gt.home:if(!x.value)return;ts(0,"down");break;case gt.end:if(!x.value)return;ts(o.options.size-1,"up");break;case gt.pageUp:if(!x.value)return;ts(o.hoveringIndex-10,"up");break;case gt.pageDown:if(!x.value)return;ts(o.hoveringIndex+10,"down");break;default:ln=!1;break}ln&&(mt.preventDefault(),mt.stopPropagation())},lt=()=>{if(!l.value)return 0;const mt=window.getComputedStyle(l.value);return Number.parseFloat(mt.gap||"6px")},Un=F(()=>{const mt=lt(),on=t.filterable?mt+Ux:0;return{maxWidth:`${b.value&&t.maxCollapseTags===1?o.selectionWidth-o.collapseItemWidth-mt-on:o.selectionWidth-on}px`}}),Yn=F(()=>({maxWidth:`${o.selectionWidth}px`})),ii=mt=>{e("popup-scroll",mt)};as(l,Ee),as(oe,Ge),as(m,$e),as(b,Oe);let di;return We(()=>Qe.value,mt=>{mt?di=as(p,Ge).stop:(di?.(),di=void 0),e("visible-change",mt)}),mn(()=>{re()}),{inputId:A,contentId:i,nsSelect:s,nsInput:r,states:o,isFocused:Z,expanded:x,optionsArray:Ke,hoverOption:S,selectSize:Me,filteredOptionsCount:Te,updateTooltip:Ge,updateTagTooltip:$e,debouncedOnInputChange:Jt,onInput:dt,deletePrevTag:Bt,deleteTag:$t,deleteSelected:Ze,handleOptionSelect:vt,scrollToOption:kt,hasModelValue:D,shouldShowPlaceholder:G,currentPlaceholder:ee,mouseEnterEventName:j,needStatusIcon:K,showClearBtn:W,iconComponent:Q,iconReverse:ie,validateState:ne,validateIcon:ce,showNewOption:ve,updateOptions:fe,collapseTagSize:ge,setSelected:re,selectDisabled:q,emptyText:ke,handleCompositionStart:B,handleCompositionUpdate:R,handleCompositionEnd:H,handleKeydown:Ur,onOptionCreate:Je,onOptionDestroy:Ft,handleMenuEnter:et,focus:ut,blur:Qt,handleClearClick:Cn,handleClickOutside:ei,handleEsc:Tt,toggleMenu:rt,selectOption:jt,getValueKey:Di,navigateOptions:gs,dropdownMenuVisible:Qe,showTagList:pe,collapseTagList:Qn,popupScroll:ii,getOption:le,tagStyle:Un,collapseTagStyle:Yn,popperRef:Ne,inputRef:d,tooltipRef:c,tagTooltipRef:u,prefixRef:h,suffixRef:f,selectRef:a,wrapperRef:oe,selectionRef:l,scrollbarRef:g,menuRef:p,tagMenuRef:m,collapseItemRef:b}};var ixe=Be({name:"ElOptions",setup(t,{slots:e}){const n=zt(s1);let i=[];return()=>{var s,r;const o=(s=e.default)==null?void 0:s.call(e),a=[];function l(c){pt(c)&&c.forEach(u=>{var d,h,f,p;const m=(d=u?.type||{})==null?void 0:d.name;m==="ElOptionGroup"?l(!Gt(u.children)&&!pt(u.children)&&Kt((h=u.children)==null?void 0:h.default)?(f=u.children)==null?void 0:f.default():u.children):m==="ElOption"?a.push((p=u.props)==null?void 0:p.value):pt(u.children)&&l(u.children)})}return o.length&&l((r=o[0])==null?void 0:r.children),Ms(a,i)||(i=a,n&&(n.states.optionValues=a)),o}}});const hU=_t({name:String,id:String,modelValue:{type:Re([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:or,effect:{type:Re(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:Re([String,Object])},popperOptions:{type:Re(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:Re(Function)},filterMethod:{type:Re(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:Ri.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:Ai,default:pd},fitInputWidth:Boolean,suffixIcon:{type:Ai,default:eu},tagType:{...rd.type,default:"info"},tagEffect:{...rd.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:Re(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:Re(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Ri.appendTo,options:{type:Re(Array)},props:{type:Re(Object),default:()=>l2},...hp,...To(["ariaLabel"])});c7.scroll;const sxe=Be({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=ht("select"),n=X(),i=xn(),s=X([]);Xn(dU,ni({...hr(t)}));const r=F(()=>s.value.some(c=>c.visible===!0)),o=c=>{var u;return c.type.name==="ElOption"&&!!((u=c.component)!=null&&u.proxy)},a=c=>{const u=Pr(c),d=[];return u.forEach(h=>{var f;Yi(h)&&(o(h)?d.push(h.component.proxy):pt(h.children)&&h.children.length?d.push(...a(h.children)):(f=h.component)!=null&&f.subTree&&d.push(...a(h.component.subTree)))}),d},l=()=>{s.value=a(i.subTree)};return mn(()=>{l()}),Gy(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:r,ns:e}}});function rxe(t,e,n,i,s,r){return _n((z(),se("ul",{ref:"groupRef",class:J(t.ns.be("group","wrap"))},[U("li",{class:J(t.ns.be("group","title"))},Xe(t.label),3),U("li",null,[U("ul",{class:J(t.ns.b("group"))},[Ue(t.$slots,"default")],2)])],2)),[[ci,t.visible]])}var Kk=xt(sxe,[["render",rxe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/option-group.vue"]]);const M6="ElSelect",Z0=new WeakMap,oxe=t=>(...e)=>{var n,i;const s=e[0];if(!s||s.includes('Slot "default" invoked outside of the render function')&&((n=e[2])!=null&&n.includes("ElTreeSelect")))return;const r=(i=Z0.get(t))==null?void 0:i.originalWarnHandler;if(r){r(...e);return}console.warn(...e)},axe=t=>{let e=Z0.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:oxe(t),count:0},Z0.set(t,e)),e},lxe=Be({name:M6,componentName:M6,components:{ElSelectMenu:txe,ElOption:jk,ElOptions:ixe,ElOptionGroup:Kk,ElTag:ju,ElScrollbar:Wl,ElTooltip:Or,ElIcon:Ut},directives:{ClickOutside:Ch},props:hU,emits:[wn,Wn,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=xn(),s=axe(i.appContext);s.count+=1,i.appContext.config.warnHandler=s.handler;const r=F(()=>{const{modelValue:x,multiple:S}=t,_=S?[]:void 0;return pt(x)?S?x:_:S?_:x}),o=ni({...hr(t),modelValue:r}),a=nxe(o,e),{calculatorRef:l,inputStyle:c}=Vk(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=i1(t),p=x=>({label:u(x),value:d(x),disabled:f(x)}),m=x=>x.reduce((S,_)=>(S.push(_),_.children&&_.children.length>0&&S.push(...m(_.children)),S),[]),b=x=>{Il(x||[]).forEach(_=>{var E;if(Mn(_)&&(_.type.name==="ElOption"||_.type.name==="ElTree")){const T=_.type.name;if(T==="ElTree"){const A=((E=_.props)==null?void 0:E.data)||[];m(A).forEach(P=>{P.currentLabel=P.label||(Mn(P.value)?"":P.value),a.onOptionCreate(P)})}else if(T==="ElOption"){const A={..._.props};A.currentLabel=A.label||(Mn(A.value)?"":A.value),a.onOptionCreate(A)}}})};We(()=>{var x;return[(x=n.default)==null?void 0:x.call(n),r.value]},()=>{var x;t.persistent||a.expanded.value||(a.states.options.clear(),b((x=n.default)==null?void 0:x.call(n)))},{immediate:!0}),Xn(s1,ni({props:o,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const g=F(()=>t.multiple?a.states.selected.map(x=>x.currentLabel):a.states.selectedLabel);return gi(()=>{const x=Z0.get(i.appContext);x&&(x.count-=1,x.count<=0&&(i.appContext.config.warnHandler=x.originalWarnHandler,Z0.delete(i.appContext)))}),{...a,modelValue:r,selectedLabel:g,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}}),cxe=["id","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],uxe=["textContent"],dxe={key:1};function hxe(t,e,n,i,s,r){const o=Zt("el-tag"),a=Zt("el-tooltip"),l=Zt("el-icon"),c=Zt("el-option"),u=Zt("el-option-group"),d=Zt("el-options"),h=Zt("el-scrollbar"),f=Zt("el-select-menu"),p=xA("click-outside");return _n((z(),se("div",Dn({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[e0(t.mouseEnterEventName)]:e[11]||(e[11]=m=>t.states.inputHovering=!0)},{onMouseleave:e[12]||(e[12]=m=>t.states.inputHovering=!1)}),[de(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[10]||(e[10]=m=>t.states.isBeforeHide=!1)},{default:xe(()=>{var m;return[U("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:e[7]||(e[7]=un((...b)=>t.toggleMenu&&t.toggleMenu(...b),["prevent"]))},[t.$slots.prefix?(z(),se("div",{key:0,ref:"prefixRef",class:J(t.nsSelect.e("prefix"))},[Ue(t.$slots,"prefix")],2)):Le("v-if",!0),U("div",{ref:"selectionRef",class:J([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?Ue(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>[(z(!0),se(At,null,yn(t.showTagList,b=>(z(),se("div",{key:t.getValueKey(b),class:J(t.nsSelect.e("selected-item"))},[de(o,{closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Ht(t.tagStyle),onClose:g=>t.deleteTag(g,b)},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))},[Ue(t.$slots,"label",{index:b.index,label:b.currentLabel,value:b.value},()=>[cn(Xe(b.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(z(),De(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom","popper-class":t.popperClass,"popper-style":t.popperStyle,teleported:t.teleported},{default:xe(()=>[U("div",{ref:"collapseItemRef",class:J(t.nsSelect.e("selected-item"))},[de(o,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Ht(t.collapseTagStyle)},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))}," + "+Xe(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:xe(()=>[U("div",{ref:"tagMenuRef",class:J(t.nsSelect.e("selection"))},[(z(!0),se(At,null,yn(t.collapseTagList,b=>(z(),se("div",{key:t.getValueKey(b),class:J(t.nsSelect.e("selected-item"))},[de(o,{class:"in-tooltip",closable:!t.selectDisabled&&!b.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:g=>t.deleteTag(g,b)},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))},[Ue(t.$slots,"label",{index:b.index,label:b.currentLabel,value:b.value},()=>[cn(Xe(b.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","popper-style","teleported"])):Le("v-if",!0)]):Le("v-if",!0),U("div",{class:J([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled)])},[_n(U("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":e[0]||(e[0]=b=>t.states.inputValue=b),type:"text",name:t.name,class:J([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:Ht(t.inputStyle),tabindex:t.tabindex,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:e[1]||(e[1]=(...b)=>t.handleKeydown&&t.handleKeydown(...b)),onCompositionstart:e[2]||(e[2]=(...b)=>t.handleCompositionStart&&t.handleCompositionStart(...b)),onCompositionupdate:e[3]||(e[3]=(...b)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...b)),onCompositionend:e[4]||(e[4]=(...b)=>t.handleCompositionEnd&&t.handleCompositionEnd(...b)),onInput:e[5]||(e[5]=(...b)=>t.onInput&&t.onInput(...b)),onClick:e[6]||(e[6]=un((...b)=>t.toggleMenu&&t.toggleMenu(...b),["stop"]))},null,46,cxe),[[Mc,t.states.inputValue]]),t.filterable?(z(),se("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:J(t.nsSelect.e("input-calculator")),textContent:Xe(t.states.inputValue)},null,10,uxe)):Le("v-if",!0)],2),t.shouldShowPlaceholder?(z(),se("div",{key:1,class:J([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?Ue(t.$slots,"label",{key:0,index:t.getOption(t.modelValue).index,label:t.currentPlaceholder,value:t.modelValue},()=>[U("span",null,Xe(t.currentPlaceholder),1)]):(z(),se("span",dxe,Xe(t.currentPlaceholder),1))],2)):Le("v-if",!0)],2),U("div",{ref:"suffixRef",class:J(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(z(),De(l,{key:0,class:J([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:xe(()=>[(z(),De(Sn(t.iconComponent)))]),_:1},8,["class"])):Le("v-if",!0),t.showClearBtn&&t.clearIcon?(z(),De(l,{key:1,class:J([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:xe(()=>[(z(),De(Sn(t.clearIcon)))]),_:1},8,["class","onClick"])):Le("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(z(),De(l,{key:2,class:J([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:xe(()=>[(z(),De(Sn(t.validateIcon)))]),_:1},8,["class"])):Le("v-if",!0)],2)],2)]}),content:xe(()=>[de(f,{ref:"menuRef"},{default:xe(()=>[t.$slots.header?(z(),se("div",{key:0,class:J(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=un(()=>{},["stop"]))},[Ue(t.$slots,"header")],2)):Le("v-if",!0),_n(de(h,{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",onScroll:t.popupScroll},{default:xe(()=>[t.showNewOption?(z(),De(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):Le("v-if",!0),de(d,null,{default:xe(()=>[Ue(t.$slots,"default",{},()=>[(z(!0),se(At,null,yn(t.options,(m,b)=>{var g;return z(),se(At,{key:b},[(g=t.getOptions(m))!=null&&g.length?(z(),De(u,{key:0,label:t.getLabel(m),disabled:t.getDisabled(m)},{default:xe(()=>[(z(!0),se(At,null,yn(t.getOptions(m),x=>(z(),De(c,Dn({key:t.getValue(x)},{ref_for:!0},t.getOptionProps(x)),null,16))),128))]),_:2},1032,["label","disabled"])):(z(),De(c,Dn({key:1,ref_for:!0},t.getOptionProps(m)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[ci,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(z(),se("div",{key:1,class:J(t.nsSelect.be("dropdown","loading"))},[Ue(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(z(),se("div",{key:2,class:J(t.nsSelect.be("dropdown","empty"))},[Ue(t.$slots,"empty",{},()=>[U("span",null,Xe(t.emptyText),1)])],2)):Le("v-if",!0),t.$slots.footer?(z(),se("div",{key:3,class:J(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=un(()=>{},["stop"]))},[Ue(t.$slots,"footer")],2)):Le("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[p,t.handleClickOutside,t.popperRef]])}var fxe=xt(lxe,[["render",hxe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select/src/select.vue"]]);const mg=En(fxe,{Option:jk,OptionGroup:Kk}),c2=Ss(jk),pxe=Ss(Kk),qk=()=>zt(uU,{}),mxe=_t({pageSize:{type:Number,required:!0},pageSizes:{type:Re(Array),default:()=>ws([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:Re([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:Qc},appendSizeTo:String}),gxe=Be({name:"ElPaginationSizes",__name:"sizes",props:mxe,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:s}=Jn(),r=ht("pagination"),o=qk(),a=X(n.pageSize);We(()=>n.pageSizes,(u,d)=>{if(!Ms(u,d)&&pt(u)){const h=u.includes(n.pageSize)?n.pageSize:n.pageSizes[0];i("page-size-change",h)}}),We(()=>n.pageSize,u=>{a.value=u});const l=F(()=>n.pageSizes);function c(u){var d;u!==a.value&&(a.value=u,(d=o.handleSizeChange)==null||d.call(o,Number(u)))}return(u,d)=>(z(),se("span",{class:J(v(r).e("sizes"))},[de(v(mg),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,"popper-style":u.popperStyle,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:c},{default:xe(()=>[(z(!0),se(At,null,yn(l.value,h=>(z(),De(v(c2),{key:h,value:h,label:h+v(s)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}});var vxe=xt(gxe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/sizes.vue"]]);const yxe=_t({size:{type:String,values:Qc}}),bxe=["disabled"],_xe=Be({name:"ElPaginationJumper",__name:"jumper",props:yxe,setup(t){const{t:e}=Jn(),n=ht("pagination"),{pageCount:i,disabled:s,currentPage:r,changeEvent:o}=qk(),a=X(),l=F(()=>{var d;return(d=a.value)!=null?d:r?.value});function c(d){a.value=d?+d:""}function u(d){d=Math.trunc(+d),o?.(d),a.value=void 0}return(d,h)=>(z(),se("span",{class:J(v(n).e("jump")),disabled:v(s)},[U("span",{class:J([v(n).e("goto")])},Xe(v(e)("el.pagination.goto")),3),de(v(wo),{size:d.size,class:J([v(n).e("editor"),v(n).is("in-pagination")]),min:1,max:v(i),disabled:v(s),"model-value":l.value,"validate-event":!1,"aria-label":v(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),U("span",{class:J([v(n).e("classifier")])},Xe(v(e)("el.pagination.pageClassifier")),3)],10,bxe))}});var wxe=xt(_xe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/jumper.vue"]]);const xxe=_t({total:{type:Number,default:1e3}}),Sxe=["disabled"],Exe=Be({name:"ElPaginationTotal",__name:"total",props:xxe,setup(t){const{t:e}=Jn(),n=ht("pagination"),{disabled:i}=qk();return(s,r)=>(z(),se("span",{class:J(v(n).e("total")),disabled:v(i)},Xe(v(e)("el.pagination.total",{total:s.total})),11,Sxe))}});var Cxe=xt(Exe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/total.vue"]]);const Txe=_t({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),Mxe=["aria-current","aria-label","tabindex"],Axe=["tabindex","aria-label"],kxe=["aria-current","aria-label","tabindex"],Pxe=["tabindex","aria-label"],Lxe=["aria-current","aria-label","tabindex"],Ixe=Be({name:"ElPaginationPager",__name:"pager",props:Txe,emits:[Wn],setup(t,{emit:e}){const n=t,i=e,s=ht("pager"),r=ht("icon"),{t:o}=Jn(),a=X(!1),l=X(!1),c=X(!1),u=X(!1),d=X(!1),h=X(!1),f=F(()=>{const E=n.pagerCount,T=(E-1)/2,A=Number(n.currentPage),I=Number(n.pageCount);let P=!1,k=!1;I>E&&(A>E-T&&(P=!0),A["more","btn-quickprev",r.b(),s.is("disabled",n.disabled)]),m=F(()=>["more","btn-quicknext",r.b(),s.is("disabled",n.disabled)]),b=F(()=>n.disabled?-1:0);We(()=>[n.pageCount,n.pagerCount,n.currentPage],([E,T,A])=>{const I=(T-1)/2;let P=!1,k=!1;E>T&&(P=A>T-I,k=AI&&(A=I)),A!==P&&i(Wn,A)}return(E,T)=>(z(),se("ul",{class:J(v(s).b()),onClick:_,onKeyup:_s(S,["enter"])},[E.pageCount>0?(z(),se("li",{key:0,class:J([[v(s).is("active",E.currentPage===1),v(s).is("disabled",E.disabled)],"number"]),"aria-current":E.currentPage===1,"aria-label":v(o)("el.pagination.currentPage",{pager:1}),tabindex:b.value}," 1 ",10,Mxe)):Le("v-if",!0),a.value?(z(),se("li",{key:1,class:J(p.value),tabindex:b.value,"aria-label":v(o)("el.pagination.prevPages",{pager:E.pagerCount-2}),onMouseenter:T[0]||(T[0]=A=>g(!0)),onMouseleave:T[1]||(T[1]=A=>c.value=!1),onFocus:T[2]||(T[2]=A=>x(!0)),onBlur:T[3]||(T[3]=A=>d.value=!1)},[(c.value||d.value)&&!E.disabled?(z(),De(v(xh),{key:0})):(z(),De(v(d8),{key:1}))],42,Axe)):Le("v-if",!0),(z(!0),se(At,null,yn(f.value,A=>(z(),se("li",{key:A,class:J([[v(s).is("active",E.currentPage===A),v(s).is("disabled",E.disabled)],"number"]),"aria-current":E.currentPage===A,"aria-label":v(o)("el.pagination.currentPage",{pager:A}),tabindex:b.value},Xe(A),11,kxe))),128)),l.value?(z(),se("li",{key:2,class:J(m.value),tabindex:b.value,"aria-label":v(o)("el.pagination.nextPages",{pager:E.pagerCount-2}),onMouseenter:T[4]||(T[4]=A=>g()),onMouseleave:T[5]||(T[5]=A=>u.value=!1),onFocus:T[6]||(T[6]=A=>x()),onBlur:T[7]||(T[7]=A=>h.value=!1)},[(u.value||h.value)&&!E.disabled?(z(),De(v(Sh),{key:0})):(z(),De(v(d8),{key:1}))],42,Pxe)):Le("v-if",!0),E.pageCount>1?(z(),se("li",{key:3,class:J([[v(s).is("active",E.currentPage===E.pageCount),v(s).is("disabled",E.disabled)],"number"]),"aria-current":E.currentPage===E.pageCount,"aria-label":v(o)("el.pagination.currentPage",{pager:E.pageCount}),tabindex:b.value},Xe(E.pageCount),11,Lxe)):Le("v-if",!0)],34))}});var Rxe=xt(Ixe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/pagination/src/components/pager.vue"]]);const Lo=t=>typeof t!="number",Oxe=_t({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>Xt(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:Re(Array),default:()=>ws([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:Re([String,Object])},prevText:{type:String,default:""},prevIcon:{type:Ai,default:()=>id},nextText:{type:String,default:""},nextIcon:{type:Ai,default:()=>So},teleported:{type:Boolean,default:!0},small:Boolean,size:or,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),Dxe={"update:current-page":t=>Xt(t),"update:page-size":t=>Xt(t),"size-change":t=>Xt(t),change:(t,e)=>Xt(t)&&Xt(e),"current-change":t=>Xt(t),"prev-click":t=>Xt(t),"next-click":t=>Xt(t)},A6="ElPagination";var Nxe=Be({name:A6,props:Oxe,emits:Dxe,setup(t,{emit:e,slots:n}){const{t:i}=Jn(),s=ht("pagination"),r=xn().vnode.props||{},o=G9(),a=F(()=>{var E;return t.small?"small":(E=t.size)!=null?E:o.value});Bc({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},F(()=>!!t.small));const l="onUpdate:currentPage"in r||"onUpdate:current-page"in r||"onCurrentChange"in r,c="onUpdate:pageSize"in r||"onUpdate:page-size"in r||"onSizeChange"in r,u=F(()=>{if(Lo(t.total)&&Lo(t.pageCount)||!Lo(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Lo(t.pageCount)){if(!Lo(t.total)&&!Lo(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=X(Lo(t.defaultPageSize)?10:t.defaultPageSize),h=X(Lo(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=F({get(){return Lo(t.pageSize)?d.value:t.pageSize},set(E){Lo(t.pageSize)&&(d.value=E),c&&(e("update:page-size",E),e("size-change",E))}}),p=F(()=>{let E=0;return Lo(t.pageCount)?Lo(t.total)||(E=Math.max(1,Math.ceil(t.total/f.value))):E=t.pageCount,E}),m=F({get(){return Lo(t.currentPage)?h.value:t.currentPage},set(E){let T=E;E<1?T=1:E>p.value&&(T=p.value),Lo(t.currentPage)&&(h.value=T),l&&(e("update:current-page",T),e("current-change",T))}});We(p,E=>{m.value>E&&(m.value=E)}),We([m,f],E=>{e(Wn,...E)},{flush:"post"});function b(E){m.value=E}function g(E){f.value=E;const T=p.value;m.value>T&&(m.value=T)}function x(){t.disabled||(m.value-=1,e("prev-click",m.value))}function S(){t.disabled||(m.value+=1,e("next-click",m.value))}function _(E,T){E&&(E.props||(E.props={}),E.props.class=[E.props.class,T].join(" "))}return Xn(uU,{pageCount:p,disabled:F(()=>t.disabled),currentPage:m,changeEvent:b,handleSizeChange:g}),()=>{var E,T;if(!u.value)return i("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const A=[],I=[],P=tn("div",{class:s.e("rightwrapper")},I),k={prev:tn(V2e,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:x}),jumper:tn(wxe,{size:a.value}),pager:tn(Rxe,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:b,disabled:t.disabled}),next:tn(K2e,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:S}),sizes:tn(vxe,{pageSize:f.value,pageSizes:t.pageSizes,popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:t.disabled,teleported:t.teleported,size:a.value,appendSizeTo:t.appendSizeTo}),slot:(T=(E=n?.default)==null?void 0:E.call(n))!=null?T:null,total:tn(Cxe,{total:Lo(t.total)?0:t.total})},B=t.layout.split(",").map(H=>H.trim());let R=!1;return B.forEach(H=>{if(H==="->"){R=!0;return}R?I.push(k[H]):A.push(k[H])}),_(A[0],s.is("first")),_(A[A.length-1],s.is("last")),R&&I.length>0&&(_(I[0],s.is("first")),_(I[I.length-1],s.is("last")),A.push(P)),tn("div",{class:[s.b(),s.is("background",t.background),s.m(a.value)]},A)}}});const Bxe=En(Nxe),Fxe=_t({title:String,confirmButtonText:String,cancelButtonText:String,confirmButtonType:{type:String,values:PT,default:"primary"},cancelButtonType:{type:String,values:PT,default:"text"},icon:{type:Ai,default:()=>dde},iconColor:{type:String,default:"#f90"},hideIcon:Boolean,hideAfter:{type:Number,default:200},effect:{...Ri.effect,default:"light"},teleported:Ri.teleported,persistent:Ri.persistent,width:{type:[String,Number],default:150},virtualTriggering:Nc.virtualTriggering,virtualRef:Nc.virtualRef}),zxe={confirm:t=>t instanceof MouseEvent,cancel:t=>t instanceof MouseEvent},Uxe=Be({name:"ElPopconfirm",__name:"popconfirm",props:Fxe,emits:zxe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:r}=Jn(),o=ht("popconfirm"),a=X(),l=X(),c=F(()=>{var g;return(g=v(a))==null?void 0:g.popperRef}),u=()=>{var g,x;(x=(g=l.value)==null?void 0:g.focus)==null||x.call(g)},d=()=>{var g,x;(x=(g=a.value)==null?void 0:g.onClose)==null||x.call(g)},h=F(()=>({width:xs(i.width)})),f=g=>{s("confirm",g),d()},p=g=>{s("cancel",g),d()},m=F(()=>i.confirmButtonText||r("el.popconfirm.confirmButtonText")),b=F(()=>i.cancelButtonText||r("el.popconfirm.cancelButtonText"));return e({popperRef:c,hide:d}),(g,x)=>(z(),De(v(Or),Dn({ref_key:"tooltipRef",ref:a,trigger:"click",effect:g.effect},g.$attrs,{"virtual-triggering":g.virtualTriggering,"virtual-ref":g.virtualRef,"popper-class":`${v(o).namespace.value}-popover`,"popper-style":h.value,teleported:g.teleported,"fallback-placements":["bottom","top","right","left"],"hide-after":g.hideAfter,persistent:g.persistent,loop:"",onShow:u}),{content:xe(()=>[U("div",{ref_key:"rootRef",ref:l,tabindex:"-1",class:J(v(o).b())},[U("div",{class:J(v(o).e("main"))},[!g.hideIcon&&g.icon?(z(),De(v(Ut),{key:0,class:J(v(o).e("icon")),style:Ht({color:g.iconColor})},{default:xe(()=>[(z(),De(Sn(g.icon)))]),_:1},8,["class","style"])):Le("v-if",!0),cn(" "+Xe(g.title),1)],2),U("div",{class:J(v(o).e("action"))},[Ue(g.$slots,"actions",{confirm:f,cancel:p},()=>[de(v(Sr),{size:"small",type:g.cancelButtonType==="text"?"":g.cancelButtonType,text:g.cancelButtonType==="text",onClick:p},{default:xe(()=>[cn(Xe(b.value),1)]),_:1},8,["type","text"]),de(v(Sr),{size:"small",type:g.confirmButtonType==="text"?"":g.confirmButtonType,text:g.confirmButtonType==="text",onClick:f},{default:xe(()=>[cn(Xe(m.value),1)]),_:1},8,["type","text"])])],2)],2)]),default:xe(()=>[g.$slots.reference?Ue(g.$slots,"reference",{key:0}):Le("v-if",!0)]),_:3},16,["effect","virtual-triggering","virtual-ref","popper-class","popper-style","teleported","hide-after","persistent"]))}});var $xe=xt(Uxe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popconfirm/src/popconfirm.vue"]]);const Vxe=En($xe),Hxe=_t({trigger:Nc.trigger,triggerKeys:Nc.triggerKeys,placement:ew.placement,disabled:Nc.disabled,visible:Ri.visible,transition:Ri.transition,popperOptions:ew.popperOptions,tabindex:ew.tabindex,content:Ri.content,popperStyle:Ri.popperStyle,popperClass:Ri.popperClass,enterable:{...Ri.enterable,default:!0},effect:{...Ri.effect,default:"light"},teleported:Ri.teleported,appendTo:Ri.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),Wxe={"update:visible":t=>Mi(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Gxe="onUpdate:visible",jxe=Be({name:"ElPopover",__name:"popover",props:Hxe,emits:Wxe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=F(()=>i[Gxe]),o=ht("popover"),a=X(),l=F(()=>{var g;return(g=v(a))==null?void 0:g.popperRef}),c=F(()=>[{width:xs(i.width)},i.popperStyle]),u=F(()=>[o.b(),i.popperClass,{[o.m("plain")]:!!i.content}]),d=F(()=>i.transition===`${o.namespace.value}-fade-in-linear`),h=()=>{var g;(g=a.value)==null||g.hide()},f=()=>{s("before-enter")},p=()=>{s("before-leave")},m=()=>{s("after-enter")},b=()=>{s("update:visible",!1),s("after-leave")};return e({popperRef:l,hide:h}),(g,x)=>(z(),De(v(Or),Dn({ref_key:"tooltipRef",ref:a},g.$attrs,{trigger:g.trigger,"trigger-keys":g.triggerKeys,placement:g.placement,disabled:g.disabled,visible:g.visible,transition:g.transition,"popper-options":g.popperOptions,tabindex:g.tabindex,content:g.content,offset:g.offset,"show-after":g.showAfter,"hide-after":g.hideAfter,"auto-close":g.autoClose,"show-arrow":g.showArrow,"aria-label":g.title,effect:g.effect,enterable:g.enterable,"popper-class":u.value,"popper-style":c.value,teleported:g.teleported,"append-to":g.appendTo,persistent:g.persistent,"gpu-acceleration":d.value,"onUpdate:visible":r.value,onBeforeShow:f,onBeforeHide:p,onShow:m,onHide:b}),{content:xe(()=>[g.title?(z(),se("div",{key:0,class:J(v(o).e("title")),role:"title"},Xe(g.title),3)):Le("v-if",!0),Ue(g.$slots,"default",{},()=>[cn(Xe(g.content),1)])]),default:xe(()=>[g.$slots.reference?Ue(g.$slots,"reference",{key:0}):Le("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}});var Kxe=xt(jxe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/popover/src/popover.vue"]]);const k6=(t,e)=>{const n=e.arg||e.value,i=n?.popperRef;i&&(i.triggerRef=t)};var qxe={mounted(t,e){k6(t,e)},updated(t,e){k6(t,e)}};const Yxe="popover",fU=fue(qxe,Yxe),Xxe=En(Kxe,{directive:fU}),Zxe=_t({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:Re(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:Re([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:Re(Function),default:t=>`${t}%`}}),Jxe=["aria-valuenow"],Qxe={viewBox:"0 0 100 100"},eSe=["d","stroke","stroke-linecap","stroke-width"],tSe=["d","stroke","opacity","stroke-linecap","stroke-width"],nSe={key:0},iSe=Be({name:"ElProgress",__name:"progress",props:Zxe,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=ht("progress"),s=F(()=>{const S={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},_=x(n.percentage);return _.includes("gradient")?S.background=_:S.backgroundColor=_,S}),r=F(()=>(n.strokeWidth/n.width*100).toFixed(1)),o=F(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(r.value)/2}`,10):0),a=F(()=>{const S=o.value,_=n.type==="dashboard";return` M 50 50 m 0 ${_?"":"-"}${S} a ${S} ${S} 0 1 1 0 ${_?"-":""}${S*2} a ${S} ${S} 0 1 1 0 ${_?"":"-"}${S*2} `}),l=F(()=>2*Math.PI*o.value),c=F(()=>n.type==="dashboard"?.75:1),u=F(()=>`${-1*l.value*(1-c.value)/2}px`),d=F(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=F(()=>({strokeDasharray:`${l.value*c.value*(n.percentage/100)}px, ${l.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),f=F(()=>{let S;return n.color?S=x(n.percentage):S=e[n.status]||e.default,S}),p=F(()=>n.status==="warning"?kx:n.type==="line"?n.status==="success"?sk:pd:n.status==="success"?Yy:ul),m=F(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),b=F(()=>n.format(n.percentage));function g(S){const _=100/S.length;return S.map((T,A)=>Gt(T)?{color:T,percentage:(A+1)*_}:T).sort((T,A)=>T.percentage-A.percentage)}const x=S=>{var _;const{color:E}=n;if(Kt(E))return E(S);if(Gt(E))return E;{const T=g(E);for(const A of T)if(A.percentage>S)return A.color;return(_=T[T.length-1])==null?void 0:_.color}};return(S,_)=>(z(),se("div",{class:J([v(i).b(),v(i).m(S.type),v(i).is(S.status),{[v(i).m("without-text")]:!S.showText,[v(i).m("text-inside")]:S.textInside}]),role:"progressbar","aria-valuenow":S.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[S.type==="line"?(z(),se("div",{key:0,class:J(v(i).b("bar"))},[U("div",{class:J(v(i).be("bar","outer")),style:Ht({height:`${S.strokeWidth}px`})},[U("div",{class:J([v(i).be("bar","inner"),{[v(i).bem("bar","inner","indeterminate")]:S.indeterminate},{[v(i).bem("bar","inner","striped")]:S.striped},{[v(i).bem("bar","inner","striped-flow")]:S.stripedFlow}]),style:Ht(s.value)},[(S.showText||S.$slots.default)&&S.textInside?(z(),se("div",{key:0,class:J(v(i).be("bar","innerText"))},[Ue(S.$slots,"default",{percentage:S.percentage},()=>[U("span",null,Xe(b.value),1)])],2)):Le("v-if",!0)],6)],6)],2)):(z(),se("div",{key:1,class:J(v(i).b("circle")),style:Ht({height:`${S.width}px`,width:`${S.width}px`})},[(z(),se("svg",Qxe,[U("path",{class:J(v(i).be("circle","track")),d:a.value,stroke:`var(${v(i).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":S.strokeLinecap,"stroke-width":r.value,fill:"none",style:Ht(d.value)},null,14,eSe),U("path",{class:J(v(i).be("circle","path")),d:a.value,stroke:f.value,fill:"none",opacity:S.percentage?1:0,"stroke-linecap":S.strokeLinecap,"stroke-width":r.value,style:Ht(h.value)},null,14,tSe)]))],6)),(S.showText||S.$slots.default)&&!S.textInside?(z(),se("div",{key:2,class:J(v(i).e("text")),style:Ht({fontSize:`${m.value}px`})},[Ue(S.$slots,"default",{percentage:S.percentage},()=>[S.status?(z(),De(v(Ut),{key:1},{default:xe(()=>[(z(),De(Sn(p.value)))]),_:1})):(z(),se("span",nSe,Xe(b.value),1))])],6)):Le("v-if",!0)],10,Jxe))}});var sSe=xt(iSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/progress/src/progress.vue"]]);const Yk=En(sSe),rSe=_t({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:Re([Array,Object]),default:()=>ws(["","",""])},voidColor:{type:String,default:""},disabledVoidColor:{type:String,default:""},icons:{type:Re([Array,Object]),default:()=>[Z1,Z1,Z1]},voidIcon:{type:Ai,default:()=>Tde},disabledVoidIcon:{type:Ai,default:()=>Z1},disabled:{type:Boolean,default:void 0},allowHalf:Boolean,showText:Boolean,showScore:Boolean,textColor:{type:String,default:""},texts:{type:Re(Array),default:()=>ws(["Extremely bad","Disappointed","Fair","Satisfied","Surprise"])},scoreTemplate:{type:String,default:"{value}"},size:or,clearable:Boolean,...To(["ariaLabel"])}),oSe={[Wn]:t=>Xt(t),[wn]:t=>Xt(t)},aSe=["id","aria-label","aria-labelledby","aria-valuenow","aria-valuetext","aria-valuemax"],lSe=["onMousemove","onClick"],cSe=Be({name:"ElRate",__name:"rate",props:rSe,emits:oSe,setup(t,{expose:e,emit:n}){function i(D,K){const W=ne=>Mn(ne),Q=Object.keys(K).map(ne=>+ne).filter(ne=>{const ce=K[ne];return(W(ce)?ce.excluded:!1)?Dne-ce),ie=K[Q[0]];return W(ie)&&ie.value||ie}const s=t,r=n,o=zt(Kc,void 0),a=er(),l=ht("rate"),{inputId:c,isLabeledByFormItem:u}=Ba(s,{formItemContext:o}),d=X(s.modelValue),h=X(-1),f=X(!0),p=X([]),m=F(()=>p.value.map(D=>D.$el.clientWidth)),b=F(()=>[l.b(),l.m(a.value)]),g=Es(),x=F(()=>l.cssVarBlock({"void-color":s.voidColor,"disabled-void-color":s.disabledVoidColor,"fill-color":T.value})),S=F(()=>{let D="";return s.showScore?D=s.scoreTemplate.replace(/\{\s*value\s*\}/,g.value?`${s.modelValue}`:`${d.value}`):s.showText&&(D=s.texts[Math.ceil(d.value)-1]),D}),_=F(()=>s.modelValue*100-Math.floor(s.modelValue)*100),E=F(()=>pt(s.colors)?{[s.lowThreshold]:s.colors[0],[s.highThreshold]:{value:s.colors[1],excluded:!0},[s.max]:s.colors[2]}:s.colors),T=F(()=>{const D=i(d.value,E.value);return Mn(D)?"":D}),A=F(()=>{let D="";return g.value?D=`${_.value}%`:s.allowHalf&&(D="50%"),{color:T.value,width:D}}),I=F(()=>{let D=pt(s.icons)?[...s.icons]:{...s.icons};return D=Da(D),pt(D)?{[s.lowThreshold]:D[0],[s.highThreshold]:{value:D[1],excluded:!0},[s.max]:D[2]}:D}),P=F(()=>i(s.modelValue,I.value)),k=F(()=>g.value?Gt(s.disabledVoidIcon)?s.disabledVoidIcon:Da(s.disabledVoidIcon):Gt(s.voidIcon)?s.voidIcon:Da(s.voidIcon)),B=F(()=>i(d.value,I.value));function R(D){const K=g.value&&_.value>0&&D-1s.modelValue,W=s.allowHalf&&f.value&&D-.5<=d.value&&D>d.value;return K||W}function H(D){s.clearable&&D===s.modelValue&&(D=0),r(wn,D),s.modelValue!==D&&r(Wn,D)}function q(D){g.value||(s.allowHalf&&f.value?H(d.value):H(D))}function oe(D){if(g.value)return;const K=Oi(D),W=s.allowHalf?.5:1;let Q=d.value;switch(K){case gt.up:case gt.right:Q+=W;break;case gt.left:case gt.down:Q-=W;break}if(Q=Ex(Q,0,s.max),Q!==d.value)return D.stopPropagation(),D.preventDefault(),r(wn,Q),r(Wn,Q),Q}function Z(D,K){g.value||(s.allowHalf&&K?(f.value=K.offsetX*2<=m.value[D-1],d.value=f.value?D-.5:D):d.value=D,h.value=D)}function V(){g.value||(s.allowHalf&&(f.value=s.modelValue!==Math.floor(s.modelValue)),d.value=s.modelValue,h.value=-1)}return We(()=>s.modelValue,D=>{d.value=D,f.value=s.modelValue!==Math.floor(s.modelValue)}),s.modelValue||r(wn,0),e({setCurrentValue:Z,resetCurrentValue:V}),(D,K)=>{var W;return z(),se("div",{id:v(c),class:J([b.value,v(l).is("disabled",v(g))]),role:"slider","aria-label":v(u)?void 0:D.ariaLabel||"rating","aria-labelledby":v(u)?(W=v(o))==null?void 0:W.labelId:void 0,"aria-valuenow":d.value,"aria-valuetext":S.value||void 0,"aria-valuemin":"0","aria-valuemax":D.max,tabindex:"0",style:Ht(x.value),onKeydown:oe},[(z(!0),se(At,null,yn(D.max,(Q,ie)=>(z(),se("span",{key:ie,class:J(v(l).e("item")),onMousemove:ne=>Z(Q,ne),onMouseleave:V,onClick:ne=>q(Q)},[de(v(Ut),{ref_for:!0,ref_key:"iconRefs",ref:p,class:J([v(l).e("icon"),{hover:h.value===Q},v(l).is("active",Q<=d.value),v(l).is("focus-visible",Q===Math.ceil(d.value||1))])},{default:xe(()=>[_n((z(),De(Sn(B.value),null,null,512)),[[ci,!R(Q)&&Q<=d.value]]),_n((z(),De(Sn(k.value),null,null,512)),[[ci,!R(Q)&&Q>d.value]]),_n((z(),De(Sn(k.value),{class:J([v(l).em("decimal","box")])},null,8,["class"])),[[ci,R(Q)]]),_n(de(v(Ut),{style:Ht(A.value),class:J([v(l).e("icon"),v(l).e("decimal")])},{default:xe(()=>[(z(),De(Sn(P.value)))]),_:1},8,["style","class"]),[[ci,R(Q)]])]),_:2},1032,["class"])],42,lSe))),128)),D.showText||D.showScore?(z(),se("span",{key:0,class:J(v(l).e("text")),style:Ht({color:D.textColor})},Xe(S.value),7)):Le("v-if",!0)],46,aSe)}}});var uSe=xt(cSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/rate/src/rate.vue"]]);const dSe=En(uSe),hf={primary:"icon-primary",success:"icon-success",warning:"icon-warning",error:"icon-error",info:"icon-info"},P6={[hf.primary]:H0,[hf.success]:Fue,[hf.warning]:kx,[hf.error]:rk,[hf.info]:H0},hSe=_t({title:{type:String,default:""},subTitle:{type:String,default:""},icon:{type:String,values:["primary","success","warning","info","error"],default:"info"}}),fSe=Be({name:"ElResult",__name:"result",props:hSe,setup(t){const e=t,n=ht("result"),i=F(()=>{const s=e.icon,r=s&&hf[s]?hf[s]:"icon-info",o=P6[r]||P6["icon-info"];return{class:r,component:o}});return(s,r)=>(z(),se("div",{class:J(v(n).b())},[U("div",{class:J(v(n).e("icon"))},[Ue(s.$slots,"icon",{},()=>[i.value.component?(z(),De(Sn(i.value.component),{key:0,class:J(i.value.class)},null,8,["class"])):Le("v-if",!0)])],2),s.title||s.$slots.title?(z(),se("div",{key:0,class:J(v(n).e("title"))},[Ue(s.$slots,"title",{},()=>[U("p",null,Xe(s.title),1)])],2)):Le("v-if",!0),s.subTitle||s.$slots["sub-title"]?(z(),se("div",{key:1,class:J(v(n).e("subtitle"))},[Ue(s.$slots,"sub-title",{},()=>[U("p",null,Xe(s.subTitle),1)])],2)):Le("v-if",!0),s.$slots.extra?(z(),se("div",{key:2,class:J(v(n).e("extra"))},[Ue(s.$slots,"extra")],2)):Le("v-if",!0)],2))}});var pSe=xt(fSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/result/src/result.vue"]]);const mSe=En(pSe),gSe=["start","center","end","space-around","space-between","space-evenly"],vSe=["top","middle","bottom"],ySe=_t({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:gSe,default:"start"},align:{type:String,values:vSe}}),bSe=Be({name:"ElRow",__name:"row",props:ySe,setup(t){const e=t,n=ht("row"),i=F(()=>e.gutter);Xn(cz,{gutter:i});const s=F(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),r=F(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(o,a)=>(z(),De(Sn(o.tag),{class:J(r.value),style:Ht(s.value)},{default:xe(()=>[Ue(o.$slots,"default")]),_:3},8,["class","style"]))}});var _Se=xt(bSe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/row/src/row.vue"]]);const wSe=En(_Se),xSe=Be({props:{item:{type:Object,required:!0},style:{type:Object},height:Number},setup(){return{ns:ht("select")}}});function SSe(t,e,n,i,s,r){return z(),se("div",{class:J(t.ns.be("group","title")),style:Ht({...t.style,lineHeight:`${t.height}px`})},Xe(t.item.label),7)}var ESe=xt(xSe,[["render",SSe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/group-item.vue"]]);function CSe(t,{emit:e}){return{hoverItem:()=>{t.disabled||e("hover",t.index)},selectOptionClick:()=>{t.disabled||e("select",t.item,t.index)}}}const TSe=_t({allowCreate:Boolean,autocomplete:{type:Re(String),default:"none"},automaticDropdown:Boolean,clearable:Boolean,clearIcon:{type:Ai,default:pd},effect:{type:Re(String),default:"light"},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},defaultFirstOption:Boolean,disabled:{type:Boolean,default:void 0},estimatedOptionHeight:{type:Number,default:void 0},filterable:Boolean,filterMethod:{type:Re(Function)},height:{type:Number,default:274},itemHeight:{type:Number,default:34},id:String,loading:Boolean,loadingText:String,modelValue:{type:Re([Array,String,Number,Boolean,Object]),default:void 0},multiple:Boolean,multipleLimit:{type:Number,default:0},name:String,noDataText:String,noMatchText:String,remoteMethod:{type:Re(Function)},reserveKeyword:{type:Boolean,default:!0},options:{type:Re(Array),required:!0},placeholder:{type:String},teleported:Ri.teleported,persistent:{type:Boolean,default:!0},popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,popperOptions:{type:Re(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},size:or,props:{type:Re(Object),default:()=>l2},valueKey:{type:String,default:"value"},scrollbarAlwaysOn:Boolean,validateEvent:{type:Boolean,default:!0},offset:{type:Number,default:12},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},placement:{type:Re(String),values:gd,default:"bottom-start"},fallbackPlacements:{type:Re(Array),default:["bottom-start","top-start","right","left"]},tagType:{...rd.type,default:"info"},tagEffect:{...rd.effect,default:"light"},tabindex:{type:[String,Number],default:0},appendTo:Ri.appendTo,fitInputWidth:{type:[Boolean,Number],default:!0,validator(t){return Mi(t)||Xt(t)}},suffixIcon:{type:Ai,default:eu},...hp,...To(["ariaLabel"])}),MSe=_t({data:Array,disabled:Boolean,hovering:Boolean,item:{type:Re(Object),required:!0},index:Number,style:Object,selected:Boolean,created:Boolean}),ASe={[wn]:t=>!0,[Wn]:t=>!0,"remove-tag":t=>!0,"visible-change":t=>!0,focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},kSe={hover:t=>Xt(t),select:(t,e)=>!0},Xk=Symbol("ElSelectV2Injection"),PSe=Be({props:MSe,emits:kSe,setup(t,{emit:e}){const n=zt(Xk),i=ht("select"),{hoverItem:s,selectOptionClick:r}=CSe(t,{emit:e}),{getLabel:o}=i1(n.props),a=n.contentId;return{ns:i,contentId:a,hoverItem:s,selectOptionClick:r,getLabel:o}}}),LSe=["id","aria-selected","aria-disabled"];function ISe(t,e,n,i,s,r){return z(),se("li",{id:`${t.contentId}-${t.index}`,role:"option","aria-selected":t.selected,"aria-disabled":t.disabled||void 0,style:Ht(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)]),onMousemove:e[0]||(e[0]=(...o)=>t.hoverItem&&t.hoverItem(...o)),onClick:e[1]||(e[1]=un((...o)=>t.selectOptionClick&&t.selectOptionClick(...o),["stop"])),onMousedown:e[2]||(e[2]=un(()=>{},["prevent"]))},[Ue(t.$slots,"default",{item:t.item,index:t.index,disabled:t.disabled},()=>[U("span",null,Xe(t.getLabel(t.item)),1)])],46,LSe)}var RSe=xt(PSe,[["render",ISe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/option-item.vue"]]),L6=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function OSe(t,e){return!!(t===e||L6(t)&&L6(e))}function DSe(t,e){if(t.length!==e.length)return!1;for(var n=0;n{const e=xn().proxy.$props;return F(()=>{const n=(i,s,r)=>({});return e.perfMode?xx(n):NSe(n)})},qT=50,u2="itemRendered",d2="scroll",Im="forward",h2="backward",il="auto",$x="smart",J0="start",Pc="center",Q0="end",gg="horizontal",Zk="vertical",BSe="ltr",Vm="rtl",ey="negative",Jk="positive-ascending",Qk="positive-descending",FSe={[gg]:"left",[Zk]:"top"},zSe=20,USe={[gg]:"deltaX",[Zk]:"deltaY"},mU=({atEndEdge:t,atStartEdge:e,layout:n},i)=>{let s,r=0;const o=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:o,onWheel:l=>{nd(s);const c=l[USe[n.value]];o(r)&&o(r+c)||(r+=c,ak()||l.preventDefault(),s=Gc(()=>{i(r),r=0}))}}},YT=sc({type:Re([Number,Function]),required:!0}),XT=sc({type:Number}),ZT=sc({type:Number,default:2}),$Se=sc({type:String,values:["ltr","rtl"],default:"ltr"}),JT=sc({type:Number,default:0}),f2=sc({type:Number,required:!0}),gU=sc({type:String,values:["horizontal","vertical"],default:Zk}),vU=_t({className:{type:String,default:""},containerElement:{type:Re([String,Object]),default:"div"},data:{type:Re(Array),default:()=>ws([])},direction:$Se,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},innerProps:{type:Re(Object),default:()=>({})},style:{type:Re([Object,String,Array])},useIsScrolling:Boolean,width:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),yU=_t({cache:ZT,estimatedItemSize:XT,layout:gU,initScrollOffset:JT,total:f2,itemSize:YT,...vU}),QT={type:Number,default:6},bU={type:Number,default:0},_U={type:Number,default:2},Bf=_t({columnCache:ZT,columnWidth:YT,estimatedColumnWidth:XT,estimatedRowHeight:XT,initScrollLeft:JT,initScrollTop:JT,itemKey:{type:Re(Function),default:({columnIndex:t,rowIndex:e})=>`${e}:${t}`},rowCache:ZT,rowHeight:YT,totalColumn:f2,totalRow:f2,hScrollbarSize:QT,vScrollbarSize:QT,scrollbarStartGap:bU,scrollbarEndGap:_U,role:String,...vU}),wU=_t({alwaysOn:Boolean,class:String,layout:gU,total:f2,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:QT,startGap:bU,endGap:_U,visible:Boolean}),Sf=(t,e)=>tt===BSe||t===Vm||t===gg,I6=t=>t===Vm;let Rp=null;function p2(t=!1){if(Rp===null||t){const e=document.createElement("div"),n=e.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";const i=document.createElement("div"),s=i.style;return s.width="100px",s.height="100px",e.appendChild(i),document.body.appendChild(e),e.scrollLeft>0?Rp=Qk:(e.scrollLeft=1,e.scrollLeft===0?Rp=ey:Rp=Jk),document.body.removeChild(e),Rp}return Rp}function VSe({move:t,size:e,bar:n},i){const s={},r=`translate${n.axis}(${t}px)`;return s[n.size]=e,s.transform=r,i==="horizontal"?s.height="100%":s.width="100%",s}const eM=Be({name:"ElVirtualScrollBar",props:wU,emits:["scroll","start-move","stop-move"],setup(t,{emit:e}){const n=F(()=>t.startGap+t.endGap),i=ht("virtual-scrollbar"),s=ht("scrollbar"),r=X(),o=X();let a=null,l=null;const c=ni({isDragging:!1,traveled:0}),u=F(()=>l7[t.layout]),d=F(()=>t.clientSize-v(n)),h=F(()=>({position:"absolute",width:`${gg===t.layout?d.value:t.scrollbarSize}px`,height:`${gg===t.layout?t.scrollbarSize:d.value}px`,[FSe[t.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),f=F(()=>{const T=t.ratio;if(T>=100)return Number.POSITIVE_INFINITY;if(T>=50)return T*d.value/100;const A=d.value/3;return Math.floor(Math.min(Math.max(T*d.value/100,zSe),A))}),p=F(()=>{if(!Number.isFinite(f.value))return{display:"none"};const T=`${f.value}px`;return VSe({bar:u.value,size:T,move:c.traveled},t.layout)}),m=F(()=>Math.ceil(t.clientSize-f.value-v(n))),b=()=>{window.addEventListener("mousemove",_),window.addEventListener("mouseup",S);const T=v(o);T&&(l=document.onselectstart,document.onselectstart=()=>!1,T.addEventListener("touchmove",_,{passive:!0}),T.addEventListener("touchend",S))},g=()=>{window.removeEventListener("mousemove",_),window.removeEventListener("mouseup",S),document.onselectstart=l,l=null;const T=v(o);T&&(T.removeEventListener("touchmove",_),T.removeEventListener("touchend",S))},x=T=>{T.stopImmediatePropagation(),!(T.ctrlKey||[1,2].includes(T.button))&&(c.isDragging=!0,c[u.value.axis]=T.currentTarget[u.value.offset]-(T[u.value.client]-T.currentTarget.getBoundingClientRect()[u.value.direction]),e("start-move"),b())},S=()=>{c.isDragging=!1,c[u.value.axis]=0,e("stop-move"),g()},_=T=>{const{isDragging:A}=c;if(!A||!o.value||!r.value)return;const I=c[u.value.axis];if(!I)return;nd(a);const P=(r.value.getBoundingClientRect()[u.value.direction]-T[u.value.client])*-1,k=o.value[u.value.offset]-I,B=P-k;a=Gc(()=>{c.traveled=Math.max(0,Math.min(B,m.value)),e("scroll",B,m.value)})},E=T=>{const A=Math.abs(T.target.getBoundingClientRect()[u.value.direction]-T[u.value.client]),I=o.value[u.value.offset]/2,P=A-I;c.traveled=Math.max(0,Math.min(P,m.value)),e("scroll",P,m.value)};return We(()=>t.scrollFrom,T=>{c.isDragging||(c.traveled=Math.ceil(T*m.value))}),gi(()=>{g()}),()=>tn("div",{role:"presentation",ref:r,class:[i.b(),t.class,(t.alwaysOn||c.isDragging)&&"always-on"],style:h.value,onMousedown:un(E,["stop","prevent"]),onTouchstartPrevent:x},tn("div",{ref:o,class:s.e("thumb"),style:p.value,onMousedown:x},[]))}}),xU=({name:t,getOffset:e,getItemSize:n,getItemOffset:i,getEstimatedTotalSize:s,getStartIndexForOffset:r,getStopIndexForStartIndex:o,initCache:a,clearCache:l,validateProps:c})=>Be({name:t??"ElVirtualList",props:yU,emits:[u2,d2],setup(u,{emit:d,expose:h}){c(u);const f=xn(),p=ht("vl"),m=X(a(u,f)),b=pU(),g=X(),x=X(),S=X(),_=X({isScrolling:!1,scrollDir:"forward",scrollOffset:Xt(u.initScrollOffset)?u.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1,scrollbarAlwaysOn:u.scrollbarAlwaysOn}),E=F(()=>{const{total:ne,cache:ce}=u,{isScrolling:ae,scrollDir:_e,scrollOffset:ke}=v(_);if(ne===0)return[0,0,0,0];const Te=r(u,ke,v(m)),Ke=o(u,Te,ke,v(m)),Fe=!ae||_e===h2?Math.max(1,ce):1,ve=!ae||_e===Im?Math.max(1,ce):1;return[Math.max(0,Te-Fe),Math.max(0,Math.min(ne-1,Ke+ve)),Te,Ke]}),T=F(()=>s(u,v(m))),A=F(()=>ty(u.layout)),I=F(()=>[{position:"relative",[`overflow-${A.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:u.direction,height:Xt(u.height)?`${u.height}px`:u.height,width:Xt(u.width)?`${u.width}px`:u.width},u.style]),P=F(()=>{const ne=v(T),ce=v(A);return{height:ce?"100%":`${ne}px`,pointerEvents:v(_).isScrolling?"none":void 0,width:ce?`${ne}px`:"100%",margin:0,boxSizing:"border-box"}}),k=F(()=>A.value?u.width:u.height),{onWheel:B}=mU({atStartEdge:F(()=>_.value.scrollOffset<=0),atEndEdge:F(()=>_.value.scrollOffset>=T.value),layout:F(()=>u.layout)},ne=>{var ce,ae;(ae=(ce=S.value).onMouseUp)==null||ae.call(ce),V(Math.min(_.value.scrollOffset+ne,T.value-k.value))});xi(g,"wheel",B,{passive:!1});const R=()=>{const{total:ne}=u;if(ne>0){const[ke,Te,Ke,Fe]=v(E);d(u2,ke,Te,Ke,Fe)}const{scrollDir:ce,scrollOffset:ae,updateRequested:_e}=v(_);d(d2,ce,ae,_e)},H=ne=>{const{clientHeight:ce,scrollHeight:ae,scrollTop:_e}=ne.currentTarget,ke=v(_);if(ke.scrollOffset===_e)return;const Te=Math.max(0,Math.min(_e,ae-ce));_.value={...ke,isScrolling:!0,scrollDir:Sf(ke.scrollOffset,Te),scrollOffset:Te,updateRequested:!1},Nt(W)},q=ne=>{const{clientWidth:ce,scrollLeft:ae,scrollWidth:_e}=ne.currentTarget,ke=v(_);if(ke.scrollOffset===ae)return;const{direction:Te}=u;let Ke=ae;if(Te===Vm)switch(p2()){case ey:{Ke=-ae;break}case Qk:{Ke=_e-ce-ae;break}}Ke=Math.max(0,Math.min(Ke,_e-ce)),_.value={...ke,isScrolling:!0,scrollDir:Sf(ke.scrollOffset,Ke),scrollOffset:Ke,updateRequested:!1},Nt(W)},oe=ne=>{v(A)?q(ne):H(ne),R()},Z=(ne,ce)=>{const ae=(T.value-k.value)/ce*ne;V(Math.min(T.value-k.value,ae))},V=ne=>{ne=Math.max(ne,0),ne!==v(_).scrollOffset&&(_.value={...v(_),scrollOffset:ne,scrollDir:Sf(v(_).scrollOffset,ne),updateRequested:!0},Nt(W))},D=(ne,ce=il)=>{const{scrollOffset:ae}=v(_);ne=Math.max(0,Math.min(ne,u.total-1)),V(e(u,ne,ce,ae,v(m)))},K=ne=>{const{direction:ce,itemSize:ae,layout:_e}=u,ke=b.value(l&&ae,l&&_e,l&&ce);let Te;if(fi(ke,String(ne)))Te=ke[ne];else{const Ke=i(u,ne,v(m)),Fe=n(u,ne,v(m)),ve=v(A),fe=ce===Vm,Me=ve?Ke:0;ke[ne]=Te={position:"absolute",left:fe?void 0:`${Me}px`,right:fe?`${Me}px`:void 0,top:ve?0:`${Ke}px`,height:ve?"100%":`${Fe}px`,width:ve?`${Fe}px`:"100%"}}return Te},W=()=>{_.value.isScrolling=!1,Nt(()=>{b.value(-1,null,null)})},Q=()=>{const ne=g.value;ne&&(ne.scrollTop=0)};mn(()=>{if(!pi)return;const{initScrollOffset:ne}=u,ce=v(g);Xt(ne)&&ce&&(v(A)?ce.scrollLeft=ne:ce.scrollTop=ne),R()}),ec(()=>{const{direction:ne,layout:ce}=u,{scrollOffset:ae,updateRequested:_e}=v(_),ke=v(g);if(_e&&ke)if(ce===gg)if(ne===Vm)switch(p2()){case ey:{ke.scrollLeft=-ae;break}case Jk:{ke.scrollLeft=ae;break}default:{const{clientWidth:Te,scrollWidth:Ke}=ke;ke.scrollLeft=Ke-Te-ae;break}}else ke.scrollLeft=ae;else ke.scrollTop=ae}),rx(()=>{v(g).scrollTop=v(_).scrollOffset});const ie={ns:p,clientSize:k,estimatedTotalSize:T,windowStyle:I,windowRef:g,innerRef:x,innerStyle:P,itemsToRender:E,scrollbarRef:S,states:_,getItemStyle:K,onScroll:oe,onScrollbarScroll:Z,onWheel:B,scrollTo:V,scrollToItem:D,resetScrollTop:Q};return h({windowRef:g,innerRef:x,getItemStyleCache:b,scrollTo:V,scrollToItem:D,resetScrollTop:Q,states:_}),ie},render(u){var d;const{$slots:h,className:f,clientSize:p,containerElement:m,data:b,getItemStyle:g,innerElement:x,itemsToRender:S,innerStyle:_,layout:E,total:T,onScroll:A,onScrollbarScroll:I,states:P,useIsScrolling:k,windowStyle:B,ns:R}=u,[H,q]=S,oe=Sn(m),Z=Sn(x),V=[];if(T>0)for(let Q=H;Q<=q;Q++)V.push(tn(At,{key:Q},(d=h.default)==null?void 0:d.call(h,{data:b,index:Q,isScrolling:k?P.isScrolling:void 0,style:g(Q)})));const D=[tn(Z,Dn(u.innerProps,{style:_,ref:"innerRef"}),Gt(Z)?V:{default:()=>V})],K=tn(eM,{ref:"scrollbarRef",clientSize:p,layout:E,onScroll:I,ratio:p*100/this.estimatedTotalSize,scrollFrom:P.scrollOffset/(this.estimatedTotalSize-p),total:T,alwaysOn:P.scrollbarAlwaysOn}),W=tn(oe,{class:[R.e("window"),f],style:B,onScroll:A,ref:"windowRef",key:0},Gt(oe)?[D]:{default:()=>[D]});return tn("div",{key:0,class:[R.e("wrapper"),P.scrollbarAlwaysOn?"always-on":""]},[W,K])}}),SU=xU({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:i,width:s},r,o,a)=>{const l=ty(i)?s:t,c=Math.max(0,e*n-l),u=Math.min(c,r*n),d=Math.max(0,(r+1)*n-l);switch(o===$x&&(a>=d-l&&a<=u+l?o=il:o=Pc),o){case J0:return u;case Q0:return d;case Pc:{const h=Math.round(d+(u-d)/2);return hc+Math.floor(l/2)?c:h}case il:default:return a>=d&&a<=u?a:aMath.max(0,Math.min(t-1,Math.floor(n/e))),getStopIndexForStartIndex:({height:t,total:e,itemSize:n,layout:i,width:s},r,o)=>{const a=r*n,l=ty(i)?s:t,c=Math.ceil((l+o-a)/n);return Math.max(0,Math.min(e-1,r+c-1))},initCache(){},clearCache:!0,validateProps(){}}),Rm=(t,e,n)=>{const{itemSize:i}=t,{items:s,lastVisitedIndex:r}=n;if(e>r){let o=0;if(r>=0){const a=s[r];o=a.offset+a.size}for(let a=r+1;a<=e;a++){const l=i(a);s[a]={offset:o,size:l},o+=l}n.lastVisitedIndex=e}return s[e]},HSe=(t,e,n)=>{const{items:i,lastVisitedIndex:s}=e;return(s>0?i[s].offset:0)>=n?EU(t,e,0,s,n):WSe(t,e,Math.max(0,s),n)},EU=(t,e,n,i,s)=>{for(;n<=i;){const r=n+Math.floor((i-n)/2),o=Rm(t,r,e).offset;if(o===s)return r;os&&(i=r-1)}return Math.max(0,n-1)},WSe=(t,e,n,i)=>{const{total:s}=t;let r=1;for(;n{let s=0;if(i>=t&&(i=t-1),i>=0){const a=e[i];s=a.offset+a.size}const o=(t-i-1)*n;return s+o},GSe=xU({name:"ElDynamicSizeList",getItemOffset:(t,e,n)=>Rm(t,e,n).offset,getItemSize:(t,e,{items:n})=>n[e].size,getEstimatedTotalSize:R6,getOffset:(t,e,n,i,s)=>{const{height:r,layout:o,width:a}=t,l=ty(o)?a:r,c=Rm(t,e,s),u=R6(t,s),d=Math.max(0,Math.min(u-l,c.offset)),h=Math.max(0,c.offset-l+c.size);switch(n===$x&&(i>=h-l&&i<=d+l?n=il:n=Pc),n){case J0:return d;case Q0:return h;case Pc:return Math.round(h+(d-h)/2);case il:default:return i>=h&&i<=d?i:iHSe(t,n,e),getStopIndexForStartIndex:(t,e,n,i)=>{const{height:s,total:r,layout:o,width:a}=t,l=ty(o)?a:s,c=Rm(t,e,i),u=n+l;let d=c.offset+c.size,h=e;for(;h{var r,o;n.lastVisitedIndex=Math.min(n.lastVisitedIndex,i-1),(r=e.exposed)==null||r.getItemStyleCache(-1),s&&((o=e.proxy)==null||o.$forceUpdate())},n},clearCache:!1,validateProps:({itemSize:t})=>{}}),jSe={loading:Boolean,data:{type:Array,required:!0},hoveringIndex:Number,width:Number,id:String,ariaLabel:String};var KSe=Be({name:"ElSelectDropdown",props:jSe,setup(t,{slots:e,expose:n}){const i=zt(Xk),s=ht("select"),{getLabel:r,getValue:o,getDisabled:a}=i1(i.props),l=X([]),c=X(),u=F(()=>t.data.length);We(()=>u.value,()=>{var B,R;(R=(B=i.tooltipRef.value)==null?void 0:B.updatePopper)==null||R.call(B)});const d=F(()=>ri(i.props.estimatedOptionHeight)),h=F(()=>d.value?{itemSize:i.props.itemHeight}:{estimatedSize:i.props.estimatedOptionHeight,itemSize:B=>l.value[B]}),f=(B=[],R)=>{const{props:{valueKey:H}}=i;return Mn(R)?B&&B.some(q=>Hi(js(q,H))===js(R,H)):B.includes(R)},p=(B,R)=>{if(Mn(R)){const{valueKey:H}=i.props;return js(B,H)===js(R,H)}else return B===R},m=(B,R)=>i.props.multiple?f(B,o(R)):p(B,o(R)),b=(B,R)=>{const{disabled:H,multiple:q,multipleLimit:oe}=i.props;return H||!R&&(q?oe>0&&B.length>=oe:!1)},g=B=>t.hoveringIndex===B;n({listRef:c,isSized:d,isItemDisabled:b,isItemHovering:g,isItemSelected:m,scrollToItem:B=>{const R=c.value;R&&R.scrollToItem(B)},resetScrollTop:()=>{const B=c.value;B&&B.resetScrollTop()}});const E=B=>{const{index:R,data:H,style:q}=B,oe=v(d),{itemSize:Z,estimatedSize:V}=v(h),{modelValue:D}=i.props,{onSelect:K,onHover:W}=i,Q=H[R];if(Q.type==="Group")return de(ESe,{item:Q,style:q,height:oe?Z:V},null);const ie=m(D,Q),ne=b(D,ie),ce=g(R);return de(RSe,Dn(B,{selected:ie,disabled:a(Q)||ne,created:!!Q.created,hovering:ce,item:Q,onSelect:K,onHover:W}),{default:ae=>{var _e;return((_e=e.default)==null?void 0:_e.call(e,ae))||de("span",null,[r(Q)])}})},{onKeyboardNavigate:T,onKeyboardSelect:A}=i,I=()=>{T("forward")},P=()=>{T("backward")},k=B=>{const R=Oi(B),{tab:H,esc:q,down:oe,up:Z,enter:V,numpadEnter:D}=gt;switch([q,oe,Z,V,D].includes(R)&&(B.preventDefault(),B.stopPropagation()),R){case H:case q:break;case oe:I();break;case Z:P();break;case V:case D:A();break}};return()=>{var B,R,H,q;const{data:oe,width:Z}=t,{height:V,multiple:D,scrollbarAlwaysOn:K}=i.props,W=F(()=>Jw?!0:K),Q=v(d)?SU:GSe;return de("div",{class:[s.b("dropdown"),s.is("multiple",D)],style:{width:`${Z}px`}},[(B=e.header)==null?void 0:B.call(e),((R=e.loading)==null?void 0:R.call(e))||((H=e.empty)==null?void 0:H.call(e))||de(Q,Dn({ref:c},v(h),{className:s.be("dropdown","list"),scrollbarAlwaysOn:W.value,data:oe,height:V,width:Z,total:oe.length,innerElement:"ul",innerProps:{id:t.id,role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},onKeydown:k}),{default:ie=>de(E,ie,null)}),(q=e.footer)==null?void 0:q.call(e)])}}});function qSe(t,e){const{aliasProps:n,getLabel:i,getValue:s}=i1(t),r=X(0),o=X(),a=F(()=>t.allowCreate&&t.filterable);We(()=>t.options,f=>{const p=new Set(f.map(m=>i(m)));e.createdOptions=e.createdOptions.filter(m=>!p.has(i(m)))});function l(f){const p=m=>i(m)===f;return t.options&&t.options.some(p)||e.createdOptions.some(p)}function c(f){a.value&&(t.multiple&&f.created?r.value++:o.value=f)}function u(f){if(a.value)if(f&&f.length>0){if(l(f)){e.createdOptions=e.createdOptions.filter(m=>i(m)!==e.previousQuery);return}const p={[n.value.value]:f,[n.value.label]:f,created:!0,[n.value.disabled]:!1};e.createdOptions.length>=r.value?e.createdOptions[r.value]=p:e.createdOptions.push(p)}else if(t.multiple)e.createdOptions.length=r.value;else{const p=o.value;e.createdOptions.length=0,p&&p.created&&e.createdOptions.push(p)}}function d(f){if(!a.value||!f||!f.created||f.created&&t.reserveKeyword&&e.inputValue===i(f))return;const p=e.createdOptions.findIndex(m=>s(m)===s(f));~p&&(e.createdOptions.splice(p,1),r.value--)}function h(){a.value&&(e.createdOptions.length=0,r.value=0)}return{createNewOption:u,removeNewOption:d,selectNewOption:c,clearAllNewOption:h}}const YSe=(t,e)=>{const{t:n}=Jn(),i=ht("select"),s=ht("input"),{form:r,formItem:o}=zr(),{inputId:a}=Ba(t,{formItemContext:o}),{aliasProps:l,getLabel:c,getValue:u,getDisabled:d,getOptions:h}=i1(t),{valueOnClear:f,isEmptyValue:p}=Ky(t),m=ni({inputValue:"",cachedOptions:[],createdOptions:[],hoveringIndex:-1,inputHovering:!1,selectionWidth:0,collapseItemWidth:0,previousQuery:null,previousValue:void 0,selectedLabel:"",menuVisibleOnFocus:!1,isBeforeHide:!1}),b=X(-1),g=X(!1),x=X(),S=X(),_=X(),E=X(),T=X(),A=X(),I=X(),P=X(),k=X(),B=X(),{isComposing:R,handleCompositionStart:H,handleCompositionEnd:q,handleCompositionUpdate:oe}=Jy({afterComposition:Ye=>Ci(Ye)}),Z=Es(),{wrapperRef:V,isFocused:D,handleBlur:K}=md(T,{disabled:Z,afterFocus(){t.automaticDropdown&&!ne.value&&(ne.value=!0,m.menuVisibleOnFocus=!0)},beforeBlur(Ye){var Et,Ot;return((Et=_.value)==null?void 0:Et.isFocusInsideContent(Ye))||((Ot=E.value)==null?void 0:Ot.isFocusInsideContent(Ye))},afterBlur(){var Ye;ne.value=!1,m.menuVisibleOnFocus=!1,t.validateEvent&&((Ye=o?.validate)==null||Ye.call(o,"blur").catch(Et=>void 0))}}),W=F(()=>ee("")),Q=F(()=>t.loading?!1:t.options.length>0||m.createdOptions.length>0),ie=X([]),ne=X(!1),ce=F(()=>{var Ye;return(Ye=r?.statusIcon)!=null?Ye:!1}),ae=F(()=>{const Ye=ie.value.length*t.itemHeight;return Ye>t.height?t.height:Ye}),_e=F(()=>t.multiple?pt(t.modelValue)&&t.modelValue.length>0:!p(t.modelValue)),ke=F(()=>t.clearable&&!Z.value&&_e.value&&(D.value||m.inputHovering)),Te=F(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),Ke=F(()=>Te.value&&i.is("reverse",ne.value)),Fe=F(()=>o?.validateState||""),ve=F(()=>{if(Fe.value)return Px[Fe.value]}),fe=F(()=>t.remote?t.debounce:0),Me=F(()=>t.remote&&!m.inputValue&&!Q.value),ge=F(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&m.inputValue&&Q.value&&ie.value.length===0?t.noMatchText||n("el.select.noMatch"):Q.value?null:t.noDataText||n("el.select.noData")),Qe=F(()=>t.filterable&&Kt(t.filterMethod)),G=F(()=>t.filterable&&t.remote&&Kt(t.remoteMethod)),ee=Ye=>{const Et=new RegExp(Gk(Ye),"i"),Ot=Wt=>Qe.value||G.value?!0:Ye?Et.test(c(Wt)||""):!0;return t.loading?[]:[...m.createdOptions,...t.options].reduce((Wt,Rn)=>{const Ln=h(Rn);if(pt(Ln)){const oi=Ln.filter(Ot);oi.length>0&&Wt.push({label:c(Rn),type:"Group"},...oi)}else(t.remote||Ot(Rn))&&Wt.push(Rn);return Wt},[])},j=()=>{ie.value=ee(m.inputValue)},he=F(()=>{const Ye=new Map;return W.value.forEach((Et,Ot)=>{Ye.set(rt(u(Et)),{option:Et,index:Ot})}),Ye}),be=F(()=>{const Ye=new Map;return ie.value.forEach((Et,Ot)=>{Ye.set(rt(u(Et)),{option:Et,index:Ot})}),Ye}),re=F(()=>ie.value.every(Ye=>d(Ye))),le=er(),Ce=F(()=>le.value==="small"?"small":"default"),Ee=()=>{var Ye;if(Xt(t.fitInputWidth)){b.value=t.fitInputWidth;return}const Et=((Ye=x.value)==null?void 0:Ye.offsetWidth)||200;!t.fitInputWidth&&Q.value?Nt(()=>{b.value=Math.max(Et,Oe())}):b.value=Et},Oe=()=>{var Ye,Et;const Wt=document.createElement("canvas").getContext("2d"),Rn=i.be("dropdown","item"),oi=(((Et=(Ye=P.value)==null?void 0:Ye.listRef)==null?void 0:Et.innerRef)||document).querySelector(`.${Rn}`);if(oi===null||Wt===null)return 0;const In=getComputedStyle(oi),ai=Number.parseFloat(In.paddingLeft)+Number.parseFloat(In.paddingRight);return Wt.font=`bold ${In.font.replace(new RegExp(`\\b${In.fontWeight}\\b`),"")}`,ie.value.reduce((vi,Nn)=>{const Ps=Wt.measureText(c(Nn));return Math.max(Ps.width,vi)},0)+ai},Ge=()=>{if(!S.value)return 0;const Ye=window.getComputedStyle(S.value);return Number.parseFloat(Ye.gap||"6px")},$e=F(()=>{const Ye=Ge(),Et=t.filterable?Ye+Ux:0;return{maxWidth:`${B.value&&t.maxCollapseTags===1?m.selectionWidth-m.collapseItemWidth-Ye-Et:m.selectionWidth-Et}px`}}),ot=F(()=>({maxWidth:`${m.selectionWidth}px`})),dt=F(()=>pt(t.modelValue)?t.modelValue.length===0&&!m.inputValue:t.filterable?!m.inputValue:!0),Jt=F(()=>{var Ye;const Et=(Ye=t.placeholder)!=null?Ye:n("el.select.placeholder");return t.multiple||!_e.value?Et:m.selectedLabel}),at=F(()=>{var Ye,Et;return(Et=(Ye=_.value)==null?void 0:Ye.popperRef)==null?void 0:Et.contentRef}),Mt=F(()=>{if(t.multiple){const Ye=t.modelValue.length;if(Ye>0&&be.value.has(t.modelValue[Ye-1])){const{index:Et}=be.value.get(t.modelValue[Ye-1]);return Et}}else if(!p(t.modelValue)&&be.value.has(t.modelValue)){const{index:Ye}=be.value.get(t.modelValue);return Ye}return-1}),Bt=F({get(){return ne.value&&(t.loading||!Me.value)&&(!g.value||!Go(m.previousQuery))},set(Ye){ne.value=Ye}}),$t=F(()=>t.multiple?t.collapseTags?m.cachedOptions.slice(0,t.maxCollapseTags):m.cachedOptions:[]),Ze=F(()=>t.multiple?t.collapseTags?m.cachedOptions.slice(t.maxCollapseTags):[]:[]),{createNewOption:vt,removeNewOption:qe,selectNewOption:kt,clearAllNewOption:Je}=qSe(t,m),Ft=Ye=>{var Et;Z.value||t.filterable&&ne.value&&Ye&&!((Et=I.value)!=null&&Et.contains(Ye.target))||(m.menuVisibleOnFocus?m.menuVisibleOnFocus=!1:ne.value=!ne.value)},Ne=()=>{m.inputValue.length>0&&!ne.value&&(ne.value=!0),vt(m.inputValue),Nt(()=>{ut(m.inputValue)})},et=Wy(()=>{Ne(),g.value=!1},fe),ut=Ye=>{m.previousQuery===Ye||R.value||(m.previousQuery=Ye,t.filterable&&Kt(t.filterMethod)?t.filterMethod(Ye):t.filterable&&t.remote&&Kt(t.remoteMethod)&&t.remoteMethod(Ye),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value.length?Nt(Qt):Nt(ln))},Qt=()=>{const Ye=ie.value.filter(Wt=>!Wt.disabled&&Wt.type!=="Group"),Et=Ye.find(Wt=>Wt.created),Ot=Ye[0];m.hoveringIndex=Tt(ie.value,Et||Ot)},Cn=Ye=>{Ms(t.modelValue,Ye)||e(Wn,Ye)},ei=Ye=>{e(wn,Ye),Cn(Ye),m.previousValue=t.multiple?String(Ye):Ye,Nt(()=>{if(t.multiple&&pt(t.modelValue)){const Et=m.cachedOptions.slice(),Ot=t.modelValue.map(Wt=>bt(Wt,Et));Ms(m.cachedOptions,Ot)||(m.cachedOptions=Ot)}else ft(!0)})},Tt=(Ye=[],Et)=>{if(!Mn(Et))return Ye.indexOf(Et);const Ot=t.valueKey;let Wt=-1;return Ye.some((Rn,Ln)=>js(Rn,Ot)===js(Et,Ot)?(Wt=Ln,!0):!1),Wt},rt=Ye=>Mn(Ye)?js(Ye,t.valueKey):Ye,jt=()=>{Ee()},Di=()=>{m.selectionWidth=Number.parseFloat(window.getComputedStyle(S.value).width)},ms=()=>{m.collapseItemWidth=B.value.getBoundingClientRect().width},pe=()=>{var Ye,Et;(Et=(Ye=_.value)==null?void 0:Ye.updatePopper)==null||Et.call(Ye)},Qn=()=>{var Ye,Et;(Et=(Ye=E.value)==null?void 0:Ye.updatePopper)==null||Et.call(Ye)},gs=Ye=>{const Et=u(Ye);if(t.multiple){let Ot=t.modelValue.slice();const Wt=Tt(Ot,Et);Wt>-1?(Ot=[...Ot.slice(0,Wt),...Ot.slice(Wt+1)],m.cachedOptions.splice(Wt,1),qe(Ye)):(t.multipleLimit<=0||Ot.length{let Ot=t.modelValue.slice();const Wt=Tt(Ot,u(Et));Wt>-1&&!Z.value&&(Ot=[...t.modelValue.slice(0,Wt),...t.modelValue.slice(Wt+1)],m.cachedOptions.splice(Wt,1),ei(Ot),e("remove-tag",u(Et)),qe(Et)),Ye.stopPropagation(),ts()},ts=()=>{var Ye;(Ye=T.value)==null||Ye.focus()},Ur=()=>{var Ye;if(ne.value){ne.value=!1,Nt(()=>{var Et;return(Et=T.value)==null?void 0:Et.blur()});return}(Ye=T.value)==null||Ye.blur()},lt=()=>{m.inputValue.length>0?m.inputValue="":ne.value=!1},Un=Ye=>k9(Ye,Et=>!m.cachedOptions.some(Ot=>u(Ot)===Et&&d(Ot))),Yn=Ye=>{const Et=Oi(Ye);if(t.multiple&&Et!==gt.delete&&m.inputValue.length===0){Ye.preventDefault();const Ot=t.modelValue.slice(),Wt=Un(Ot);if(Wt<0)return;const Rn=Ot[Wt];Ot.splice(Wt,1);const Ln=m.cachedOptions[Wt];m.cachedOptions.splice(Wt,1),qe(Ln),ei(Ot),e("remove-tag",Rn)}},ii=()=>{let Ye;pt(t.modelValue)?Ye=[]:Ye=f.value,m.selectedLabel="",ne.value=!1,ei(Ye),e("clear"),Je(),ts()},di=(Ye,Et=void 0)=>{const Ot=ie.value;if(!["forward","backward"].includes(Ye)||Z.value||Ot.length<=0||re.value||R.value)return;if(!ne.value)return Ft();ri(Et)&&(Et=m.hoveringIndex);let Wt=-1;Ye==="forward"?(Wt=Et+1,Wt>=Ot.length&&(Wt=0)):Ye==="backward"&&(Wt=Et-1,(Wt<0||Wt>=Ot.length)&&(Wt=Ot.length-1));const Rn=Ot[Wt];if(d(Rn)||Rn.type==="Group")return di(Ye,Wt);m.hoveringIndex=Wt,tt(Wt)},mt=()=>{if(ne.value)~m.hoveringIndex&&ie.value[m.hoveringIndex]&&gs(ie.value[m.hoveringIndex]);else return Ft()},on=Ye=>{m.hoveringIndex=Ye??-1},ln=()=>{if(!t.multiple)m.hoveringIndex=ie.value.findIndex(Ye=>rt(u(Ye))===rt(t.modelValue));else{const Ye=t.modelValue.length;if(Ye>0){const Et=t.modelValue[Ye-1];m.hoveringIndex=ie.value.findIndex(Ot=>rt(Et)===rt(u(Ot)))}else m.hoveringIndex=-1}},Ci=Ye=>{if(m.inputValue=Ye.target.value,t.remote)g.value=!0,et();else return Ne()},ji=Ye=>{if(ne.value=!1,D.value){const Et=new FocusEvent("blur",Ye);K(Et)}},Ie=()=>(m.isBeforeHide=!1,Nt(()=>{~Mt.value&&tt(Mt.value)})),tt=Ye=>{P.value.scrollToItem(Ye)},bt=(Ye,Et)=>{const Ot=rt(Ye);if(he.value.has(Ot)){const{option:Wt}=he.value.get(Ot);return Wt}if(Et&&Et.length){const Wt=Et.find(Rn=>rt(u(Rn))===Ot);if(Wt)return Wt}return{[l.value.value]:Ye,[l.value.label]:Ye}},St=Ye=>{var Et,Ot;return(Ot=(Et=he.value.get(u(Ye)))==null?void 0:Et.index)!=null?Ot:-1},ft=(Ye=!1)=>{if(t.multiple)if(t.modelValue.length>0){const Et=m.cachedOptions.slice();m.cachedOptions.length=0,m.previousValue=t.modelValue.toString();for(const Ot of t.modelValue){const Wt=bt(Ot,Et);m.cachedOptions.push(Wt)}}else m.cachedOptions=[],m.previousValue=void 0;else if(_e.value){m.previousValue=t.modelValue;const Et=ie.value,Ot=Et.findIndex(Wt=>rt(u(Wt))===rt(t.modelValue));~Ot?m.selectedLabel=c(Et[Ot]):(!m.selectedLabel||Ye)&&(m.selectedLabel=rt(t.modelValue))}else m.selectedLabel="",m.previousValue=void 0;Je(),Ee()};We(()=>t.fitInputWidth,()=>{Ee()}),We(ne,Ye=>{Ye?(t.persistent||Ee(),ut("")):(m.inputValue="",m.previousQuery=null,m.isBeforeHide=!0,vt(""))}),We(()=>t.modelValue,(Ye,Et)=>{var Ot;(!Ye||pt(Ye)&&Ye.length===0||t.multiple&&!Ms(Ye.toString(),m.previousValue)||!t.multiple&&rt(Ye)!==rt(m.previousValue))&&ft(!0),!Ms(Ye,Et)&&t.validateEvent&&((Ot=o?.validate)==null||Ot.call(o,"change").catch(Rn=>void 0))},{deep:!0}),We(()=>t.options,()=>{const Ye=T.value;(!Ye||Ye&&document.activeElement!==Ye)&&ft()},{deep:!0,flush:"post"}),We(()=>ie.value,()=>(Ee(),P.value&&Nt(P.value.resetScrollTop))),jo(()=>{m.isBeforeHide||j()}),jo(()=>{const{valueKey:Ye,options:Et}=t,Ot=new Map;for(const Wt of Et){const Rn=u(Wt);let Ln=Rn;if(Mn(Ln)&&(Ln=js(Rn,Ye)),Ot.get(Ln))break;Ot.set(Ln,!0)}}),mn(()=>{ft()}),as(x,jt),as(S,Di),as(V,pe),as(k,Qn),as(B,ms);let nn;return We(()=>Bt.value,Ye=>{Ye?nn=as(P,pe).stop:(nn?.(),nn=void 0),e("visible-change",Ye)}),{inputId:a,collapseTagSize:Ce,currentPlaceholder:Jt,expanded:ne,emptyText:ge,popupHeight:ae,debounce:fe,allOptions:W,allOptionsValueMap:he,filteredOptions:ie,iconComponent:Te,iconReverse:Ke,tagStyle:$e,collapseTagStyle:ot,popperSize:b,dropdownMenuVisible:Bt,hasModelValue:_e,shouldShowPlaceholder:dt,selectDisabled:Z,selectSize:le,needStatusIcon:ce,showClearBtn:ke,states:m,isFocused:D,nsSelect:i,nsInput:s,inputRef:T,menuRef:P,tagMenuRef:k,tooltipRef:_,tagTooltipRef:E,selectRef:x,wrapperRef:V,selectionRef:S,prefixRef:A,suffixRef:I,collapseItemRef:B,popperRef:at,validateState:Fe,validateIcon:ve,showTagList:$t,collapseTagList:Ze,debouncedOnInputChange:et,deleteTag:An,getLabel:c,getValue:u,getDisabled:d,getValueKey:rt,getIndex:St,handleClear:ii,handleClickOutside:ji,handleDel:Yn,handleEsc:lt,focus:ts,blur:Ur,handleMenuEnter:Ie,handleResize:jt,resetSelectionWidth:Di,updateTooltip:pe,updateTagTooltip:Qn,updateOptions:j,toggleMenu:Ft,scrollTo:tt,onInput:Ci,onKeyboardNavigate:di,onKeyboardSelect:mt,onSelect:gs,onHover:on,handleCompositionStart:H,handleCompositionEnd:q,handleCompositionUpdate:oe}},XSe=Be({name:"ElSelectV2",components:{ElSelectMenu:KSe,ElTag:ju,ElTooltip:Or,ElIcon:Ut},directives:{ClickOutside:Ch},props:TSe,emits:ASe,setup(t,{emit:e}){const n=F(()=>{const{modelValue:l,multiple:c}=t,u=c?[]:void 0;return pt(l)?c?l:u:c?u:l}),i=YSe(ni({...hr(t),modelValue:n}),e),{calculatorRef:s,inputStyle:r}=Vk(),o=jr();Xn(Xk,{props:ni({...hr(t),height:i.popupHeight,modelValue:n}),expanded:i.expanded,tooltipRef:i.tooltipRef,contentId:o,onSelect:i.onSelect,onHover:i.onHover,onKeyboardNavigate:i.onKeyboardNavigate,onKeyboardSelect:i.onKeyboardSelect});const a=F(()=>t.multiple?i.states.cachedOptions.map(l=>i.getLabel(l)):i.states.selectedLabel);return{...i,modelValue:n,selectedLabel:a,calculatorRef:s,inputStyle:r,contentId:o,BORDER_HORIZONTAL_WIDTH:rU}}}),ZSe=["id","autocomplete","tabindex","aria-expanded","aria-label","disabled","aria-controls","aria-activedescendant","readonly","name"],JSe=["textContent"],QSe={key:1};function eEe(t,e,n,i,s,r){const o=Zt("el-tag"),a=Zt("el-tooltip"),l=Zt("el-icon"),c=Zt("el-select-menu"),u=xA("click-outside");return _n((z(),se("div",{ref:"selectRef",class:J([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),onMouseenter:e[15]||(e[15]=d=>t.states.inputHovering=!0),onMouseleave:e[16]||(e[16]=d=>t.states.inputHovering=!1)},[de(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"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,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[14]||(e[14]=d=>t.states.isBeforeHide=!1)},{default:xe(()=>{var d,h;return[U("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:e[11]||(e[11]=un((...f)=>t.toggleMenu&&t.toggleMenu(...f),["prevent"]))},[t.$slots.prefix?(z(),se("div",{key:0,ref:"prefixRef",class:J(t.nsSelect.e("prefix"))},[Ue(t.$slots,"prefix")],2)):Le("v-if",!0),U("div",{ref:"selectionRef",class:J([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.modelValue.length)])},[t.multiple?Ue(t.$slots,"tag",{key:0,data:t.states.cachedOptions,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>[(z(!0),se(At,null,yn(t.showTagList,f=>(z(),se("div",{key:t.getValueKey(t.getValue(f)),class:J(t.nsSelect.e("selected-item"))},[de(o,{closable:!t.selectDisabled&&!t.getDisabled(f),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Ht(t.tagStyle),onClose:p=>t.deleteTag(p,f)},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))},[Ue(t.$slots,"label",{index:t.getIndex(f),label:t.getLabel(f),value:t.getValue(f)},()=>[cn(Xe(t.getLabel(f)),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.modelValue.length>t.maxCollapseTags?(z(),De(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom","popper-class":t.popperClass,"popper-style":t.popperStyle,teleported:t.teleported},{default:xe(()=>[U("div",{ref:"collapseItemRef",class:J(t.nsSelect.e("selected-item"))},[de(o,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,style:Ht(t.collapseTagStyle),"disable-transitions":""},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))}," + "+Xe(t.modelValue.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:xe(()=>[U("div",{ref:"tagMenuRef",class:J(t.nsSelect.e("selection"))},[(z(!0),se(At,null,yn(t.collapseTagList,f=>(z(),se("div",{key:t.getValueKey(t.getValue(f)),class:J(t.nsSelect.e("selected-item"))},[de(o,{class:"in-tooltip",closable:!t.selectDisabled&&!t.getDisabled(f),size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:p=>t.deleteTag(p,f)},{default:xe(()=>[U("span",{class:J(t.nsSelect.e("tags-text"))},[Ue(t.$slots,"label",{index:t.getIndex(f),label:t.getLabel(f),value:t.getValue(f)},()=>[cn(Xe(t.getLabel(f)),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","popper-class","popper-style","teleported"])):Le("v-if",!0)]):Le("v-if",!0),U("div",{class:J([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled)])},[_n(U("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":e[0]||(e[0]=f=>t.states.inputValue=f),style:Ht(t.inputStyle),autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-autocomplete":"none","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","aria-controls":t.contentId,"aria-activedescendant":t.states.hoveringIndex>=0?`${t.contentId}-${t.states.hoveringIndex}`:"",readonly:!t.filterable,spellcheck:"false",type:"text",name:t.name,onInput:e[1]||(e[1]=(...f)=>t.onInput&&t.onInput(...f)),onCompositionstart:e[2]||(e[2]=(...f)=>t.handleCompositionStart&&t.handleCompositionStart(...f)),onCompositionupdate:e[3]||(e[3]=(...f)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...f)),onCompositionend:e[4]||(e[4]=(...f)=>t.handleCompositionEnd&&t.handleCompositionEnd(...f)),onKeydown:[e[5]||(e[5]=_s(un(f=>t.onKeyboardNavigate("backward"),["stop","prevent"]),["up"])),e[6]||(e[6]=_s(un(f=>t.onKeyboardNavigate("forward"),["stop","prevent"]),["down"])),e[7]||(e[7]=_s(un((...f)=>t.onKeyboardSelect&&t.onKeyboardSelect(...f),["stop","prevent"]),["enter"])),e[8]||(e[8]=_s(un((...f)=>t.handleEsc&&t.handleEsc(...f),["stop","prevent"]),["esc"])),e[9]||(e[9]=_s(un((...f)=>t.handleDel&&t.handleDel(...f),["stop"]),["delete"]))],onClick:e[10]||(e[10]=un((...f)=>t.toggleMenu&&t.toggleMenu(...f),["stop"]))},null,46,ZSe),[[Mc,t.states.inputValue]]),t.filterable?(z(),se("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:J(t.nsSelect.e("input-calculator")),textContent:Xe(t.states.inputValue)},null,10,JSe)):Le("v-if",!0)],2),t.shouldShowPlaceholder?(z(),se("div",{key:1,class:J([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?Ue(t.$slots,"label",{key:0,index:(h=(d=t.allOptionsValueMap.get(t.modelValue))==null?void 0:d.index)!=null?h:-1,label:t.currentPlaceholder,value:t.modelValue},()=>[U("span",null,Xe(t.currentPlaceholder),1)]):(z(),se("span",QSe,Xe(t.currentPlaceholder),1))],2)):Le("v-if",!0)],2),U("div",{ref:"suffixRef",class:J(t.nsSelect.e("suffix"))},[t.iconComponent?_n((z(),De(l,{key:0,class:J([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.iconReverse])},{default:xe(()=>[(z(),De(Sn(t.iconComponent)))]),_:1},8,["class"])),[[ci,!t.showClearBtn]]):Le("v-if",!0),t.showClearBtn&&t.clearIcon?(z(),De(l,{key:1,class:J([t.nsSelect.e("caret"),t.nsInput.e("icon"),t.nsSelect.e("clear")]),onClick:un(t.handleClear,["prevent","stop"])},{default:xe(()=>[(z(),De(Sn(t.clearIcon)))]),_:1},8,["class","onClick"])):Le("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(z(),De(l,{key:2,class:J([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:xe(()=>[(z(),De(Sn(t.validateIcon)))]),_:1},8,["class"])):Le("v-if",!0)],2)],2)]}),content:xe(()=>[de(c,{id:t.contentId,ref:"menuRef",data:t.filteredOptions,width:t.popperSize-t.BORDER_HORIZONTAL_WIDTH,"hovering-index":t.states.hoveringIndex,"scrollbar-always-on":t.scrollbarAlwaysOn,"aria-label":t.ariaLabel},va({default:xe(d=>[Ue(t.$slots,"default",Wu(Gu(d)))]),_:2},[t.$slots.header?{name:"header",fn:xe(()=>[U("div",{class:J(t.nsSelect.be("dropdown","header")),onClick:e[12]||(e[12]=un(()=>{},["stop"]))},[Ue(t.$slots,"header")],2)]),key:"0"}:void 0,t.$slots.loading&&t.loading?{name:"loading",fn:xe(()=>[U("div",{class:J(t.nsSelect.be("dropdown","loading"))},[Ue(t.$slots,"loading")],2)]),key:"1"}:t.loading||t.filteredOptions.length===0?{name:"empty",fn:xe(()=>[U("div",{class:J(t.nsSelect.be("dropdown","empty"))},[Ue(t.$slots,"empty",{},()=>[U("span",null,Xe(t.emptyText),1)])],2)]),key:"2"}:void 0,t.$slots.footer?{name:"footer",fn:xe(()=>[U("div",{class:J(t.nsSelect.be("dropdown","footer")),onClick:e[13]||(e[13]=un(()=>{},["stop"]))},[Ue(t.$slots,"footer")],2)]),key:"3"}:void 0]),1032,["id","data","width","hovering-index","scrollbar-always-on","aria-label"])]),_:3},8,["visible","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","placement","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],34)),[[u,t.handleClickOutside,t.popperRef]])}var tEe=xt(XSe,[["render",eEe],["__file","/home/runner/work/element-plus/element-plus/packages/components/select-v2/src/select.vue"]]);const nEe=En(tEe),iEe=_t({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Re([Number,Object])}}),sEe=_t({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),rEe=Be({name:"ElSkeletonItem",__name:"skeleton-item",props:sEe,setup(t){const e=ht("skeleton");return(n,i)=>(z(),se("div",{class:J([v(e).e("item"),v(e).e(n.variant)])},[n.variant==="image"?(z(),De(v(lde),{key:0})):Le("v-if",!0)],2))}});var m2=xt(rEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton-item.vue"]]);const oEe=(t,e=0)=>{if(e===0)return t;const n=Mn(e)&&!!e.initVal,i=X(n);let s=null;const r=a=>{if(ri(a)){i.value=t.value;return}s&&clearTimeout(s),s=setTimeout(()=>{i.value=t.value},a)},o=a=>{a==="leading"?Xt(e)?r(e):r(e.leading):Mn(e)?r(e.trailing):i.value=!1};return mn(()=>o("leading")),We(()=>t.value,a=>{o(a?"leading":"trailing")}),i},aEe=Be({name:"ElSkeleton",__name:"skeleton",props:iEe,setup(t,{expose:e}){const n=t,i=ht("skeleton"),s=oEe(Ei(n,"loading"),n.throttle);return e({uiLoading:s}),(r,o)=>v(s)?(z(),se("div",Dn({key:0,class:[v(i).b(),v(i).is("animated",r.animated)]},r.$attrs),[(z(!0),se(At,null,yn(r.count,a=>(z(),se(At,{key:a},[v(s)?Ue(r.$slots,"template",{key:a},()=>[de(m2,{class:J(v(i).is("first")),variant:"p"},null,8,["class"]),(z(!0),se(At,null,yn(r.rows,l=>(z(),De(m2,{key:l,class:J([v(i).e("paragraph"),v(i).is("last",l===r.rows&&r.rows>1)]),variant:"p"},null,8,["class"]))),128))]):Le("v-if",!0)],64))),128))],16)):Ue(r.$slots,"default",Wu(Dn({key:1},r.$attrs)))}});var lEe=xt(aEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/skeleton/src/skeleton.vue"]]);const cEe=En(lEe,{SkeletonItem:m2}),uEe=Ss(m2),CU=Symbol("sliderContextKey"),dEe=_t({modelValue:{type:Re([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:or,inputSize:or,showStops:Boolean,showTooltip:{type:Boolean,default:!0},formatTooltip:{type:Re(Function),default:void 0},disabled:{type:Boolean,default:void 0},range:Boolean,vertical:Boolean,height:String,rangeStartLabel:{type:String,default:void 0},rangeEndLabel:{type:String,default:void 0},formatValueText:{type:Re(Function),default:void 0},tooltipClass:{type:String,default:void 0},placement:{type:String,values:gd,default:"top"},marks:{type:Re(Object)},validateEvent:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},...To(["ariaLabel"])}),dE=t=>Xt(t)||pt(t)&&t.every(Xt),hEe={[wn]:dE,[Qs]:dE,[Wn]:dE},fEe=_t({modelValue:{type:Number,default:0},vertical:Boolean,tooltipClass:String,placement:{type:String,values:gd,default:"top"}}),pEe={[wn]:t=>Xt(t)},mEe=(t,e,n)=>{const i=X(),s=X(!1),r=F(()=>e.value instanceof Function),o=F(()=>r.value&&e.value(t.modelValue)||t.modelValue),a=Wc(()=>{n.value&&(s.value=!0)},50),l=Wc(()=>{n.value&&(s.value=!1)},50);return{tooltip:i,tooltipVisible:s,formatValue:o,displayTooltip:a,hideTooltip:l}},gEe=(t,e,n)=>{const{disabled:i,min:s,max:r,step:o,showTooltip:a,persistent:l,precision:c,sliderSize:u,formatTooltip:d,emitChange:h,resetSize:f,updateDragging:p}=zt(CU),{tooltip:m,tooltipVisible:b,formatValue:g,displayTooltip:x,hideTooltip:S}=mEe(t,d,a),_=X(),E=F(()=>`${(t.modelValue-s.value)/(r.value-s.value)*100}%`),T=F(()=>t.vertical?{bottom:E.value}:{left:E.value}),A=()=>{e.hovering=!0,x()},I=()=>{e.hovering=!1,e.dragging||S()},P=ne=>{i.value||(ne.preventDefault(),K(ne),window.addEventListener("mousemove",W),window.addEventListener("touchmove",W),window.addEventListener("mouseup",Q),window.addEventListener("touchend",Q),window.addEventListener("contextmenu",Q),_.value.focus())},k=ne=>{i.value||(e.newPosition=Number.parseFloat(E.value)+ne/(r.value-s.value)*100,ie(e.newPosition),h())},B=()=>{k(-o.value)},R=()=>{k(o.value)},H=()=>{k(-o.value*4)},q=()=>{k(o.value*4)},oe=()=>{i.value||(ie(0),h())},Z=()=>{i.value||(ie(100),h())},V=ne=>{const ce=Oi(ne);let ae=!0;switch(ce){case gt.left:case gt.down:B();break;case gt.right:case gt.up:R();break;case gt.home:oe();break;case gt.end:Z();break;case gt.pageDown:H();break;case gt.pageUp:q();break;default:ae=!1;break}ae&&ne.preventDefault()},D=ne=>{let ce,ae;return ne.type.startsWith("touch")?(ae=ne.touches[0].clientY,ce=ne.touches[0].clientX):(ae=ne.clientY,ce=ne.clientX),{clientX:ce,clientY:ae}},K=ne=>{e.dragging=!0,e.isClick=!0;const{clientX:ce,clientY:ae}=D(ne);t.vertical?e.startY=ae:e.startX=ce,e.startPosition=Number.parseFloat(E.value),e.newPosition=e.startPosition},W=ne=>{if(e.dragging){e.isClick=!1,x(),f();let ce;const{clientX:ae,clientY:_e}=D(ne);t.vertical?(e.currentY=_e,ce=(e.startY-e.currentY)/u.value*100):(e.currentX=ae,ce=(e.currentX-e.startX)/u.value*100),e.newPosition=e.startPosition+ce,ie(e.newPosition)}},Q=()=>{e.dragging&&(setTimeout(()=>{e.dragging=!1,e.hovering||S(),e.isClick||ie(e.newPosition),h()},0),window.removeEventListener("mousemove",W),window.removeEventListener("touchmove",W),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),window.removeEventListener("contextmenu",Q))},ie=async ne=>{if(ne===null||Number.isNaN(+ne))return;ne=Ex(ne,0,100);const ce=Math.floor((r.value-s.value)/o.value),ae=ce*o.value/(r.value-s.value)*100,_e=ae+(100-ae)/2;let ke;if(nee.dragging,ne=>{p(ne)}),xi(_,"touchstart",P,{passive:!1}),{disabled:i,button:_,tooltip:m,tooltipVisible:b,showTooltip:a,persistent:l,wrapperStyle:T,formatValue:g,handleMouseEnter:A,handleMouseLeave:I,onButtonDown:P,onKeyDown:V,setPosition:ie}},vEe=["tabindex"],yEe=Be({name:"ElSliderButton",__name:"button",props:fEe,emits:pEe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("slider"),o=ni({hovering:!1,dragging:!1,isClick:!1,startX:0,currentX:0,startY:0,currentY:0,startPosition:0,newPosition:0,oldValue:i.modelValue}),a=F(()=>d.value?h.value:!1),{disabled:l,button:c,tooltip:u,showTooltip:d,persistent:h,tooltipVisible:f,wrapperStyle:p,formatValue:m,handleMouseEnter:b,handleMouseLeave:g,onButtonDown:x,onKeyDown:S,setPosition:_}=gEe(i,o,s),{hovering:E,dragging:T}=hr(o);return e({onButtonDown:x,onKeyDown:S,setPosition:_,hovering:E,dragging:T}),(A,I)=>(z(),se("div",{ref_key:"button",ref:c,class:J([v(r).e("button-wrapper"),{hover:v(E),dragging:v(T)}]),style:Ht(v(p)),tabindex:v(l)?void 0:0,onMouseenter:I[0]||(I[0]=(...P)=>v(b)&&v(b)(...P)),onMouseleave:I[1]||(I[1]=(...P)=>v(g)&&v(g)(...P)),onMousedown:I[2]||(I[2]=(...P)=>v(x)&&v(x)(...P)),onFocus:I[3]||(I[3]=(...P)=>v(b)&&v(b)(...P)),onBlur:I[4]||(I[4]=(...P)=>v(g)&&v(g)(...P)),onKeydown:I[5]||(I[5]=(...P)=>v(S)&&v(S)(...P))},[de(v(Or),{ref_key:"tooltip",ref:u,visible:v(f),placement:A.placement,"fallback-placements":["top","bottom","right","left"],"stop-popper-mouse-event":!1,"popper-class":A.tooltipClass,disabled:!v(d),persistent:a.value},{content:xe(()=>[U("span",null,Xe(v(m)),1)]),default:xe(()=>[U("div",{class:J([v(r).e("button"),{hover:v(E),dragging:v(T)}])},null,2)]),_:1},8,["visible","placement","popper-class","disabled","persistent"])],46,vEe))}});var O6=xt(yEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/button.vue"]]);const bEe=_t({mark:{type:Re([String,Object]),default:void 0}});var _Ee=Be({name:"ElSliderMarker",props:bEe,setup(t){const e=ht("slider"),n=F(()=>Gt(t.mark)?t.mark:t.mark.label),i=F(()=>Gt(t.mark)?void 0:t.mark.style);return()=>tn("div",{class:e.e("marks-text"),style:i.value},n.value)}});const wEe=(t,e,n)=>{const{formItem:i}=zr(),s=wi(),r=X(),o=X(),a={firstButton:r,secondButton:o},l=Es(),c=F(()=>Math.min(e.firstValue,e.secondValue)),u=F(()=>Math.max(e.firstValue,e.secondValue)),d=F(()=>t.range?`${100*(u.value-c.value)/(t.max-t.min)}%`:`${100*(e.firstValue-t.min)/(t.max-t.min)}%`),h=F(()=>t.range?`${100*(c.value-t.min)/(t.max-t.min)}%`:"0%"),f=F(()=>t.vertical?{height:t.height}:{}),p=F(()=>t.vertical?{height:d.value,bottom:h.value}:{width:d.value,left:h.value}),m=()=>{if(s.value){const B=s.value.getBoundingClientRect();e.sliderSize=B[t.vertical?"height":"width"]}},b=B=>{const R=t.min+B*(t.max-t.min)/100;if(!t.range)return r;let H;return Math.abs(c.value-R)e.secondValue?"firstButton":"secondButton",a[H]},g=B=>{const R=b(B);return R.value.setPosition(B),R},x=B=>{e.firstValue=B??t.min,_(t.range?[c.value,u.value]:B??t.min)},S=B=>{e.secondValue=B,t.range&&_([c.value,u.value])},_=B=>{n(wn,B),n(Qs,B)},E=async()=>{await Nt(),n(Wn,t.range?[c.value,u.value]:t.modelValue)},T=B=>{var R,H,q,oe,Z,V;if(l.value||e.dragging)return;m();let D=0;if(t.vertical){const K=(q=(H=(R=B.touches)==null?void 0:R.item(0))==null?void 0:H.clientY)!=null?q:B.clientY;D=(s.value.getBoundingClientRect().bottom-K)/e.sliderSize*100}else{const K=(V=(Z=(oe=B.touches)==null?void 0:oe.item(0))==null?void 0:Z.clientX)!=null?V:B.clientX,W=s.value.getBoundingClientRect().left;D=(K-W)/e.sliderSize*100}if(!(D<0||D>100))return g(D)};return{elFormItem:i,slider:s,firstButton:r,secondButton:o,sliderDisabled:l,minValue:c,maxValue:u,runwayStyle:f,barStyle:p,resetSize:m,setPosition:g,emitChange:E,onSliderWrapperPrevent:B=>{var R,H;((R=a.firstButton.value)!=null&&R.dragging||(H=a.secondButton.value)!=null&&H.dragging)&&B.preventDefault()},onSliderClick:B=>{T(B)&&E()},onSliderDown:async B=>{const R=T(B);R&&(await Nt(),R.value.onButtonDown(B))},onSliderMarkerDown:B=>{if(l.value||e.dragging)return;g(B)&&E()},setFirstValue:x,setSecondValue:S}},xEe=(t,e,n,i)=>({stops:F(()=>{if(!t.showStops||t.min>t.max)return[];if(t.step===0)return[];const o=Math.ceil((t.max-t.min)/t.step),a=100*t.step/(t.max-t.min),l=Array.from({length:o-1}).map((c,u)=>(u+1)*a);return t.range?l.filter(c=>c<100*(n.value-t.min)/(t.max-t.min)||c>100*(i.value-t.min)/(t.max-t.min)):l.filter(c=>c>100*(e.firstValue-t.min)/(t.max-t.min))}),getStopStyle:o=>t.vertical?{bottom:`${o}%`}:{left:`${o}%`}}),SEe=t=>F(()=>t.marks?Object.keys(t.marks).map(Number.parseFloat).sort((n,i)=>n-i).filter(n=>n<=t.max&&n>=t.min).map(n=>({point:n,position:(n-t.min)*100/(t.max-t.min),mark:t.marks[n]})):[]),EEe=(t,e,n,i,s,r)=>{const o=c=>{s(wn,c),s(Qs,c)},a=()=>t.range?![n.value,i.value].every((c,u)=>c===e.oldValue[u]):t.modelValue!==e.oldValue,l=()=>{var c,u;t.min>t.max&&Ks("Slider","min should not be greater than max.");const d=t.modelValue;t.range&&pt(d)?d[1]t.max?o([t.max,t.max]):d[0]t.max?o([d[0],t.max]):(e.firstValue=d[0],e.secondValue=d[1],a()&&(t.validateEvent&&((c=r?.validate)==null||c.call(r,"change").catch(h=>void 0)),e.oldValue=d.slice())):!t.range&&Xt(d)&&!Number.isNaN(d)&&(dt.max?o(t.max):(e.firstValue=d,a()&&(t.validateEvent&&((u=r?.validate)==null||u.call(r,"change").catch(h=>void 0)),e.oldValue=d)))};l(),We(()=>e.dragging,c=>{c||l()}),We(()=>t.modelValue,(c,u)=>{e.dragging||pt(c)&&pt(u)&&c.every((d,h)=>d===u[h])&&e.firstValue===c[0]&&e.secondValue===c[1]||l()},{deep:!0}),We(()=>[t.min,t.max],()=>{l()})},CEe=(t,e,n)=>{const i=X();return mn(async()=>{t.range?(pt(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]):(!Xt(t.modelValue)||Number.isNaN(t.modelValue)?e.firstValue=t.min:e.firstValue=Math.min(t.max,Math.max(t.min,t.modelValue)),e.oldValue=e.firstValue),xi(window,"resize",n),await Nt(),n()}),{sliderWrapper:i}},TEe=["id","role","aria-label","aria-labelledby"],MEe={key:1},AEe=Be({name:"ElSlider",__name:"slider",props:dEe,emits:hEe,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("slider"),{t:o}=Jn(),a=ni({firstValue:0,secondValue:0,oldValue:0,dragging:!1,sliderSize:1}),{elFormItem:l,slider:c,firstButton:u,secondButton:d,sliderDisabled:h,minValue:f,maxValue:p,runwayStyle:m,barStyle:b,resetSize:g,emitChange:x,onSliderWrapperPrevent:S,onSliderClick:_,onSliderDown:E,onSliderMarkerDown:T,setFirstValue:A,setSecondValue:I}=wEe(i,a,s),{stops:P,getStopStyle:k}=xEe(i,a,f,p),{inputId:B,isLabeledByFormItem:R}=Ba(i,{formItemContext:l}),H=er(),q=F(()=>i.inputSize||H.value),oe=F(()=>i.ariaLabel||o("el.slider.defaultLabel",{min:i.min,max:i.max})),Z=F(()=>i.range?i.rangeStartLabel||o("el.slider.defaultRangeStartLabel"):oe.value),V=F(()=>i.formatValueText?i.formatValueText(ce.value):`${ce.value}`),D=F(()=>i.rangeEndLabel||o("el.slider.defaultRangeEndLabel")),K=F(()=>i.formatValueText?i.formatValueText(ae.value):`${ae.value}`),W=F(()=>[r.b(),r.m(H.value),r.is("vertical",i.vertical),{[r.m("with-input")]:i.showInput}]),Q=SEe(i);EEe(i,a,f,p,s,l);const ie=F(()=>{const Te=[i.min,i.max,i.step].map(Ke=>{const Fe=`${Ke}`.split(".")[1];return Fe?Fe.length:0});return Math.max.apply(null,Te)}),{sliderWrapper:ne}=CEe(i,a,g),{firstValue:ce,secondValue:ae,sliderSize:_e}=hr(a),ke=Te=>{a.dragging=Te};return xi(ne,"touchstart",S,{passive:!1}),xi(ne,"touchmove",S,{passive:!1}),Xn(CU,{...hr(i),sliderSize:_e,disabled:h,precision:ie,emitChange:x,resetSize:g,updateDragging:ke}),e({onSliderClick:_}),(Te,Ke)=>{var Fe,ve;return z(),se("div",{id:Te.range?v(B):void 0,ref_key:"sliderWrapper",ref:ne,class:J(W.value),role:Te.range?"group":void 0,"aria-label":Te.range&&!v(R)?oe.value:void 0,"aria-labelledby":Te.range&&v(R)?(Fe=v(l))==null?void 0:Fe.labelId:void 0},[U("div",{ref_key:"slider",ref:c,class:J([v(r).e("runway"),{"show-input":Te.showInput&&!Te.range},v(r).is("disabled",v(h))]),style:Ht(v(m)),onMousedown:Ke[0]||(Ke[0]=(...fe)=>v(E)&&v(E)(...fe)),onTouchstartPassive:Ke[1]||(Ke[1]=(...fe)=>v(E)&&v(E)(...fe))},[U("div",{class:J(v(r).e("bar")),style:Ht(v(b))},null,6),de(O6,{id:Te.range?void 0:v(B),ref_key:"firstButton",ref:u,"model-value":v(ce),vertical:Te.vertical,"tooltip-class":Te.tooltipClass,placement:Te.placement,role:"slider","aria-label":Te.range||!v(R)?Z.value:void 0,"aria-labelledby":!Te.range&&v(R)?(ve=v(l))==null?void 0:ve.labelId:void 0,"aria-valuemin":Te.min,"aria-valuemax":Te.range?v(ae):Te.max,"aria-valuenow":v(ce),"aria-valuetext":V.value,"aria-orientation":Te.vertical?"vertical":"horizontal","aria-disabled":v(h),"onUpdate:modelValue":v(A)},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"]),Te.range?(z(),De(O6,{key:0,ref_key:"secondButton",ref:d,"model-value":v(ae),vertical:Te.vertical,"tooltip-class":Te.tooltipClass,placement:Te.placement,role:"slider","aria-label":D.value,"aria-valuemin":v(ce),"aria-valuemax":Te.max,"aria-valuenow":v(ae),"aria-valuetext":K.value,"aria-orientation":Te.vertical?"vertical":"horizontal","aria-disabled":v(h),"onUpdate:modelValue":v(I)},null,8,["model-value","vertical","tooltip-class","placement","aria-label","aria-valuemin","aria-valuemax","aria-valuenow","aria-valuetext","aria-orientation","aria-disabled","onUpdate:modelValue"])):Le("v-if",!0),Te.showStops?(z(),se("div",MEe,[(z(!0),se(At,null,yn(v(P),(fe,Me)=>(z(),se("div",{key:Me,class:J(v(r).e("stop")),style:Ht(v(k)(fe))},null,6))),128))])):Le("v-if",!0),v(Q).length>0?(z(),se(At,{key:2},[U("div",null,[(z(!0),se(At,null,yn(v(Q),(fe,Me)=>(z(),se("div",{key:Me,style:Ht(v(k)(fe.position)),class:J([v(r).e("stop"),v(r).e("marks-stop")])},null,6))),128))]),U("div",{class:J(v(r).e("marks"))},[(z(!0),se(At,null,yn(v(Q),(fe,Me)=>(z(),De(v(_Ee),{key:Me,mark:fe.mark,style:Ht(v(k)(fe.position)),onMousedown:un(ge=>v(T)(fe.position),["stop"])},null,8,["mark","style","onMousedown"]))),128))],2)],64)):Le("v-if",!0)],38),Te.showInput&&!Te.range?(z(),De(v(sU),{key:0,ref:"input","model-value":v(ce),class:J(v(r).e("input")),step:Te.step,disabled:v(h),controls:Te.showInputControls,min:Te.min,max:Te.max,precision:ie.value,size:q.value,"onUpdate:modelValue":v(A),onChange:v(x)},null,8,["model-value","class","step","disabled","controls","min","max","precision","size","onUpdate:modelValue","onChange"])):Le("v-if",!0)],10,TEe)}}});var kEe=xt(AEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/slider/src/slider.vue"]]);const PEe=En(kEe),LEe=_t({prefixCls:{type:String}}),D6=Be({name:"ElSpaceItem",props:LEe,setup(t,{slots:e}){const n=ht("space"),i=F(()=>`${t.prefixCls||n.b()}__item`);return()=>tn("div",{class:i.value},Ue(e,"default"))}}),N6={small:8,default:12,large:16};function IEe(t){const e=ht("space"),n=F(()=>[e.b(),e.m(t.direction),t.class]),i=X(0),s=X(0),r=F(()=>{const a=t.wrap||t.fill?{flexWrap:"wrap"}:{},l={alignItems:t.alignment},c={rowGap:`${s.value}px`,columnGap:`${i.value}px`};return[a,l,c,t.style]}),o=F(()=>t.fill?{flexGrow:1,minWidth:`${t.fillRatio}%`}:{});return jo(()=>{const{size:a="small",wrap:l,direction:c,fill:u}=t;if(pt(a)){const[d=0,h=0]=a;i.value=d,s.value=h}else{let d;Xt(a)?d=a:d=N6[a||"small"]||N6.small,(l||u)&&c==="horizontal"?i.value=s.value=d:c==="horizontal"?(i.value=d,s.value=0):(s.value=d,i.value=0)}}),{classes:n,containerStyle:r,itemStyle:o}}const REe=_t({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},class:{type:Re([String,Object,Array]),default:""},style:{type:Re([String,Array,Object]),default:""},alignment:{type:Re(String),default:"center"},prefixCls:{type:String},spacer:{type:Re([Object,String,Number,Array]),default:null,validator:t=>Yi(t)||Xt(t)||Gt(t)},wrap:Boolean,fill:Boolean,fillRatio:{type:Number,default:100},size:{type:[String,Array,Number],values:Qc,validator:t=>Xt(t)||pt(t)&&t.length===2&&t.every(Xt)}}),OEe=Be({name:"ElSpace",props:REe,setup(t,{slots:e}){const{classes:n,containerStyle:i,itemStyle:s}=IEe(t);function r(o,a="",l=[]){const{prefixCls:c}=t;return o.forEach((u,d)=>{OT(u)?pt(u.children)&&u.children.forEach((h,f)=>{OT(h)&&pt(h.children)?r(h.children,`${a+f}-`,l):Yi(h)&&h?.type===Hs?l.push(h):l.push(de(D6,{style:s.value,prefixCls:c,key:`nested-${a+f}`},{default:()=>[h]},Za.PROPS|Za.STYLE,["style","prefixCls"]))}):Yme(u)&&l.push(de(D6,{style:s.value,prefixCls:c,key:`LoopKey${a+d}`},{default:()=>[u]},Za.PROPS|Za.STYLE,["style","prefixCls"]))}),l}return()=>{var o;const{spacer:a,direction:l}=t,c=Ue(e,"default",{key:0},()=>[]);if(((o=c.children)!=null?o:[]).length===0)return null;if(pt(c.children)){let u=r(c.children);if(a){const d=u.length-1;u=u.reduce((h,f,p)=>{const m=[...h,f];return p!==d&&m.push(de("span",{style:[s.value,l==="vertical"?"width: 100%":null],key:p},[Yi(a)?a:cn(a,Za.TEXT)],Za.STYLE)),m},[])}return de("div",{class:n.value,style:i.value},u,Za.STYLE|Za.CLASS)}return c.children}}}),DEe=En(OEe),NEe=_t({decimalSeparator:{type:String,default:"."},groupSeparator:{type:String,default:","},precision:{type:Number,default:0},formatter:Function,value:{type:Re([Number,Object]),default:0},prefix:String,suffix:String,title:String,valueStyle:{type:Re([String,Object,Array])}}),BEe=Be({name:"ElStatistic",__name:"statistic",props:NEe,setup(t,{expose:e}){const n=t,i=ht("statistic"),s=F(()=>{const{value:r,formatter:o,precision:a,decimalSeparator:l,groupSeparator:c}=n;if(Kt(o))return o(r);if(!Xt(r)||Number.isNaN(r))return r;let[u,d=""]=String(r).split(".");return d=d.padEnd(a,"0").slice(0,a>0?a:0),u=u.replace(/\B(?=(\d{3})+(?!\d))/g,c),[u,d].join(d?l:"")});return e({displayValue:s}),(r,o)=>(z(),se("div",{class:J(v(i).b())},[r.$slots.title||r.title?(z(),se("div",{key:0,class:J(v(i).e("head"))},[Ue(r.$slots,"title",{},()=>[cn(Xe(r.title),1)])],2)):Le("v-if",!0),U("div",{class:J(v(i).e("content"))},[r.$slots.prefix||r.prefix?(z(),se("div",{key:0,class:J(v(i).e("prefix"))},[Ue(r.$slots,"prefix",{},()=>[U("span",null,Xe(r.prefix),1)])],2)):Le("v-if",!0),U("span",{class:J(v(i).e("number")),style:Ht(r.valueStyle)},Xe(s.value),7),r.$slots.suffix||r.suffix?(z(),se("div",{key:1,class:J(v(i).e("suffix"))},[Ue(r.$slots,"suffix",{},()=>[U("span",null,Xe(r.suffix),1)])],2)):Le("v-if",!0)],2)],2))}});var FEe=xt(BEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/statistic/src/statistic.vue"]]);const TU=En(FEe),zEe=_t({format:{type:String,default:"HH:mm:ss"},prefix:String,suffix:String,title:String,value:{type:Re([Number,Object]),default:0},valueStyle:{type:Re([String,Object,Array])}}),UEe={finish:()=>!0,[Wn]:t=>Xt(t)},$Ee=[["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]],B6=t=>Xt(t)?new Date(t).getTime():t.valueOf(),F6=(t,e)=>{let n=t;const i=/\[([^\]]*)]/g;return $Ee.reduce((r,[o,a])=>{const l=new RegExp(`${o}+(?![^\\[\\]]*\\])`,"g");if(l.test(r)){const c=Math.floor(n/a);return n-=c*a,r.replace(l,u=>String(c).padStart(u.length,"0"))}return r},e).replace(i,"$1")},VEe=Be({name:"ElCountdown",__name:"countdown",props:zEe,emits:UEe,setup(t,{expose:e,emit:n}){const i=t,s=n;let r;const o=X(0),a=F(()=>F6(o.value,i.format)),l=d=>F6(d,i.format),c=()=>{r&&(nd(r),r=void 0)},u=()=>{const d=B6(i.value),h=()=>{let f=d-Date.now();s(Wn,f),f<=0?(f=0,c(),s("finish")):r=Gc(h),o.value=f};r=Gc(h)};return mn(()=>{o.value=B6(i.value)-Date.now(),We(()=>[i.value,i.format],()=>{c(),u()},{immediate:!0})}),gi(()=>{c()}),e({displayValue:a}),(d,h)=>(z(),De(v(TU),{value:o.value,title:d.title,prefix:d.prefix,suffix:d.suffix,"value-style":d.valueStyle,formatter:l},va({_:2},[yn(d.$slots,(f,p)=>({name:p,fn:xe(()=>[Ue(d.$slots,p)])}))]),1032,["value","title","prefix","suffix","value-style"]))}});var HEe=xt(VEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/countdown/src/countdown.vue"]]);const WEe=En(HEe),GEe=_t({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"}}),jEe={[Wn]:(t,e)=>[t,e].every(Xt)},MU="ElSteps",KEe=Be({name:"ElSteps",__name:"steps",props:GEe,emits:jEe,setup(t,{emit:e}){const n=t,i=e,s=ht("steps"),{children:r,addChild:o,removeChild:a,ChildrenSorter:l}=Ox(xn(),"ElStep");return We(r,()=>{r.value.forEach((c,u)=>{c.setIndex(u)})}),Xn(MU,{props:n,steps:r,addStep:o,removeStep:a}),We(()=>n.active,(c,u)=>{i(Wn,c,u)}),(c,u)=>(z(),se("div",{class:J([v(s).b(),v(s).m(c.simple?"simple":c.direction)])},[Ue(c.$slots,"default"),de(v(l))],2))}});var qEe=xt(KEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/steps.vue"]]);const YEe=_t({title:{type:String,default:""},icon:{type:Ai},description:{type:String,default:""},status:{type:String,values:["","wait","process","finish","error","success"],default:""}}),XEe=Be({name:"ElStep",__name:"item",props:YEe,setup(t){const e=t,n=ht("step"),i=X(-1),s=X({}),r=X(""),o=zt(MU),a=xn();let l=0,c=0;mn(()=>{We([()=>o.props.active,()=>o.props.processStatus,()=>o.props.finishStatus],([I],[P])=>{c=P||0,l=I-c,T(I)},{immediate:!0})});const u=F(()=>e.status||r.value),d=F(()=>{const I=o.steps.value[i.value-1];return I?I.internalStatus.value:"wait"}),h=F(()=>o.props.alignCenter),f=F(()=>o.props.direction==="vertical"),p=F(()=>o.props.simple),m=F(()=>o.steps.value.length),b=F(()=>{var I;return((I=o.steps.value[m.value-1])==null?void 0:I.uid)===a.uid}),g=F(()=>p.value?"":o.props.space),x=F(()=>[n.b(),n.is(p.value?"simple":o.props.direction),n.is("flex",b.value&&!g.value&&!h.value),n.is("center",h.value&&!f.value&&!p.value)]),S=F(()=>{const I={flexBasis:Xt(g.value)?`${g.value}px`:g.value?g.value:`${100/(m.value-(h.value?0:1))}%`};return f.value||b.value&&(I.maxWidth=`${100/m.value}%`),I}),_=I=>{i.value=I},E=I=>{const P=I==="wait",B={transitionDelay:`${Math.abs(l)===1?0:l>0?(i.value+1-c)*150:-(i.value+1-o.props.active)*150}ms`},R=I===o.props.processStatus||P?0:100;B.borderWidth=R&&!p.value?"1px":0,B[o.props.direction==="vertical"?"height":"width"]=`${R}%`,s.value=B},T=I=>{I>i.value?r.value=o.props.finishStatus:I===i.value&&d.value!=="error"?r.value=o.props.processStatus:r.value="wait";const P=o.steps.value[i.value-1];P&&P.calcProgress(r.value)},A={uid:a.uid,getVnode:()=>a.vnode,currentStatus:u,internalStatus:r,setIndex:_,calcProgress:E};return o.addStep(A),gi(()=>{o.removeStep(A)}),(I,P)=>(z(),se("div",{style:Ht(S.value),class:J(x.value)},[Le(" icon & line "),U("div",{class:J([v(n).e("head"),v(n).is(u.value)])},[p.value?Le("v-if",!0):(z(),se("div",{key:0,class:J(v(n).e("line"))},[U("i",{class:J(v(n).e("line-inner")),style:Ht(s.value)},null,6)],2)),U("div",{class:J([v(n).e("icon"),v(n).is(I.icon||I.$slots.icon?"icon":"text")])},[Ue(I.$slots,"icon",{},()=>[I.icon?(z(),De(v(Ut),{key:0,class:J(v(n).e("icon-inner"))},{default:xe(()=>[(z(),De(Sn(I.icon)))]),_:1},8,["class"])):u.value==="success"?(z(),De(v(Ut),{key:1,class:J([v(n).e("icon-inner"),v(n).is("status")])},{default:xe(()=>[de(v(Yy))]),_:1},8,["class"])):u.value==="error"?(z(),De(v(Ut),{key:2,class:J([v(n).e("icon-inner"),v(n).is("status")])},{default:xe(()=>[de(v(ul))]),_:1},8,["class"])):p.value?Le("v-if",!0):(z(),se("div",{key:3,class:J(v(n).e("icon-inner"))},Xe(i.value+1),3))])],2)],2),Le(" title & description "),U("div",{class:J(v(n).e("main"))},[U("div",{class:J([v(n).e("title"),v(n).is(u.value)])},[Ue(I.$slots,"title",{},()=>[cn(Xe(I.title),1)])],2),p.value?(z(),se("div",{key:0,class:J(v(n).e("arrow"))},null,2)):(z(),se("div",{key:1,class:J([v(n).e("description"),v(n).is(u.value)])},[Ue(I.$slots,"description",{},()=>[cn(Xe(I.description),1)])],2))],2)],6))}});var AU=xt(XEe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/steps/src/item.vue"]]);const ZEe=En(qEe,{Step:AU}),JEe=Ss(AU),kU=t=>["",...Qc].includes(t),QEe=_t({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:kU},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:Ai},activeActionIcon:{type:Ai},activeIcon:{type:Ai},inactiveIcon:{type:Ai},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:Re(Function)},id:String,tabindex:{type:[String,Number]},...To(["ariaLabel"])}),eCe={[wn]:t=>Mi(t)||Gt(t)||Xt(t),[Wn]:t=>Mi(t)||Gt(t)||Xt(t),[Qs]:t=>Mi(t)||Gt(t)||Xt(t)},tCe=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],nCe=["aria-hidden"],iCe={key:1},sCe={key:1},rCe=["aria-hidden"],z6="ElSwitch",oCe=Be({name:z6,__name:"switch",props:QEe,emits:eCe,setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:r}=zr(),o=er(),a=ht("switch"),{inputId:l}=Ba(i,{formItemContext:r}),c=Es(F(()=>{if(i.loading)return!0})),u=X(i.modelValue!==!1),d=wi(),h=F(()=>[a.b(),a.m(o.value),a.is("disabled",c.value),a.is("checked",g.value)]),f=F(()=>[a.e("label"),a.em("label","left"),a.is("active",!g.value)]),p=F(()=>[a.e("label"),a.em("label","right"),a.is("active",g.value)]),m=F(()=>({width:xs(i.width)}));We(()=>i.modelValue,()=>{u.value=!0});const b=F(()=>u.value?i.modelValue:!1),g=F(()=>b.value===i.activeValue);[i.activeValue,i.inactiveValue].includes(b.value)||(s(wn,i.inactiveValue),s(Wn,i.inactiveValue),s(Qs,i.inactiveValue)),We(g,E=>{var T;d.value.checked=E,i.validateEvent&&((T=r?.validate)==null||T.call(r,"change").catch(A=>void 0))});const x=()=>{const E=g.value?i.inactiveValue:i.activeValue;s(wn,E),s(Wn,E),s(Qs,E),Nt(()=>{d.value.checked=g.value})},S=()=>{if(c.value)return;const{beforeChange:E}=i;if(!E){x();return}const T=E();[Vf(T),Mi(T)].includes(!0)||Ks(z6,"beforeChange must return type `Promise` or `boolean`"),Vf(T)?T.then(I=>{I&&x()}).catch(I=>{}):T&&x()},_=()=>{var E,T;(T=(E=d.value)==null?void 0:E.focus)==null||T.call(E)};return mn(()=>{d.value.checked=g.value}),e({focus:_,checked:g}),(E,T)=>(z(),se("div",{class:J(h.value),onClick:un(S,["prevent"])},[U("input",{id:v(l),ref_key:"input",ref:d,class:J(v(a).e("input")),type:"checkbox",role:"switch","aria-checked":g.value,"aria-disabled":v(c),"aria-label":E.ariaLabel,name:E.name,"true-value":E.activeValue,"false-value":E.inactiveValue,disabled:v(c),tabindex:E.tabindex,onChange:x,onKeydown:_s(S,["enter"])},null,42,tCe),!E.inlinePrompt&&(E.inactiveIcon||E.inactiveText||E.$slots.inactive)?(z(),se("span",{key:0,class:J(f.value)},[Ue(E.$slots,"inactive",{},()=>[E.inactiveIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.inactiveIcon)))]),_:1})):Le("v-if",!0),!E.inactiveIcon&&E.inactiveText?(z(),se("span",{key:1,"aria-hidden":g.value},Xe(E.inactiveText),9,nCe)):Le("v-if",!0)])],2)):Le("v-if",!0),U("span",{class:J(v(a).e("core")),style:Ht(m.value)},[E.inlinePrompt?(z(),se("div",{key:0,class:J(v(a).e("inner"))},[g.value?(z(),se("div",{key:1,class:J(v(a).e("inner-wrapper"))},[Ue(E.$slots,"active",{},()=>[E.activeIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.activeIcon)))]),_:1})):Le("v-if",!0),!E.activeIcon&&E.activeText?(z(),se("span",sCe,Xe(E.activeText),1)):Le("v-if",!0)])],2)):(z(),se("div",{key:0,class:J(v(a).e("inner-wrapper"))},[Ue(E.$slots,"inactive",{},()=>[E.inactiveIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.inactiveIcon)))]),_:1})):Le("v-if",!0),!E.inactiveIcon&&E.inactiveText?(z(),se("span",iCe,Xe(E.inactiveText),1)):Le("v-if",!0)])],2))],2)):Le("v-if",!0),U("div",{class:J(v(a).e("action"))},[E.loading?(z(),De(v(Ut),{key:0,class:J(v(a).is("loading"))},{default:xe(()=>[de(v(jc))]),_:1},8,["class"])):g.value?Ue(E.$slots,"active-action",{key:1},()=>[E.activeActionIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.activeActionIcon)))]),_:1})):Le("v-if",!0)]):g.value?Le("v-if",!0):Ue(E.$slots,"inactive-action",{key:2},()=>[E.inactiveActionIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.inactiveActionIcon)))]),_:1})):Le("v-if",!0)])],2)],6),!E.inlinePrompt&&(E.activeIcon||E.activeText||E.$slots.active)?(z(),se("span",{key:1,class:J(p.value)},[Ue(E.$slots,"active",{},()=>[E.activeIcon?(z(),De(v(Ut),{key:0},{default:xe(()=>[(z(),De(Sn(E.activeIcon)))]),_:1})):Le("v-if",!0),!E.activeIcon&&E.activeText?(z(),se("span",{key:1,"aria-hidden":!g.value},Xe(E.activeText),9,rCe)):Le("v-if",!0)])],2)):Le("v-if",!0)],2))}});var aCe=xt(oCe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/switch/src/switch.vue"]]);const lCe=En(aCe),hE=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},cCe=function(t,e,n,i,s){if(!e&&!i&&(!s||pt(s)&&!s.length))return t;Gt(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const r=i?null:function(a,l){return s?P9(Pr(s),c=>Gt(c)?js(a,c):c(a,l,t)):(e!=="$key"&&Mn(a)&&"$value"in a&&(a=a.$value),[Mn(a)?e?js(a,e):null:a])},o=function(a,l){var c,u,d,h,f,p;if(i)return i(a.value,l.value);for(let m=0,b=(u=(c=a.key)==null?void 0:c.length)!=null?u:0;m((p=l.key)==null?void 0:p[m]))return 1}return 0};return t.map((a,l)=>({value:a,index:l,key:r?r(a,l):null})).sort((a,l)=>{let c=o(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},PU=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},uCe=function(t,e){let n=null;for(let i=0;i{if(!t)throw new Error("Row is required when get row identity");if(Gt(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let i=t;for(const s of n)i=i[s];return`${i}`}else if(Kt(e))return e.call(null,t);return""},Hm=function(t,e,n=!1,i="children"){const s=t||[],r={};return s.forEach((o,a)=>{if(r[Xr(o,e)]={row:o,index:a},n){const l=o[i];pt(l)&&Object.assign(r,Hm(l,e,!0,i))}}),r};function dCe(t,e){const n={};let i;for(i in t)n[i]=t[i];for(i in e)if(fi(e,i)){const s=e[i];ri(s)||(n[i]=s)}return n}function e4(t){return t===""||ri(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function LU(t){return t===""||ri(t)||(t=e4(t),Number.isNaN(t)&&(t=80)),t}function hCe(t){return Xt(t)?t:Gt(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function fCe(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function g2(t,e,n,i,s,r,o){let a=r??0,l=!1;const u=(()=>{if(!o)return t.indexOf(e);const m=Xr(e,o);return t.findIndex(b=>Xr(b,o)===m)})(),d=u!==-1,h=s?.call(null,e,a),f=m=>{m==="add"?t.push(e):t.splice(u,1),l=!0},p=m=>{let b=0;const g=i?.children&&m[i.children];return g&&pt(g)&&(b+=g.length,g.forEach(x=>{b+=p(x)})),b};return(!s||h)&&(Mi(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!i?.checkStrictly&&i?.children&&pt(e[i.children])&&e[i.children].forEach(m=>{const b=g2(t,m,n??!d,i,s,a+1,o);a+=p(m)+1,b&&(l=b)}),l}function pCe(t,e,n="children",i="hasChildren",s=!1){const r=a=>!(pt(a)&&a.length);function o(a,l,c){e(a,l,c),l.forEach(u=>{if(u[i]&&s){e(u,null,c+1);return}const d=u[n];r(d)||o(u,d,c+1)})}t.forEach(a=>{if(a[i]&&s){e(a,null,0);return}const l=a[n];r(l)||o(a,l,0)})}const mCe=(t,e,n,i)=>{const s={strategy:"fixed",...t.popperOptions},r=Kt(i?.tooltipFormatter)?i.tooltipFormatter({row:n,column:i,cellValue:f0(n,i.property).value}):void 0;return Yi(r)?{slotContent:r,content:null,...t,popperOptions:s}:{slotContent:null,content:r??e,...t,popperOptions:s}};let ho=null;function gCe(t,e,n,i,s,r){var o;const a=mCe(t,e,n,i),l={...a,slotContent:void 0};if(ho?.trigger===s){const p=(o=ho.vm)==null?void 0:o.component;L9(p?.props,l),p&&a.slotContent&&(p.slots.content=()=>[a.slotContent]);return}ho?.();const c=r?.refs.tableWrapper,u=c?.dataset.prefix,d=de(Or,{virtualTriggering:!0,virtualRef:s,appendTo:c,placement:"top",transition:"none",offset:0,hideAfter:0,...l},a.slotContent?{content:()=>a.slotContent}:void 0);d.appContext={...r.appContext,...r};const h=document.createElement("div");wh(d,h),d.component.exposed.onOpen();const f=c?.querySelector(`.${u}-scrollbar__wrap`);ho=()=>{var p,m;(m=(p=d.component)==null?void 0:p.exposed)!=null&&m.onClose&&d.component.exposed.onClose(),wh(null,h);const b=ho;f?.removeEventListener("scroll",b),b.trigger=void 0,b.vm=void 0,ho=null},ho.trigger=s??void 0,ho.vm=d,f?.addEventListener("scroll",ho)}function IU(t){return t.children?P9(t.children,IU):[t]}function $6(t,e){return t+e.colSpan}const RU=(t,e,n,i)=>{let s=0,r=t;const o=n.states.columns.value;if(i){const l=IU(i[t]);s=o.slice(0,o.indexOf(l[0])).reduce($6,0),r=s+l.reduce($6,0)-1}else s=t;let a;switch(e){case"left":r=o.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:r=o.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:s,after:r}:{}},t4=(t,e,n,i,s,r=0)=>{const o=[],{direction:a,start:l,after:c}=RU(e,n,i,s);if(a){const u=a==="left";o.push(`${t}-fixed-column--${a}`),u&&c+r===i.states.fixedLeafColumnsLength.value-1?o.push("is-last-column"):!u&&l-r===i.states.columns.value.length-i.states.rightFixedLeafColumnsLength.value&&o.push("is-first-column")}return o};function V6(t,e){return t+($y(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const n4=(t,e,n,i)=>{const{direction:s,start:r=0,after:o=0}=RU(t,e,n,i);if(!s)return;const a={},l=s==="left",c=n.states.columns.value;return l?a.left=c.slice(0,r).reduce(V6,0):a.right=c.slice(o+1).reverse().reduce(V6,0),a},vg=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function OU(t){return t.some(e=>Yi(e)?!(e.type===Hs||e.type===At&&!OU(e.children)):!0)?t:null}function vCe(t){const e=xn(),n=X(!1),i=X([]);return{updateExpandRows:()=>{const l=t.data.value||[],c=t.rowKey.value;if(n.value)i.value=l.slice();else if(c){const u=Hm(i.value,c);i.value=l.reduce((d,h)=>{const f=Xr(h,c);return u[f]&&d.push(h),d},[])}else i.value=[]},toggleRowExpansion:(l,c)=>{g2(i.value,l,c,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",l,i.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const c=t.data.value||[],u=t.rowKey.value,d=Hm(c,u);i.value=l.reduce((h,f)=>{const p=d[f];return p&&h.push(p.row),h},[])},isRowExpanded:l=>{const c=t.rowKey.value;return c?!!Hm(i.value,c)[Xr(l,c)]:i.value.includes(l)},states:{expandRows:i,defaultExpandAll:n}}}function yCe(t){const e=xn(),n=X(null),i=X(null),s=c=>{e.store.assertRowKey(),n.value=c,o(c)},r=()=>{n.value=null},o=c=>{var u;const{data:d,rowKey:h}=t;let f=null;h.value&&(f=(u=(v(d)||[]).find(p=>Xr(p,h.value)===c))!=null?u:null),i.value=f??null,e.emit("current-change",i.value,null)};return{setCurrentRowKey:s,restoreCurrentRowKey:r,setCurrentRowByKey:o,updateCurrentRow:c=>{const u=i.value;if(c&&c!==u){i.value=c,e.emit("current-change",i.value,u);return}!c&&u&&(i.value=null,e.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=t.rowKey.value,u=t.data.value||[],d=i.value;if(d&&!u.includes(d)){if(c){const h=Xr(d,c);o(h)}else i.value=null;$y(i.value)&&e.emit("current-change",null,d)}else n.value&&(o(n.value),r())},states:{_currentRowKey:n,currentRow:i}}}function bCe(t){const e=X([]),n=X({}),i=X(16),s=X(!1),r=X({}),o=X("hasChildren"),a=X("children"),l=X(!1),c=xn(),u=F(()=>{if(!t.rowKey.value)return{};const _=t.data.value||[];return h(_)}),d=F(()=>{const _=t.rowKey.value,E=Object.keys(r.value),T={};return E.length&&E.forEach(A=>{if(r.value[A].length){const I={children:[]};r.value[A].forEach(P=>{const k=Xr(P,_);I.children.push(k),P[o.value]&&!T[k]&&(T[k]={children:[]})}),T[A]=I}}),T}),h=_=>{const E=t.rowKey.value,T={};return pCe(_,(A,I,P)=>{const k=Xr(A,E);pt(I)?T[k]={children:I.map(B=>Xr(B,E)),level:P}:s.value&&(T[k]={children:[],lazy:!0,level:P})},a.value,o.value,s.value),T},f=(_=!1,E)=>{var T,A;E||(E=(T=c.store)==null?void 0:T.states.defaultExpandAll.value);const I=u.value,P=d.value,k=Object.keys(I),B={};if(k.length){const R=v(n),H=[],q=(Z,V)=>{if(_)return e.value?E||e.value.includes(V):!!(E||Z?.expanded);{const D=E||e.value&&e.value.includes(V);return!!(Z?.expanded||D)}};k.forEach(Z=>{const V=R[Z],D={...I[Z]};if(D.expanded=q(V,Z),D.lazy){const{loaded:K=!1,loading:W=!1}=V||{};D.loaded=!!K,D.loading=!!W,H.push(Z)}B[Z]=D});const oe=Object.keys(P);s.value&&oe.length&&H.length&&oe.forEach(Z=>{var V;const D=R[Z],K=P[Z].children;if(H.includes(Z)){if(((V=B[Z].children)==null?void 0:V.length)!==0)throw new Error("[ElTable]children must be an empty array.");B[Z].children=K}else{const{loaded:W=!1,loading:Q=!1}=D||{};B[Z]={lazy:!0,loaded:!!W,loading:!!Q,expanded:q(D,Z),children:K,level:void 0}}})}n.value=B,(A=c.store)==null||A.updateTableScrollY()};We(()=>e.value,()=>{f(!0)}),We(()=>u.value,()=>{f()}),We(()=>d.value,()=>{f()});const p=_=>{e.value=_,f()},m=_=>s.value&&_&&"loaded"in _&&!_.loaded,b=(_,E)=>{c.store.assertRowKey();const T=t.rowKey.value,A=Xr(_,T),I=A&&n.value[A];if(A&&I&&"expanded"in I){const P=I.expanded;E=ri(E)?!I.expanded:E,n.value[A].expanded=E,P!==E&&c.emit("expand-change",_,E),E&&m(I)&&x(_,A,I),c.store.updateTableScrollY()}},g=_=>{c.store.assertRowKey();const E=t.rowKey.value,T=Xr(_,E),A=n.value[T];m(A)?x(_,T,A):b(_,void 0)},x=(_,E,T)=>{const{load:A}=c.props;A&&!n.value[E].loaded&&(n.value[E].loading=!0,A(_,T,I=>{if(!pt(I))throw new TypeError("[ElTable] data must be an array");n.value[E].loading=!1,n.value[E].loaded=!0,n.value[E].expanded=!0,I.length&&(r.value[E]=I),c.emit("expand-change",_,!0)}))};return{loadData:x,loadOrToggle:g,toggleTreeExpansion:b,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:(_,E)=>{const{lazy:T,rowKey:A}=c.props;if(T){if(!A)throw new Error("[Table] rowKey is required in updateKeyChild");r.value[_]&&(r.value[_]=E)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:i,lazy:s,lazyTreeNodeMap:r,lazyColumnIdentifier:o,childrenColumnName:a,checkStrictly:l}}}const _Ce=(t,e)=>{const n=e.sortingColumn;return!n||Gt(n.sortable)?t:cCe(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},nw=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,nw(n.children)):e.push(n)}),e};function wCe(){var t;const e=xn(),{size:n}=hr((t=e.proxy)==null?void 0:t.$props),i=X(null),s=X([]),r=X([]),o=X(!1),a=X([]),l=X([]),c=X([]),u=X([]),d=X([]),h=X([]),f=X([]),p=X([]),m=[],b=X(0),g=X(0),x=X(0),S=X(!1),_=X([]),E=X(!1),T=X(!1),A=X(null),I=X({}),P=X(null),k=X(null),B=X(null),R=X(null),H=X(null),q=F(()=>i.value?Hm(_.value,i.value):void 0);We(s,()=>{var at;e.state&&(D(!1),e.props.tableLayout==="auto"&&((at=e.refs.tableHeaderRef)==null||at.updateFixedColumnStyle()))},{deep:!0});const oe=()=>{if(!i.value)throw new Error("[ElTable] prop row-key is required")},Z=at=>{var Mt;(Mt=at.children)==null||Mt.forEach(Bt=>{Bt.fixed=at.fixed,Z(Bt)})},V=()=>{a.value.forEach(qe=>{Z(qe)}),u.value=a.value.filter(qe=>[!0,"left"].includes(qe.fixed));const at=a.value.find(qe=>qe.type==="selection");let Mt;at&&at.fixed!=="right"&&!u.value.includes(at)&&a.value.indexOf(at)===0&&u.value.length&&(u.value.unshift(at),Mt=!0),d.value=a.value.filter(qe=>qe.fixed==="right");const Bt=a.value.filter(qe=>(Mt?qe.type!=="selection":!0)&&!qe.fixed);l.value=Array.from(u.value).concat(Bt).concat(d.value);const $t=nw(Bt),Ze=nw(u.value),vt=nw(d.value);b.value=$t.length,g.value=Ze.length,x.value=vt.length,c.value=Array.from(Ze).concat($t).concat(vt),o.value=u.value.length>0||d.value.length>0},D=(at,Mt=!1)=>{at&&V(),Mt?e.state.doLayout():e.state.debouncedUpdateLayout()},K=at=>q.value?!!q.value[Xr(at,i.value)]:_.value.includes(at),W=()=>{S.value=!1;const at=_.value;_.value=[],at.length&&e.emit("selection-change",[])},Q=()=>{var at,Mt;let Bt;if(i.value){Bt=[];const $t=(Mt=(at=e?.store)==null?void 0:at.states)==null?void 0:Mt.childrenColumnName.value,Ze=Hm(s.value,i.value,!0,$t);for(const vt in q.value)fi(q.value,vt)&&!Ze[vt]&&Bt.push(q.value[vt].row)}else Bt=_.value.filter($t=>!s.value.includes($t));if(Bt.length){const $t=_.value.filter(Ze=>!Bt.includes(Ze));_.value=$t,e.emit("selection-change",$t.slice())}},ie=()=>(_.value||[]).slice(),ne=(at,Mt,Bt=!0,$t=!1)=>{var Ze,vt,qe,kt;const Je={children:(vt=(Ze=e?.store)==null?void 0:Ze.states)==null?void 0:vt.childrenColumnName.value,checkStrictly:(kt=(qe=e?.store)==null?void 0:qe.states)==null?void 0:kt.checkStrictly.value};if(g2(_.value,at,Mt,Je,$t?void 0:A.value,s.value.indexOf(at),i.value)){const Ne=(_.value||[]).slice();Bt&&e.emit("select",Ne,at),e.emit("selection-change",Ne)}},ce=()=>{var at,Mt;const Bt=T.value?!S.value:!(S.value||_.value.length);S.value=Bt;let $t=!1,Ze=0;const vt=(Mt=(at=e?.store)==null?void 0:at.states)==null?void 0:Mt.rowKey.value,{childrenColumnName:qe}=e.store.states,kt={children:qe.value,checkStrictly:!1};s.value.forEach((Je,Ft)=>{const Ne=Ft+Ze;g2(_.value,Je,Bt,kt,A.value,Ne,vt)&&($t=!0),Ze+=_e(Xr(Je,vt))}),$t&&e.emit("selection-change",_.value?_.value.slice():[]),e.emit("select-all",(_.value||[]).slice())},ae=()=>{var at;if(((at=s.value)==null?void 0:at.length)===0){S.value=!1;return}const{childrenColumnName:Mt}=e.store.states;let Bt=0,$t=0;const Ze=qe=>{var kt;for(const Je of qe){const Ft=A.value&&A.value.call(null,Je,Bt);if(K(Je))$t++;else if(!A.value||Ft)return!1;if(Bt++,(kt=Je[Mt.value])!=null&&kt.length&&!Ze(Je[Mt.value]))return!1}return!0},vt=Ze(s.value||[]);S.value=$t===0?!1:vt},_e=at=>{var Mt;if(!e||!e.store)return 0;const{treeData:Bt}=e.store.states;let $t=0;const Ze=(Mt=Bt.value[at])==null?void 0:Mt.children;return Ze&&($t+=Ze.length,Ze.forEach(vt=>{$t+=_e(vt)})),$t},ke=(at,Mt)=>{const Bt={};return Pr(at).forEach($t=>{I.value[$t.id]=Mt,Bt[$t.columnKey||$t.id]=Mt}),Bt},Te=(at,Mt,Bt)=>{k.value&&k.value!==at&&(k.value.order=null),k.value=at,B.value=Mt,R.value=Bt},Ke=()=>{let at=v(r);Object.keys(I.value).forEach(Mt=>{const Bt=I.value[Mt];if(!Bt||Bt.length===0)return;const $t=PU({columns:c.value},Mt);$t&&$t.filterMethod&&(at=at.filter(Ze=>Bt.some(vt=>$t.filterMethod.call(null,vt,Ze,$t))))}),P.value=at},Fe=()=>{var at;s.value=_Ce((at=P.value)!=null?at:[],{sortingColumn:k.value,sortProp:B.value,sortOrder:R.value})},ve=(at=void 0)=>{at?.filter||Ke(),Fe()},fe=at=>{const{tableHeaderRef:Mt}=e.refs;if(!Mt)return;const Bt=Object.assign({},Mt.filterPanels),$t=Object.keys(Bt);if($t.length)if(Gt(at)&&(at=[at]),pt(at)){const Ze=at.map(vt=>uCe({columns:c.value},vt));$t.forEach(vt=>{const qe=Ze.find(kt=>kt.id===vt);qe&&(qe.filteredValue=[])}),e.store.commit("filterChange",{column:Ze,values:[],silent:!0,multi:!0})}else $t.forEach(Ze=>{const vt=c.value.find(qe=>qe.id===Ze);vt&&(vt.filteredValue=[])}),I.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},Me=()=>{k.value&&(Te(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ge,toggleRowExpansion:Qe,updateExpandRows:G,states:ee,isRowExpanded:j}=vCe({data:s,rowKey:i}),{updateTreeExpandKeys:he,toggleTreeExpansion:be,updateTreeData:re,updateKeyChildren:le,loadOrToggle:Ce,states:Ee}=bCe({data:s,rowKey:i}),{updateCurrentRowData:Oe,updateCurrentRow:Ge,setCurrentRowKey:$e,states:ot}=yCe({data:s,rowKey:i});return{assertRowKey:oe,updateColumns:V,scheduleLayout:D,isSelected:K,clearSelection:W,cleanSelection:Q,getSelectionRows:ie,toggleRowSelection:ne,_toggleAllSelection:ce,toggleAllSelection:null,updateAllSelected:ae,updateFilters:ke,updateCurrentRow:Ge,updateSort:Te,execFilter:Ke,execSort:Fe,execQuery:ve,clearFilter:fe,clearSort:Me,toggleRowExpansion:Qe,setExpandRowKeysAdapter:at=>{ge(at),he(at)},setCurrentRowKey:$e,toggleRowExpansionAdapter:(at,Mt)=>{c.value.some(({type:$t})=>$t==="expand")?Qe(at,Mt):be(at,Mt)},isRowExpanded:j,updateExpandRows:G,updateCurrentRowData:Oe,loadOrToggle:Ce,updateTreeData:re,updateKeyChildren:le,states:{tableSize:n,rowKey:i,data:s,_data:r,isComplex:o,_columns:a,originColumns:l,columns:c,fixedColumns:u,rightFixedColumns:d,leafColumns:h,fixedLeafColumns:f,rightFixedLeafColumns:p,updateOrderFns:m,leafColumnsLength:b,fixedLeafColumnsLength:g,rightFixedLeafColumnsLength:x,isAllSelected:S,selection:_,reserveSelection:E,selectOnIndeterminate:T,selectable:A,filters:I,filteredData:P,sortingColumn:k,sortProp:B,sortOrder:R,hoverRow:H,...ee,...Ee,...ot}}}function tM(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=tM(n.children,e)),n)})}function nM(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&nM(e.children)}),t.sort((e,n)=>e.no-n.no)}function xCe(){const t=xn(),e=wCe(),n=ht("table"),{t:i}=Jn();return{ns:n,t:i,...e,mutations:{setData(a,l){const c=v(a._data)!==l;a.data.value=l,a._data.value=l,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),v(a.reserveSelection)?t.store.assertRowKey():c?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,l,c,u){var d;const h=v(a._columns);let f=[];c?(c&&!c.children&&(c.children=[]),(d=c.children)==null||d.push(l),f=tM(h,c)):(h.push(l),f=h),nM(f),a._columns.value=f,a.updateOrderFns.push(u),l.type==="selection"&&(a.selectable.value=l.selectable,a.reserveSelection.value=l.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,l){var c;((c=l.getColumnIndex)==null?void 0:c.call(l))!==l.no&&(nM(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,c,u){var d;const h=v(a._columns)||[];if(c)(d=c.children)==null||d.splice(c.children.findIndex(p=>p.id===l.id),1),Nt(()=>{var p;((p=c.children)==null?void 0:p.length)===0&&delete c.children}),a._columns.value=tM(h,c);else{const p=h.indexOf(l);p>-1&&(h.splice(p,1),a._columns.value=h)}const f=a.updateOrderFns.indexOf(u);f>-1&&a.updateOrderFns.splice(f,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,l){const{prop:c,order:u,init:d}=l;if(c){const h=v(a.columns).find(f=>f.property===c);h&&(h.order=u,t.store.updateSort(h,c,u),t.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(a,l){const{sortingColumn:c,sortProp:u,sortOrder:d}=a,h=v(c),f=v(u),p=v(d);$y(p)&&(a.sortingColumn.value=null,a.sortProp.value=null);const m={filter:!0};t.store.execQuery(m),(!l||!(l.silent||l.init))&&t.emit("sort-change",{column:h,prop:f,order:p}),t.store.updateTableScrollY()},filterChange(a,l){const{column:c,values:u,silent:d}=l,h=t.store.updateFilters(c,u);t.store.execQuery(),d||t.emit("filter-change",h),t.store.updateTableScrollY()},toggleAllSelection(){var a,l;(l=(a=t.store).toggleAllSelection)==null||l.call(a)},rowSelectedChanged(a,l){t.store.toggleRowSelection(l),t.store.updateAllSelected()},setHoverRow(a,l){a.hoverRow.value=l},setCurrentRow(a,l){t.store.updateCurrentRow(l)}},commit:function(a,...l){const c=t.store.mutations;if(c[a])c[a].apply(t,[t.store.states,...l]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){Nt(()=>t.layout.updateScrollY.apply(t.layout))}}}const i4={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function SCe(t,e){if(!t)throw new Error("Table is required.");const n=xCe();return n.toggleAllSelection=Wc(n._toggleAllSelection,10),Object.keys(i4).forEach(i=>{DU(NU(e,i),i,n)}),ECe(n,e),n}function ECe(t,e){Object.keys(i4).forEach(n=>{We(()=>NU(e,n),i=>{DU(i,n,t)})})}function DU(t,e,n){let i=t,s=i4[e];Mn(s)&&(i=i||s.default,s=s.key),n.states[s].value=i}function NU(t,e){if(e.includes(".")){const n=e.split(".");let i=t;return n.forEach(s=>{i=i[s]}),i}else return t[e]}class CCe{constructor(e){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=X(null),this.scrollX=X(!1),this.scrollY=X(!1),this.bodyWidth=X(null),this.fixedWidth=X(null),this.rightFixedWidth=X(null),this.gutterWidth=0;for(const n in e)fi(e,n)&&(Li(this[n])?this[n].value=e[n]:this[n]=e[n]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const e=this.height.value;if($y(e))return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&n?.wrapRef){let i=!0;const s=this.scrollY.value;return i=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=i,s!==i}return!1}setHeight(e,n="height"){if(!pi)return;const i=this.table.vnode.el;if(e=hCe(e),this.height.value=Number(e),!i&&(e||e===0)){Nt(()=>this.setHeight(e,n));return}i&&Xt(e)?(i.style[n]=`${e}px`,this.updateElsHeight()):i&&Gt(e)&&(i.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(i=>{i.isColumnGroup?e.push.apply(e,i.columns):e.push(i)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){var e;if(!pi)return;const n=this.fit,i=(e=this.table.vnode.el)==null?void 0:e.clientWidth;let s=0;const r=this.getFlattenColumns(),o=r.filter(c=>!Xt(c.width));if(r.forEach(c=>{Xt(c.width)&&c.realWidth&&(c.realWidth=null)}),o.length>0&&n){if(r.forEach(c=>{s+=Number(c.width||c.minWidth||80)}),s<=i){this.scrollX.value=!1;const c=i-s;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+c;else{const u=o.reduce((f,p)=>f+Number(p.minWidth||80),0),d=c/u;let h=0;o.forEach((f,p)=>{if(p===0)return;const m=Math.floor(Number(f.minWidth||80)*d);h+=m,f.realWidth=Number(f.minWidth||80)+m}),o[0].realWidth=Number(o[0].minWidth||80)+c-h}}else this.scrollX.value=!0,o.forEach(c=>{c.realWidth=Number(c.minWidth)});this.bodyWidth.value=Math.max(s,i),this.table.state.resizeState.value.width=this.bodyWidth.value}else r.forEach(c=>{!c.width&&!c.minWidth?c.realWidth=80:c.realWidth=Number(c.width||c.minWidth),s+=c.realWidth}),this.scrollX.value=s>i,this.bodyWidth.value=s;const a=this.store.states.fixedColumns.value;if(a.length>0){let c=0;a.forEach(u=>{c+=Number(u.realWidth||u.width)}),this.fixedWidth.value=c}const l=this.store.states.rightFixedColumns.value;if(l.length>0){let c=0;l.forEach(u=>{c+=Number(u.realWidth||u.width)}),this.rightFixedWidth.value=c}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(i=>{var s,r;switch(e){case"columns":(s=i.state)==null||s.onColumnsChange(this);break;case"scrollable":(r=i.state)==null||r.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const TCe=Be({name:"ElTableFilterPanel",components:{ElCheckbox:Gl,ElCheckboxGroup:Ek,ElScrollbar:Wl,ElTooltip:Or,ElIcon:Ut,ArrowDown:eu,ArrowUp:Ax},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:Ri.appendTo},setup(t){const e=xn(),{t:n}=Jn(),i=ht("table-filter"),s=e?.parent;t.column&&!s.filterPanels.value[t.column.id]&&(s.filterPanels.value[t.column.id]=e);const r=X(null),o=X(null),a=X(0),l=F(()=>t.column&&t.column.filters),c=F(()=>t.column&&t.column.filterClassName?`${i.b()} ${t.column.filterClassName}`:i.b()),u=F({get:()=>{var A;return(((A=t.column)==null?void 0:A.filteredValue)||[])[0]},set:A=>{d.value&&(ua(A)?d.value.splice(0,1):d.value.splice(0,1,A))}}),d=F({get(){return t.column?t.column.filteredValue||[]:[]},set(A){var I;t.column&&((I=t.upDataColumn)==null||I.call(t,"filteredValue",A))}}),h=F(()=>t.column?t.column.filterMultiple:!0),f=A=>A.value===u.value,p=()=>{var A;(A=r.value)==null||A.onClose()},m=()=>{x(d.value),p()},b=()=>{d.value=[],x(d.value),p()},g=(A,I)=>{u.value=A,a.value=I,ua(A)?x([]):x(d.value),p()},x=A=>{var I,P;(I=t.store)==null||I.commit("filterChange",{column:t.column,values:A}),(P=t.store)==null||P.updateAllSelected()},S=()=>{var A,I;(A=o.value)==null||A.focus(),!h.value&&E(),t.column&&((I=t.upDataColumn)==null||I.call(t,"filterOpened",!0))},_=()=>{var A;t.column&&((A=t.upDataColumn)==null||A.call(t,"filterOpened",!1))},E=()=>{if(ua(u)){a.value=0;return}const A=(l.value||[]).findIndex(I=>I.value===u.value);a.value=A>=0?A+1:0};return{multiple:h,filterClassName:c,filteredValue:d,filterValue:u,filters:l,handleConfirm:m,handleReset:b,handleSelect:g,isPropAbsent:ua,isActive:f,t:n,ns:i,tooltipRef:r,rootRef:o,checkedIndex:a,handleShowTooltip:S,handleHideTooltip:_,handleKeydown:A=>{var I,P;const k=Oi(A),B=(l.value?l.value.length:0)+1;let R=a.value,H=!0;switch(k){case gt.down:case gt.right:R=(R+1)%B;break;case gt.up:case gt.left:R=(R-1+B)%B;break;case gt.tab:p(),H=!1;break;case gt.enter:case gt.space:if(R===0)g(null,0);else{const q=(l.value||[])[R-1];q.value&&g(q.value,R)}break;default:H=!1;break}H&&A.preventDefault(),a.value=R,(P=(I=o.value)==null?void 0:I.querySelector(`.${i.e("list-item")}:nth-child(${R+1})`))==null||P.focus()}}}}),MCe=["disabled"],ACe=["tabindex","aria-checked"],kCe=["tabindex","aria-checked","onClick"],PCe=["aria-label"];function LCe(t,e,n,i,s,r){const o=Zt("el-checkbox"),a=Zt("el-checkbox-group"),l=Zt("el-scrollbar"),c=Zt("arrow-up"),u=Zt("arrow-down"),d=Zt("el-icon"),h=Zt("el-tooltip");return z(),De(h,{ref:"tooltipRef",offset:0,placement:t.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo,onShow:t.handleShowTooltip,onHide:t.handleHideTooltip},{content:xe(()=>[t.multiple?(z(),se("div",{key:0,ref:"rootRef",tabindex:"-1",class:J(t.ns.e("multiple"))},[U("div",{class:J(t.ns.e("content"))},[de(l,{"wrap-class":t.ns.e("wrap")},{default:xe(()=>[de(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=f=>t.filteredValue=f),class:J(t.ns.e("checkbox-group"))},{default:xe(()=>[(z(!0),se(At,null,yn(t.filters,f=>(z(),De(o,{key:f.value,value:f.value},{default:xe(()=>[cn(Xe(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),U("div",{class:J(t.ns.e("bottom"))},[U("button",{class:J(t.ns.is("disabled",t.filteredValue.length===0)),disabled:t.filteredValue.length===0,type:"button",onClick:e[1]||(e[1]=(...f)=>t.handleConfirm&&t.handleConfirm(...f))},Xe(t.t("el.table.confirmFilter")),11,MCe),U("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},Xe(t.t("el.table.resetFilter")),1)],2)],2)):(z(),se("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:J(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[U("li",{role:"radio",class:J([t.ns.e("list-item"),t.ns.is("active",t.isPropAbsent(t.filterValue))]),tabindex:t.checkedIndex===0?0:-1,"aria-checked":t.isPropAbsent(t.filterValue),onClick:e[3]||(e[3]=f=>t.handleSelect(null,0))},Xe(t.t("el.table.clearFilter")),11,ACe),(z(!0),se(At,null,yn(t.filters,(f,p)=>(z(),se("li",{key:f.value,role:"radio",class:J([t.ns.e("list-item"),t.ns.is("active",t.isActive(f))]),tabindex:t.checkedIndex===p+1?0:-1,"aria-checked":t.isActive(f),onClick:m=>t.handleSelect(f.value,p+1)},Xe(f.text),11,kCe))),128))],34))]),default:xe(()=>{var f;return[U("button",{type:"button",class:J(`${t.ns.namespace.value}-table__column-filter-trigger`),"aria-label":t.t("el.table.filterLabel",{column:((f=t.column)==null?void 0:f.label)||""})},[de(d,null,{default:xe(()=>[Ue(t.$slots,"filter-icon",{},()=>{var p;return[(p=t.column)!=null&&p.filterOpened?(z(),De(c,{key:0})):(z(),De(u,{key:1}))]})]),_:3})],10,PCe)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var ICe=xt(TCe,[["render",LCe],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/filter-panel.vue"]]);function s4(t){const e=xn();ax(()=>{n.value.addObserver(e)}),mn(()=>{i(n.value),s(n.value)}),ec(()=>{i(n.value),s(n.value)}),eo(()=>{n.value.removeObserver(e)});const n=F(()=>{const r=t.layout;if(!r)throw new Error("Can not find table layout.");return r}),i=r=>{var o;const a=((o=t.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col"))||[];if(!a.length)return;const l=r.getFlattenColumns(),c={};l.forEach(u=>{c[u.id]=u});for(let u=0,d=a.length;u{var o,a;const l=((o=t.vnode.el)==null?void 0:o.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=l.length;u{m.stopPropagation()},r=(m,b)=>{!b.filters&&b.sortable?p(m,b,!1):b.filterable&&!b.sortable&&s(m),i?.emit("header-click",b,m)},o=(m,b)=>{i?.emit("header-contextmenu",b,m)},a=X(null),l=X(!1),c=X(),u=(m,b)=>{var g,x;if(pi&&!(b.children&&b.children.length>0)&&a.value&&t.border&&a.value.id===b.id){l.value=!0;const S=i;e("set-drag-visible",!0);const _=S?.vnode.el,E=_?.getBoundingClientRect().left,T=(x=(g=n?.vnode)==null?void 0:g.el)==null?void 0:x.querySelector(`th.${b.id}`),A=T.getBoundingClientRect(),I=A.left-E+30;nl(T,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:A.right-E,startColumnLeft:A.left-E,tableLeft:E};const P=S?.refs.resizeProxy;P.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const k=R=>{const H=R.clientX-c.value.startMouseLeft,q=c.value.startLeft+H;P.style.left=`${Math.max(I,q)}px`},B=()=>{if(l.value){const{startColumnLeft:R,startLeft:H}=c.value,oe=Number.parseInt(P.style.left,10)-R;b.width=b.realWidth=oe,S?.emit("header-dragend",b.width,H-R,b,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",B),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{xo(T,"noclick")},0)};document.addEventListener("mousemove",k),document.addEventListener("mouseup",B)}},d=(m,b)=>{var g;if(!t.border||b.children&&b.children.length>0)return;const x=m.target,S=ca(x)?x.closest("th"):null;if(!S)return;const _=Oc(S,"is-sortable");if(_){const k=l.value?"col-resize":"";S.style.cursor=k;const B=S.querySelector(".caret-wrapper");B&&(B.style.cursor=k)}if(!b.resizable||l.value){a.value=null;return}const E=S.getBoundingClientRect(),T=((g=S.parentNode)==null?void 0:g.lastElementChild)===S,A=t.allowDragLastColumn||!T,I=E.width>12&&E.right-m.clientX<8&&A,P=I?"col-resize":"";document.body.style.cursor=P,a.value=I?b:null,_&&(S.style.cursor=P)},h=()=>{!pi||l.value||(document.body.style.cursor="")},f=({order:m,sortOrders:b})=>{if(m==="")return b[0];const g=b.indexOf(m||null);return b[g>b.length-2?0:g+1]},p=(m,b,g)=>{var x;m.stopPropagation();const S=b.order===g?null:g||f(b),_=(x=m.target)==null?void 0:x.closest("th");if(_&&Oc(_,"noclick")){xo(_,"noclick");return}if(!b.sortable)return;const E=m.currentTarget;if(["ascending","descending"].some(k=>Oc(E,k)&&!b.sortOrders.includes(k)))return;const T=t.store.states;let A=T.sortProp.value,I;const P=T.sortingColumn.value;(P!==b||P===b&&$y(P.order))&&(P&&(P.order=null),T.sortingColumn.value=b,A=b.property),S?I=b.order=S:I=b.order=null,T.sortProp.value=A,T.sortOrder.value=I,i?.store.commit("changeSortCondition")};return{handleHeaderClick:r,handleHeaderContextMenu:o,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:p,handleFilterClick:s}}function OCe(t){const e=zt(oc),n=ht("table");return{getHeaderRowStyle:a=>{const l=e?.props.headerRowStyle;return Kt(l)?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=e?.props.headerRowClassName;return Gt(c)?l.push(c):Kt(c)&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{var d;let h=(d=e?.props.headerCellStyle)!=null?d:{};Kt(h)&&(h=h.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const f=n4(l,u.fixed,t.store,c);return vg(f,"left"),vg(f,"right"),Object.assign({},h,f)},getHeaderCellClass:(a,l,c,u)=>{const d=t4(n.b(),l,u.fixed,t.store,c),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const f=e?.props.headerCellClassName;return Gt(f)?h.push(f):Kt(f)&&h.push(f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),h.push(n.e("cell")),h.filter(p=>!!p).join(" ")}}}const BU=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,BU(n.children))):e.push(n)}),e},FU=t=>{let e=1;const n=(r,o)=>{if(o&&(r.level=o.level+1,e{n(l,r),a+=l.colSpan}),r.colSpan=a}else r.colSpan=1};t.forEach(r=>{r.level=1,n(r,void 0)});const i=[];for(let r=0;r{r.children?(r.rowSpan=1,r.children.forEach(o=>o.isSubColumn=!0)):r.rowSpan=e-r.level+1,i[r.level-1].push(r)}),i};function DCe(t){const e=zt(oc),n=F(()=>FU(t.store.states.originColumns.value));return{isGroup:F(()=>{const r=n.value.length>1;return r&&e&&(e.state.isGroup.value=!0),r}),toggleAllSelection:r=>{r.stopPropagation(),e?.store.commit("toggleAllSelection")},columnRows:n}}var NCe=Be({name:"ElTableHeader",components:{ElCheckbox:Gl},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=xn(),i=zt(oc),s=ht("table"),r=X({}),{onColumnsChange:o,onScrollableChange:a}=s4(i),l=i?.props.tableLayout==="auto",c=ni(new Map),u=X();let d;const h=()=>{d=setTimeout(()=>{c.size>0&&(c.forEach((R,H)=>{const q=u.value.querySelector(`.${H.replace(/\s/g,".")}`);if(q){const oe=q.getBoundingClientRect().width;R.width=oe||R.width}}),c.clear())})};We(c,h),gi(()=>{d&&(clearTimeout(d),d=void 0)}),mn(async()=>{await Nt(),await Nt();const{prop:R,order:H}=t.defaultSort;i?.store.commit("sort",{prop:R,order:H,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:g,handleSortClick:x,handleFilterClick:S}=RCe(t,e),{getHeaderRowStyle:_,getHeaderRowClass:E,getHeaderCellStyle:T,getHeaderCellClass:A}=OCe(t),{isGroup:I,toggleAllSelection:P,columnRows:k}=DCe(t),{t:B}=Jn();return n.state={onColumnsChange:o,onScrollableChange:a},n.filterPanels=r,{ns:s,t:B,filterPanels:r,onColumnsChange:o,onScrollableChange:a,columnRows:k,getHeaderRowClass:E,getHeaderRowStyle:_,getHeaderCellClass:A,getHeaderCellStyle:T,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:b,handleMouseOut:g,handleSortClick:x,handleFilterClick:S,isGroup:I,toggleAllSelection:P,saveIndexSelection:c,isTableLayoutAuto:l,theadRef:u,updateFixedColumnStyle:h}},render(){const{ns:t,t:e,isGroup:n,columnRows:i,getHeaderCellStyle:s,getHeaderCellClass:r,getHeaderRowClass:o,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleSortClick:h,handleMouseOut:f,store:p,$parent:m,saveIndexSelection:b,isTableLayoutAuto:g}=this;let x=1;return tn("thead",{ref:"theadRef",class:t.is("group",n)},i.map((S,_)=>tn("tr",{class:o(_),key:_,style:a(_)},S.map((E,T)=>{E.rowSpan>x&&(x=E.rowSpan);const A=r(_,T,S,E);return g&&E.fixed&&b.set(A,E),tn("th",{class:A,colspan:E.colSpan,key:`${E.id}-thead`,rowspan:E.rowSpan,scope:E.colSpan>1?"colgroup":"col",ariaSort:E.sortable?E.order:void 0,style:s(_,T,S,E),onClick:I=>{var P;(P=I.currentTarget)!=null&&P.classList.contains("noclick")||l(I,E)},onContextmenu:I=>c(I,E),onMousedown:I=>u(I,E),onMousemove:I=>d(I,E),onMouseout:f},[tn("div",{class:["cell",E.filteredValue&&E.filteredValue.length>0?"highlight":""]},[E.renderHeader?E.renderHeader({column:E,$index:T,store:p,_self:m}):E.label,E.sortable&&tn("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:E.label||""}),onClick:I=>h(I,E)},[tn("i",{onClick:I=>h(I,E,"ascending"),class:"sort-caret ascending"}),tn("i",{onClick:I=>h(I,E,"descending"),class:"sort-caret descending"})]),E.filterable&&tn(ICe,{store:p,placement:E.filterPlacement||"bottom-start",appendTo:m?.appendFilterPanelTo,column:E,upDataColumn:(I,P)=>{E[I]=P}},{"filter-icon":()=>E.renderFilterIcon?E.renderFilterIcon({filterOpened:E.filterOpened}):null})])])}))))}});function fE(t,e,n=.03){return t-e>n}function BCe(t){const e=zt(oc),n=X(""),i=X(tn("div")),s=(p,m,b)=>{var g,x,S;const _=e,E=hE(p);let T=null;const A=(g=_?.vnode.el)==null?void 0:g.dataset.prefix;E&&(T=U6({columns:(S=(x=t.store)==null?void 0:x.states.columns.value)!=null?S:[]},E,A),T&&_?.emit(`cell-${b}`,m,T,E,p)),_?.emit(`row-${b}`,m,T,p)},r=(p,m)=>{s(p,m,"dblclick")},o=(p,m)=>{var b;(b=t.store)==null||b.commit("setCurrentRow",m),s(p,m,"click")},a=(p,m)=>{s(p,m,"contextmenu")},l=Wc(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=Wc(()=>{var p;(p=t.store)==null||p.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null),b=Number.parseInt(m.paddingLeft,10)||0,g=Number.parseInt(m.paddingRight,10)||0,x=Number.parseInt(m.paddingTop,10)||0,S=Number.parseInt(m.paddingBottom,10)||0;return{left:b,right:g,top:x,bottom:S}},d=(p,m,b)=>{var g;let x=(g=m?.target)==null?void 0:g.parentNode;for(;p>1&&(x=x?.nextSibling,!(!x||x.nodeName!=="TR"));)b(x,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:r,handleClick:o,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,b)=>{var g,x,S,_,E,T,A,I,P;if(!e)return;const k=e,B=hE(p),R=(g=k?.vnode.el)==null?void 0:g.dataset.prefix;let H=null;if(B){if(H=U6({columns:(S=(x=t.store)==null?void 0:x.states.columns.value)!=null?S:[]},B,R),!H)return;B.rowSpan>1&&d(B.rowSpan,p,nl);const _e=k.hoverState={cell:B,column:H,row:m};k?.emit("cell-mouse-enter",_e.row,_e.column,_e.cell,p)}if(!b){((_=ho)==null?void 0:_.trigger)===B&&((E=ho)==null||E());return}const q=p.target.querySelector(".cell");if(!(Oc(q,`${R}-tooltip`)&&q.childNodes.length&&((T=q.textContent)!=null&&T.trim())))return;const oe=document.createRange();oe.setStart(q,0),oe.setEnd(q,q.childNodes.length);const{width:Z,height:V}=oe.getBoundingClientRect(),{width:D,height:K}=q.getBoundingClientRect(),{top:W,left:Q,right:ie,bottom:ne}=u(q),ce=Q+ie,ae=W+ne;fE(Z+ce,D)||fE(V+ae,K)||fE(q.scrollWidth,D)?gCe(b,(A=B?.innerText||B?.textContent)!=null?A:"",m,H,B,k):((I=ho)==null?void 0:I.trigger)===B&&((P=ho)==null||P())},handleCellMouseLeave:p=>{const m=hE(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,xo);const b=e?.hoverState;e?.emit("cell-mouse-leave",b?.row,b?.column,b?.cell,p)},tooltipContent:n,tooltipTrigger:i}}function FCe(t){const e=zt(oc),n=ht("table");return{getRowStyle:(c,u)=>{const d=e?.props.rowStyle;return Kt(d)?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u,d)=>{var h;const f=[n.e("row")];e?.props.highlightCurrentRow&&c===((h=t.store)==null?void 0:h.states.currentRow.value)&&f.push("current-row"),t.stripe&&d%2===1&&f.push(n.em("row","striped"));const p=e?.props.rowClassName;return Gt(p)?f.push(p):Kt(p)&&f.push(p.call(null,{row:c,rowIndex:u})),f},getCellStyle:(c,u,d,h)=>{const f=e?.props.cellStyle;let p=f??{};Kt(f)&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=n4(u,t?.fixed,t.store);return vg(m,"left"),vg(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=t4(n.b(),u,t?.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],b=e?.props.cellClassName;return Gt(b)?m.push(b):Kt(b)&&m.push(b.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(g=>!!g).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e?.props.spanMethod;if(Kt(m)){const b=m({row:c,column:u,rowIndex:d,columnIndex:h});pt(b)?(f=b[0],p=b[1]):Mn(b)&&(f=b.rowspan,p=b.colspan)}return{rowspan:f,colspan:p}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const h=c.map(({realWidth:f,width:p})=>f||p).slice(d,d+u);return Number(h.reduce((f,p)=>Number(f)+Number(p),-1))}}}const zCe=["colspan","rowspan"],UCe=Be({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(z(),se("td",{colspan:t.colspan,rowspan:t.rowspan},[Ue(e.$slots,"default")],8,zCe))}});var $Ce=xt(UCe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table-body/td-wrapper.vue"]]);function VCe(t){const e=zt(oc),n=ht("table"),{handleDoubleClick:i,handleClick:s,handleContextMenu:r,handleMouseEnter:o,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=BCe(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:b,getColspanRealWidth:g}=FCe(t);let x=-1;const S=F(()=>{var I;return(I=t.store)==null?void 0:I.states.columns.value.findIndex(({type:P})=>P==="default")}),_=(I,P)=>{var k;const B=(k=e?.props)==null?void 0:k.rowKey;return B?Xr(I,B):P},E=(I,P,k,B=!1)=>{const{tooltipEffect:R,tooltipOptions:H,store:q}=t,{indent:oe,columns:Z}=q.states,V=[];let D=!0;return k&&(V.push(n.em("row",`level-${k.level}`)),D=!!k.display),P===0&&(x=-1),t.stripe&&D&&x++,V.push(...f(I,P,x)),tn("tr",{style:[D?null:{display:"none"},h(I,P)],class:V,key:_(I,P),onDblclick:W=>i(W,I),onClick:W=>s(W,I),onContextmenu:W=>r(W,I),onMouseenter:()=>o(P),onMouseleave:a},Z.value.map((W,Q)=>{const{rowspan:ie,colspan:ne}=b(I,W,P,Q);if(!ie||!ne)return null;const ce=Object.assign({},W);ce.realWidth=g(Z.value,ne,Q);const ae={store:q,_self:t.context||e,column:ce,row:I,$index:P,cellIndex:Q,expanded:B};Q===S.value&&k&&(ae.treeNode={indent:k.level&&k.level*oe.value,level:k.level},Mi(k.expanded)&&(ae.treeNode.expanded=k.expanded,"loading"in k&&(ae.treeNode.loading=k.loading),"noLazyChildren"in k&&(ae.treeNode.noLazyChildren=k.noLazyChildren)));const _e=`${_(I,P)},${Q}`,ke=ce.columnKey||ce.rawColumnKey||"",Te=W.showOverflowTooltip&&L9({effect:R},H,W.showOverflowTooltip);return tn($Ce,{style:p(P,Q,I,W),class:m(P,Q,I,W,ne-1),key:`${ke}${_e}`,rowspan:ie,colspan:ne,onMouseenter:Ke=>l(Ke,I,Te),onMouseleave:c},{default:()=>T(Q,W,ae)})}))},T=(I,P,k)=>P.renderCell(k);return{wrappedRowRender:(I,P)=>{const k=t.store,{isRowExpanded:B,assertRowKey:R}=k,{treeData:H,lazyTreeNodeMap:q,childrenColumnName:oe,rowKey:Z}=k.states,V=k.states.columns.value;if(V.some(({type:K})=>K==="expand")){const K=B(I),W=E(I,P,void 0,K),Q=e?.renderExpanded;if(!Q)return console.error("[Element Error]renderExpanded is required."),W;const ie=[[W]];return(e.props.preserveExpandedContent||K)&&ie[0].push(tn("tr",{key:`expanded-row__${W.key}`,style:{display:K?"":"none"}},[tn("td",{colspan:V.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[Q({row:I,$index:P,store:k,expanded:K})])])),ie}else if(Object.keys(H.value).length){R();const K=Xr(I,Z.value);let W=H.value[K],Q=null;W&&(Q={expanded:W.expanded,level:W.level,display:!0,noLazyChildren:void 0,loading:void 0},Mi(W.lazy)&&(Q&&Mi(W.loaded)&&W.loaded&&(Q.noLazyChildren=!(W.children&&W.children.length)),Q.loading=W.loading));const ie=[E(I,P,Q??void 0)];if(W){let ne=0;const ce=(_e,ke)=>{_e&&_e.length&&ke&&_e.forEach(Te=>{const Ke={display:ke.display&&ke.expanded,level:ke.level+1,expanded:!1,noLazyChildren:!1,loading:!1},Fe=Xr(Te,Z.value);if(ua(Fe))throw new Error("For nested data item, row-key is required.");if(W={...H.value[Fe]},W&&(Ke.expanded=W.expanded,W.level=W.level||Ke.level,W.display=!!(W.expanded&&Ke.display),Mi(W.lazy)&&(Mi(W.loaded)&&W.loaded&&(Ke.noLazyChildren=!(W.children&&W.children.length)),Ke.loading=W.loading)),ne++,ie.push(E(Te,P+ne,Ke)),W){const ve=q.value[Fe]||Te[oe.value];ce(ve,W)}})};W.display=!0;const ae=q.value[K]||I[oe.value];ce(ae,W)}return ie}else return E(I,P,void 0)},tooltipContent:u,tooltipTrigger:d}}const HCe={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 WCe=Be({name:"ElTableBody",props:HCe,setup(t){var e;const n=xn(),i=zt(oc),s=ht("table"),{wrappedRowRender:r,tooltipContent:o,tooltipTrigger:a}=VCe(t),{onColumnsChange:l,onScrollableChange:c}=s4(i),u=[];return We((e=t.store)==null?void 0:e.states.hoverRow,(d,h)=>{var f,p;const m=n?.vnode.el,b=Array.from(m?.children||[]).filter(S=>S?.classList.contains(`${s.e("row")}`));let g=d;const x=(f=b[g])==null?void 0:f.childNodes;if(x?.length){let S=0;Array.from(x).reduce((E,T,A)=>{var I,P;return((I=x[A])==null?void 0:I.colSpan)>1&&(S=(P=x[A])==null?void 0:P.colSpan),T.nodeName!=="TD"&&S===0&&E.push(A),S>0&&S--,E},[]).forEach(E=>{var T;for(g=d;g>0;){const A=(T=b[g-1])==null?void 0:T.childNodes;if(A[E]&&A[E].nodeName==="TD"&&A[E].rowSpan>1){nl(A[E],"hover-cell"),u.push(A[E]);break}g--}})}else u.forEach(S=>xo(S,"hover-cell")),u.length=0;!((p=t.store)!=null&&p.states.isComplex.value)||!pi||Gc(()=>{const S=b[h],_=b[d];S&&!S.classList.contains("hover-fixed-row")&&xo(S,"hover-row"),_&&nl(_,"hover-row")})}),eo(()=>{var d;(d=ho)==null||d()}),{ns:s,onColumnsChange:l,onScrollableChange:c,wrappedRowRender:r,tooltipContent:o,tooltipTrigger:a}},render(){const{wrappedRowRender:t,store:e}=this,n=e?.states.data.value||[];return tn("tbody",{tabIndex:-1},[n.reduce((i,s)=>i.concat(t(s,i.length)),[])])}});function GCe(){const t=zt(oc),e=t?.store,n=F(()=>{var a;return(a=e?.states.fixedLeafColumnsLength.value)!=null?a:0}),i=F(()=>{var a;return(a=e?.states.rightFixedColumns.value.length)!=null?a:0}),s=F(()=>{var a;return(a=e?.states.columns.value.length)!=null?a:0}),r=F(()=>{var a;return(a=e?.states.fixedColumns.value.length)!=null?a:0}),o=F(()=>{var a;return(a=e?.states.rightFixedColumns.value.length)!=null?a:0});return{leftFixedLeafCount:n,rightFixedLeafCount:i,columnsCount:s,leftFixedCount:r,rightFixedCount:o,columns:F(()=>{var a;return(a=e?.states.columns.value)!=null?a:[]})}}function jCe(t){const{columns:e}=GCe(),n=ht("table");return{getCellClasses:(r,o)=>{const a=r[o],l=[n.e("cell"),a.id,a.align,a.labelClassName,...t4(n.b(),o,a.fixed,t.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(r,o)=>{const a=n4(o,r.fixed,t.store);return vg(a,"left"),vg(a,"right"),a},columns:e}}var KCe=Be({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const e=zt(oc),n=ht("table"),{getCellClasses:i,getCellStyles:s,columns:r}=jCe(t),{onScrollableChange:o,onColumnsChange:a}=s4(e);return{ns:n,onScrollableChange:o,onColumnsChange:a,getCellClasses:i,getCellStyles:s,columns:r}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:i,sumText:s}=this,r=this.store.states.data.value;let o=[];return i?o=i({columns:t,data:r}):t.forEach((a,l)=>{if(l===0){o[l]=s;return}const c=r.map(f=>Number(f[a.property])),u=[];let d=!0;c.forEach(f=>{if(!Number.isNaN(+f)){d=!1;const p=`${f}`.split(".")[1];u.push(p?p.length:0)}});const h=Math.max.apply(null,u);d?o[l]="":o[l]=c.reduce((f,p)=>{const m=Number(p);return Number.isNaN(+m)?f:Number.parseFloat((f+p).toFixed(Math.min(h,20)))},0)}),tn(tn("tfoot",[tn("tr",{},[...t.map((a,l)=>tn("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[tn("div",{class:["cell",a.labelClassName]},[o[l]])]))])]))}});function qCe(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,h,f=!0)=>{t.toggleRowSelection(d,h,!1,f),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,h)=>{t.toggleRowExpansionAdapter(d,h)},clearSort:()=>{t.clearSort()},sort:(d,h)=>{t.commit("sort",{prop:d,order:h})},updateKeyChildren:(d,h)=>{t.updateKeyChildren(d,h)}}}function YCe(t,e,n,i){const s=X(!1),r=X(null),o=X(!1),a=V=>{o.value=V},l=X({width:null,height:null,headerHeight:null}),c=X(!1),u={display:"inline-block",verticalAlign:"middle"},d=X(),h=X(0),f=X(0),p=X(0),m=X(0),b=X(0);We(()=>t.height,V=>{e.setHeight(V??null)},{immediate:!0}),We(()=>t.maxHeight,V=>{e.setMaxHeight(V??null)},{immediate:!0}),We(()=>[t.currentRowKey,n.states.rowKey],([V,D])=>{!v(D)||!v(V)||n.setCurrentRowKey(`${V}`)},{immediate:!0}),We(()=>t.data,V=>{i.store.commit("setData",V)},{immediate:!0,deep:!0}),jo(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const g=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},x=(V,D)=>{const{pixelX:K,pixelY:W}=D;Math.abs(K)>=Math.abs(W)&&(i.refs.bodyWrapper.scrollLeft+=D.pixelX/5)},S=F(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),_=F(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),E=()=>{S.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(P)};mn(async()=>{await Nt(),n.updateColumns(),k(),requestAnimationFrame(E);const V=i.vnode.el,D=i.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&&D?D.offsetHeight:null},n.states.columns.value.forEach(K=>{K.filteredValue&&K.filteredValue.length&&i.store.commit("filterChange",{column:K,values:K.filteredValue,silent:!0})}),i.$ready=!0});const T=(V,D)=>{if(!V)return;const K=Array.from(V.classList).filter(W=>!W.startsWith("is-scrolling-"));K.push(e.scrollX.value?D:"is-scrolling-none"),V.className=K.join(" ")},A=V=>{const{tableWrapper:D}=i.refs;T(D,V)},I=V=>{const{tableWrapper:D}=i.refs;return!!(D&&D.classList.contains(V))},P=function(){if(!i.refs.scrollBarRef)return;if(!e.scrollX.value){const ce="is-scrolling-none";I(ce)||A(ce);return}const V=i.refs.scrollBarRef.wrapRef;if(!V)return;const{scrollLeft:D,offsetWidth:K,scrollWidth:W}=V,{headerWrapper:Q,footerWrapper:ie}=i.refs;Q&&(Q.scrollLeft=D),ie&&(ie.scrollLeft=D);const ne=W-K-1;D>=ne?A("is-scrolling-right"):A(D===0?"is-scrolling-left":"is-scrolling-middle")},k=()=>{i.refs.scrollBarRef&&(i.refs.scrollBarRef.wrapRef&&xi(i.refs.scrollBarRef.wrapRef,"scroll",P,{passive:!0}),t.fit?as(i.vnode.el,B):xi(window,"resize",B),as(i.refs.tableInnerWrapper,()=>{var V,D;B(),(D=(V=i.refs)==null?void 0:V.scrollBarRef)==null||D.update()}))},B=()=>{var V,D,K,W;const Q=i.vnode.el;if(!i.$ready||!Q)return;let ie=!1;const{width:ne,height:ce,headerHeight:ae}=l.value,_e=d.value=Q.offsetWidth;ne!==_e&&(ie=!0);const ke=Q.offsetHeight;(t.height||S.value)&&ce!==ke&&(ie=!0);const Te=t.tableLayout==="fixed"?i.refs.headerWrapper:(V=i.refs.tableHeaderRef)==null?void 0:V.$el;t.showHeader&&Te?.offsetHeight!==ae&&(ie=!0),h.value=((D=i.refs.tableWrapper)==null?void 0:D.scrollHeight)||0,p.value=Te?.scrollHeight||0,m.value=((K=i.refs.footerWrapper)==null?void 0:K.offsetHeight)||0,b.value=((W=i.refs.appendWrapper)==null?void 0:W.offsetHeight)||0,f.value=h.value-p.value-m.value-b.value,ie&&(l.value={width:_e,height:ke,headerHeight:t.showHeader&&Te?.offsetHeight||0},E())},R=er(),H=F(()=>{const{bodyWidth:V,scrollY:D,gutterWidth:K}=e;return V.value?`${V.value-(D.value?K:0)}px`:""}),q=F(()=>t.maxHeight?"fixed":t.tableLayout),oe=F(()=>{if(t.data&&t.data.length)return;let V="100%";t.height&&f.value&&(V=`${f.value}px`);const D=d.value;return{width:D?`${D}px`:"",height:V}}),Z=F(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${p.value+m.value}px)`}:{maxHeight:`${+t.maxHeight-p.value-m.value}px`}:{});return{isHidden:s,renderExpanded:r,setDragVisible:a,isGroup:c,handleMouseLeave:g,handleHeaderFooterMousewheel:x,tableSize:R,emptyBlockStyle:oe,resizeProxyVisible:o,bodyWidth:H,resizeState:l,doLayout:E,tableBodyStyles:_,tableLayout:q,scrollbarViewStyle:u,scrollbarStyle:Z}}function XCe(t){const e=X(),n=()=>{const s=t.vnode.el.querySelector(".hidden-columns"),r={childList:!0,subtree:!0},o=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{o.forEach(a=>a())}),e.value.observe(s,r)};mn(()=>{n()}),eo(()=>{var i;(i=e.value)==null||i.disconnect()})}var ZCe={data:{type:Array,default:()=>[]},size:or,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:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object],tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function zU(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:s})=>ri(s))&&(n=[]);const i=s=>{const r={key:`${t.tableLayout}_${s.id}`,style:{},name:void 0};return e?r.style={width:`${s.width}px`}:r.name=s.id,r};return tn("colgroup",{},n.map(s=>tn("col",i(s))))}zU.props=["columns","tableLayout"];const JCe=()=>{const t=X(),e=(r,o)=>{const a=t.value;a&&a.scrollTo(r,o)},n=(r,o)=>{const a=t.value;a&&Xt(o)&&["Top","Left"].includes(r)&&a[`setScroll${r}`](o)};return{scrollBarRef:t,scrollTo:e,setScrollTop:r=>n("Top",r),setScrollLeft:r=>n("Left",r)}};var H6=!1,ff,iM,sM,iw,sw,UU,rw,rM,oM,aM,$U,lM,cM,VU,HU;function na(){if(!H6){H6=!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(lM=/\b(iPhone|iP[ao]d)/.exec(t),cM=/\b(iP[ao]d)/.exec(t),aM=/Android/i.exec(t),VU=/FBAN\/\w+;/i.exec(t),HU=/Mobile/i.exec(t),$U=!!/Win64/.exec(t),e){ff=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,ff&&document&&document.documentMode&&(ff=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);UU=i?parseFloat(i[1])+4:ff,iM=e[2]?parseFloat(e[2]):NaN,sM=e[3]?parseFloat(e[3]):NaN,iw=e[4]?parseFloat(e[4]):NaN,iw?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),sw=e&&e[1]?parseFloat(e[1]):NaN):sw=NaN}else ff=iM=sM=sw=iw=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);rw=s?parseFloat(s[1].replace("_",".")):!0}else rw=!1;rM=!!n[2],oM=!!n[3]}else rw=rM=oM=!1}}var uM={ie:function(){return na()||ff},ieCompatibilityMode:function(){return na()||UU>ff},ie64:function(){return uM.ie()&&$U},firefox:function(){return na()||iM},opera:function(){return na()||sM},webkit:function(){return na()||iw},safari:function(){return uM.webkit()},chrome:function(){return na()||sw},windows:function(){return na()||rM},osx:function(){return na()||rw},linux:function(){return na()||oM},iphone:function(){return na()||lM},mobile:function(){return na()||lM||cM||aM||HU},nativeApp:function(){return na()||VU},android:function(){return na()||aM},ipad:function(){return na()||cM}},QCe=uM,eTe=!!(typeof window<"u"&&window.document&&window.document.createElement),tTe={canUseDOM:eTe},WU=tTe,GU;WU.canUseDOM&&(GU=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function nTe(t,e){if(!WU.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&GU&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var iTe=nTe,W6=10,G6=40,j6=800;function jU(t){var e=0,n=0,i=0,s=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),i=e*W6,s=n*W6,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||s)&&t.deltaMode&&(t.deltaMode==1?(i*=G6,s*=G6):(i*=j6,s*=j6)),i&&!e&&(e=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:s}}jU.getEventType=function(){return QCe.firefox()?"DOMMouseScroll":iTe("wheel")?"wheel":"mousewheel"};var sTe=jU;const ow="_Mousewheel",K6=function(t,e){if(t&&t.addEventListener){KU(t);const n=function(i){const s=sTe(i);e&&Reflect.apply(e,this,[i,s])};t[ow]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},KU=t=>{var e;(e=t[ow])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[ow].wheelHandler),t[ow]=null)},rTe={beforeMount(t,e){K6(t,e.value)},unmounted(t){KU(t)},updated(t,e){e.value!==e.oldValue&&K6(t,e.value)}};let oTe=1;const aTe=Be({name:"ElTable",directives:{Mousewheel:rTe},components:{TableHeader:NCe,TableBody:WCe,TableFooter:KCe,ElScrollbar:Wl,hColgroup:zU},props:ZCe,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=Jn(),n=ht("table"),i=xn();Xn(oc,i);const s=SCe(i,t);i.store=s;const r=new CCe({store:i.store,table:i,fit:t.fit,showHeader:t.showHeader});i.layout=r;const o=F(()=>(s.states.data.value||[]).length===0),{setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:h,toggleRowExpansion:f,clearSort:p,sort:m,updateKeyChildren:b}=qCe(s),{isHidden:g,renderExpanded:x,setDragVisible:S,isGroup:_,handleMouseLeave:E,handleHeaderFooterMousewheel:T,tableSize:A,emptyBlockStyle:I,resizeProxyVisible:P,bodyWidth:k,resizeState:B,doLayout:R,tableBodyStyles:H,tableLayout:q,scrollbarViewStyle:oe,scrollbarStyle:Z}=YCe(t,r,s,i),{scrollBarRef:V,scrollTo:D,setScrollLeft:K,setScrollTop:W}=JCe(),Q=Wc(R,50),ie=`${n.namespace.value}-table_${oTe++}`;i.tableId=ie,i.state={isGroup:_,resizeState:B,doLayout:R,debouncedUpdateLayout:Q};const ne=F(()=>{var _e;return(_e=t.sumText)!=null?_e:e("el.table.sumText")}),ce=F(()=>{var _e;return(_e=t.emptyText)!=null?_e:e("el.table.emptyText")}),ae=F(()=>FU(s.states.originColumns.value)[0]);return XCe(i),gi(()=>{Q.cancel()}),{ns:n,layout:r,store:s,columns:ae,handleHeaderFooterMousewheel:T,handleMouseLeave:E,tableId:ie,tableSize:A,isHidden:g,isEmpty:o,renderExpanded:x,resizeProxyVisible:P,resizeState:B,isGroup:_,bodyWidth:k,tableBodyStyles:H,emptyBlockStyle:I,debouncedUpdateLayout:Q,setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:h,toggleRowExpansion:f,clearSort:p,doLayout:R,sort:m,updateKeyChildren:b,t:e,setDragVisible:S,context:i,computedSumText:ne,computedEmptyText:ce,tableLayout:q,scrollbarViewStyle:oe,scrollbarStyle:Z,scrollBarRef:V,scrollTo:D,setScrollLeft:K,setScrollTop:W,allowDragLastColumn:t.allowDragLastColumn}}}),lTe=["data-prefix"],cTe={ref:"hiddenColumns",class:"hidden-columns"};function uTe(t,e,n,i,s,r){const o=Zt("hColgroup"),a=Zt("table-header"),l=Zt("table-body"),c=Zt("table-footer"),u=Zt("el-scrollbar"),d=xA("mousewheel");return z(),se("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:Ht(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...h)=>t.handleMouseLeave&&t.handleMouseLeave(...h))},[U("div",{ref:"tableInnerWrapper",class:J(t.ns.e("inner-wrapper"))},[U("div",cTe,[Ue(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?_n((z(),se("div",{key:0,ref:"headerWrapper",class:J(t.ns.e("header-wrapper"))},[U("table",{ref:"tableHeader",class:J(t.ns.e("header")),style:Ht(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[de(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),de(a,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):Le("v-if",!0),U("div",{ref:"bodyWrapper",class:J(t.ns.e("body-wrapper"))},[de(u,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:e[0]||(e[0]=h=>t.$emit("scroll",h))},{default:xe(()=>[U("table",{ref:"tableBody",class:J(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Ht({width:t.bodyWidth,tableLayout:t.tableLayout})},[de(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(z(),De(a,{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"])):Le("v-if",!0),de(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"?(z(),De(c,{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"])):Le("v-if",!0)],6),t.isEmpty?(z(),se("div",{key:0,ref:"emptyBlock",style:Ht(t.emptyBlockStyle),class:J(t.ns.e("empty-block"))},[U("span",{class:J(t.ns.e("empty-text"))},[Ue(t.$slots,"empty",{},()=>[cn(Xe(t.computedEmptyText),1)])],2)],6)):Le("v-if",!0),t.$slots.append?(z(),se("div",{key:1,ref:"appendWrapper",class:J(t.ns.e("append-wrapper"))},[Ue(t.$slots,"append")],2)):Le("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),t.showSummary&&t.tableLayout==="fixed"?_n((z(),se("div",{key:1,ref:"footerWrapper",class:J(t.ns.e("footer-wrapper"))},[U("table",{class:J(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Ht(t.tableBodyStyles)},[de(o,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),de(c,{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)),[[ci,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):Le("v-if",!0),t.border||t.isGroup?(z(),se("div",{key:2,class:J(t.ns.e("border-left-patch"))},null,2)):Le("v-if",!0)],2),_n(U("div",{ref:"resizeProxy",class:J(t.ns.e("column-resize-proxy"))},null,2),[[ci,t.resizeProxyVisible]])],46,lTe)}var dTe=xt(aTe,[["render",uTe],["__file","/home/runner/work/element-plus/element-plus/packages/components/table/src/table.vue"]]);const hTe={selection:"table-column--selection",expand:"table__expand-column"},fTe={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:""}},pTe=t=>hTe[t]||"",mTe={selection:{renderHeader({store:t}){var e;function n(){return t.states.data.value&&t.states.data.value.length===0}return tn(Gl,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":(e=t.toggleAllSelection)!=null?e:void 0,modelValue:t.states.isAllSelected.value,ariaLabel:t.t("el.table.selectAllLabel")})},renderCell({row:t,column:e,store:n,$index:i}){return tn(Gl,{disabled:e.selectable?!e.selectable.call(null,t,i):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const i=t.index;return Xt(i)?n=e+i:Kt(i)&&(n=i(e)),tn("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:i}){const{ns:s}=n,r=[s.e("expand-icon")];!t.renderExpand&&i&&r.push(s.em("expand-icon","expanded"));const o=function(a){a.stopPropagation(),n.toggleRowExpansion(e)};return tn("button",{type:"button","aria-label":n.t(i?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":i,class:r,onClick:o},{default:()=>t.renderExpand?[t.renderExpand({expanded:i})]:[tn(Ut,null,{default:()=>[tn(So)]})]})},sortable:!1,resizable:!1}};function gTe({row:t,column:e,$index:n}){var i;const s=e.property,r=s&&f0(t,s).value;return e&&e.formatter?e.formatter(t,e,r,n):((i=r?.toString)==null?void 0:i.call(r))||""}function vTe({row:t,treeNode:e,store:n},i=!1){const{ns:s}=n;if(!e)return i?[tn("span",{class:s.e("placeholder")})]:null;const r=[],o=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&r.push(tn("span",{class:s.e("indent"),style:{"padding-left":`${e.indent}px`}})),Mi(e.expanded)&&!e.noLazyChildren){const a=[s.e("expand-icon"),e.expanded?s.em("expand-icon","expanded"):""];let l=So;e.loading&&(l=jc),r.push(tn("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:o},{default:()=>[tn(Ut,{class:s.is("loading",e.loading)},{default:()=>[tn(l)]})]}))}else r.push(tn("span",{class:s.e("placeholder")}));return r}function q6(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function yTe(t,e){const n=xn();return{registerComplexWatchers:()=>{const r=["fixed"],o={realWidth:"width",realMinWidth:"minWidth"},a=q6(r,o);Object.keys(a).forEach(l=>{const c=o[l];fi(e,c)&&We(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=e4(u)),c==="minWidth"&&l==="realMinWidth"&&(d=LU(u)),n.columnConfig.value[c]=d,n.columnConfig.value[l]=d;const h=c==="fixed";t.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const r=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],o=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=q6(r,a);Object.keys(l).forEach(c=>{const u=a[c];fi(e,u)&&We(()=>e[u],d=>{n.columnConfig.value[c]=d,(c==="filters"||c==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),o.forEach(c=>{fi(t.value.props,c)&&We(()=>t.value.props[c],u=>{n.columnConfig.value[c]=u})})}}}function bTe(t,e,n){const i=xn(),s=X(""),r=X(!1),o=X(),a=X(),l=ht("table");jo(()=>{o.value=t.align?`is-${t.align}`:null,o.value}),jo(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:o.value,a.value});const c=F(()=>{let _=i.vnode.vParent||i.parent;for(;_&&!_.tableId&&!_.columnId;)_=_.vnode.vParent||_.parent;return _}),u=F(()=>{const{store:_}=i.parent;if(!_)return!1;const{treeData:E}=_.states,T=E.value;return T&&Object.keys(T).length>0}),d=X(e4(t.width)),h=X(LU(t.minWidth)),f=_=>(d.value&&(_.width=d.value),h.value&&(_.minWidth=h.value),!d.value&&h.value&&(_.width=void 0),_.minWidth||(_.minWidth=80),_.realWidth=Number(ri(_.width)?_.minWidth:_.width),_),p=_=>{const E=_.type,T=mTe[E]||{};Object.keys(T).forEach(I=>{const P=T[I];I!=="className"&&!ri(P)&&(_[I]=P)});const A=pTe(E);if(A){const I=`${v(l.namespace)}-${A}`;_.className=_.className?`${_.className} ${I}`:I}return _},m=_=>{pt(_)?_.forEach(T=>E(T)):E(_);function E(T){var A;((A=T?.type)==null?void 0:A.name)==="ElTableColumn"&&(T.vParent=i)}};return{columnId:s,realAlign:o,isSubColumn:r,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:_=>{t.renderHeader||_.type!=="selection"&&(_.renderHeader=T=>{if(i.columnConfig.value.label,e.header){const A=e.header(T);if(OU(A))return tn(At,A)}return cn(_.label)}),e["filter-icon"]&&(_.renderFilterIcon=T=>Ue(e,"filter-icon",T)),e.expand&&(_.renderExpand=T=>Ue(e,"expand",T));let E=_.renderCell;return _.type==="expand"?(_.renderCell=T=>tn("div",{class:"cell"},[E(T)]),n.value.renderExpanded=T=>e.default?e.default(T):e.default):(E=E||gTe,_.renderCell=T=>{let A=null;if(e.default){const H=e.default(T);A=H.some(q=>q.type!==Hs)?H:E(T)}else A=E(T);const{columns:I}=n.value.store.states,P=I.value.findIndex(H=>H.type==="default"),k=u.value&&T.cellIndex===P,B=vTe(T,k),R={class:"cell",style:{}};return _.showOverflowTooltip&&(R.class=`${R.class} ${v(l.namespace)}-tooltip`,R.style={width:`${(T.column.realWidth||Number(T.column.width))-1}px`}),m(A),tn("div",R,[B,A])}),_},getPropsData:(..._)=>_.reduce((E,T)=>(pt(T)&&T.forEach(A=>{E[A]=t[A]}),E),{}),getColumnElIndex:(_,E)=>Array.prototype.indexOf.call(_,E),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var _Te={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let wTe=1;var qU=Be({name:"ElTableColumn",components:{ElCheckbox:Gl},props:_Te,setup(t,{slots:e}){const n=xn(),i=X({}),s=F(()=>{let S=n.parent;for(;S&&!S.tableId;)S=S.parent;return S}),{registerNormalWatchers:r,registerComplexWatchers:o}=yTe(s,t),{columnId:a,isSubColumn:l,realHeaderAlign:c,columnOrTableParent:u,setColumnWidth:d,setColumnForcedProps:h,setColumnRenders:f,getPropsData:p,getColumnElIndex:m,realAlign:b,updateColumnOrder:g}=bTe(t,e,s),x=u.value;a.value=`${"tableId"in x&&x.tableId||"columnId"in x&&x.columnId}_column_${wTe++}`,ax(()=>{l.value=s.value!==x;const S=t.type||"default",_=t.sortable===""?!0:t.sortable,E=S==="selection"?!1:ri(t.showOverflowTooltip)?x.props.showOverflowTooltip:t.showOverflowTooltip,T=ri(t.tooltipFormatter)?x.props.tooltipFormatter:t.tooltipFormatter,A={...fTe[S],id:a.value,type:S,property:t.prop||t.property,align:b,headerAlign:c,showOverflowTooltip:E,tooltipFormatter:T,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:_,index:t.index,rawColumnKey:n.vnode.key};let R=p(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);R=dCe(A,R),R=fCe(f,d,h)(R),i.value=R,r(),o()}),mn(()=>{var S,_;const E=u.value,T=l.value?(S=E.vnode.el)==null?void 0:S.children:(_=E.refs.hiddenColumns)==null?void 0:_.children,A=()=>m(T||[],n.vnode.el);i.value.getColumnIndex=A,A()>-1&&s.value.store.commit("insertColumn",i.value,l.value?"columnConfig"in E&&E.columnConfig.value:null,g)}),gi(()=>{const S=i.value.getColumnIndex;(S?S():-1)>-1&&s.value.store.commit("removeColumn",i.value,l.value?"columnConfig"in x&&x.columnConfig.value:null,g)}),n.columnId=a.value,n.columnConfig=i},render(){var t,e,n;try{const i=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),s=[];if(pt(i))for(const o of i)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?s.push(o):o.type===At&&pt(o.children)&&o.children.forEach(a=>{a?.patchFlag!==1024&&!Gt(a?.children)&&s.push(a)});return tn("div",s)}catch{return tn("div",[])}}});const YU=En(dTe,{TableColumn:qU}),xTe=Ss(qU);var Ef=(t=>(t.ASC="asc",t.DESC="desc",t))(Ef||{}),ny=(t=>(t.LEFT="left",t.CENTER="center",t.RIGHT="right",t))(ny||{}),XU=(t=>(t.LEFT="left",t.RIGHT="right",t))(XU||{});const dM={asc:"desc",desc:"asc"},iy=Symbol("placeholder"),STe=(t,e,n)=>{var i;const s={flexGrow:0,flexShrink:0,...n?{}:{flexGrow:t.flexGrow||0,flexShrink:t.flexShrink||1}};n||(s.flexShrink=1);const r={...(i=t.style)!=null?i:{},...s,flexBasis:"auto",width:t.width};return e||(t.maxWidth&&(r.maxWidth=t.maxWidth),t.minWidth&&(r.minWidth=t.minWidth)),r};function ETe(t,e,n){const i=F(()=>v(e).map((b,g)=>{var x,S;return{...b,key:(S=(x=b.key)!=null?x:b.dataKey)!=null?S:g}})),s=F(()=>v(i).filter(b=>!b.hidden)),r=F(()=>v(s).filter(b=>b.fixed==="left"||b.fixed===!0)),o=F(()=>v(s).filter(b=>b.fixed==="right")),a=F(()=>v(s).filter(b=>!b.fixed)),l=F(()=>{const b=[];return v(r).forEach(g=>{b.push({...g,placeholderSign:iy})}),v(a).forEach(g=>{b.push(g)}),v(o).forEach(g=>{b.push({...g,placeholderSign:iy})}),b}),c=F(()=>v(r).length||v(o).length),u=F(()=>v(i).reduce((b,g)=>(b[g.key]=STe(g,v(n),t.fixed),b),{})),d=F(()=>v(s).reduce((b,g)=>b+g.width,0)),h=b=>v(i).find(g=>g.key===b),f=b=>v(u)[b],p=(b,g)=>{b.width=g};function m(b){var g;const{key:x}=b.currentTarget.dataset;if(!x)return;const{sortState:S,sortBy:_}=t;let E=Ef.ASC;Mn(S)?E=dM[S[x]]:E=dM[_.order],(g=t.onColumnSort)==null||g.call(t,{column:h(x),key:x,order:E})}return{columns:i,columnsStyles:u,columnsTotalWidth:d,fixedColumnsOnLeft:r,fixedColumnsOnRight:o,hasFixedColumns:c,mainColumns:l,normalColumns:a,visibleColumns:s,getColumn:h,getColumnStyle:f,updateColumnWidth:p,onColumnSorted:m}}const CTe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:i,onMaybeEndReached:s})=>{const r=X({scrollLeft:0,scrollTop:0});function o(f){var p,m,b;const{scrollTop:g}=f;(p=e.value)==null||p.scrollTo(f),(m=n.value)==null||m.scrollToTop(g),(b=i.value)==null||b.scrollToTop(g)}function a(f){r.value=f,o(f)}function l(f){r.value.scrollTop=f,o(v(r))}function c(f){var p,m;r.value.scrollLeft=f,(m=(p=e.value)==null?void 0:p.scrollTo)==null||m.call(p,v(r))}function u(f){var p;a(f),(p=t.onScroll)==null||p.call(t,f)}function d({scrollTop:f}){const{scrollTop:p}=v(r);f!==p&&l(f)}function h(f,p="auto"){var m;(m=e.value)==null||m.scrollToRow(f,p)}return We(()=>v(r).scrollTop,(f,p)=>{f>p&&s()}),{scrollPos:r,scrollTo:a,scrollToLeft:c,scrollToTop:l,scrollToRow:h,onScroll:u,onVerticalScroll:d}},TTe=(t,{mainTableRef:e,leftTableRef:n,rightTableRef:i,tableInstance:s,ns:r,isScrolling:o})=>{const a=xn(),{emit:l}=a,c=wi(!1),u=X(t.defaultExpandedRowKeys||[]),d=X(-1),h=wi(null),f=X({}),p=X({}),m=wi({}),b=wi({}),g=wi({}),x=F(()=>Xt(t.estimatedRowHeight));function S(k){var B;(B=t.onRowsRendered)==null||B.call(t,k),k.rowCacheEnd>v(d)&&(d.value=k.rowCacheEnd)}function _({hovered:k,rowKey:B}){if(o.value)return;s.vnode.el.querySelectorAll(`[rowkey="${String(B)}"]`).forEach(q=>{k?q.classList.add(r.is("hovered")):q.classList.remove(r.is("hovered"))})}function E({expanded:k,rowData:B,rowIndex:R,rowKey:H}){var q,oe;const Z=[...v(u)],V=Z.indexOf(H);k?V===-1&&Z.push(H):V>-1&&Z.splice(V,1),u.value=Z,l("update:expandedRowKeys",Z),(q=t.onRowExpand)==null||q.call(t,{expanded:k,rowData:B,rowIndex:R,rowKey:H}),(oe=t.onExpandedRowsChange)==null||oe.call(t,Z),s.vnode.el.querySelector(`.${r.is("hovered")}[rowkey="${String(H)}"]`)&&Nt(()=>_({hovered:!0,rowKey:H}))}const T=Wc(()=>{var k,B,R,H;c.value=!0,f.value={...v(f),...v(p)},A(v(h),!1),p.value={},h.value=null,(k=e.value)==null||k.forceUpdate(),(B=n.value)==null||B.forceUpdate(),(R=i.value)==null||R.forceUpdate(),(H=a.proxy)==null||H.$forceUpdate(),c.value=!1},0);function A(k,B=!1){v(x)&&[e,n,i].forEach(R=>{const H=v(R);H&&H.resetAfterRowIndex(k,B)})}function I(k,B,R){const H=v(h);(H===null||H>R)&&(h.value=R),p.value[k]=B}function P({rowKey:k,height:B,rowIndex:R},H){H?H===XU.RIGHT?g.value[k]=B:m.value[k]=B:b.value[k]=B;const q=Math.max(...[m,g,b].map(oe=>oe.value[k]||0));v(f)[k]!==q&&(I(k,q,R),T())}return{expandedRowKeys:u,lastRenderedRowIndex:d,isDynamic:x,isResetting:c,rowHeights:f,resetAfterIndex:A,onRowExpanded:E,onRowHovered:_,onRowsRendered:S,onRowHeightChange:P}},MTe=(t,{expandedRowKeys:e,lastRenderedRowIndex:n,resetAfterIndex:i})=>{const s=X({}),r=F(()=>{const a={},{data:l,rowKey:c}=t,u=v(e);if(!u||!u.length)return l;const d=[],h=new Set;u.forEach(p=>h.add(p));let f=l.slice();for(f.forEach(p=>a[p[c]]=0);f.length>0;){const p=f.shift();d.push(p),h.has(p[c])&&pt(p.children)&&p.children.length>0&&(f=[...p.children,...f],p.children.forEach(m=>a[m[c]]=a[p[c]]+1))}return s.value=a,d}),o=F(()=>{const{data:a,expandColumnKey:l}=t;return l?v(r):a});return We(o,(a,l)=>{a!==l&&(n.value=-1,i(0,!0))}),{data:o,depthMap:s}},ATe=(t,e)=>t+e,aw=t=>pt(t)?t.reduce(ATe,0):t,Kf=(t,e,n={})=>Kt(t)?t(e):t??n,rh=t=>(["width","maxWidth","minWidth","height"].forEach(e=>{t[e]=xs(t[e])}),t),ZU=t=>Yi(t)?e=>tn(t,e):t,kTe=(t,{columnsTotalWidth:e,rowsHeight:n,fixedColumnsOnLeft:i,fixedColumnsOnRight:s})=>{const r=F(()=>{const{fixed:g,width:x,vScrollbarSize:S}=t,_=x-S;return g?Math.max(Math.round(v(e)),_):_}),o=F(()=>{const{height:g=0,maxHeight:x=0,footerHeight:S,hScrollbarSize:_}=t;if(x>0){const E=v(h),T=v(n),I=v(d)+E+T+_;return Math.min(I,x-S)}return g-S}),a=F(()=>{const{maxHeight:g}=t,x=v(o);if(Xt(g)&&g>0)return x;const S=v(n)+v(d)+v(h);return Math.min(x,S)}),l=g=>g.width,c=F(()=>aw(v(i).map(l))),u=F(()=>aw(v(s).map(l))),d=F(()=>aw(t.headerHeight)),h=F(()=>{var g;return(((g=t.fixedData)==null?void 0:g.length)||0)*t.rowHeight}),f=F(()=>v(o)-v(d)-v(h)),p=F(()=>{const{style:g={},height:x,width:S}=t;return rh({...g,height:x,width:S})}),m=F(()=>rh({height:t.footerHeight})),b=F(()=>({top:xs(v(d)),bottom:xs(t.footerHeight),width:xs(t.width)}));return{bodyWidth:r,fixedTableHeight:a,mainTableHeight:o,leftTableWidth:c,rightTableWidth:u,windowHeight:f,footerHeight:m,emptyStyle:b,rootStyle:p,headerHeight:d}};function PTe(t){const e=X(),n=X(),i=X(),{columns:s,columnsStyles:r,columnsTotalWidth:o,fixedColumnsOnLeft:a,fixedColumnsOnRight:l,hasFixedColumns:c,mainColumns:u,onColumnSorted:d}=ETe(t,Ei(t,"columns"),Ei(t,"fixed")),{scrollTo:h,scrollToLeft:f,scrollToTop:p,scrollToRow:m,onScroll:b,onVerticalScroll:g,scrollPos:x}=CTe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:i,onMaybeEndReached:Me}),S=ht("table-v2"),_=xn(),E=wi(!1),{expandedRowKeys:T,lastRenderedRowIndex:A,isDynamic:I,isResetting:P,rowHeights:k,resetAfterIndex:B,onRowExpanded:R,onRowHeightChange:H,onRowHovered:q,onRowsRendered:oe}=TTe(t,{mainTableRef:e,leftTableRef:n,rightTableRef:i,tableInstance:_,ns:S,isScrolling:E}),{data:Z,depthMap:V}=MTe(t,{expandedRowKeys:T,lastRenderedRowIndex:A,resetAfterIndex:B}),D=F(()=>{const{estimatedRowHeight:ge,rowHeight:Qe}=t,G=v(Z);return Xt(ge)?Object.values(v(k)).reduce((ee,j)=>ee+j,0):G.length*Qe}),{bodyWidth:K,fixedTableHeight:W,mainTableHeight:Q,leftTableWidth:ie,rightTableWidth:ne,windowHeight:ce,footerHeight:ae,emptyStyle:_e,rootStyle:ke,headerHeight:Te}=kTe(t,{columnsTotalWidth:o,fixedColumnsOnLeft:a,fixedColumnsOnRight:l,rowsHeight:D}),Ke=X(),Fe=F(()=>{const ge=v(Z).length===0;return pt(t.fixedData)?t.fixedData.length===0&&ge:ge});function ve(ge){const{estimatedRowHeight:Qe,rowHeight:G,rowKey:ee}=t;return Qe?v(k)[v(Z)[ge][ee]]||Qe:G}const fe=X(!1);function Me(){const{onEndReached:ge}=t;if(!ge)return;const{scrollTop:Qe}=v(x),G=v(D),ee=v(ce),j=G-(Qe+ee)+t.hScrollbarSize;!fe.value&&v(A)>=0&&G<=Qe+v(Q)-v(Te)?(fe.value=!0,ge(j)):fe.value=!1}return We(()=>v(D),()=>fe.value=!1),We(()=>t.expandedRowKeys,ge=>T.value=ge,{deep:!0}),{columns:s,containerRef:Ke,mainTableRef:e,leftTableRef:n,rightTableRef:i,isDynamic:I,isResetting:P,isScrolling:E,hasFixedColumns:c,columnsStyles:r,columnsTotalWidth:o,data:Z,expandedRowKeys:T,depthMap:V,fixedColumnsOnLeft:a,fixedColumnsOnRight:l,mainColumns:u,bodyWidth:K,emptyStyle:_e,rootStyle:ke,footerHeight:ae,mainTableHeight:Q,fixedTableHeight:W,leftTableWidth:ie,rightTableWidth:ne,showEmpty:Fe,getRowHeight:ve,onColumnSorted:d,onRowHovered:q,onRowExpanded:R,onRowsRendered:oe,onRowHeightChange:H,scrollTo:h,scrollToLeft:f,scrollToTop:p,scrollToRow:m,onScroll:b,onVerticalScroll:g}}const r4=Symbol("tableV2"),JU="tableV2GridScrollLeft",QU=String,r1={type:Re(Array),required:!0},o4={type:Re(Array)},e$={...o4,required:!0},LTe=String,Y6={type:Re(Array),default:()=>ws([])},pf={type:Number,required:!0},t$={type:Re([String,Number,Symbol]),default:"id"},X6={type:Re(Object)},Cf=_t({class:String,columns:r1,columnsStyles:{type:Re(Object),required:!0},depth:Number,expandColumnKey:LTe,estimatedRowHeight:{...Bf.estimatedRowHeight,default:void 0},isScrolling:Boolean,onRowExpand:{type:Re(Function)},onRowHover:{type:Re(Function)},onRowHeightChange:{type:Re(Function)},rowData:{type:Re(Object),required:!0},rowEventHandlers:{type:Re(Object)},rowIndex:{type:Number,required:!0},rowKey:t$,style:{type:Re(Object)}}),pE={type:Number,required:!0},a4=_t({class:String,columns:r1,fixedHeaderData:{type:Re(Array)},headerData:{type:Re(Array),required:!0},headerHeight:{type:Re([Number,Array]),default:50},rowWidth:pE,rowHeight:{type:Number,default:50},height:pE,width:pE}),lw=_t({columns:r1,data:e$,fixedData:o4,estimatedRowHeight:Cf.estimatedRowHeight,width:pf,height:pf,headerWidth:pf,headerHeight:a4.headerHeight,bodyWidth:pf,rowHeight:pf,cache:yU.cache,useIsScrolling:Boolean,scrollbarAlwaysOn:Bf.scrollbarAlwaysOn,scrollbarStartGap:Bf.scrollbarStartGap,scrollbarEndGap:Bf.scrollbarEndGap,class:QU,style:X6,containerStyle:X6,getRowHeight:{type:Re(Function),required:!0},rowKey:Cf.rowKey,onRowsRendered:{type:Re(Function)},onScroll:{type:Re(Function)}}),ITe=_t({cache:lw.cache,estimatedRowHeight:Cf.estimatedRowHeight,rowKey:t$,headerClass:{type:Re([String,Function])},headerProps:{type:Re([Object,Function])},headerCellProps:{type:Re([Object,Function])},headerHeight:a4.headerHeight,footerHeight:{type:Number,default:0},rowClass:{type:Re([String,Function])},rowProps:{type:Re([Object,Function])},rowHeight:{type:Number,default:50},cellProps:{type:Re([Object,Function])},columns:r1,data:e$,dataGetter:{type:Re(Function)},fixedData:o4,expandColumnKey:Cf.expandColumnKey,expandedRowKeys:Y6,defaultExpandedRowKeys:Y6,class:QU,fixed:Boolean,style:{type:Re(Object)},width:pf,height:pf,maxHeight:Number,useIsScrolling:Boolean,indentSize:{type:Number,default:12},iconSize:{type:Number,default:12},hScrollbarSize:Bf.hScrollbarSize,vScrollbarSize:Bf.vScrollbarSize,scrollbarAlwaysOn:wU.alwaysOn,sortBy:{type:Re(Object),default:()=>({})},sortState:{type:Re(Object),default:void 0},onColumnSort:{type:Re(Function)},onExpandedRowsChange:{type:Re(Function)},onEndReached:{type:Re(Function)},onRowExpand:Cf.onRowExpand,onScroll:lw.onScroll,onRowsRendered:lw.onRowsRendered,rowEventHandlers:Cf.rowEventHandlers}),RTe="ElTableV2Header",OTe=Be({name:RTe,props:a4,setup(t,{slots:e,expose:n}){const i=ht("table-v2"),s=zt(JU),r=X(),o=F(()=>rh({width:t.width,height:t.height})),a=F(()=>rh({width:t.rowWidth,height:t.height})),l=F(()=>Pr(v(t.headerHeight))),c=h=>{const f=v(r);Nt(()=>{f?.scroll&&f.scroll({left:h})})},u=()=>{const h=i.e("fixed-header-row"),{columns:f,fixedHeaderData:p,rowHeight:m}=t;return p?.map((b,g)=>{var x;const S=rh({height:m,width:"100%"});return(x=e.fixed)==null?void 0:x.call(e,{class:h,columns:f,rowData:b,rowIndex:-(g+1),style:S})})},d=()=>{const h=i.e("dynamic-header-row"),{columns:f}=t;return v(l).map((p,m)=>{var b;const g=rh({width:"100%",height:p});return(b=e.dynamic)==null?void 0:b.call(e,{class:h,columns:f,headerIndex:m,style:g})})};return ec(()=>{s?.value&&c(s.value)}),n({scrollToLeft:c}),()=>{if(!(t.height<=0))return de("div",{ref:r,class:t.class,style:v(o),role:"rowgroup"},[de("div",{style:v(a),class:i.e("header")},[d(),u()])])}}});var DTe=OTe;const NTe=({atXEndEdge:t,atXStartEdge:e,atYEndEdge:n,atYStartEdge:i},s)=>{let r=null,o=0,a=0;const l=(u,d)=>{const h=u<=0&&e.value||u>=0&&t.value,f=d<=0&&i.value||d>=0&&n.value;return h&&f};return{hasReachedEdge:l,onWheel:u=>{nd(r);let d=u.deltaX,h=u.deltaY;Math.abs(d)>Math.abs(h)?h=0:d=0,u.shiftKey&&h!==0&&(d=h,h=0),!(l(o,a)&&l(o+d,a+h))&&(o+=d,a+=h,u.preventDefault(),r=Gc(()=>{s(o,a),o=0,a=0}))}}},BTe=(t,e,n,i,s,r,o)=>{const a=X(0),l=X(0);let c,u=0,d=0;const h=p=>{nd(c),a.value=p.touches[0].clientX,l.value=p.touches[0].clientY,u=0,d=0},f=p=>{p.preventDefault(),nd(c),u+=a.value-p.touches[0].clientX,d+=l.value-p.touches[0].clientY,a.value=p.touches[0].clientX,l.value=p.touches[0].clientY,c=Gc(()=>{const m=i.value-v(r),b=s.value-v(o),g=Math.min(e.value.scrollLeft+u,m),x=Math.min(e.value.scrollTop+d,b);n({scrollLeft:g,scrollTop:x}),u=0,d=0})};return xi(t,"touchstart",h,{passive:!0}),xi(t,"touchmove",f,{passive:!1}),{touchStartX:a,touchStartY:l,handleTouchStart:h,handleTouchMove:f}},n$=({name:t,clearCache:e,getColumnPosition:n,getColumnStartIndexForOffset:i,getColumnStopIndexForStartIndex:s,getEstimatedTotalHeight:r,getEstimatedTotalWidth:o,getColumnOffset:a,getRowOffset:l,getRowPosition:c,getRowStartIndexForOffset:u,getRowStopIndexForStartIndex:d,initCache:h,injectToInstance:f,validateProps:p})=>Be({name:t??"ElVirtualList",props:Bf,emits:[u2,d2],setup(m,{emit:b,expose:g,slots:x}){const S=ht("vl");p(m);const _=xn(),E=X(h(m,_));f?.(_,E);const T=X(),A=X(),I=X(),P=X(),k=X({isScrolling:!1,scrollLeft:Xt(m.initScrollLeft)?m.initScrollLeft:0,scrollTop:Xt(m.initScrollTop)?m.initScrollTop:0,updateRequested:!1,xAxisScrollDir:Im,yAxisScrollDir:Im}),B=pU(),R=F(()=>Number.parseInt(`${m.height}`,10)),H=F(()=>Number.parseInt(`${m.width}`,10)),q=F(()=>{const{totalColumn:re,totalRow:le,columnCache:Ce}=m,{isScrolling:Ee,xAxisScrollDir:Oe,scrollLeft:Ge}=v(k);if(re===0||le===0)return[0,0,0,0];const $e=i(m,Ge,v(E)),ot=s(m,$e,Ge,v(E)),dt=!Ee||Oe===h2?Math.max(1,Ce):1,Jt=!Ee||Oe===Im?Math.max(1,Ce):1;return[Math.max(0,$e-dt),Math.max(0,Math.min(re-1,ot+Jt)),$e,ot]}),oe=F(()=>{const{totalColumn:re,totalRow:le,rowCache:Ce}=m,{isScrolling:Ee,yAxisScrollDir:Oe,scrollTop:Ge}=v(k);if(re===0||le===0)return[0,0,0,0];const $e=u(m,Ge,v(E)),ot=d(m,$e,Ge,v(E)),dt=!Ee||Oe===h2?Math.max(1,Ce):1,Jt=!Ee||Oe===Im?Math.max(1,Ce):1;return[Math.max(0,$e-dt),Math.max(0,Math.min(le-1,ot+Jt)),$e,ot]}),Z=F(()=>r(m,v(E))),V=F(()=>o(m,v(E))),D=F(()=>{var re;return[{position:"relative",overflow:"hidden",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:m.direction,height:Xt(m.height)?`${m.height}px`:m.height,width:Xt(m.width)?`${m.width}px`:m.width},(re=m.style)!=null?re:{}]}),K=F(()=>{const re=`${v(V)}px`;return{height:`${v(Z)}px`,pointerEvents:v(k).isScrolling?"none":void 0,width:re,margin:0,boxSizing:"border-box"}}),W=()=>{const{totalColumn:re,totalRow:le}=m;if(re>0&&le>0){const[ot,dt,Jt,at]=v(q),[Mt,Bt,$t,Ze]=v(oe);b(u2,{columnCacheStart:ot,columnCacheEnd:dt,rowCacheStart:Mt,rowCacheEnd:Bt,columnVisibleStart:Jt,columnVisibleEnd:at,rowVisibleStart:$t,rowVisibleEnd:Ze})}const{scrollLeft:Ce,scrollTop:Ee,updateRequested:Oe,xAxisScrollDir:Ge,yAxisScrollDir:$e}=v(k);b(d2,{xAxisScrollDir:Ge,scrollLeft:Ce,yAxisScrollDir:$e,scrollTop:Ee,updateRequested:Oe})},Q=re=>{const{clientHeight:le,clientWidth:Ce,scrollHeight:Ee,scrollLeft:Oe,scrollTop:Ge,scrollWidth:$e}=re.currentTarget,ot=v(k);if(ot.scrollTop===Ge&&ot.scrollLeft===Oe)return;let dt=Oe;if(I6(m.direction))switch(p2()){case ey:dt=-Oe;break;case Qk:dt=$e-Ce-Oe;break}k.value={...ot,isScrolling:!0,scrollLeft:dt,scrollTop:Math.max(0,Math.min(Ge,Ee-le)),updateRequested:!0,xAxisScrollDir:Sf(ot.scrollLeft,dt),yAxisScrollDir:Sf(ot.scrollTop,Ge)},Nt(()=>fe()),Me(),W()},ie=(re,le)=>{const Ce=v(R),Ee=(Z.value-Ce)/le*re;ae({scrollTop:Math.min(Z.value-Ce,Ee)})},ne=(re,le)=>{const Ce=v(H),Ee=(V.value-Ce)/le*re;ae({scrollLeft:Math.min(V.value-Ce,Ee)})},{onWheel:ce}=NTe({atXStartEdge:F(()=>k.value.scrollLeft<=0),atXEndEdge:F(()=>k.value.scrollLeft>=V.value-v(H)),atYStartEdge:F(()=>k.value.scrollTop<=0),atYEndEdge:F(()=>k.value.scrollTop>=Z.value-v(R))},(re,le)=>{var Ce,Ee,Oe,Ge;(Ee=(Ce=A.value)==null?void 0:Ce.onMouseUp)==null||Ee.call(Ce),(Ge=(Oe=I.value)==null?void 0:Oe.onMouseUp)==null||Ge.call(Oe);const $e=v(H),ot=v(R);ae({scrollLeft:Math.min(k.value.scrollLeft+re,V.value-$e),scrollTop:Math.min(k.value.scrollTop+le,Z.value-ot)})});xi(T,"wheel",ce,{passive:!1});const ae=({scrollLeft:re=k.value.scrollLeft,scrollTop:le=k.value.scrollTop})=>{re=Math.max(re,0),le=Math.max(le,0);const Ce=v(k);le===Ce.scrollTop&&re===Ce.scrollLeft||(k.value={...Ce,xAxisScrollDir:Sf(Ce.scrollLeft,re),yAxisScrollDir:Sf(Ce.scrollTop,le),scrollLeft:re,scrollTop:le,updateRequested:!0},Nt(()=>fe()),Me(),W())},{touchStartX:_e,touchStartY:ke,handleTouchStart:Te,handleTouchMove:Ke}=BTe(T,k,ae,V,Z,H,R),Fe=(re=0,le=0,Ce=il)=>{const Ee=v(k);le=Math.max(0,Math.min(le,m.totalColumn-1)),re=Math.max(0,Math.min(re,m.totalRow-1));const Oe=Z9(S.namespace.value),Ge=v(E),$e=r(m,Ge),ot=o(m,Ge);ae({scrollLeft:a(m,le,Ce,Ee.scrollLeft,Ge,ot>m.width?Oe:0),scrollTop:l(m,re,Ce,Ee.scrollTop,Ge,$e>m.height?Oe:0)})},ve=(re,le)=>{const{columnWidth:Ce,direction:Ee,rowHeight:Oe}=m,Ge=B.value(e&&Ce,e&&Oe,e&&Ee),$e=`${re},${le}`;if(fi(Ge,$e))return Ge[$e];{const[,ot]=n(m,le,v(E)),dt=v(E),Jt=I6(Ee),[at,Mt]=c(m,re,dt),[Bt]=n(m,le,dt);return Ge[$e]={position:"absolute",left:Jt?void 0:`${ot}px`,right:Jt?`${ot}px`:void 0,top:`${Mt}px`,height:`${at}px`,width:`${Bt}px`},Ge[$e]}},fe=()=>{k.value.isScrolling=!1,Nt(()=>{B.value(-1,null,null)})};mn(()=>{if(!pi)return;const{initScrollLeft:re,initScrollTop:le}=m,Ce=v(T);Ce&&(Xt(re)&&(Ce.scrollLeft=re),Xt(le)&&(Ce.scrollTop=le)),W()});const Me=()=>{const{direction:re}=m,{scrollLeft:le,scrollTop:Ce,updateRequested:Ee}=v(k),Oe=v(T);if(Ee&&Oe){if(re===Vm)switch(p2()){case ey:{Oe.scrollLeft=-le;break}case Jk:{Oe.scrollLeft=le;break}default:{const{clientWidth:Ge,scrollWidth:$e}=Oe;Oe.scrollLeft=$e-Ge-le;break}}else Oe.scrollLeft=Math.max(0,le);Oe.scrollTop=Math.max(0,Ce)}},{resetAfterColumnIndex:ge,resetAfterRowIndex:Qe,resetAfter:G}=_.proxy;g({windowRef:T,innerRef:P,getItemStyleCache:B,touchStartX:_e,touchStartY:ke,handleTouchStart:Te,handleTouchMove:Ke,scrollTo:ae,scrollToItem:Fe,states:k,resetAfterColumnIndex:ge,resetAfterRowIndex:Qe,resetAfter:G});const ee=()=>{const{scrollbarAlwaysOn:re,scrollbarStartGap:le,scrollbarEndGap:Ce,totalColumn:Ee,totalRow:Oe}=m,Ge=v(H),$e=v(R),ot=v(V),dt=v(Z),{scrollLeft:Jt,scrollTop:at}=v(k),Mt=tn(eM,{ref:A,alwaysOn:re,startGap:le,endGap:Ce,class:S.e("horizontal"),clientSize:Ge,layout:"horizontal",onScroll:ne,ratio:Ge*100/ot,scrollFrom:Jt/(ot-Ge),total:Oe,visible:!0}),Bt=tn(eM,{ref:I,alwaysOn:re,startGap:le,endGap:Ce,class:S.e("vertical"),clientSize:$e,layout:"vertical",onScroll:ie,ratio:$e*100/dt,scrollFrom:at/(dt-$e),total:Ee,visible:!0});return{horizontalScrollbar:Mt,verticalScrollbar:Bt}},j=()=>{var re;const[le,Ce]=v(q),[Ee,Oe]=v(oe),{data:Ge,totalColumn:$e,totalRow:ot,useIsScrolling:dt,itemKey:Jt}=m,at=[];if(ot>0&&$e>0)for(let Mt=Ee;Mt<=Oe;Mt++)for(let Bt=le;Bt<=Ce;Bt++){const $t=Jt({columnIndex:Bt,data:Ge,rowIndex:Mt});at.push(tn(At,{key:$t},(re=x.default)==null?void 0:re.call(x,{columnIndex:Bt,data:Ge,isScrolling:dt?v(k).isScrolling:void 0,style:ve(Mt,Bt),rowIndex:Mt})))}return at},he=()=>{const re=Sn(m.innerElement),le=j();return[tn(re,Dn(m.innerProps,{style:v(K),ref:P}),Gt(re)?le:{default:()=>le})]};return()=>{const re=Sn(m.containerElement),{horizontalScrollbar:le,verticalScrollbar:Ce}=ee(),Ee=he();return tn("div",{key:0,class:S.e("wrapper"),role:m.role},[tn(re,{class:m.className,style:v(D),onScroll:Q,ref:T},Gt(re)?Ee:{default:()=>Ee}),le,Ce])}}}),{max:v2,min:i$,floor:s$}=Math,FTe={column:"columnWidth",row:"rowHeight"},hM={column:"lastVisitedColumnIndex",row:"lastVisitedRowIndex"},Pu=(t,e,n,i)=>{const[s,r,o]=[n[i],t[FTe[i]],n[hM[i]]];if(e>o){let a=0;if(o>=0){const l=s[o];a=l.offset+l.size}for(let l=o+1;l<=e;l++){const c=r(l);s[l]={offset:a,size:c},a+=c}n[hM[i]]=e}return s[e]},r$=(t,e,n,i,s,r)=>{for(;n<=i;){const o=n+s$((i-n)/2),a=Pu(t,o,e,r).offset;if(a===s)return o;a{const r=s==="column"?t.totalColumn:t.totalRow;let o=1;for(;n{const[s,r]=[e[i],e[hM[i]]];return(r>0?s[r].offset:0)>=n?r$(t,e,0,r,n,i):zTe(t,e,v2(0,r),n,i)},o$=({totalRow:t},{estimatedRowHeight:e,lastVisitedRowIndex:n,row:i})=>{let s=0;if(n>=t&&(n=t-1),n>=0){const a=i[n];s=a.offset+a.size}const o=(t-n-1)*e;return s+o},a$=({totalColumn:t},{column:e,estimatedColumnWidth:n,lastVisitedColumnIndex:i})=>{let s=0;if(i>t&&(i=t-1),i>=0){const a=e[i];s=a.offset+a.size}const o=(t-i-1)*n;return s+o},UTe={column:a$,row:o$},J6=(t,e,n,i,s,r,o)=>{const[a,l]=[r==="row"?t.height:t.width,UTe[r]],c=Pu(t,e,s,r),u=l(t,s),d=v2(0,i$(u-a,c.offset)),h=v2(0,c.offset-a+o+c.size);switch(n===$x&&(i>=h-a&&i<=d+a?n=il:n=Pc),n){case J0:return d;case Q0:return h;case Pc:return Math.round(h+(d-h)/2);case il:default:return i>=h&&i<=d?i:h>d||i{const i=Pu(t,e,n,"column");return[i.size,i.offset]},getRowPosition:(t,e,n)=>{const i=Pu(t,e,n,"row");return[i.size,i.offset]},getColumnOffset:(t,e,n,i,s,r)=>J6(t,e,n,i,s,"column",r),getRowOffset:(t,e,n,i,s,r)=>J6(t,e,n,i,s,"row",r),getColumnStartIndexForOffset:(t,e,n)=>Z6(t,n,e,"column"),getColumnStopIndexForStartIndex:(t,e,n,i)=>{const s=Pu(t,e,i,"column"),r=n+t.width;let o=s.offset+s.size,a=e;for(;aZ6(t,n,e,"row"),getRowStopIndexForStartIndex:(t,e,n,i)=>{const{totalRow:s,height:r}=t,o=Pu(t,e,i,"row"),a=n+r;let l=o.size+o.offset,c=e;for(;c{const n=({columnIndex:r,rowIndex:o},a)=>{var l,c;a=ri(a)?!0:a,Xt(r)&&(e.value.lastVisitedColumnIndex=Math.min(e.value.lastVisitedColumnIndex,r-1)),Xt(o)&&(e.value.lastVisitedRowIndex=Math.min(e.value.lastVisitedRowIndex,o-1)),(l=t.exposed)==null||l.getItemStyleCache.value(-1,null,null),a&&((c=t.proxy)==null||c.$forceUpdate())},i=(r,o)=>{n({columnIndex:r},o)},s=(r,o)=>{n({rowIndex:r},o)};Object.assign(t.proxy,{resetAfterColumnIndex:i,resetAfterRowIndex:s,resetAfter:n})},initCache:({estimatedColumnWidth:t=qT,estimatedRowHeight:e=qT})=>({column:{},estimatedColumnWidth:t,estimatedRowHeight:e,lastVisitedColumnIndex:-1,lastVisitedRowIndex:-1,row:{}}),clearCache:!1,validateProps:({columnWidth:t,rowHeight:e})=>{}}),VTe=n$({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},i,s,r,o,a)=>{n=Number(n);const l=Math.max(0,t*e-n),c=Math.min(l,i*e),u=Math.max(0,i*e-n+a+e);switch(s==="smart"&&(r>=u-n&&r<=c+n?s=il:s=Pc),s){case J0:return c;case Q0:return u;case Pc:{const d=Math.round(u+(c-u)/2);return dl+Math.floor(n/2)?l:d}case il:default:return r>=u&&r<=c?r:u>c||r{e=Number(e);const l=Math.max(0,n*t-e),c=Math.min(l,i*t),u=Math.max(0,i*t-e+a+t);switch(s===$x&&(r>=u-e&&r<=c+e?s=il:s=Pc),s){case J0:return c;case Q0:return u;case Pc:{const d=Math.round(u+(c-u)/2);return dl+Math.floor(e/2)?l:d}case il:default:return r>=u&&r<=c?r:u>c||rMath.max(0,Math.min(e-1,Math.floor(n/t))),getColumnStopIndexForStartIndex:({columnWidth:t,totalColumn:e,width:n},i,s)=>{const r=i*t,o=Math.ceil((n+s-r)/t);return Math.max(0,Math.min(e-1,i+o-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},i,s)=>{const r=i*t,o=Math.ceil((n+s-r)/t);return Math.max(0,Math.min(e-1,i+o-1))},initCache:()=>{},clearCache:!0,validateProps:({columnWidth:t,rowHeight:e})=>{}}),HTe="ElTableV2Grid",WTe=t=>{const e=X(),n=X(),i=X(0),s=F(()=>{const{data:b,rowHeight:g,estimatedRowHeight:x}=t;if(!x)return b.length*g}),r=F(()=>{const{fixedData:b,rowHeight:g}=t;return(b?.length||0)*g}),o=F(()=>aw(t.headerHeight)),a=F(()=>{const{height:b}=t;return Math.max(0,b-v(o)-v(r))}),l=F(()=>v(o)+v(r)>0),c=({data:b,rowIndex:g})=>b[g][t.rowKey];function u({rowCacheStart:b,rowCacheEnd:g,rowVisibleStart:x,rowVisibleEnd:S}){var _;(_=t.onRowsRendered)==null||_.call(t,{rowCacheStart:b,rowCacheEnd:g,rowVisibleStart:x,rowVisibleEnd:S})}function d(b,g){var x;(x=n.value)==null||x.resetAfterRowIndex(b,g)}function h(b,g){const x=v(e),S=v(n);Mn(b)?(x?.scrollToLeft(b.scrollLeft),i.value=b.scrollLeft,S?.scrollTo(b)):(x?.scrollToLeft(b),i.value=b,S?.scrollTo({scrollLeft:b,scrollTop:g}))}function f(b){var g;(g=v(n))==null||g.scrollTo({scrollTop:b})}function p(b,g){var x;(x=v(n))==null||x.scrollToItem(b,1,g)}function m(){var b,g;(b=v(n))==null||b.$forceUpdate(),(g=v(e))==null||g.$forceUpdate()}return We(()=>t.bodyWidth,()=>{var b;Xt(t.estimatedRowHeight)&&((b=n.value)==null||b.resetAfter({columnIndex:0},!1))}),{bodyRef:n,forceUpdate:m,fixedRowHeight:r,gridHeight:a,hasHeader:l,headerHeight:o,headerRef:e,totalHeight:s,itemKey:c,onItemRendered:u,resetAfterRowIndex:d,scrollTo:h,scrollToTop:f,scrollToRow:p,scrollLeft:i}},GTe=Be({name:HTe,props:lw,setup(t,{slots:e,expose:n}){const{ns:i}=zt(r4),{bodyRef:s,fixedRowHeight:r,gridHeight:o,hasHeader:a,headerRef:l,headerHeight:c,totalHeight:u,forceUpdate:d,itemKey:h,onItemRendered:f,resetAfterRowIndex:p,scrollTo:m,scrollToTop:b,scrollToRow:g,scrollLeft:x}=WTe(t);Xn(JU,x),rx(async()=>{var _;await Nt();const E=(_=s.value)==null?void 0:_.states.scrollTop;E&&b(Math.round(E)+1)}),n({forceUpdate:d,totalHeight:u,scrollTo:m,scrollToTop:b,scrollToRow:g,resetAfterRowIndex:p});const S=()=>t.bodyWidth;return()=>{const{cache:_,columns:E,data:T,fixedData:A,useIsScrolling:I,scrollbarAlwaysOn:P,scrollbarEndGap:k,scrollbarStartGap:B,style:R,rowHeight:H,bodyWidth:q,estimatedRowHeight:oe,headerWidth:Z,height:V,width:D,getRowHeight:K,onScroll:W}=t,Q=Xt(oe),ie=Q?$Te:VTe,ne=v(c);return de("div",{role:"table",class:[i.e("table"),t.class],style:R},[de(ie,{ref:s,data:T,useIsScrolling:I,itemKey:h,columnCache:0,columnWidth:Q?S:q,totalColumn:1,totalRow:T.length,rowCache:_,rowHeight:Q?K:H,width:D,height:v(o),class:i.e("body"),role:"rowgroup",scrollbarStartGap:B,scrollbarEndGap:k,scrollbarAlwaysOn:P,onScroll:W,onItemRendered:f,perfMode:!1},{default:ce=>{var ae;const _e=T[ce.rowIndex];return(ae=e.row)==null?void 0:ae.call(e,{...ce,columns:E,rowData:_e})}}),v(a)&&de(DTe,{ref:l,class:i.e("header-wrapper"),columns:E,headerData:T,headerHeight:t.headerHeight,fixedHeaderData:A,rowWidth:Z,rowHeight:H,width:D,height:Math.min(ne+v(r),V)},{dynamic:e.header,fixed:e.row})])}}});var l4=GTe;function jTe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const KTe=(t,{slots:e})=>{const{mainTableRef:n,...i}=t;return de(l4,Dn({ref:n},i),jTe(e)?e:{default:()=>[e]})};var qTe=KTe;function YTe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const XTe=(t,{slots:e})=>{if(!t.columns.length)return;const{leftTableRef:n,...i}=t;return de(l4,Dn({ref:n},i),YTe(e)?e:{default:()=>[e]})};var ZTe=XTe;function JTe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const QTe=(t,{slots:e})=>{if(!t.columns.length)return;const{rightTableRef:n,...i}=t;return de(l4,Dn({ref:n},i),JTe(e)?e:{default:()=>[e]})};var eMe=QTe;const tMe=t=>{const{isScrolling:e}=zt(r4),n=X(!1),i=X(),s=F(()=>Xt(t.estimatedRowHeight)&&t.rowIndex>=0),r=(l=!1)=>{const c=v(i);if(!c)return;const{columns:u,onRowHeightChange:d,rowKey:h,rowIndex:f,style:p}=t,{height:m}=c.getBoundingClientRect();n.value=!0,Nt(()=>{if(l||m!==Number.parseInt(p.height)){const b=u[0],g=b?.placeholderSign===iy;d?.({rowKey:h,height:m,rowIndex:f},b&&!g&&b.fixed)}})},o=F(()=>{const{rowData:l,rowIndex:c,rowKey:u,onRowHover:d}=t,h=t.rowEventHandlers||{},f={};return Object.entries(h).forEach(([p,m])=>{Kt(m)&&(f[p]=b=>{m({event:b,rowData:l,rowIndex:c,rowKey:u})})}),d&&[{name:"onMouseleave",hovered:!1},{name:"onMouseenter",hovered:!0}].forEach(({name:p,hovered:m})=>{const b=f[p];f[p]=g=>{d({event:g,hovered:m,rowData:l,rowIndex:c,rowKey:u}),b?.(g)}}),f}),a=l=>{const{onRowExpand:c,rowData:u,rowIndex:d,rowKey:h}=t;c?.({expanded:l,rowData:u,rowIndex:d,rowKey:h})};return mn(()=>{v(s)&&r(!0)}),{isScrolling:e,measurable:s,measured:n,rowRef:i,eventHandlers:o,onExpand:a}},nMe="ElTableV2TableRow",iMe=Be({name:nMe,props:Cf,setup(t,{expose:e,slots:n,attrs:i}){const{eventHandlers:s,isScrolling:r,measurable:o,measured:a,rowRef:l,onExpand:c}=tMe(t);return e({onExpand:c}),()=>{const{columns:u,columnsStyles:d,expandColumnKey:h,depth:f,rowData:p,rowIndex:m,style:b}=t;let g=u.map((x,S)=>{const _=pt(p.children)&&p.children.length>0&&x.key===h;return n.cell({column:x,columns:u,columnIndex:S,depth:f,style:d[x.key],rowData:p,rowIndex:m,isScrolling:v(r),expandIconProps:_?{rowData:p,rowIndex:m,onExpand:c}:void 0})});if(n.row&&(g=n.row({cells:g.map(x=>pt(x)&&x.length===1?x[0]:x),style:b,columns:u,depth:f,rowData:p,rowIndex:m,isScrolling:v(r)})),v(o)){const{height:x,...S}=b||{},_=v(a);return de("div",Dn({ref:l,class:t.class,style:_?b:S,role:"row"},i,v(s)),[g])}return de("div",Dn(i,{ref:l,class:t.class,style:b,role:"row"},v(s)),[g])}}});var sMe=iMe;function rMe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const oMe=(t,{slots:e})=>{const{columns:n,columnsStyles:i,depthMap:s,expandColumnKey:r,expandedRowKeys:o,estimatedRowHeight:a,hasFixedColumns:l,rowData:c,rowIndex:u,style:d,isScrolling:h,rowProps:f,rowClass:p,rowKey:m,rowEventHandlers:b,ns:g,onRowHovered:x,onRowExpanded:S}=t,_=Kf(p,{columns:n,rowData:c,rowIndex:u},""),E=Kf(f,{columns:n,rowData:c,rowIndex:u}),T=c[m],A=s[T]||0,I=!!r,P=u<0,k=[g.e("row"),_,g.is("expanded",I&&o.includes(T)),g.is("fixed",!A&&P),g.is("customized",!!e.row),{[g.e(`row-depth-${A}`)]:I&&u>=0}],B=l?x:void 0,R={...E,columns:n,columnsStyles:i,class:k,depth:A,expandColumnKey:r,estimatedRowHeight:P?void 0:a,isScrolling:h,rowIndex:u,rowData:c,rowKey:T,rowEventHandlers:b,style:d};return de(sMe,Dn(R,{onRowExpand:S,onMouseenter:oe=>{B?.({hovered:!0,rowKey:T,event:oe,rowData:c,rowIndex:u})},onMouseleave:oe=>{B?.({hovered:!1,rowKey:T,event:oe,rowData:c,rowIndex:u})},rowkey:T}),rMe(e)?e:{default:()=>[e]})};var aMe=oMe;const c4=(t,{slots:e})=>{var n;const{cellData:i,style:s}=t,r=((n=i?.toString)==null?void 0:n.call(i))||"",o=Ue(e,"default",t,()=>[r]);return de("div",{class:t.class,title:r,style:s},[o])};c4.displayName="ElTableV2Cell";c4.inheritAttrs=!1;var lMe=c4;const cMe=t=>{const{expanded:e,expandable:n,onExpand:i,style:s,size:r,ariaLabel:o}=t,a={onClick:n?()=>i(!e):void 0,ariaLabel:o,ariaExpanded:e,class:t.class};return de("button",Dn(a,{type:"button"}),[de(Ut,{size:r,style:s},{default:()=>[de(So,null,null)]})])};var uMe=cMe;const l$=({columns:t,column:e,columnIndex:n,depth:i,expandIconProps:s,isScrolling:r,rowData:o,rowIndex:a,style:l,expandedRowKeys:c,ns:u,t:d,cellProps:h,expandColumnKey:f,indentSize:p,iconSize:m,rowKey:b},{slots:g})=>{const x=rh(l);if(e.placeholderSign===iy)return de("div",{class:u.em("row-cell","placeholder"),style:x},null);const{cellRenderer:S,dataKey:_,dataGetter:E}=e,T=Kt(E)?E({columns:t,column:e,columnIndex:n,rowData:o,rowIndex:a}):js(o,_??""),A=Kf(h,{cellData:T,columns:t,column:e,columnIndex:n,rowIndex:a,rowData:o}),I={class:u.e("cell-text"),columns:t,column:e,columnIndex:n,cellData:T,isScrolling:r,rowData:o,rowIndex:a},P=ZU(S),k=P?P(I):Ue(g,"default",I,()=>[de(lMe,I,null)]),B=[u.e("row-cell"),e.class,e.align===ny.CENTER&&u.is("align-center"),e.align===ny.RIGHT&&u.is("align-right")],R=a>=0&&f&&e.key===f,H=a>=0&&c.includes(o[b]);let q;const oe=`margin-inline-start: ${i*p}px;`;return R&&(Mn(s)?q=de(uMe,Dn(s,{class:[u.e("expand-icon"),u.is("expanded",H)],size:m,expanded:H,ariaLabel:d(H?"el.table.collapseRowLabel":"el.table.expandRowLabel"),style:oe,expandable:!0}),null):q=de("div",{style:[oe,`width: ${m}px; height: ${m}px;`].join(" ")},null)),de("div",Dn({class:B,style:x},A,{role:"cell"}),[q,k])};l$.inheritAttrs=!1;var Q6=l$;const dMe=_t({class:String,columns:r1,columnsStyles:{type:Re(Object),required:!0},headerIndex:Number,style:{type:Re(Object)}}),hMe=Be({name:"ElTableV2HeaderRow",props:dMe,setup(t,{slots:e}){return()=>{const{columns:n,columnsStyles:i,headerIndex:s,style:r}=t;let o=n.map((a,l)=>e.cell({columns:n,column:a,columnIndex:l,headerIndex:s,style:i[a.key]}));return e.header&&(o=e.header({cells:o.map(a=>pt(a)&&a.length===1?a[0]:a),columns:n,headerIndex:s})),de("div",{class:t.class,style:r,role:"row"},[o])}}});var fMe=hMe;function pMe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const mMe=({columns:t,columnsStyles:e,headerIndex:n,style:i,headerClass:s,headerProps:r,ns:o},{slots:a})=>{const l={columns:t,headerIndex:n},c=[o.e("header-row"),Kf(s,l,""),o.is("customized",!!a.header)],u={...Kf(r,l),columnsStyles:e,class:c,columns:t,headerIndex:n,style:i};return de(fMe,u,pMe(a)?a:{default:()=>[a]})};var gMe=mMe;const u4=(t,{slots:e})=>Ue(e,"default",t,()=>{var n,i;return[de("div",{class:t.class,title:(n=t.column)==null?void 0:n.title},[(i=t.column)==null?void 0:i.title])]});u4.displayName="ElTableV2HeaderCell";u4.inheritAttrs=!1;var vMe=u4;const yMe=t=>{const{sortOrder:e}=t;return de("button",{type:"button","aria-label":t.ariaLabel,class:t.class},[de(Ut,{size:14},{default:()=>[e===Ef.ASC?de(Sde,null,null):de(wde,null,null)]})])};var bMe=yMe;const _Me=(t,{slots:e})=>{const{column:n,ns:i,t:s,style:r,onColumnSorted:o}=t,a=rh(r);if(n.placeholderSign===iy)return de("div",{class:i.em("header-row-cell","placeholder"),style:a},null);const{headerCellRenderer:l,headerClass:c,sortable:u}=n,d={...t,class:i.e("header-cell-text")},h=ZU(l),f=h?h(d):Ue(e,"default",d,()=>[de(vMe,d,null)]),{sortBy:p,sortState:m,headerCellProps:b}=t;let g,x,S;if(m){const T=m[n.key];g=!!dM[T],x=g?T:Ef.ASC}else g=n.key===p.key,x=g?p.order:Ef.ASC;x===Ef.ASC?S="ascending":x===Ef.DESC?S="descending":S=void 0;const _=[i.e("header-cell"),Kf(c,t,""),n.align===ny.CENTER&&i.is("align-center"),n.align===ny.RIGHT&&i.is("align-right"),u&&i.is("sortable")],E={...Kf(b,t),onClick:n.sortable?o:void 0,ariaSort:u?S:void 0,class:_,style:a,"data-key":n.key};return de("div",Dn(E,{role:"columnheader"}),[f,u&&de(bMe,{class:[i.e("sort-icon"),g&&i.is("sorting")],sortOrder:x,ariaLabel:s("el.table.sortLabel",{column:n.title||""})},null)])};var e5=_Me;const c$=(t,{slots:e})=>{var n;return de("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};c$.displayName="ElTableV2Footer";var wMe=c$;const u$=(t,{slots:e})=>{const n=Ue(e,"default",{},()=>[de(eU,null,null)]);return de("div",{class:t.class,style:t.style},[n])};u$.displayName="ElTableV2Empty";var xMe=u$;const d$=(t,{slots:e})=>{var n;return de("div",{class:t.class,style:t.style},[(n=e.default)==null?void 0:n.call(e)])};d$.displayName="ElTableV2Overlay";var SMe=d$;function _v(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!Yi(t)}const EMe="ElTableV2",CMe=Be({name:EMe,props:ITe,setup(t,{slots:e,expose:n}){const i=ht("table-v2"),{t:s}=Jn(),{columnsStyles:r,fixedColumnsOnLeft:o,fixedColumnsOnRight:a,mainColumns:l,mainTableHeight:c,fixedTableHeight:u,leftTableWidth:d,rightTableWidth:h,data:f,depthMap:p,expandedRowKeys:m,hasFixedColumns:b,mainTableRef:g,leftTableRef:x,rightTableRef:S,isDynamic:_,isResetting:E,isScrolling:T,bodyWidth:A,emptyStyle:I,rootStyle:P,footerHeight:k,showEmpty:B,scrollTo:R,scrollToLeft:H,scrollToTop:q,scrollToRow:oe,getRowHeight:Z,onColumnSorted:V,onRowHeightChange:D,onRowHovered:K,onRowExpanded:W,onRowsRendered:Q,onScroll:ie,onVerticalScroll:ne}=PTe(t);return n({scrollTo:R,scrollToLeft:H,scrollToTop:q,scrollToRow:oe}),Xn(r4,{ns:i,isResetting:E,isScrolling:T}),()=>{const{cache:ce,cellProps:ae,estimatedRowHeight:_e,expandColumnKey:ke,fixedData:Te,headerHeight:Ke,headerClass:Fe,headerProps:ve,headerCellProps:fe,sortBy:Me,sortState:ge,rowHeight:Qe,rowClass:G,rowEventHandlers:ee,rowKey:j,rowProps:he,scrollbarAlwaysOn:be,indentSize:re,iconSize:le,useIsScrolling:Ce,vScrollbarSize:Ee,width:Oe}=t,Ge=v(f),$e={cache:ce,class:i.e("main"),columns:v(l),data:Ge,fixedData:Te,estimatedRowHeight:_e,bodyWidth:v(A),headerHeight:Ke,headerWidth:v(A),height:v(c),mainTableRef:g,rowKey:j,rowHeight:Qe,scrollbarAlwaysOn:be,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:Ce,width:Oe,getRowHeight:Z,onRowsRendered:Q,onScroll:ie},ot=v(d),dt=v(u),Jt={cache:ce,class:i.e("left"),columns:v(o),data:Ge,fixedData:Te,estimatedRowHeight:_e,leftTableRef:x,rowHeight:Qe,bodyWidth:ot,headerWidth:ot,headerHeight:Ke,height:dt,rowKey:j,scrollbarAlwaysOn:be,scrollbarStartGap:2,scrollbarEndGap:Ee,useIsScrolling:Ce,width:ot,getRowHeight:Z,onScroll:ne},at=v(h),Mt={cache:ce,class:i.e("right"),columns:v(a),data:Ge,fixedData:Te,estimatedRowHeight:_e,rightTableRef:S,rowHeight:Qe,bodyWidth:at,headerWidth:at,headerHeight:Ke,height:dt,rowKey:j,scrollbarAlwaysOn:be,scrollbarStartGap:2,scrollbarEndGap:Ee,width:at,style:`${i.cssVarName("table-scrollbar-size")}: ${Ee}px`,useIsScrolling:Ce,getRowHeight:Z,onScroll:ne},Bt=v(r),$t={ns:i,depthMap:v(p),columnsStyles:Bt,expandColumnKey:ke,expandedRowKeys:v(m),estimatedRowHeight:_e,hasFixedColumns:v(b),rowProps:he,rowClass:G,rowKey:j,rowEventHandlers:ee,onRowHovered:K,onRowExpanded:W,onRowHeightChange:D},Ze={cellProps:ae,expandColumnKey:ke,indentSize:re,iconSize:le,rowKey:j,expandedRowKeys:v(m),ns:i,t:s},vt={ns:i,headerClass:Fe,headerProps:ve,columnsStyles:Bt},qe={ns:i,t:s,sortBy:Me,sortState:ge,headerCellProps:fe,onColumnSorted:V},kt={row:Ne=>de(aMe,Dn(Ne,$t),{row:e.row,cell:et=>{let ut;return e.cell?de(Q6,Dn(et,Ze,{style:Bt[et.column.key]}),_v(ut=e.cell(et))?ut:{default:()=>[ut]}):de(Q6,Dn(et,Ze,{style:Bt[et.column.key]}),null)}}),header:Ne=>de(gMe,Dn(Ne,vt),{header:e.header,cell:et=>{let ut;return e["header-cell"]?de(e5,Dn(et,qe,{style:Bt[et.column.key]}),_v(ut=e["header-cell"](et))?ut:{default:()=>[ut]}):de(e5,Dn(et,qe,{style:Bt[et.column.key]}),null)}})},Je=[t.class,i.b(),i.e("root"),i.is("dynamic",v(_))],Ft={class:i.e("footer"),style:v(k)};return de("div",{class:Je,style:v(P)},[de(qTe,$e,_v(kt)?kt:{default:()=>[kt]}),de(ZTe,Jt,_v(kt)?kt:{default:()=>[kt]}),de(eMe,Mt,_v(kt)?kt:{default:()=>[kt]}),e.footer&&de(wMe,Ft,{default:e.footer}),v(B)&&de(xMe,{class:i.e("empty"),style:v(I)},{default:e.empty}),e.overlay&&de(SMe,{class:i.e("overlay")},{default:e.overlay})])}}});var TMe=CMe;const MMe=_t({disableWidth:Boolean,disableHeight:Boolean,onResize:{type:Re(Function)}}),AMe=t=>{const e=X(),n=X(0),i=X(0);let s;return mn(()=>{s=as(e,([r])=>{const{width:o,height:a}=r.contentRect,{paddingLeft:l,paddingRight:c,paddingTop:u,paddingBottom:d}=getComputedStyle(r.target),h=Number.parseInt(l)||0,f=Number.parseInt(c)||0,p=Number.parseInt(u)||0,m=Number.parseInt(d)||0;n.value=o-h-f,i.value=a-p-m}).stop}),gi(()=>{s?.()}),We([n,i],([r,o])=>{var a;(a=t.onResize)==null||a.call(t,{width:r,height:o})}),{sizer:e,width:n,height:i}},kMe=Be({name:"ElAutoResizer",props:MMe,setup(t,{slots:e}){const n=ht("auto-resizer"),{height:i,width:s,sizer:r}=AMe(t),o={width:"100%",height:"100%"};return()=>{var a;return de("div",{ref:r,class:n.b(),style:o},[(a=e.default)==null?void 0:a.call(e,{height:i.value,width:s.value})])}}});var PMe=kMe;const LMe=En(TMe),IMe=En(PMe),Vx=Symbol("tabsRootContextKey"),RMe=_t({tabs:{type:Re(Array),default:()=>ws([])},tabRefs:{type:Re(Object),default:()=>ws({})}}),t5="ElTabBar",OMe=Be({name:t5,__name:"tab-bar",props:RMe,setup(t,{expose:e}){const n=t,i=zt(Vx);i||Ks(t5,"");const s=ht("tabs"),r=X(),o=X(),a=F(()=>{var f;return ri(i.props.defaultValue)||!!((f=o.value)!=null&&f.transform)}),l=()=>{let f=0,p=0;const m=["top","bottom"].includes(i.props.tabPosition)?"width":"height",b=m==="width"?"x":"y",g=b==="x"?"left":"top";return n.tabs.every(x=>{if(ri(x.paneName))return!1;const S=n.tabRefs[x.paneName];if(!S)return!1;if(!x.active)return!0;f=S[`offset${th(g)}`],p=S[`client${th(m)}`];const _=window.getComputedStyle(S);return m==="width"&&(p-=Number.parseFloat(_.paddingLeft)+Number.parseFloat(_.paddingRight),f+=Number.parseFloat(_.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${th(b)}(${f}px)`}},c=()=>o.value=l(),u=[],d=()=>{u.forEach(f=>f.stop()),u.length=0,Object.values(n.tabRefs).forEach(f=>{u.push(as(f,c))})};We(()=>n.tabs,async()=>{await Nt(),c(),d()},{immediate:!0});const h=as(r,()=>c());return gi(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:r,update:c}),(f,p)=>a.value?(z(),se("div",{key:0,ref_key:"barRef",ref:r,class:J([v(s).e("active-bar"),v(s).is(v(i).props.tabPosition)]),style:Ht(o.value)},null,6)):Le("v-if",!0)}});var DMe=xt(OMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-bar.vue"]]);const NMe=_t({panes:{type:Re(Array),default:()=>ws([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),BMe={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},n5="ElTabNav",FMe=Be({name:n5,props:NMe,emits:BMe,setup(t,{expose:e,emit:n}){const i=zt(Vx);i||Ks(n5,"");const s=ht("tabs"),r=Qce(),o=tue(),a=X(),l=X(),c=X(),u=X({}),d=X(),h=X(!1),f=X(0),p=X(!1),m=X(!0),b=wi(),g=F(()=>["top","bottom"].includes(i.props.tabPosition)),x=F(()=>g.value?"width":"height"),S=F(()=>({transform:`translate${x.value==="width"?"X":"Y"}(-${f.value}px)`})),{width:_,height:E}=MT(a),{width:T,height:A}=MT(l,{width:0,height:0},{box:"border-box"}),I=F(()=>g.value?_.value:E.value),P=F(()=>g.value?T.value:A.value),{onWheel:k}=mU({atStartEdge:F(()=>f.value<=0),atEndEdge:F(()=>P.value-f.value<=I.value),layout:F(()=>g.value?"horizontal":"vertical")},W=>{f.value=Ex(f.value+W,0,P.value-I.value)}),B=()=>{if(!a.value)return;const W=a.value[`offset${th(x.value)}`],Q=f.value;if(!Q)return;const ie=Q>W?Q-W:0;f.value=ie},R=()=>{if(!a.value||!l.value)return;const W=l.value[`offset${th(x.value)}`],Q=a.value[`offset${th(x.value)}`],ie=f.value;if(W-ie<=Q)return;const ne=W-ie>Q*2?ie+Q:W-Q;f.value=ne},H=async()=>{const W=l.value;if(!h.value||!c.value||!a.value||!W)return;await Nt();const Q=u.value[t.currentName];if(!Q)return;const ie=a.value,ne=Q.getBoundingClientRect(),ce=ie.getBoundingClientRect(),ae=g.value?W.offsetWidth-ce.width:W.offsetHeight-ce.height,_e=f.value;let ke=_e;g.value?(ne.leftce.right&&(ke=_e+ne.right-ce.right)):(ne.topce.bottom&&(ke=_e+(ne.bottom-ce.bottom))),ke=Math.max(ke,0),f.value=Math.min(ke,ae)},q=()=>{var W;if(!l.value||!a.value)return;t.stretch&&((W=d.value)==null||W.update());const Q=l.value[`offset${th(x.value)}`],ie=a.value[`offset${th(x.value)}`],ne=f.value;ie0&&(f.value=0))},oe=W=>{const Q=Oi(W);let ie=0;switch(Q){case gt.left:case gt.up:ie=-1;break;case gt.right:case gt.down:ie=1;break;default:return}const ne=Array.from(W.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let ae=ne.indexOf(W.target)+ie;ae<0?ae=ne.length-1:ae>=ne.length&&(ae=0),ne[ae].focus({preventScroll:!0}),ne[ae].click(),Z()},Z=()=>{m.value&&(p.value=!0)},V=()=>p.value=!1,D=(W,Q)=>{u.value[Q]=W},K=async()=>{await Nt();const W=u.value[t.currentName];W?.focus({preventScroll:!0})};return We(r,W=>{W==="hidden"?m.value=!1:W==="visible"&&setTimeout(()=>m.value=!0,50)}),We(o,W=>{W?setTimeout(()=>m.value=!0,50):m.value=!1}),as(c,()=>{Gc(q)}),mn(()=>setTimeout(()=>H(),0)),ec(()=>q()),e({scrollToActiveTab:H,removeFocus:V,focusActiveTab:K,tabListRef:l,tabBarRef:d,scheduleRender:()=>I_(b)}),()=>{const W=h.value?[de("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:B},[de(Ut,null,{default:()=>[de(id,null,null)]})]),de("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:R},[de(Ut,null,{default:()=>[de(So,null,null)]})])]:null,Q=t.panes.map((ie,ne)=>{var ce,ae,_e,ke,Te;const Ke=ie.uid,Fe=ie.props.disabled,ve=(ae=(ce=ie.props.name)!=null?ce:ie.index)!=null?ae:`${ne}`,fe=!Fe&&(ie.isClosable||ie.props.closable!==!1&&t.editable);ie.index=`${ne}`;const Me=fe?de(Ut,{class:"is-icon-close",onClick:G=>n("tabRemove",ie,G)},{default:()=>[de(ul,null,null)]}):null,ge=((ke=(_e=ie.slots).label)==null?void 0:ke.call(_e))||ie.props.label,Qe=!Fe&&ie.active?(Te=t.tabindex)!=null?Te:i.props.tabindex:-1;return de("div",{ref:G=>D(G,ve),class:[s.e("item"),s.is(i.props.tabPosition),s.is("active",ie.active),s.is("disabled",Fe),s.is("closable",fe),s.is("focus",p.value)],id:`tab-${ve}`,key:`tab-${Ke}`,"aria-controls":`pane-${ve}`,role:"tab","aria-selected":ie.active,tabindex:Qe,onFocus:()=>Z(),onBlur:()=>V(),onClick:G=>{V(),n("tabClick",ie,ve,G)},onKeydown:G=>{const ee=Oi(G);fe&&(ee===gt.delete||ee===gt.backspace)&&n("tabRemove",ie,G)}},[ge,Me])});return b.value,de("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!h.value),s.is(i.props.tabPosition)]},[W,de("div",{class:s.e("nav-scroll"),ref:a},[t.panes.length>0?de("div",{class:[s.e("nav"),s.is(i.props.tabPosition),s.is("stretch",t.stretch&&["top","bottom"].includes(i.props.tabPosition))],ref:l,style:S.value,role:"tablist",onKeydown:oe,onWheel:k},[t.type?null:de(DMe,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Q]):null])])}}}),zMe=_t({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:Re(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),mE=t=>Gt(t)||Xt(t),UMe={[wn]:t=>mE(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>mE(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>mE(t),tabAdd:()=>!0},$Me=Be({name:"ElTabs",props:zMe,emits:UMe,setup(t,{emit:e,slots:n,expose:i}){var s;const r=ht("tabs"),o=F(()=>["left","right"].includes(t.tabPosition)),{children:a,addChild:l,removeChild:c,ChildrenSorter:u}=Ox(xn(),"ElTabPane"),d=X(),h=X((s=ri(t.modelValue)?t.defaultValue:t.modelValue)!=null?s:"0"),f=async(S,_=!1)=>{var E,T,A,I;if(!(h.value===S||ri(S)))try{let P;if(t.beforeLeave){const k=t.beforeLeave(S,h.value);P=k instanceof Promise?await k:k}else P=!0;if(P!==!1){const k=(E=a.value.find(B=>B.paneName===h.value))==null?void 0:E.isFocusInsidePane();h.value=S,_&&(e(wn,S),e("tabChange",S)),(A=(T=d.value)==null?void 0:T.removeFocus)==null||A.call(T),k&&((I=d.value)==null||I.focusActiveTab())}}catch{}},p=(S,_,E)=>{S.props.disabled||(e("tabClick",S,E),f(_,!0))},m=(S,_)=>{S.props.disabled||ri(S.props.name)||(_.stopPropagation(),e("edit",S.props.name,"remove"),e("tabRemove",S.props.name))},b=()=>{e("edit",void 0,"add"),e("tabAdd")},g=S=>{const _=Oi(S);[gt.enter,gt.numpadEnter].includes(_)&&b()},x=S=>{const _=S.el.firstChild,E=["bottom","right"].includes(t.tabPosition)?S.children[0].el:S.children[1].el;_!==E&&_.before(E)};return We(()=>t.modelValue,S=>f(S)),We(h,async()=>{var S;await Nt(),(S=d.value)==null||S.scrollToActiveTab()}),Xn(Vx,{props:t,currentName:h,registerPane:l,unregisterPane:c,nav$:d}),i({currentName:h,get tabNavRef(){return Vy(d.value,["scheduleRender"])}}),()=>{const S=n["add-icon"],_=t.editable||t.addable?de("div",{class:[r.e("new-tab"),o.value&&r.e("new-tab-vertical")],tabindex:t.tabindex,onClick:b,onKeydown:g},[S?Ue(n,"add-icon"):de(Ut,{class:r.is("icon-plus")},{default:()=>[de(e7,null,null)]})]):null,E=()=>de(FMe,{ref:d,currentName:h.value,editable:t.editable,type:t.type,panes:a.value,stretch:t.stretch,onTabClick:p,onTabRemove:m},null),T=de("div",{class:[r.e("header"),o.value&&r.e("header-vertical"),r.is(t.tabPosition)]},[de(u,null,{default:E,$stable:!0}),_]),A=de("div",{class:r.e("content")},[Ue(n,"default")]);return de("div",{class:[r.b(),r.m(t.tabPosition),{[r.m("card")]:t.type==="card",[r.m("border-card")]:t.type==="border-card"}],onVnodeMounted:x,onVnodeUpdated:x},[A,T])}}}),VMe=_t({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),HMe=["id","aria-hidden","aria-labelledby"],i5="ElTabPane",WMe=Be({name:i5,__name:"tab-pane",props:VMe,setup(t){const e=t,n=xn(),i=tr(),s=zt(Vx);s||Ks(i5,"usage: ");const r=ht("tab-pane"),o=X(),a=X(),l=F(()=>{var m;return(m=e.closable)!=null?m:s.props.closable}),c=F(()=>{var m;return s.currentName.value===((m=e.name)!=null?m:a.value)}),u=X(c.value),d=F(()=>{var m;return(m=e.name)!=null?m:a.value}),h=F(()=>!e.lazy||u.value||c.value),f=()=>{var m;return(m=o.value)==null?void 0:m.contains(document.activeElement)};We(c,m=>{m&&(u.value=!0)});const p=ni({uid:n.uid,getVnode:()=>n.vnode,slots:i,props:e,paneName:d,active:c,index:a,isClosable:l,isFocusInsidePane:f});return s.registerPane(p),gi(()=>{s.unregisterPane(p)}),lx(()=>{var m;i.label&&((m=s.nav$.value)==null||m.scheduleRender())}),(m,b)=>h.value?_n((z(),se("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:o,class:J(v(r).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[Ue(m.$slots,"default")],10,HMe)),[[ci,c.value]]):Le("v-if",!0)}});var h$=xt(WMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tabs/src/tab-pane.vue"]]);const f$=En($Me,{TabPane:h$}),p$=Ss(h$),GMe=_t({type:{type:String,values:["primary","success","info","warning","danger",""],default:""},size:{type:String,values:Qc,default:""},truncated:Boolean,lineClamp:{type:[String,Number]},tag:{type:String,default:"span"}}),jMe=Be({name:"ElText",__name:"text",props:GMe,setup(t){const e=t,n=X(),i=er(),s=ht("text"),r=F(()=>[s.b(),s.m(e.type),s.m(i.value),s.is("truncated",e.truncated),s.is("line-clamp",!ri(e.lineClamp))]),o=()=>{var a,l,c,u,d,h,f;if(ld().title)return;let m=!1;const b=((a=n.value)==null?void 0:a.textContent)||"";if(e.truncated){const g=(l=n.value)==null?void 0:l.offsetWidth,x=(c=n.value)==null?void 0:c.scrollWidth;g&&x&&x>g&&(m=!0)}else if(!ri(e.lineClamp)){const g=(u=n.value)==null?void 0:u.offsetHeight,x=(d=n.value)==null?void 0:d.scrollHeight;g&&x&&x>g&&(m=!0)}m?(h=n.value)==null||h.setAttribute("title",b):(f=n.value)==null||f.removeAttribute("title")};return mn(o),ec(o),(a,l)=>(z(),De(Sn(a.tag),{ref_key:"textRef",ref:n,class:J(r.value),style:Ht({"-webkit-line-clamp":a.lineClamp})},{default:xe(()=>[Ue(a.$slots,"default")]),_:3},8,["class","style"]))}});var KMe=xt(jMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/text/src/text.vue"]]);const d4=En(KMe),qMe=_t({format:{type:String,default:"HH:mm"},modelValue:{type:Re(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:Re(String),default:"light"},clearable:{type:Boolean,default:!0},size:or,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:{type:Re(String)},maxTime:{type:Re(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:Re([String,Object]),default:()=>Q9},clearIcon:{type:Re([String,Object]),default:()=>pd},popperClass:{type:String,default:""},popperStyle:{type:Re([String,Object])},...hp}),Du=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const i=Number.parseInt(e[1],10),s=t.toUpperCase();return s.includes("AM")&&n===12?n=0:s.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:i}}return null},gE=(t,e)=>{const n=Du(t);if(!n)return-1;const i=Du(e);if(!i)return-1;const s=n.minutes+n.hours*60,r=i.minutes+i.hours*60;return s===r?0:s>r?1:-1},s5=t=>`${t}`.padStart(2,"0"),Sm=t=>`${s5(t.hours)}:${s5(t.minutes)}`,YMe=(t,e)=>{const n=Du(t);if(!n)return"";const i=Du(e);if(!i)return"";const s={hours:n.hours,minutes:n.minutes};return s.minutes+=i.minutes,s.hours+=i.hours,s.hours+=Math.floor(s.minutes/60),s.minutes=s.minutes%60,Sm(s)},XMe=Be({name:"ElTimeSelect",__name:"time-select",props:qMe,emits:[Wn,"blur","focus","clear",wn],setup(t,{expose:e}){Tn.extend(Mk);const{Option:n}=mg,i=t,s=ht("input"),r=X(),o=Es(),{lang:a}=Jn(),l=F(()=>i.modelValue),c=F(()=>{const g=Du(i.start);return g?Sm(g):null}),u=F(()=>{const g=Du(i.end);return g?Sm(g):null}),d=F(()=>{const g=Du(i.step);return g?Sm(g):null}),h=F(()=>{const g=Du(i.minTime||"");return g?Sm(g):null}),f=F(()=>{const g=Du(i.maxTime||"");return g?Sm(g):null}),p=F(()=>{var g;const x=[],S=(_,E)=>{x.push({value:_,disabled:gE(E,h.value||"-1:-1")<=0||gE(E,f.value||"100:100")>=0})};if(i.start&&i.end&&i.step){let _=c.value,E;for(;_&&u.value&&gE(_,u.value)<=0;)E=Tn(_,"HH:mm").locale(a.value).format(i.format),S(E,_),_=YMe(_,d.value);if(i.includeEndTime&&u.value&&((g=x[x.length-1])==null?void 0:g.value)!==u.value){const T=Tn(u.value,"HH:mm").locale(a.value).format(i.format);S(T,u.value)}}return x});return e({blur:()=>{var g,x;(x=(g=r.value)==null?void 0:g.blur)==null||x.call(g)},focus:()=>{var g,x;(x=(g=r.value)==null?void 0:g.focus)==null||x.call(g)}}),(g,x)=>(z(),De(v(mg),{ref_key:"select",ref:r,"model-value":l.value,disabled:v(o),clearable:g.clearable,"clear-icon":g.clearIcon,size:g.size,effect:g.effect,placeholder:g.placeholder,"default-first-option":"",filterable:g.editable,"empty-values":g.emptyValues,"value-on-clear":g.valueOnClear,"popper-class":g.popperClass,"popper-style":g.popperStyle,"onUpdate:modelValue":x[0]||(x[0]=S=>g.$emit(v(wn),S)),onChange:x[1]||(x[1]=S=>g.$emit(v(Wn),S)),onBlur:x[2]||(x[2]=S=>g.$emit("blur",S)),onFocus:x[3]||(x[3]=S=>g.$emit("focus",S)),onClear:x[4]||(x[4]=()=>g.$emit("clear"))},{prefix:xe(()=>[g.prefixIcon?(z(),De(v(Ut),{key:0,class:J(v(s).e("prefix-icon"))},{default:xe(()=>[(z(),De(Sn(g.prefixIcon)))]),_:1},8,["class"])):Le("v-if",!0)]),default:xe(()=>[(z(!0),se(At,null,yn(p.value,S=>(z(),De(v(n),{key:S.value,label:S.value,value:S.value,disabled:S.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}});var ZMe=xt(XMe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/time-select/src/time-select.vue"]]);const JMe=En(ZMe),QMe="timeline",e3e=Be({name:"ElTimeline",props:{reverse:Boolean},setup(t,{slots:e}){const n=ht("timeline");return Xn(QMe,e),()=>{var i,s;const r=Il((s=(i=e.default)==null?void 0:i.call(e))!=null?s:[]).filter(o=>{var a;return((a=o?.type)==null?void 0:a.name)==="ElTimelineItem"});return tn("ul",{class:[n.b()]},t.reverse?r.reverse():r)}}}),t3e=_t({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:Ai},hollow:Boolean}),n3e=Be({name:"ElTimelineItem",__name:"timeline-item",props:t3e,setup(t){const e=t,n=ht("timeline-item"),i=F(()=>[n.e("node"),n.em("node",e.size||""),n.em("node",e.type||""),n.is("hollow",e.hollow)]);return(s,r)=>(z(),se("li",{class:J([v(n).b(),{[v(n).e("center")]:s.center}])},[U("div",{class:J(v(n).e("tail"))},null,2),s.$slots.dot?Le("v-if",!0):(z(),se("div",{key:0,class:J(i.value),style:Ht({backgroundColor:s.color})},[s.icon?(z(),De(v(Ut),{key:0,class:J(v(n).e("icon"))},{default:xe(()=>[(z(),De(Sn(s.icon)))]),_:1},8,["class"])):Le("v-if",!0)],6)),s.$slots.dot?(z(),se("div",{key:1,class:J(v(n).e("dot"))},[Ue(s.$slots,"dot")],2)):Le("v-if",!0),U("div",{class:J(v(n).e("wrapper"))},[!s.hideTimestamp&&s.placement==="top"?(z(),se("div",{key:0,class:J([v(n).e("timestamp"),v(n).is("top")])},Xe(s.timestamp),3)):Le("v-if",!0),U("div",{class:J(v(n).e("content"))},[Ue(s.$slots,"default")],2),!s.hideTimestamp&&s.placement==="bottom"?(z(),se("div",{key:1,class:J([v(n).e("timestamp"),v(n).is("bottom")])},Xe(s.timestamp),3)):Le("v-if",!0)],2)],2))}});var m$=xt(n3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/timeline/src/timeline-item.vue"]]);const i3e=En(e3e,{TimelineItem:m$}),s3e=Ss(m$),g$="left-check-change",v$="right-check-change",Em=_t({data:{type:Re(Array),default:()=>[]},titles:{type:Re(Array),default:()=>[]},buttonTexts:{type:Re(Array),default:()=>[]},filterPlaceholder:String,filterMethod:{type:Re(Function)},leftDefaultChecked:{type:Re(Array),default:()=>[]},rightDefaultChecked:{type:Re(Array),default:()=>[]},renderContent:{type:Re(Function)},modelValue:{type:Re(Array),default:()=>[]},format:{type:Re(Object),default:()=>({})},filterable:Boolean,props:{type:Re(Object),default:()=>ws({label:"label",key:"key",disabled:"disabled"})},targetOrder:{type:String,values:["original","push","unshift"],default:"original"},validateEvent:{type:Boolean,default:!0}}),fM=(t,e)=>[t,e].every(pt)||pt(t)&&Ws(e),r3e={[Wn]:(t,e,n)=>[t,n].every(pt)&&["left","right"].includes(e),[wn]:t=>pt(t),[g$]:fM,[v$]:fM},pM="checked-change",o3e=_t({data:Em.data,optionRender:{type:Re(Function)},placeholder:String,title:String,filterable:Boolean,format:Em.format,filterMethod:Em.filterMethod,defaultChecked:Em.leftDefaultChecked,props:Em.props}),a3e={[pM]:fM},o1=t=>{const e={label:"label",key:"key",disabled:"disabled"};return F(()=>({...e,...t.props}))},l3e=(t,e,n)=>{const i=o1(t),s=F(()=>t.data.filter(u=>Kt(t.filterMethod)?t.filterMethod(e.query,u):String(u[i.value.label]||u[i.value.key]).toLowerCase().includes(e.query.toLowerCase()))),r=F(()=>s.value.filter(u=>!u[i.value.disabled])),o=F(()=>{const u=e.checked.length,d=t.data.length,{noChecked:h,hasChecked:f}=t.format;return h&&f?u>0?f.replace(/\${checked}/g,u.toString()).replace(/\${total}/g,d.toString()):h.replace(/\${total}/g,d.toString()):`${u}/${d}`}),a=F(()=>{const u=e.checked.length;return u>0&&u{const u=r.value.map(d=>d[i.value.key]);e.allChecked=u.length>0&&u.every(d=>e.checked.includes(d))},c=u=>{e.checked=u?r.value.map(d=>d[i.value.key]):[]};return We(()=>e.checked,(u,d)=>{if(l(),e.checkChangeByUser){const h=u.concat(d).filter(f=>!u.includes(f)||!d.includes(f));n(pM,u,h)}else n(pM,u),e.checkChangeByUser=!0}),We(r,()=>{l()}),We(()=>t.data,()=>{const u=[],d=s.value.map(h=>h[i.value.key]);e.checked.forEach(h=>{d.includes(h)&&u.push(h)}),e.checkChangeByUser=!1,e.checked=u}),We(()=>t.defaultChecked,(u,d)=>{if(d&&u.length===d.length&&u.every(p=>d.includes(p)))return;const h=[],f=r.value.map(p=>p[i.value.key]);u.forEach(p=>{f.includes(p)&&h.push(p)}),e.checkChangeByUser=!1,e.checked=h},{immediate:!0}),{filteredData:s,checkableData:r,checkedSummary:o,isIndeterminate:a,updateAllChecked:l,handleAllCheckedChange:c}},c3e=Be({name:"ElTransferPanel",__name:"transfer-panel",props:o3e,emits:a3e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=tr(),o=({option:_})=>_,{t:a}=Jn(),l=ht("transfer"),c=ni({checked:[],allChecked:!1,query:"",checkChangeByUser:!0}),u=o1(i),{filteredData:d,checkedSummary:h,isIndeterminate:f,handleAllCheckedChange:p}=l3e(i,c,s),m=F(()=>!Go(c.query)&&Go(d.value)),b=F(()=>!Go(r.default()[0].children)),{checked:g,allChecked:x,query:S}=hr(c);return e({query:S}),(_,E)=>(z(),se("div",{class:J(v(l).b("panel"))},[U("p",{class:J(v(l).be("panel","header"))},[de(v(Gl),{modelValue:v(x),"onUpdate:modelValue":E[0]||(E[0]=T=>Li(x)?x.value=T:null),indeterminate:v(f),"validate-event":!1,onChange:v(p)},{default:xe(()=>[cn(Xe(_.title)+" ",1),U("span",null,Xe(v(h)),1)]),_:1},8,["modelValue","indeterminate","onChange"])],2),U("div",{class:J([v(l).be("panel","body"),v(l).is("with-footer",b.value)])},[_.filterable?(z(),De(v(wo),{key:0,modelValue:v(S),"onUpdate:modelValue":E[1]||(E[1]=T=>Li(S)?S.value=T:null),class:J(v(l).be("panel","filter")),size:"default",placeholder:_.placeholder,"prefix-icon":v(bde),clearable:"","validate-event":!1},null,8,["modelValue","class","placeholder","prefix-icon"])):Le("v-if",!0),_n(de(v(Ek),{modelValue:v(g),"onUpdate:modelValue":E[2]||(E[2]=T=>Li(g)?g.value=T:null),"validate-event":!1,class:J([v(l).is("filterable",_.filterable),v(l).be("panel","list")])},{default:xe(()=>[(z(!0),se(At,null,yn(v(d),T=>(z(),De(v(Gl),{key:T[v(u).key],class:J(v(l).be("panel","item")),value:T[v(u).key],disabled:T[v(u).disabled],"validate-event":!1},{default:xe(()=>{var A;return[de(o,{option:(A=_.optionRender)==null?void 0:A.call(_,T)},null,8,["option"])]}),_:2},1032,["class","value","disabled"]))),128))]),_:1},8,["modelValue","class"]),[[ci,!m.value&&!v(Go)(_.data)]]),_n(U("div",{class:J(v(l).be("panel","empty"))},[Ue(_.$slots,"empty",{},()=>[cn(Xe(m.value?v(a)("el.transfer.noMatch"):v(a)("el.transfer.noData")),1)])],2),[[ci,m.value||v(Go)(_.data)]])],2),b.value?(z(),se("p",{key:0,class:J(v(l).be("panel","footer"))},[Ue(_.$slots,"default")],2)):Le("v-if",!0)],2))}});var r5=xt(c3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer-panel.vue"]]);const u3e=t=>{const e=o1(t),n=F(()=>t.data.reduce((r,o)=>(r[o[e.value.key]]=o)&&r,{})),i=F(()=>t.data.filter(r=>!t.modelValue.includes(r[e.value.key]))),s=F(()=>t.targetOrder==="original"?t.data.filter(r=>t.modelValue.includes(r[e.value.key])):t.modelValue.reduce((r,o)=>{const a=n.value[o];return a&&r.push(a),r},[]));return{sourceData:i,targetData:s}},d3e=(t,e,n)=>{const i=o1(t),s=(a,l,c)=>{n(wn,a),n(Wn,a,l,c)};return{addToLeft:()=>{const a=t.modelValue.slice();e.rightChecked.forEach(l=>{const c=a.indexOf(l);c>-1&&a.splice(c,1)}),s(a,"left",e.rightChecked)},addToRight:()=>{let a=t.modelValue.slice();const l=t.data.filter(c=>{const u=c[i.value.key];return e.leftChecked.includes(u)&&!t.modelValue.includes(u)}).map(c=>c[i.value.key]);a=t.targetOrder==="unshift"?l.concat(a):a.concat(l),t.targetOrder==="original"&&(a=t.data.filter(c=>a.includes(c[i.value.key])).map(c=>c[i.value.key])),s(a,"right",e.leftChecked)}}},h3e=(t,e)=>({onSourceCheckedChange:(s,r)=>{t.leftChecked=s,r&&e(g$,s,r)},onTargetCheckedChange:(s,r)=>{t.rightChecked=s,r&&e(v$,s,r)}}),f3e={key:0},p3e={key:0},m3e=Be({name:"ElTransfer",__name:"transfer",props:Em,emits:r3e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=tr(),{t:o}=Jn(),a=ht("transfer"),{formItem:l}=zr(),c=ni({leftChecked:[],rightChecked:[]}),u=o1(i),{sourceData:d,targetData:h}=u3e(i),{onSourceCheckedChange:f,onTargetCheckedChange:p}=h3e(c,s),{addToLeft:m,addToRight:b}=d3e(i,c,s),g=X(),x=X(),S=P=>{switch(P){case"left":g.value.query="";break;case"right":x.value.query="";break}},_=F(()=>i.buttonTexts.length===2),E=F(()=>i.titles[0]||o("el.transfer.titles.0")),T=F(()=>i.titles[1]||o("el.transfer.titles.1")),A=F(()=>i.filterPlaceholder||o("el.transfer.filterPlaceholder"));We(()=>i.modelValue,()=>{var P;i.validateEvent&&((P=l?.validate)==null||P.call(l,"change").catch(k=>void 0))});const I=F(()=>P=>{var k;if(i.renderContent)return i.renderContent(tn,P);const B=(((k=r.default)==null?void 0:k.call(r,{option:P}))||[]).filter(R=>R.type!==Hs);return B.length?B:tn("span",P[u.value.label]||P[u.value.key])});return e({clearQuery:S,leftPanel:g,rightPanel:x}),(P,k)=>(z(),se("div",{class:J(v(a).b())},[de(r5,{ref_key:"leftPanel",ref:g,data:v(d),"option-render":I.value,placeholder:A.value,title:E.value,filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,"default-checked":P.leftDefaultChecked,props:i.props,onCheckedChange:v(f)},{empty:xe(()=>[Ue(P.$slots,"left-empty")]),default:xe(()=>[Ue(P.$slots,"left-footer")]),_:3},8,["data","option-render","placeholder","title","filterable","format","filter-method","default-checked","props","onCheckedChange"]),U("div",{class:J(v(a).e("buttons"))},[de(v(Sr),{type:"primary",class:J([v(a).e("button"),v(a).is("with-texts",_.value)]),disabled:v(Go)(c.rightChecked),onClick:v(m)},{default:xe(()=>[de(v(Ut),null,{default:xe(()=>[de(v(id))]),_:1}),v(ri)(P.buttonTexts[0])?Le("v-if",!0):(z(),se("span",f3e,Xe(P.buttonTexts[0]),1))]),_:1},8,["class","disabled","onClick"]),de(v(Sr),{type:"primary",class:J([v(a).e("button"),v(a).is("with-texts",_.value)]),disabled:v(Go)(c.leftChecked),onClick:v(b)},{default:xe(()=>[v(ri)(P.buttonTexts[1])?Le("v-if",!0):(z(),se("span",p3e,Xe(P.buttonTexts[1]),1)),de(v(Ut),null,{default:xe(()=>[de(v(So))]),_:1})]),_:1},8,["class","disabled","onClick"])],2),de(r5,{ref_key:"rightPanel",ref:x,data:v(h),"option-render":I.value,placeholder:A.value,filterable:P.filterable,format:P.format,"filter-method":P.filterMethod,title:T.value,"default-checked":P.rightDefaultChecked,props:i.props,onCheckedChange:v(p)},{empty:xe(()=>[Ue(P.$slots,"right-empty")]),default:xe(()=>[Ue(P.$slots,"right-footer")]),_:3},8,["data","option-render","placeholder","filterable","format","filter-method","title","default-checked","props","onCheckedChange"])],2))}});var g3e=xt(m3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/transfer/src/transfer.vue"]]);const v3e=En(g3e),Wm="$treeNodeId",o5=function(t,e){!e||e[Wm]||Object.defineProperty(e,Wm,{value:t.id,enumerable:!1,configurable:!1,writable:!1})},h4=(t,e)=>e?.[t||Wm],mM=(t,e,n)=>{const i=t.value.currentNode;n();const s=t.value.currentNode;i!==s&&e("current-change",s?s.data:null,s)},y$=t=>{let e=!0,n=!0,i=!0,s=!0;for(let r=0,o=t.length;r{n.canFocus=e,gM(n.childNodes,e)})};let y3e=0,vM=class cw{constructor(e){this.isLeafByUser=void 0,this.isLeaf=void 0,this.isEffectivelyChecked=!1,this.id=y3e++,this.text=null,this.checked=!1,this.indeterminate=!1,this.data=null,this.expanded=!1,this.parent=null,this.visible=!0,this.isCurrent=!1,this.canFocus=!1;for(const n in e)fi(e,n)&&(this[n]=e[n]);this.level=0,this.loaded=!1,this.childNodes=[],this.loading=!1,this.parent&&(this.level=this.parent.level+1)}initialize(){var e;const n=this.store;if(!n)throw new Error("[Node]store is required!");n.registerNode(this);const i=n.props;if(i&&typeof i.isLeaf<"u"){const o=cb(this,"isLeaf");Mi(o)&&(this.isLeafByUser=o)}if(n.lazy!==!0&&this.data?(this.setData(this.data),n.defaultExpandAll&&(this.expanded=!0,this.canFocus=!0)):this.level>0&&n.lazy&&n.defaultExpandAll&&!this.isLeafByUser&&this.expand(),pt(this.data)||o5(this,this.data),!this.data)return;const s=n.defaultExpandedKeys,r=n.key;r&&!Ws(this.key)&&s&&s.includes(this.key)&&this.expand(null,n.autoExpandParent),r&&n.currentNodeKey!==void 0&&this.key===n.currentNodeKey&&(n.currentNode&&(n.currentNode.isCurrent=!1),n.currentNode=this,n.currentNode.isCurrent=!0),n.lazy&&n._initDefaultCheckedNode(this),this.updateLeafState(),(this.level===1||((e=this.parent)==null?void 0:e.expanded)===!0)&&(this.canFocus=!0)}setData(e){pt(e)||o5(this,e),this.data=e,this.childNodes=[];let n;this.level===0&&pt(this.data)?n=this.data:n=cb(this,"children")||[];for(let i=0,s=n.length;i-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(i=>i===e||n&&i.contains(e))}remove(){const e=this.parent;e&&e.removeChild(this)}insertChild(e,n,i){if(!e)throw new Error("InsertChild error: child is required.");if(!(e instanceof cw)){if(!i){const s=this.getChildren(!0);s?.includes(e.data)||(ri(n)||n<0?s?.push(e.data):s?.splice(n,0,e.data))}Object.assign(e,{parent:this,store:this.store}),e=ni(new cw(e)),e instanceof cw&&e.initialize()}e.level=this.level+1,ri(n)||n<0?this.childNodes.push(e):this.childNodes.splice(n,0,e),this.updateLeafState()}insertBefore(e,n){let i;n&&(i=this.childNodes.indexOf(n)),this.insertChild(e,i)}insertAfter(e,n){let i;n&&(i=this.childNodes.indexOf(n),i!==-1&&(i+=1)),this.insertChild(e,i)}removeChild(e){const n=this.getChildren()||[],i=n.indexOf(e.data);i>-1&&n.splice(i,1);const s=this.childNodes.indexOf(e);s>-1&&(this.store&&this.store.deregisterNode(e),e.parent=null,this.childNodes.splice(s,1)),this.updateLeafState()}removeChildByData(e){const n=this.childNodes.find(i=>i.data===e);n&&this.removeChild(n)}expand(e,n){const i=()=>{if(n){let s=this.parent;for(;s&&s.level>0;)s.expanded=!0,s=s.parent}this.expanded=!0,e&&e(),gM(this.childNodes,!0)};this.shouldLoadData()?this.loadData(s=>{pt(s)&&(this.checked?this.setChecked(!0,!0):this.store.checkStrictly||$v(this),i())}):i()}doCreateChildren(e,n={}){e.forEach(i=>{this.insertChild(Object.assign({data:i},n),void 0,!0)})}collapse(){this.expanded=!1,gM(this.childNodes,!1)}shouldLoadData(){return!!(this.store.lazy===!0&&this.store.load&&!this.loaded)}updateLeafState(){if(this.store.lazy===!0&&this.loaded!==!0&&typeof this.isLeafByUser<"u"){this.isLeaf=this.isLeafByUser,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}const e=this.childNodes;if(!this.store.lazy||this.store.lazy===!0&&this.loaded===!0){this.isLeaf=!e||e.length===0,this.isEffectivelyChecked=this.isLeaf&&this.disabled;return}this.isLeaf=!1}setChecked(e,n,i,s){if(this.indeterminate=e==="half",this.checked=e===!0,this.isEffectivelyChecked=!this.childNodes.length&&(this.disabled||this.checked),this.store.checkStrictly)return;if(!(this.shouldLoadData()&&!this.store.checkDescendants)){const o=()=>{if(n){const a=this.childNodes;for(let d=0,h=a.length;d{o(),$v(this)},{checked:e!==!1});return}else o()}const r=this.parent;!r||r.level===0||i||$v(r)}getChildren(e=!1){if(this.level===0)return this.data;const n=this.data;if(!n)return null;const i=this.store.props;let s="children";return i&&(s=i.children||"children"),ri(n[s])&&(n[s]=null),e&&!n[s]&&(n[s]=[]),n[s]}updateChildren(){const e=this.getChildren()||[],n=this.childNodes.map(r=>r.data),i={},s=[];e.forEach((r,o)=>{const a=r[Wm];!!a&&n.some(c=>c?.[Wm]===a)?i[a]={index:o,data:r}:s.push({index:o,data:r})}),this.store.lazy||n.forEach(r=>{i[r?.[Wm]]||this.removeChildByData(r)}),s.forEach(({index:r,data:o})=>{this.insertChild({data:o},r)}),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 i=r=>{this.childNodes=[],this.doCreateChildren(r,n),this.loaded=!0,this.loading=!1,this.updateLeafState(),e&&e.call(this,r)},s=()=>{this.loading=!1};this.store.load(this,i,s)}else e&&e.call(this)}eachNode(e){const n=[this];for(;n.length;){const i=n.shift();n.unshift(...i.childNodes),e(i)}}reInitChecked(){this.store.checkStrictly||$v(this)}};class b3e{constructor(e){this.lazy=!1,this.checkStrictly=!1,this.autoExpandParent=!1,this.defaultExpandAll=!1,this.checkDescendants=!1,this.currentNode=null,this.currentNodeKey=null;for(const n in e)fi(e,n)&&(this[n]=e[n]);this.nodesMap={}}initialize(){if(this.root=new vM({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()},_i)}else this._initDefaultCheckedNodes()}filter(e){const n=this.filterNodeMethod,i=this.lazy,s=async function(r){const o=r.root?r.root.childNodes:r.childNodes;for(const[a,l]of o.entries())l.visible=!!n?.call(l,e,l.data,l),a%80===0&&a>0&&await Nt(),await s(l);if(!r.visible&&o.length){let a=!0;a=!o.some(l=>l.visible),r.root?r.root.visible=a===!1:r.visible=a===!1}e&&r.visible&&!r.isLeaf&&(!i||r.loaded)&&r.expand()};s(this)}setData(e){e!==this.root.data?(this.nodesMap={},this.root.setData(e),this._initDefaultCheckedNodes(),this.setCurrentNodeKey(this.currentNodeKey)):this.root.updateChildren()}getNode(e){if(e instanceof vM)return e;const n=Mn(e)?h4(this.key,e):e;return this.nodesMap[n]||null}insertBefore(e,n){var i;const s=this.getNode(n);(i=s.parent)==null||i.insertBefore({data:e},s)}insertAfter(e,n){var i;const s=this.getNode(n);(i=s.parent)==null||i.insertAfter({data:e},s)}remove(e){const n=this.getNode(e);n&&n.parent&&(n===this.currentNode&&(this.currentNode=null),n.parent.removeChild(n))}append(e,n){const i=ua(n)?this.root:this.getNode(n);i&&i.insertChild({data:e})}_initDefaultCheckedNodes(){const e=this.defaultCheckedKeys||[],n=this.nodesMap;e.forEach(i=>{const s=n[i];s&&s.setChecked(!0,!this.checkStrictly)})}_initDefaultCheckedNode(e){const n=this.defaultCheckedKeys||[];!Ws(e.key)&&n.includes(e.key)&&e.setChecked(!0,!this.checkStrictly)}setDefaultCheckedKey(e){e!==this.defaultCheckedKeys&&(this.defaultCheckedKeys=e,this._initDefaultCheckedNodes())}registerNode(e){const n=this.key;if(!(!e||!e.data))if(!n)this.nodesMap[e.id]=e;else{const i=e.key;Ws(i)||(this.nodesMap[i]=e)}}deregisterNode(e){!this.key||!e||!e.data||(e.childNodes.forEach(i=>{this.deregisterNode(i)}),delete this.nodesMap[e.key])}getCheckedNodes(e=!1,n=!1){const i=[],s=function(r){(r.root?r.root.childNodes:r.childNodes).forEach(a=>{(a.checked||n&&a.indeterminate)&&(!e||e&&a.isLeaf)&&i.push(a.data),s(a)})};return s(this),i}getCheckedKeys(e=!1){return this.getCheckedNodes(e).map(n=>(n||{})[this.key])}getHalfCheckedNodes(){const e=[],n=function(i){(i.root?i.root.childNodes:i.childNodes).forEach(r=>{r.indeterminate&&e.push(r.data),n(r)})};return n(this),e}getHalfCheckedKeys(){return this.getHalfCheckedNodes().map(e=>(e||{})[this.key])}_getAllNodes(){const e=[],n=this.nodesMap;for(const i in n)fi(n,i)&&e.push(n[i]);return e}updateChildren(e,n){const i=this.nodesMap[e];if(!i)return;const s=i.childNodes;for(let r=s.length-1;r>=0;r--){const o=s[r];this.remove(o.data)}for(let r=0,o=n.length;rl.level-c.level),r=Object.create(null),o=Object.keys(i);s.forEach(l=>l.setChecked(!1,!1));const a=l=>{l.childNodes.forEach(c=>{var u;r[c.data[e]]=!0,(u=c.childNodes)!=null&&u.length&&a(c)})};for(let l=0,c=s.length;l{b.isLeaf||b.setChecked(!1,!1),f(b)})};f(u)}}}setCheckedNodes(e,n=!1){const i=this.key,s={};e.forEach(r=>{s[(r||{})[i]]=!0}),this._setCheckedKeys(i,n,s)}setCheckedKeys(e,n=!1){this.defaultCheckedKeys=e;const i=this.key,s={};e.forEach(r=>{s[r]=!0}),this._setCheckedKeys(i,n,s)}setDefaultExpandedKeys(e){e=e||[],this.defaultExpandedKeys=e,e.forEach(n=>{const i=this.getNode(n);i&&i.expand(null,this.autoExpandParent)})}setChecked(e,n,i){const s=this.getNode(e);s&&s.setChecked(!!n,i)}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){var i;const s=e[this.key],r=this.nodesMap[s];this.setCurrentNode(r),n&&this.currentNode&&this.currentNode.level>1&&((i=this.currentNode.parent)==null||i.expand(null,!0))}setCurrentNodeKey(e,n=!0){var i;if(this.currentNodeKey=e,ua(e)){this.currentNode&&(this.currentNode.isCurrent=!1),this.currentNode=null;return}const s=this.getNode(e);s&&(this.setCurrentNode(s),n&&this.currentNode&&this.currentNode.level>1&&((i=this.currentNode.parent)==null||i.expand(null,!0)))}}const f4="RootTree",b$="NodeInstance",a5="TreeNodeMap",_3e=Be({name:"ElTreeNodeContent",props:{node:{type:Object,required:!0},renderContent:Function},setup(t){const e=ht("tree"),n=zt(b$),i=zt(f4);return()=>{const s=t.node,{data:r,store:o}=s;return t.renderContent?t.renderContent(tn,{_self:n,node:s,data:r,store:o}):Ue(i.ctx.slots,"default",{node:s,data:r},()=>[tn(d4,{tag:"span",truncated:!0,class:e.be("node","label")},()=>[s.label])])}}});var w3e=xt(_3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node-content.vue"]]);function _$(t){const e=zt(a5,null);let n={treeNodeExpand:i=>{var s;t.node!==i&&((s=t.node)==null||s.collapse())},children:new Set};return e&&e.children.add(n),gi(()=>{e&&e.children.delete(n),n=null}),Xn(a5,n),{broadcastExpanded:i=>{if(t.accordion)for(const s of n.children)s.treeNodeExpand(i)}}}const w$=Symbol("dragEvents");function x3e({props:t,ctx:e,el$:n,dropIndicator$:i,store:s}){const r=ht("tree"),o=X({showDropIndicator:!1,draggingNode:null,dropNode:null,allowDrop:!0,dropType:null});return Xn(w$,{treeNodeDragStart:({event:u,treeNode:d})=>{if(u.dataTransfer){if(Kt(t.allowDrag)&&!t.allowDrag(d.node))return u.preventDefault(),!1;u.dataTransfer.effectAllowed="move";try{u.dataTransfer.setData("text/plain","")}catch{}o.value.draggingNode=d,e.emit("node-drag-start",d.node,u)}},treeNodeDragOver:({event:u,treeNode:d})=>{if(!u.dataTransfer)return;const h=d,f=o.value.dropNode;f&&f.node.id!==h.node.id&&xo(f.$el,r.is("drop-inner"));const p=o.value.draggingNode;if(!p||!h)return;let m=!0,b=!0,g=!0,x=!0;Kt(t.allowDrop)&&(m=t.allowDrop(p.node,h.node,"prev"),x=b=t.allowDrop(p.node,h.node,"inner"),g=t.allowDrop(p.node,h.node,"next")),u.dataTransfer.dropEffect=b||m||g?"move":"none",(m||b||g)&&f?.node.id!==h.node.id&&(f&&e.emit("node-drag-leave",p.node,f.node,u),e.emit("node-drag-enter",p.node,h.node,u)),m||b||g?o.value.dropNode=h:o.value.dropNode=null,h.node.nextSibling===p.node&&(g=!1),h.node.previousSibling===p.node&&(m=!1),h.node.contains(p.node,!1)&&(b=!1),(p.node===h.node||p.node.contains(h.node))&&(m=!1,b=!1,g=!1);const S=h.$el,_=S.querySelector(`.${r.be("node","content")}`).getBoundingClientRect(),E=n.value.getBoundingClientRect(),T=n.value.scrollTop;let A;const I=m?b?.25:g?.45:1:Number.NEGATIVE_INFINITY,P=g?b?.75:m?.55:0:Number.POSITIVE_INFINITY;let k=-9999;const B=u.clientY-_.top;B<_.height*I?A="before":B>_.height*P?A="after":b?A="inner":A="none";const R=S.querySelector(`.${r.be("node","expand-icon")}`).getBoundingClientRect(),H=i.value;A==="before"?k=R.top-E.top+T:A==="after"&&(k=R.bottom-E.top+T),H.style.top=`${k}px`,H.style.left=`${R.right-E.left}px`,A==="inner"?nl(S,r.is("drop-inner")):xo(S,r.is("drop-inner")),o.value.showDropIndicator=A==="before"||A==="after",o.value.allowDrop=o.value.showDropIndicator||x,o.value.dropType=A,e.emit("node-drag-over",p.node,h.node,u)},treeNodeDragEnd:u=>{var d,h;const{draggingNode:f,dropType:p,dropNode:m}=o.value;if(u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="move"),f?.node.data&&m){const b={data:f.node.data};p!=="none"&&f.node.remove(),p==="before"?(d=m.node.parent)==null||d.insertBefore(b,m.node):p==="after"?(h=m.node.parent)==null||h.insertAfter(b,m.node):p==="inner"&&m.node.insertChild(b),p!=="none"&&(s.value.registerNode(b),s.value.key&&f.node.eachNode(g=>{var x;(x=s.value.nodesMap[g.data[s.value.key]])==null||x.setChecked(g.checked,!s.value.checkStrictly)})),xo(m.$el,r.is("drop-inner")),e.emit("node-drag-end",f.node,m.node,p,u),p!=="none"&&e.emit("node-drop",f.node,m.node,p,u)}f&&!m&&e.emit("node-drag-end",f.node,null,p,u),o.value.showDropIndicator=!1,o.value.draggingNode=null,o.value.dropNode=null,o.value.allowDrop=!0}}),{dragState:o}}const S3e=Be({name:"ElTreeNode",components:{ElCollapseTransition:Nx,ElCheckbox:Gl,NodeContent:w3e,ElIcon:Ut,Loading:jc},props:{node:{type:vM,default:()=>({})},props:{type:Object,default:()=>({})},accordion:Boolean,renderContent:Function,renderAfterExpand:Boolean,showCheckbox:Boolean},emits:["node-expand"],setup(t,e){const n=ht("tree"),{broadcastExpanded:i}=_$(t),s=zt(f4),r=X(!1),o=X(!1),a=X(),l=X(),c=X(),u=zt(w$),d=xn();Xn(b$,d),t.node.expanded&&(r.value=!0,o.value=!0);const h=s.props.props.children||"children";We(()=>{var P;const k=(P=t.node.data)==null?void 0:P[h];return k&&[...k]},()=>{t.node.updateChildren()}),We(()=>t.node.indeterminate,P=>{m(t.node.checked,P)}),We(()=>t.node.checked,P=>{m(P,t.node.indeterminate)}),We(()=>t.node.childNodes.length,()=>t.node.reInitChecked()),We(()=>t.node.expanded,P=>{Nt(()=>r.value=P),P&&(o.value=!0)});const f=P=>h4(s.props.nodeKey,P.data),p=P=>{const k=t.props.class;if(!k)return{};let B;if(Kt(k)){const{data:R}=P;B=k(R,P)}else B=k;return Gt(B)?{[B]:!0}:B},m=(P,k)=>{(a.value!==P||l.value!==k)&&s.ctx.emit("check-change",t.node.data,P,k),a.value=P,l.value=k},b=P=>{mM(s.store,s.ctx.emit,()=>{var k;if((k=s?.props)==null?void 0:k.nodeKey){const R=f(t.node);s.store.value.setCurrentNodeKey(R)}else s.store.value.setCurrentNode(t.node)}),s.currentNode.value=t.node,s.props.expandOnClickNode&&x(),(s.props.checkOnClickNode||t.node.isLeaf&&s.props.checkOnClickLeaf&&t.showCheckbox)&&!t.node.disabled&&S(!t.node.checked),s.ctx.emit("node-click",t.node.data,t.node,d,P)},g=P=>{var k;(k=s.instance.vnode.props)!=null&&k.onNodeContextmenu&&(P.stopPropagation(),P.preventDefault()),s.ctx.emit("node-contextmenu",P,t.node.data,t.node,d)},x=()=>{t.node.isLeaf||(r.value?(s.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)}))},S=P=>{const k=s?.props.checkStrictly,B=t.node.childNodes;!k&&B.length&&(P=B.some(R=>!R.isEffectivelyChecked)),t.node.setChecked(P,!k),Nt(()=>{const R=s.store.value;s.ctx.emit("check",t.node.data,{checkedNodes:R.getCheckedNodes(),checkedKeys:R.getCheckedKeys(),halfCheckedNodes:R.getHalfCheckedNodes(),halfCheckedKeys:R.getHalfCheckedKeys()})})};return{ns:n,node$:c,tree:s,expanded:r,childNodeRendered:o,oldChecked:a,oldIndeterminate:l,getNodeKey:f,getNodeClass:p,handleSelectChange:m,handleClick:b,handleContextMenu:g,handleExpandIconClick:x,handleCheckChange:S,handleChildNodeExpand:(P,k,B)=>{i(k),s.ctx.emit("node-expand",P,k,B)},handleDragStart:P=>{s.props.draggable&&u.treeNodeDragStart({event:P,treeNode:t})},handleDragOver:P=>{P.preventDefault(),s.props.draggable&&u.treeNodeDragOver({event:P,treeNode:{$el:c.value,node:t.node}})},handleDrop:P=>{P.preventDefault()},handleDragEnd:P=>{s.props.draggable&&u.treeNodeDragEnd(P)},CaretRight:J9}}}),E3e=["aria-expanded","aria-disabled","aria-checked","draggable","data-key"],C3e=["aria-expanded"];function T3e(t,e,n,i,s,r){const o=Zt("el-icon"),a=Zt("el-checkbox"),l=Zt("loading"),c=Zt("node-content"),u=Zt("el-tree-node"),d=Zt("el-collapse-transition");return _n((z(),se("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:e[2]||(e[2]=un((...h)=>t.handleClick&&t.handleClick(...h),["stop"])),onContextmenu:e[3]||(e[3]=(...h)=>t.handleContextMenu&&t.handleContextMenu(...h)),onDragstart:e[4]||(e[4]=un((...h)=>t.handleDragStart&&t.handleDragStart(...h),["stop"])),onDragover:e[5]||(e[5]=un((...h)=>t.handleDragOver&&t.handleDragOver(...h),["stop"])),onDragend:e[6]||(e[6]=un((...h)=>t.handleDragEnd&&t.handleDragEnd(...h),["stop"])),onDrop:e[7]||(e[7]=un((...h)=>t.handleDrop&&t.handleDrop(...h),["stop"]))},[U("div",{class:J(t.ns.be("node","content")),style:Ht({paddingLeft:(t.node.level-1)*t.tree.props.indent+"px"})},[t.tree.props.icon||t.CaretRight?(z(),De(o,{key:0,class:J([t.ns.be("node","expand-icon"),t.ns.is("leaf",t.node.isLeaf),{expanded:!t.node.isLeaf&&t.expanded}]),onClick:un(t.handleExpandIconClick,["stop"])},{default:xe(()=>[(z(),De(Sn(t.tree.props.icon||t.CaretRight)))]),_:1},8,["class","onClick"])):Le("v-if",!0),t.showCheckbox?(z(),De(a,{key:1,"model-value":t.node.checked,indeterminate:t.node.indeterminate,disabled:!!t.node.disabled,onClick:e[0]||(e[0]=un(()=>{},["stop"])),onChange:t.handleCheckChange},null,8,["model-value","indeterminate","disabled","onChange"])):Le("v-if",!0),t.node.loading?(z(),De(o,{key:2,class:J([t.ns.be("node","loading-icon"),t.ns.is("loading")])},{default:xe(()=>[de(l)]),_:1},8,["class"])):Le("v-if",!0),de(c,{node:t.node,"render-content":t.renderContent},null,8,["node","render-content"])],6),de(d,null,{default:xe(()=>[!t.renderAfterExpand||t.childNodeRendered?_n((z(),se("div",{key:0,class:J(t.ns.be("node","children")),role:"group","aria-expanded":t.expanded,onClick:e[1]||(e[1]=un(()=>{},["stop"]))},[(z(!0),se(At,null,yn(t.node.childNodes,h=>(z(),De(u,{key:t.getNodeKey(h),"render-content":t.renderContent,"render-after-expand":t.renderAfterExpand,"show-checkbox":t.showCheckbox,node:h,accordion:t.accordion,props:t.props,onNodeExpand:t.handleChildNodeExpand},null,8,["render-content","render-after-expand","show-checkbox","node","accordion","props","onNodeExpand"]))),128))],10,C3e)),[[ci,t.expanded]]):Le("v-if",!0)]),_:1})],42,E3e)),[[ci,t.node.visible]])}var M3e=xt(S3e,[["render",T3e],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree-node.vue"]]);function A3e({el$:t},e){const n=ht("tree");mn(()=>{r()}),ec(()=>{var o;(o=t.value)==null||o.querySelectorAll("input[type=checkbox]").forEach(a=>{a.setAttribute("tabindex","-1")})});function i(o,a){var l,c;const u=e.value.getNode(o[a].dataset.key);return u.canFocus&&u.visible&&(((l=u.parent)==null?void 0:l.expanded)||((c=u.parent)==null?void 0:c.level)===0)}xi(t,"keydown",o=>{const a=o.target;if(!a.className.includes(n.b("node")))return;const l=Oi(o),c=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`)),u=c.indexOf(a);let d;if([gt.up,gt.down].includes(l)){if(o.preventDefault(),l===gt.up){d=u===-1?0:u!==0?u-1:c.length-1;const f=d;for(;!i(c,d);){if(d--,d===f){d=-1;break}d<0&&(d=c.length-1)}}else{d=u===-1?0:u=c.length&&(d=0)}}d!==-1&&c[d].focus()}[gt.left,gt.right].includes(l)&&(o.preventDefault(),a.click());const h=a.querySelector('[type="checkbox"]');[gt.enter,gt.numpadEnter,gt.space].includes(l)&&h&&(o.preventDefault(),h.click())});const r=()=>{var o;if(!t.value)return;const a=Array.from(t.value.querySelectorAll(`.${n.is("focusable")}[role=treeitem]`));Array.from(t.value.querySelectorAll("input[type=checkbox]")).forEach(u=>{u.setAttribute("tabindex","-1")});const c=t.value.querySelectorAll(`.${n.is("checked")}[role=treeitem]`);if(c.length){c[0].setAttribute("tabindex","0");return}(o=a[0])==null||o.setAttribute("tabindex","0")}}const x$=_t({data:{type:Re(Array),default:()=>[]},emptyText:{type:String},renderAfterExpand:{type:Boolean,default:!0},nodeKey:String,checkStrictly:Boolean,defaultExpandAll:Boolean,expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},checkDescendants:Boolean,autoExpandParent:{type:Boolean,default:!0},defaultCheckedKeys:{type:Array},defaultExpandedKeys:{type:Array},currentNodeKey:{type:[String,Number]},renderContent:{type:Re(Function)},showCheckbox:Boolean,draggable:Boolean,allowDrag:{type:Re(Function)},allowDrop:{type:Re(Function)},props:{type:Object,default:()=>({children:"children",label:"label",disabled:"disabled"})},lazy:Boolean,highlightCurrent:Boolean,load:{type:Function},filterNodeMethod:{type:Function},accordion:Boolean,indent:{type:Number,default:18},icon:{type:Ai}}),k3e={"check-change":(t,e,n)=>t&&Mi(e)&&Mi(n),"current-change":(t,e)=>!0,"node-click":(t,e,n,i)=>t&&e&&i instanceof Event,"node-contextmenu":(t,e,n,i)=>t instanceof Event&&e&&n,"node-collapse":(t,e,n)=>t&&e,"node-expand":(t,e,n)=>t&&e,check:(t,e)=>t&&e,"node-drag-start":(t,e)=>t&&e,"node-drag-end":(t,e,n,i)=>t&&i,"node-drop":(t,e,n,i)=>t&&e&&i,"node-drag-leave":(t,e,n)=>t&&e&&n,"node-drag-enter":(t,e,n)=>t&&e&&n,"node-drag-over":(t,e,n)=>t&&e&&n},P3e=Be({name:"ElTree",components:{ElTreeNode:M3e},props:x$,emits:k3e,setup(t,e){const{t:n}=Jn(),i=ht("tree"),s=X(new b3e({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}));s.value.initialize();const r=X(s.value.root),o=X(null),a=X(null),l=X(null),{broadcastExpanded:c}=_$(t),{dragState:u}=x3e({props:t,ctx:e,el$:a,dropIndicator$:l,store:s});A3e({el$:a},s);const d=xn(),h=F(()=>{let W=d?.parent;for(;W;){if(W.type.name==="ElTreeSelect")return!0;W=W.parent}return!1}),f=F(()=>{const{childNodes:W}=r.value;return(!W||W.length===0||W.every(({visible:Q})=>!Q))&&!h.value});We(()=>t.currentNodeKey,W=>{s.value.setCurrentNodeKey(W??null)}),We(()=>t.defaultCheckedKeys,(W,Q)=>{Ms(W,Q)||s.value.setDefaultCheckedKey(W??[])}),We(()=>t.defaultExpandedKeys,W=>{s.value.setDefaultExpandedKeys(W??[])}),We(()=>t.data,W=>{s.value.setData(W)},{deep:!0}),We(()=>t.checkStrictly,W=>{s.value.checkStrictly=W});const p=W=>{if(!t.filterNodeMethod)throw new Error("[Tree] filterNodeMethod is required when filter");s.value.filter(W)},m=W=>h4(t.nodeKey,W.data),b=W=>{if(!t.nodeKey)throw new Error(`[Tree] nodeKey is required in ${W}`)},g=W=>{b("getNodePath");const Q=s.value.getNode(W);if(!Q)return[];const ie=[Q.data];let ne=Q.parent;for(;ne&&ne!==r.value;)ie.push(ne.data),ne=ne.parent;return ie.reverse()},x=(W,Q)=>s.value.getCheckedNodes(W,Q),S=W=>s.value.getCheckedKeys(W),_=()=>{const W=s.value.getCurrentNode();return W?W.data:null},E=()=>{b("getCurrentKey");const W=_();return W?W[t.nodeKey]:null},T=(W,Q)=>{b("setCheckedNodes"),s.value.setCheckedNodes(W,Q)},A=(W,Q)=>{b("setCheckedKeys"),s.value.setCheckedKeys(W,Q)},I=(W,Q,ie)=>{s.value.setChecked(W,Q,ie)},P=()=>s.value.getHalfCheckedNodes(),k=()=>s.value.getHalfCheckedKeys(),B=(W,Q=!0)=>{b("setCurrentNode"),mM(s,e.emit,()=>{c(W),s.value.setUserCurrentNode(W,Q)})},R=(W=null,Q=!0)=>{b("setCurrentKey"),mM(s,e.emit,()=>{c(),s.value.setCurrentNodeKey(W,Q)})},H=W=>s.value.getNode(W),q=W=>{s.value.remove(W)},oe=(W,Q)=>{s.value.append(W,Q)},Z=(W,Q)=>{s.value.insertBefore(W,Q)},V=(W,Q)=>{s.value.insertAfter(W,Q)},D=(W,Q,ie)=>{c(Q),e.emit("node-expand",W,Q,ie)},K=(W,Q)=>{b("updateKeyChild"),s.value.updateChildren(W,Q)};return Xn(f4,{ctx:e,props:t,store:s,root:r,currentNode:o,instance:d}),Xn(Kc,void 0),{ns:i,store:s,root:r,currentNode:o,dragState:u,el$:a,dropIndicator$:l,isEmpty:f,filter:p,getNodeKey:m,getNodePath:g,getCheckedNodes:x,getCheckedKeys:S,getCurrentNode:_,getCurrentKey:E,setCheckedNodes:T,setCheckedKeys:A,setChecked:I,getHalfCheckedNodes:P,getHalfCheckedKeys:k,setCurrentNode:B,setCurrentKey:R,t:n,getNode:H,remove:q,append:oe,insertBefore:Z,insertAfter:V,handleNodeExpand:D,updateKeyChildren:K}}});function L3e(t,e,n,i,s,r){const o=Zt("el-tree-node");return z(),se("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"},[(z(!0),se(At,null,yn(t.root.childNodes,a=>(z(),De(o,{key:t.getNodeKey(a),node:a,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?(z(),se("div",{key:0,class:J(t.ns.e("empty-block"))},[Ue(t.$slots,"empty",{},()=>{var a;return[U("span",{class:J(t.ns.e("empty-text"))},Xe((a=t.emptyText)!=null?a:t.t("el.tree.emptyText")),3)]})],2)):Le("v-if",!0),_n(U("div",{ref:"dropIndicator$",class:J(t.ns.e("drop-indicator"))},null,2),[[ci,t.dragState.showDropIndicator]])],2)}var I3e=xt(P3e,[["render",L3e],["__file","/home/runner/work/element-plus/element-plus/packages/components/tree/src/tree.vue"]]);const p4=En(I3e),R3e=(t,{attrs:e,emit:n},{select:i,tree:s,key:r})=>{const o=ht("tree-select");We(()=>t.data,()=>{t.filterable&&Nt(()=>{var c,u;(u=s.value)==null||u.filter((c=i.value)==null?void 0:c.states.inputValue)})},{flush:"post"});const a=c=>{var u;const d=c.at(-1);if(d.expanded&&d.childNodes.at(-1))a([d.childNodes.at(-1)]);else{const h=(u=s.value.el$)==null?void 0:u.querySelector(`[data-key="${c.at(-1).key}"]`);h?.focus({preventScroll:!0});return}};return mn(()=>{xi(()=>{var c;return(c=i.value)==null?void 0:c.$el},"keydown",async c=>{const u=Oi(c),{dropdownMenuVisible:d}=i.value;[gt.down,gt.up].includes(u)&&d&&(await Nt(),setTimeout(()=>{var h,f,p;if(gt.up===u){const m=s.value.store.root.childNodes;a(m);return}(p=(f=(h=i.value.optionsArray[i.value.states.hoveringIndex].$el)==null?void 0:h.parentNode)==null?void 0:f.parentNode)==null||p.focus({preventScroll:!0})}))},{capture:!0})}),{...td(hr(t),Object.keys(mg.props)),...e,class:F(()=>e.class),style:F(()=>e.style),"onUpdate:modelValue":c=>n(wn,c),valueKey:r,popperClass:F(()=>{const c=[o.e("popper")];return t.popperClass&&c.push(t.popperClass),c.join(" ")}),filterMethod:(c="")=>{var u;t.filterMethod?t.filterMethod(c):t.remoteMethod?t.remoteMethod(c):(u=s.value)==null||u.filter(c)}}},O3e=Be({extends:c2,setup(t,e){const n=c2.setup(t,e);delete n.selectOptionClick;const i=xn().proxy;return Nt(()=>{n.select.states.cachedOptions.get(i.value)||n.select.onOptionCreate(i)}),We(()=>e.attrs.visible,s=>{Nt(()=>{n.states.visible=s})},{immediate:!0}),n},methods:{selectOptionClick(){this.$el.parentElement.click()}}});function yM(t){return t||t===0}function m4(t){return pt(t)&&t.length}function Op(t){return pt(t)?t:yM(t)?[t]:[]}function uw(t,e,n,i,s){for(let r=0;r{We([()=>t.modelValue,r],()=>{t.showCheckbox&&Nt(()=>{const h=r.value;h&&!Ms(h.getCheckedKeys(),Op(t.modelValue))&&h.setCheckedKeys(Op(t.modelValue))})},{immediate:!0,deep:!0});const a=F(()=>({value:o.value,label:"label",children:"children",disabled:"disabled",isLeaf:"isLeaf",...t.props})),l=(h,f)=>{var p;const m=a.value[h];return Kt(m)?m(f,(p=r.value)==null?void 0:p.getNode(l("value",f))):f[m]},c=Op(t.modelValue).map(h=>uw(t.data||[],f=>l("value",f)===h,f=>l("children",f),(f,p,m,b)=>b&&l("value",b))).filter(h=>yM(h)),u=F(()=>{if(!t.renderAfterExpand&&!t.lazy)return[];const h=[];return dw(t.data.concat(t.cacheData),f=>{const p=l("value",f);h.push({value:p,currentLabel:l("label",f),isDisabled:l("disabled",f)})},f=>l("children",f)),h}),d=()=>{var h;return(h=r.value)==null?void 0:h.getCheckedKeys().filter(f=>{var p;const m=(p=r.value)==null?void 0:p.getNode(f);return!Ws(m)&&Go(m.childNodes)})};return{...td(hr(t),Object.keys(p4.props)),...e,nodeKey:o,expandOnClickNode:F(()=>!t.checkStrictly&&t.expandOnClickNode),defaultExpandedKeys:F(()=>t.defaultExpandedKeys?t.defaultExpandedKeys.concat(c):c),renderContent:(h,{node:f,data:p,store:m})=>h(O3e,{value:l("value",p),label:l("label",p),disabled:l("disabled",p),visible:f.visible},t.renderContent?()=>t.renderContent(h,{node:f,data:p,store:m}):n.default?()=>n.default({node:f,data:p,store:m}):void 0),filterNodeMethod:(h,f,p)=>t.filterNodeMethod?t.filterNodeMethod(h,f,p):h?new RegExp(Gk(h),"i").test(l("label",f)||""):!0,onNodeClick:(h,f,p)=>{var m,b,g;if((m=e.onNodeClick)==null||m.call(e,h,f,p),!(t.showCheckbox&&t.checkOnClickNode))if(!t.showCheckbox&&(t.checkStrictly||f.isLeaf)){if(!l("disabled",h)){const x=(b=s.value)==null?void 0:b.states.options.get(l("value",h));(g=s.value)==null||g.handleOptionSelect(x)}}else t.expandOnClickNode&&p.proxy.handleExpandIconClick()},onCheck:(h,f)=>{var p;if(!t.showCheckbox)return;const m=l("value",h),b={};dw([r.value.store.root],_=>b[_.key]=_,_=>_.childNodes);const g=f.checkedKeys,x=t.multiple?Op(t.modelValue).filter(_=>!(_ in b)&&!g.includes(_)):[],S=x.concat(g);if(t.checkStrictly)i(wn,t.multiple?S:S.includes(m)?m:void 0);else if(t.multiple){const _=d();i(wn,x.concat(_))}else{const _=uw([h],A=>!m4(l("children",A))&&!l("disabled",A),A=>l("children",A)),E=_?l("value",_):void 0,T=yM(t.modelValue)&&!!uw([h],A=>l("value",A)===t.modelValue,A=>l("children",A));i(wn,E===t.modelValue||T?void 0:E)}Nt(()=>{var _;const E=Op(t.modelValue);r.value.setCheckedKeys(E),(_=e.onCheck)==null||_.call(e,h,{checkedKeys:r.value.getCheckedKeys(),checkedNodes:r.value.getCheckedNodes(),halfCheckedKeys:r.value.getHalfCheckedKeys(),halfCheckedNodes:r.value.getHalfCheckedNodes()})}),(p=s.value)==null||p.focus()},onNodeExpand:(h,f,p)=>{var m;(m=e.onNodeExpand)==null||m.call(e,h,f,p),Nt(()=>{if(!t.checkStrictly&&t.lazy&&t.multiple&&f.checked){const b={},g=r.value.getCheckedKeys();dw([r.value.store.root],_=>b[_.key]=_,_=>_.childNodes);const x=Op(t.modelValue).filter(_=>!(_ in b)&&!g.includes(_)),S=d();i(wn,x.concat(S))}})},cacheOptions:u}};var N3e=Be({props:{data:{type:Array,default:()=>[]}},setup(t){const e=zt(s1);return We(()=>t.data,()=>{var n;t.data.forEach(s=>{e.states.cachedOptions.has(s.value)||e.states.cachedOptions.set(s.value,s)});const i=((n=e.selectRef)==null?void 0:n.querySelectorAll("input"))||[];pi&&!Array.from(i).includes(document.activeElement)&&e.setSelected()},{flush:"post",immediate:!0}),()=>{}}});const B3e=Be({name:"ElTreeSelect",inheritAttrs:!1,props:{...hU,...x$,cacheData:{type:Array,default:()=>[]}},setup(t,e){const{slots:n,expose:i}=e,s=X(),r=X(),o=F(()=>t.nodeKey||t.valueKey||"value"),a=R3e(t,e,{select:s,tree:r,key:o}),{cacheOptions:l,...c}=D3e(t,e,{select:s,tree:r,key:o}),u=ni({});return i(u),mn(()=>{Object.assign(u,{...td(r.value,["filter","updateKeyChildren","getCheckedNodes","setCheckedNodes","getCheckedKeys","setCheckedKeys","setChecked","getHalfCheckedNodes","getHalfCheckedKeys","getCurrentKey","getCurrentNode","setCurrentKey","setCurrentNode","getNode","remove","append","insertBefore","insertAfter"]),...td(s.value,["focus","blur","selectedLabel"]),treeRef:r.value,selectRef:s.value})}),()=>tn(mg,ni({...a,ref:d=>s.value=d}),{...n,default:()=>[tn(N3e,{data:l.value}),tn(p4,ni({...c,ref:d=>r.value=d}))]})}});var F3e=xt(B3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-select/src/tree-select.vue"]]);const z3e=En(F3e),g4=Symbol(),U3e={key:-1,level:-1,data:{}};var Vv=(t=>(t.KEY="id",t.LABEL="label",t.CHILDREN="children",t.DISABLED="disabled",t.CLASS="",t))(Vv||{}),bM=(t=>(t.ADD="add",t.DELETE="delete",t))(bM||{});const S$={type:Number,default:26},$3e=_t({data:{type:Re(Array),default:()=>ws([])},emptyText:{type:String},height:{type:Number,default:200},props:{type:Re(Object),default:()=>ws({children:"children",label:"label",disabled:"disabled",value:"id",class:""})},highlightCurrent:Boolean,showCheckbox:Boolean,defaultCheckedKeys:{type:Re(Array),default:()=>ws([])},checkStrictly:Boolean,defaultExpandedKeys:{type:Re(Array),default:()=>ws([])},indent:{type:Number,default:16},itemSize:S$,icon:{type:Ai},expandOnClickNode:{type:Boolean,default:!0},checkOnClickNode:Boolean,checkOnClickLeaf:{type:Boolean,default:!0},currentNodeKey:{type:Re([String,Number])},accordion:Boolean,filterMethod:{type:Re(Function)},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),V3e=_t({node:{type:Re(Object),default:()=>ws(U3e)},expanded:Boolean,checked:Boolean,indeterminate:Boolean,showCheckbox:Boolean,disabled:Boolean,current:Boolean,hiddenExpandIcon:Boolean,itemSize:S$}),H3e=_t({node:{type:Re(Object),required:!0}}),E$="node-click",C$="node-drop",T$="node-expand",M$="node-collapse",A$="current-change",k$="check",P$="check-change",L$="node-contextmenu",W3e={[E$]:(t,e,n)=>t&&e&&n,[C$]:(t,e,n)=>t&&e&&n,[T$]:(t,e)=>t&&e,[M$]:(t,e)=>t&&e,[A$]:(t,e)=>t&&e,[k$]:(t,e)=>t&&e,[P$]:(t,e)=>t&&Mi(e),[L$]:(t,e,n)=>t&&e&&n},G3e={click:(t,e)=>!!(t&&e),drop:(t,e)=>!!(t&&e),toggle:t=>!!t,check:(t,e)=>t&&Mi(e)};function j3e(t,e){const n=X(new Set),i=X(new Set),{emit:s}=xn();We([()=>e.value,()=>t.defaultCheckedKeys],()=>Nt(()=>{x(t.defaultCheckedKeys)}),{immediate:!0});const r=()=>{if(!e.value||!t.showCheckbox||t.checkStrictly)return;const{levelTreeNodeMap:S,maxLevel:_}=e.value,E=n.value,T=new Set;for(let A=_;A>=1;--A){const I=S.get(A);I&&I.forEach(P=>{const k=P.children;let B=!P.isLeaf||P.disabled||E.has(P.key);if(k){let R=!0,H=!1;for(const q of k){const oe=q.key;if(q.isEffectivelyChecked||(B=!1),E.has(oe))H=!0;else if(T.has(oe)){R=!1,H=!0;break}else R=!1}R?E.add(P.key):H?(T.add(P.key),E.delete(P.key)):(E.delete(P.key),T.delete(P.key))}P.isEffectivelyChecked=B})}i.value=T},o=S=>n.value.has(S.key),a=S=>i.value.has(S.key),l=(S,_,E=!0,T=!0)=>{const A=n.value,I=S.children;!t.checkStrictly&&E&&I?.length&&(_=I.some(k=>!k.isEffectivelyChecked));const P=(k,B)=>{A[B?bM.ADD:bM.DELETE](k.key);const R=k.children;!t.checkStrictly&&R&&R.forEach(H=>{(!H.disabled||H.children)&&P(H,B)})};P(S,_),T&&r(),E&&c(S,_)},c=(S,_)=>{const{checkedNodes:E,checkedKeys:T}=p(),{halfCheckedNodes:A,halfCheckedKeys:I}=m();s(k$,S.data,{checkedKeys:T,checkedNodes:E,halfCheckedKeys:I,halfCheckedNodes:A}),s(P$,S.data,_)};function u(S=!1){return p(S).checkedKeys}function d(S=!1){return p(S).checkedNodes}function h(){return m().halfCheckedKeys}function f(){return m().halfCheckedNodes}function p(S=!1){const _=[],E=[];if(e?.value&&t.showCheckbox){const{treeNodeMap:T}=e.value;n.value.forEach(A=>{const I=T.get(A);I&&(!S||S&&I.isLeaf)&&(E.push(A),_.push(I.data))})}return{checkedKeys:E,checkedNodes:_}}function m(){const S=[],_=[];if(e?.value&&t.showCheckbox){const{treeNodeMap:E}=e.value;i.value.forEach(T=>{const A=E.get(T);A&&(_.push(T),S.push(A.data))})}return{halfCheckedNodes:S,halfCheckedKeys:_}}function b(S){n.value.clear(),i.value.clear(),Nt(()=>{x(S)})}function g(S,_){if(e?.value&&t.showCheckbox){const E=e.value.treeNodeMap.get(S);E&&l(E,_,!1)}}function x(S){if(e?.value){const{treeNodeMap:_}=e.value;if(t.showCheckbox&&_&&S?.length>0){for(const E of S){const T=_.get(E);T&&!o(T)&&l(T,!0,!1,!1)}r()}}}return{updateCheckedKeys:r,toggleCheckbox:l,isChecked:o,isIndeterminate:a,getCheckedKeys:u,getCheckedNodes:d,getHalfCheckedKeys:h,getHalfCheckedNodes:f,setChecked:g,setCheckedKeys:b}}function K3e(t,e){const n=X(new Set([])),i=X(new Set([])),s=F(()=>Kt(t.filterMethod));function r(a){var l;if(!s.value)return;const c=new Set,u=i.value,d=n.value,h=[],f=((l=e.value)==null?void 0:l.treeNodes)||[],p=t.filterMethod;d.clear();function m(b){b.forEach(g=>{h.push(g),p?.(a,g.data,g)?h.forEach(S=>{c.add(S.key),S.expanded=!0}):(g.expanded=!1,g.isLeaf&&d.add(g.key));const x=g.children;if(x&&m(x),!g.isLeaf){if(!c.has(g.key))d.add(g.key);else if(x){let S=!0;for(const _ of x)if(!d.has(_.key)){S=!1;break}S?u.add(g.key):u.delete(g.key)}}h.pop()})}return m(f),c}function o(a){return i.value.has(a.key)}return{hiddenExpandIconKeySet:i,hiddenNodeKeySet:n,doFilter:r,isForceHiddenExpandIcon:o}}function q3e(t,e){const n=X(new Set),i=X(),s=wi(),r=X(),{isIndeterminate:o,isChecked:a,toggleCheckbox:l,getCheckedKeys:c,getCheckedNodes:u,getHalfCheckedKeys:d,getHalfCheckedNodes:h,setChecked:f,setCheckedKeys:p}=j3e(t,s),{doFilter:m,hiddenNodeKeySet:b,isForceHiddenExpandIcon:g}=K3e(t,s),x=F(()=>{var ve;return((ve=t.props)==null?void 0:ve.value)||Vv.KEY}),S=F(()=>{var ve;return((ve=t.props)==null?void 0:ve.children)||Vv.CHILDREN}),_=F(()=>{var ve;return((ve=t.props)==null?void 0:ve.disabled)||Vv.DISABLED}),E=F(()=>{var ve;return((ve=t.props)==null?void 0:ve.label)||Vv.LABEL}),T=F(()=>{var ve;const fe=n.value,Me=b.value,ge=[],Qe=((ve=s.value)==null?void 0:ve.treeNodes)||[],G=[];for(let ee=Qe.length-1;ee>=0;--ee)G.push(Qe[ee]);for(;G.length;){const ee=G.pop();if(!Me.has(ee.key)&&(ge.push(ee),ee.children&&fe.has(ee.key)))for(let j=ee.children.length-1;j>=0;--j)G.push(ee.children[j])}return ge}),A=F(()=>T.value.length>0);function I(ve){const fe=new Map,Me=new Map;let ge=1;function Qe(ee,j=1,he=void 0){var be;const re=[];for(const le of ee){const Ce=B(le),Ee={level:j,key:Ce,data:le};Ee.label=H(le),Ee.parent=he;const Oe=k(le);Ee.disabled=R(le),Ee.isLeaf=!Oe||Oe.length===0,Ee.expanded=n.value.has(Ce),Oe&&Oe.length&&(Ee.children=Qe(Oe,j+1,Ee)),re.push(Ee),fe.set(Ce,Ee),Me.has(j)||Me.set(j,[]),(be=Me.get(j))==null||be.push(Ee)}return j>ge&&(ge=j),re}const G=Qe(ve);return{treeNodeMap:fe,levelTreeNodeMap:Me,maxLevel:ge,treeNodes:G}}function P(ve){const fe=m(ve);fe&&(n.value=fe)}function k(ve){return ve[S.value]}function B(ve){return ve?ve[x.value]:""}function R(ve){return ve[_.value]}function H(ve){return ve[E.value]}function q(ve){n.value.has(ve.key)?Q(ve):W(ve)}function oe(ve){const fe=new Set,Me=s.value.treeNodeMap;n.value.forEach(ge=>{const Qe=Me.get(ge);n.value.delete(Qe.key),Qe.expanded=!1}),ve.forEach(ge=>{let Qe=Me.get(ge);for(;Qe&&!fe.has(Qe.key);)fe.add(Qe.key),Qe.expanded=!0,Qe=Qe.parent}),n.value=fe}function Z(ve,fe){e(E$,ve.data,ve,fe),D(ve),t.expandOnClickNode&&q(ve),t.showCheckbox&&(t.checkOnClickNode||ve.isLeaf&&t.checkOnClickLeaf)&&!ve.disabled&&l(ve,!a(ve),!0)}function V(ve,fe){e(C$,ve.data,ve,fe)}function D(ve){ne(ve)||(i.value=ve.key,e(A$,ve.data,ve))}function K(ve,fe){l(ve,fe)}function W(ve){const fe=n.value;if(s.value&&t.accordion){const{treeNodeMap:ge}=s.value;fe.forEach(Qe=>{const G=ge.get(Qe);ve&&ve.level===G?.level&&(fe.delete(Qe),G.expanded=!1)})}fe.add(ve.key);const Me=Te(ve.key);Me&&(Me.expanded=!0,e(T$,Me.data,Me))}function Q(ve){n.value.delete(ve.key);const fe=Te(ve.key);fe&&(fe.expanded=!1,e(M$,fe.data,fe))}function ie(ve){return!!ve.disabled}function ne(ve){const fe=i.value;return fe!==void 0&&fe===ve.key}function ce(){var ve,fe;if(i.value)return(fe=(ve=s.value)==null?void 0:ve.treeNodeMap.get(i.value))==null?void 0:fe.data}function ae(){return i.value}function _e(ve){i.value=ve}function ke(ve){s.value=I(ve)}function Te(ve){var fe;const Me=Mn(ve)?B(ve):ve;return(fe=s.value)==null?void 0:fe.treeNodeMap.get(Me)}function Ke(ve,fe="auto"){const Me=Te(ve);Me&&r.value&&r.value.scrollToItem(T.value.indexOf(Me),fe)}function Fe(ve){var fe;(fe=r.value)==null||fe.scrollTo(ve)}return We(()=>t.currentNodeKey,ve=>{i.value=ve},{immediate:!0}),We(()=>t.defaultExpandedKeys,ve=>{n.value=new Set(ve)},{immediate:!0}),We(()=>t.data,ve=>{ke(ve)},{immediate:!0}),{tree:s,flattenTree:T,isNotEmpty:A,listRef:r,getKey:B,getChildren:k,toggleExpand:q,toggleCheckbox:l,isChecked:a,isIndeterminate:o,isDisabled:ie,isCurrent:ne,isForceHiddenExpandIcon:g,handleNodeClick:Z,handleNodeDrop:V,handleNodeCheck:K,getCurrentNode:ce,getCurrentKey:ae,setCurrentKey:_e,getCheckedKeys:c,getCheckedNodes:u,getHalfCheckedKeys:d,getHalfCheckedNodes:h,setChecked:f,setCheckedKeys:p,filter:P,setData:ke,getNode:Te,expandNode:W,collapseNode:Q,setExpandedKeys:oe,scrollToNode:Ke,scrollTo:Fe}}var Y3e=Be({name:"ElTreeNodeContent",props:H3e,setup(t){const e=zt(g4),n=ht("tree");return()=>{const i=t.node,{data:s}=i;return e?.ctx.slots.default?e.ctx.slots.default({node:i,data:s}):tn(d4,{tag:"span",truncated:!0,class:n.be("node","label")},()=>[i?.label])}}});const X3e=["aria-expanded","aria-disabled","aria-checked","data-key"],Z3e=Be({name:"ElTreeNode",__name:"tree-node",props:V3e,emits:G3e,setup(t,{emit:e}){const n=t,i=e,s=zt(g4),r=ht("tree"),o=F(()=>{var p;return(p=s?.props.indent)!=null?p:16}),a=F(()=>{var p;return(p=s?.props.icon)!=null?p:J9}),l=p=>{const m=s?.props.props.class;if(!m)return{};let b;if(Kt(m)){const{data:g}=p;b=m(g,p)}else b=m;return Gt(b)?{[b]:!0}:b},c=p=>{i("click",n.node,p)},u=p=>{i("drop",n.node,p)},d=()=>{i("toggle",n.node)},h=p=>{i("check",n.node,p)},f=p=>{var m,b,g,x;(g=(b=(m=s?.instance)==null?void 0:m.vnode)==null?void 0:b.props)!=null&&g.onNodeContextmenu&&(p.stopPropagation(),p.preventDefault()),s?.ctx.emit(L$,p,(x=n.node)==null?void 0:x.data,n.node)};return(p,m)=>{var b,g,x;return z(),se("div",{ref:"node$",class:J([v(r).b("node"),v(r).is("expanded",p.expanded),v(r).is("current",p.current),v(r).is("focusable",!p.disabled),v(r).is("checked",!p.disabled&&p.checked),l(p.node)]),role:"treeitem",tabindex:"-1","aria-expanded":p.expanded,"aria-disabled":p.disabled,"aria-checked":p.checked,"data-key":(b=p.node)==null?void 0:b.key,onClick:un(c,["stop"]),onContextmenu:f,onDragover:m[1]||(m[1]=un(()=>{},["prevent"])),onDragenter:m[2]||(m[2]=un(()=>{},["prevent"])),onDrop:un(u,["stop"])},[U("div",{class:J(v(r).be("node","content")),style:Ht({paddingLeft:`${(p.node.level-1)*o.value}px`,height:p.itemSize+"px"})},[a.value?(z(),De(v(Ut),{key:0,class:J([v(r).is("leaf",!!((g=p.node)!=null&&g.isLeaf)),v(r).is("hidden",p.hiddenExpandIcon),{expanded:!((x=p.node)!=null&&x.isLeaf)&&p.expanded},v(r).be("node","expand-icon")]),onClick:un(d,["stop"])},{default:xe(()=>[(z(),De(Sn(a.value)))]),_:1},8,["class"])):Le("v-if",!0),p.showCheckbox?(z(),De(v(Gl),{key:1,"model-value":p.checked,indeterminate:p.indeterminate,disabled:p.disabled,onChange:h,onClick:m[0]||(m[0]=un(()=>{},["stop"]))},null,8,["model-value","indeterminate","disabled"])):Le("v-if",!0),de(v(Y3e),{node:{...p.node,expanded:p.expanded}},null,8,["node"])],6)],42,X3e)}}});var J3e=xt(Z3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree-node.vue"]]);const Q3e=Be({name:"ElTreeV2",__name:"tree",props:$3e,emits:W3e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=tr(),o=F(()=>i.itemSize);Xn(g4,{ctx:{emit:s,slots:r},props:i,instance:xn()}),Xn(Kc,void 0);const{t:a}=Jn(),l=ht("tree"),{flattenTree:c,isNotEmpty:u,listRef:d,toggleExpand:h,isIndeterminate:f,isChecked:p,isDisabled:m,isCurrent:b,isForceHiddenExpandIcon:g,handleNodeClick:x,handleNodeDrop:S,handleNodeCheck:_,toggleCheckbox:E,getCurrentNode:T,getCurrentKey:A,setCurrentKey:I,getCheckedKeys:P,getCheckedNodes:k,getHalfCheckedKeys:B,getHalfCheckedNodes:R,setChecked:H,setCheckedKeys:q,filter:oe,setData:Z,getNode:V,expandNode:D,collapseNode:K,setExpandedKeys:W,scrollToNode:Q,scrollTo:ie}=q3e(i,s);return e({toggleCheckbox:E,getCurrentNode:T,getCurrentKey:A,setCurrentKey:I,getCheckedKeys:P,getCheckedNodes:k,getHalfCheckedKeys:B,getHalfCheckedNodes:R,setChecked:H,setCheckedKeys:q,filter:oe,setData:Z,getNode:V,expandNode:D,collapseNode:K,setExpandedKeys:W,scrollToNode:Q,scrollTo:ie}),(ne,ce)=>(z(),se("div",{class:J([v(l).b(),{[v(l).m("highlight-current")]:ne.highlightCurrent}]),role:"tree"},[v(u)?(z(),De(v(SU),{key:0,ref_key:"listRef",ref:d,"class-name":v(l).b("virtual-list"),data:v(c),total:v(c).length,height:ne.height,"item-size":o.value,"perf-mode":ne.perfMode,"scrollbar-always-on":ne.scrollbarAlwaysOn},{default:xe(({data:ae,index:_e,style:ke})=>[(z(),De(J3e,{key:ae[_e].key,style:Ht(ke),node:ae[_e],expanded:ae[_e].expanded,"show-checkbox":ne.showCheckbox,checked:v(p)(ae[_e]),indeterminate:v(f)(ae[_e]),"item-size":o.value,disabled:v(m)(ae[_e]),current:v(b)(ae[_e]),"hidden-expand-icon":v(g)(ae[_e]),onClick:v(x),onToggle:v(h),onCheck:v(_),onDrop:v(S)},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","scrollbar-always-on"])):(z(),se("div",{key:1,class:J(v(l).e("empty-block"))},[Ue(ne.$slots,"empty",{},()=>{var ae;return[U("span",{class:J(v(l).e("empty-text"))},Xe((ae=ne.emptyText)!=null?ae:v(a)("el.tree.emptyText")),3)]})],2))],2))}});var eAe=xt(Q3e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tree-v2/src/tree.vue"]]);const tAe=En(eAe),I$=Symbol("uploadContextKey"),nAe="ElUpload";class iAe extends Error{constructor(e,n,i,s){super(e),this.name="UploadAjaxError",this.status=n,this.method=i,this.url=s}}function l5(t,e,n){let i;return n.response?i=`${n.response.error||n.response}`:n.responseText?i=`${n.responseText}`:i=`fail to ${e.method} ${t} ${n.status}`,new iAe(i,n.status,e.method,t)}function sAe(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const rAe=t=>{typeof XMLHttpRequest>"u"&&Ks(nAe,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",r=>{const o=r;o.percent=r.total>0?r.loaded/r.total*100:0,t.onProgress(o)});const i=new FormData;if(t.data)for(const[r,o]of Object.entries(t.data))pt(o)&&o.length?i.append(r,...o):i.append(r,o);i.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(l5(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(l5(n,t,e));t.onSuccess(sAe(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const s=t.headers||{};if(s instanceof Headers)s.forEach((r,o)=>e.setRequestHeader(o,r));else for(const[r,o]of Object.entries(s))Ws(o)||e.setRequestHeader(r,String(o));return e.send(i),e},R$=["text","picture","picture-card"];let oAe=1;const _M=()=>Date.now()+oAe++,O$=_t({action:{type:String,default:"#"},headers:{type:Re(Object)},method:{type:String,default:"post"},data:{type:Re([Object,Function,Promise]),default:()=>ws({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:Re(Array),default:()=>ws([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:R$,default:"text"},httpRequest:{type:Re(Function),default:rAe},disabled:{type:Boolean,default:void 0},limit:Number}),aAe=_t({...O$,beforeUpload:{type:Re(Function),default:_i},beforeRemove:{type:Re(Function)},onRemove:{type:Re(Function),default:_i},onChange:{type:Re(Function),default:_i},onPreview:{type:Re(Function),default:_i},onSuccess:{type:Re(Function),default:_i},onProgress:{type:Re(Function),default:_i},onError:{type:Re(Function),default:_i},onExceed:{type:Re(Function),default:_i},crossorigin:{type:Re(String)}}),lAe=_t({files:{type:Re(Array),default:()=>ws([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:Re(Function),default:_i},listType:{type:String,values:R$,default:"text"},crossorigin:{type:Re(String)}}),cAe={remove:t=>!!t},uAe=["tabindex","aria-disabled","onKeydown"],dAe=["src","crossorigin"],hAe=["onClick"],fAe=["title"],pAe=["onClick"],mAe=["onClick"],gAe=Be({name:"ElUploadList",__name:"upload-list",props:lAe,emits:cAe,setup(t,{emit:e}){const n=t,i=e,{t:s}=Jn(),r=ht("upload"),o=ht("icon"),a=ht("list"),l=Es(),c=X(!1),u=F(()=>[r.b("list"),r.bm("list",n.listType),r.is("disabled",l.value)]),d=h=>{i("remove",h)};return(h,f)=>(z(),De(AA,{tag:"ul",class:J(u.value),name:v(a).b()},{default:xe(()=>[(z(!0),se(At,null,yn(h.files,(p,m)=>(z(),se("li",{key:p.uid||p.name,class:J([v(r).be("list","item"),v(r).is(p.status),{focusing:c.value}]),tabindex:v(l)?void 0:0,"aria-disabled":v(l),role:"button",onKeydown:_s(b=>!v(l)&&d(p),["delete"]),onFocus:f[0]||(f[0]=b=>c.value=!0),onBlur:f[1]||(f[1]=b=>c.value=!1),onClick:f[2]||(f[2]=b=>c.value=!1)},[Ue(h.$slots,"default",{file:p,index:m},()=>[h.listType==="picture"||p.status!=="uploading"&&h.listType==="picture-card"?(z(),se("img",{key:0,class:J(v(r).be("list","item-thumbnail")),src:p.url,crossorigin:h.crossorigin,alt:""},null,10,dAe)):Le("v-if",!0),p.status==="uploading"||h.listType!=="picture-card"?(z(),se("div",{key:1,class:J(v(r).be("list","item-info"))},[U("a",{class:J(v(r).be("list","item-name")),onClick:un(b=>h.handlePreview(p),["prevent"])},[de(v(Ut),{class:J(v(o).m("document"))},{default:xe(()=>[de(v(Yue))]),_:1},8,["class"]),U("span",{class:J(v(r).be("list","item-file-name")),title:p.name},Xe(p.name),11,fAe)],10,hAe),p.status==="uploading"?(z(),De(v(Yk),{key:0,type:h.listType==="picture-card"?"circle":"line","stroke-width":h.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Ht(h.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):Le("v-if",!0)],2)):Le("v-if",!0),U("label",{class:J(v(r).be("list","item-status-label"))},[h.listType==="text"?(z(),De(v(Ut),{key:0,class:J([v(o).m("upload-success"),v(o).m("circle-check")])},{default:xe(()=>[de(v(sk))]),_:1},8,["class"])):["picture-card","picture"].includes(h.listType)?(z(),De(v(Ut),{key:1,class:J([v(o).m("upload-success"),v(o).m("check")])},{default:xe(()=>[de(v(Yy))]),_:1},8,["class"])):Le("v-if",!0)],2),v(l)?Le("v-if",!0):(z(),De(v(Ut),{key:2,class:J(v(o).m("close")),onClick:b=>d(p)},{default:xe(()=>[de(v(ul))]),_:1},8,["class","onClick"])),Le(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),Le(" This is a bug which needs to be fixed "),Le(" TODO: Fix the incorrect navigation interaction "),v(l)?Le("v-if",!0):(z(),se("i",{key:3,class:J(v(o).m("close-tip"))},Xe(v(s)("el.upload.deleteTip")),3)),h.listType==="picture-card"?(z(),se("span",{key:4,class:J(v(r).be("list","item-actions"))},[U("span",{class:J(v(r).be("list","item-preview")),onClick:b=>h.handlePreview(p)},[de(v(Ut),{class:J(v(o).m("zoom-in"))},{default:xe(()=>[de(v(n7))]),_:1},8,["class"])],10,pAe),v(l)?Le("v-if",!0):(z(),se("span",{key:0,class:J(v(r).be("list","item-delete")),onClick:b=>d(p)},[de(v(Ut),{class:J(v(o).m("delete"))},{default:xe(()=>[de(v(Kue))]),_:1},8,["class"])],10,mAe))],2)):Le("v-if",!0)])],42,uAe))),128)),Ue(h.$slots,"append")]),_:3},8,["class","name"]))}});var c5=xt(gAe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-list.vue"]]);const vAe=_t({disabled:{type:Boolean,default:void 0}}),yAe={file:t=>pt(t)},u5="ElUploadDrag",bAe=Be({name:u5,__name:"upload-dragger",props:vAe,emits:yAe,setup(t,{emit:e}){const n=e;zt(I$)||Ks(u5,"usage: ");const s=ht("upload"),r=X(!1),o=Es(),a=u=>{if(o.value)return;r.value=!1,u.stopPropagation();const d=Array.from(u.dataTransfer.files),h=u.dataTransfer.items||[];d.forEach((f,p)=>{var m;const b=h[p],g=(m=b?.webkitGetAsEntry)==null?void 0:m.call(b);g&&(f.isDirectory=g.isDirectory)}),n("file",d)},l=()=>{o.value||(r.value=!0)},c=u=>{u.currentTarget.contains(u.relatedTarget)||(r.value=!1)};return(u,d)=>(z(),se("div",{class:J([v(s).b("dragger"),v(s).is("dragover",r.value)]),onDrop:un(a,["prevent"]),onDragover:un(l,["prevent"]),onDragleave:un(c,["prevent"])},[Ue(u.$slots,"default")],34))}});var _Ae=xt(bAe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-dragger.vue"]]);const wAe=_t({...O$,beforeUpload:{type:Re(Function),default:_i},onRemove:{type:Re(Function),default:_i},onStart:{type:Re(Function),default:_i},onSuccess:{type:Re(Function),default:_i},onProgress:{type:Re(Function),default:_i},onError:{type:Re(Function),default:_i},onExceed:{type:Re(Function),default:_i}}),xAe=["tabindex","aria-disabled","onKeydown"],SAe=["name","disabled","multiple","accept"],EAe=Be({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:wAe,setup(t,{expose:e}){const n=t,i=ht("upload"),s=Es(),r=wi({}),o=wi(),a=m=>{if(m.length===0)return;const{autoUpload:b,limit:g,fileList:x,multiple:S,onStart:_,onExceed:E}=n;if(g&&x.length+m.length>g){E(m,x);return}S||(m=m.slice(0,1));for(const T of m){const A=T;A.uid=_M(),_(A),b&&l(A)}},l=async m=>{if(o.value.value="",!n.beforeUpload)return u(m);let b,g={};try{const S=n.data,_=n.beforeUpload(m);g=A0(n.data)?Zw(n.data):n.data,b=await _,A0(n.data)&&Ms(S,g)&&(g=Zw(n.data))}catch{b=!1}if(b===!1){n.onRemove(m);return}let x=m;b instanceof Blob&&(b instanceof File?x=b:x=new File([b],m.name,{type:m.type})),u(Object.assign(x,{uid:m.uid}),g)},c=async(m,b)=>Kt(m)?m(b):m,u=async(m,b)=>{const{headers:g,data:x,method:S,withCredentials:_,name:E,action:T,onProgress:A,onSuccess:I,onError:P,httpRequest:k}=n;try{b=await c(b??x,m)}catch{n.onRemove(m);return}const{uid:B}=m,R={headers:g||{},withCredentials:_,file:m,data:b,method:S,filename:E,action:T,onProgress:q=>{A(q,m)},onSuccess:q=>{I(q,m),delete r.value[B]},onError:q=>{P(q,m),delete r.value[B]}},H=k(R);r.value[B]=H,H instanceof Promise&&H.then(R.onSuccess,R.onError)},d=m=>{const b=m.target.files;b&&a(Array.from(b))},h=()=>{s.value||(o.value.value="",o.value.click())},f=()=>{h()};return e({abort:m=>{K9(r.value).filter(m?([g])=>String(m.uid)===g:()=>!0).forEach(([g,x])=>{x instanceof XMLHttpRequest&&x.abort(),delete r.value[g]})},upload:l}),(m,b)=>(z(),se("div",{class:J([v(i).b(),v(i).m(m.listType),v(i).is("drag",m.drag),v(i).is("disabled",v(s))]),tabindex:v(s)?void 0:0,"aria-disabled":v(s),role:"button",onClick:h,onKeydown:_s(un(f,["self"]),["enter","space"])},[m.drag?(z(),De(_Ae,{key:0,disabled:v(s),onFile:a},{default:xe(()=>[Ue(m.$slots,"default")]),_:3},8,["disabled"])):Ue(m.$slots,"default",{key:1}),U("input",{ref_key:"inputRef",ref:o,class:J(v(i).e("input")),name:m.name,disabled:v(s),multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:b[0]||(b[0]=un(()=>{},["stop"]))},null,42,SAe)],42,xAe))}});var d5=xt(EAe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload-content.vue"]]);const h5="ElUpload",f5=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},CAe=(t,e)=>{const n=F9(t,"fileList",void 0,{passive:!0}),i=p=>n.value.find(m=>m.uid===p.uid);function s(p){var m;(m=e.value)==null||m.abort(p)}function r(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}function o(p){n.value=n.value.filter(m=>m.uid!==p.uid)}const a=p=>{Nt(()=>t.onChange(p,n.value))},l=(p,m)=>{const b=i(m);b&&(console.error(p),b.status="fail",o(b),t.onError(p,b,n.value),a(b))},c=(p,m)=>{const b=i(m);b&&(t.onProgress(p,b,n.value),b.status="uploading",b.percentage=Math.round(p.percent))},u=(p,m)=>{const b=i(m);b&&(b.status="success",b.response=p,t.onSuccess(p,b,n.value),a(b))},d=p=>{Ws(p.uid)&&(p.uid=_M());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(b){b.message,t.onError(b,m,n.value)}n.value=[...n.value,m],a(m)},h=async p=>{const m=p instanceof File?i(p):p;m||Ks(h5,"file to be removed not found");const b=g=>{s(g),o(g),t.onRemove(g,n.value),f5(g)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&b(m):b(m)};function f(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=e.value)==null?void 0:m.upload(p))})}return We(()=>t.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:b,url:g}=m;if(!g&&b)try{m.url=URL.createObjectURL(b)}catch(x){t.onError(x,m,n.value)}return m}))}),We(n,p=>{for(const m of p)m.uid||(m.uid=_M()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:s,clearFiles:r,handleError:l,handleProgress:c,handleStart:d,handleSuccess:u,handleRemove:h,submit:f,revokeFileObjectURL:f5}},TAe=Be({name:"ElUpload",__name:"upload",props:aAe,setup(t,{expose:e}){const n=t,i=Es(),s=wi(),{abort:r,submit:o,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=CAe(n,s),m=F(()=>n.listType==="picture-card"),b=F(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return gi(()=>{l.value.forEach(p)}),Xn(I$,{accept:Ei(n,"accept")}),e({abort:r,submit:o,clearFiles:a,handleStart:c,handleRemove:d}),(g,x)=>(z(),se("div",null,[m.value&&g.showFileList?(z(),De(c5,{key:0,disabled:v(i),"list-type":g.listType,files:v(l),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:v(d)},va({append:xe(()=>[de(d5,Dn({ref_key:"uploadRef",ref:s},b.value),{default:xe(()=>[g.$slots.trigger?Ue(g.$slots,"trigger",{key:0}):Le("v-if",!0),!g.$slots.trigger&&g.$slots.default?Ue(g.$slots,"default",{key:1}):Le("v-if",!0)]),_:3},16)]),_:2},[g.$slots.file?{name:"default",fn:xe(({file:S,index:_})=>[Ue(g.$slots,"file",{file:S,index:_})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Le("v-if",!0),!m.value||m.value&&!g.showFileList?(z(),De(d5,Dn({key:1,ref_key:"uploadRef",ref:s},b.value),{default:xe(()=>[g.$slots.trigger?Ue(g.$slots,"trigger",{key:0}):Le("v-if",!0),!g.$slots.trigger&&g.$slots.default?Ue(g.$slots,"default",{key:1}):Le("v-if",!0)]),_:3},16)):Le("v-if",!0),g.$slots.trigger?Ue(g.$slots,"default",{key:2}):Le("v-if",!0),Ue(g.$slots,"tip"),!m.value&&g.showFileList?(z(),De(c5,{key:3,disabled:v(i),"list-type":g.listType,files:v(l),crossorigin:g.crossorigin,"handle-preview":g.onPreview,onRemove:v(d)},va({_:2},[g.$slots.file?{name:"default",fn:xe(({file:S,index:_})=>[Ue(g.$slots,"file",{file:S,index:_})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):Le("v-if",!0)]))}});var MAe=xt(TAe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/upload/src/upload.vue"]]);const AAe=En(MAe),kAe=_t({zIndex:{type:Number,default:9},rotate:{type:Number,default:-22},width:Number,height:Number,image:String,content:{type:Re([String,Array]),default:"Element Plus"},font:{type:Re(Object)},gap:{type:Re(Array),default:()=>[100,100]},offset:{type:Re(Array)}});function PAe(t){return t.replace(/([A-Z])/g,"-$1").toLowerCase()}function LAe(t){return Object.keys(t).map(e=>`${PAe(e)}: ${t[e]};`).join(" ")}function IAe(){return window.devicePixelRatio||1}const RAe=(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},OAe={left:[0,.5],start:[0,.5],center:[.5,0],right:[1,-.5],end:[1,-.5]};function vE(t,e,n=1){const i=document.createElement("canvas"),s=i.getContext("2d"),r=t*n,o=e*n;return i.setAttribute("width",`${r}px`),i.setAttribute("height",`${o}px`),s.save(),[s,i,r,o]}function DAe(){function t(e,n,i,s,r,o,a,l,c){const[u,d,h,f]=vE(s,r,i);let p=0;if(e instanceof HTMLImageElement)u.drawImage(e,0,0,h,f);else{const{color:ne,fontSize:ce,fontStyle:ae,fontWeight:_e,fontFamily:ke,textAlign:Te,textBaseline:Ke}=o,Fe=Number(ce)*i;u.font=`${ae} normal ${_e} ${Fe}px/${r}px ${ke}`,u.fillStyle=ne,u.textAlign=Te,u.textBaseline=Ke;const ve=pt(e)?e:[e];if(Ke!=="top"&&ve[0]){const fe=u.measureText(ve[0]);u.textBaseline="top";const Me=u.measureText(ve[0]);p=fe.actualBoundingBoxAscent-Me.actualBoundingBoxAscent}ve?.forEach((fe,Me)=>{const[ge,Qe]=OAe[Te];u.fillText(fe??"",h*ge+c*Qe,Me*(Fe+o.fontGap*i))})}const m=Math.PI/180*Number(n),b=Math.max(s,r),[g,x,S]=vE(b,b,i);g.translate(S/2,S/2),g.rotate(m),h>0&&f>0&&g.drawImage(d,-h/2,-f/2);function _(ne,ce){const ae=ne*Math.cos(m)-ce*Math.sin(m),_e=ne*Math.sin(m)+ce*Math.cos(m);return[ae,_e]}let E=0,T=0,A=0,I=0;const P=h/2,k=f/2;[[0-P,0-k],[0+P,0-k],[0+P,0+k],[0-P,0+k]].forEach(([ne,ce])=>{const[ae,_e]=_(ne,ce);E=Math.min(E,ae),T=Math.max(T,ae),A=Math.min(A,_e),I=Math.max(I,_e)});const R=E+S/2,H=A+S/2,q=T-E,oe=I-A,Z=a*i,V=l*i,D=(q+Z)*2,K=oe+V,[W,Q]=vE(D,K);function ie(ne=0,ce=0){W.drawImage(x,R,H,q,oe,ne,ce+p,q,oe)}return ie(),ie(q+Z,-oe/2-V/2),ie(q+Z,+oe/2+V/2),[Q.toDataURL(),D/i,K/i]}return t}const NAe=Be({name:"ElWatermark",__name:"watermark",props:kAe,setup(t){const e={position:"relative"},n=t,i=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.fontGap)!=null?R:3}),s=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.color)!=null?R:"rgba(0,0,0,.15)"}),r=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.fontSize)!=null?R:16}),o=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.fontWeight)!=null?R:"normal"}),a=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.fontStyle)!=null?R:"normal"}),l=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.fontFamily)!=null?R:"sans-serif"}),c=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.textAlign)!=null?R:"center"}),u=F(()=>{var B,R;return(R=(B=n.font)==null?void 0:B.textBaseline)!=null?R:"hanging"}),d=F(()=>n.gap[0]),h=F(()=>n.gap[1]),f=F(()=>d.value/2),p=F(()=>h.value/2),m=F(()=>{var B,R;return(R=(B=n.offset)==null?void 0:B[0])!=null?R:f.value}),b=F(()=>{var B,R;return(R=(B=n.offset)==null?void 0:B[1])!=null?R:p.value}),g=()=>{const B={zIndex:n.zIndex,position:"absolute",left:0,top:0,width:"100%",height:"100%",pointerEvents:"none",backgroundRepeat:"repeat"};let R=m.value-f.value,H=b.value-p.value;return R>0&&(B.left=`${R}px`,B.width=`calc(100% - ${R}px)`,R=0),H>0&&(B.top=`${H}px`,B.height=`calc(100% - ${H}px)`,H=0),B.backgroundPosition=`${R}px ${H}px`,B},x=wi(null),S=wi(),_=X(!1),E=()=>{S.value&&(S.value.remove(),S.value=void 0)},T=(B,R)=>{var H;x.value&&S.value&&(_.value=!0,S.value.setAttribute("style",LAe({...g(),backgroundImage:`url('${B}')`,backgroundSize:`${Math.floor(R)}px`})),(H=x.value)==null||H.append(S.value),setTimeout(()=>{_.value=!1}))},A=B=>{let R=120,H=64,q=0;const{image:oe,content:Z,width:V,height:D,rotate:K}=n;if(!oe&&B.measureText){B.font=`${Number(r.value)}px ${l.value}`;const W=pt(Z)?Z:[Z];let Q=0,ie=0;W.forEach(ce=>{const{width:ae,fontBoundingBoxAscent:_e,fontBoundingBoxDescent:ke,actualBoundingBoxAscent:Te,actualBoundingBoxDescent:Ke}=B.measureText(ce),Fe=ri(_e)?Te+Ke:_e+ke;ae>Q&&(Q=Math.ceil(ae)),Fe>ie&&(ie=Math.ceil(Fe))}),R=Q,H=ie*W.length+(W.length-1)*i.value;const ne=Math.PI/180*Number(K);q=Math.ceil(Math.abs(Math.sin(ne)*H)/2),R+=q}return[V??R,D??H,q]},I=DAe(),P=()=>{const R=document.createElement("canvas").getContext("2d"),H=n.image,q=n.content,oe=n.rotate;if(R){S.value||(S.value=document.createElement("div"));const Z=IAe(),[V,D,K]=A(R),W=Q=>{const[ie,ne]=I(Q||"",oe,Z,V,D,{color:s.value,fontSize:r.value,fontStyle:a.value,fontWeight:o.value,fontFamily:l.value,fontGap:i.value,textAlign:c.value,textBaseline:u.value},d.value,h.value,K);T(ie,ne)};if(H){const Q=new Image;Q.onload=()=>{W(Q)},Q.onerror=()=>{W(q)},Q.crossOrigin="anonymous",Q.referrerPolicy="no-referrer",Q.src=H}else W(q)}};return mn(()=>{P()}),We(()=>n,()=>{P()},{deep:!0,flush:"post"}),gi(()=>{E()}),Gy(x,B=>{_.value||B.forEach(R=>{RAe(R,S.value)&&(E(),P())})},{attributes:!0,subtree:!0,childList:!0}),(B,R)=>(z(),se("div",{ref_key:"containerRef",ref:x,style:Ht([e])},[Ue(B.$slots,"default")],4))}});var BAe=xt(NAe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/watermark/src/watermark.vue"]]);const FAe=En(BAe),zAe=_t({zIndex:{type:Number,default:1001},visible:Boolean,fill:{type:String,default:"rgba(0,0,0,0.5)"},pos:{type:Re(Object)},targetAreaClickable:{type:Boolean,default:!0}}),yg=Math.min,Ff=Math.max,y2=Math.round,ub=Math.floor,Fc=t=>({x:t,y:t}),UAe={left:"right",right:"left",bottom:"top",top:"bottom"},$Ae={start:"end",end:"start"};function wM(t,e,n){return Ff(t,yg(e,n))}function a1(t,e){return typeof t=="function"?t(e):t}function qf(t){return t.split("-")[0]}function l1(t){return t.split("-")[1]}function D$(t){return t==="x"?"y":"x"}function v4(t){return t==="y"?"height":"width"}const VAe=new Set(["top","bottom"]);function oh(t){return VAe.has(qf(t))?"y":"x"}function y4(t){return D$(oh(t))}function HAe(t,e,n){n===void 0&&(n=!1);const i=l1(t),s=y4(t),r=v4(s);let o=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(o=b2(o)),[o,b2(o)]}function WAe(t){const e=b2(t);return[xM(t),e,xM(e)]}function xM(t){return t.replace(/start|end/g,e=>$Ae[e])}const p5=["left","right"],m5=["right","left"],GAe=["top","bottom"],jAe=["bottom","top"];function KAe(t,e,n){switch(t){case"top":case"bottom":return n?e?m5:p5:e?p5:m5;case"left":case"right":return e?GAe:jAe;default:return[]}}function qAe(t,e,n,i){const s=l1(t);let r=KAe(qf(t),n==="start",i);return s&&(r=r.map(o=>o+"-"+s),e&&(r=r.concat(r.map(xM)))),r}function b2(t){return t.replace(/left|right|bottom|top/g,e=>UAe[e])}function YAe(t){return{top:0,right:0,bottom:0,left:0,...t}}function N$(t){return typeof t!="number"?YAe(t):{top:t,right:t,bottom:t,left:t}}function _2(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function g5(t,e,n){let{reference:i,floating:s}=t;const r=oh(e),o=y4(e),a=v4(o),l=qf(e),c=r==="y",u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,h=i[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:i.y-s.height};break;case"bottom":f={x:u,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:d};break;case"left":f={x:i.x-s.width,y:d};break;default:f={x:i.x,y:i.y}}switch(l1(e)){case"start":f[o]-=h*(n&&c?-1:1);break;case"end":f[o]+=h*(n&&c?-1:1);break}return f}const XAe=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:r=[],platform:o}=n,a=r.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(e));let c=await o.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=g5(c,i,l),h=i,f={},p=0;for(let m=0;m({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:s,rects:r,platform:o,elements:a,middlewareData:l}=e,{element:c,padding:u=0}=a1(t,e)||{};if(c==null)return{};const d=N$(u),h={x:n,y:i},f=y4(s),p=v4(f),m=await o.getDimensions(c),b=f==="y",g=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",_=r.reference[p]+r.reference[f]-h[f]-r.floating[p],E=h[f]-r.reference[f],T=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let A=T?T[S]:0;(!A||!await(o.isElement==null?void 0:o.isElement(T)))&&(A=a.floating[S]||r.floating[p]);const I=_/2-E/2,P=A/2-m[p]/2-1,k=yg(d[g],P),B=yg(d[x],P),R=k,H=A-m[p]-B,q=A/2-m[p]/2+I,oe=wM(R,q,H),Z=!l.arrow&&l1(s)!=null&&q!==oe&&r.reference[p]/2-(qq<=0)){var B,R;const q=(((B=r.flip)==null?void 0:B.index)||0)+1,oe=A[q];if(oe&&(!(d==="alignment"?x!==oh(oe):!1)||k.every(D=>oh(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:q,overflows:k},reset:{placement:oe}};let Z=(R=k.filter(V=>V.overflows[0]<=0).sort((V,D)=>V.overflows[1]-D.overflows[1])[0])==null?void 0:R.placement;if(!Z)switch(f){case"bestFit":{var H;const V=(H=k.filter(D=>{if(T){const K=oh(D.placement);return K===x||K==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(K=>K>0).reduce((K,W)=>K+W,0)]).sort((D,K)=>D[1]-K[1])[0])==null?void 0:H[0];V&&(Z=V);break}case"initialPlacement":Z=a;break}if(s!==Z)return{reset:{placement:Z}}}return{}}}},QAe=new Set(["left","top"]);async function eke(t,e){const{placement:n,platform:i,elements:s}=t,r=await(i.isRTL==null?void 0:i.isRTL(s.floating)),o=qf(n),a=l1(n),l=oh(n)==="y",c=QAe.has(o)?-1:1,u=r&&l?-1:1,d=a1(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const tke=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:r,placement:o,middlewareData:a}=e,l=await eke(e,t);return o===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:r+l.y,data:{...l,placement:o}}}}},nke=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:s}=e,{mainAxis:r=!0,crossAxis:o=!1,limiter:a={fn:b=>{let{x:g,y:x}=b;return{x:g,y:x}}},...l}=a1(t,e),c={x:n,y:i},u=await b4(e,l),d=oh(qf(s)),h=D$(d);let f=c[h],p=c[d];if(r){const b=h==="y"?"top":"left",g=h==="y"?"bottom":"right",x=f+u[b],S=f-u[g];f=wM(x,f,S)}if(o){const b=d==="y"?"top":"left",g=d==="y"?"bottom":"right",x=p+u[b],S=p-u[g];p=wM(x,p,S)}const m=a.fn({...e,[h]:f,[d]:p});return{...m,data:{x:m.x-n,y:m.y-i,enabled:{[h]:r,[d]:o}}}}}};function Hx(){return typeof window<"u"}function Kg(t){return B$(t)?(t.nodeName||"").toLowerCase():"#document"}function Na(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function tu(t){var e;return(e=(B$(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function B$(t){return Hx()?t instanceof Node||t instanceof Na(t).Node:!1}function Kl(t){return Hx()?t instanceof Element||t instanceof Na(t).Element:!1}function Yc(t){return Hx()?t instanceof HTMLElement||t instanceof Na(t).HTMLElement:!1}function v5(t){return!Hx()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Na(t).ShadowRoot}const ike=new Set(["inline","contents"]);function c1(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=ql(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!ike.has(s)}const ske=new Set(["table","td","th"]);function rke(t){return ske.has(Kg(t))}const oke=[":popover-open",":modal"];function Wx(t){return oke.some(e=>{try{return t.matches(e)}catch{return!1}})}const ake=["transform","translate","scale","rotate","perspective"],lke=["transform","translate","scale","rotate","perspective","filter"],cke=["paint","layout","strict","content"];function _4(t){const e=w4(),n=Kl(t)?ql(t):t;return ake.some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||lke.some(i=>(n.willChange||"").includes(i))||cke.some(i=>(n.contain||"").includes(i))}function uke(t){let e=Th(t);for(;Yc(e)&&!bg(e);){if(_4(e))return e;if(Wx(e))return null;e=Th(e)}return null}function w4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dke=new Set(["html","body","#document"]);function bg(t){return dke.has(Kg(t))}function ql(t){return Na(t).getComputedStyle(t)}function Gx(t){return Kl(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Th(t){if(Kg(t)==="html")return t;const e=t.assignedSlot||t.parentNode||v5(t)&&t.host||tu(t);return v5(e)?e.host:e}function F$(t){const e=Th(t);return bg(e)?t.ownerDocument?t.ownerDocument.body:t.body:Yc(e)&&c1(e)?e:F$(e)}function sy(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=F$(t),r=s===((i=t.ownerDocument)==null?void 0:i.body),o=Na(s);if(r){const a=SM(o);return e.concat(o,o.visualViewport||[],c1(s)?s:[],a&&n?sy(a):[])}return e.concat(s,sy(s,[],n))}function SM(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function z$(t){const e=ql(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Yc(t),r=s?t.offsetWidth:n,o=s?t.offsetHeight:i,a=y2(n)!==r||y2(i)!==o;return a&&(n=r,i=o),{width:n,height:i,$:a}}function x4(t){return Kl(t)?t:t.contextElement}function Gm(t){const e=x4(t);if(!Yc(e))return Fc(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:r}=z$(e);let o=(r?y2(n.width):n.width)/i,a=(r?y2(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const hke=Fc(0);function U$(t){const e=Na(t);return!w4()||!e.visualViewport?hke:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function fke(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Na(t)?!1:e}function Yf(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),r=x4(t);let o=Fc(1);e&&(i?Kl(i)&&(o=Gm(i)):o=Gm(t));const a=fke(r,n,i)?U$(r):Fc(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,u=s.width/o.x,d=s.height/o.y;if(r){const h=Na(r),f=i&&Kl(i)?Na(i):i;let p=h,m=SM(p);for(;m&&i&&f!==p;){const b=Gm(m),g=m.getBoundingClientRect(),x=ql(m),S=g.left+(m.clientLeft+parseFloat(x.paddingLeft))*b.x,_=g.top+(m.clientTop+parseFloat(x.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=S,c+=_,p=Na(m),m=SM(p)}}return _2({width:u,height:d,x:l,y:c})}function jx(t,e){const n=Gx(t).scrollLeft;return e?e.left+n:Yf(tu(t)).left+n}function $$(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-jx(t,n),s=n.top+e.scrollTop;return{x:i,y:s}}function pke(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const r=s==="fixed",o=tu(i),a=e?Wx(e.floating):!1;if(i===o||a&&r)return n;let l={scrollLeft:0,scrollTop:0},c=Fc(1);const u=Fc(0),d=Yc(i);if((d||!d&&!r)&&((Kg(i)!=="body"||c1(o))&&(l=Gx(i)),Yc(i))){const f=Yf(i);c=Gm(i),u.x=f.x+i.clientLeft,u.y=f.y+i.clientTop}const h=o&&!d&&!r?$$(o,l):Fc(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function mke(t){return Array.from(t.getClientRects())}function gke(t){const e=tu(t),n=Gx(t),i=t.ownerDocument.body,s=Ff(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=Ff(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let o=-n.scrollLeft+jx(t);const a=-n.scrollTop;return ql(i).direction==="rtl"&&(o+=Ff(e.clientWidth,i.clientWidth)-s),{width:s,height:r,x:o,y:a}}const y5=25;function vke(t,e){const n=Na(t),i=tu(t),s=n.visualViewport;let r=i.clientWidth,o=i.clientHeight,a=0,l=0;if(s){r=s.width,o=s.height;const u=w4();(!u||u&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}const c=jx(i);if(c<=0){const u=i.ownerDocument,d=u.body,h=getComputedStyle(d),f=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,p=Math.abs(i.clientWidth-d.clientWidth-f);p<=y5&&(r-=p)}else c<=y5&&(r+=c);return{width:r,height:o,x:a,y:l}}const yke=new Set(["absolute","fixed"]);function bke(t,e){const n=Yf(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,r=Yc(t)?Gm(t):Fc(1),o=t.clientWidth*r.x,a=t.clientHeight*r.y,l=s*r.x,c=i*r.y;return{width:o,height:a,x:l,y:c}}function b5(t,e,n){let i;if(e==="viewport")i=vke(t,n);else if(e==="document")i=gke(tu(t));else if(Kl(e))i=bke(e,n);else{const s=U$(t);i={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return _2(i)}function V$(t,e){const n=Th(t);return n===e||!Kl(n)||bg(n)?!1:ql(n).position==="fixed"||V$(n,e)}function _ke(t,e){const n=e.get(t);if(n)return n;let i=sy(t,[],!1).filter(a=>Kl(a)&&Kg(a)!=="body"),s=null;const r=ql(t).position==="fixed";let o=r?Th(t):t;for(;Kl(o)&&!bg(o);){const a=ql(o),l=_4(o);!l&&a.position==="fixed"&&(s=null),(r?!l&&!s:!l&&a.position==="static"&&!!s&&yke.has(s.position)||c1(o)&&!l&&V$(t,o))?i=i.filter(u=>u!==o):s=a,o=Th(o)}return e.set(t,i),i}function wke(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const o=[...n==="clippingAncestors"?Wx(e)?[]:_ke(e,this._c):[].concat(n),i],a=o[0],l=o.reduce((c,u)=>{const d=b5(e,u,s);return c.top=Ff(d.top,c.top),c.right=yg(d.right,c.right),c.bottom=yg(d.bottom,c.bottom),c.left=Ff(d.left,c.left),c},b5(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xke(t){const{width:e,height:n}=z$(t);return{width:e,height:n}}function Ske(t,e,n){const i=Yc(e),s=tu(e),r=n==="fixed",o=Yf(t,!0,r,e);let a={scrollLeft:0,scrollTop:0};const l=Fc(0);function c(){l.x=jx(s)}if(i||!i&&!r)if((Kg(e)!=="body"||c1(s))&&(a=Gx(e)),i){const f=Yf(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else s&&c();r&&!i&&s&&c();const u=s&&!i&&!r?$$(s,a):Fc(0),d=o.left+a.scrollLeft-l.x-u.x,h=o.top+a.scrollTop-l.y-u.y;return{x:d,y:h,width:o.width,height:o.height}}function yE(t){return ql(t).position==="static"}function _5(t,e){if(!Yc(t)||ql(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return tu(t)===n&&(n=n.ownerDocument.body),n}function H$(t,e){const n=Na(t);if(Wx(t))return n;if(!Yc(t)){let s=Th(t);for(;s&&!bg(s);){if(Kl(s)&&!yE(s))return s;s=Th(s)}return n}let i=_5(t,e);for(;i&&rke(i)&&yE(i);)i=_5(i,e);return i&&bg(i)&&yE(i)&&!_4(i)?n:i||uke(t)||n}const Eke=async function(t){const e=this.getOffsetParent||H$,n=this.getDimensions,i=await n(t.floating);return{reference:Ske(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Cke(t){return ql(t).direction==="rtl"}const Tke={convertOffsetParentRelativeRectToViewportRelativeRect:pke,getDocumentElement:tu,getClippingRect:wke,getOffsetParent:H$,getElementRects:Eke,getClientRects:mke,getDimensions:xke,getScale:Gm,isElement:Kl,isRTL:Cke};function W$(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Mke(t,e){let n=null,i;const s=tu(t);function r(){var a;clearTimeout(i),(a=n)==null||a.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),r();const c=t.getBoundingClientRect(),{left:u,top:d,width:h,height:f}=c;if(a||e(),!h||!f)return;const p=ub(d),m=ub(s.clientWidth-(u+h)),b=ub(s.clientHeight-(d+f)),g=ub(u),S={rootMargin:-p+"px "+-m+"px "+-b+"px "+-g+"px",threshold:Ff(0,yg(1,l))||1};let _=!0;function E(T){const A=T[0].intersectionRatio;if(A!==l){if(!_)return o();A?o(!1,A):i=setTimeout(()=>{o(!1,1e-7)},1e3)}A===1&&!W$(c,t.getBoundingClientRect())&&o(),_=!1}try{n=new IntersectionObserver(E,{...S,root:s.ownerDocument})}catch{n=new IntersectionObserver(E,S)}n.observe(t)}return o(!0),r}function Ake(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:r=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,c=x4(t),u=s||r?[...c?sy(c):[],...sy(e)]:[];u.forEach(g=>{s&&g.addEventListener("scroll",n,{passive:!0}),r&&g.addEventListener("resize",n)});const d=c&&a?Mke(c,n):null;let h=-1,f=null;o&&(f=new ResizeObserver(g=>{let[x]=g;x&&x.target===c&&f&&(f.unobserve(e),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=f)==null||S.observe(e)})),n()}),c&&!l&&f.observe(c),f.observe(e));let p,m=l?Yf(t):null;l&&b();function b(){const g=Yf(t);m&&!W$(m,g)&&n(),m=g,p=requestAnimationFrame(b)}return n(),()=>{var g;u.forEach(x=>{s&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),d?.(),(g=f)==null||g.disconnect(),f=null,l&&cancelAnimationFrame(p)}}const kke=b4,Pke=tke,Lke=nke,Ike=JAe,Rke=ZAe,Oke=(t,e,n)=>{const i=new Map,s={platform:Tke,...n},r={...s.platform,_c:i};return XAe(t,e,{...s,platform:r})},Dke=(t,e,n,i,s)=>{const r=X(null),o=()=>{let d;return Gt(t.value)?d=document.querySelector(t.value):Kt(t.value)?d=t.value():d=t.value,d},a=()=>{const d=o();if(!d||!e.value){r.value=null;return}Nke(d)||d.scrollIntoView(s.value);const{left:h,top:f,width:p,height:m}=d.getBoundingClientRect();r.value={left:h,top:f,width:p,height:m,radius:0}};mn(()=>{We([e,t],()=>{a()},{immediate:!0}),window.addEventListener("resize",a)}),gi(()=>{window.removeEventListener("resize",a)});const l=d=>{var h;return(h=pt(n.value.offset)?n.value.offset[d]:n.value.offset)!=null?h:6},c=F(()=>{var d;if(!r.value)return r.value;const h=l(0),f=l(1),p=((d=n.value)==null?void 0:d.radius)||2;return{left:r.value.left-h,top:r.value.top-f,width:r.value.width+h*2,height:r.value.height+f*2,radius:p}}),u=F(()=>{const d=o();return!i.value||!d||!window.DOMRect?d||void 0:{getBoundingClientRect(){var h,f,p,m;return window.DOMRect.fromRect({width:((h=c.value)==null?void 0:h.width)||0,height:((f=c.value)==null?void 0:f.height)||0,x:((p=c.value)==null?void 0:p.left)||0,y:((m=c.value)==null?void 0:m.top)||0})}}});return{mergedPosInfo:c,triggerTarget:u}},Kx=Symbol("ElTour");function Nke(t){const e=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,{top:i,right:s,bottom:r,left:o}=t.getBoundingClientRect();return i>=0&&o>=0&&s<=e&&r<=n}const Bke=(t,e,n,i,s,r,o,a)=>{const l=X(),c=X(),u=X({}),d={x:l,y:c,placement:i,strategy:s,middlewareData:u},h=F(()=>{const g=[Pke(v(r)),Ike(),Lke(),Fke()];return v(a)&&v(n)&&g.push(Rke({element:v(n)})),g}),f=async()=>{if(!pi)return;const g=v(t),x=v(e);if(!g||!x)return;const S=await Oke(g,x,{placement:v(i),strategy:v(s),middleware:v(h)});V0(d).forEach(_=>{d[_].value=S[_]})},p=F(()=>{if(!v(t))return{position:"fixed",top:"50%",left:"50%",transform:"translate3d(-50%, -50%, 0)",maxWidth:"100vw",zIndex:v(o)};const{overflow:g}=v(u);return{position:v(s),zIndex:v(o),top:v(c)!=null?`${v(c)}px`:"",left:v(l)!=null?`${v(l)}px`:"",maxWidth:g?.maxWidth?`${g?.maxWidth}px`:""}}),m=F(()=>{if(!v(a))return{};const{arrow:g}=v(u);return{left:g?.x!=null?`${g?.x}px`:"",top:g?.y!=null?`${g?.y}px`:""}});let b;return mn(()=>{const g=v(t),x=v(e);g&&x&&(b=Ake(g,x,f)),jo(()=>{f()})}),gi(()=>{b&&b()}),{update:f,contentStyle:p,arrowStyle:m}},Fke=()=>({name:"overflow",async fn(t){const e=await kke(t);let n=0;return e.left>0&&(n=e.left),e.right>0&&(n=e.right),{data:{maxWidth:t.rects.floating.width-n}}}}),zke={style:{width:"100%",height:"100%"}},Uke=["d"],$ke=Be({name:"ElTourMask",inheritAttrs:!1,__name:"mask",props:zAe,setup(t){const e=t,{ns:n}=zt(Kx),i=F(()=>{var u,d;return(d=(u=e.pos)==null?void 0:u.radius)!=null?d:2}),s=F(()=>{const u=i.value,d=`a${u},${u} 0 0 1`;return{topRight:`${d} ${u},${u}`,bottomRight:`${d} ${-u},${u}`,bottomLeft:`${d} ${-u},${-u}`,topLeft:`${d} ${u},${-u}`}}),{width:r,height:o}=ek(),a=F(()=>{const u=r.value,d=o.value,h=s.value,f=`M${u},0 L0,0 L0,${d} L${u},${d} L${u},0 Z`,p=i.value;return e.pos?`${f} M${e.pos.left+p},${e.pos.top} h${e.pos.width-p*2} ${h.topRight} v${e.pos.height-p*2} ${h.bottomRight} h${-e.pos.width+p*2} ${h.bottomLeft} v${-e.pos.height+p*2} ${h.topLeft} z`:f}),l=F(()=>({position:"fixed",left:0,right:0,top:0,bottom:0,zIndex:e.zIndex,pointerEvents:e.pos&&e.targetAreaClickable?"none":"auto"})),c=F(()=>({fill:e.fill,pointerEvents:"auto",cursor:"auto"}));return Fx(Ei(e,"visible"),{ns:n}),(u,d)=>u.visible?(z(),se("div",Dn({key:0,class:v(n).e("mask"),style:l.value},u.$attrs),[(z(),se("svg",zke,[U("path",{class:J(v(n).e("hollow")),style:Ht(c.value),d:a.value},null,14,Uke)]))],16)):Le("v-if",!0)}});var Vke=xt($ke,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tour/src/mask.vue"]]);const Hke=["absolute","fixed"],Wke=["top-start","top-end","top","bottom-start","bottom-end","bottom","left-start","left-end","left","right-start","right-end","right"],S4=_t({placement:{type:Re(String),values:Wke,default:"bottom"},reference:{type:Re(Object),default:null},strategy:{type:Re(String),values:Hke,default:"absolute"},offset:{type:Number,default:10},showArrow:Boolean,zIndex:{type:Number,default:2001}}),Gke={close:()=>!0},jke=["data-side"],Kke=Be({name:"ElTourContent",__name:"content",props:S4,emits:Gke,setup(t,{emit:e}){const n=t,i=e,s=X(n.placement),r=X(n.strategy),o=X(null),a=X(null);We(()=>n.placement,()=>{s.value=n.placement});const{contentStyle:l,arrowStyle:c}=Bke(Ei(n,"reference"),o,a,s,r,Ei(n,"offset"),Ei(n,"zIndex"),Ei(n,"showArrow")),u=F(()=>s.value.split("-")[0]),{ns:d}=zt(Kx),h=()=>{i("close")},f=p=>{p.detail.focusReason==="pointer"&&p.preventDefault()};return(p,m)=>(z(),se("div",{ref_key:"contentRef",ref:o,style:Ht(v(l)),class:J(v(d).e("content")),"data-side":u.value,tabindex:"-1"},[de(v(Gg),{loop:"",trapped:"","focus-start-el":"container","focus-trap-el":o.value||void 0,onReleaseRequested:h,onFocusoutPrevented:f},{default:xe(()=>[Ue(p.$slots,"default")]),_:3},8,["focus-trap-el"]),p.showArrow?(z(),se("span",{key:0,ref_key:"arrowRef",ref:a,style:Ht(v(c)),class:J(v(d).e("arrow"))},null,6)):Le("v-if",!0)],14,jke))}});var qke=xt(Kke,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tour/src/content.vue"]]),Yke=Be({name:"ElTourSteps",props:{current:{type:Number,default:0}},emits:["update-total"],setup(t,{slots:e,emit:n}){let i=0;return()=>{var s,r;const o=(s=e.default)==null?void 0:s.call(e),a=[];let l=0;function c(u){pt(u)&&u.forEach(d=>{var h;((h=d?.type||{})==null?void 0:h.name)==="ElTourStep"&&(a.push(d),l+=1)})}return o.length&&c(Il((r=o[0])==null?void 0:r.children)),i!==l&&(i=l,n("update-total",l)),a.length?a[t.current]:null}}});const Xke=_t({modelValue:Boolean,current:{type:Number,default:0},showArrow:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeIcon:{type:Ai},placement:S4.placement,contentStyle:{type:Re([Object])},mask:{type:Re([Boolean,Object]),default:!0},gap:{type:Re(Object),default:()=>({offset:6,radius:2})},zIndex:{type:Number},scrollIntoViewOptions:{type:Re([Boolean,Object]),default:()=>({block:"center"})},type:{type:Re(String)},appendTo:{type:qy.to.type,default:"body"},closeOnPressEscape:{type:Boolean,default:!0},targetAreaClickable:{type:Boolean,default:!0}}),Zke={[wn]:t=>Mi(t),"update:current":t=>Xt(t),close:t=>Xt(t),finish:()=>!0,change:t=>Xt(t)},Jke=Be({name:"ElTour",__name:"tour",props:Xke,emits:Zke,setup(t,{emit:e}){const n=t,i=e,s=ht("tour"),r=X(0),o=X(),a=F9(n,"current",i,{passive:!0}),l=F(()=>{var k;return(k=o.value)==null?void 0:k.target}),c=F(()=>[s.b(),g.value==="primary"?s.m("primary"):""]),u=F(()=>{var k;return((k=o.value)==null?void 0:k.placement)||n.placement}),d=F(()=>{var k,B;return(B=(k=o.value)==null?void 0:k.contentStyle)!=null?B:n.contentStyle}),h=F(()=>{var k,B;return(B=(k=o.value)==null?void 0:k.mask)!=null?B:n.mask}),f=F(()=>!!h.value&&n.modelValue),p=F(()=>Mi(h.value)?void 0:h.value),m=F(()=>{var k,B;return!!l.value&&((B=(k=o.value)==null?void 0:k.showArrow)!=null?B:n.showArrow)}),b=F(()=>{var k,B;return(B=(k=o.value)==null?void 0:k.scrollIntoViewOptions)!=null?B:n.scrollIntoViewOptions}),g=F(()=>{var k,B;return(B=(k=o.value)==null?void 0:k.type)!=null?B:n.type}),{nextZIndex:x}=jy(),S=x(),_=F(()=>{var k;return(k=n.zIndex)!=null?k:S}),{mergedPosInfo:E,triggerTarget:T}=Dke(l,Ei(n,"modelValue"),Ei(n,"gap"),h,b);We(()=>n.modelValue,k=>{k||(a.value=0)});const A=()=>{n.closeOnPressEscape&&(i(wn,!1),i("close",a.value))},I=k=>{r.value=k},P=tr();return Xn(Kx,{currentStep:o,current:a,total:r,showClose:Ei(n,"showClose"),closeIcon:Ei(n,"closeIcon"),mergedType:g,ns:s,slots:P,updateModelValue(k){i(wn,k)},onClose(){i("close",a.value)},onFinish(){i("finish")},onChange(){i(Wn,a.value)}}),(k,B)=>(z(),se(At,null,[de(v(Wg),{to:k.appendTo},{default:xe(()=>{var R,H;return[U("div",Dn({class:c.value},k.$attrs),[de(Vke,{visible:f.value,fill:(R=p.value)==null?void 0:R.color,style:Ht((H=p.value)==null?void 0:H.style),pos:v(E),"z-index":_.value,"target-area-clickable":k.targetAreaClickable},null,8,["visible","fill","style","pos","z-index","target-area-clickable"]),k.modelValue?(z(),De(qke,{key:v(a),reference:v(T),placement:u.value,"show-arrow":m.value,"z-index":_.value,style:Ht(d.value),onClose:A},{default:xe(()=>[de(v(Yke),{current:v(a),onUpdateTotal:I},{default:xe(()=>[Ue(k.$slots,"default")]),_:3},8,["current"])]),_:3},8,["reference","placement","show-arrow","z-index","style"])):Le("v-if",!0)],16)]}),_:3},8,["to"]),Le(" just for IDE "),Le("v-if",!0)],64))}});var Qke=xt(Jke,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tour/src/tour.vue"]]);const e4e=_t({target:{type:Re([String,Object,Function])},title:String,description:String,showClose:{type:Boolean,default:void 0},closeIcon:{type:Ai},showArrow:{type:Boolean,default:void 0},placement:S4.placement,mask:{type:Re([Boolean,Object]),default:void 0},contentStyle:{type:Re([Object])},prevButtonProps:{type:Re(Object)},nextButtonProps:{type:Re(Object)},scrollIntoViewOptions:{type:Re([Boolean,Object]),default:void 0},type:{type:Re(String)}}),t4e={close:()=>!0},n4e=["aria-label"],i4e=Be({name:"ElTourStep",__name:"step",props:e4e,emits:t4e,setup(t,{emit:e}){const n=t,i=e,{Close:s}=i7,{t:r}=Jn(),{currentStep:o,current:a,total:l,showClose:c,closeIcon:u,mergedType:d,ns:h,slots:f,updateModelValue:p,onClose:m,onFinish:b,onChange:g}=zt(Kx);We(n,k=>{o.value=k},{immediate:!0});const x=F(()=>{var k;return(k=n.showClose)!=null?k:c.value}),S=F(()=>{var k,B;return(B=(k=n.closeIcon)!=null?k:u.value)!=null?B:s}),_=k=>{if(k)return Vy(k,["children","onClick"])},E=()=>{var k,B;a.value-=1,(k=n.prevButtonProps)!=null&&k.onClick&&((B=n.prevButtonProps)==null||B.onClick()),g()},T=()=>{var k;a.value>=l.value-1?A():a.value+=1,(k=n.nextButtonProps)!=null&&k.onClick&&n.nextButtonProps.onClick(),g()},A=()=>{I(),b()},I=()=>{p(!1),m(),i("close")},P=k=>{const B=k.target;if(B?.isContentEditable)return;switch(Oi(k)){case gt.left:k.preventDefault(),a.value>0&&E();break;case gt.right:k.preventDefault(),T();break}};return mn(()=>{window.addEventListener("keydown",P)}),gi(()=>{window.removeEventListener("keydown",P)}),(k,B)=>(z(),se(At,null,[x.value?(z(),se("button",{key:0,"aria-label":v(r)("el.tour.close"),class:J(v(h).e("closebtn")),type:"button",onClick:I},[de(v(Ut),{class:J(v(h).e("close"))},{default:xe(()=>[(z(),De(Sn(S.value)))]),_:1},8,["class"])],10,n4e)):Le("v-if",!0),U("header",{class:J([v(h).e("header"),{"show-close":v(c)}])},[Ue(k.$slots,"header",{},()=>[U("span",{role:"heading",class:J(v(h).e("title"))},Xe(k.title),3)])],2),U("div",{class:J(v(h).e("body"))},[Ue(k.$slots,"default",{},()=>[U("span",null,Xe(k.description),1)])],2),U("footer",{class:J(v(h).e("footer"))},[U("div",{class:J(v(h).b("indicators"))},[v(f).indicators?(z(),De(Sn(v(f).indicators),{key:0,current:v(a),total:v(l)},null,8,["current","total"])):(z(!0),se(At,{key:1},yn(v(l),(R,H)=>(z(),se("span",{key:R,class:J([v(h).b("indicator"),v(h).is("active",H===v(a))])},null,2))),128))],2),U("div",{class:J(v(h).b("buttons"))},[v(a)>0?(z(),De(v(Sr),Dn({key:0,size:"small",type:v(d)},_(k.prevButtonProps),{onClick:E}),{default:xe(()=>{var R,H;return[cn(Xe((H=(R=k.prevButtonProps)==null?void 0:R.children)!=null?H:v(r)("el.tour.previous")),1)]}),_:1},16,["type"])):Le("v-if",!0),v(a)<=v(l)-1?(z(),De(v(Sr),Dn({key:1,size:"small",type:v(d)==="primary"?"default":"primary"},_(k.nextButtonProps),{onClick:T}),{default:xe(()=>{var R,H;return[cn(Xe((H=(R=k.nextButtonProps)==null?void 0:R.children)!=null?H:v(a)===v(l)-1?v(r)("el.tour.finish"):v(r)("el.tour.next")),1)]}),_:1},16,["type"])):Le("v-if",!0)],2)],2)],64))}});var G$=xt(i4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/tour/src/step.vue"]]);const s4e=En(Qke,{TourStep:G$}),r4e=Ss(G$),o4e=_t({container:{type:Re([String,Object])},offset:{type:Number,default:0},bound:{type:Number,default:15},duration:{type:Number,default:300},marker:{type:Boolean,default:!0},type:{type:Re(String),default:"default"},direction:{type:Re(String),default:"vertical"},selectScrollTop:Boolean}),a4e={change:t=>Gt(t),click:(t,e)=>t instanceof MouseEvent&&(Gt(e)||ri(e))},j$=Symbol("anchor"),db=t=>{if(!pi||t==="")return null;if(Gt(t))try{return document.querySelector(t)}catch{return null}return t};function l4e(t){let e=0;const n=(...i)=>{e&&nd(e),e=Gc(()=>{t(...i),e=0})};return n.cancel=()=>{nd(e),e=0},n}const c4e=Be({name:"ElAnchor",__name:"anchor",props:o4e,emits:a4e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=tr(),o=X(""),a=X({}),l=X(null),c=X(null),u=X(),d={};let h=!1,f=0;const p=ht("anchor"),m=F(()=>[p.b(),i.type==="underline"?p.m("underline"):"",p.m(i.direction)]),b=R=>{d[R.href]=R.el},g=R=>{delete d[R]},x=R=>{o.value!==R&&(o.value=R,s(Wn,R))};let S=null,_="";const E=R=>{if(!u.value)return;const H=db(R);if(!H)return;if(S){if(_===R)return;S()}_=R,h=!0;const q=l8(H,u.value),oe=zT(H,q),Z=q.scrollHeight-q.clientHeight,V=Math.min(oe-i.offset,Z);S=yue(u.value,f,V,i.duration,()=>{setTimeout(()=>{h=!1,_=""},20)})},T=R=>{R&&(x(R),E(R))},A=(R,H)=>{s("click",R,H),T(H)},I=l4e(()=>{u.value&&(f=c8(u.value));const R=P();h||ri(R)||x(R)}),P=()=>{if(!u.value)return;const R=c8(u.value),H=[];for(const q of Object.keys(d)){const oe=db(q);if(!oe)continue;const Z=l8(oe,u.value),V=zT(oe,Z);H.push({top:V-i.offset-i.bound,href:q})}H.sort((q,oe)=>q.top-oe.top);for(let q=0;qR))return oe.href}},k=()=>{const R=db(i.container);!R||Hy(R)?u.value=window:u.value=R};xi(u,"scroll",I);const B=()=>{Nt(()=>{if(!l.value||!c.value||!o.value){a.value={};return}const R=d[o.value];if(!R){a.value={};return}const H=l.value.getBoundingClientRect(),q=c.value.getBoundingClientRect(),oe=R.getBoundingClientRect();if(i.direction==="horizontal"){const Z=oe.left-H.left;a.value={left:`${Z}px`,width:`${oe.width}px`,opacity:1}}else{const Z=oe.top-H.top+(oe.height-q.height)/2;a.value={top:`${Z}px`,opacity:1}}})};return We(o,B),We(()=>{var R;return(R=r.default)==null?void 0:R.call(r)},B),mn(()=>{k();const R=decodeURIComponent(window.location.hash);db(R)?T(R):I()}),We(()=>i.container,()=>{k()}),Xn(j$,{ns:p,direction:i.direction,currentAnchor:o,addLink:b,removeLink:g,handleClick:A}),e({scrollTo:T}),(R,H)=>(z(),se("div",{ref_key:"anchorRef",ref:l,class:J(m.value)},[R.marker?(z(),se("div",{key:0,ref_key:"markerRef",ref:c,class:J(v(p).e("marker")),style:Ht(a.value)},null,6)):Le("v-if",!0),U("div",{class:J(v(p).e("list"))},[Ue(R.$slots,"default")],2)],2))}});var u4e=xt(c4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/anchor/src/anchor.vue"]]);const d4e=_t({title:String,href:String}),h4e=["href"],f4e=Be({name:"ElAnchorLink",__name:"anchor-link",props:d4e,setup(t){const e=t,n=X(null),{ns:i,direction:s,currentAnchor:r,addLink:o,removeLink:a,handleClick:l}=zt(j$),c=F(()=>[i.e("link"),i.is("active",r.value===e.href)]),u=d=>{l(d,e.href)};return We(()=>e.href,(d,h)=>{Nt(()=>{h&&a(h),d&&o({href:d,el:n.value})})}),mn(()=>{const{href:d}=e;d&&o({href:d,el:n.value})}),gi(()=>{const{href:d}=e;d&&a(d)}),(d,h)=>(z(),se("div",{class:J(v(i).e("item"))},[U("a",{ref_key:"linkRef",ref:n,class:J(c.value),href:d.href,onClick:u},[Ue(d.$slots,"default",{},()=>[cn(Xe(d.title),1)])],10,h4e),d.$slots["sub-link"]&&v(s)==="vertical"?(z(),se("div",{key:0,class:J(v(i).e("list"))},[Ue(d.$slots,"sub-link")],2)):Le("v-if",!0)],2))}});var K$=xt(f4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/anchor/src/anchor-link.vue"]]);const p4e=En(u4e,{AnchorLink:K$}),m4e=Ss(K$),q$={label:"label",value:"value",disabled:"disabled"},g4e=_t({direction:{type:Re(String),default:"horizontal"},options:{type:Re(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:Re(Object),default:()=>q$},block:Boolean,size:or,disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},id:String,name:String,...To(["ariaLabel"])}),v4e={[wn]:t=>Gt(t)||Xt(t)||Mi(t),[Wn]:t=>Gt(t)||Xt(t)||Mi(t)},y4e=["id","aria-label","aria-labelledby"],b4e=["name","disabled","checked","onChange"],_4e=Be({name:"ElSegmented",__name:"segmented",props:g4e,emits:v4e,setup(t,{emit:e}){const n=t,i=e,s=ht("segmented"),r=jr(),o=er(),a=Es(),{formItem:l}=zr(),{inputId:c,isLabeledByFormItem:u}=Ba(n,{formItemContext:l}),d=X(null),h=Yce(),f=ni({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),p=(R,H)=>{const q=g(H);i(wn,q),i(Wn,q),R.target.checked=q===n.modelValue},m=F(()=>({...q$,...n.props})),b=R=>R,g=R=>Mn(R)?R[m.value.value]:R,x=R=>Mn(R)?R[m.value.label]:R,S=R=>!!(a.value||Mn(R)&&R[m.value.disabled]),_=R=>n.modelValue===g(R),E=R=>n.options.find(H=>g(H)===R),T=R=>[s.e("item"),s.is("selected",_(R)),s.is("disabled",S(R))],A=()=>{if(!d.value)return;const R=d.value.querySelector(".is-selected"),H=d.value.querySelector(".is-selected input");if(!R||!H){f.width=0,f.height=0,f.translateX=0,f.translateY=0,f.focusVisible=!1;return}f.isInit=!0,n.direction==="vertical"?(f.height=R.offsetHeight,f.translateY=R.offsetTop):(f.width=R.offsetWidth,f.translateX=R.offsetLeft);try{f.focusVisible=H.matches(":focus-visible")}catch{}},I=F(()=>[s.b(),s.m(o.value),s.is("block",n.block)]),P=F(()=>({width:n.direction==="vertical"?"100%":`${f.width}px`,height:n.direction==="vertical"?`${f.height}px`:"100%",transform:n.direction==="vertical"?`translateY(${f.translateY}px)`:`translateX(${f.translateX}px)`,display:f.isInit?"block":"none"})),k=F(()=>[s.e("item-selected"),s.is("disabled",S(E(n.modelValue))),s.is("focus-visible",f.focusVisible)]),B=F(()=>n.name||r.value);return as(d,A),We(h,A),We(()=>n.modelValue,()=>{var R;A(),n.validateEvent&&((R=l?.validate)==null||R.call(l,"change").catch(H=>void 0))},{flush:"post"}),(R,H)=>R.options.length?(z(),se("div",{key:0,id:v(c),ref_key:"segmentedRef",ref:d,class:J(I.value),role:"radiogroup","aria-label":v(u)?void 0:R.ariaLabel||"segmented","aria-labelledby":v(u)?v(l).labelId:void 0},[U("div",{class:J([v(s).e("group"),v(s).m(R.direction)])},[U("div",{style:Ht(P.value),class:J(k.value)},null,6),(z(!0),se(At,null,yn(R.options,(q,oe)=>(z(),se("label",{key:oe,class:J(T(q))},[U("input",{class:J(v(s).e("item-input")),type:"radio",name:B.value,disabled:S(q),checked:_(q),onChange:Z=>p(Z,q)},null,42,b4e),U("div",{class:J(v(s).e("item-label"))},[Ue(R.$slots,"default",{item:b(q)},()=>[cn(Xe(x(q)),1)])],2)],2))),128))],2)],10,y4e)):Le("v-if",!0)}});var w4e=xt(_4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/segmented/src/segmented.vue"]]);const x4e=En(w4e),S4e=(t,e)=>{const n=t.toLowerCase();return(e.label||e.value||"").toLowerCase().includes(n)},E4e=(t,e,n)=>{const{selectionEnd:i}=t;if(i===null)return;const s=t.value,r=Pr(e);let o=-1,a;for(let l=i-1;l>=0;--l){const c=s[l];if(c===n||c===` `||c==="\r"){o=l;continue}if(r.includes(c)){const u=o===-1?i:o;a={pattern:s.slice(l+1,u),start:l+1,end:u,prefix:c,prefixIndex:l,splitIndex:o,selectionEnd:i};break}}return a},C4e=(t,e={debug:!1,useSelectionEnd:!1})=>{const n=t.selectionStart!==null?t.selectionStart:0,i=t.selectionEnd!==null?t.selectionEnd:0,s=e.useSelectionEnd?i:n,r=["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 h=document.querySelector("#input-textarea-caret-position-mirror-div");h?.parentNode&&h.parentNode.removeChild(h)}const o=document.createElement("div");o.id="input-textarea-caret-position-mirror-div",document.body.appendChild(o);const a=o.style,l=window.getComputedStyle(t),c=t.nodeName==="INPUT";a.whiteSpace=c?"nowrap":"pre-wrap",c||(a.wordWrap="break-word"),a.position="absolute",e.debug||(a.visibility="hidden"),r.forEach(h=>{if(c&&h==="lineHeight")if(l.boxSizing==="border-box"){const f=Number.parseInt(l.height),p=Number.parseInt(l.paddingTop)+Number.parseInt(l.paddingBottom)+Number.parseInt(l.borderTopWidth)+Number.parseInt(l.borderBottomWidth),m=p+Number.parseInt(l.lineHeight);f>m?a.lineHeight=`${f-p}px`:f===m?a.lineHeight=l.lineHeight:a.lineHeight="0"}else a.lineHeight=l.height;else a[h]=l[h]}),ak()?t.scrollHeight>Number.parseInt(l.height)&&(a.overflowY="scroll"):a.overflow="hidden",o.textContent=t.value.slice(0,Math.max(0,s)),c&&o.textContent&&(o.textContent=o.textContent.replace(/\s/g," "));const u=document.createElement("span");u.textContent=t.value.slice(Math.max(0,s))||".",u.style.position="relative",u.style.left=`${-t.scrollLeft}px`,u.style.top=`${-t.scrollTop}px`,o.appendChild(u);const d={top:u.offsetTop+Number.parseInt(l.borderTopWidth),left:u.offsetLeft+Number.parseInt(l.borderLeftWidth),height:Number.parseInt(l.fontSize)*1.5};return e.debug?u.style.backgroundColor="#aaa":document.body.removeChild(o),d.left>=t.clientWidth&&(d.left=t.clientWidth),d},T4e=_t({...Xy,options:{type:Re(Array),default:()=>[]},prefix:{type:Re([String,Array]),default:"@",validator:t=>Gt(t)?t.length===1:t.every(e=>Gt(e)&&e.length===1)},split:{type:String,default:" ",validator:t=>t.length===1},filterOption:{type:Re([Boolean,Function]),default:()=>S4e,validator:t=>t===!1?!0:Kt(t)},placement:{type:Re(String),default:"bottom"},showArrow:Boolean,offset:{type:Number,default:0},whole:Boolean,checkIsWhole:{type:Re(Function)},modelValue:String,loading:Boolean,popperClass:Ri.popperClass,popperStyle:Ri.popperStyle,popperOptions:{type:Re(Object),default:()=>({})},props:{type:Re(Object),default:()=>Y$}}),M4e={[wn]:t=>Gt(t),"whole-remove":(t,e)=>Gt(t)&&Gt(e),input:t=>Gt(t),search:(t,e)=>Gt(t)&&Gt(e),select:(t,e)=>Mn(t)&&Gt(e),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},Y$={value:"value",label:"label",disabled:"disabled"},A4e=_t({options:{type:Re(Array),default:()=>[]},loading:Boolean,disabled:Boolean,contentId:String,ariaLabel:String}),k4e={select:t=>Gt(t.value)},P4e=["id","aria-disabled","aria-selected","onMousemove","onClick"],L4e=Be({name:"ElMentionDropdown",__name:"mention-dropdown",props:A4e,emits:k4e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=ht("mention"),{t:o}=Jn(),a=X(-1),l=X(),c=X(),u=X(),d=(_,E)=>[r.be("dropdown","item"),r.is("hovering",a.value===E),r.is("disabled",_.disabled||i.disabled)],h=_=>{_.disabled||i.disabled||s("select",_)},f=_=>{a.value=_},p=F(()=>i.disabled||i.options.every(_=>_.disabled)),m=F(()=>i.options[a.value]),b=()=>{m.value&&s("select",m.value)},g=_=>{const{options:E}=i;if(E.length===0||p.value)return;_==="next"?(a.value++,a.value===E.length&&(a.value=0)):_==="prev"&&(a.value--,a.value<0&&(a.value=E.length-1));const T=E[a.value];if(T.disabled){g(_);return}Nt(()=>x(T))},x=_=>{var E,T,A,I;const{options:P}=i,k=P.findIndex(R=>R.value===_.value),B=(E=c.value)==null?void 0:E[k];if(B){const R=(A=(T=u.value)==null?void 0:T.querySelector)==null?void 0:A.call(T,`.${r.be("dropdown","wrap")}`);R&&ik(R,B)}(I=l.value)==null||I.handleScroll()};return We(()=>i.options,()=>{p.value||i.options.length===0?a.value=-1:a.value=0},{immediate:!0}),e({hoveringIndex:a,navigateOptions:g,selectHoverOption:b,hoverOption:m}),(_,E)=>(z(),se("div",{ref_key:"dropdownRef",ref:u,class:J(v(r).b("dropdown"))},[_.$slots.header?(z(),se("div",{key:0,class:J(v(r).be("dropdown","header"))},[Ue(_.$slots,"header")],2)):Le("v-if",!0),_n(de(v(Wl),{id:_.contentId,ref_key:"scrollbarRef",ref:l,tag:"ul","wrap-class":v(r).be("dropdown","wrap"),"view-class":v(r).be("dropdown","list"),role:"listbox","aria-label":_.ariaLabel,"aria-orientation":"vertical"},{default:xe(()=>[(z(!0),se(At,null,yn(_.options,(T,A)=>(z(),se("li",{id:`${_.contentId}-${A}`,ref_for:!0,ref_key:"optionRefs",ref:c,key:A,class:J(d(T,A)),role:"option","aria-disabled":T.disabled||_.disabled||void 0,"aria-selected":a.value===A,onMousemove:I=>f(A),onClick:un(I=>h(T),["stop"])},[Ue(_.$slots,"label",{item:T,index:A},()=>{var I;return[U("span",null,Xe((I=T.label)!=null?I:T.value),1)]})],42,P4e))),128))]),_:3},8,["id","wrap-class","view-class","aria-label"]),[[ci,_.options.length>0&&!_.loading]]),_.loading?(z(),se("div",{key:1,class:J(v(r).be("dropdown","loading"))},[Ue(_.$slots,"loading",{},()=>[cn(Xe(v(o)("el.mention.loading")),1)])],2)):Le("v-if",!0),_.$slots.footer?(z(),se("div",{key:2,class:J(v(r).be("dropdown","footer"))},[Ue(_.$slots,"footer")],2)):Le("v-if",!0)],2))}});var I4e=xt(L4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/mention/src/mention-dropdown.vue"]]);const R4e=Be({name:"ElMention",inheritAttrs:!1,__name:"mention",props:T4e,emits:M4e,setup(t,{expose:e,emit:n}){const i=t,s=n,r=F(()=>td(i,Object.keys(Xy))),o=ht("mention"),a=Es(),l=jr(),c=X(),u=X(),d=X(),h=X(!1),f=X(),p=X(),m=F(()=>i.showArrow?i.placement:`${i.placement}-start`),b=F(()=>i.showArrow?["bottom","top"]:["bottom-start","top-start"]),g=F(()=>({...Y$,...i.props})),x=V=>{const D={label:V[g.value.label],value:V[g.value.value],disabled:V[g.value.disabled]};return{...V,...D}},S=F(()=>i.options.map(x)),_=F(()=>{const{filterOption:V}=i;return!p.value||!V?S.value:S.value.filter(D=>V(p.value.pattern,D))}),E=F(()=>h.value&&(!!_.value.length||i.loading)),T=F(()=>{var V;return`${l.value}-${(V=d.value)==null?void 0:V.hoveringIndex}`}),A=V=>{s(wn,V),s(Qs,V),q()},I=V=>{var D,K,W,Q;if((D=c.value)!=null&&D.isComposing)return;const ie=Oi(V);switch(ie){case gt.left:case gt.right:q();break;case gt.up:case gt.down:if(!h.value)return;V.preventDefault(),(K=d.value)==null||K.navigateOptions(ie===gt.up?"prev":"next");break;case gt.enter:case gt.numpadEnter:if(!h.value){i.type!=="textarea"&&q();return}V.preventDefault(),(W=d.value)!=null&&W.hoverOption?(Q=d.value)==null||Q.selectHoverOption():h.value=!1;break;case gt.esc:if(!h.value)return;V.preventDefault(),h.value=!1;break;case gt.backspace:if(i.whole&&p.value){const{splitIndex:ne,selectionEnd:ce,pattern:ae,prefixIndex:_e,prefix:ke}=p.value,Te=H();if(!Te)return;const Ke=Te.value,Fe=S.value.find(fe=>fe.value===ae);if((Kt(i.checkIsWhole)?i.checkIsWhole(ae,ke):Fe)&&ne!==-1&&ne+1===ce){V.preventDefault();const fe=Ke.slice(0,_e)+Ke.slice(ne+1);s(wn,fe),s(Qs,fe),s("whole-remove",ae,ke);const Me=_e;Nt(()=>{Te.selectionStart=Me,Te.selectionEnd=Me,Z()})}}}},{wrapperRef:P}=md(c,{disabled:a,afterFocus(){q()},beforeBlur(V){var D;return(D=u.value)==null?void 0:D.isFocusInsideContent(V)},afterBlur(){h.value=!1}}),k=()=>{q()},B=V=>i.options.find(D=>V.value===D[g.value.value]),R=V=>{if(!p.value)return;const D=H();if(!D)return;const K=D.value,{split:W}=i,Q=K.slice(p.value.end),ie=Q.startsWith(W),ne=`${V.value}${ie?"":W}`,ce=K.slice(0,p.value.start)+ne+Q;s(wn,ce),s(Qs,ce),s("select",B(V),p.value.prefix);const ae=p.value.start+ne.length+(ie?1:0);Nt(()=>{D.selectionStart=ae,D.selectionEnd=ae,D.focus(),Z()})},H=()=>{var V,D;return i.type==="textarea"?(V=c.value)==null?void 0:V.textarea:(D=c.value)==null?void 0:D.input},q=()=>{setTimeout(()=>{oe(),Z(),Nt(()=>{var V;return(V=u.value)==null?void 0:V.updatePopper()})},0)},oe=()=>{const V=H();if(!V)return;const D=C4e(V),K=V.getBoundingClientRect(),W=P.value.getBoundingClientRect();f.value={position:"absolute",width:0,height:`${D.height}px`,left:`${D.left+K.left-W.left}px`,top:`${D.top+K.top-W.top}px`}},Z=()=>{const V=H();if(document.activeElement!==V){h.value=!1;return}const{prefix:D,split:K}=i;if(p.value=E4e(V,D,K),p.value&&p.value.splitIndex===-1){h.value=!0,s("search",p.value.pattern,p.value.prefix);return}h.value=!1};return e({input:c,tooltip:u,dropdownVisible:E}),(V,D)=>(z(),se("div",{ref_key:"wrapperRef",ref:P,class:J(v(o).b())},[de(v(wo),Dn(Dn(r.value,V.$attrs),{ref_key:"elInputRef",ref:c,"model-value":V.modelValue,disabled:v(a),role:E.value?"combobox":void 0,"aria-activedescendant":E.value?T.value||"":void 0,"aria-controls":E.value?v(l):void 0,"aria-expanded":E.value||void 0,"aria-label":V.ariaLabel,"aria-autocomplete":E.value?"none":void 0,"aria-haspopup":E.value?"listbox":void 0,onInput:A,onKeydown:I,onMousedown:k}),va({_:2},[yn(V.$slots,(K,W)=>({name:W,fn:xe(Q=>[Ue(V.$slots,W,Wu(Gu(Q)))])}))]),1040,["model-value","disabled","role","aria-activedescendant","aria-controls","aria-expanded","aria-label","aria-autocomplete","aria-haspopup"]),de(v(Or),{ref_key:"tooltipRef",ref:u,visible:E.value,"popper-class":[v(o).e("popper"),V.popperClass],"popper-style":V.popperStyle,"popper-options":V.popperOptions,placement:m.value,"fallback-placements":b.value,effect:"light",pure:"",offset:V.offset,"show-arrow":V.showArrow},{default:xe(()=>[U("div",{style:Ht(f.value)},null,4)]),content:xe(()=>[de(I4e,{ref_key:"dropdownRef",ref:d,options:_.value,disabled:v(a),loading:V.loading,"content-id":v(l),"aria-label":V.ariaLabel,onSelect:R,onClick:D[0]||(D[0]=un(K=>{var W;return(W=c.value)==null?void 0:W.focus()},["stop"]))},va({_:2},[yn(V.$slots,(K,W)=>({name:W,fn:xe(Q=>[Ue(V.$slots,W,Wu(Gu(Q)))])}))]),1032,["options","disabled","loading","content-id","aria-label"])]),_:3},8,["visible","popper-class","popper-style","popper-options","placement","fallback-placements","offset","show-arrow"])],2))}});var O4e=xt(R4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/mention/src/mention.vue"]]);const D4e=En(O4e),N4e=_t({layout:{type:String,default:"horizontal",values:["horizontal","vertical"]},lazy:Boolean}),B4e={resizeStart:(t,e)=>!0,resize:(t,e)=>!0,resizeEnd:(t,e)=>!0,collapse:(t,e,n)=>!0},X$=Symbol("splitterRootContextKey");function F4e(t){const e=X(),{width:n,height:i}=MT(e),s=F(()=>t.value==="horizontal"?n.value:i.value);return{containerEl:e,containerSize:s}}function E4(t){return Number(t.slice(0,-1))/100}function C4(t){return Number(t.slice(0,-2))}function T4(t){return Gt(t)&&t.endsWith("%")}function M4(t){return Gt(t)&&t.endsWith("px")}function z4e(t,e){const n=F(()=>t.value.map(a=>a.size)),i=F(()=>t.value.length),s=X([]);We([n,i,e],()=>{var a;let l=[],c=0;for(let d=0;dd+(h||0),0);if(u>1||!c){const d=1/u;l=l.map(h=>h===void 0?0:h*d)}else{const d=(1-u)/c;l=l.map(h=>h===void 0?d:h)}s.value=l});const r=a=>a*e.value,o=F(()=>s.value.map(r));return{percentSizes:s,pxSizes:o}}function U4e(t,e,n,i){const s=b=>b*e.value||0;function r(b,g){return T4(b)?s(E4(b)):M4(b)?C4(b):b??g}const o=X(0),a=X(null);let l=[],c=_i;const u=F(()=>t.value.map(b=>[b.min,b.max]));We(i,()=>{if(o.value){const b=new MouseEvent("mouseup",{bubbles:!0});window.dispatchEvent(b)}});const d=b=>{o.value=0,a.value={index:b,confirmed:!1},l=n.value},h=(b,g)=>{var x,S;let _=null;if((!a.value||!a.value.confirmed)&&g!==0){if(g>0)_=b,a.value={index:b,confirmed:!0};else for(let H=b;H>=0;H-=1)if(l[H]>0){_=H,a.value={index:H,confirmed:!0};break}}const E=(S=_??((x=a.value)==null?void 0:x.index))!=null?S:b,T=[...l],A=E+1,I=r(u.value[E][0],0),P=r(u.value[A][0],0),k=r(u.value[E][1],e.value||0),B=r(u.value[A][1],e.value||0);let R=g;T[E]+Rk&&(R=k-T[E]),T[A]-R>B&&(R=T[A]-B),T[E]+=R,T[A]-=R,o.value=R,c=()=>{t.value.forEach((H,q)=>{H.size=T[q]}),c=_i},i.value||c()},f=()=>{i.value&&c(),o.value=0,a.value=null,l=[]},p=[];return{lazyOffset:o,onMoveStart:d,onMoving:h,onMoveEnd:f,movingIndex:a,onCollapse:(b,g)=>{p.length||p.push(...n.value);const x=n.value,S=g==="start"?b:b+1,_=g==="start"?b+1:b,E=x[S],T=x[_];if(E!==0&&T!==0)x[S]=0,x[_]+=E,p[b]=E;else{const A=E+T,I=p[b],P=A-I;x[_]=I,x[S]=P}t.value.forEach((A,I)=>{A.size=x[I]})}}}const $4e=Be({name:"ElSplitter",__name:"splitter",props:N4e,emits:B4e,setup(t,{emit:e}){const n=ht("splitter"),i=e,s=t,r=Ei(s,"layout"),o=Ei(s,"lazy"),{containerEl:a,containerSize:l}=F4e(r),{removeChild:c,children:u,addChild:d,ChildrenSorter:h}=Ox(xn(),"ElSplitterPanel");We(u,()=>{b.value=null,u.value.forEach((k,B)=>{k.setIndex(B)})});const{percentSizes:f,pxSizes:p}=z4e(u,l),{lazyOffset:m,movingIndex:b,onMoveStart:g,onMoving:x,onMoveEnd:S,onCollapse:_}=U4e(u,l,p,o),E=F(()=>({[n.cssVarBlockName("bar-offset")]:o.value?`${m.value}px`:void 0}));return Xn(X$,ni({panels:u,percentSizes:f,pxSizes:p,layout:r,lazy:o,movingIndex:b,containerSize:l,onMoveStart:k=>{g(k),i("resizeStart",k,p.value)},onMoving:(k,B)=>{x(k,B),o.value||i("resize",k,p.value)},onMoveEnd:async k=>{S(),await Nt(),i("resizeEnd",k,p.value)},onCollapse:(k,B)=>{_(k,B),i("collapse",k,B,p.value)},registerPanel:d,unregisterPanel:c})),(k,B)=>(z(),se("div",{ref_key:"containerEl",ref:a,class:J([v(n).b(),v(n).e(r.value)]),style:Ht(E.value)},[Ue(k.$slots,"default"),de(v(h)),Le(" Prevent iframe touch events from breaking "),v(b)?(z(),se("div",{key:0,class:J([v(n).e("mask"),v(n).e(`mask-${r.value}`)])},null,2)):Le("v-if",!0)],6))}});var V4e=xt($4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/splitter/src/splitter.vue"]]);function H4e(t){return t&&Mn(t)?t:{start:!!t,end:!!t}}function w5(t,e,n,i){return!!(t?.collapsible.end&&e>0||n?.collapsible.start&&i===0&&e>0)}const W4e=Be({name:"ElSplitterBar",__name:"split-bar",props:{index:{type:Number,required:!0},layout:{type:String,values:["horizontal","vertical"],default:"horizontal"},resizable:{type:Boolean,default:!0},lazy:Boolean,startCollapsible:Boolean,endCollapsible:Boolean},emits:["moveStart","moving","moveEnd","collapse"],setup(t,{emit:e}){const n=ht("splitter-bar"),i=t,s=e,r=F(()=>i.layout==="horizontal"),o=F(()=>r.value?{width:0}:{height:0}),a=F(()=>({width:r.value?"16px":"100%",height:r.value?"100%":"16px",cursor:i.resizable?r.value?"ew-resize":"ns-resize":"auto",touchAction:"none"})),l=F(()=>{const x=n.e("dragger");return{[`${x}-horizontal`]:r.value,[`${x}-vertical`]:!r.value,[`${x}-active`]:!!c.value}}),c=X(null),u=x=>{i.resizable&&(c.value=[x.pageX,x.pageY],s("moveStart",i.index),window.addEventListener("mouseup",p),window.addEventListener("mousemove",h))},d=x=>{if(i.resizable&&x.touches.length===1){x.preventDefault();const S=x.touches[0];c.value=[S.pageX,S.pageY],s("moveStart",i.index),window.addEventListener("touchend",m),window.addEventListener("touchmove",f)}},h=x=>{const{pageX:S,pageY:_}=x,E=S-c.value[0],T=_-c.value[1],A=r.value?E:T;s("moving",i.index,A)},f=x=>{if(x.touches.length===1){x.preventDefault();const S=x.touches[0],_=S.pageX-c.value[0],E=S.pageY-c.value[1],T=r.value?_:E;s("moving",i.index,T)}},p=()=>{c.value=null,window.removeEventListener("mouseup",p),window.removeEventListener("mousemove",h),s("moveEnd",i.index)},m=()=>{c.value=null,window.removeEventListener("touchend",m),window.removeEventListener("touchmove",f),s("moveEnd",i.index)},b=F(()=>r.value?id:Ax),g=F(()=>r.value?So:eu);return(x,S)=>(z(),se("div",{class:J([v(n).b()]),style:Ht(o.value)},[t.startCollapsible?(z(),se("div",{key:0,class:J([v(n).e("collapse-icon"),v(n).e(`${t.layout}-collapse-icon-start`)]),onClick:S[0]||(S[0]=_=>s("collapse",t.index,"start"))},[Ue(x.$slots,"start-collapsible",{},()=>[(z(),De(Sn(b.value),{style:{width:"12px",height:"12px"}}))])],2)):Le("v-if",!0),U("div",{class:J([v(n).e("dragger"),l.value,v(n).is("disabled",!t.resizable),v(n).is("lazy",t.resizable&&t.lazy)]),style:Ht(a.value),onMousedown:u,onTouchstart:d},null,38),t.endCollapsible?(z(),se("div",{key:1,class:J([v(n).e("collapse-icon"),v(n).e(`${t.layout}-collapse-icon-end`)]),onClick:S[1]||(S[1]=_=>s("collapse",t.index,"end"))},[Ue(x.$slots,"end-collapsible",{},()=>[(z(),De(Sn(g.value),{style:{width:"12px",height:"12px"}}))])],2)):Le("v-if",!0)],6))}});var G4e=xt(W4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/splitter/src/split-bar.vue"]]);const j4e=_t({min:{type:[String,Number]},max:{type:[String,Number]},size:{type:[String,Number]},resizable:{type:Boolean,default:!0},collapsible:Boolean}),K4e={"update:size":t=>typeof t=="number"||typeof t=="string"},x5="ElSplitterPanel",q4e=Be({name:x5,__name:"split-panel",props:j4e,emits:K4e,setup(t,{expose:e,emit:n}){const i=ht("splitter-panel"),s=t,r=n,o=zt(X$);o||Ks(x5,"usage: ");const{panels:a,layout:l,lazy:c,containerSize:u,pxSizes:d}=hr(o),{registerPanel:h,unregisterPanel:f,onCollapse:p,onMoveEnd:m,onMoveStart:b,onMoving:g}=o,x=X(),S=xn(),_=S.uid,E=X(0),T=F(()=>a.value[E.value]),A=D=>{E.value=D},I=F(()=>{var D;return T.value&&(D=d.value[E.value])!=null?D:0}),P=F(()=>{var D;return T.value&&(D=d.value[E.value+1])!=null?D:0}),k=F(()=>T.value?a.value[E.value+1]:null),B=F(()=>{var D;return k.value?s.resizable&&((D=k.value)==null?void 0:D.resizable)&&(I.value!==0||!s.min)&&(P.value!==0||!k.value.min):!1}),R=F(()=>T.value?E.value!==a.value.length-1:!1),H=F(()=>w5(T.value,I.value,k.value,P.value)),q=F(()=>w5(k.value,P.value,T.value,I.value));function oe(D){return T4(D)?E4(D)*u.value||0:M4(D)?C4(D):D??0}let Z=!1;We(()=>s.size,()=>{if(!Z&&T.value){if(!u.value){T.value.size=s.size;return}const D=oe(s.size),K=oe(s.max),W=oe(s.min),Q=Math.min(Math.max(D,W||0),K||D);Q!==D&&r("update:size",Q),T.value.size=Q}}),We(()=>{var D;return(D=T.value)==null?void 0:D.size},D=>{D!==s.size&&(Z=!0,r("update:size",D),Nt(()=>Z=!1))}),We(()=>s.resizable,D=>{T.value&&(T.value.resizable=D)});const V=ni({el:x.value,uid:_,getVnode:()=>S.vnode,setIndex:A,...s,collapsible:F(()=>H4e(s.collapsible))});return h(V),gi(()=>f(V)),e({splitterPanelRef:x}),(D,K)=>(z(),se(At,null,[U("div",Dn({ref_key:"panelEl",ref:x,class:[v(i).b()],style:{flexBasis:`${I.value}px`}},D.$attrs),[Ue(D.$slots,"default")],16),R.value?(z(),De(G4e,{key:0,index:E.value,layout:v(l),lazy:v(c),resizable:B.value,"start-collapsible":H.value,"end-collapsible":q.value,onMoveStart:v(b),onMoving:v(g),onMoveEnd:v(m),onCollapse:v(p)},{"start-collapsible":xe(()=>[Ue(D.$slots,"start-collapsible")]),"end-collapsible":xe(()=>[Ue(D.$slots,"end-collapsible")]),_:3},8,["index","layout","lazy","resizable","start-collapsible","end-collapsible","onMoveStart","onMoving","onMoveEnd","onCollapse"])):Le("v-if",!0)],64))}});var Z$=xt(q4e,[["__file","/home/runner/work/element-plus/element-plus/packages/components/splitter/src/split-panel.vue"]]);const Y4e=En(V4e,{SplitPanel:Z$}),X4e=Ss(Z$);var Z4e=[wue,zde,Tpe,IMe,Ipe,Fpe,D7,qpe,Ype,Sr,xk,$me,Gme,dge,hge,dve,lz,gve,Gl,Ege,Ek,_ve,Nve,Bve,Nx,Tk,d0e,p0e,w0e,x0e,S0e,E0e,C0e,U1e,Rz,Y1e,X1e,ube,Vz,Sbe,Zz,Jz,Qz,eU,kwe,Pwe,Ut,Vwe,iU,wo,sU,r2e,d2e,M2e,A2e,k2e,P2e,N2e,Bxe,Vxe,Xxe,R7,Yk,oz,Nge,Dge,dSe,mSe,wSe,Wl,mg,c2,pxe,nEe,cEe,uEe,PEe,DEe,TU,WEe,ZEe,JEe,lCe,YU,xTe,LMe,f$,p$,ju,d4,Y0e,JMe,i3e,s3e,Or,v3e,p4,z3e,tAe,AAe,FAe,s4e,r4e,p4e,m4e,x4e,D4e,Y4e,X4e];const ka="ElInfiniteScroll",J4e=50,Q4e=200,ePe=0,tPe={delay:{type:Number,default:Q4e},distance:{type:Number,default:ePe},disabled:{type:Boolean,default:!1},immediate:{type:Boolean,default:!0}},A4=(t,e)=>Object.entries(tPe).reduce((n,[i,s])=>{var r,o;const{type:a,default:l}=s,c=t.getAttribute(`infinite-scroll-${i}`);let u=(o=(r=e[c])!=null?r:c)!=null?o:l;return u=u==="false"?!1:u,u=a(u),n[i]=Number.isNaN(u)?l:u,n},{}),J$=t=>{const{observer:e}=t[ka];e&&(e.disconnect(),delete t[ka].observer)},nPe=(t,e)=>{const{container:n,containerEl:i,instance:s,observer:r,lastScrollTop:o}=t[ka],{disabled:a,distance:l}=A4(t,s),{clientHeight:c,scrollHeight:u,scrollTop:d}=i,h=d-o;if(t[ka].lastScrollTop=d,r||a||h<0)return;let f=!1;if(n===t)f=u-(c+d)<=l;else{const{clientTop:p,scrollHeight:m}=t,b=zT(t,i);f=d+c>=b+p+m-l}f&&e.call(s)};function bE(t,e){const{containerEl:n,instance:i}=t[ka],{disabled:s}=A4(t,i);s||n.clientHeight===0||(n.scrollHeight<=n.clientHeight?e.call(i):J$(t))}const iPe={async mounted(t,e){const{instance:n,value:i}=e;Bc({scope:ka,from:"the directive v-infinite-scroll",replacement:"the el-scrollbar infinite scroll",version:"3.0.0",ref:"https://element-plus.org/en-US/component/scrollbar#infinite-scroll"},!0),Kt(i)||Ks(ka,"'v-infinite-scroll' binding value must be a function"),await Nt();const{delay:s,immediate:r}=A4(t,n),o=nk(t,!0),a=o===window?document.documentElement:o,l=ih(nPe.bind(null,t,i),s);if(o){if(t[ka]={instance:n,container:o,containerEl:a,delay:s,cb:i,onScroll:l,lastScrollTop:a.scrollTop},r){const c=new MutationObserver(ih(bE.bind(null,t,i),J4e));t[ka].observer=c,c.observe(t,{childList:!0,subtree:!0}),bE(t,i)}o.addEventListener("scroll",l)}},unmounted(t){if(!t[ka])return;const{container:e,onScroll:n}=t[ka];e?.removeEventListener("scroll",n),J$(t)},async updated(t){if(!t[ka])await Nt();else{const{containerEl:e,cb:n,observer:i}=t[ka];e.clientHeight&&i&&bE(t,n)}}},EM=iPe;EM.install=t=>{t.directive("InfiniteScroll",EM)};const sPe=EM;function rPe(t,e){let n;const i=X(!1),s=ni({...t,originalPosition:"",originalOverflow:"",visible:!1});function r(f){s.text=f}function o(){const f=s.parent,p=h.ns;if(!f.vLoadingAddClassList){let m=f.getAttribute("loading-number");m=Number.parseInt(m)-1,m?f.setAttribute("loading-number",m.toString()):(xo(f,p.bm("parent","relative")),f.removeAttribute("loading-number")),xo(f,p.bm("parent","hidden"))}a(),d.unmount()}function a(){var f,p;(p=(f=h.$el)==null?void 0:f.parentNode)==null||p.removeChild(h.$el)}function l(){var f;t.beforeClose&&!t.beforeClose()||(i.value=!0,clearTimeout(n),n=setTimeout(c,400),s.visible=!1,(f=t.closed)==null||f.call(t))}function c(){if(!i.value)return;const f=s.parent;i.value=!1,f.vLoadingAddClassList=void 0,o()}const d=aF(Be({name:"ElLoading",setup(f,{expose:p}){const{ns:m,zIndex:b}=Mx("loading");return p({ns:m,zIndex:b}),()=>{const g=s.spinner||s.svg,x=tn("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...g?{innerHTML:g}:{}},[tn("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),S=s.text?tn("p",{class:m.b("text")},[s.text]):void 0;return tn(Rr,{name:m.b("fade"),onAfterLeave:c},{default:xe(()=>[_n(de("div",{style:{backgroundColor:s.background||""},class:[m.b("mask"),s.customClass,m.is("fullscreen",s.fullscreen)]},[tn("div",{class:m.b("spinner")},[x,S])]),[[ci,s.visible]])])})}}}));Object.assign(d._context,e??{});const h=d.mount(document.createElement("div"));return{...hr(s),setText:r,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:h,get $el(){return h.$el}}}let hb;const jm=function(t={},e){if(!pi)return;const n=oPe(t);if(n.fullscreen&&hb)return hb;const i=rPe({...n,closed:()=>{var r;(r=n.closed)==null||r.call(n),n.fullscreen&&(hb=void 0)}},e??jm._context);aPe(n,n.parent,i),S5(n,n.parent,i),n.parent.vLoadingAddClassList=()=>S5(n,n.parent,i);let s=n.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",n.parent.setAttribute("loading-number",s),n.parent.appendChild(i.$el),Nt(()=>i.visible.value=n.visible),n.fullscreen&&(hb=i),i},oPe=t=>{var e,n,i,s;let r;return Gt(t.target)?r=(e=document.querySelector(t.target))!=null?e:document.body:r=t.target||document.body,{parent:r===document.body||t.body?document.body:r,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:r===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(i=t.lock)!=null?i:!1,customClass:t.customClass||"",visible:(s=t.visible)!=null?s:!0,beforeClose:t.beforeClose,closed:t.closed,target:r}},aPe=async(t,e,n)=>{const{nextZIndex:i}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(t.fullscreen)n.originalPosition.value=Ou(document.body,"position"),n.originalOverflow.value=Ou(document.body,"overflow"),s.zIndex=i();else if(t.parent===document.body){n.originalPosition.value=Ou(document.body,"position"),await Nt();for(const r of["top","left"]){const o=r==="top"?"scrollTop":"scrollLeft";s[r]=`${t.target.getBoundingClientRect()[r]+document.body[o]+document.documentElement[o]-Number.parseInt(Ou(document.body,`margin-${r}`),10)}px`}for(const r of["height","width"])s[r]=`${t.target.getBoundingClientRect()[r]}px`}else n.originalPosition.value=Ou(e,"position");for(const[r,o]of Object.entries(s))n.$el.style[r]=o},S5=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?xo(e,i.bm("parent","relative")):nl(e,i.bm("parent","relative")),t.fullscreen&&t.lock?nl(e,i.bm("parent","hidden")):xo(e,i.bm("parent","hidden"))};jm._context=null;const Hv=Symbol("ElLoading"),af=t=>`element-loading-${Jc(t)}`,E5=(t,e)=>{var n,i,s,r;const o=e.instance,a=f=>Mn(e.value)?e.value[f]:void 0,l=f=>{const p=Gt(f)&&o?.[f]||f;return X(p)},c=f=>l(a(f)||t.getAttribute(af(f))),u=(n=a("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:u,target:(i=a("target"))!=null?i:u?void 0:t,body:(s=a("body"))!=null?s:e.modifiers.body,lock:(r=a("lock"))!=null?r:e.modifiers.lock},h=jm(d);h._context=v0._context,t[Hv]={options:d,instance:h}},lPe=(t,e)=>{for(const n of Object.keys(t))Li(t[n])&&(t[n].value=e[n])},v0={mounted(t,e){e.value&&E5(t,e)},updated(t,e){const n=t[Hv];if(!e.value){n?.instance.close(),t[Hv]=null;return}n?lPe(n.options,Mn(e.value)?e.value:{text:t.getAttribute(af("text")),svg:t.getAttribute(af("svg")),svgViewBox:t.getAttribute(af("svgViewBox")),spinner:t.getAttribute(af("spinner")),background:t.getAttribute(af("background")),customClass:t.getAttribute(af("customClass"))}):E5(t,e)},unmounted(t){var e;(e=t[Hv])==null||e.instance.close(),t[Hv]=null}};v0._context=null;const cPe={install(t){jm._context=t._context,v0._context=t._context,t.directive("loading",v0),t.config.globalProperties.$loading=jm},directive:v0,service:jm},Q$=["primary","success","info","warning","error"],eV=["top","top-left","top-right","bottom","bottom-left","bottom-right"],ry="top",uo=ws({customClass:"",dangerouslyUseHTMLString:!1,duration:3e3,icon:void 0,id:"",message:"",onClose:void 0,showClose:!1,type:"info",plain:!1,offset:16,placement:void 0,zIndex:0,grouping:!1,repeatNum:1,appendTo:pi?document.body:void 0}),uPe=_t({customClass:{type:String,default:uo.customClass},dangerouslyUseHTMLString:{type:Boolean,default:uo.dangerouslyUseHTMLString},duration:{type:Number,default:uo.duration},icon:{type:Ai,default:uo.icon},id:{type:String,default:uo.id},message:{type:Re([String,Object,Function]),default:uo.message},onClose:{type:Re(Function),default:uo.onClose},showClose:{type:Boolean,default:uo.showClose},type:{type:String,values:Q$,default:uo.type},plain:{type:Boolean,default:uo.plain},offset:{type:Number,default:uo.offset},placement:{type:String,values:eV,default:uo.placement},zIndex:{type:Number,default:uo.zIndex},grouping:{type:Boolean,default:uo.grouping},repeatNum:{type:Number,default:uo.repeatNum}}),dPe={destroy:()=>!0},zl=gA({}),hPe=t=>(zl[t]||(zl[t]=gA([])),zl[t]),fPe=(t,e)=>{const n=zl[e]||[],i=n.findIndex(o=>o.id===t),s=n[i];let r;return i>0&&(r=n[i-1]),{current:s,prev:r}},pPe=(t,e)=>{const{prev:n}=fPe(t,e);return n?n.vm.exposed.bottom.value:0},mPe=(t,e,n)=>(zl[n]||[]).findIndex(r=>r.id===t)>0?16:e,gPe=["id"],vPe=["innerHTML"],yPe=Be({name:"ElMessage",__name:"message",props:uPe,emits:dPe,setup(t,{expose:e,emit:n}){const{Close:i}=ok,s=t,r=n,o=X(!1),{ns:a,zIndex:l}=Mx("message"),{currentZIndex:c,nextZIndex:u}=l,d=X(),h=X(!1),f=X(0);let p;const m=F(()=>s.type?s.type==="error"?"danger":s.type:"info"),b=F(()=>{const H=s.type;return{[a.bm("icon",H)]:H&&Eh[H]}}),g=F(()=>s.icon||Eh[s.type]||""),x=F(()=>s.placement||ry),S=F(()=>pPe(s.id,x.value)),_=F(()=>mPe(s.id,s.offset,x.value)+S.value),E=F(()=>f.value+_.value),T=F(()=>x.value.includes("left")?a.is("left"):x.value.includes("right")?a.is("right"):a.is("center")),A=F(()=>x.value.startsWith("top")?"top":"bottom"),I=F(()=>({[A.value]:`${_.value}px`,zIndex:c.value}));function P(){s.duration!==0&&({stop:p}=og(()=>{B()},s.duration))}function k(){p?.()}function B(){h.value=!1,Nt(()=>{var H;o.value||((H=s.onClose)==null||H.call(s),r("destroy"))})}function R(H){Oi(H)===gt.esc&&B()}return mn(()=>{P(),u(),h.value=!0}),We(()=>s.repeatNum,()=>{k(),P()}),xi(document,"keydown",R),as(d,()=>{f.value=d.value.getBoundingClientRect().height}),e({visible:h,bottom:E,close:B}),(H,q)=>(z(),De(Rr,{name:v(a).b("fade"),onBeforeEnter:q[0]||(q[0]=oe=>o.value=!0),onBeforeLeave:H.onClose,onAfterLeave:q[1]||(q[1]=oe=>H.$emit("destroy")),persisted:""},{default:xe(()=>[_n(U("div",{id:H.id,ref_key:"messageRef",ref:d,class:J([v(a).b(),{[v(a).m(H.type)]:H.type},v(a).is("closable",H.showClose),v(a).is("plain",H.plain),v(a).is("bottom",A.value==="bottom"),T.value,H.customClass]),style:Ht(I.value),role:"alert",onMouseenter:k,onMouseleave:P},[H.repeatNum>1?(z(),De(v(D7),{key:0,value:H.repeatNum,type:m.value,class:J(v(a).e("badge"))},null,8,["value","type","class"])):Le("v-if",!0),g.value?(z(),De(v(Ut),{key:1,class:J([v(a).e("icon"),b.value])},{default:xe(()=>[(z(),De(Sn(g.value)))]),_:1},8,["class"])):Le("v-if",!0),Ue(H.$slots,"default",{},()=>[H.dangerouslyUseHTMLString?(z(),se(At,{key:1},[Le(" Caution here, message could've been compromised, never use user's input as message "),U("p",{class:J(v(a).e("content")),innerHTML:H.message},null,10,vPe)],2112)):(z(),se("p",{key:0,class:J(v(a).e("content"))},Xe(H.message),3))]),H.showClose?(z(),De(v(Ut),{key:2,class:J(v(a).e("closeBtn")),onClick:un(B,["stop"])},{default:xe(()=>[de(v(i))]),_:1},8,["class"])):Le("v-if",!0)],46,gPe),[[ci,h.value]])]),_:3},8,["name","onBeforeLeave"]))}});var bPe=xt(yPe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);let _Pe=1;const wPe=t=>{if(!t.appendTo)t.appendTo=document.body;else if(Gt(t.appendTo)){let n=document.querySelector(t.appendTo);ca(n)||(n=document.body),t.appendTo=n}},xPe=t=>{!t.placement&&Gt(po.placement)&&po.placement&&(t.placement=po.placement),t.placement||(t.placement=ry),eV.includes(t.placement)||(t.placement=ry)},tV=t=>{const e=!t||Gt(t)||Yi(t)||Kt(t)?{message:t}:t,n={...uo,...e};return wPe(n),xPe(n),Mi(po.grouping)&&!n.grouping&&(n.grouping=po.grouping),Xt(po.duration)&&n.duration===3e3&&(n.duration=po.duration),Xt(po.offset)&&n.offset===16&&(n.offset=po.offset),Mi(po.showClose)&&!n.showClose&&(n.showClose=po.showClose),Mi(po.plain)&&!n.plain&&(n.plain=po.plain),n},SPe=t=>{const e=t.props.placement||ry,n=zl[e],i=n.indexOf(t);if(i===-1)return;n.splice(i,1);const{handler:s}=t;s.close()},EPe=({appendTo:t,...e},n)=>{const i=`message_${_Pe++}`,s=e.onClose,r=document.createElement("div"),o={...e,id:i,onClose:()=>{s?.(),SPe(u)},onDestroy:()=>{wh(null,r)}},a=de(bPe,o,Kt(o.message)||Yi(o.message)?{default:Kt(o.message)?o.message:()=>o.message}:null);a.appContext=n||Xf._context,wh(a,r),t.appendChild(r.firstElementChild);const l=a.component,u={id:i,vnode:a,vm:l,handler:{close:()=>{l.exposed.close()}},props:a.component.props};return u},Xf=(t={},e)=>{if(!pi)return{close:()=>{}};const n=tV(t),i=hPe(n.placement||ry);if(n.grouping&&i.length){const r=i.find(({vnode:o})=>{var a;return((a=o.props)==null?void 0:a.message)===n.message});if(r)return r.props.repeatNum+=1,r.props.type=n.type,r.handler}if(Xt(po.max)&&i.length>=po.max)return{close:()=>{}};const s=EPe(n,e);return i.push(s),s.handler};Q$.forEach(t=>{Xf[t]=(e={},n)=>{const i=tV(e);return Xf({...i,type:t},n)}});function CPe(t){for(const e in zl)if(fi(zl,e)){const n=[...zl[e]];for(const i of n)(!t||t===i.props.type)&&i.handler.close()}}function TPe(t){if(!zl[t])return;[...zl[t]].forEach(n=>n.handler.close())}Xf.closeAll=CPe;Xf.closeAllByPlacement=TPe;Xf._context=null;const Nu=q9(Xf,"$message"),CM="_trap-focus-children",Tf=[],C5=t=>{if(Tf.length===0)return;const e=Oi(t),n=Tf[Tf.length-1][CM];if(n.length>0&&e===gt.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,s=t.target===n[0],r=t.target===n[n.length-1];s&&i&&(t.preventDefault(),n[n.length-1].focus()),r&&!i&&(t.preventDefault(),n[0].focus())}},MPe={beforeMount(t){t[CM]=g8(t),Tf.push(t),Tf.length<=1&&document.addEventListener("keydown",C5)},updated(t){Nt(()=>{t[CM]=g8(t)})},unmounted(){Tf.shift(),Tf.length===0&&document.removeEventListener("keydown",C5)}},APe=Be({name:"ElMessageBox",directives:{TrapFocus:MPe},components:{ElButton:Sr,ElFocusTrap:Gg,ElInput:wo,ElOverlay:zk,ElIcon:Ut,...ok},inheritAttrs:!1,props:{buttonSize:{type:String,validator:kU},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:i,ns:s,size:r}=Mx("message-box",F(()=>t.buttonSize)),{t:o}=n,{nextZIndex:a}=i,l=X(!1),c=ni({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Da(jc),cancelButtonLoadingIcon:Da(jc),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=F(()=>{const V=c.type;return{[s.bm("icon",V)]:V&&Eh[V]}}),d=jr(),h=jr(),f=F(()=>{const V=c.type;return c.icon||V&&Eh[V]||""}),p=F(()=>!!c.message),m=X(),b=X(),g=X(),x=X(),S=X(),_=F(()=>c.confirmButtonClass);We(()=>c.inputValue,async V=>{await Nt(),t.boxType==="prompt"&&V&&H()},{immediate:!0}),We(()=>l.value,V=>{var D,K;V&&(t.boxType!=="prompt"&&(c.autofocus?g.value=(K=(D=S.value)==null?void 0:D.$el)!=null?K:m.value:g.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(V?Nt().then(()=>{var W;x.value&&x.value.$el&&(c.autofocus?g.value=(W=q())!=null?W:m.value:g.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const E=F(()=>t.draggable),T=F(()=>t.overflow),{isDragging:A}=Fz(m,b,E,T);mn(async()=>{await Nt(),t.closeOnHashChange&&window.addEventListener("hashchange",I)}),gi(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",I)});function I(){l.value&&(l.value=!1,Nt(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&R(c.distinguishCancelAndClose?"close":"cancel")},k=Fk(P),B=V=>{if(c.inputType!=="textarea")return V.preventDefault(),R("confirm")},R=V=>{var D;t.boxType==="prompt"&&V==="confirm"&&!H()||(c.action=V,c.beforeClose?(D=c.beforeClose)==null||D.call(c,V,c,I):I())},H=()=>{if(t.boxType==="prompt"){const V=c.inputPattern;if(V&&!V.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||o("el.messagebox.error"),c.validateError=!0,!1;const D=c.inputValidator;if(Kt(D)){const K=D(c.inputValue);if(K===!1)return c.editorErrorMessage=c.inputErrorMessage||o("el.messagebox.error"),c.validateError=!0,!1;if(Gt(K))return c.editorErrorMessage=K,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},q=()=>{var V,D;const K=(V=x.value)==null?void 0:V.$refs;return(D=K?.input)!=null?D:K?.textarea},oe=()=>{R("close")},Z=()=>{t.closeOnPressEscape&&oe()};return t.lockScroll&&Fx(l,{ns:s}),{...hr(c),ns:s,overlayEvent:k,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:r,iconComponent:f,confirmButtonClasses:_,rootRef:m,focusStartRef:g,headerRef:b,inputRef:x,isDragging:A,confirmRef:S,doClose:I,handleClose:oe,onCloseRequested:Z,handleWrapperClick:P,handleInputEnter:B,handleAction:R,t:o}}}),kPe=["aria-label","aria-describedby"],PPe=["aria-label"],LPe=["id"];function IPe(t,e,n,i,s,r){const o=Zt("el-icon"),a=Zt("el-input"),l=Zt("el-button"),c=Zt("el-focus-trap"),u=Zt("el-overlay");return z(),De(Rr,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:xe(()=>[_n(de(u,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:xe(()=>[U("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:e[8]||(e[8]=(...d)=>t.overlayEvent.onClick&&t.overlayEvent.onClick(...d)),onMousedown:e[9]||(e[9]=(...d)=>t.overlayEvent.onMousedown&&t.overlayEvent.onMousedown(...d)),onMouseup:e[10]||(e[10]=(...d)=>t.overlayEvent.onMouseup&&t.overlayEvent.onMouseup(...d))},[de(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:xe(()=>[U("div",{ref:"rootRef",class:J([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:Ht(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=un(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(z(),se("div",{key:0,ref:"headerRef",class:J([t.ns.e("header"),{"show-close":t.showClose}])},[U("div",{class:J(t.ns.e("title"))},[t.iconComponent&&t.center?(z(),De(o,{key:0,class:J([t.ns.e("status"),t.typeClass])},{default:xe(()=>[(z(),De(Sn(t.iconComponent)))]),_:1},8,["class"])):Le("v-if",!0),U("span",null,Xe(t.title),1)],2),t.showClose?(z(),se("button",{key:0,type:"button",class:J(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:e[0]||(e[0]=d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel")),onKeydown:e[1]||(e[1]=_s(un(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[de(o,{class:J(t.ns.e("close"))},{default:xe(()=>[(z(),De(Sn(t.closeIcon||"close")))]),_:1},8,["class"])],42,PPe)):Le("v-if",!0)],2)):Le("v-if",!0),U("div",{id:t.contentId,class:J(t.ns.e("content"))},[U("div",{class:J(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(z(),De(o,{key:0,class:J([t.ns.e("status"),t.typeClass])},{default:xe(()=>[(z(),De(Sn(t.iconComponent)))]),_:1},8,["class"])):Le("v-if",!0),t.hasMessage?(z(),se("div",{key:1,class:J(t.ns.e("message"))},[Ue(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(z(),De(Sn(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(z(),De(Sn(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:Xe(t.message)},null,8,["for","textContent"]))])],2)):Le("v-if",!0)],2),_n(U("div",{class:J(t.ns.e("input"))},[de(a,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":e[2]||(e[2]=d=>t.inputValue=d),type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:J({invalid:t.validateError}),onKeydown:_s(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),U("div",{class:J(t.ns.e("errormsg")),style:Ht({visibility:t.editorErrorMessage?"visible":"hidden"})},Xe(t.editorErrorMessage),7)],2),[[ci,t.showInput]])],10,LPe),U("div",{class:J(t.ns.e("btns"))},[t.showCancelButton?(z(),De(l,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:J([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=_s(un(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:xe(()=>[cn(Xe(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size"])):Le("v-if",!0),_n(de(l,{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:e[5]||(e[5]=d=>t.handleAction("confirm")),onKeydown:e[6]||(e[6]=_s(un(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:xe(()=>[cn(Xe(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size"]),[[ci,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,kPe)]),_:3},8,["z-index","overlay-class","mask"]),[[ci,t.visible]])]),_:3})}var RPe=xt(APe,[["render",IPe],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]);const oy=new Map,OPe=t=>{let e=document.body;return t.appendTo&&(Gt(t.appendTo)&&(e=document.querySelector(t.appendTo)),ca(t.appendTo)&&(e=t.appendTo),ca(e)||(e=document.body)),e},DPe=(t,e,n=null)=>{const i=de(RPe,t,Kt(t.message)||Yi(t.message)?{default:Kt(t.message)?t.message:()=>t.message}:null);return i.appContext=n,wh(i,e),OPe(t).appendChild(e.firstElementChild),i.component},NPe=()=>document.createElement("div"),BPe=(t,e)=>{const n=NPe();t.onVanish=()=>{wh(null,n),oy.delete(s)},t.onAction=r=>{const o=oy.get(s);let a;t.showInput?a={value:s.inputValue,action:r}:a=r,t.callback?t.callback(a,i.proxy):r==="cancel"||r==="close"?t.distinguishCancelAndClose&&r!=="cancel"?o.reject("close"):o.reject("cancel"):o.resolve(a)};const i=DPe(t,n,e),s=i.proxy;for(const r in t)fi(t,r)&&!fi(s.$props,r)&&(r==="closeIcon"&&Mn(t[r])?s[r]=Da(t[r]):s[r]=t[r]);return s.visible=!0,s};function qg(t,e=null){if(!pi)return Promise.reject();let n;return Gt(t)||Yi(t)?t={message:t}:n=t.callback,new Promise((i,s)=>{const r=BPe(t,e??qg._context);oy.set(r,{options:t,callback:n,resolve:i,reject:s})})}const FPe=["alert","confirm","prompt"],zPe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};FPe.forEach(t=>{qg[t]=UPe(t)});function UPe(t){return(e,n,i,s)=>{let r="";return Mn(n)?(i=n,r=""):ri(n)?r="":r=n,qg(Object.assign({title:r,message:e,type:"",...zPe[t]},i,{boxType:t}),s)}}qg.close=()=>{oy.forEach((t,e)=>{e.doClose()}),oy.clear()};qg._context=null;const Wd=qg;Wd.install=t=>{Wd._context=t._context,t.config.globalProperties.$msgbox=Wd,t.config.globalProperties.$messageBox=Wd,t.config.globalProperties.$alert=Wd.alert,t.config.globalProperties.$confirm=Wd.confirm,t.config.globalProperties.$prompt=Wd.prompt};const $Pe=Wd,nV=["primary","success","info","warning","error"],VPe=_t({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:Ai},id:{type:String,default:""},message:{type:Re([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:Re(Function),default:()=>{}},onClose:{type:Re(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:[...nV,""],default:""},zIndex:Number,closeIcon:{type:Ai,default:ul}}),HPe={destroy:()=>!0},WPe=["id"],GPe=["textContent"],jPe={key:0},KPe=["innerHTML"],qPe=Be({name:"ElNotification",__name:"notification",props:VPe,emits:HPe,setup(t,{expose:e}){const n=t,{ns:i,zIndex:s}=Mx("notification"),{nextZIndex:r,currentZIndex:o}=s,a=X(!1);let l;const c=F(()=>{const x=n.type;return x&&Eh[n.type]?i.m(x):""}),u=F(()=>n.type&&Eh[n.type]||n.icon),d=F(()=>n.position.endsWith("right")?"right":"left"),h=F(()=>n.position.startsWith("top")?"top":"bottom"),f=F(()=>{var x;return{[h.value]:`${n.offset}px`,zIndex:(x=n.zIndex)!=null?x:o.value}});function p(){n.duration>0&&({stop:l}=og(()=>{a.value&&b()},n.duration))}function m(){l?.()}function b(){a.value=!1}function g(x){switch(Oi(x)){case gt.delete:case gt.backspace:m();break;case gt.esc:a.value&&b();break;default:p();break}}return mn(()=>{p(),r(),a.value=!0}),xi(document,"keydown",g),e({visible:a,close:b}),(x,S)=>(z(),De(Rr,{name:v(i).b("fade"),onBeforeLeave:x.onClose,onAfterLeave:S[1]||(S[1]=_=>x.$emit("destroy")),persisted:""},{default:xe(()=>[_n(U("div",{id:x.id,class:J([v(i).b(),x.customClass,d.value]),style:Ht(f.value),role:"alert",onMouseenter:m,onMouseleave:p,onClick:S[0]||(S[0]=(..._)=>x.onClick&&x.onClick(..._))},[u.value?(z(),De(v(Ut),{key:0,class:J([v(i).e("icon"),c.value])},{default:xe(()=>[(z(),De(Sn(u.value)))]),_:1},8,["class"])):Le("v-if",!0),U("div",{class:J(v(i).e("group"))},[U("h2",{class:J(v(i).e("title")),textContent:Xe(x.title)},null,10,GPe),_n(U("div",{class:J(v(i).e("content")),style:Ht(x.title?void 0:{margin:0})},[Ue(x.$slots,"default",{},()=>[x.dangerouslyUseHTMLString?(z(),se(At,{key:1},[Le(" Caution here, message could've been compromised, never use user's input as message "),U("p",{innerHTML:x.message},null,8,KPe)],2112)):(z(),se("p",jPe,Xe(x.message),1))])],6),[[ci,x.message]]),x.showClose?(z(),De(v(Ut),{key:0,class:J(v(i).e("closeBtn")),onClick:un(b,["stop"])},{default:xe(()=>[(z(),De(Sn(x.closeIcon)))]),_:1},8,["class"])):Le("v-if",!0)],2)],46,WPe),[[ci,a.value]])]),_:3},8,["name","onBeforeLeave"]))}});var YPe=xt(qPe,[["__file","/home/runner/work/element-plus/element-plus/packages/components/notification/src/notification.vue"]]);const _g={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},w2=16;let XPe=1;const Zf=function(t={},e){if(!pi)return{close:()=>{}};(Gt(t)||Yi(t))&&(t={message:t});const n=t.position||"top-right";let i=t.offset||0;_g[n].forEach(({vm:u})=>{var d;i+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+w2}),i+=w2;const s=`notification_${XPe++}`,r=t.onClose,o={...t,offset:i,id:s,onClose:()=>{ZPe(s,n,r)}};let a=document.body;ca(t.appendTo)?a=t.appendTo:Gt(t.appendTo)&&(a=document.querySelector(t.appendTo)),ca(a)||(a=document.body);const l=document.createElement("div"),c=de(YPe,o,Kt(o.message)?o.message:Yi(o.message)?()=>o.message:null);return c.appContext=ri(e)?Zf._context:e,c.props.onDestroy=()=>{wh(null,l)},wh(c,l),_g[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};nV.forEach(t=>{Zf[t]=(e={},n)=>((Gt(e)||Yi(e))&&(e={message:e}),Zf({...e,type:t},n))});function ZPe(t,e,n){const i=_g[e],s=i.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.props.id)===t});if(s===-1)return;const{vm:r}=i[s];if(!r)return;n?.(r);const o=r.el.offsetHeight,a=e.split("-")[0];i.splice(s,1);const l=i.length;if(!(l<1))for(let c=s;c{e.component.exposed.visible.value=!1})}function QPe(t="top-right"){var e,n,i,s;let r=((i=(n=(e=_g[t][0])==null?void 0:e.vm.component)==null?void 0:n.props)==null?void 0:i.offset)||0;for(const{vm:o}of _g[t])o.component.props.offset=r,r+=(((s=o.el)==null?void 0:s.offsetHeight)||0)+w2}Zf.closeAll=JPe;Zf.updateOffsets=QPe;Zf._context=null;const eLe=q9(Zf,"$notify");var tLe=[sPe,cPe,Nu,$Pe,eLe,fU],nLe=uue([...Z4e,...tLe]);function iLe(t,e){for(var n=0;ni[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Fi=(t=>(t[t.ByColor=1]="ByColor",t[t.ByACI=2]="ByACI",t[t.ByLayer=3]="ByLayer",t[t.ByBlock=4]="ByBlock",t[t.None=0]="None",t))(Fi||{});const T5={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},_E=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0];let Dp=class{static getColorByIndex(e){return _E[e]}static getIndexByColor(e){const n=_E.length-1;for(let i=1;i>16&255:void 0}get green(){const e=this.RGB;return e!=null?e>>8&255:void 0}get blue(){const e=this.RGB;return e!=null?e&255:void 0}get RGB(){switch(this._colorMethod){case Fi.ByColor:case Fi.ByBlock:case Fi.ByLayer:return this._value;case Fi.ByACI:return this._value?Dp.getColorByIndex(this._value):this._value;default:return}}setRGB(e,n,i){const s=Math.max(0,Math.min(255,Math.round(e))),r=Math.max(0,Math.min(255,Math.round(n))),o=Math.max(0,Math.min(255,Math.round(i)));return this._value=s<<16|r<<8|o,this._colorMethod=Fi.ByColor,this}setRGBValue(e){return e==null||!Number.isFinite(e)?(console.warn("Invalid RGB value:",e),this):(this._value=e&16777215,this._colorMethod=Fi.ByColor,this)}setRGBFromCss(e){if(!e)return this;const n=e.trim().toLowerCase();if(n.startsWith("#")){let r=0,o=0,a=0;if(n.length===7)r=parseInt(n.substr(1,2),16),o=parseInt(n.substr(3,2),16),a=parseInt(n.substr(5,2),16);else if(n.length===4)r=parseInt(n[1]+n[1],16),o=parseInt(n[2]+n[2],16),a=parseInt(n[3]+n[3],16);else return console.warn("Invalid hex color:",e),this;return this.setRGB(r,o,a)}const i=n.match(/^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);if(i){const r=parseInt(i[1],10),o=parseInt(i[2],10),a=parseInt(i[3],10);return this.setRGB(r,o,a)}const s=Dp.getColorByName(e);return s!==void 0?this.setRGBValue(s):(console.warn("Unknown CSS color string:",e),this)}setScalar(e){return this.setRGB(e,e,e)}get hexColor(){const e=this.RGB;return e==null?void 0:"0x"+e.toString(16).padStart(6,"0").toUpperCase()}get cssColor(){const e=this.RGB;if(e!=null)return`rgb(${e>>16&255},${e>>8&255},${e&255})`}get colorIndex(){return this._colorMethod===Fi.ByACI?this._value:this._colorMethod===Fi.ByLayer?256:this._colorMethod===Fi.ByBlock?0:void 0}set colorIndex(e){if(e==null)return;const n=Math.max(0,Math.min(256,Math.round(e)));n===0?(this._colorMethod=Fi.ByBlock,this._value=void 0):n===256?(this._colorMethod=Fi.ByLayer,this._value=void 0):(this._colorMethod=Fi.ByACI,this._value=n)}get isByColor(){return this._colorMethod===Fi.ByColor}get isByACI(){return this._colorMethod===Fi.ByACI}get isByLayer(){return this._colorMethod===Fi.ByLayer}setByLayer(e){return this._colorMethod=Fi.ByLayer,e==null?this._value=256:this._value=e,this}get isByBlock(){return this._colorMethod===Fi.ByBlock}setByBlock(e){return this._colorMethod=Fi.ByBlock,e==null?this._value=0:this._value=e,this}get colorName(){switch(this._colorMethod){case Fi.ByLayer:return"ByLayer";case Fi.ByBlock:return"ByBlock";case Fi.ByColor:return this._value?Dp.getNameByColor(this._value):"";case Fi.ByACI:return this._value?Dp.getNameByIndex(this._value):"";default:return}}set colorName(e){if(!e)return;const n=Dp.getColorByName(e);n!==void 0?(this._value=n,this._colorMethod=Fi.ByColor):console.warn("Unknown color name:",e)}clone(){const e=new lf;return e._colorMethod=this._colorMethod,e._value=this._value,e}copy(e){return this._colorMethod=e._colorMethod,this._value=e._value,this}equals(e){return this._colorMethod===e._colorMethod&&this._value===e._value}toString(){switch(this._colorMethod){case Fi.ByLayer:return"ByLayer";case Fi.ByBlock:return"ByBlock";case Fi.ByACI:return this._value!==void 0?String(this._value):"";case Fi.ByColor:return this._value?`${this.red},${this.green},${this.blue}`:"";default:return""}}static fromString(e){if(!e)return;const n=e.trim();if(/^bylayer$/i.test(n))return new lf(Fi.ByLayer);if(/^byblock$/i.test(n))return new lf(Fi.ByBlock);if(/^\d{1,3},\d{1,3},\d{1,3}$/i.test(n)){const[s,r,o]=n.split(",").map(Number),a=new lf(Fi.ByColor);return a.setRGB(s,r,o),a}if(/^\d+$/.test(n)){const s=parseInt(n,10);return new lf(Fi.ByACI,s)}const i=Dp.getColorByName(n);if(i!=null)return new lf(Fi.ByColor,i);console.warn("Unknown color name:",e)}};const ll={get ILLEGAL_PARAMETERS(){return new ReferenceError("Illegal Parameters")}};let Qi=class{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(n=>n!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...n){for(const i of this.listeners)i.call(null,e,...n)}};function fb(t){return t===null||typeof t!="object"?t:Array.isArray(t)?[...t]:{...t}}function x2(t){if(t===null||typeof t!="object")return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(Array.isArray(t))return t.map(x2);const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=x2(t[n]));return e}function u1(t,...e){for(const n of e)if(n)for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&t[i]===void 0&&(t[i]=n[i]);return t}function sLe(t,e){return t!=null&&Object.prototype.hasOwnProperty.call(t,e)}function rLe(t){return t==null?!0:Array.isArray(t)||typeof t=="string"?t.length===0:t instanceof Map||t instanceof Set?t.size===0:typeof t=="object"?Object.keys(t).length===0:!1}function y0(t,e){if(t===e)return!0;if(t==null||e==null)return t===e;if(typeof t!=typeof e)return!1;if(typeof t!="object")return t===e;if(Array.isArray(t)!==Array.isArray(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;for(let s=0;s=0&&R<=g.levels.SILENT)return R;throw new TypeError("log.setLevel() called with invalid level: "+B)}g.name=m,g.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},g.methodFactory=b||h,g.getLevel=function(){return _??S??x},g.setLevel=function(B,R){return _=P(B),R!==!1&&T(_),u.call(g)},g.setDefaultLevel=function(B){S=P(B),A()||g.setLevel(B,!1)},g.resetLevel=function(){_=null,I(),u.call(g)},g.enableAll=function(B){g.setLevel(g.levels.TRACE,B)},g.disableAll=function(B){g.setLevel(g.levels.SILENT,B)},g.rebuild=function(){if(o!==g&&(x=P(o.getLevel())),u.call(g),o===g)for(var B in r)r[B].rebuild()},x=P(o?o.getLevel():"WARN");var k=A();k!=null&&(_=P(k)),u.call(g)}o=new f,o.getLogger=function(m){if(typeof m!="symbol"&&typeof m!="string"||m==="")throw new TypeError("You must supply a name when creating a logger.");var b=r[m];return b||(b=r[m]=new f(m,o.methodFactory)),b};var p=typeof window!==n?window.log:void 0;return o.noConflict=function(){return typeof window!==n&&window.log===o&&(window.log=p),o},o.getLoggers=function(){return r},o.default=o,o})})(iV);var sV=iV.exports;const lLe=aLe(sV),cLe=iLe({__proto__:null,default:lLe},[sV]),uLe=cLe;uLe.setLevel("debug");let dLe=class rV{constructor(e,n){this.events={attrChanged:new Qi,modelChanged:new Qi},this._changing=!1,this._previousAttributes={},this._pending=!1;const i=e||{};n&&u1(i,n),this.attributes=i,this.changed={}}get(e){return this.attributes[e]}set(e,n,i){if(e==null)return this;let s;typeof e=="object"?(s=e,i=n):(s={},s[e]=n),i||(i={});const r=i.unset,o=i.silent,a=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=fb(this.attributes),this.changed={});const c=this.attributes,u=this.changed,d=this._previousAttributes;for(const h in s)n=s[h],y0(c[h],n)||a.push(h),y0(d[h],n)?delete u[h]:u[h]=n,r?delete c[h]:c[h]=n;if(!o){a.length&&(this._pending=i);for(let h=0;h(t[t.ByLayer=0]="ByLayer",t[t.ByBlock=1]="ByBlock",t[t.ByAlpha=2]="ByAlpha",t[t.ErrorValue=3]="ErrorValue",t))(aa||{});let Jf=class wc{constructor(e){e!==void 0?(this._method=aa.ByAlpha,this._alpha=wc.clampAlpha(e)):(this._method=aa.ByLayer,this._alpha=255)}get method(){return this._method}set method(e){this._method=e}get alpha(){return this._alpha}set alpha(e){this._alpha=wc.clampAlpha(e),this._method=aa.ByAlpha}get percentage(){if(this._method===aa.ByAlpha)return Math.round((1-this._alpha/255)*100)}set percentage(e){const n=Math.max(0,Math.min(100,e)),i=Math.round(255*(1-n/100));this.alpha=i}static clampAlpha(e){return Math.max(0,Math.min(255,Math.floor(e)))}get isByAlpha(){return this._method===aa.ByAlpha}get isByBlock(){return this._method===aa.ByBlock}get isByLayer(){return this._method===aa.ByLayer}get isClear(){return this.isByAlpha&&this._alpha===0}get isSolid(){return this.isByAlpha&&this._alpha===255}get isInvalid(){return this._method===aa.ErrorValue}serialize(){return this._method<<24|this._alpha}clone(){const e=new wc;return e._method=this._method,e._alpha=this._alpha,e}equals(e){return this._method===e._method&&this._alpha===e._alpha}toString(){return this.isByLayer?"ByLayer":this.isByBlock?"ByBlock":this._alpha.toString()}static fromString(e){const n=e.trim();if(/^bylayer$/i.test(n)){const r=new wc;return r._method=aa.ByLayer,r}if(/^byblock$/i.test(n)){const r=new wc;return r._method=aa.ByBlock,r}const i=Number(n);if(Number.isInteger(i)&&i>=0&&i<=255)return new wc(i);const s=new wc;return s._method=aa.ErrorValue,s}static deserialize(e){const n=e>>>24&255,i=e&255,s=Object.values(aa)[n]??aa.ErrorValue,r=new wc;return r._method=s,r._alpha=wc.clampAlpha(i),r}};class hLe{constructor(e){this.name=e}run(e){throw new Error("run() must be implemented by subclass")}}let fLe=class{constructor(){this.tasks=[],this.onProgress=()=>{},this.onComplete=()=>{},this.onError=()=>!1}scheduleTask(t){return new Promise((e,n)=>{const i=()=>{Promise.resolve(t()).then(e).catch(n)};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(i):setTimeout(i,0)})}addTask(t){this.tasks.push(t)}setProgressCallback(t){this.onProgress=t}setCompleteCallback(t){this.onComplete=t}setErrorCallback(t){this.onError=t}async run(t){const e=this.tasks.length;let n=t;for(let i=0;i{const r=await s.run(n);return this.onProgress((i+1)/e,s),r})}catch(r){if(this.onError({error:r,taskIndex:i,task:s}))break}}this.onComplete(n)}},P4=class{constructor(e,n,i){this._chunkSize=-1,this._minimumChunkSize=50,this._count=e,this._numerOfChunk=n<1?1:n,this._minimumChunkSize=i,this.calculateChunkSize()}get count(){return this._count}get numerOfChunk(){return this._numerOfChunk}get minimumChunkSize(){return this._minimumChunkSize}set minimumChunkSize(e){this._minimumChunkSize=e,this.calculateChunkSize()}get chunkSize(){return this._chunkSize}calculateChunkSize(){let e=this._count/this._numerOfChunk;e{const s=()=>{Promise.resolve(e()).then(n).catch(i)};typeof window<"u"&&typeof window.requestAnimationFrame=="function"?window.requestAnimationFrame(s):setTimeout(s,0)})}async processChunk(e){let n=0;const i=async()=>{const s=n,r=Math.min(n+this._chunkSize,this._count);await e(s,r),n=r,n(t[t.DecimalDegrees=0]="DecimalDegrees",t[t.DegreesMinutesSeconds=1]="DegreesMinutesSeconds",t[t.Gradians=2]="Gradians",t[t.Radians=3]="Radians",t[t.SurveyorsUnits=4]="SurveyorsUnits",t))(oV||{});let L4=class aV{static get instance(){return this._instance||(this._instance=new aV),this._instance}constructor(){this._blocks=new Map}createKey(e,n){return`${e}_${n}`}set(e,n){return n=n.fastDeepClone(),this._blocks.set(e,n),n}get(e){let n=this._blocks.get(e);return n&&(n=n.fastDeepClone()),n}has(e){return this._blocks.has(e)}clear(){this._blocks.clear()}draw(e,n,i,s=!0,r){var o;const a=[];if(n!=null){const l=this.createKey(n.name,i);let c;if(this.has(l))c=this.get(l);else{const u=(o=e.basePoint)==null?void 0:o.clone();e.basePoint=void 0;const d=n.newIterator();let h=!0;for(const f of d)if(f.color.isByBlock&&i?(M5.copy(f.color),f.color.setRGBValue(i),this.addEntity(f,a,e),f.color.copy(M5)):this.addEntity(f,a,e),h){const p=a[0];e.basePoint=p.basePoint,h=!1}c=e.group(a),c&&s&&mo.name&&!mo.name.startsWith("*U")&&this.set(l,c),e.basePoint=u}return c&&r&&c.applyMatrix(r),c}else return e.group(a)}addEntity(e,n,i){const s=e.worldDraw(i);s&&(this.attachEntityInfo(s,e),n.push(s))}attachEntityInfo(e,n){e.objectId=n.objectId,e.ownerId=n.ownerId,e.layerName=n.layer,e.visible=n.visibility}};const M5=new Er;var lV=(t=>(t[t.UTF8=0]="UTF8",t[t.US_ASCII=1]="US_ASCII",t[t.ISO_8859_1=2]="ISO_8859_1",t[t.ISO_8859_2=3]="ISO_8859_2",t[t.ISO_8859_3=4]="ISO_8859_3",t[t.ISO_8859_4=5]="ISO_8859_4",t[t.ISO_8859_5=6]="ISO_8859_5",t[t.ISO_8859_6=7]="ISO_8859_6",t[t.ISO_8859_7=8]="ISO_8859_7",t[t.ISO_8859_8=9]="ISO_8859_8",t[t.ISO_8859_9=10]="ISO_8859_9",t[t.CP437=11]="CP437",t[t.CP850=12]="CP850",t[t.CP852=13]="CP852",t[t.CP855=14]="CP855",t[t.CP857=15]="CP857",t[t.CP860=16]="CP860",t[t.CP861=17]="CP861",t[t.CP863=18]="CP863",t[t.CP864=19]="CP864",t[t.CP865=20]="CP865",t[t.CP869=21]="CP869",t[t.CP932=22]="CP932",t[t.MACINTOSH=23]="MACINTOSH",t[t.BIG5=24]="BIG5",t[t.CP949=25]="CP949",t[t.JOHAB=26]="JOHAB",t[t.CP866=27]="CP866",t[t.ANSI_1250=28]="ANSI_1250",t[t.ANSI_1251=29]="ANSI_1251",t[t.ANSI_1252=30]="ANSI_1252",t[t.GB2312=31]="GB2312",t[t.ANSI_1253=32]="ANSI_1253",t[t.ANSI_1254=33]="ANSI_1254",t[t.ANSI_1255=34]="ANSI_1255",t[t.ANSI_1256=35]="ANSI_1256",t[t.ANSI_1257=36]="ANSI_1257",t[t.ANSI_874=37]="ANSI_874",t[t.ANSI_932=38]="ANSI_932",t[t.ANSI_936=39]="ANSI_936",t[t.ANSI_949=40]="ANSI_949",t[t.ANSI_950=41]="ANSI_950",t[t.ANSI_1361=42]="ANSI_1361",t[t.UTF16=43]="UTF16",t[t.ANSI_1258=44]="ANSI_1258",t[t.UNDEFINED=255]="UNDEFINED",t))(lV||{});const pLe=["utf-8","utf-8","iso-8859-1","iso-8859-2","iso-8859-3","iso-8859-4","iso-8859-5","iso-8859-6","iso-8859-7","iso-8859-8","iso-8859-9","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","utf-8","shift-jis","macintosh","big5","utf-8","utf-8","ibm866","windows-1250","windows-1251","windows-1252","gbk","windows-1253","windows-1254","windows-1255","windows-1256","windows-1257","windows-874","shift-jis","gbk","euc-kr","big5","utf-8","utf-16le","windows-1258"],mLe=t=>pLe[t],TM="Continuous",wE="ByLayer",gLe="ByBlock",ro=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let A5=1234567;const cV=Math.PI/180,uV=180/Math.PI;function vLe(){const t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0,i=Math.random()*4294967295|0;return(ro[t&255]+ro[t>>8&255]+ro[t>>16&255]+ro[t>>24&255]+"-"+ro[e&255]+ro[e>>8&255]+"-"+ro[e>>16&15|64]+ro[e>>24&255]+"-"+ro[n&63|128]+ro[n>>8&255]+"-"+ro[n>>16&255]+ro[n>>24&255]+ro[i&255]+ro[i>>8&255]+ro[i>>16&255]+ro[i>>24&255]).toLowerCase()}function Xd(t,e,n){return Math.max(e,Math.min(n,t))}function dV(t,e){return(t%e+e)%e}function yLe(t,e,n,i,s){return i+(t-e)*(s-i)/(n-e)}function bLe(t,e,n){return t!==e?(n-t)/(e-t):0}function hV(t,e,n){return(1-n)*t+n*e}function _Le(t,e,n,i){return hV(t,e,1-Math.exp(-n*i))}function wLe(t,e=1){return e-Math.abs(dV(t,e*2)-e)}function xLe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function SLe(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function ELe(t,e){return t+Math.floor(Math.random()*(e-t+1))}function CLe(t,e){return t+Math.random()*(e-t)}function TLe(t){return t*(.5-Math.random())}function MLe(t){t!==void 0&&(A5=t);let e=A5+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function ALe(t){return t*cV}function kLe(t){return t*uV}function PLe(t){return(t&t-1)===0&&t!==0}function LLe(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function ILe(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function hw(t){const e=Math.PI*2;return(t%e+e)%e}function RLe(t,e,n){return t>e&&tn&&tn?t<=e&&t>=n:t<=e||t>=n:e=e&&t<=n:t>=e||t<=n}function fV(t){return t=Math.abs(t),t<1?0:Math.ceil(Math.log10(Math.abs(t)+1))}function DLe(t,e=1e-7){const n=fV(t);return Math.max(Math.pow(10,n)*e,e)}const Ui={DEG2RAD:cV,RAD2DEG:uV,generateUUID:vLe,clamp:Xd,euclideanModulo:dV,mapLinear:yLe,inverseLerp:bLe,lerp:hV,damp:_Le,pingpong:wLe,smoothstep:xLe,smootherstep:SLe,randInt:ELe,randFloat:CLe,randFloatSpread:TLe,seededRandom:MLe,degToRad:ALe,radToDeg:kLe,isPowerOfTwo:PLe,ceilPowerOfTwo:LLe,floorPowerOfTwo:ILe,normalizeAngle:hw,isBetween:RLe,isBetweenAngle:OLe,intPartLength:fV,relativeEps:DLe},MM=class pV{constructor(e,n){this.x=0,this.y=0;const i=+(e!==void 0)+ +(n!==void 0);if(i!==0){if(i===1&&e instanceof Array){this.x=e[0],this.y=e[1];return}if(i===1){const{x:s,y:r}=e;this.x=s,this.y=r;return}if(i===2){this.x=e,this.y=n;return}throw ll.ILLEGAL_PARAMETERS}}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new pV(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix2d(e){const n=this.x,i=this.y,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6],this.y=s[1]*n+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Math.max(-1,Math.min(1,i)))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}rotateAround(e,n){const i=Math.cos(n),s=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}relativeEps(e=1e-7){return Math.min(Ui.relativeEps(this.x,e),Ui.relativeEps(this.y,e))}*[Symbol.iterator](){yield this.x,yield this.y}};MM.EMPTY=Object.freeze(new MM(0,0));let $s=MM;const AM=class mV{constructor(e,n,i,s,r,o,a,l,c){this.elements=[1,0,0,0,1,0,0,0,1],e!=null&&n!=null&&i!=null&&s!=null&&r!=null&&o!=null&&a!=null&&l!=null&&c!=null&&this.set(e,n,i,s,r,o,a,l,c)}set(e,n,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=n,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],d=i[7],h=i[2],f=i[5],p=i[8],m=s[0],b=s[3],g=s[6],x=s[1],S=s[4],_=s[7],E=s[2],T=s[5],A=s[8];return r[0]=o*m+a*x+l*E,r[3]=o*b+a*S+l*T,r[6]=o*g+a*_+l*A,r[1]=c*m+u*x+d*E,r[4]=c*b+u*S+d*T,r[7]=c*g+u*_+d*A,r[2]=h*m+f*x+p*E,r[5]=h*b+f*S+p*T,r[8]=h*g+f*_+p*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*o-a*c,h=a*l-u*r,f=c*r-o*l,p=n*d+i*h+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return e[0]=d*m,e[1]=(s*c-u*i)*m,e[2]=(a*i-s*o)*m,e[3]=h*m,e[4]=(u*n-s*l)*m,e[5]=(s*r-a*n)*m,e[6]=f*m,e[7]=(i*l-c*n)*m,e[8]=(o*n-i*r)*m,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e.elements[0]=n[0],e.elements[1]=n[3],e.elements[2]=n[6],e.elements[3]=n[1],e.elements[4]=n[4],e.elements[5]=n[7],e.elements[6]=n[2],e.elements[7]=n[5],e.elements[8]=n[8],this}setUvTransform(e,n,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(xE.makeScale(e,n)),this}rotate(e){return this.premultiply(xE.makeRotation(-e)),this}translate(e,n){return this.premultiply(xE.makeTranslation(e,n)),this}makeTranslation(e,n){return e instanceof $s?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<9;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new mV().fromArray(this.elements)}};AM.IDENTITY=Object.freeze(new AM);let I4=AM;const xE=new I4,Np=1e-6,Xs=2*Math.PI,gV={x:0,y:0,z:0};let vV=class{constructor(){this.equalPointTol=Np,this.equalVectorTol=Np}equalPoint2d(e,n){return new $s(e).sub(n).length()-n}static equal(e,n,i=Np){return Math.abs(e-n)i}static less(e,n,i=Np){return e-ns!=h>s;n&&(f=u>=s!=h>=s),f&&i<(d-c)*(s-u)/(h-u)+c&&(r=!r)}return r}function NLe(t,e){if(t.length===0||e.length===0)return!1;const n=new ar().setFromPoints(t),i=new ar().setFromPoints(e);if(!n.intersectsBox(i))return!1;for(let s=0;s=i[t]&&n1e-10?(n-i[t])/s:0,a=r>1e-10?(i[t+e+1]-n)/r:0;return o*kM(t,e-1,n,i)+a*kM(t+1,e-1,n,i)}function fw(t,e,n,i,s){const r=i.length-1,o=e;if(t=Math.max(n[o],Math.min(n[r+1],t)),Math.abs(t-n[r+1])<1e-8)return[...i[r]];if(Math.abs(t-n[o])<1e-8)return[...i[0]];const a=[0,0,0];let l=0;for(let c=0;c<=r;c++){const u=kM(c,o,t,n),d=s[c]*u;a[0]+=i[c][0]*d,a[1]+=i[c][1]*d,a[2]+=i[c][2]*d,l+=d}if(l<1e-10){const c=n[n.length-o-1];if(Math.abs(t-c)<1e-8)return[...i[r]];if(Math.abs(t-n[o])<1e-8)return[...i[0]]}return l>1e-10&&(a[0]/=l,a[1]/=l,a[2]/=l),a}function ULe(t,e,n,i){const s=t,r=e[s],o=e[e.length-s-1];let a=0;const l=1e3,c=(o-r)/l;let u=fw(r,t,e,n,i);for(let m=1;m<=l;m++){const b=r+m*c,g=fw(b,t,e,n,i),x=g[0]-u[0],S=g[1]-u[1],_=g[2]-u[2];a+=Math.sqrt(x*x+S*S+_*_),u=g}const d=fw(o,t,e,n,i),h=d[0]-u[0],f=d[1]-u[1],p=d[2]-u[2];return a+=Math.sqrt(h*h+f*f+p*p),a}let ay=class wV{constructor(e=0,n=0,i=0,s=1){this._x=e,this._y=n,this._z=i,this._w=s}static slerpFlat(e,n,i,s,r,o,a){let l=i[s+0],c=i[s+1],u=i[s+2],d=i[s+3];const h=r[o+0],f=r[o+1],p=r[o+2],m=r[o+3];if(a===0){e[n+0]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d;return}if(a===1){e[n+0]=h,e[n+1]=f,e[n+2]=p,e[n+3]=m;return}if(d!==m||l!==h||c!==f||u!==p){let b=1-a;const g=l*h+c*f+u*p+d*m,x=g>=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const E=Math.sqrt(S),T=Math.atan2(E,g*x);b=Math.sin(b*T)/E,a=Math.sin(a*T)/E}const _=a*x;if(l=l*b+h*_,c=c*b+f*_,u=u*b+p*_,d=d*b+m*_,b===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],d=r[o],h=r[o+1],f=r[o+2],p=r[o+3];return e[n]=a*p+u*d+l*f-c*h,e[n+1]=l*p+u*h+c*d-a*f,e[n+2]=c*p+u*f+a*h-l*d,e[n+3]=u*p-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,s){return this._x=e,this._y=n,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new wV(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const i=e.x,s=e.y,r=e.z,o=e.order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),d=a(r/2),h=l(i/2),f=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"YXZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"ZXY":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"ZYX":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"YZX":this._x=h*u*d+c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d-h*f*p;break;case"XZY":this._x=h*u*d-c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d+h*f*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],s=n[4],r=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=i+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(r-c)*f,this._z=(o-s)*f}else if(i>a&&i>d){const f=2*Math.sqrt(1+i-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(s+o)/f,this._z=(r+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-i-d);this._w=(r-c)/f,this._x=(s+o)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-i-a);this._w=(o-s)/f,this._x=(r+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(Xd(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,n/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,s=e._y,r=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*o+n*this._w,this._x=f*i+n*this._x,this._y=f*s+n*this._y,this._z=f*r+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*d+this._w*h,this._x=i*d+this._x*h,this._y=s*d+this._y*h,this._z=r*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(n),r*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}};const Do=class xV{constructor(e,n,i){this.x=0,this.y=0,this.z=0;const s=+(e!==void 0)+ +(n!==void 0)+ +(i!==void 0);if(s!==0){if(s===1&&e instanceof Array){this.x=e[0],this.y=e[1],this.z=e[2];return}if(s===1){const{x:r,y:o,z:a}=e;this.x=r,this.y=o,this.z=a||0;return}if(s===3){this.x=e,this.y=n,this.z=i;return}throw ll.ILLEGAL_PARAMETERS}}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new xV(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z||0,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z||0,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(k5.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(k5.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6]*s,this.y=r[1]*n+r[4]*i+r[7]*s,this.z=r[2]*n+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*n+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*n+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*n+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*n+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*n-r*s),d=2*(r*i-o*n);return this.x=n+l*c+o*d-a*u,this.y=i+l*u+a*c-r*d,this.z=s+l*d+r*u-o*c,this}transformDirection(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[4]*i+r[8]*s,this.y=r[1]*n+r[5]*i+r[9]*s,this.z=r[2]*n+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=Math.max(e.x,Math.min(n.x,this.x)),this.y=Math.max(e.y,Math.min(n.y,this.y)),this.z=Math.max(e.z,Math.min(n.z,this.z)),this}clampScalar(e,n){return this.x=Math.max(e,Math.min(n,this.x)),this.y=Math.max(e,Math.min(n,this.y)),this.z=Math.max(e,Math.min(n,this.z)),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(n,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}isParallelTo(e){const n=this.dot(e),i=this.length(),s=e.length();return Math.abs(n)===i*s}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,s=e.y,r=e.z,o=n.x,a=n.y,l=n.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return SE.copy(this).projectOnVector(e),this.sub(SE)}reflect(e){return this.sub(SE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos(Math.max(-1,Math.min(1,i)))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return n*n+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=s,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(e),this.y=n,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};Do.ORIGIN=Object.freeze(new Do(0,0,0)),Do.X_AXIS=Object.freeze(new Do(1,0,0)),Do.NEGATIVE_X_AXIS=Object.freeze(new Do(-1,0,0)),Do.Y_AXIS=Object.freeze(new Do(0,1,0)),Do.NEGATIVE_Y_AXIS=Object.freeze(new Do(0,-1,0)),Do.Z_AXIS=Object.freeze(new Do(0,0,1)),Do.NEGATIVE_Z_AXIS=Object.freeze(new Do(0,0,-1));let pn=Do;const SE=new pn,k5=new ay,PM=class SV{constructor(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!=null&&n!=null&&i!=null&&s!=null&&r!=null&&o!=null&&a!=null&&l!=null&&c!=null&&u!=null&&d!=null&&h!=null&&f!=null&&p!=null&&m!=null&&b!=null&&this.set(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b)}set(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=d,g[14]=h,g[3]=f,g[7]=p,g[11]=m,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new SV().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}setFromExtrusionDirection(e){if(yV.equalPoint3d(e,pn.Z_AXIS))this.identity();else{const n=new pn(1,0,0);Math.abs(e.x)<1/64&&Math.abs(e.y)<1/64?n.crossVectors(pn.Y_AXIS,e).normalize():n.crossVectors(pn.Z_AXIS,e).normalize();const i=e.clone().cross(n).normalize();this.set(n.x,n.y,n.z,0,i.x,i.y,i.z,0,e.x,e.y,e.z,0,0,0,0,1)}return this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,s=1/Bp.setFromMatrixColumn(e,0).length(),r=1/Bp.setFromMatrixColumn(e,1).length(),o=1/Bp.setFromMatrixColumn(e,2).length();return n[0]=i[0]*s,n[1]=i[1]*s,n[2]=i[2]*s,n[3]=0,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose($Le,e,VLe)}lookAt(e,n,i){const s=this.elements;return Sa.subVectors(e,n),Sa.lengthSq()===0&&(Sa.z=1),Sa.normalize(),xd.crossVectors(i,Sa),xd.lengthSq()===0&&(Math.abs(i.z)===1?Sa.x+=1e-4:Sa.z+=1e-4,Sa.normalize(),xd.crossVectors(i,Sa)),xd.normalize(),pb.crossVectors(Sa,xd),s[0]=xd.x,s[4]=pb.x,s[8]=Sa.x,s[1]=xd.y,s[5]=pb.y,s[9]=Sa.y,s[2]=xd.z,s[6]=pb.z,s[10]=Sa.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],d=i[5],h=i[9],f=i[13],p=i[2],m=i[6],b=i[10],g=i[14],x=i[3],S=i[7],_=i[11],E=i[15],T=s[0],A=s[4],I=s[8],P=s[12],k=s[1],B=s[5],R=s[9],H=s[13],q=s[2],oe=s[6],Z=s[10],V=s[14],D=s[3],K=s[7],W=s[11],Q=s[15];return r[0]=o*T+a*k+l*q+c*D,r[4]=o*A+a*B+l*oe+c*K,r[8]=o*I+a*R+l*Z+c*W,r[12]=o*P+a*H+l*V+c*Q,r[1]=u*T+d*k+h*q+f*D,r[5]=u*A+d*B+h*oe+f*K,r[9]=u*I+d*R+h*Z+f*W,r[13]=u*P+d*H+h*V+f*Q,r[2]=p*T+m*k+b*q+g*D,r[6]=p*A+m*B+b*oe+g*K,r[10]=p*I+m*R+b*Z+g*W,r[14]=p*P+m*H+b*V+g*Q,r[3]=x*T+S*k+_*q+E*D,r[7]=x*A+S*B+_*oe+E*K,r[11]=x*I+S*R+_*Z+E*W,r[15]=x*P+S*H+_*V+E*Q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],p=e[3],m=e[7],b=e[11],g=e[15];return p*(+r*l*d-s*c*d-r*a*h+i*c*h+s*a*f-i*l*f)+m*(+n*l*f-n*c*h+r*o*h-s*o*f+s*c*u-r*l*u)+b*(+n*c*d-n*a*f-r*o*d+i*o*f+r*a*u-i*c*u)+g*(-s*a*u-n*l*d+n*a*h+s*o*d-i*o*h+i*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const s=this.elements;return e instanceof pn?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=n,s[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],b=e[14],g=e[15],x=d*b*c-m*h*c+m*l*f-a*b*f-d*l*g+a*h*g,S=p*h*c-u*b*c-p*l*f+o*b*f+u*l*g-o*h*g,_=u*m*c-p*d*c+p*a*f-o*m*f-u*a*g+o*d*g,E=p*d*l-u*m*l-p*a*h+o*m*h+u*a*b-o*d*b,T=n*x+i*S+s*_+r*E;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/T;return e[0]=x*A,e[1]=(m*h*r-d*b*r-m*s*f+i*b*f+d*s*g-i*h*g)*A,e[2]=(a*b*r-m*l*r+m*s*c-i*b*c-a*s*g+i*l*g)*A,e[3]=(d*l*r-a*h*r-d*s*c+i*h*c+a*s*f-i*l*f)*A,e[4]=S*A,e[5]=(u*b*r-p*h*r+p*s*f-n*b*f-u*s*g+n*h*g)*A,e[6]=(p*l*r-o*b*r-p*s*c+n*b*c+o*s*g-n*l*g)*A,e[7]=(o*h*r-u*l*r+u*s*c-n*h*c-o*s*f+n*l*f)*A,e[8]=_*A,e[9]=(p*d*r-u*m*r-p*i*f+n*m*f+u*i*g-n*d*g)*A,e[10]=(o*m*r-p*a*r+p*i*c-n*m*c-o*i*g+n*a*g)*A,e[11]=(u*a*r-o*d*r-u*i*c+n*d*c+o*i*f-n*a*f)*A,e[12]=E*A,e[13]=(u*m*s-p*d*s+p*i*h-n*m*h-u*i*b+n*d*b)*A,e[14]=(p*a*s-o*m*s-p*i*l+n*m*l+o*i*b-n*a*b)*A,e[15]=(o*d*s-u*a*s+u*i*l-n*d*l-o*i*h+n*a*h)*A,this}scale(e){const n=this.elements,i=e.x,s=e.y,r=e.z;return n[0]*=i,n[4]*=s,n[8]*=r,n[1]*=i,n[5]*=s,n[9]*=r,n[2]*=i,n[6]*=s,n[10]*=r,n[3]*=i,n[7]*=s,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,s))}makeTranslation(e,n,i){return e instanceof pn?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),s=Math.sin(n),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,n,s,1,0,0,0,0,1),this}compose(e,n,i){const s=this.elements,r=n.x,o=n.y,a=n.z,l=n.w,c=r+r,u=o+o,d=a+a,h=r*c,f=r*u,p=r*d,m=o*u,b=o*d,g=a*d,x=l*c,S=l*u,_=l*d,E=i.x,T=i.y,A=i.z;return s[0]=(1-(m+g))*E,s[1]=(f+_)*E,s[2]=(p-S)*E,s[3]=0,s[4]=(f-_)*T,s[5]=(1-(h+g))*T,s[6]=(b+x)*T,s[7]=0,s[8]=(p+S)*A,s[9]=(b-x)*A,s[10]=(1-(h+m))*A,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,n,i){const s=this.elements;let r=Bp.set(s[0],s[1],s[2]).length();const o=Bp.set(s[4],s[5],s[6]).length(),a=Bp.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],_l.copy(this);const l=1/r,c=1/o,u=1/a;return _l.elements[0]*=l,_l.elements[1]*=l,_l.elements[2]*=l,_l.elements[4]*=c,_l.elements[5]*=c,_l.elements[6]*=c,_l.elements[8]*=u,_l.elements[9]*=u,_l.elements[10]*=u,n.setFromRotationMatrix(_l),i.x=r,i.y=o,i.z=a,this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<16;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}};PM.IDENTITY=Object.freeze(new PM);let Vo=PM;const Bp=new pn,_l=new Vo,$Le=new pn(0,0,0),VLe=new pn(1,1,1),xd=new pn,pb=new pn,Sa=new pn;let Zi=class EV{constructor(e=void 0,n=void 0){this.min=e==null?new pn(1/0,1/0,1/0):new pn(e.x,e.y,e.z),this.max=n==null?new pn(-1/0,-1/0,-1/0):new pn(n.x,n.y,n.z)}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;nthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,EE).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(fu[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),fu[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),fu[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),fu[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),fu[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),fu[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),fu[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),fu[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(fu),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};const fu=[new pn,new pn,new pn,new pn,new pn,new pn,new pn,new pn],EE=new pn,P5=new $s;let ar=class CV{constructor(e=void 0,n=void 0){this.min=e==null?new $s(1/0,1/0):new $s(e.x,e.y),this.max=n==null?new $s(-1/0,-1/0):new $s(n.x,n.y)}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromPoints(e){this.makeEmpty();for(let n=0,i=e.length;nthis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,P5).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}};const L5=new pn,HLe=new pn,WLe=new I4;let TV=class MV{constructor(e=new pn(1,0,0),n=0){this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,s){return this.normal.set(e,n,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const s=L5.subVectors(i,n).cross(HLe.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectsBox(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||WLe.getNormalMatrix(e),s=this.coplanarPoint(L5).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new MV().copy(this)}},Si=class extends $s{static pointArrayToNumberArray(e){const n=new Array(e.length*2);return e.forEach((i,s)=>{i.toArray(n,s*2)}),n}},Yt=class extends pn{static pointArrayToNumberArray(e,n=!0){const i=n?3:2,s=new Array(e.length*i);return e.forEach((r,o)=>{r.toArray(s,o*i)}),s}};const I5=new Vo,R5=new ay,AV=class LM{constructor(e=0,n=0,i=0,s=LM.DEFAULT_ORDER){this._x=e,this._y=n,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,s=this._order){return this._x=e,this._y=n,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new LM(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],d=s[2],h=s[6],f=s[10];switch(n){case"XYZ":this._y=Math.asin(Xd(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Xd(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,r),this._z=0);break;case"ZXY":this._x=Math.asin(Xd(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-Xd(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin(Xd(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,r)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Xd(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i=!0){return I5.makeRotationFromQuaternion(e),this.setFromRotationMatrix(I5,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return R5.setFromEuler(this),this.setFromQuaternion(R5,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}};AV.DEFAULT_ORDER="XYZ";let GLe=AV,kV=class{constructor(){this._boundingBoxNeedsUpdate=!1}get boundingBoxNeedUpdate(){return this._boundingBoxNeedsUpdate}},PV=class extends kV{translate(e){return this.transform(new I4().makeTranslation(e.x,e.y))}get box(){return(this._box==null||this._boundingBoxNeedsUpdate)&&(this._box=this.calculateBoundingBox(),this._boundingBoxNeedsUpdate=!1),this._box}},R4=class extends PV{constructor(){super(),this._loops=[]}add(e){this._loops.push(e),this._boundingBoxNeedsUpdate=!0}get loops(){return this._loops}get outter(){if(this._loops.length>0)return this._loops[0]}calculateBoundingBox(){const e=this.outter;return e?e.box:new ar}transform(e){return this._boundingBoxNeedsUpdate=!0,this}getPoints(e){const n=[];for(let i=0;i{n.push(new ar().setFromPoints(i))}),n}sortBoundaryBoxesByAreas(e){const n=[];e.forEach((s,r)=>{const o=s.size,a=o.width*o.height;n.push({area:a,index:r})}),n.sort((s,r)=>s.area-r.area);const i=[];return n.forEach(s=>{i.push(s.index)}),i}},d1=class extends PV{constructor(){super(),this.arcLengthDivisions=100}get startPoint(){return this.getPoint(0)}get endPoint(){return this.getPoint(1)}get length(){return this.getLength()}getPoint(e){throw new Error("AcGeCurve2d: .getPoint() not implemented.")}getPointAt(e){const n=this.getUtoTmapping(e);return this.getPoint(n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){const n=[];let i,s=this.getPoint(0),r=0;n.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),r+=i.distanceTo(s),n.push(r),s=i;return n}getUtoTmapping(e,n){const i=this.getLengths();let s=0;const r=i.length;let o;n?o=n:o=e*i[r-1];let a=0,l=r-1,c;for(;a<=l;)if(s=Math.floor(a+(l-a)/2),c=i[s]-o,c<0)a=s+1;else if(c>0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],d=i[s+1]-u,h=(o-u)/d;return(s+h)/(r-1)}getTangent(e){let n=e-1e-4,i=e+1e-4;n<0&&(n=0),i>1&&(i=1);const s=this.getPoint(n),r=this.getPoint(i),o=new Si;return o.copy(r).sub(s).normalize(),o}getTangentAt(e){const n=this.getUtoTmapping(e);return this.getTangent(n)}},S2=class LV extends d1{constructor(e,n,i,s,r){super();const o=+(e!==void 0)+ +(n!==void 0)+ +(i!==void 0)+ +(s!==void 0)+ +(r!==void 0);if(o==3)typeof e=="object"&&typeof n=="object"&&typeof i=="object"?this.createByThreePoints(e,n,i):this.createByStartEndPointsAndBulge(e,n,i);else if(o==5){const a=e;this.center=new Si(a.x,a.y),this.radius=n,this._clockwise=r,this._startAngle=this._clockwise?this._mirrorAngle(Ui.normalizeAngle(i)):Ui.normalizeAngle(i),this._endAngle=this._clockwise?this._mirrorAngle(Ui.normalizeAngle(s)):Ui.normalizeAngle(s)}else throw ll.ILLEGAL_PARAMETERS}createByThreePoints(e,n,i){const s=(A,I)=>({x:(A.x+I.x)/2,y:(A.y+I.y)/2}),r=(A,I)=>(I.y-A.y)/(I.x-A.x),o=A=>-1/A,a=s(e,n),l=s(n,i),c=r(e,n),u=r(n,i),d=o(c),h=o(u),f=(A,I,P,k)=>{const B=(k-I)/(A-P),R=A*B+I;return{x:B,y:R}},p=a.y-d*a.x,m=l.y-h*l.x,b=f(d,p,h,m),g=Math.sqrt(Math.pow(e.x-b.x,2)+Math.pow(e.y-b.y,2)),x=(A,I)=>Math.atan2(A.y-I.y,A.x-I.x),S=x(e,b),_=x(n,b),E=x(i,b),T=E>S&&E<_||S>E&&S<_||_>E&&_r.x),s=e.map(r=>r.y);return new ar(new Si(Math.min(...i),Math.min(...s)),new Si(Math.max(...i),Math.max(...s)))}get length(){return Math.abs(this.deltaAngle*this.radius)}transform(e){return this._boundingBoxNeedsUpdate=!0,this}clone(){return new LV(this.center.clone(),this.radius,this._startAngle,this._endAngle,this.clockwise)}getPointAtAngle(e){const n=this._getInternalAngle(e),i=this.center.x+this.radius*Math.cos(n),s=this.center.y+this.radius*Math.sin(n);return new Si(i,s)}getPoints(e=100){const n=[];let i=this.deltaAngle,s=this._getInternalAngle(this.startAngle);if(this.closed&&(i=Xs,s=0),this.clockwise)for(let r=0;r<=e;r++){const o=s-i*(r/e),a=this._clockwise?this._mirrorAngle(o):o,l=this.getPointAtAngle(a);n.push(new Si(l.x,l.y))}else for(let r=0;r<=e;r++){const o=s+i*(r/e),a=this._clockwise?this._mirrorAngle(o):o,l=this.getPointAtAngle(a);n.push(new Si(l.x,l.y))}return n}};class jLe extends kV{translate(e){return this.transform(new Vo().makeTranslation(e.x,e.y,e.z))}get box(){return(this._box==null||this._boundingBoxNeedsUpdate)&&(this._box=this.calculateBoundingBox(),this._boundingBoxNeedsUpdate=!1),this._box}}let h1=class extends jLe{},ly=class IV extends h1{constructor(e,n){super(),this._start=new Yt(e),this._end=new Yt(n)}get startPoint(){return this._start}set startPoint(e){this._start.copy(e),this._boundingBoxNeedsUpdate=!0}get endPoint(){return this._end}set endPoint(e){this._end.copy(e),this._boundingBoxNeedsUpdate=!0}get direction(){return new pn().subVectors(this.endPoint,this.startPoint).normalize()}get midPoint(){return new Yt((this._start.x+this._end.x)/2,(this._start.y+this._end.y)/2,(this._start.z+this._end.z)/2)}nearestPoint(e){return this.project(e)}get length(){return this.startPoint.distanceTo(this.endPoint)}isPointOnLine(e){return this.project(e).distanceTo(e)<1e-6}at(e,n){return this.delta(n).multiplyScalar(e).add(this._start)}atLength(e,n=!1){if(n){const i=this.delta(qh).normalize();return new Yt(this._start).addScaledVector(i,e)}else{const i=this.delta(qh).normalize();return new Yt(this._end).addScaledVector(i,e)}}extend(e,n=!1){if(n){const i=qh.subVectors(this._start,this._end).normalize();this._start=new Yt(this._start).addScaledVector(i,e)}else{const i=this.delta(qh).normalize();this._end=new Yt(this._end).addScaledVector(i,e)}return this._boundingBoxNeedsUpdate=!0,this}closestPointToPointParameter(e,n){O5.subVectors(e,this._start),mb.subVectors(this.endPoint,this.startPoint);const i=mb.dot(mb);let s=mb.dot(O5)/i;return n&&(s=Ui.clamp(s,0,1)),s}closestPointToPoint(e,n,i){const s=this.closestPointToPointParameter(e,n);return this.delta(i).multiplyScalar(s).add(this._start)}delta(e){return e.subVectors(this._end,this._start)}distanceSq(){return this._start.distanceToSquared(this._end)}distance(){return this._start.distanceTo(this._end)}project(e){const n=this.direction,i=qh.subVectors(e,this.startPoint).dot(n);return new Yt().copy(n).multiplyScalar(i).add(this.startPoint)}perpPoint(e){const n=this.direction,i=this.startPoint,s=qh.subVectors(e,i).dot(n),r=qh.copy(n).multiplyScalar(s);return new Yt().addVectors(i,r)}calculateBoundingBox(){const e=new Yt(Math.min(this._start.x,this._end.x),Math.min(this._start.y,this._end.y),Math.min(this._start.z,this._end.z)),n=new Yt(Math.max(this._start.x,this._end.x),Math.max(this._start.y,this._end.y),Math.max(this._start.z,this._end.z));return new Zi(e,n)}transform(e){return this._start.applyMatrix4(e),this._end.applyMatrix4(e),this._boundingBoxNeedsUpdate=!0,this}get closed(){return!1}copy(e){return this.startPoint=e.startPoint,this.endPoint=e.endPoint,this._boundingBoxNeedsUpdate=!0,this}clone(){return new IV(this._start.clone(),this._end.clone())}};const qh=new pn,O5=new pn,mb=new pn;let RV=class pw extends h1{static computeCenterPoint(e,n,i){const s=new pn().addVectors(e,n).multiplyScalar(.5),r=new pn().addVectors(e,i).multiplyScalar(.5),o=new pn().subVectors(n,e),a=new pn().subVectors(i,e),l=new pn().crossVectors(o,a).normalize();if(l.lengthSq()===0)return console.error("Points are collinear and cannot form a valid arc."),null;const c=new pn().crossVectors(o,l).normalize(),u=new pn().crossVectors(a,l).normalize(),d=c.clone().multiplyScalar(Number.MAX_SAFE_INTEGER),h=u.clone().multiplyScalar(Number.MAX_SAFE_INTEGER),f=new ly(s,s.clone().add(d)),p=new ly(r,r.clone().add(h)),m=new pn;return f.closestPointToPoint(p.startPoint,!0,m)?m:(console.error("Cannot find a valid center for the arc."),null)}static createByThreePoints(e,n,i){const s=pw.computeCenterPoint(e,n,i);if(s){const r=s.distanceTo(e),o=new pn().subVectors(e,s),a=new pn().subVectors(n,s),l=Math.atan2(o.y,o.x),c=Math.atan2(a.y,a.x);return new pw(s,r,l,c,pn.Z_AXIS)}}constructor(e,n,i,s,r,o=pn.X_AXIS){super(),this.center=e,this.radius=n,this.startAngle=i,this.endAngle=s,this.normal=r,this.refVec=o,(s-i)%Xs==0?(this.startAngle=0,this.endAngle=Xs):(this.startAngle=i,this.endAngle=s)}get center(){return this._center}set center(e){this._center=new Yt(e.x,e.y,e.z||0),this._boundingBoxNeedsUpdate=!0}get radius(){return this._radius}set radius(e){if(e<0)throw ll.ILLEGAL_PARAMETERS;this._radius=e,this._boundingBoxNeedsUpdate=!0}get startAngle(){return this._startAngle}set startAngle(e){this._startAngle=Ui.normalizeAngle(e),this._boundingBoxNeedsUpdate=!0}get endAngle(){return this._endAngle}set endAngle(e){this._endAngle=this.startAngle==0&&e==Xs?e:Ui.normalizeAngle(e),this._boundingBoxNeedsUpdate=!0}get deltaAngle(){return Ui.normalizeAngle(this.endAngle-this.startAngle)}get isLargeArc(){return Math.abs(this.deltaAngle)>Math.PI?1:0}get clockwise(){return this.deltaAngle<=0}get normal(){return this._normal}set normal(e){this._normal=new pn(e.x,e.y,e.z),this._normal.normalize(),this._boundingBoxNeedsUpdate=!0}get refVec(){return this._refVec}set refVec(e){this._refVec=new pn(e.x,e.y,e.z),this._refVec.normalize(),this._boundingBoxNeedsUpdate=!0}get startPoint(){return this.getPointAtAngle(this._startAngle)}get endPoint(){return this.getPointAtAngle(this._endAngle)}get midPoint(){let e=this.startAngle,n=this.deltaAngle;this.closed&&(e=0,n=Xs);const i=e+n*.5;return this.getPointAtAngle(i)}get length(){return this.closed?2*Math.PI*this.radius:Math.abs(this.deltaAngle*this.radius)}get area(){return this.closed?Math.PI*this.radius*this.radius:Math.abs(this.deltaAngle*this.radius*this.radius)}nearestPoint(e){const n=new pn(e.x,e.y,e.z||0),i=this.center,s=this.normal,r=n.clone().sub(i).dot(s),o=n.clone().sub(s.clone().multiplyScalar(r)).clone().sub(i);if(o.lengthSq()===0)return this.startPoint.clone();o.normalize().multiplyScalar(this.radius);const a=i.clone().add(o),l=this.getAngle(a.clone()),c=this.startAngle,u=this.deltaAngle;let d=Ui.normalizeAngle(l-c);d<0&&(d=0),d>u&&(d=u);const h=this.getPointAtAngle(c+d),f=h.distanceTo(n),p=this.startPoint.distanceTo(n),m=this.endPoint.distanceTo(n);return p=0&&m<=this.deltaAngle&&n.push(this.getPointAtAngle(this.startAngle+m))}return n}nearestTangentPoint(e){const n=this.tangentPoints(e);if(n.length===0)return null;const i=new Yt(e.x,e.y,e.z||0);return n.length===1||n[0].distanceTo(i)r&&(r=c.x),c.y>o&&(o=c.y),c.z>a&&(a=c.z)}return new Zi({x:n,y:i,z:s},{x:r,y:o,z:a})}get closed(){return Math.abs(this.endAngle-this.startAngle)/Math.PI%2==0}getPoints(e){const n=[];let i=this.deltaAngle,s=this.startAngle;this.closed&&(i=Xs,s=0);for(let r=0;r<=e;r++){const o=s+i*(r/e),a=this.getPointAtAngle(o);n.push(a)}return n}transform(e){const n=CE.copy(this.refVec).applyAxisAngle(this.normal,this.startAngle).multiplyScalar(this.radius),i=CE.copy(this.refVec).applyAxisAngle(this.normal,this.endAngle).multiplyScalar(this.radius);return this.center.applyMatrix4(e),n.applyMatrix4(e),i.applyMatrix4(e),this.normal.applyMatrix4(e).normalize(),this.refVec.applyMatrix4(e).normalize(),this.startAngle=this.getAngle(n),this.endAngle=this.getAngle(i),this._boundingBoxNeedsUpdate=!0,this}copy(e){return this.center=e.center,this.radius=e.radius,this.startAngle=e.startAngle,this.endAngle=e.endAngle,this.normal=e.normal,this.refVec=e.refVec,this._boundingBoxNeedsUpdate=!0,this}clone(){return new pw(this.center.clone(),this.radius,this.startAngle,this.endAngle,this.normal,this.refVec)}getAngle(e){return e.sub(this.center),Math.atan2(e.dot(CE.crossVectors(this.refVec,this.normal)),e.dot(this.refVec))}getPointAtAngle(e){const n=this.normal,i=this.refVec,s={x:n.y*i.z-n.z*i.y,y:n.z*i.x-n.x*i.z,z:n.x*i.y-n.y*i.x},r=this.center,o=this.radius;return new Yt(r.x+o*(i.x*Math.cos(e)+s.x*Math.sin(e)),r.y+o*(i.y*Math.cos(e)+s.y*Math.sin(e)),r.z+o*(i.z*Math.cos(e)+s.z*Math.sin(e)))}get plane(){const e=new pn(this.center).distanceTo(gV);return new TV(this.normal,e)}};const CE=new pn;let OV=class DV extends d1{constructor(e,n,i,s=0,r=Xs,o=!1,a=0){super(),this.center=e,this.majorAxisRadius=n,this.minorAxisRadius=i,(r-s)%Xs==0?(this.startAngle=0,this.endAngle=Xs):(this.startAngle=s,this.endAngle=r),this.clockwise=o,this.rotation=a}get center(){return this._center}set center(e){this._center=new Yt(e.x,e.y,e.z||0),this._boundingBoxNeedsUpdate=!0}get majorAxisRadius(){return this._majorAxisRadius}set majorAxisRadius(e){if(e<0)throw ll.ILLEGAL_PARAMETERS;this._majorAxisRadius=e,this._boundingBoxNeedsUpdate=!0}get minorAxisRadius(){return this._minorAxisRadius}set minorAxisRadius(e){if(e<0)throw ll.ILLEGAL_PARAMETERS;this._minorAxisRadius=e,this._boundingBoxNeedsUpdate=!0}get startAngle(){return this._startAngle}set startAngle(e){this._startAngle=Ui.normalizeAngle(e),this._boundingBoxNeedsUpdate=!0}get endAngle(){return this._endAngle}set endAngle(e){this._endAngle=this.startAngle==0&&e==Xs?e:Ui.normalizeAngle(e),this._boundingBoxNeedsUpdate=!0}get clockwise(){return this._clockwise}set clockwise(e){this._clockwise=e,this._boundingBoxNeedsUpdate=!0}get rotation(){return this._rotation}set rotation(e){this._rotation=e,this._boundingBoxNeedsUpdate=!0}get deltaAngle(){return Ui.normalizeAngle(this.endAngle-this.startAngle)}get isLargeArc(){return Math.abs(this.deltaAngle)>Math.PI?1:0}calculateBoundingBox(){let e=1/0,n=1/0,i=-1/0,s=-1/0;for(let r=0;r<=100;r++){const o=this.getPoint(r/100);e=Math.min(e,o.x),n=Math.min(n,o.y),i=Math.max(i,o.x),s=Math.max(s,o.y)}return new ar({x:e,y:n},{x:i,y:s})}get closed(){return this.deltaAngle==0}getPoint(e){const n=Math.PI*2;let i=this.endAngle-this.startAngle;const s=Math.abs(i)n;)i-=n;iMath.PI?1:0}get clockwise(){return this.deltaAngle<=0}get normal(){return this._normal}set normal(e){this._normal=new pn(e.x,e.y,e.z),this._normal.normalize(),this._boundingBoxNeedsUpdate=!0}get majorAxis(){return this._majorAxis}set majorAxis(e){this._majorAxis=new pn(e.x,e.y,e.z),this._majorAxis.normalize(),this._boundingBoxNeedsUpdate=!0}get minorAxis(){return new pn().crossVectors(this.normal,this.majorAxis).normalize()}get startPoint(){return this.getPointAtAngle(this._startAngle)}get endPoint(){return this.getPointAtAngle(this._endAngle)}get midPoint(){let e=this.startAngle,n=this.deltaAngle;(this.closed||Math.abs(n-Xs)<1e-10)&&(e=0,n=Xs);const i=e+n/2;return this.getPointAtAngle(i)}get isCircular(){return vV.equal(this.majorAxisRadius,this.minorAxisRadius)}get length(){if(this.isCircular)return this.majorAxisRadius*Math.abs(this.deltaAngle);const e=1e3,n=this.deltaAngle/e;let i=0,s=this.getPointAtAngle(this.startAngle);for(let r=1;r<=e;r++){const o=this.startAngle+r*n,a=this.getPointAtAngle(o),l=a.x-s.x,c=a.y-s.y,u=a.z-s.z;i+=Math.sqrt(l*l+c*c+u*u),s=a}return i}get area(){const e=this.majorAxisRadius,n=this.minorAxisRadius,i=this.startAngle,s=i+this.deltaAngle;if(Math.abs(this.deltaAngle-Xs)<1e-10)return Math.PI*e*n;const r=e*n/2*(s-i-(Math.sin(s)*Math.cos(s)-Math.sin(i)*Math.cos(i)));return Math.abs(r)}calculateBoundingBox(){if(this.majorAxis.equals(pn.X_AXIS)||this.majorAxis.equals(pn.Y_AXIS)||this.majorAxis.isParallelTo(pn.X_AXIS)||this.majorAxis.isParallelTo(pn.Y_AXIS)){const e=[this.startAngle,this.endAngle];for(let l=0;l<2*Math.PI;l+=Math.PI/2)Ui.isBetweenAngle(l,this.startAngle,this.endAngle)&&e.push(l);let n=1/0,i=1/0,s=1/0,r=-1/0,o=-1/0,a=-1/0;for(const l of e){const c=this.getPointAtAngle(l);c.xr&&(r=c.x),c.y>o&&(o=c.y),c.z>a&&(a=c.z)}return new Zi({x:n,y:i,z:s},{x:r,y:o,z:a})}else{let e=1/0,n=1/0,i=1/0,s=-1/0,r=-1/0,o=-1/0;for(let a=0;a<=100;a++){const l=this.startAngle+this.deltaAngle*(a/100),c=this.getPointAtAngle(l);e=Math.min(e,c.x),n=Math.min(n,c.y),i=Math.min(i,c.z),s=Math.max(s,c.x),r=Math.max(r,c.y),o=Math.max(o,c.z)}return new Zi({x:e,y:n,z:i},{x:s,y:r,z:o})}}get closed(){return this.deltaAngle==0}getPoints(e=100){const n=[];let i=this.deltaAngle,s=this.startAngle;this.closed&&(i=Xs,s=0);for(let r=0;r<=e;r++){const o=s+i*(r/e),a=this.getPointAtAngle(o);n.push(a)}return n}getPointAtAngle(e){const n=Math.cos(e),i=Math.sin(e),s=this.minorAxis.clone().multiplyScalar(this.minorAxisRadius).multiplyScalar(i),r=this.majorAxis.clone().multiplyScalar(n*this.majorAxisRadius).add(s);return new Yt(this.center.x+r.x,this.center.y+r.y,this.center.z+r.z)}contains(e){const n=new pn(e).sub(this.center),i=n.dot(this.majorAxis),s=n.dot(this.minorAxis),r=i/this.majorAxisRadius,o=s/this.minorAxisRadius;return r*r+o*o<=1}transform(e){return this._boundingBoxNeedsUpdate=!0,this}copy(e){return this.center=e.center,this.normal=e.normal,this.majorAxis=e.majorAxis,this.majorAxisRadius=e.majorAxisRadius,this.minorAxisRadius=e.minorAxisRadius,this.startAngle=e.startAngle,this.endAngle=e.endAngle,this._boundingBoxNeedsUpdate=!0,this}clone(){return new NV(this.center,this.normal,this.majorAxis,this.majorAxisRadius,this.minorAxisRadius,this.startAngle,this.endAngle)}get plane(){const e=new pn(this.center).distanceTo(gV);return new TV(this.normal,e)}},pp=class extends d1{constructor(e=null,n=!1){super(),this._vertices=e||new Array,this._closed=n}get numberOfVertices(){return this._vertices.length}get closed(){return this._closed}get startPoint(){if(this.numberOfVertices>0){const e=this._vertices[0];return new Si(e.x,e.y)}throw new Error("Start point does not exist in an empty polyline.")}get endPoint(){const e=this.numberOfVertices;if(e>0)if(this.closed){const n=this._vertices[0];return new Si(n.x,n.y)}else{const n=this._vertices[e-1];return new Si(n.x,n.y)}throw new Error("End point does not exist in an empty polyline.")}get length(){let e=0;const n=this._vertices.length;for(let i=0;ii.push(new Yt().set(s.x,s.y,n))),i}getPoints(e){const n=[],i=this._vertices.length;for(let s=0;s0){const e=this._curves[0].startPoint;return new Si(e.x,e.y)}throw new Error("Start point does not exist in an empty loop.")}get endPoint(){return this.startPoint}get length(){let e=0;return this._curves.forEach(n=>{e+=n.length}),e}calculateBoundingBox(){const e=this.getPoints(100),n=new ar;return n.setFromPoints(e),n}transform(e){return this._boundingBoxNeedsUpdate=!0,this}get closed(){return!0}getPoints(e){const n=[];return this.curves.forEach(i=>{i.getPoints(e).forEach(s=>{n.push(new Si(s.x,s.y))})}),n}};function qLe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var FV={exports:{}};(function(t,e){(function(n){t.exports=n()})(function(){var n={},i=this;new Function("try {return this===window;}catch(e){ return false;}");var s=new Function("try {return this===global;}catch(e){return false;}"),r=new Function("try {return typeof importScripts === 'function';}catch(e){return false;}");if(s()&&r(),s()||r()){var o=i;if(r()){var a=function(l,c){var u=i;return l.split(".").forEach(function(d){u&&(u=u[d])}),u?u[c]:null};onmessage=function(l){if(!(!l.data.className||!l.data.methodName)){var c=a(l.data.className,l.data.methodName);if(!c)return console.error("could not find "+l.data.className+"."+l.data.methodName);postMessage({result:c.apply(null,l.data.args),id:l.data.id})}}}}return(function(l,c,u){c.geom=c.geom||{},c.exe=c.exe||{},c.eval=c.eval||{},c.core=c.core||{},c.promhx=c.promhx||{};var d={},h=function(){return K.__string_rec(this,"")};function f(w,M){function O(){}O.prototype=w;var $=new O;for(var te in M)$[te]=M[te];return M.toString!==Object.prototype.toString&&($.toString=M.toString),$}var p=function(){};d.HxOverrides=p,p.__name__=["HxOverrides"],p.strDate=function(w){var M=w.length;switch(M){case 8:var O=w.split(":"),$=new Date;return $.setTime(0),$.setUTCHours(O[0]),$.setUTCMinutes(O[1]),$.setUTCSeconds(O[2]),$;case 10:var te=w.split("-");return new Date(te[0],te[1]-1,te[2],0,0,0);case 19:var ue=w.split(" "),ye=ue[0].split("-"),we=ue[1].split(":");return new Date(ye[0],ye[1]-1,ye[2],we[0],we[1],we[2]);default:throw new D("Invalid date format : "+w)}},p.cca=function(w,M){var O=w.charCodeAt(M);if(O==O)return O},p.substr=function(w,M,O){return M!=null&&M!=0&&O!=null&&O<0?"":(O==null&&(O=w.length),M<0?(M=w.length+M,M<0&&(M=0)):O<0&&(O=w.length+O-M),w.substr(M,O))},p.iter=function(w){return{cur:0,arr:w,hasNext:function(){return this.cur0&&(ue==1?this.buf.b+="n":(this.buf.b+="u",ue==null?this.buf.b+="null":this.buf.b+=""+ue),ue=0),this.serialize(w[Se]))}ue>0&&(ue==1?this.buf.b+="n":(this.buf.b+="u",ue==null?this.buf.b+="null":this.buf.b+=""+ue)),this.buf.b+="h";break;case b:this.buf.b+="l";for(var ze=w,He=ze.h,Ve=null;He!=null;){var je;Ve=He[0],He=He[1],je=Ve,this.serialize(je)}this.buf.b+="h";break;case Date:var it=w;this.buf.b+="v",this.buf.add(it.getTime());break;case q:this.buf.b+="b";for(var nt=w,Ct=nt.keys();Ct.hasNext();){var yt=Ct.next();this.serializeString(yt),this.serialize(Ni[yt]!=null?nt.getReserved(yt):nt.h[yt])}this.buf.b+="h";break;case B:this.buf.b+="q";for(var Dt=w,Pt=Dt.keys();Pt.hasNext();){var Vt=Pt.next();this.buf.b+=":",Vt==null?this.buf.b+="null":this.buf.b+=""+Vt,this.serialize(Dt.h[Vt])}this.buf.b+="h";break;case R:this.buf.b+="M";for(var qt=w,dn=qt.keys();dn.hasNext();){var hn=dn.next(),sn=g.field(hn,"__id__");g.deleteField(hn,"__id__"),this.serialize(hn),hn.__id__=sn,this.serialize(qt.h[hn.__id__])}this.buf.b+="h";break;case oe:for(var en=w,gn=0,zn=en.length-2,Vn=new S,qn=P.BASE64;gn>2)),Vn.add(qn.charAt((ti<<4|Zn>>4)&63)),Vn.add(qn.charAt((Zn<<2|bn>>6)&63)),Vn.add(qn.charAt(bn&63))}if(gn==zn){var Gn=en.get(gn++),jn=en.get(gn++);Vn.add(qn.charAt(Gn>>2)),Vn.add(qn.charAt((Gn<<4|jn>>4)&63)),Vn.add(qn.charAt(jn<<2&63))}else if(gn==zn+1){var fn=en.get(gn++);Vn.add(qn.charAt(fn>>2)),Vn.add(qn.charAt(fn<<4&63))}var li=Vn.b;this.buf.b+="s",li.length==null?this.buf.b+="null":this.buf.b+=""+li.length,this.buf.b+=":",li==null?this.buf.b+="null":this.buf.b+=""+li;break;default:this.useCache&&this.cache.pop(),w.hxSerialize!=null?(this.buf.b+="C",this.serializeString(T.getClassName(te)),this.useCache&&this.cache.push(w),w.hxSerialize(this),this.buf.b+="g"):(this.buf.b+="c",this.serializeString(T.getClassName(te)),this.useCache&&this.cache.push(w),this.serializeFields(w))}break;case 4:if(K.__instanceof(w,pr)){var Bi=T.getClassName(w);this.buf.b+="A",this.serializeString(Bi)}else if(K.__instanceof(w,Ys))this.buf.b+="B",this.serializeString(T.getEnumName(w));else{if(this.useCache&&this.serializeRef(w))return;this.buf.b+="o",this.serializeFields(w)}break;case 7:var hs=M[2];if(this.useCache){if(this.serializeRef(w))return;this.cache.pop()}this.useEnumIndex?this.buf.b+="j":this.buf.b+="w",this.serializeString(T.getEnumName(hs)),this.useEnumIndex?(this.buf.b+=":",this.buf.b+=x.string(w[1])):this.serializeString(w[0]),this.buf.b+=":";var Os=w.length;this.buf.b+=x.string(Os-2);for(var ns=2;ns57)break;w=w*10+($-48),this.pos++}return M&&(w*=-1),w},readFloat:function(){for(var w=this.pos;;){var M=this.buf.charCodeAt(this.pos);if(M>=43&&M<58||M==101||M==69)this.pos++;else break}return x.parseFloat(p.substr(this.buf,w,this.pos-w))},unserializeObject:function(w){for(;;){if(this.pos>=this.length)throw new D("Invalid object");if(this.buf.charCodeAt(this.pos)==103)break;var M=this.unserialize();if(typeof M!="string")throw new D("Invalid object key");var O=this.unserialize();w[M]=O}this.pos++},unserializeEnum:function(w,M){if(this.get(this.pos++)!=58)throw new D("Invalid enum format");var O=this.readDigits();if(O==0)return T.createEnum(w,M);for(var $=[];O-- >0;)$.push(this.unserialize());return T.createEnum(w,M,$)},unserialize:function(){var w=this.get(this.pos++);switch(w){case 110:return null;case 116:return!0;case 102:return!1;case 122:return 0;case 105:return this.readDigits();case 100:return this.readFloat();case 121:var M=this.readDigits();if(this.get(this.pos++)!=58||this.length-this.pos=this.cache.length)throw new D("Invalid reference");return this.cache[we];case 82:var Se=this.readDigits();if(Se<0||Se>=this.scache.length)throw new D("Invalid string reference");return this.scache[Se];case 120:throw new D(this.unserialize());case 99:var ze=this.unserialize(),He=this.resolver.resolveClass(ze);if(He==null)throw new D("Class not found "+ze);var Ve=T.createEmptyInstance(He);return this.cache.push(Ve),this.unserializeObject(Ve),Ve;case 119:var je=this.unserialize(),it=this.resolver.resolveEnum(je);if(it==null)throw new D("Enum not found "+je);var nt=this.unserializeEnum(it,this.unserialize());return this.cache.push(nt),nt;case 106:var Ct=this.unserialize(),yt=this.resolver.resolveEnum(Ct);if(yt==null)throw new D("Enum not found "+Ct);this.pos++;var Dt=this.readDigits(),Pt=T.getEnumConstructs(yt)[Dt];if(Pt==null)throw new D("Unknown enum index "+Ct+"@"+Dt);var Vt=this.unserializeEnum(yt,Pt);return this.cache.push(Vt),Vt;case 108:var qt=new b;for(this.cache.push(qt),this.buf;this.buf.charCodeAt(this.pos)!=104;)qt.add(this.unserialize());return this.pos++,qt;case 98:var dn=new q;for(this.cache.push(dn),this.buf;this.buf.charCodeAt(this.pos)!=104;){var hn=this.unserialize();dn.set(hn,this.unserialize())}return this.pos++,dn;case 113:var sn=new B;this.cache.push(sn),this.buf;for(var en=this.get(this.pos++);en==58;){var gn=this.readDigits();sn.set(gn,this.unserialize()),en=this.get(this.pos++)}if(en!=104)throw new D("Invalid IntMap format");return sn;case 77:var zn=new R;for(this.cache.push(zn),this.buf;this.buf.charCodeAt(this.pos)!=104;){var Vn=this.unserialize();zn.set(Vn,this.unserialize())}return this.pos++,zn;case 118:var qn;if(this.buf.charCodeAt(this.pos)>=48&&this.buf.charCodeAt(this.pos)<=57&&this.buf.charCodeAt(this.pos+1)>=48&&this.buf.charCodeAt(this.pos+1)<=57&&this.buf.charCodeAt(this.pos+2)>=48&&this.buf.charCodeAt(this.pos+2)<=57&&this.buf.charCodeAt(this.pos+3)>=48&&this.buf.charCodeAt(this.pos+3)<=57&&this.buf.charCodeAt(this.pos+4)==45){var ti=p.substr(this.buf,this.pos,19);qn=p.strDate(ti),this.pos+=19}else{var Zn=this.readFloat(),bn=new Date;bn.setTime(Zn),qn=bn}return this.cache.push(qn),qn;case 115:var Gn=this.readDigits(),jn=this.buf;if(this.get(this.pos++)!=58||this.length-this.pos>2)*3+(Bi>=2?Bi-1:0);for(var Os=li+(Gn-Bi),ns=oe.alloc(hs),Bs=0;li>4);var qr=fn[_.fastCodeAt(jn,li++)];ns.set(Bs++,no<<4|qr>>2);var Is=fn[_.fastCodeAt(jn,li++)];ns.set(Bs++,qr<<6|Is)}if(Bi>=2){var io=fn[_.fastCodeAt(jn,li++)],so=fn[_.fastCodeAt(jn,li++)];if(ns.set(Bs++,io<<2|so>>4),Bi==3){var mr=fn[_.fastCodeAt(jn,li++)];ns.set(Bs++,so<<4|mr>>2)}}return this.pos+=Gn,this.cache.push(ns),ns;case 67:var _a=this.unserialize(),Jo=this.resolver.resolveClass(_a);if(Jo==null)throw new D("Class not found "+_a);var Ao=T.createEmptyInstance(Jo);if(this.cache.push(Ao),Ao.hxUnserialize(this),this.get(this.pos++)!=103)throw new D("Invalid custom data");return Ao;case 65:var wa=this.unserialize(),$a=this.resolver.resolveClass(wa);if($a==null)throw new D("Class not found "+wa);return $a;case 66:var iu=this.unserialize(),su=this.resolver.resolveEnum(iu);if(su==null)throw new D("Enum not found "+iu);return su}throw this.pos--,new D("Invalid char "+this.buf.charAt(this.pos)+" at position "+this.pos)},__class__:k};var B=function(){this.h={}};d["haxe.ds.IntMap"]=B,B.__name__=["haxe","ds","IntMap"],B.__interfaces__=[A],B.prototype={set:function(w,M){this.h[w]=M},remove:function(w){return this.h.hasOwnProperty(w)?(delete this.h[w],!0):!1},keys:function(){var w=[];for(var M in this.h)this.h.hasOwnProperty(M)&&w.push(M|0);return p.iter(w)},__class__:B};var R=function(){this.h={},this.h.__keys__={}};d["haxe.ds.ObjectMap"]=R,R.__name__=["haxe","ds","ObjectMap"],R.__interfaces__=[A],R.prototype={set:function(w,M){var O=w.__id__||(w.__id__=++R.count);this.h[O]=M,this.h.__keys__[O]=w},keys:function(){var w=[];for(var M in this.h.__keys__)this.h.hasOwnProperty(M)&&w.push(this.h.__keys__[M]);return p.iter(w)},__class__:R};var H=d["haxe.ds.Option"]={__ename__:["haxe","ds","Option"],__constructs__:["Some","None"]};H.Some=function(w){var M=["Some",0,w];return M.__enum__=H,M.toString=h,M},H.None=["None",1],H.None.toString=h,H.None.__enum__=H;var q=function(){this.h={}};d["haxe.ds.StringMap"]=q,q.__name__=["haxe","ds","StringMap"],q.__interfaces__=[A],q.prototype={set:function(w,M){Ni[w]!=null?this.setReserved(w,M):this.h[w]=M},get:function(w){return Ni[w]!=null?this.getReserved(w):this.h[w]},setReserved:function(w,M){this.rh==null&&(this.rh={}),this.rh["$"+w]=M},getReserved:function(w){return this.rh==null?null:this.rh["$"+w]},keys:function(){var w=this.arrayKeys();return p.iter(w)},arrayKeys:function(){var w=[];for(var M in this.h)this.h.hasOwnProperty(M)&&w.push(M);if(this.rh!=null)for(var M in this.rh)M.charCodeAt(0)==36&&w.push(M.substr(1));return w},__class__:q};var oe=function(w){this.length=w.byteLength,this.b=new ba(w),this.b.bufferValue=w,w.hxBytes=this,w.bytes=this.b};d["haxe.io.Bytes"]=oe,oe.__name__=["haxe","io","Bytes"],oe.alloc=function(w){return new oe(new Ls(w))},oe.prototype={get:function(w){return this.b[w]},set:function(w,M){this.b[w]=M&255},__class__:oe};var Z=d["haxe.io.Error"]={__ename__:["haxe","io","Error"],__constructs__:["Blocked","Overflow","OutsideBounds","Custom"]};Z.Blocked=["Blocked",0],Z.Blocked.toString=h,Z.Blocked.__enum__=Z,Z.Overflow=["Overflow",1],Z.Overflow.toString=h,Z.Overflow.__enum__=Z,Z.OutsideBounds=["OutsideBounds",2],Z.OutsideBounds.toString=h,Z.OutsideBounds.__enum__=Z,Z.Custom=function(w){var M=["Custom",3,w];return M.__enum__=Z,M.toString=h,M};var V=function(){};d["haxe.io.FPHelper"]=V,V.__name__=["haxe","io","FPHelper"],V.i32ToFloat=function(w){var M=1-(w>>>31<<1),O=w>>>23&255,$=w&8388607;return $==0&&O==0?0:M*(1+Math.pow(2,-23)*$)*Math.pow(2,O-127)},V.floatToI32=function(w){if(w==0)return 0;var M;w<0?M=-w:M=w;var O=Math.floor(Math.log(M)/.6931471805599453);O<-127?O=-127:O>128&&(O=128);var $=Math.round((M/Math.pow(2,O)-1)*8388608)&8388607;return(w<0?-2147483648:0)|O+127<<23|$},V.i64ToDouble=function(w,M){var O=1-(M>>>31<<1),$=(M>>20&2047)-1023,te=(M&1048575)*4294967296+(w>>>31)*2147483648+(w&2147483647);return te==0&&$==-1023?0:O*(1+Math.pow(2,-52)*te)*Math.pow(2,$)},V.doubleToI64=function(w){var M=V.i64tmp;if(w==0)M.low=0,M.high=0;else{var O;w<0?O=-w:O=w;var $=Math.floor(Math.log(O)/.6931471805599453),te,ue=(O/Math.pow(2,$)-1)*4503599627370496;te=Math.round(ue);var ye=te|0,we=te/4294967296|0;M.low=ye,M.high=(w<0?-2147483648:0)|$+1023<<20|we}return M};var D=function(w){Error.call(this),this.val=w,this.message=String(w),Error.captureStackTrace&&Error.captureStackTrace(this,D)};d["js._Boot.HaxeError"]=D,D.__name__=["js","_Boot","HaxeError"],D.__super__=Error,D.prototype=f(Error.prototype,{__class__:D});var K=function(){};d["js.Boot"]=K,K.__name__=["js","Boot"],K.getClass=function(w){if(w instanceof Array&&w.__enum__==null)return Array;var M=w.__class__;if(M!=null)return M;var O=K.__nativeClassName(w);return O!=null?K.__resolveNativeClass(O):null},K.__string_rec=function(w,M){if(w==null)return"null";if(M.length>=5)return"<...>";var O=typeof w;switch(O=="function"&&(w.__name__||w.__ename__)&&(O="object"),O){case"object":if(w instanceof Array){if(w.__enum__){if(w.length==2)return w[0];var $=w[0]+"(";M+=" ";for(var te=2,ue=w.length;te0?",":"")+K.__string_rec(w[He],M)}return Se+="]",Se}var Ve;try{Ve=w.toString}catch(yt){return yt instanceof D&&(yt=yt.val),"???"}if(Ve!=null&&Ve!=Object.toString&&typeof Ve=="function"){var je=w.toString();if(je!="[object Object]")return je}var it=null,nt=`{ `;M+=" ";var Ct=w.hasOwnProperty!=null;for(var it in w)Ct&&!w.hasOwnProperty(it)||it=="prototype"||it=="__class__"||it=="__super__"||it=="__interfaces__"||it=="__properties__"||(nt.length!=2&&(nt+=`, `),nt+=M+it+" : "+K.__string_rec(w[it],M));return M=M.substring(1),nt+=` `+M+"}",nt;case"function":return"";case"string":return w;default:return String(w)}},K.__interfLoop=function(w,M){if(w==null)return!1;if(w==M)return!0;var O=w.__interfaces__;if(O!=null)for(var $=0,te=O.length;$w.byteLength)throw new D(Z.OutsideBounds)};d["js.html.compat.DataView"]=Q,Q.__name__=["js","html","compat","DataView"],Q.prototype={getInt8:function(w){var M=this.buf.a[this.offset+w];return M>=128?M-256:M},getUint8:function(w){return this.buf.a[this.offset+w]},getInt16:function(w,M){var O=this.getUint16(w,M);return O>=32768?O-65536:O},getUint16:function(w,M){return M?this.buf.a[this.offset+w]|this.buf.a[this.offset+w+1]<<8:this.buf.a[this.offset+w]<<8|this.buf.a[this.offset+w+1]},getInt32:function(w,M){var O=this.offset+w,$=this.buf.a[O++],te=this.buf.a[O++],ue=this.buf.a[O++],ye=this.buf.a[O++];return M?$|te<<8|ue<<16|ye<<24:ye|ue<<8|te<<16|$<<24},getUint32:function(w,M){var O=this.getInt32(w,M);return O<0?O+4294967296:O},getFloat32:function(w,M){return V.i32ToFloat(this.getInt32(w,M))},getFloat64:function(w,M){var O=this.getInt32(w,M),$=this.getInt32(w+4,M);return V.i64ToDouble(M?O:$,M?$:O)},setInt8:function(w,M){M<0?this.buf.a[w+this.offset]=M+128&255:this.buf.a[w+this.offset]=M&255},setUint8:function(w,M){this.buf.a[w+this.offset]=M&255},setInt16:function(w,M,O){this.setUint16(w,M<0?M+65536:M,O)},setUint16:function(w,M,O){var $=w+this.offset;O?(this.buf.a[$]=M&255,this.buf.a[$++]=M>>8&255):(this.buf.a[$++]=M>>8&255,this.buf.a[$]=M&255)},setInt32:function(w,M,O){this.setUint32(w,M,O)},setUint32:function(w,M,O){var $=w+this.offset;O?(this.buf.a[$++]=M&255,this.buf.a[$++]=M>>8&255,this.buf.a[$++]=M>>16&255,this.buf.a[$++]=M>>>24):(this.buf.a[$++]=M>>>24,this.buf.a[$++]=M>>16&255,this.buf.a[$++]=M>>8&255,this.buf.a[$++]=M&255)},setFloat32:function(w,M,O){this.setUint32(w,V.floatToI32(M),O)},setFloat64:function(w,M,O){var $=V.doubleToI64(M);O?(this.setUint32(w,$.low),this.setUint32(w,$.high)):(this.setUint32(w,$.high),this.setUint32(w,$.low))},__class__:Q};var ie=function(){};d["js.html.compat.Uint8Array"]=ie,ie.__name__=["js","html","compat","Uint8Array"],ie._new=function(w,M,O){var $;if(typeof w=="number"){$=[];for(var te=0;teO.byteLength)throw new D("set() outside of range");for(var te=0,ue=w.byteLength;teO.byteLength)throw new D("set() outside of range");for(var Se=0,ze=we.length;Se0)&&M.handleError(w._errorVal),w._resolved&&!w._pending)try{M.handleResolve(O(w._val))}catch($){$ instanceof D&&($=$.val),M.handleError($)}},ne.linkAll=function(w,M){for(var O=function(ue,ye,we){if(ue.length==0||ne.allFulfilled(ue)){for(var Se,ze=[],He=Nn(w)();He.hasNext();){var Ve=He.next();ze.push(Ve==ye?we:Ve._val)}Se=ze,M.handleResolve(Se)}},$=Nn(w)();$.hasNext();){var te=$.next();te._update.push({async:M,linkf:(function(ue,ye,we){return function(Se){ue(ye,we,Se)}})(O,(function(ue){for(var ye,we=[],Se=Nn(w)();Se.hasNext();){var ze=Se.next();ze!=te&&we.push(ze)}return ye=we,ye})(),te)})}ne.allFulfilled(w)&&M.handleResolve((function(ue){for(var ye,we=[],Se=Nn(w)();Se.hasNext();){var ze=Se.next();we.push(ze._val)}return ye=we,ye})())},ne.pipeLink=function(w,M,O){var $=!1,te=function(ue){if(!$){$=!0;var ye=O(ue);ye._update.push({async:M,linkf:yi(M,M.handleResolve)}),ne.immediateLinkUpdate(ye,M,function(we){return we})}};if(w._update.push({async:M,linkf:te}),w._resolved&&!w._pending)try{te(w._val)}catch(ue){ue instanceof D&&(ue=ue.val),M.handleError(ue)}},ne.allResolved=function(w){for(var M=Nn(w)();M.hasNext();){var O=M.next();if(!O._resolved)return!1}return!0},ne.allFulfilled=function(w){for(var M=Nn(w)();M.hasNext();){var O=M.next();if(!O._fulfilled)return!1}return!0},ne.prototype={catchError:function(w){return this._error.push(w),this},errorThen:function(w){return this._errorMap=w,this},isResolved:function(){return this._resolved},isErrored:function(){return this._errored},isErrorHandled:function(){return this._error.length>0},isErrorPending:function(){return this._errorPending},isFulfilled:function(){return this._fulfilled},isPending:function(){return this._pending},handleResolve:function(w){this._resolve(w)},_resolve:function(w){var M=this;this._pending?Te.enqueue((function(O,$){return function(){O($)}})(yi(this,this._resolve),w)):(this._resolved=!0,this._pending=!0,Te.queue.add(function(){M._val=w;for(var O=0,$=M._update;O<$.length;){var te=$[O];++O;try{te.linkf(w)}catch(ue){ue instanceof D&&(ue=ue.val),te.async.handleError(ue)}}M._fulfilled=!0,M._pending=!1}),Te.continueOnNextLoop())},handleError:function(w){this._handleError(w)},_handleError:function(w){var M=this,O=function($){if(M._error.length>0)for(var te=0,ue=M._error;te0)for(var we=0,Se=M._update;we0&&(M=Te.queue.pop())!=null;)M();return Te.queue.isEmpty()},Te.clear=function(){Te.queue=new b},Te.f=function(){var w=Te.queue.pop();w?.(),Te.queue.isEmpty()||Te.continueOnNextLoop()},Te.continueOnNextLoop=function(){Te.nextLoop!=null?Te.nextLoop(Te.f):setImmediate(Te.f)};var Ke=d["promhx.error.PromiseError"]={__ename__:["promhx","error","PromiseError"],__constructs__:["AlreadyResolved","DownstreamNotFullfilled"]};Ke.AlreadyResolved=function(w){var M=["AlreadyResolved",0,w];return M.__enum__=Ke,M.toString=h,M},Ke.DownstreamNotFullfilled=function(w){var M=["DownstreamNotFullfilled",1,w];return M.__enum__=Ke,M.toString=h,M};var Fe=function(){};d["verb.Verb"]=Fe,Fe.__name__=["verb","Verb"],Fe.main=function(){l.log("verb 2.1.0")};var ve=function(){};d["verb.core.ArrayExtensions"]=ve,ve.__name__=["verb","core","ArrayExtensions"],ve.alloc=function(w,M){if(!(M<0))for(;w.length0;){for(var $=w.pop(),te=!0,ue=0;uew)return 0;if(M>w-M&&(M=w-M),fe.memo_exists(w,M))return fe.get_memo(w,M);for(var O=1,$=w,te=1,ue=M+1;tew)return 0;M>w-M&&(M=w-M);for(var O=1,$=1,te=M+1;$=Se&&ye<=ze||we>=Se&&we<=ze||Se>=ye&&Se<=we||ze>=ye&&ze<=we},Me.prototype={fromPoint:function(w){return new Me([w])},add:function(w){if(!this.initialized)return this.dim=w.length,this.min=w.slice(0),this.max=w.slice(0),this.initialized=!0,this;for(var M=0,O=this.dim;Mthis.max[$]&&(this.max[$]=w[$]),w[$]w&&(w=ue,M=te)}return M},getAxisLength:function(w){return w<0||w>this.dim-1?0:Math.abs(this.min[w]-this.max[w])},intersect:function(w,M){if(!this.initialized)return null;var O=this.min,$=this.max,te=w.min,ue=w.max;if(!this.intersects(w,M))return null;for(var ye=[],we=[],Se=0,ze=this.dim;Se0?1:-1}),te=Math.floor(w.length/2),ue=new qe(w[te],$,O),ue.left=this.buildTree(w.slice(0,te),M+1,ue),ue.right=this.buildTree(w.slice(te+1),M+1,ue),ue)},nearest:function(w,M,O){var $=this,te=new Ze(function(Ve){return-Ve.item1}),ue,ye=null;ye=function(Ve){for(var je,it=Ve.dimension,nt=$.distanceFunction(w,Ve.kdPoint.point),Ct,yt=[],Dt=0,Pt=$.dim;DtM&&te.pop()},hn=0,sn=$.dim;hn0&&(this.content[0]=M,this.sinkDown(0)),w},peek:function(){return this.content[0]},remove:function(w){for(var M=this.content.length,O=0;O0;){var O=Math.floor((w+1)/2)-1,$=this.content[O];if(this.scoreFunction(M)=0;){for(ye=[],we=w[He],je=te-1;je>=0;){for(Se=we[$-1]*M[$-1][je],Ve=$-2;Ve>=1;)ze=Ve-1,Se+=we[Ve]*M[Ve][je]+we[ze]*M[ze][je],Ve-=2;Ve==0&&(Se+=we[0]*M[0][je]),ye[je]=Se,je--}ue[He]=ye,He--}return ue},ut.add=function(w,M){for(var O=[],$=0,te=w.length;$=0;){for(ze=te[O],$=O+1;$Ct?1:-1});for(var Se=[],ze=0,He=te.length;ze=.1*Vt*Se||isNaN(we)){Vt*=.5,++it;continue}break}if(Vt*qt20)throw new D("Numerical gradient fails");if(te[Pt]=M[Pt]+Vt,ue=w(te),te[Pt]=M[Pt]-Vt,ye=w(te),te[Pt]=M[Pt],isNaN(ue)||isNaN(ye)){Vt/=16;continue}if(we[Pt]=(ue-ye)/(2*Vt),He=M[Pt]-Vt,Ve=M[Pt],je=M[Pt]+Vt,nt=(ue-$)/Vt,Ct=($-ye)/Vt,yt=pe.max([Math.abs(we[Pt]),Math.abs($),Math.abs(ue),Math.abs(ye),Math.abs(He),Math.abs(Ve),Math.abs(je),1e-8]),Se=Math.min(pe.max([Math.abs(nt-we[Pt]),Math.abs(Ct-we[Pt]),Math.abs(nt-Ct)])/yt,Vt/yt),Se>ze)Vt/=16;else break}return we},Tt.tensor=function(w,M){for(var O=w.length,$=M.length,te=[],ue,ye,we=O-1;we>=0;){ue=[],ye=w[we];for(var Se=$-1;Se>=3;)ue[Se]=ye*M[Se],--Se,ue[Se]=ye*M[Se],--Se,ue[Se]=ye*M[Se],--Se,ue[Se]=ye*M[Se],--Se;for(;Se>=0;)ue[Se]=ye*M[Se],--Se;te[we]=ue,we--}return te};var rt=function(w,M,O,$,te,ue){this.solution=w,this.value=M,this.gradient=O,this.invHessian=$,this.iterations=te,this.message=ue};d["verb.core.MinimizationResult"]=rt,rt.__name__=["verb","core","MinimizationResult"],rt.prototype={__class__:rt};var jt=function(){};d["verb.core.ISerializable"]=jt,jt.__name__=["verb","core","ISerializable"],jt.prototype={__class__:jt};var Di=c.core.Deserializer=function(){};d["verb.core.Deserializer"]=Di,Di.__name__=["verb","core","Deserializer"],Di.deserialize=function(w){var M=new k(w),O=M.unserialize();return O};var ms=c.core.Trig=function(){};d["verb.core.Trig"]=ms,ms.__name__=["verb","core","Trig"],ms.isPointInPlane=function(w,M,O){return Math.abs(pe.dot(pe.sub(w,M.origin),M.normal))ye?{u:te,pt:O}:{u:$+(te-$)*He/ye,pt:pe.add(we,pe.mul(He,Se))}};var pe=c.core.Vec=function(){};d["verb.core.Vec"]=pe,pe.__name__=["verb","core","Vec"],pe.angleBetween=function(w,M){return Math.acos(pe.dot(w,M)/(pe.norm(w)*pe.norm(M)))},pe.positiveAngleBetween=function(w,M,O){var $=pe.cross(w,M),te=pe.norm(w),ue=pe.norm(M),ye=te*ue,we=pe.dot(w,M),Se=pe.norm($)/ye,ze=we/ye,He=Math.atan2(Se,ze),Ve=pe.dot(O,$);return Math.abs(Ve)0?He:-He},pe.signedAngleBetween=function(w,M,O){var $=pe.cross(w,M),te=pe.norm(w),ue=pe.norm(M),ye=te*ue,we=pe.dot(w,M),Se=pe.norm($)/ye,ze=we/ye,He=Math.atan2(Se,ze),Ve=pe.dot(O,$);return Ve>0?He:2*Math.PI-He},pe.angleBetweenNormalized2d=function(w,M){var O=w[0]*M[1]-w[1]*M[0];return Math.atan2(O,pe.dot(w,M))},pe.domain=function(w){return ve.last(w)-ve.first(w)},pe.range=function(w){for(var M=[],O=0,$=0;$M&&O>0)return[];if(M>w&&O<0)return[];for(var $=[],te=w;te<=M;)$.push(te),te+=O;return $},pe.neg=function(w){return w.map(function(M){return-M})},pe.min=function(w){return m.fold(w,function(M,O){return Math.min(M,O)},1/0)},pe.max=function(w){return m.fold(w,function(M,O){return Math.max(M,O)},-1/0)},pe.all=function(w){return m.fold(w,function(M,O){return O&&M},!0)},pe.finite=function(w){return w.map(function(M){return isFinite(M)})},pe.onRay=function(w,M,O){return pe.add(w,pe.mul(O,M))},pe.lerp=function(w,M,O){return pe.add(pe.mul(w,M),pe.mul(1-w,O))},pe.normalized=function(w){return pe.div(w,pe.norm(w))},pe.cross=function(w,M){return[w[1]*M[2]-w[2]*M[1],w[2]*M[0]-w[0]*M[2],w[0]*M[1]-w[1]*M[0]]},pe.dist=function(w,M){return pe.norm(pe.sub(w,M))},pe.distSquared=function(w,M){return pe.normSquared(pe.sub(w,M))},pe.sum=function(w){return m.fold(w,function(M,O){return O+M},0)},pe.addAll=function(w){var M=Nn(w)();if(!M.hasNext())return null;var O=M.next().length;return m.fold(w,function($,te){return pe.add(te,$)},pe.rep(O,0))},pe.addAllMutate=function(w){for(var M=w[0],O=1,$=w.length;O<$;){var te=O++;pe.addMutate(M,w[te])}},pe.addMulMutate=function(w,M,O){for(var $=0,te=w.length;$ge.TOLERANCE)return!1}return!0},pe.sortedSetUnion=function(w,M){for(var O=[],$=0,te=0;$=w.length){O.push(M[te]),te++;continue}else if(te>=M.length){O.push(w[$]),$++;continue}var ue=w[$]-M[te];if(Math.abs(ue)0){O.push(M[te]),te++;continue}O.push(w[$]),$++}return O},pe.sortedSetSub=function(w,M){for(var O=[],$=0,te=0;$=M.length){O.push(w[$]),$++;continue}if(Math.abs(w[$]-M[te])ge.EPSILON&&(O=new gs(te,0),M.push(O)),O.inc()}return M},Qn.isRationalSurfaceClosed=function(w,M){M==null&&(M=!0);var O;M?O=w.controlPoints:O=ut.transpose(w.controlPoints);for(var $=0,te=O[0].length;$ze&&(je?fn=[Se+(fn[0]-ze),fn[1]]:fn=[ze-ge.EPSILON,fn[1]]),fn[1]Ve&&(it?fn=[fn[0],He+(fn[0]-Ve)]:fn=[fn[0],Ve-ge.EPSILON]);var li=pe.norm(pe.mul(fn[0]-nt[0],te[1][0])),Bi=pe.norm(pe.mul(fn[1]-nt[1],te[0][1]));if(li+Bidn&&(hn?Gn=qt+(Gn-dn):Gn=dn);var jn=pe.norm(pe.mul(Gn-sn,yt[1]));if(jnte)return ve.last(w.knots);var ue=w.knots[0],ye=0,we=ve.last(w.knots),Se=te,ze=0,He=0,Ve;for(O!=null?Ve=O:Ve=ge.TOLERANCE*2;Se-ye>Ve;)ze=(ue+we)/2,He=Qn.rationalBezierCurveArcLength(w,ze),He>M?(we=ze,Se=He):(ue=ze,ye=He);return(ue+we)/2},Qn.rationalCurveArcLength=function(w,M,O){O==null&&(O=16),M==null?M=ve.last(w.knots):M=M;for(var $=ii.decomposeCurveIntoBeziers(w),te=0,ue=$[0],ye=0;te<$.length&&ue.knots[0]+ge.EPSILONge.EPSILON)return!1}O=ve.last(w);for(var ye=w.length-M-1,we=w.length;yege.EPSILON)return!1}return An.isNonDecreasing(w)},An.isNonDecreasing=function(w){for(var M=ve.first(w),O=0,$=w.length;O<$;){var te=O++;if(w[te]te)return ue;for(var ye=M,we=0,Se=ye,ze=0,He=0,Ve;we=M[Se+1];)Se++;ye.push(Se),ue.push(lt.basisFunctionsGivenKnotSpanIndex(Se,we,w,M)),we+=te}return new Ce(ye,ue)},lt.regularlySpacedDerivativeBasisFunctions=function(w,M,O){for(var $=M.length-w-2,te=(ve.last(M)-M[0])/O,ue=[],ye=[],we=M[0],Se=lt.knotSpanGivenN($,w,we,M),ze=O+1,He=0;He=M[Se+1];)Se++;ye.push(Se),ue.push(lt.derivativeBasisFunctionsGivenNI(Se,we,w,$,M)),we+=te}return new Ce(ye,ue)},lt.surfacePointGivenBasesKnotSpans=function(w,M,O,$,te,ue,ye,we){for(var Se=pe.zeros1d(we),ze,He=$-w,Ve=te-M,je=0,it=M+1;je=Gn&&(yt[Pt][0]=yt[Dt][0]/ue[dn+1][qt],Vt=yt[Pt][0]*ue[qt][dn]),qt>=-1?hn=1:hn=-qt,ti-1<=dn?sn=Gn-1:sn=O-ti;for(var jn=hn,fn=sn+1;jn$[w+1]-ge.EPSILON)return w;if(O<$[M]+ge.EPSILON)return M;for(var te=M,ue=w+1,ye=Math.floor((te+ue)/2);O<$[ye]||O>=$[ye+1];)O<$[ye]?ue=ye:te=ye,ye=Math.floor((te+ue)/2);return ye},lt.dehomogenize=function(w){for(var M=w.length,O=[],$=w[M-1],te=w.length-1,ue=0;uege.EPSILON}),function(ye,we){var Se=pe.sub(ye.min.uv0,we.min.uv0),ze=pe.dot(Se,Se),He=pe.sub(ye.max.uv0,we.max.uv0),Ve=pe.dot(He,He),je=pe.sub(ye.min.uv0,we.max.uv0),it=pe.dot(je,je),nt=pe.sub(ye.max.uv0,we.min.uv0),Ct=pe.dot(nt,nt);return ze0&&(Ct.push(Ct[Ct.length-1].opp),Ve.push(Ct))}if(He.length==0&&te.length>0&&(it||je0;){var ye=$.pop(),we=te.pop();if(!(ye.empty()||we.empty())&&ye.boundingBox().intersects(we.boundingBox(),O)){var Se=ye.indivisible(O),ze=we.indivisible(O);if(Se&&ze){ue.push(new Ce(ye.yield(),we.yield()));continue}else if(Se&&!ze){var He=we.split();$.push(ye),te.push(He.item1),$.push(ye),te.push(He.item0);continue}else if(!Se&&ze){var Ve=ye.split();$.push(Ve.item1),te.push(we),$.push(Ve.item0),te.push(we);continue}var je=ye.split(),it=we.split();$.push(je.item1),te.push(it.item1),$.push(je.item1),te.push(it.item0),$.push(je.item0),te.push(it.item1),$.push(je.item0),te.push(it.item0)}}return ue},Un.curves=function(w,M,O){var $=Un.boundingBoxTrees(new Je(w),new Je(M),0);return ve.unique($.map(function(te){return Un.curvesWithEstimate(w,M,ve.first(te.item0.knots),ve.first(te.item1.knots),O)}).filter(function(te){return pe.distSquared(te.point0,te.point1)ze[it]+ge.EPSILON||((He==null||PtVe.u)&&(Ve=new at(Pt,pe.onRay(w.origin,w.dir,Pt),pe.onRay(ue[it],ye[it],Dt/ze[it]))))}}return Ve==null||He==null?null:new Ee(He,Ve)},Un.mergeTriangleClipIntervals=function(w,M,O,$,te,ue){if(M.min.u>w.max.u+ge.EPSILON||w.min.u>M.max.u+ge.EPSILON)return null;var ye;w.min.u>M.min.u?ye=new Ce(w.min,0):ye=new Ce(M.min,1);var we;w.max.uye&&(ue=1,ye=we),Se>ye&&(ue=2,ye=Se);var ze,He,Ve,je;ue==0?(ze=M[1],He=M[2],Ve=$[1],je=$[2]):ue==1?(ze=M[0],He=M[2],Ve=$[0],je=$[2]):(ze=M[0],He=M[1],Ve=$[0],je=$[1]);var it=-pe.dot(w,M),nt=-pe.dot(O,$),Ct=ze*je-He*Ve,yt=(He*nt-it*je)/Ct,Dt=(it*Ve-ze*nt)/Ct,Pt;return ue==0?Pt=[0,yt,Dt]:ue==1?Pt=[yt,0,Dt]:Pt=[yt,Dt,0],new ee(Pt,pe.normalized(te))},Un.threePlanes=function(w,M,O,$,te,ue){var ye=pe.cross(O,te),we=pe.dot(w,ye);if(Math.abs(we)1)return null;var Ct=pe.add(w,pe.mul(nt,He)),yt=pe.dot(we,Se),Dt=pe.dot(we,we),Pt=pe.dot(Se,Se),Vt=pe.sub(Ct,te),qt=pe.dot(Vt,we),dn=pe.dot(Vt,Se),hn=yt*yt-Dt*Pt;if(Math.abs(hn)1+ge.EPSILON||en>1+ge.EPSILON||en<-ge.EPSILON||sn<-ge.EPSILON||sn+en>1+ge.EPSILON?null:new Jt(Ct,sn,en,nt)},Un.segmentAndPlane=function(w,M,O,$){var te=pe.dot($,pe.sub(M,w));if(Math.abs(te)1+ge.EPSILON||ye<-ge.EPSILON?null:{p:ye}};var Yn=c.eval.Make=function(){};d["verb.eval.Make"]=Yn,Yn.__name__=["verb","eval","Make"],Yn.rationalTranslationalSurface=function(w,M){for(var O=lt.rationalCurvePoint(M,ve.first(M.knots)),$=ve.first(M.knots),te=ve.last(M.knots),ue=2*M.controlPoints.length,ye=(te-$)/(ue-1),we=[],Se=0;Se=0&&(He=He-ue[ye].mult);var Ve;He>0?Ve=ii.surfaceKnotRefine(w,pe.rep(He,M),O):Ve=w;var je=lt.knotSpan(te,M,$);return Math.abs(M-ve.first($))w.length-1&&(M=w.length-1);for(var $=w[0].knots,te=[],ue=[],ye=0,we=w[0].controlPoints.length;yege.EPSILON&&(gn=pe.mul(1/zn,gn),Vn=pe.mul(1/zn,Vn)),yt[0][sn]=te[sn];var qn=te[sn];Dt[0][sn]=ue[sn];for(var ti=Vn,Zn=0,bn=1,Gn=ye+1;bnM?w:M},ii.curveElevateDegree=function(w,M){if(M<=w.degree)return w;var O=w.knots.length-w.degree-2,$=w.degree,te=w.knots,ue=w.controlPoints,ye=M-w.degree,we=w.controlPoints[0].length,Se=pe.zeros2d($+ye+1,$+1),ze=[],He=[],Ve=[],je=O+$+1,it=M,nt=Math.floor(it/2),Ct=[],yt=[];Se[0][0]=1,Se[it][$]=1;for(var Dt=1,Pt=nt+1;Dt0?mr=Math.floor((so+2)/2):mr=1;var _a;if(Gn>0?_a=Math.floor(it-(Gn+1)/2):_a=it,Gn>0){for(var Jo=io-Bi,Ao=[],wa=$;wa>Is;)Ao[wa-Is-1]=Jo/(te[jn+wa]-Bi),wa--;for(var $a=1,iu=Gn+1;$a=Uh;)ze[ru]=pe.add(pe.mul(Ao[ru-Uh],ze[ru]),pe.mul(1-Ao[ru-Uh],ze[ru-1])),ru--;Ve[wS]=ze[$]}}for(var nv=mr,T1=it+1;nv1)for(var yp=bn-2,bp=bn,A1=io-Bi,iv=(io-yt[bn-1])/A1,_p=1;_psv;){if(vl=mr){if(cc-sv<=bn-it+so){var vd=(io-yt[cc-sv])/A1;He[uc]=pe.lerp(vd,He[uc],He[uc+1])}}else He[uc]=pe.lerp(iv,He[uc],He[uc+1]);vl=vl+1,cc=cc-1,uc=uc-1}yp=yp-1,bp=bp+1}if(jn!=$)for(var k1=0,yl=it-so;k1=0;){for(;M[zn]<=te[en]&&en>Se;)He[gn-O-1]=$[en-O-1],Ve[gn]=te[en],gn=gn-1,en=en-1;He[gn-O-1]=He[gn-O];for(var Vn=1,qn=O+1;Vn$||!ms.threePointsAreFlat(ue,ze,ye,$)){var je=M+(O-M)*.5,it=di.rationalCurveAdaptiveSampleRange(w,M,je,$,te),nt=di.rationalCurveAdaptiveSampleRange(w,je,O,$,te);return it.slice(0,-1).concat(nt)}else return te?[[M].concat(ue),[O].concat(ye)]:[ue,ye]},di.rationalSurfaceNaive=function(w,M,O){M<1&&(M=1),O<1&&(O=1),w.degreeU,w.degreeV,w.controlPoints;for(var $=w.knotsU,te=w.knotsV,ue=ve.last($)-$[0],ye=ve.last(te)-te[0],we=ue/M,Se=ye/O,ze=[],He=[],Ve=[],je=0,it=M+1;jeO?te=M.minDivsU=M.minDivsU:te=M.minDivsU=O;var ue;M.minDivsV>$?ue=M.minDivsV=M.minDivsV:ue=M.minDivsV=$;for(var ye=ve.last(w.knotsU),we=w.knotsU[0],Se=ve.last(w.knotsV),ze=w.knotsV[0],He=(ye-we)/te,Ve=(Se-ze)/ue,je=[],it=[],nt=0,Ct=ue+1;ntue.corners[0].uv[0]+te&&Se.uv[0]ue.corners[0].uv[1]+te&&Se.uv[1]=w.maxDepth)return!1;if(this.hasBadNormals())return this.fixNormals(),!1;if(this.splitVert=pe.normSquared(pe.sub(this.corners[0].normal,this.corners[1].normal))>w.normTol||pe.normSquared(pe.sub(this.corners[2].normal,this.corners[3].normal))>w.normTol,this.splitHoriz=pe.normSquared(pe.sub(this.corners[1].normal,this.corners[2].normal))>w.normTol||pe.normSquared(pe.sub(this.corners[3].normal,this.corners[0].normal))>w.normTol,this.splitVert||this.splitHoriz)return!0;var O=this.center();return pe.normSquared(pe.sub(O.normal,this.corners[0].normal))>w.normTol||pe.normSquared(pe.sub(O.normal,this.corners[1].normal))>w.normTol||pe.normSquared(pe.sub(O.normal,this.corners[2].normal))>w.normTol||pe.normSquared(pe.sub(O.normal,this.corners[3].normal))>w.normTol},divide:function(w){w==null&&(w=new mt),w.normTol==null&&(w.normTol=.085),w.minDepth==null&&(w.minDepth=0),w.maxDepth==null&&(w.maxDepth=10),this._divide(w,0,!0)},_divide:function(w,M,O){if(this.evalCorners(),!!this.shouldDivide(w,M)){if(M++,this.splitVert&&!this.splitHoriz?O=!1:!this.splitVert&&this.splitHoriz&&(O=!0),this.horizontal=O,this.horizontal){var $=[this.corners[0],this.corners[1],this.midpoint(1),this.midpoint(3)],te=[this.midpoint(3),this.midpoint(1),this.corners[2],this.corners[3]];this.children=[new on(this.srf,$),new on(this.srf,te)],this.children[0].neighbors=[this.neighbors[0],this.neighbors[1],this.children[1],this.neighbors[3]],this.children[1].neighbors=[this.children[0],this.neighbors[1],this.neighbors[2],this.neighbors[3]]}else{var ue=[this.corners[0],this.midpoint(0),this.midpoint(2),this.corners[3]],ye=[this.midpoint(0),this.corners[1],this.corners[2],this.midpoint(2)];this.children=[new on(this.srf,ue),new on(this.srf,ye)],this.children[0].neighbors=[this.neighbors[0],this.children[1],this.neighbors[2],this.neighbors[3]],this.children[1].neighbors=[this.neighbors[0],this.neighbors[1],this.neighbors[2],this.children[0]]}for(var we=0,Se=this.children;we0&&this._pool.length>0;){var M=this._queue.shift(),O=[M.id],$=[this._pool.shift()];this._working.h[O[0]]=$[0],$[0].onmessage=(function(te,ue){return function(ye){w._working.remove(ue[0]),w._pool.push(te[0]);try{w._callbacks.h.hasOwnProperty(ue[0])&&(w._callbacks.h[ue[0]](ye.data.result),w._callbacks.remove(ue[0]))}catch(we){we instanceof D&&(we=we.val),l.log(we)}w.processQueue()}})($,O),$[0].postMessage(M)}},__class__:Ci};var ji=function(w,M,O){this.className=w,this.methodName=M,this.args=O,this.id=ji.uuid++};d["verb.exe._WorkerPool.Work"]=ji,ji.__name__=["verb","exe","_WorkerPool","Work"],ji.prototype={__class__:ji};var Ie=function(){};d["verb.geom.ICurve"]=Ie,Ie.__name__=["verb","geom","ICurve"],Ie.__interfaces__=[jt],Ie.prototype={__class__:Ie};var tt=c.geom.NurbsCurve=function(w){this._data=An.isValidNurbsCurveData(w)};d["verb.geom.NurbsCurve"]=tt,tt.__name__=["verb","geom","NurbsCurve"],tt.__interfaces__=[Ie],tt.byKnotsControlPointsWeights=function(w,M,O,$){return new tt(new j(w,M.slice(),lt.homogenize1d(O,$)))},tt.byPoints=function(w,M){return M==null&&(M=3),new tt(Yn.rationalInterpCurve(w,M))},tt.__super__=Qe,tt.prototype=f(Qe.prototype,{degree:function(){return this._data.degree},knots:function(){return this._data.knots.slice(0)},controlPoints:function(){return lt.dehomogenize1d(this._data.controlPoints)},weights:function(){return lt.weight1d(this._data.controlPoints)},asNurbs:function(){return new j(this.degree(),this.knots(),lt.homogenize1d(this.controlPoints(),this.weights()))},clone:function(){return new tt(this._data)},domain:function(){return new Ee(ve.first(this._data.knots),ve.last(this._data.knots))},transform:function(w){return new tt(ii.rationalCurveTransform(this._data,w))},transformAsync:function(w){return ln.dispatchMethod(ii,"rationalCurveTransform",[this._data,w]).then(function(M){return new tt(M)})},point:function(w){return lt.rationalCurvePoint(this._data,w)},pointAsync:function(w){return ln.dispatchMethod(lt,"rationalCurvePoint",[this._data,w])},tangent:function(w){return lt.rationalCurveTangent(this._data,w)},tangentAsync:function(w){return ln.dispatchMethod(lt,"rationalCurveTangent",[this._data,w])},derivatives:function(w,M){return M==null&&(M=1),lt.rationalCurveDerivatives(this._data,w,M)},derivativesAsync:function(w,M){return M==null&&(M=1),ln.dispatchMethod(lt,"rationalCurveDerivatives",[this._data,w,M])},closestPoint:function(w){return Qn.rationalCurveClosestPoint(this._data,w)},closestPointAsync:function(w){return ln.dispatchMethod(Qn,"rationalCurveClosestPoint",[this._data,w])},closestParam:function(w){return Qn.rationalCurveClosestParam(this._data,w)},closestParamAsync:function(w){return ln.dispatchMethod(Qn,"rationalCurveClosestParam",[this._data,w])},length:function(){return Qn.rationalCurveArcLength(this._data)},lengthAsync:function(){return ln.dispatchMethod(Qn,"rationalCurveArcLength",[this._data])},lengthAtParam:function(w){return Qn.rationalCurveArcLength(this._data,w)},lengthAtParamAsync:function(){return ln.dispatchMethod(Qn,"rationalCurveArcLength",[this._data])},paramAtLength:function(w,M){return Qn.rationalCurveParamAtArcLength(this._data,w,M)},paramAtLengthAsync:function(w,M){return ln.dispatchMethod(Qn,"rationalCurveParamAtArcLength",[this._data,w,M])},divideByEqualArcLength:function(w){return ts.rationalCurveByEqualArcLength(this._data,w)},divideByEqualArcLengthAsync:function(w){return ln.dispatchMethod(ts,"rationalCurveByEqualArcLength",[this._data,w])},divideByArcLength:function(w){return ts.rationalCurveByArcLength(this._data,w)},divideByArcLengthAsync:function(w){return ln.dispatchMethod(ts,"rationalCurveByArcLength",[this._data,w])},split:function(w){return ts.curveSplit(this._data,w).map(function(M){return new tt(M)})},splitAsync:function(w){return ln.dispatchMethod(ts,"curveSplit",[this._data,w]).then(function(M){return M.map(function(O){return new tt(O)})})},reverse:function(){return new tt(ii.curveReverse(this._data))},reverseAsync:function(){return ln.dispatchMethod(ii,"curveReverse",[this._data]).then(function(w){return new tt(w)})},tessellate:function(w){return di.rationalCurveAdaptiveSample(this._data,w,!1)},tessellateAsync:function(w){return ln.dispatchMethod(di,"rationalCurveAdaptiveSample",[this._data,w,!1])},__class__:tt});var bt=c.geom.Arc=function(w,M,O,$,te,ue){tt.call(this,Yn.arc(w,M,O,$,te,ue)),this._center=w,this._xaxis=M,this._yaxis=O,this._radius=$,this._minAngle=te,this._maxAngle=ue};d["verb.geom.Arc"]=bt,bt.__name__=["verb","geom","Arc"],bt.__super__=tt,bt.prototype=f(tt.prototype,{center:function(){return this._center},xaxis:function(){return this._xaxis},yaxis:function(){return this._yaxis},radius:function(){return this._radius},minAngle:function(){return this._minAngle},maxAngle:function(){return this._maxAngle},__class__:bt});var St=c.geom.BezierCurve=function(w,M){tt.call(this,Yn.rationalBezierCurve(w,M))};d["verb.geom.BezierCurve"]=St,St.__name__=["verb","geom","BezierCurve"],St.__super__=tt,St.prototype=f(tt.prototype,{__class__:St});var ft=c.geom.Circle=function(w,M,O,$){bt.call(this,w,M,O,$,0,Math.PI*2)};d["verb.geom.Circle"]=ft,ft.__name__=["verb","geom","Circle"],ft.__super__=bt,ft.prototype=f(bt.prototype,{__class__:ft});var nn=function(){};d["verb.geom.ISurface"]=nn,nn.__name__=["verb","geom","ISurface"],nn.__interfaces__=[jt],nn.prototype={__class__:nn};var Ye=c.geom.NurbsSurface=function(w){this._data=An.isValidNurbsSurfaceData(w)};d["verb.geom.NurbsSurface"]=Ye,Ye.__name__=["verb","geom","NurbsSurface"],Ye.__interfaces__=[nn],Ye.byKnotsControlPointsWeights=function(w,M,O,$,te,ue){return new Ye(new he(w,M,O,$,lt.homogenize2d(te,ue)))},Ye.byCorners=function(w,M,O,$){return new Ye(Yn.fourPointSurface(w,M,O,$))},Ye.byLoftingCurves=function(w,M){return new Ye(Yn.loftedSurface((function(O){for(var $,te=[],ue=0;uenew Yt(r)),this._closed=n,this._curveType=i,this._tension=s}get points(){return this._points}get closed(){return this._closed}get curveType(){return this._curveType}get tension(){return this._tension}get startPoint(){return this._points.length>0?this._points[0]:new Yt}get endPoint(){return this._points.length>0?this._points[this._points.length-1]:new Yt}get length(){if(this._points.length<2)return 0;let e=0;for(let n=1;n2&&(e+=this._points[this._points.length-1].distanceTo(this._points[0])),e}getPoint(e,n=new Yt){const i=n,s=this._points,r=s.length;if(r===0)return i.set(0,0,0);if(r===1)return i.copy(s[0]);const o=(r-(this._closed?0:1))*e;let a=Math.floor(o),l=o-a;this._closed?a+=a>0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this._closed||a>0?c=s[(a-1)%r]:(this._tmp.subVectors(s[0],s[1]).add(s[0]),c=new Yt(this._tmp.x,this._tmp.y,this._tmp.z));const d=s[a%r],h=s[(a+1)%r];if(this._closed||a+2new Yt(n)),this._boundingBoxNeedsUpdate=!0}setClosed(e){this._closed!==e&&(this._closed=e,this._boundingBoxNeedsUpdate=!0)}setCurveType(e){this._curveType=e}setTension(e){this._tension=e}transform(e){return this._points=this._points.map(n=>{const i=new Yt;return i.copy(n),i.applyMatrix4(e),i}),this._boundingBoxNeedsUpdate=!0,this}calculateBoundingBox(){if(this._points.length===0)return new Zi;const e=new Zi;return this._points.forEach(n=>{e.expandByPoint(n)}),e}},D5=class mw{constructor(e,n,i,s){this._degree=e,this._knots=[...n],this._controlPoints=i.map(r=>({x:r.x,y:r.y,z:r.z})),this._weights=s?[...s]:new Array(i.length).fill(1)}degree(){return this._degree}knots(){return[...this._knots]}controlPoints(){return this._controlPoints.map(e=>({x:e.x,y:e.y,z:e.z}))}weights(){return[...this._weights]}point(e){const n=this._controlPoints.map(i=>[i.x,i.y,i.z]);return fw(e,this._degree,this._knots,n,this._weights)}length(){const e=this._controlPoints.map(n=>[n.x,n.y,n.z]);return ULe(this._degree,this._knots,e,this._weights)}static byKnotsControlPointsWeights(e,n,i,s){return new mw(e,n,i,s)}static byPoints(e,n,i="Uniform"){let s;switch(i){case"Chord":s=FLe(n,e);break;case"SqrtChord":s=zLe(n,e);break;default:s=BLe(n,e.length);break}const r=e.map(a=>({x:a[0],y:a[1],z:a[2]})),o=new Array(r.length).fill(1);return new mw(n,s,r,o)}getParameterRange(){const e=this._knots[this._degree],n=this._knots[this._knots.length-this._degree-1];return{start:e,end:n}}getPoints(e){const n=[],{start:i,end:s}=this.getParameterRange();for(let r=0;r<=e;r++){const o=i+(s-i)*(r/e);n.push(this.point(o))}return n}isClosed(e=1e-6){const{start:n,end:i}=this.getParameterRange(),s=this.point(n),r=this.point(i),o=s[0]-r[0],a=s[1]-r[1],l=s[2]-r[2];return Math.sqrt(o*o+a*a+l*l)[r.x,r.y,r.z]);return mw.byPoints(s,n,i)}},Qf=class zV extends h1{constructor(e,n,i,s,r){super();const o=arguments.length;if(o<2||o>5)throw ll.ILLEGAL_PARAMETERS;if(this._degree=3,this._closed=!1,Array.isArray(n)){this._controlPoints=e;let a,l=3,c=!1;if(o>=3&&(Array.isArray(i)?(a=i,o>=4&&(l=s||3),o>=5&&(c=r)):i!==void 0&&(l=i||3,o>=4&&(c=s))),i===void 0&&o>=4&&(l=s||3,o>=5&&(c=r)),this._degree=l,this._closed=c,this._controlPoints.length=3&&(this._degree=i||3),o>=4&&(this._closed=s),this._fitPoints.length=n?n-1:e,s=this._fitPoints[i];return{x:s.x,y:s.y,z:s.z||0}}getControlPointAt(e){const n=this._controlPoints.length,i=e<0||e>=n?n-1:e;return this._controlPoints[i]}getPoints(e=100){const n=this._nurbsCurve,i=[],s=n.knots(),r=this._nurbsCurve.degree(),o=s[r],a=s[s.length-r-1],l=(a-o)/(e-1);for(let c=0;c{n[s]=[i.x,i.y,i.z||0]}),n}toVerbPoints(e){const n=new Array(e.length);return e.forEach((i,s)=>{n[s]=[i.x,i.y,i.z||0]}),n}toGePoints(e){const n=new Array(e.length);return e.forEach((i,s)=>{n[s]={x:i[0],y:i[1],z:i[2]}}),n}static createClosedSpline(e,n="Uniform",i=3){if(e.length(t.ClosedFilled="",t.Dot="_DOT",t.DotSmall="_DOTSMALL",t.DotBlank="_DOTBLANK",t.Origin="_ORIGIN",t.Origin2="_ORIGIN2",t.Open="_OPEN",t.Open90="_OPEN90",t.Open30="_OPEN30",t.Closed="_CLOSED",t.Small="_SMALL",t.None="_NONE",t.Oblique="_OBLIQUE",t.BoxFilled="_BOXFILLED",t.Box="_BOXBLANK",t.ClosedBlank="_CLOSEDBLANK",t.DatumBlank="_DATUMBLANK",t.DatumFilled="_DATUMFILLED",t.Integral="_INTEGRAL",t.ArchTick="_ARCHTICK",t))(UV||{}),ep=(t=>(t[t.ByBlock=-2]="ByBlock",t[t.ByDIPs=-4]="ByDIPs",t[t.ByLayer=-1]="ByLayer",t[t.ByLineWeightDefault=-3]="ByLineWeightDefault",t[t.LineWeight000=0]="LineWeight000",t[t.LineWeight005=5]="LineWeight005",t[t.LineWeight009=9]="LineWeight009",t[t.LineWeight013=13]="LineWeight013",t[t.LineWeight015=15]="LineWeight015",t[t.LineWeight018=18]="LineWeight018",t[t.LineWeight020=20]="LineWeight020",t[t.LineWeight025=25]="LineWeight025",t[t.LineWeight030=30]="LineWeight030",t[t.LineWeight035=35]="LineWeight035",t[t.LineWeight040=40]="LineWeight040",t[t.LineWeight050=50]="LineWeight050",t[t.LineWeight053=53]="LineWeight053",t[t.LineWeight060=60]="LineWeight060",t[t.LineWeight070=70]="LineWeight070",t[t.LineWeight080=80]="LineWeight080",t[t.LineWeight090=90]="LineWeight090",t[t.LineWeight100=100]="LineWeight100",t[t.LineWeight106=106]="LineWeight106",t[t.LineWeight120=120]="LineWeight120",t[t.LineWeight140=140]="LineWeight140",t[t.LineWeight158=158]="LineWeight158",t[t.LineWeight200=200]="LineWeight200",t[t.LineWeight211=211]="LineWeight211",t))(ep||{}),Zd=(t=>(t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",t[t.BY_STYLE=5]="BY_STYLE",t))(Zd||{}),Uo=(t=>(t[t.TopLeft=1]="TopLeft",t[t.TopCenter=2]="TopCenter",t[t.TopRight=3]="TopRight",t[t.MiddleLeft=4]="MiddleLeft",t[t.MiddleCenter=5]="MiddleCenter",t[t.MiddleRight=6]="MiddleRight",t[t.BottomLeft=7]="BottomLeft",t[t.BottomCenter=8]="BottomCenter",t[t.BottomRight=9]="BottomRight",t))(Uo||{}),$V=(t=>(t[t.OPTIMIZED_2D=0]="OPTIMIZED_2D",t[t.WIREFRAME=1]="WIREFRAME",t[t.HIDDEN_LINE=2]="HIDDEN_LINE",t[t.FLAT_SHADED=3]="FLAT_SHADED",t[t.GOURAUD_SHADED=4]="GOURAUD_SHADED",t[t.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",t[t.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME",t))($V||{}),VV=(t=>(t[t.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",t[t.TOP=1]="TOP",t[t.BOTTOM=2]="BOTTOM",t[t.FRONT=3]="FRONT",t[t.BACK=4]="BACK",t[t.LEFT=5]="LEFT",t[t.RIGHT=6]="RIGHT",t))(VV||{}),HV=(t=>(t[t.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",t[t.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS",t))(HV||{});let ZLe=class WV{constructor(){this._number=-1,this._id="",this._groupId="",this._centerPoint=new Yt,this._height=0,this._width=0,this._viewCenter=new Yt,this._viewHeight=0}get number(){return this._number}set number(e){this._number=e}get id(){return this._id}set id(e){this._id=e}get groupId(){return this._groupId}set groupId(e){this._groupId=e}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint.copy(e)}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get box(){const e=new ar;return e.setFromCenterAndSize(this.centerPoint,{x:this.width,y:this.height}),e}get viewCenter(){return this._viewCenter}set viewCenter(e){this._viewCenter.copy(e)}get viewHeight(){return this._viewHeight}set viewHeight(e){this._viewHeight=e}get viewWidth(){return this.viewHeight*(this.width/this.height)}get viewBox(){const e=new ar;return e.setFromCenterAndSize(this.viewCenter,{x:this.viewWidth,y:this.viewHeight}),e}clone(){const e=new WV;return e.id=this.id,e.groupId=this.groupId,e.number=this.number,e.centerPoint.copy(this.centerPoint),e.height=this.height,e.width=this.width,e.viewCenter.copy(this.viewCenter),e.viewHeight=this.viewHeight,e}copy(e){return this.id=e.id,this.groupId=e.groupId,this.number=e.number,this.centerPoint.copy(e.centerPoint),this.height=e.height,this.width=e.width,this.viewCenter.copy(e.viewCenter),this.viewHeight=e.viewHeight,this}};var Mf=256,GV=[],N5=256,gb;for(;Mf--;)GV[Mf]=(Mf+256).toString(16).substring(1);function JLe(t){var e=0,n=11;if(!gb||Mf+n>N5*2)for(gb="",Mf=0;ethis.objectId}},{name:"color",type:"color",editable:!0,accessor:{get:()=>this.color,set:e=>{this.color.copy(e)}}},{name:"layer",type:"string",editable:!0,accessor:{get:()=>this.layer,set:e=>{this.layer=e}}},{name:"linetype",type:"linetype",editable:!0,accessor:{get:()=>this.lineType,set:e=>{this.lineType=e}}},{name:"linetypeScale",type:"float",editable:!0,accessor:{get:()=>this.linetypeScale,set:e=>{this.linetypeScale=e}}},{name:"lineWeight",type:"lineweight",editable:!0,accessor:{get:()=>this.lineWeight,set:e=>{this.lineWeight=e}}},{name:"transparency",type:"transparency",editable:!0,accessor:{get:()=>this.transparency,set:e=>{this.transparency=e}}}]}}get lineStyle(){var e;const{type:n,name:i}=this.getLineType(),s=(e=this.database)==null?void 0:e.tables.linetypeTable.getAt(i);return s?{type:n,...s.linetype}:{type:n,name:i,standardFlag:0,description:"",totalPatternLength:0}}getLineType(){if(this.lineType==wE){const e=this.database.tables.layerTable.getAt(this.layer);if(e&&e.linetype)return{type:"ByLayer",name:e.linetype}}else return this.lineType==gLe?{type:"ByBlock",name:TM}:{type:"UserSpecified",name:this.lineType};return{type:"UserSpecified",name:TM}}getLayerColor(){const e=this.database.tables.layerTable.getAt(this.layer);if(e==null)console.error(`The layer with name '${this.layer}' not found in drawing database!`);else return e.color;return null}attachEntityInfo(e){e&&(e.objectId=this.objectId,this.attrs.has("ownerId")&&(e.ownerId=this.ownerId),e.layerName=this.layer,e.visible=this.visibility)}};jV.typeName="Entity";let fl=jV;const KV=class extends fl{};KV.typeName="Curve";let pl=KV;var Bu=(t=>(t[t.SimplePoly=0]="SimplePoly",t[t.FitCurvePoly=1]="FitCurvePoly",t[t.QuadSplinePoly=2]="QuadSplinePoly",t[t.CubicSplinePoly=3]="CubicSplinePoly",t))(Bu||{});const qV=class extends pl{constructor(e,n,i=0,s=!1,r=0,o=0,a=null){super(),this._polyType=e,this._elevation=i;const l=a&&a?.length===n.length,c=n.map((u,d)=>({x:u.x,y:u.y,bulge:l?a[d]:void 0}));this._geo=new pp(c,s)}get polyType(){return this._polyType}set polyType(e){this._polyType=e}get elevation(){return this._elevation}set elevation(e){this._elevation=e}get closed(){return this._geo.closed}set closed(e){this._geo.closed=e}get geometricExtents(){const e=this._geo.box;return new Zi({x:e.min.x,y:e.min.y,z:this._elevation},{x:e.max.x,y:e.max.y,z:this._elevation})}subGetGripPoints(){const e=new Array;for(let n=0;nn.push(new Yt().set(i.x,i.y,this.elevation))),e.lines(n)}};qV.typeName="2dPolyline";let YV=qV;const QLe=class extends fl{constructor(){super(),this._position=new Yt,this._bulge=0,this._startWidth=0,this._endWidth=0,this._vertexType=0}get position(){return this._position}set position(e){this._position.copy(e)}get bulge(){return this._bulge}set bulge(e){this._bulge=e}get startWidth(){return this._startWidth}set startWidth(e){this._startWidth=e}get endWidth(){return this._endWidth}set endWidth(e){this._endWidth=e}get vertexType(){return this._vertexType}set vertexType(e){this._vertexType=e}get geometricExtents(){return new Zi().expandByPoint(this._position)}subGetGripPoints(){const e=new Array;return e.push(this._position),e}subGetOsnapPoints(e,n,i,s){s.push(this._position)}transformBy(e){return this._position.applyMatrix4(e),this}subWorldDraw(e){}};QLe.typeName="2dVertex";var zf=(t=>(t[t.SimplePoly=0]="SimplePoly",t[t.QuadSplinePoly=1]="QuadSplinePoly",t[t.CubicSplinePoly=2]="CubicSplinePoly",t))(zf||{});const XV=class extends pl{constructor(e,n,i=!1){super(),this._polyType=e,this._geo=new pp(n,i)}get polyType(){return this._polyType}set polyType(e){this._polyType=e}get closed(){return this._geo.closed}set closed(e){this._geo.closed=e}get geometricExtents(){const e=this._geo.box;return new Zi({x:e.min.x,y:e.min.y,z:0},{x:e.max.x,y:e.max.y,z:0})}subGetGripPoints(){const e=new Array;for(let n=0;nn.push(new Yt().set(i.x,i.y,0))),e.lines(n)}};XV.typeName="3dPolyline";let ZV=XV;const eIe=class extends fl{constructor(){super(),this._position=new Yt,this._vertexType=0}get position(){return this._position}set position(e){this._position.copy(e)}get vertexType(){return this._vertexType}set vertexType(e){this._vertexType=e}get geometricExtents(){return new Zi().expandByPoint(this._position)}subGetGripPoints(){const e=new Array;return e.push(this._position),e}subGetOsnapPoints(e,n,i,s){s.push(this._position)}transformBy(e){return this._position.applyMatrix4(e),this}subWorldDraw(e){}};eIe.typeName="3dVertex";const JV=class extends pl{constructor(e,n,i,s,r=pn.Z_AXIS){super(),this._geo=new RV(e,n,i,s,r,pn.X_AXIS)}get center(){return this._geo.center}set center(e){this._geo.center=e}get radius(){return this._geo.radius}set radius(e){this._geo.radius=e}get startAngle(){return this._geo.startAngle}set startAngle(e){this._geo.startAngle=e}get endAngle(){return this._geo.endAngle}set endAngle(e){this._geo.endAngle=e}get normal(){return this._geo.normal}set normal(e){this._geo.normal=e}get startPoint(){return this._geo.startPoint}get endPoint(){return this._geo.endPoint}get midPoint(){return this._geo.midPoint}get geometricExtents(){return this._geo.box}get closed(){return this._geo.closed}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:()=>this.center.x,set:e=>{this.center.x=e}}},{name:"centerY",type:"float",editable:!0,accessor:{get:()=>this.center.y,set:e=>{this.center.y=e}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:()=>this.center.z,set:e=>{this.center.z=e}}},{name:"radius",type:"float",editable:!0,accessor:{get:()=>this.radius,set:e=>{this.radius=e}}},{name:"startAngle",type:"float",editable:!0,accessor:{get:()=>this.startAngle,set:e=>{this.startAngle=e}}},{name:"endAngle",type:"float",editable:!0,accessor:{get:()=>this.endAngle,set:e=>{this.endAngle=e}}},{name:"normalX",type:"float",editable:!0,accessor:{get:()=>this.normal.x,set:e=>{this.normal.x=e}}},{name:"normalY",type:"float",editable:!0,accessor:{get:()=>this.normal.y,set:e=>{this.normal.y=e}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:()=>this.normal.z,set:e=>{this.normal.z=e}}},{name:"arcLength",type:"float",editable:!1,accessor:{get:()=>this._geo.length}},{name:"totalAngle",type:"float",editable:!1,accessor:{get:()=>Ui.radToDeg(Math.abs(this._geo.deltaAngle))}},{name:"area",type:"float",editable:!1,accessor:{get:()=>this._geo.area}}]}]}}subGetGripPoints(){const e=new Array;return e.push(this.center),e.push(this.startPoint),e.push(this.endPoint),e}subGetOsnapPoints(e,n,i,s){const r=this.startPoint,o=this.endPoint;switch(e){case cs.EndPoint:s.push(r),s.push(o);break;case cs.MidPoint:s.push(this.midPoint);break;case cs.Nearest:{const a=this._geo.nearestPoint(n);s.push(a)}break;case cs.Perpendicular:break;case cs.Tangent:{const a=this._geo.tangentPoints(n);s.push(...a);break}}}transformBy(e){return this._geo.transform(e),this}subWorldDraw(e){return e.circularArc(this._geo)}};JV.typeName="Arc";let QV=JV;const eH=class extends fl{constructor(e){super(),this._blockName=e,this._position=new Yt,this._rotation=0,this._normal=new pn(0,0,1),this._scaleFactors=new Yt(1,1,1)}get position(){return this._position}set position(e){this._position.copy(e)}get rotation(){return this._rotation}set rotation(e){this._rotation=e}get scaleFactors(){return this._scaleFactors}set scaleFactors(e){this._scaleFactors.copy(e)}get normal(){return this._normal}set normal(e){this._normal.copy(e).normalize()}get blockTableRecord(){return this.database.tables.blockTable.getAt(this._blockName)}get blockTransform(){const e=this.blockTableRecord,n=e?.origin??Yt.ORIGIN,i=new Vo().makeScale(this._scaleFactors.x,this._scaleFactors.y,this._scaleFactors.z),s=new ay().setFromAxisAngle(pn.Z_AXIS,this._rotation),r=new Vo().makeRotationFromQuaternion(s),o=new Vo;o.setFromExtrusionDirection(this._normal);const a=new Vo().makeTranslation(-n.x,-n.y,-n.z),l=new Vo().makeTranslation(this._position.x,this._position.y,this._position.z);return new Vo().multiplyMatrices(l,o).multiply(r).multiply(i).multiply(a)}subGetOsnapPoints(e,n,i,s){cs.Insertion===e&&s.push(this._position)}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"blockName",type:"float",editable:!1,accessor:{get:()=>this._blockName}},{name:"positionX",type:"float",editable:!0,accessor:{get:()=>this.position.x,set:e=>{this.position.x=e}}},{name:"positionY",type:"float",editable:!0,accessor:{get:()=>this.position.y,set:e=>{this.position.y=e}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:()=>this.position.z,set:e=>{this.position.z=e}}},{name:"rotation",type:"float",editable:!0,accessor:{get:()=>this.rotation,set:e=>{this.rotation=e}}},{name:"scaleFactorsX",type:"float",editable:!0,accessor:{get:()=>this.scaleFactors.x,set:e=>{this.scaleFactors.x=e}}},{name:"scaleFactorsY",type:"float",editable:!0,accessor:{get:()=>this.scaleFactors.y,set:e=>{this.scaleFactors.y=e}}},{name:"scaleFactorsZ",type:"float",editable:!0,accessor:{get:()=>this.scaleFactors.z,set:e=>{this.scaleFactors.z=e}}},{name:"normalX",type:"float",editable:!0,accessor:{get:()=>this.normal.x,set:e=>{this.normal.x=e}}},{name:"normalY",type:"float",editable:!0,accessor:{get:()=>this.normal.y,set:e=>{this.normal.y=e}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:()=>this.normal.z,set:e=>{this.normal.z=e}}}]}]}}get geometricExtents(){const e=new Zi,n=this.blockTableRecord;if(n!=null){const r=n.newIterator();for(const o of r)e.union(o.geometricExtents)}const i=new ay().setFromEuler(new GLe(this.rotation,0,0)),s=new Vo;return s.compose(this.position,i,this.scaleFactors),e.applyMatrix4(s),e}subWorldDraw(e){const n=[],i=this.blockTableRecord;if(i!=null){const s=this.blockTransform,r=L4.instance.draw(e,i,this.rgbColor,!0,s);return this.attachEntityInfo(r),r}else{const s=e.group(n);return this.attachEntityInfo(s),s}}};eH.typeName="BlockReference";let qx=eH;const tH=class extends pl{constructor(e,n,i=pn.Z_AXIS){super(),this._geo=new RV(e,n,0,Xs,i,pn.X_AXIS)}get center(){return this._geo.center}set center(e){this._geo.center=e}get radius(){return this._geo.radius}set radius(e){this._geo.radius=e}get normal(){return this._geo.normal}get geometricExtents(){return this._geo.box}get closed(){return this._geo.closed}subGetOsnapPoints(e,n,i,s){switch(e){case cs.Center:case cs.Centroid:s.push(this._geo.center);break;case cs.Quadrant:s.push(this._geo.getPointAtAngle(0)),s.push(this._geo.getPointAtAngle(Math.PI/2)),s.push(this._geo.getPointAtAngle(Math.PI)),s.push(this._geo.getPointAtAngle(Math.PI/2*3));break;case cs.Nearest:{const r=this._geo.nearestPoint(n);s.push(r)}break;case cs.Tangent:{const r=this._geo.tangentPoints(n);s.push(...r);break}}}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:()=>this.center.x,set:e=>{this.center.x=e}}},{name:"centerY",type:"float",editable:!0,accessor:{get:()=>this.center.y,set:e=>{this.center.y=e}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:()=>this.center.z,set:e=>{this.center.z=e}}},{name:"radius",type:"float",editable:!0,accessor:{get:()=>this.radius,set:e=>{this.radius=e}}},{name:"normalX",type:"float",editable:!0,accessor:{get:()=>this.normal.x,set:e=>{this.normal.x=e}}},{name:"normalY",type:"float",editable:!0,accessor:{get:()=>this.normal.y,set:e=>{this.normal.y=e}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:()=>this.normal.z,set:e=>{this.normal.z=e}}},{name:"diameter",type:"float",editable:!1,accessor:{get:()=>this._geo.radius*2}},{name:"perimeter",type:"float",editable:!1,accessor:{get:()=>this._geo.length}},{name:"area",type:"float",editable:!1,accessor:{get:()=>this._geo.area}}]}]}}subGetGripPoints(){const e=new Array;return e.push(this.center),e}transformBy(e){return this._geo.transform(e),this}subWorldDraw(e){return e.circularArc(this._geo)}};tH.typeName="Circle";let Yx=tH;const nH=class extends pl{constructor(e,n,i,s,r,o,a){super(),this._geo=new KLe(e,n,i,s,r,o,a)}get center(){return this._geo.center}set center(e){this._geo.center=e}get majorAxisRadius(){return this._geo.majorAxisRadius}set majorAxisRadius(e){this._geo.majorAxisRadius=e}get minorAxisRadius(){return this._geo.minorAxisRadius}set minorAxisRadius(e){this._geo.minorAxisRadius=e}get startAngle(){return this._geo.startAngle}set startAngle(e){this._geo.startAngle=e}get endAngle(){return this._geo.endAngle}set endAngle(e){this._geo.endAngle=e}get normal(){return this._geo.normal}set normal(e){this._geo.normal=e}get geometricExtents(){return this._geo.box}get closed(){return this._geo.closed}subGetOsnapPoints(e,n,i,s){switch(e){case cs.EndPoint:this.closed||(s.push(this._geo.startPoint),s.push(this._geo.endPoint));break;case cs.MidPoint:this.closed||s.push(this._geo.midPoint);break;case cs.Quadrant:this.closed&&(s.push(this._geo.getPointAtAngle(0)),s.push(this._geo.getPointAtAngle(Math.PI/2)),s.push(this._geo.getPointAtAngle(Math.PI)),s.push(this._geo.getPointAtAngle(Math.PI/2*3)));break}}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"centerX",type:"float",editable:!0,accessor:{get:()=>this.center.x,set:e=>{this.center.x=e}}},{name:"centerY",type:"float",editable:!0,accessor:{get:()=>this.center.y,set:e=>{this.center.y=e}}},{name:"centerZ",type:"float",editable:!0,accessor:{get:()=>this.center.z,set:e=>{this.center.z=e}}},{name:"majorAxisRadius",type:"float",editable:!0,accessor:{get:()=>this.majorAxisRadius,set:e=>{this.center.x=e}}},{name:"minorAxisRadius",type:"float",editable:!0,accessor:{get:()=>this.minorAxisRadius,set:e=>{this.minorAxisRadius=e}}},{name:"startAngle",type:"float",editable:!0,accessor:{get:()=>this.startAngle,set:e=>{this.startAngle=e}}},{name:"endAngle",type:"float",editable:!0,accessor:{get:()=>this.endAngle,set:e=>{this.endAngle=e}}},{name:"normalX",type:"float",editable:!0,accessor:{get:()=>this.normal.x,set:e=>{this.normal.x=e}}},{name:"normalY",type:"float",editable:!0,accessor:{get:()=>this.normal.y,set:e=>{this.normal.y=e}}},{name:"normalZ",type:"float",editable:!0,accessor:{get:()=>this.normal.z,set:e=>{this.normal.z=e}}},{name:"length",type:"float",editable:!1,accessor:{get:()=>this._geo.length}},{name:"area",type:"float",editable:!1,accessor:{get:()=>this._geo.area}}]}]}}subWorldDraw(e){return e.ellipticalArc(this._geo)}};nH.typeName="Ellipse";let iH=nH;const sH=class extends fl{constructor(){super(),this._vertices=[new Yt,new Yt,new Yt],this._edgeInvisibilities=0}getVertexAt(e){return e<0?this._vertices[0]:e>this._vertices.length?this._vertices[this._vertices.length-1]:this._vertices[e]}setVertexAt(e,n){if(e<0&&this._vertices[0].copy(n),e>=3)return this._vertices.length===3&&this._vertices.push(new Yt),this._vertices[3].copy(n);this._vertices[e].copy(n)}setEdgeInvisibilities(e){this._edgeInvisibilities=e}isEdgeVisibleAt(e){if(e<0||e>3)throw new Error("Index out of range");return(this._edgeInvisibilities&1<3)throw new Error("Index out of range");this._edgeInvisibilities=this._edgeInvisibilities|1<(t[t.UserDefined=0]="UserDefined",t[t.Predefined=1]="Predefined",t[t.Custom=2]="Custom",t))(gw||{});const oH=class extends fl{constructor(){super(),this._elevation=0,this._geo=new R4,this._isSolidFill=!1,this._definitionLines=[],this._patternName="",this._patternType=1,this._patternAngle=0,this._patternScale=1,this._hatchStyle=0}get isSolidFill(){return this._isSolidFill||this._patternName.toUpperCase()==="SOLID"}set isSolidFill(e){this._isSolidFill=e}get definitionLines(){return this._definitionLines}get patternName(){return this._patternName}set patternName(e){this._patternName=e}get patternType(){return this._patternType}set patternType(e){this._patternType=e}get patternAngle(){return this._patternAngle}set patternAngle(e){this._patternAngle=e}get patternScale(){return this._patternScale}set patternScale(e){this._patternScale=e}get hatchStyle(){return this._hatchStyle}set hatchStyle(e){this._hatchStyle=e}get elevation(){return this._elevation}set elevation(e){this._elevation=e}add(e){this._geo.add(e)}get geometricExtents(){const e=this._geo.box;return new Zi({x:e.min.x,y:e.min.y,z:this._elevation},{x:e.max.x,y:e.max.y,z:this._elevation})}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"pattern",properties:[{name:"patternType",type:"enum",editable:!0,options:[{label:gw[0],value:0},{label:gw[1],value:1},{label:gw[2],value:2}],accessor:{get:()=>this.patternType,set:e=>{this.patternType=e}}},{name:"patternName",type:"string",editable:!0,accessor:{get:()=>this.patternName,set:e=>{this.patternName=e}}},{name:"patternAngle",type:"float",editable:!0,accessor:{get:()=>this.patternAngle,set:e=>{this.patternAngle=e}}},{name:"patternScale",type:"float",editable:!0,accessor:{get:()=>this.patternScale,set:e=>{this.patternScale=e}}}]},{groupName:"geometry",properties:[{name:"elevation",type:"float",editable:!0,accessor:{get:()=>this.elevation,set:e=>{this.elevation=e}}},{name:"area",type:"float",editable:!1,accessor:{get:()=>this._geo.area}}]}]}}subWorldDraw(e){const n=e.subEntityTraits;return n.fillType={solidFill:this.isSolidFill,patternAngle:this.patternAngle,patternLines:this.definitionLines},e.area(this._geo)}};oH.typeName="Hatch";let D4=oH;const aH=class extends pl{constructor(){super(),this._isSplined=!1,this._updated=!1,this._hasArrowHead=!1,this._vertices=[],this._dimensionStyle="",this._hasHookLine=!1,this._annoType=3}get isSplined(){return this._isSplined}set isSplined(e){this._isSplined=e}get hasArrowHead(){return this._hasArrowHead}set hasArrowHead(e){this._hasArrowHead=e}get hasHookLine(){return this._hasHookLine}set hasHookLine(e){this._hasHookLine=e}get numVertices(){return this._vertices.length}get dimensionStyle(){return this._dimensionStyle}set dimensionStyle(e){this._dimensionStyle=e}get annoType(){return this._annoType}set annoType(e){this._annoType=e}appendVertex(e){this._vertices.push(new Yt().copy(e)),this._updated=!0}setVertexAt(e,n){throw(e<0||e>=this._vertices.length)&&(this._vertices[e].copy(n),this._updated=!0),new Error("The vertex index is out of range!")}vertexAt(e){throw(e<0||e>=this._vertices.length)&&this._vertices[e],new Error("The vertex index is out of range!")}get geometricExtents(){return this._isSplined&&this.splineGeo?this.splineGeo.calculateBoundingBox():new Zi().setFromPoints(this._vertices)}get closed(){return!1}set closed(e){}subWorldDraw(e){if(this.isSplined&&this.splineGeo){const n=this.splineGeo.getPoints(100);return e.lines(n)}else return e.lines(this._vertices)}get splineGeo(){return this.createSplineIfNeeded(),this._splineGeo}createSplineIfNeeded(){this.isSplined&&this.numVertices>=2&&(this._splineGeo==null||this._updated)&&(this._splineGeo=new Qf(this._vertices,"Uniform"),this._updated=!1)}};aH.typeName="Leader";let lH=aH;var cs=(t=>(t[t.EndPoint=1]="EndPoint",t[t.MidPoint=2]="MidPoint",t[t.Center=3]="Center",t[t.Node=4]="Node",t[t.Quadrant=5]="Quadrant",t[t.Insertion=7]="Insertion",t[t.Perpendicular=8]="Perpendicular",t[t.Tangent=9]="Tangent",t[t.Nearest=10]="Nearest",t[t.Centroid=11]="Centroid",t))(cs||{});const cH=class extends pl{constructor(e,n){super(),this._geo=new ly(e,n)}get startPoint(){return this._geo.startPoint}set startPoint(e){this._geo.startPoint=e}get endPoint(){return this._geo.endPoint}set endPoint(e){this._geo.endPoint=e}get midPoint(){return this._geo.midPoint}get geometricExtents(){return this._geo.box}get closed(){return!1}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"startX",type:"float",editable:!0,accessor:{get:()=>this.startPoint.x,set:e=>{this.startPoint.x=e}}},{name:"startY",type:"float",editable:!0,accessor:{get:()=>this.startPoint.y,set:e=>{this.startPoint.y=e}}},{name:"startZ",type:"float",editable:!0,accessor:{get:()=>this.startPoint.z,set:e=>{this.startPoint.z=e}}},{name:"endX",type:"float",editable:!0,accessor:{get:()=>this.endPoint.x,set:e=>{this.endPoint.x=e}}},{name:"endY",type:"float",editable:!0,accessor:{get:()=>this.endPoint.y,set:e=>{this.endPoint.y=e}}},{name:"endZ",type:"float",editable:!0,accessor:{get:()=>this.endPoint.z,set:e=>{this.endPoint.z=e}}},{name:"length",type:"float",editable:!1,accessor:{get:()=>this._geo.length}}]}]}}subGetGripPoints(){const e=new Array;return e.push(this.midPoint),e.push(this.startPoint),e.push(this.endPoint),e}subGetOsnapPoints(e,n,i,s){const r=this.startPoint,o=this.endPoint;switch(e){case cs.EndPoint:s.push(r),s.push(o);break;case cs.MidPoint:s.push(this.midPoint);break;case cs.Nearest:{const a=this._geo.project(n);s.push(a)}break;case cs.Perpendicular:{const a=this._geo.perpPoint(n);s.push(a)}break;case cs.Tangent:break}}transformBy(e){return this._geo.transform(e),this}subWorldDraw(e){const n=this.startPoint,i=this.endPoint,s=[new Yt(n.x,n.y,0),new Yt(i.x,i.y,0)];return e.lines(s)}};cH.typeName="Line";let f1=cH;const uH=class extends fl{constructor(){super(),this._contents="",this._height=0,this._width=0,this._lineSpacingFactor=.25,this._lineSpacingStyle=0,this._backgroundFill=!1,this._backgroundFillColor=13158600,this._backgroundFillTransparency=1,this._backgroundScaleFactor=1,this._rotation=0,this._styleName="",this._location=new Yt,this._attachmentPoint=Uo.TopLeft,this._direction=new pn(1,0,0),this._drawingDirection=Zd.LEFT_TO_RIGHT}get contents(){return this._contents}set contents(e){this._contents=e}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get rotation(){return this._rotation}set rotation(e){this._rotation=e}get lineSpacingFactor(){return this._lineSpacingFactor}set lineSpacingFactor(e){this._lineSpacingFactor=e}get lineSpacingStyle(){return this._lineSpacingStyle}set lineSpacingStyle(e){this._lineSpacingStyle=e}get backgroundFill(){return this._backgroundFill}set backgroundFill(e){this._backgroundFill=e,this._backgroundFillColor=13158600}get backgroundFillColor(){return this._backgroundFillColor}set backgroundFillColor(e){this._backgroundFillColor=e}get backgroundFillTransparency(){return this._backgroundFillTransparency}set backgroundFillTransparency(e){this._backgroundFillTransparency=e}get backgroundScaleFactor(){return this._backgroundScaleFactor}set backgroundScaleFactor(e){this._backgroundScaleFactor=e}get styleName(){return this._styleName}set styleName(e){this._styleName=e}get location(){return this._location}set location(e){this._location.copy(e)}get attachmentPoint(){return this._attachmentPoint}set attachmentPoint(e){this._attachmentPoint=e}get direction(){return this._direction}set direction(e){this._direction.copy(e)}get drawingDirection(){return this._drawingDirection}set drawingDirection(e){this._drawingDirection=e}get geometricExtents(){return new Zi}subGetOsnapPoints(e,n,i,s){cs.Insertion===e&&s.push(this._location)}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"text",properties:[{name:"contents",type:"string",editable:!0,accessor:{get:()=>this.contents,set:e=>{this.contents=e}}},{name:"styleName",type:"string",editable:!0,accessor:{get:()=>this.styleName,set:e=>{this.styleName=e}}},{name:"attachmentPoint",type:"enum",editable:!0,options:[{label:Uo[1],value:1},{label:Uo[2],value:2},{label:Uo[3],value:3},{label:Uo[4],value:4},{label:Uo[5],value:5},{label:Uo[6],value:6},{label:Uo[7],value:7},{label:Uo[8],value:8},{label:Uo[9],value:9}],accessor:{get:()=>this.attachmentPoint,set:e=>{this.attachmentPoint=e}}},{name:"drawingDirection",type:"enum",editable:!0,options:[{label:Zd[1],value:1},{label:Zd[2],value:2},{label:Zd[3],value:3},{label:Zd[4],value:4},{label:Zd[5],value:5}],accessor:{get:()=>this.drawingDirection,set:e=>{this.drawingDirection=e}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:()=>this.height,set:e=>{this.height=e}}},{name:"rotation",type:"float",editable:!0,accessor:{get:()=>this.rotation,set:e=>{this.rotation=e}}},{name:"lineSpacingFactor",type:"float",editable:!0,accessor:{get:()=>this.lineSpacingFactor,set:e=>{this.lineSpacingFactor=e}}},{name:"definedWidth",type:"float",editable:!0,accessor:{get:()=>this.width,set:e=>{this.width=e}}},{name:"directionX",type:"float",editable:!0,accessor:{get:()=>this.direction.x,set:e=>{this.direction.x=e}}},{name:"directionY",type:"float",editable:!0,accessor:{get:()=>this.direction.y,set:e=>{this.direction.y=e}}},{name:"directionZ",type:"float",editable:!0,accessor:{get:()=>this.direction.z,set:e=>{this.direction.z=e}}}]},{groupName:"geometry",properties:[{name:"locationX",type:"float",editable:!0,accessor:{get:()=>this.location.x,set:e=>{this.location.x=e}}},{name:"locationY",type:"float",editable:!0,accessor:{get:()=>this.location.y,set:e=>{this.location.y=e}}},{name:"locationZ",type:"float",editable:!0,accessor:{get:()=>this.location.z,set:e=>{this.location.z=e}}}]}]}}getTextStyle(){const e=this.database.tables.textStyleTable;let n=e.getAt(this.styleName);return n||(n=e.getAt("STANDARD")||e.getAt("Standard")),n.textStyle}subWorldDraw(e,n){const i={text:this.contents,height:this.height,width:this.width,position:this.location,rotation:this.rotation,directionVector:this.direction,attachmentPoint:this.attachmentPoint,drawingDirection:this.drawingDirection,lineSpaceFactor:this.lineSpacingFactor};return e.mtext(i,this.getTextStyle(),n)}};uH.typeName="MText";let N4=uH;const dH=class extends pl{constructor(e,n,i,s,r){super();const o=+(e!==void 0)+ +(n!==void 0)+ +(i!==void 0)+ +(s!==void 0)+ +(r!==void 0);if(o<2||o>5)throw ll.ILLEGAL_PARAMETERS;Array.isArray(n)?this._geo=new Qf(e,n,i,s,r):this._geo=new Qf(e,n,i,s)}get geometricExtents(){return this._geo.box}get closed(){return this._geo.closed}set closed(e){this._geo.closed=e}subGetOsnapPoints(e,n,i,s){e===cs.EndPoint&&(s.push(this._geo.startPoint),s.push(this._geo.endPoint))}subWorldDraw(e){const n=this._geo.getPoints(100);return e.lines(n)}};dH.typeName="Spline";let E2=dH;const tIe=new pn,hH=class extends qx{constructor(e,n,i){super(e),this._attachmentPoint=Uo.TopLeft,this._numColumns=i,this._numRows=n,this._columnWidth=new Array(i),this._rowHeight=new Array(n),this._cells=new Array(n*i)}get attachmentPoint(){return this._attachmentPoint}set attachmentPoint(e){this._attachmentPoint=e}get numRows(){return this._numRows}set numRows(e){this._numRows=e}get numColumns(){return this._numColumns}set numColumns(e){this._numColumns=e}numContents(e,n){return 1}rowHeight(e){return this._rowHeight[e]}setRowHeight(e,n){this._rowHeight[e]=n}setUniformRowHeight(e){this._rowHeight.fill(e)}columnWidth(e){return this._columnWidth[e]}setUniformColumnWidth(e){this._columnWidth.fill(e)}setColumnWidth(e,n){this._columnWidth[e]=n}cell(e){if(!(e<0||e>=this._cells.length))return this._cells[e]}setCell(e,n){this._cells[e]=n}textString(e,n,i){return this._cells[e*n].text}setTextString(e,n,i){this._cells[e*n].text=i}isEmpty(e,n){return!this._cells[e*n].text}get geometricExtents(){return new Zi}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"table",properties:[{name:"numRows",type:"string",editable:!0,accessor:{get:()=>this.numRows,set:e=>{this.numRows=e}}},{name:"numColumns",type:"float",editable:!0,accessor:{get:()=>this.numColumns,set:e=>{this.numColumns=e}}},{name:"tableWidth",type:"float",editable:!1,accessor:{get:()=>this._columnWidth.reduce((e,n)=>e+n,0)}},{name:"tableHeight",type:"float",editable:!1,accessor:{get:()=>this._rowHeight.reduce((e,n)=>e+n,0)}}]},{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:()=>this.position.x,set:e=>{this.position.x=e}}},{name:"positionY",type:"float",editable:!0,accessor:{get:()=>this.position.y,set:e=>{this.position.y=e}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:()=>this.position.z,set:e=>{this.position.z=e}}}]}]}}subWorldDraw(e){let n=0,i=0;const s=new Uint16Array(this.numColumns*this.numRows*8),r=new Float32Array((this.numColumns+1)*(this.numRows+1)*3);let o=0;for(let h=0;h<=this.numRows;h++){n-=h>0?this.rowHeight(h-1):0,i=0;for(let f=0;f<=this.numColumns;f++)i+=f>0?this.columnWidth(f-1):0,r[o++]=i,r[o++]=n,r[o++]=0}const a=[],l=new Array(this.numRows*this.numColumns).fill(!1);i=0,o=0;let c=0;for(let h=0;h0?this.columnWidth(h-1):0,n=0;for(let f=0;f0?this.rowHeight(f-1):0;const p=this.cell(f*this.numColumns+h);if(c=f*this.numColumns+h,p&&!l[c]){const m=p.borderWidth??1,b=p.borderHeight??1;this.fillVisited(l,c,this.numColumns,m,b),s[o++]=h+f*(this.numColumns+1),s[o++]=h+f*(this.numColumns+1)+m;const g=r[s[o-1]*3]-i,x=h+(f+b)*(this.numColumns+1)+m;h+m==this.numColumns&&(s[o++]=h+f*(this.numColumns+1)+m,s[o++]=x);const S=-r[x*3+1]-n;if(f+b==this.numRows&&(s[o++]=h+(f+b)*(this.numColumns+1)+b,s[o++]=h+(f+b)*(this.numColumns+1)),s[o++]=h+(f+b)*(this.numColumns+1),s[o++]=h+f*(this.numColumns+1),p.text){const _=p.attachmentPoint||this.attachmentPoint||Uo.MiddleCenter,E=this.getTableTextOffset(_,g,S),T={text:p.text,height:p.textHeight,width:g,position:tIe.set(i,-n,0).clone().add(E),rotation:this.rotation,attachmentPoint:_},A=this.getTextStyle(p);a.push(e.mtext(T,A))}}}}a.push(e.lineSegments(r,3,s));const u=e.group(a),d=new ay;return d.setFromAxisAngle(pn.Z_AXIS,this.rotation),B5.compose(this.position,d,this.scaleFactors),u.applyMatrix(B5),this.attachEntityInfo(u),u}fillVisited(e,n,i,s,r){if(r==1&&s==1)e[n]=!0;else for(let o=0;othis.textString,set:e=>{this.textString=e}}},{name:"styleName",type:"string",editable:!0,accessor:{get:()=>this.styleName,set:e=>{this.styleName=e}}},{name:"textHeight",type:"float",editable:!0,accessor:{get:()=>this.height,set:e=>{this.height=e}}},{name:"rotation",type:"float",editable:!0,accessor:{get:()=>this.rotation,set:e=>{this.rotation=e}}},{name:"widthFactor",type:"float",editable:!0,accessor:{get:()=>this.widthFactor,set:e=>{this.widthFactor=e}}},{name:"oblique",type:"float",editable:!0,accessor:{get:()=>this.oblique,set:e=>{this.oblique=e}}}]},{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:()=>this.position.x,set:e=>{this.position.x=e}}},{name:"positionY",type:"float",editable:!0,accessor:{get:()=>this.position.y,set:e=>{this.position.y=e}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:()=>this.position.z,set:e=>{this.position.z=e}}}]}]}}getTextStyle(){const e=this.database.tables.textStyleTable;let n=e.getAt(this.styleName);return n||(n=e.getAt("STANDARD")||e.getAt("Standard")),n.textStyle}subWorldDraw(e,n){const i={text:this.textString,height:this.height,width:1/0,widthFactor:this.widthFactor,position:this.position,rotation:this.rotation,drawingDirection:Zd.BOTTOM_TO_TOP,attachmentPoint:Uo.BottomLeft};return e.mtext(i,this.getTextStyle(),n)}};pH.typeName="Text";let mH=pH;const gH=class extends pl{constructor(){super(),this._elevation=0,this._thickness=1,this._vertices=[new Yt,new Yt,new Yt,new Yt]}get elevation(){return this._elevation}set elevation(e){this._elevation=e}get closed(){return!0}get thickness(){return this._thickness}set thickness(e){this._thickness=e}getPointAt(e){return e<0?this._vertices[0]:e>3?this._vertices[3]:this._vertices[e]}setPointAt(e,n){if(e<0&&this._vertices[0].copy(n),e>3)return this._vertices[3].copy(n);this._vertices[e].copy(n)}get geometricExtents(){return new Zi().setFromPoints(this._vertices)}subGetGripPoints(){const e=new Array;return e.push(...this._vertices),e}subGetOsnapPoints(e,n,i,s){e===cs.EndPoint&&s.push(...this._vertices)}subWorldDraw(e){const n=new pp(this._vertices,!0),i=new R4;i.add(n);const s=e.subEntityTraits;return s.fillType={solidFill:!0,patternAngle:0,patternLines:[]},e.area(i)}};gH.typeName="Trace";let vH=gH;const yH=class extends pl{constructor(){super(),this._elevation=0,this._geo=new pp}get numberOfVertices(){return this._geo.numberOfVertices}get elevation(){return this._elevation}set elevation(e){this._elevation=e}get closed(){return this._geo.closed}set closed(e){this._geo.closed=e}addVertexAt(e,n,i=0,s=-1,r=-1){const o=s<0?void 0:s,a=r<0?void 0:r,l={x:n.x,y:n.y,bulge:i,startWidth:o,endWidth:a};this._geo.addVertexAt(e,l)}getPoint2dAt(e){return this._geo.getPointAt(e)}getPoint3dAt(e){const n=this.getPoint2dAt(e);return new Yt(n.x,n.y,this._elevation)}get geometricExtents(){const e=this._geo.box;return new Zi({x:e.min.x,y:e.min.y,z:this._elevation},{x:e.max.x,y:e.max.y,z:this._elevation})}subGetGripPoints(){const e=new Array;for(let n=0;nn.push(new Yt().set(i.x,i.y,this.elevation))),e.lines(n)}};yH.typeName="Polyline";let bH=yH;const _H=class extends fl{constructor(){super(),this._geo=new Yt}get position(){return this._geo}set position(e){this._geo.set(e.x,e.y,e.z||0)}get geometricExtents(){return new Zi().expandByPoint(this._geo)}subGetOsnapPoints(e,n,i,s){cs.Node===e&&s.push(this._geo)}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"positionX",type:"float",editable:!0,accessor:{get:()=>this.position.x,set:e=>{this.position.x=e}}},{name:"positionY",type:"float",editable:!0,accessor:{get:()=>this.position.y,set:e=>{this.position.y=e}}},{name:"positionZ",type:"float",editable:!0,accessor:{get:()=>this.position.z,set:e=>{this.position.z=e}}}]}]}}transformBy(e){return this._geo.applyMatrix4(e),this}subWorldDraw(e){return e.point(this._geo,{displayMode:this.database.pdmode,displaySize:this.database.pdsize})}};_H.typeName="Point";let wH=_H;const xH=class extends fl{constructor(){super(),this._brightness=50,this._contrast=50,this._fade=0,this._width=0,this._height=0,this._position=new Yt,this._scale=new $s(1,1),this._rotation=0,this._clipBoundaryType=1,this._clipBoundary=[],this._isClipped=!1,this._isShownClipped=!1,this._isImageShown=!0,this._isImageTransparent=!1,this._imageDefId=""}get brightness(){return this._brightness}set brightness(e){this._brightness=e}get contrast(){return this._contrast}set contrast(e){this._contrast=e}get fade(){return this._fade}set fade(e){this._fade=e}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get position(){return this._position}set position(e){this._position=e}get rotation(){return this._rotation}set rotation(e){this._rotation=e}get scale(){return this._scale}set scale(e){this._scale.copy(e)}get clipBoundaryType(){return this._clipBoundaryType}set clipBoundaryType(e){this._clipBoundaryType=e}get clipBoundary(){return this._clipBoundary}set clipBoundary(e){this._clipBoundary=[],this._clipBoundary.push(...e)}get isClipped(){return this._isClipped}set isClipped(e){this._isClipped=e}get isShownClipped(){return this._isShownClipped}set isShownClipped(e){this._isShownClipped=e}get isImageShown(){return this._isImageShown}set isImageShown(e){this._isImageShown=e}get isImageTransparent(){return this._isImageTransparent}set isImageTransparent(e){this._isImageTransparent=e}get image(){return this._image}set image(e){this._image=e}get imageDefId(){return this._imageDefId}set imageDefId(e){this._imageDefId=e}get imageFileName(){if(this._imageDefId){const e=this.database.dictionaries.imageDefs.getIdAt(this._imageDefId);if(e)return e.sourceFileName}return""}get geometricExtents(){const e=new Zi;return e.min.copy(this._position),e.max.set(this._position.x+this._width,this._position.y+this._height,0),e}subGetGripPoints(){return this.boundaryPath()}subWorldDraw(e){const n=this.boundaryPath();return this._image?e.image(this._image,{boundary:n,roation:this._rotation}):e.lines(n)}boundaryPath(){const e=[];if(this.isClipped&&this._clipBoundary.length>3){const n=this._width,i=this._height,s=new ar;s.setFromPoints(this._clipBoundary);const r=new Si;r.setX(this._position.x-s.min.x*n),r.setY(this._position.y-s.min.y*i),this._clipBoundary.forEach(o=>{const a=o.x*n+r.x,l=o.y*i+r.y;e.push(new Yt(a,l,this._position.z))})}else{if(e.push(this._position),e.push(this._position.clone().setX(this._position.x+this._width)),e.push(this._position.clone().set(this._position.x+this._width,this._position.y+this._height,this._position.z)),e.push(this._position.clone().setY(this._position.y+this._height)),this._rotation>0){F5.copy(e[1]);for(let n=1;n<4;n++)vb.copy(e[n]),vb.rotateAround(F5,this._rotation),e[n].setX(vb.x),e[n].setY(vb.y)}e.push(e[0])}return e}};xH.typeName="RasterImage";let Xx=xH;const F5=new Si,vb=new Si,SH=class extends pl{constructor(){super(),this._basePoint=new Yt,this._unitDir=new pn}get basePoint(){return this._basePoint}set basePoint(e){this._basePoint.copy(e)}get unitDir(){return this._unitDir}set unitDir(e){this._unitDir.copy(e)}get closed(){return!1}get geometricExtents(){const e=new Zi;return e.expandByPoint(this._unitDir.clone().multiplyScalar(10).add(this._basePoint)),e.expandByPoint(this._unitDir.clone().multiplyScalar(-10).add(this._basePoint)),e}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"basePointX",type:"float",editable:!0,accessor:{get:()=>this.basePoint.x,set:e=>{this.basePoint.x=e}}},{name:"basePointY",type:"float",editable:!0,accessor:{get:()=>this.basePoint.y,set:e=>{this.basePoint.y=e}}},{name:"basePointZ",type:"float",editable:!0,accessor:{get:()=>this.basePoint.z,set:e=>{this.basePoint.z=e}}},{name:"unitDirX",type:"float",editable:!0,accessor:{get:()=>this.unitDir.x,set:e=>{this.unitDir.x=e}}},{name:"unitDirY",type:"float",editable:!0,accessor:{get:()=>this.unitDir.y,set:e=>{this.unitDir.y=e}}},{name:"unitDirZ",type:"float",editable:!0,accessor:{get:()=>this.unitDir.z,set:e=>{this.unitDir.z=e}}}]}]}}subGetGripPoints(){const e=new Array;return e.push(this.basePoint),e}subGetOsnapPoints(e,n,i,s){e===cs.EndPoint&&s.push(this.basePoint)}subWorldDraw(e){const n=[];return n.push(this.basePoint),n.push(this._unitDir.clone().multiplyScalar(1e6).add(this._basePoint)),e.lines(n)}};SH.typeName="Ray";let B4=SH;const EH=class extends fl{constructor(){super(),this._centerPoint=new Yt,this._height=0,this._width=0,this._viewCenter=new Yt,this._viewHeight=0,this._number=-1}get number(){return this._number}set number(e){this._number=e}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint=e}get height(){return this._height}set height(e){this._height=e}get width(){return this._width}set width(e){this._width=e}get viewCenter(){return this._viewCenter}set viewCenter(e){this._viewCenter=e}get viewHeight(){return this._viewHeight}set viewHeight(e){this._viewHeight=e}get geometricExtents(){return new Zi}subWorldDraw(e){if(this._number>1&&this.ownerId!=this.database.tables.blockTable.modelSpace.objectId){const n=this.toGiViewport(),i=e.group(this.createViewportRect(n,e));return this.attachEntityInfo(i),i}}toGiViewport(){const e=new ZLe;return e.id=this.objectId,e.groupId=this.ownerId,e.number=this.number,e.centerPoint=this.centerPoint,e.width=this.width,e.height=this.height,e.viewHeight=this.viewHeight,e.viewCenter=this.viewCenter,e}createViewportRect(e,n){const i=[];return i.push(n.lines([new Yt(e.centerPoint.x-e.width/2,e.centerPoint.y-e.height/2,0),new Yt(e.centerPoint.x+e.width/2,e.centerPoint.y-e.height/2,0)])),i.push(n.lines([new Yt(e.centerPoint.x+e.width/2,e.centerPoint.y-e.height/2,0),new Yt(e.centerPoint.x+e.width/2,e.centerPoint.y+e.height/2,0)])),i.push(n.lines([new Yt(e.centerPoint.x+e.width/2,e.centerPoint.y+e.height/2,0),new Yt(e.centerPoint.x-e.width/2,e.centerPoint.y+e.height/2,0)])),i.push(n.lines([new Yt(e.centerPoint.x-e.width/2,e.centerPoint.y+e.height/2,0),new Yt(e.centerPoint.x-e.width/2,e.centerPoint.y-e.height/2,0)])),i}};EH.typeName="Viewport";let F4=EH;const CH=class extends Xx{subWorldDraw(e){const n=this.boundaryPath(),i=new R4;return i.add(new pp(n)),e.area(i)}};CH.typeName="Wipeout";let TH=CH;const MH=class extends pl{constructor(){super(),this._basePoint=new Yt,this._unitDir=new pn}get basePoint(){return this._basePoint}set basePoint(e){this._basePoint.copy(e)}get unitDir(){return this._unitDir}set unitDir(e){this._unitDir.copy(e)}get closed(){return!1}get geometricExtents(){const e=new Zi;return e.expandByPoint(this._unitDir.clone().multiplyScalar(10).add(this._basePoint)),e.expandByPoint(this._unitDir.clone().multiplyScalar(-10).add(this._basePoint)),e}get properties(){return{type:this.type,groups:[this.getGeneralProperties(),{groupName:"geometry",properties:[{name:"basePointX",type:"float",editable:!0,accessor:{get:()=>this.basePoint.x,set:e=>{this.basePoint.x=e}}},{name:"basePointY",type:"float",editable:!0,accessor:{get:()=>this.basePoint.y,set:e=>{this.basePoint.y=e}}},{name:"basePointZ",type:"float",editable:!0,accessor:{get:()=>this.basePoint.z,set:e=>{this.basePoint.z=e}}},{name:"unitDirX",type:"float",editable:!0,accessor:{get:()=>this.unitDir.x,set:e=>{this.unitDir.x=e}}},{name:"unitDirY",type:"float",editable:!0,accessor:{get:()=>this.unitDir.y,set:e=>{this.unitDir.y=e}}},{name:"unitDirZ",type:"float",editable:!0,accessor:{get:()=>this.unitDir.z,set:e=>{this.unitDir.z=e}}}]}]}}subGetGripPoints(){const e=new Array;return e.push(this.basePoint),e}subWorldDraw(e){const n=[];return n.push(this._unitDir.clone().multiplyScalar(-1e6).add(this._basePoint)),n.push(this._unitDir.clone().multiplyScalar(1e6).add(this._basePoint)),e.lines(n)}};MH.typeName="Xline";let z4=MH;const AH=class extends fl{constructor(){super(),this._dimBlockId=null,this._dimBlockPosition=new Yt,this._dimensionStyleName=null,this._dimensionText=null,this._textLineSpacingFactor=1,this._textLineSpacingStyle=1,this._textPosition=new Yt,this._textRotation=0,this._normal=new pn(0,0,1)}get dimBlockId(){return this._dimBlockId}set dimBlockId(e){this._dimBlockId=e}get dimBlockPosition(){return this._dimBlockPosition}set dimBlockPosition(e){this._dimBlockPosition.copy(e)}get dimensionStyleName(){return this._dimensionStyleName}set dimensionStyleName(e){this._dimensionStyleName=e}get dimensionStyle(){if(this._dimStyle==null){let e;this.dimensionStyleName&&(e=this.database.tables.dimStyleTable.getAt(this.dimensionStyleName)),e==null&&(e=new eS),this._dimStyle=e}return this._dimStyle}get dimensionText(){return this._dimensionText}set dimensionText(e){this._dimensionText=e}get measurement(){return this._measurement}set measurement(e){this._measurement=e}get textLineSpacingFactor(){return this._textLineSpacingFactor}set textLineSpacingFactor(e){this._textLineSpacingFactor=e}get textLineSpacingStyle(){return this._textLineSpacingStyle}set textLineSpacingStyle(e){this._textLineSpacingStyle=e}get textPosition(){return this._textPosition}set textPosition(e){this._textPosition.copy(e)}get textRotation(){return this._textRotation}set textRotation(e){this._textRotation=e}get normal(){return this._normal}set normal(e){this._normal.copy(e).normalize()}subWorldDraw(e){if(this.dimBlockId){const i=this.database.tables.blockTable.getAt(this.dimBlockId);if(i){const s=this.computeDimBlockTransform(),r=L4.instance.draw(e,i,this.rgbColor,!1,s);return this.attachEntityInfo(r),r}}const n=e.group([]);return this.attachEntityInfo(n),n}get arrowScaleFactor(){return this.dimensionStyle.dimasz}get firstArrowStyle(){return{type:this.firstArrowType,scale:this.arrowScaleFactor,appended:this.isAppendArrow,visible:this.dimensionStyle.dimse1==0}}get secondArrowStyle(){return{type:this.secondArrowType,scale:this.arrowScaleFactor,appended:this.isAppendArrow,visible:this.dimensionStyle.dimse2==0}}get isAppendArrow(){return!0}get firstArrowTypeBtrId(){const e=this.dimensionStyle;return e.dimsah==0?e.dimblk:e.dimblk1}get firstArrowType(){const e=this.firstArrowTypeBtrId;return this.getArrowName(e)}get secondArrowTypeBtrId(){const e=this.dimensionStyle;return e.dimsah==0?e.dimblk:e.dimblk2}get secondArrowType(){const e=this.secondArrowTypeBtrId;return this.getArrowName(e)}get arrowLineCount(){return 1}getLineArrowStyle(e){}findPointOnLine1(e,n,i){const s=new Yt().subVectors(n,e).normalize();return new Yt(n).addScaledVector(s,i)}findPointOnLine2(e,n,i){const s=e.x+i*Math.cos(n),r=e.y+i*Math.sin(n);return{x:s,y:r}}adjustExtensionLine(e){const n=this.dimensionStyle;e.extend(n.dimexe),e.extend(-n.dimexo,!0)}getArrowName(e){const n=this.database.tables.blockTable.getIdAt(e);return n?n.name.toUpperCase():UV.Closed}computeDimBlockTransform(){const e=this.dimBlockId?this.database.tables.blockTable.getAt(this.dimBlockId):void 0,n=e?.origin??Yt.ORIGIN,i=new Vo().makeTranslation(this._dimBlockPosition.x,this._dimBlockPosition.y,this._dimBlockPosition.z),s=new Vo;s.setFromExtrusionDirection(this._normal);const r=new Vo().makeTranslation(-n.x,-n.y,-n.z);return new Vo().multiplyMatrices(i,s).multiply(r)}};AH.typeName="Dimension";let Yg=AH;const kH=class extends Yg{constructor(e,n,i,s,r=null,o=null){super(),this._centerPoint=new Yt().copy(e),this._xLine1Point=new Yt().copy(n),this._xLine2Point=new Yt().copy(i),this._arcPoint=new Yt().copy(s),this.dimensionText=r,this.dimensionStyleName=o}get arcPoint(){return this._arcPoint}set arcPoint(e){this._arcPoint.copy(e)}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint.copy(e)}get xLine1Point(){return this._xLine1Point}set xLine1Point(e){this._xLine1Point.copy(e)}get xLine2Point(){return this._xLine2Point}set xLine2Point(e){this._xLine2Point.copy(e)}get geometricExtents(){return new Zi}};kH.typeName="3PointAngularDimension";let PH=kH;const LH=class extends Yg{constructor(e,n,i,s=null,r=null){super(),this._dimLinePoint=new Yt().copy(i),this._xLine1Point=new Yt().copy(e),this._xLine2Point=new Yt().copy(n),this._oblique=0,this._rotation=0,this.calculateRotation(),s?this.dimensionText=s:this.dimensionText=this._xLine1Point.distanceTo(this._xLine2Point).toFixed(3),this.dimensionStyleName=r}get dimLinePoint(){return this._dimLinePoint}set dimLinePoint(e){this._dimLinePoint.copy(e)}get xLine1Point(){return this._xLine1Point}set xLine1Point(e){this._xLine1Point.copy(e)}get xLine2Point(){return this._xLine2Point}set xLine2Point(e){this._xLine2Point.copy(e)}get rotation(){return this._rotation}set rotation(e){this._rotation=e}get oblique(){return this._oblique}set oblique(e){this._oblique=e}get geometricExtents(){return new Zi}get isAppendArrow(){return!1}createDimBlock(e){const n=new mo;n.name=e;const i=this.createLines();i.forEach(o=>n.appendEntity(new f1(o.startPoint,o.endPoint))),this.createArrows(i[0]).forEach(o=>n.appendEntity(o));const s=i[0].midPoint,r=this.createMText(s,this._rotation);return r&&n.appendEntity(r),n}createMText(e,n){const i=s=>({x:Math.cos(s),y:Math.sin(s),z:0});if(this.dimensionText){const s=new N4;return s.attachmentPoint=Uo.MiddleLeft,s.layer="0",s.color=new Er(Fi.ByBlock),s.location=e,s.contents=this.dimensionText??"",s.height=10,s.direction=i(n),s.styleName=this.dimensionStyle.dimtxsty,s}}createArrows(e){const n=[];return n.push(this.createArrow(e.startPoint,this.rotation+Math.PI,10)),n.push(this.createArrow(e.endPoint,this.rotation,10)),n}createArrow(e,n,i){const s="_CAXARROW",r=new qx(s);return r.position=e,r.rotation=n,r.scaleFactors={x:i,y:i,z:i},r}createLines(){const e=[],n=this.createExtensionLine(this._xLine1Point),i=this.createExtensionLine(this._xLine2Point),s=this.findIntersectionPoint(n,this._dimLinePoint),r=this.findIntersectionPoint(i,this._dimLinePoint),o=new ly(s,r);return e.push(o),n.endPoint=s,this.adjustExtensionLine(n),e.push(n),i.endPoint=r,this.adjustExtensionLine(i),e.push(i),e}createExtensionLine(e){const n=this.rotation+Math.PI/2,i=this.findPointOnLine2(e,n,100);return new ly(e,{...i,z:e.z})}findIntersectionPoint(e,n){const i=e.startPoint,s=e.endPoint,r=new pn().subVectors(s,i).normalize(),o=new pn().subVectors(n,i).dot(r),a=new pn().copy(r).multiplyScalar(o);return new pn().addVectors(i,a)}calculateRotation(){const e=this._xLine1Point,n=this._xLine2Point,i=n.x-e.x,s=n.y-e.y;this._rotation=Math.atan2(s,i)}};LH.typeName="AlignedDimension";let Zx=LH;const nIe=class extends Yg{constructor(e,n,i,s,r=null,o=null){super(),this._arcPoint=new Yt().copy(s),this._xLine1Point=new Yt().copy(n),this._xLine2Point=new Yt().copy(i),this._centerPoint=new Yt().copy(e),this.dimensionText=r,this.dimensionStyleName=o}get arcPoint(){return this._arcPoint}set arcPoint(e){this._arcPoint.copy(e)}get centerPoint(){return this._centerPoint}set centerPoint(e){this._centerPoint.copy(e)}get xLine1Point(){return this._xLine1Point}set xLine1Point(e){this._xLine1Point.copy(e)}get xLine2Point(){return this._xLine2Point}set xLine2Point(e){this._xLine2Point.copy(e)}get geometricExtents(){return new Zi}};nIe.typeName="ArcDimension";const IH=class extends Yg{constructor(e,n,i=0,s=null,r=null){super(),this._chordPoint=new Yt().copy(e),this._farChordPoint=new Yt().copy(n),this._extArcStartAngle=0,this._extArcEndAngle=0,this._leaderLength=i,this.dimensionText=s,this.dimensionStyleName=r}get chordPoint(){return this._chordPoint}set chordPoint(e){this._chordPoint.copy(e)}get farChordPoint(){return this._farChordPoint}set farChordPoint(e){this._farChordPoint.copy(e)}get extArcStartAngle(){return this._extArcStartAngle}set extArcStartAngle(e){this._extArcStartAngle=e}get extArcEndAngle(){return this._extArcEndAngle}set extArcEndAngle(e){this._extArcEndAngle=e}get leaderLength(){return this._leaderLength}get geometricExtents(){return new Zi}drawLines(e,n){const i=[],s=n.length;return s==1?i.push(this.drawLine(e,n[0],{firstArrow:this.firstArrowStyle})):s==3?(this.sortLines(n),i.push(this.drawLine(e,n[0],{firstArrow:this.firstArrowStyle})),i.push(this.drawLine(e,n[1])),i.push(this.drawLine(e,n[2],{firstArrow:this.firstArrowStyle}))):n.forEach(r=>{i.push(this.drawLine(e,r))}),i}drawLine(e,n,i){if(i){const s=[n.startPoint,n.endPoint];return e.lines(s)}else return n.worldDraw(e)}sortLines(e){const n=(i,s)=>i.x!==s.x?i.x-s.x:i.y!==s.y?i.y-s.y:i.z-s.z;e.sort((i,s)=>{const r=n(i.startPoint,s.startPoint);return r!==0?r:n(i.endPoint,s.endPoint)})}};IH.typeName="DiametricDimension";let RH=IH;const OH=class extends Yg{constructor(e,n,i=null,s=null){super(),this._definingPoint=new Yt().copy(e),this._leaderEndPoint=new Yt().copy(n),this.dimensionText=i,this.dimensionStyleName=s}get definingPoint(){return this._definingPoint}set definingPoint(e){this._definingPoint.copy(e)}get leaderEndPoint(){return this._leaderEndPoint}set leaderEndPoint(e){this._leaderEndPoint.copy(e)}get geometricExtents(){return new Zi}get arrowLineCount(){return 0}};OH.typeName="OrdinateDimension";let DH=OH;const NH=class extends Yg{constructor(e,n,i,s=null,r=null){super(),this._center=new Yt().copy(e),this._chordPoint=new Yt().copy(n),this._leaderLength=i,this._extArcStartAngle=0,this._extArcEndAngle=0,this.dimensionText=s,this.dimensionStyleName=r}get center(){return this._center}set center(e){this._center.copy(e)}get chordPoint(){return this._chordPoint}set chordPoint(e){this._chordPoint.copy(e)}get extArcStartAngle(){return this._extArcStartAngle}set extArcStartAngle(e){this._extArcStartAngle=e}get extArcEndAngle(){return this._extArcEndAngle}set extArcEndAngle(e){this._extArcEndAngle=e}get leaderLength(){return this._leaderLength}set leaderLenght(e){this._leaderLength=e}get geometricExtents(){return new Zi}getLineArrowStyle(e){return{secondArrow:this.secondArrowStyle}}};NH.typeName="RadialDimension";let BH=NH,p1=class extends mp{constructor(){super(),this._tabOrder=-1,this._tabSelected=!1,this._blockTableRecordId="",this._layoutName="",this._limits=new ar,this._extents=new Zi}get layoutName(){return this._layoutName}set layoutName(e){this._layoutName=e.length>256?e.slice(0,256):e}get tabOrder(){return this._tabOrder}set tabOrder(e){this._tabOrder=e}get tabSelected(){return this._tabSelected}set tabSelected(e){this._tabSelected=e}get blockTableRecordId(){return this._blockTableRecordId}set blockTableRecordId(e){this._blockTableRecordId=e}get limits(){return this._limits}set limits(e){this._limits.copy(e)}get extents(){return this._extents}set extents(e){this._extents.copy(e)}},FH=class extends mp{constructor(e){super(),this.database=e,this._recordsByName=new Map,this._recordsById=new Map}get numEntries(){return this._recordsByName.size}setAt(e,n){n.database=this.database,this._recordsByName.set(e,n),this._recordsById.set(n.objectId,n),this.database.events.dictObjetSet.dispatch({database:this.database,object:n,key:e})}remove(e){const n=this.getAt(e);return n?(this._recordsByName.delete(e.toUpperCase()),this._recordsById.delete(this.objectId),this.database.events.dictObjectErased.dispatch({database:this.database,object:n,key:e}),!0):!1}removeId(e){const n=this.getIdAt(e);return n?(this._recordsById.delete(this.objectId),this._recordsByName.forEach((i,s)=>{i===n&&(this._recordsByName.delete(s),this.database.events.dictObjectErased.dispatch({database:this.database,object:n,key:s}))}),!0):!1}removeAll(){this._recordsByName.forEach((e,n)=>{this.database.events.dictObjectErased.dispatch({database:this.database,object:e,key:n})}),this._recordsByName.clear(),this._recordsById.clear()}has(e){return this._recordsByName.has(e.toUpperCase())}hasId(e){return this._recordsById.has(e)}getAt(e){return this._recordsByName.get(e)}getIdAt(e){return this._recordsById.get(e)}newIterator(){return new U4(this._recordsByName)}},iIe=class extends FH{getBtrIdAt(e){for(const[n,i]of this._recordsByName)if(i.blockTableRecordId==e)return i}get maxTabOrder(){let e=-1;return this._recordsByName.forEach(n=>{n.tabOrder>e&&(e=n.tabOrder)}),e}},zH=class extends mp{constructor(){super(),this._sourceFileName=""}get sourceFileName(){return this._sourceFileName}set sourceFileName(e){this._sourceFileName=e}},UH=class{constructor(e){this.db=e}createDefaultLayer(){const e=new Er;return e.colorIndex=7,this.db.tables.layerTable.add(new Qx({name:"0",standardFlags:0,linetype:"Continuous",lineWeight:0,isOff:!1,color:e,isPlottable:!0}))}createDefaultLineType(){this.db.tables.linetypeTable.add(new _0({name:"ByBlock",standardFlag:0,description:"",totalPatternLength:0})),this.db.tables.linetypeTable.add(new _0({name:"ByLayer",standardFlag:0,description:"",totalPatternLength:0})),this.db.tables.linetypeTable.add(new _0({name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0}))}createDefaultTextStyle(){this.db.tables.textStyleTable.add(new K4({name:"Standard",standardFlag:0,fixedTextHeight:0,widthFactor:1,obliqueAngle:0,textGenerationFlag:0,lastHeight:.2,font:"SimKai",bigFont:"",extendedFont:"SimKai"}))}createDefaultDimStyle(){this.db.tables.dimStyleTable.add(new eS({name:"Standard",dimtxsty:"Standard"}))}createDefaultLayout(){const e=new p1;e.layoutName="Model",e.tabOrder=0,e.blockTableRecordId=this.db.tables.blockTable.modelSpace.objectId,e.limits.min.copy({x:0,y:0}),e.limits.max.copy({x:1e6,y:1e6}),e.extents.min.copy({x:0,y:0,z:0}),e.extents.max.copy({x:1e6,y:1e6,z:0}),this.db.dictionaries.layouts.setAt(e.layoutName,e),this.db.tables.blockTable.modelSpace.layoutId=e.objectId}createArrowBlock(){if(!this.db.tables.blockTable.getAt("_CAXARROW")){const e=new D4;e.patternName="SOLID";const n=new O4;n.add(new b0({x:0,y:0},{x:-1,y:.125})),n.add(new b0({x:-1,y:.125},{x:-1,y:-.125})),n.add(new b0({x:-1,y:-.125},{x:0,y:0})),e.add(n);const i=new mo;i.name="_CAXARROW",i.appendEntity(e),this.db.tables.blockTable.add(i)}}},U4=class{constructor(e){this.i=0,this._records=e,this._keys=Array.from(e.keys())}get count(){return this._records.size}toArray(){return Array.from(this._records.values())}[Symbol.iterator](){return this}next(){for(;this.i(t[t.Undefined=0]="Undefined",t[t.Inches=1]="Inches",t[t.Feet=2]="Feet",t[t.Miles=3]="Miles",t[t.Millimeters=4]="Millimeters",t[t.Centimeters=5]="Centimeters",t[t.Meters=6]="Meters",t[t.Kilometers=7]="Kilometers",t[t.Microinches=8]="Microinches",t[t.Mils=9]="Mils",t[t.Yards=10]="Yards",t[t.Angstroms=11]="Angstroms",t[t.Nanometers=12]="Nanometers",t[t.Microns=13]="Microns",t[t.Decimeters=14]="Decimeters",t[t.Dekameters=15]="Dekameters",t[t.Hectometers=16]="Hectometers",t[t.Gigameters=17]="Gigameters",t[t.Astronomical=18]="Astronomical",t[t.LightYears=19]="LightYears",t[t.Parsecs=20]="Parsecs",t[t.USSurveyFeet=21]="USSurveyFeet",t[t.USSurveyInch=22]="USSurveyInch",t[t.USSurveyYard=23]="USSurveyYard",t[t.USSurveyMile=24]="USSurveyMile",t[t.Max=24]="Max",t))($H||{});const VH="Load Database";let ia=class extends hLe{constructor(e,n){super(e.stage),this.data=e,this.progress=n}async run(e){const n=k4.getInstance().getEntry(VH),i=Date.now();this.progress&&await this.progress(this.data.progress.value,this.data.stage,"START");const s=await this.data.task(e);return this.progress&&(await this.progress(this.data.progress.value,this.data.stage,"END",s?s.data:null),this.data.progress.value+=this.data.step,this.data.progress.value>100&&(this.data.progress.value=100)),n&&(n.data[this.name]=Date.now()-i),s}},$4=class{constructor(e={}){this.config=e}async read(e,n,i,s){const r={name:VH,data:{total:0},format(){let c="";return Object.keys(this.data).forEach(u=>{u!=="total"&&(c+=`- ${u}: ${this.data[u]} ms `)}),c+=`- total: ${this.data.total} ms`,c}};k4.getInstance().collect(r),this.progress=s;const o={value:0},a=new fLe;a.setCompleteCallback(()=>this.onFinished()),a.setErrorCallback(c=>this.onError(c)),a.addTask(new ia({stage:"START",step:1,progress:o,task:async c=>c},s)),a.addTask(new ia({stage:"PARSE",step:5,progress:o,task:async c=>await this.parse(c)},s)),a.addTask(new ia({stage:"FONT",step:5,progress:o,task:async c=>{const u=this.getFonts(c.model);return{model:c.model,data:u}}},s)),a.addTask(new ia({stage:"LTYPE",step:1,progress:o,task:async c=>(this.processLineTypes(c.model,n),c)},s)),a.addTask(new ia({stage:"STYLE",step:1,progress:o,task:async c=>(this.processTextStyles(c.model,n),c)},s)),a.addTask(new ia({stage:"DIMSTYLE",step:1,progress:o,task:async c=>(this.processDimStyles(c.model,n),c)},s)),a.addTask(new ia({stage:"LAYER",step:1,progress:o,task:async c=>(this.processLayers(c.model,n),n.tables.layerTable.numEntries===0&&n.createDefaultData({layer:!0}),c)},s)),a.addTask(new ia({stage:"VPORT",step:1,progress:o,task:async c=>(this.processViewports(c.model,n),c)},s)),a.addTask(new ia({stage:"HEADER",step:1,progress:o,task:async c=>(this.processHeader(c.model,n),c)},s)),a.addTask(new ia({stage:"BLOCK_RECORD",step:5,progress:o,task:async c=>(this.processBlockTables(c.model,n),c)},s)),a.addTask(new ia({stage:"OBJECT",step:5,progress:o,task:async c=>(this.processObjects(c.model,n),n.dictionaries.layouts.numEntries===0&&n.createDefaultData({layout:!0}),c)},s)),a.addTask(new ia({stage:"BLOCK",step:5,progress:o,task:async c=>(await this.processBlocks(c.model,n),c)},s)),a.addTask(new ia({stage:"ENTITY",step:100,progress:o,task:async c=>(await this.processEntities(c.model,n,i,o,s),c)},s)),a.addTask(new ia({stage:"END",step:0,progress:o,task:async c=>c},s));const l=Date.now();await a.run(e),r.data.total=Date.now()-l}onError(e){if(this.progress){const n=e.task;this.progress(n.data.progress.value,n.data.stage,"ERROR",void 0,e)}return console.error(`Error occurred in conversion stage '${e.task.name}': `,e.error),e.task.name==="ENTITY"?!1:(this.onFinished(),!0)}onFinished(){this.progress&&(this.progress(100,"END","END"),L4.instance.clear())}async parse(e,n){throw new Error("Not impelemented yet!")}getFonts(e){throw new Error("Not impelemented yet!")}processLineTypes(e,n){throw new Error("Not impelemented yet!")}processTextStyles(e,n){throw new Error("Not impelemented yet!")}processDimStyles(e,n){throw new Error("Not impelemented yet!")}processLayers(e,n){throw new Error("Not impelemented yet!")}processViewports(e,n){throw new Error("Not impelemented yet!")}processHeader(e,n){throw new Error("Not impelemented yet!")}processBlockTables(e,n){throw new Error("Not impelemented yet!")}processObjects(e,n){throw new Error("Not impelemented yet!")}processBlocks(e,n){throw new Error("Not impelemented yet!")}processEntities(e,n,i,s,r){throw new Error("Not impelemented yet!")}};var oo,yb,vr,Hr,bb,wl,Io,pu,xl,Yh,wv,_b,zp,Up,wb,xb,Sb,Ea,mu,Fs,$p,Eb,Ti,sa,Cb,ra,Tb,Sd,Ed,mc,Mb,Vp,Ca,gu,Hp,ME,AE,Cd,Td,Ab,kb,Md,Pb,kE,PE,ao,vu,Yr,Ga,LE,IE,RE,OE,Ad,ja,Wp,Lb,Gp,Ka,kd,qa,Pd;(oo={})[oo.None=0]="None",oo[oo.Anonymous=1]="Anonymous",oo[oo.NonConstant=2]="NonConstant",oo[oo.Xref=4]="Xref",oo[oo.XrefOverlay=8]="XrefOverlay",oo[oo.ExternallyDependent=16]="ExternallyDependent",oo[oo.ResolvedOrDependent=32]="ResolvedOrDependent",oo[oo.ReferencedXref=64]="ReferencedXref";(yb={})[yb.BYBLOCK=0]="BYBLOCK",yb[yb.BYLAYER=256]="BYLAYER";(vr={})[vr.Rotated=0]="Rotated",vr[vr.Aligned=1]="Aligned",vr[vr.Angular=2]="Angular",vr[vr.Diameter=3]="Diameter",vr[vr.Radius=4]="Radius",vr[vr.Angular3Point=5]="Angular3Point",vr[vr.Ordinate=6]="Ordinate",vr[vr.ReferenceIsExclusive=32]="ReferenceIsExclusive",vr[vr.IsOrdinateXTypeFlag=64]="IsOrdinateXTypeFlag",vr[vr.IsCustomTextPositionFlag=128]="IsCustomTextPositionFlag";(Hr={})[Hr.TopLeft=1]="TopLeft",Hr[Hr.TopCenter=2]="TopCenter",Hr[Hr.TopRight=3]="TopRight",Hr[Hr.MiddleLeft=4]="MiddleLeft",Hr[Hr.MiddleCenter=5]="MiddleCenter",Hr[Hr.MiddleRight=6]="MiddleRight",Hr[Hr.BottomLeft=7]="BottomLeft",Hr[Hr.BottomCenter=8]="BottomCenter",Hr[Hr.BottomRight=9]="BottomRight";(bb={})[bb.AtLeast=1]="AtLeast",bb[bb.Exact=2]="Exact";var z5=((wl={})[wl.Center=0]="Center",wl[wl.Above=1]="Above",wl[wl.Outside=2]="Outside",wl[wl.JIS=3]="JIS",wl[wl.Below=4]="Below",wl),jp=((Io={})[Io.Feet=0]="Feet",Io[Io.None=1]="None",Io[Io.Inch=2]="Inch",Io[Io.FeetAndInch=3]="FeetAndInch",Io[Io.Leading=4]="Leading",Io[Io.Trailing=8]="Trailing",Io[Io.LeadingAndTrailing=12]="LeadingAndTrailing",Io),sIe=((pu={})[pu.None=0]="None",pu[pu.Leading=1]="Leading",pu[pu.Trailing=2]="Trailing",pu[pu.LeadingAndTrailing=3]="LeadingAndTrailing",pu),rIe=((xl={})[xl.Center=0]="Center",xl[xl.Left=1]="Left",xl[xl.Right=2]="Right",xl[xl.OverFirst=3]="OverFirst",xl[xl.OverSecond=4]="OverSecond",xl),oIe=((Yh={})[Yh.Bottom=0]="Bottom",Yh[Yh.Center=1]="Center",Yh[Yh.Top=2]="Top",Yh),aIe=((wv={})[wv.PatternFill=0]="PatternFill",wv[wv.SolidFill=1]="SolidFill",wv);(_b={})[_b.NonAssociative=0]="NonAssociative",_b[_b.Associative=1]="Associative";(zp={})[zp.Normal=0]="Normal",zp[zp.Outer=1]="Outer",zp[zp.Ignore=2]="Ignore";(Up={})[Up.UserDefined=0]="UserDefined",Up[Up.Predefined=1]="Predefined",Up[Up.Custom=2]="Custom";(wb={})[wb.NotAnnotated=0]="NotAnnotated",wb[wb.Annotated=1]="Annotated";(xb={})[xb.Solid=0]="Solid",xb[xb.Gradient=1]="Gradient";(Sb={})[Sb.TwoColor=0]="TwoColor",Sb[Sb.OneColor=1]="OneColor";var lIe=((Ea={})[Ea.Default=0]="Default",Ea[Ea.External=1]="External",Ea[Ea.Polyline=2]="Polyline",Ea[Ea.Derived=4]="Derived",Ea[Ea.Textbox=8]="Textbox",Ea[Ea.Outermost=16]="Outermost",Ea),Ib=((mu={})[mu.Line=1]="Line",mu[mu.Circular=2]="Circular",mu[mu.Elliptic=3]="Elliptic",mu[mu.Spline=4]="Spline",mu),cIe=((Fs={})[Fs.Off=0]="Off",Fs[Fs.Solid=1]="Solid",Fs[Fs.Dashed=2]="Dashed",Fs[Fs.Dotted=3]="Dotted",Fs[Fs.ShotDash=4]="ShotDash",Fs[Fs.MediumDash=5]="MediumDash",Fs[Fs.LongDash=6]="LongDash",Fs[Fs.DoubleShortDash=7]="DoubleShortDash",Fs[Fs.DoubleMediumDash=8]="DoubleMediumDash",Fs[Fs.DoubleLongDash=9]="DoubleLongDash",Fs[Fs.DoubleMediumLongDash=10]="DoubleMediumLongDash",Fs[Fs.SparseDot=11]="SparseDot",Fs);cIe.Off;($p={})[$p.Standard=-3]="Standard",$p[$p.ByLayer=-2]="ByLayer",$p[$p.ByBlock=-1]="ByBlock";(Eb={})[Eb.English=0]="English",Eb[Eb.Metric=1]="Metric";(Ti={})[Ti.PERSPECTIVE_MODE=1]="PERSPECTIVE_MODE",Ti[Ti.FRONT_CLIPPING=2]="FRONT_CLIPPING",Ti[Ti.BACK_CLIPPING=4]="BACK_CLIPPING",Ti[Ti.UCS_FOLLOW=8]="UCS_FOLLOW",Ti[Ti.FRONT_CLIP_NOT_AT_EYE=16]="FRONT_CLIP_NOT_AT_EYE",Ti[Ti.UCS_ICON_VISIBILITY=32]="UCS_ICON_VISIBILITY",Ti[Ti.UCS_ICON_AT_ORIGIN=64]="UCS_ICON_AT_ORIGIN",Ti[Ti.FAST_ZOOM=128]="FAST_ZOOM",Ti[Ti.SNAP_MODE=256]="SNAP_MODE",Ti[Ti.GRID_MODE=512]="GRID_MODE",Ti[Ti.ISOMETRIC_SNAP_STYLE=1024]="ISOMETRIC_SNAP_STYLE",Ti[Ti.HIDE_PLOT_MODE=2048]="HIDE_PLOT_MODE",Ti[Ti.K_ISO_PAIR_TOP=4096]="K_ISO_PAIR_TOP",Ti[Ti.K_ISO_PAIR_RIGHT=8192]="K_ISO_PAIR_RIGHT",Ti[Ti.VIEWPORT_ZOOM_LOCKING=16384]="VIEWPORT_ZOOM_LOCKING",Ti[Ti.UNUSED=32768]="UNUSED",Ti[Ti.NON_RECTANGULAR_CLIPPING=65536]="NON_RECTANGULAR_CLIPPING",Ti[Ti.VIEWPORT_OFF=131072]="VIEWPORT_OFF",Ti[Ti.GRID_BEYOND_DRAWING_LIMITS=262144]="GRID_BEYOND_DRAWING_LIMITS",Ti[Ti.ADAPTIVE_GRID_DISPLAY=524288]="ADAPTIVE_GRID_DISPLAY",Ti[Ti.SUBDIVISION_BELOW_SPACING=1048576]="SUBDIVISION_BELOW_SPACING",Ti[Ti.GRID_FOLLOWS_WORKPLANE=2097152]="GRID_FOLLOWS_WORKPLANE";(sa={})[sa.OPTIMIZED_2D=0]="OPTIMIZED_2D",sa[sa.WIREFRAME=1]="WIREFRAME",sa[sa.HIDDEN_LINE=2]="HIDDEN_LINE",sa[sa.FLAT_SHADED=3]="FLAT_SHADED",sa[sa.GOURAUD_SHADED=4]="GOURAUD_SHADED",sa[sa.FLAT_SHADED_WITH_WIREFRAME=5]="FLAT_SHADED_WITH_WIREFRAME",sa[sa.GOURAUD_SHADED_WITH_WIREFRAME=6]="GOURAUD_SHADED_WITH_WIREFRAME";(Cb={})[Cb.UCS_UNCHANGED=0]="UCS_UNCHANGED",Cb[Cb.HAS_OWN_UCS=1]="HAS_OWN_UCS";(ra={})[ra.NON_ORTHOGRAPHIC=0]="NON_ORTHOGRAPHIC",ra[ra.TOP=1]="TOP",ra[ra.BOTTOM=2]="BOTTOM",ra[ra.FRONT=3]="FRONT",ra[ra.BACK=4]="BACK",ra[ra.LEFT=5]="LEFT",ra[ra.RIGHT=6]="RIGHT";(Tb={})[Tb.ONE_DISTANT_LIGHT=0]="ONE_DISTANT_LIGHT",Tb[Tb.TWO_DISTANT_LIGHTS=1]="TWO_DISTANT_LIGHTS";(Sd={})[Sd.ByLayer=0]="ByLayer",Sd[Sd.ByBlock=1]="ByBlock",Sd[Sd.ByDictionaryDefault=2]="ByDictionaryDefault",Sd[Sd.ByObject=3]="ByObject";function Vi(t,e,n){return t.code===e&&(n==null||t.value===n)}function rs(t){let e={};t.rewind();let n=t.next(),i=n.code;if(e.x=n.value,(n=t.next()).code!==i+10)throw Error("Expected code for point value to be 20 but got "+n.code+".");return e.y=n.value,(n=t.next()).code!==i+20?t.rewind():e.z=n.value,e}let V4=Symbol();function ki(t,e){return(n,i,s)=>{let r=(function(l,c=!1){return l.reduce((u,d)=>{d.pushContext&&u.push({});let h=u[u.length-1];for(let f of typeof d.code=="number"?[d.code]:d.code){let p=h[f]??(h[f]=[]);d.isMultiple&&p.length&&c&&console.warn(`Snippet ${p[p.length-1].name} for code(${f}) is shadowed by ${d.name}`),p.push(d)}return u},[{}])})(t,i.debug),o=!1,a=r.length-1;for(;!Vi(n,0,"EOF");){let l=(function(b,g,x){return b.find((S,_)=>{var E;return _>=x&&((E=S[g])==null?void 0:E.length)})})(r,n.code,a),c=l?.[n.code],u=c?.[c.length-1];if(!l||!u){i.rewind();break}u.isMultiple||l[n.code].pop();let{name:d,parser:h,isMultiple:f,isReducible:p}=u,m=h?.(n,i,s);if(m===V4){i.rewind();break}if(d){let[b,g]=(function(x,S){let _=S.split(".");if(!_.length)throw Error("[parserGenerator::getObjectByPath] Invalid empty path");let E=x;for(let T=0;T<_.length-1;++T){let A=DE(_[T]),I=DE(_[T+1]);Object.prototype.hasOwnProperty.call(E,A)||(typeof I=="number"?E[A]=[]:E[A]={}),E=E[A]}return[E,DE(_[_.length-1])]})(s,d);f&&!p?(Object.prototype.hasOwnProperty.call(b,g)||(b[g]=[]),b[g].push(m)):b[g]=m}u.pushContext&&(a-=1),o=!0,n=i.next()}return e&&Object.setPrototypeOf(s,e),o}}function DE(t){let e=Number.parseInt(t);return Number.isNaN(e)?t:e}function Ae({value:t}){return t}function an(t,e){return rs(e)}function fs({value:t}){return!!t}let uIe=[{code:1001,name:"xdata",parser:HH}];function HH(t,e){var n;if(!Vi(t,1001))throw Error("XData must starts with code 1001");let i={appName:t.value,value:[]};t=e.next();let s=[i.value];for(;!Vi(t,0,"EOF")&&t.code>=1e3;){let r=s[s.length-1];switch(t.code){case 1002:t.value==="{"?s.push([]):(s.pop(),(n=s[s.length-1])==null||n.push(r));break;case 1e3:case 1004:case 1040:case 1070:case 1071:r.push({type:yu(t.code),value:t.value});break;case 1003:r.push({name:"layer",type:yu(t.code),value:t.value});break;case 1005:r.push({name:"handle",type:yu(t.code),value:t.value});break;case 1010:r.push({type:yu(t.code),value:rs(e)});break;case 1011:r.push({name:"worldSpacePosition",type:yu(t.code),value:rs(e)});break;case 1012:r.push({name:"worldSpaceDisplacement",type:yu(t.code),value:rs(e)});break;case 1013:r.push({name:"worldSpaceDirection",type:yu(t.code),value:rs(e)});break;case 1041:r.push({name:"distance",type:yu(t.code),value:t.value});break;case 1042:r.push({name:"scale",type:yu(t.code),value:t.value})}t=e.next()}return e.rewind(),i}function yu(t){switch(t){case 1e3:case 1003:case 1005:return"string";case 1004:return"hex";case 1040:case 1041:case 1042:return"real";case 1070:return"integer";case 1071:return"long";case 1010:case 1011:case 1012:case 1013:return"point";default:return""}}function Uf(t,e,n){for(;Vi(t,102);){var i;let s=t.value;if(t=e.next(),!s.startsWith("{")){e.debug&&console.warn(`Invalid application group, expected to start with "{" but received: ${s}`),(function(o,a){for(;!Vi(o,102)&&!Vi(o,0,"EOF");)o=a.next()})(t,e),t=e.next();continue}let r=s.slice(1).trim();n.extensions??(n.extensions={}),(i=n.extensions)[r]??(i[r]=[]),(function(o,a,l){for(;!Vi(o,102,"}")&&!Vi(o,0,"EOF");)l.push(o),o=a.next()})(t,e,n.extensions[r]),t=e.next()}e.rewind()}let dIe=0;function WH(t){if(!t)throw TypeError("entity cannot be undefined or null");t.handle||(t.handle=dIe++)}var hIe=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215];function GH(t){return hIe[t]}(Ed={})[Ed.CAST_AND_RECEIVE=0]="CAST_AND_RECEIVE",Ed[Ed.CAST=1]="CAST",Ed[Ed.RECEIVE=2]="RECEIVE",Ed[Ed.IGNORE=3]="IGNORE";let ks=[...uIe,{code:284,name:"shadowMode",parser:Ae},{code:390,name:"plotStyleHardId",parser:Ae},{code:380,name:"plotStyleType",parser:Ae},{code:440,name:"transparency",parser:Ae},{code:430,name:"colorName",parser:Ae},{code:420,name:"color",parser:Ae},{code:310,name:"proxyEntity",isMultiple:!0,parser:Ae},{code:92,name:"proxyByte",parser:Ae},{code:60,name:"isVisible",parser:fs},{code:48,name:"lineTypeScale",parser:Ae},{code:370,name:"lineweight",parser:Ae},{code:62,name:"colorIndex",parser(t,e,n){let i=t.value;return i>0&&i<256&&(n.color=GH(Math.abs(i))),i}},{code:347,name:"materialObjectHardId",parser:Ae},{code:6,name:"lineType",parser:Ae},{code:8,name:"layer",parser:Ae},{code:410,name:"layoutTabName",parser:Ae},{code:67,name:"isInPaperSpace",parser:fs},{code:100},{code:160},{code:330,name:"ownerBlockRecordSoftId",parser:Ae},{code:102,parser:Uf},{code:102,parser:Uf},{code:102,parser:Uf},{code:5,name:"handle",parser:Ae}];function Jx(t){return[{code:3,name:t,parser:(e,n,i)=>(i._code3text=(i._code3text??"")+e.value,i._code3text+(i._code1text??"")),isMultiple:!0,isReducible:!0},{code:1,name:t,parser:(e,n,i)=>(i._code1text=e.value,(i._code3text??"")+i._code1text)}]}function jH(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let fIe={extrusionDirection:{x:0,y:0,z:1}},pIe=[{code:210,name:"extrusionDirection",parser:an},{code:51,name:"endAngle",parser:Ae},{code:50,name:"startAngle",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},{code:40,name:"radius",parser:Ae},{code:10,name:"center",parser:an},{code:39,name:"thickness",parser:Ae},{code:100},...ks],KH=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){jH(this,"parser",ki(pIe,fIe))}};jH(KH,"ForEntityName","ARC");(mc={})[mc.NONE=0]="NONE",mc[mc.INVISIBLE=1]="INVISIBLE",mc[mc.CONSTANT=2]="CONSTANT",mc[mc.VERIFICATION_REQUIRED=4]="VERIFICATION_REQUIRED",mc[mc.PRESET=8]="PRESET";(Mb={})[Mb.MULTILINE=2]="MULTILINE",Mb[Mb.CONSTANT_MULTILINE=4]="CONSTANT_MULTILINE";(Vp={})[Vp.NONE=0]="NONE",Vp[Vp.MIRRORED_X=2]="MIRRORED_X",Vp[Vp.MIRRORED_Y=4]="MIRRORED_Y";var mIe=((Ca={})[Ca.LEFT=0]="LEFT",Ca[Ca.CENTER=1]="CENTER",Ca[Ca.RIGHT=2]="RIGHT",Ca[Ca.ALIGNED=3]="ALIGNED",Ca[Ca.MIDDLE=4]="MIDDLE",Ca[Ca.FIT=5]="FIT",Ca),gIe=((gu={})[gu.BASELINE=0]="BASELINE",gu[gu.BOTTOM=1]="BOTTOM",gu[gu.MIDDLE=2]="MIDDLE",gu[gu.TOP=3]="TOP",gu);function qH(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let YH={thickness:0,rotation:0,xScale:1,obliqueAngle:0,styleName:"STANDARD",generationFlag:0,halign:mIe.LEFT,valign:gIe.BASELINE,extrusionDirection:{x:0,y:0,z:1}},XH=[{code:73,name:"valign",parser:Ae},{code:100},{code:210,name:"extrusionDirection",parser:an},{code:11,name:"endPoint",parser:an},{code:72,name:"valign",parser:Ae},{code:72,name:"halign",parser:Ae},{code:71,name:"generationFlag",parser:Ae},{code:7,name:"styleName",parser:Ae},{code:51,name:"obliqueAngle",parser:Ae},{code:41,name:"xScale",parser:Ae},{code:50,name:"rotation",parser:Ae},{code:1,name:"text",parser:Ae},{code:40,name:"textHeight",parser:Ae},{code:10,name:"startPoint",parser:an},{code:39,name:"thickness",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],ZH=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){qH(this,"parser",ki(XH,YH))}};function JH(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}qH(ZH,"ForEntityName","TEXT");let vIe={...YH},yIe=[{code:2},{code:40,name:"annotationScale",parser:Ae},{code:10,name:"alignmentPoint",parser:an},{code:340,name:"secondaryAttributesHardIds",isMultiple:!0,parser:Ae},{code:70,name:"numberOfSecondaryAttributes",parser:Ae},{code:70,name:"isReallyLocked",parser:fs},{code:70,name:"mtextFlag",parser:Ae},{code:280,name:"isDuplicatedRecord",parser:fs},{code:100},{code:280,name:"isLocked",parser:fs},{code:74,name:"valign",parser:Ae},{code:73},{code:70,name:"attributeFlag",parser:Ae},{code:2,name:"tag",parser:Ae},{code:3,name:"prompt",parser:Ae},{code:280},{code:100,name:"subclassMarker",parser:Ae},...XH.slice(2)],QH=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){JH(this,"parser",ki(yIe,vIe))}};JH(QH,"ForEntityName","ATTDEF");(Hp={})[Hp.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",Hp[Hp.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",Hp[Hp.BY_STYLE=5]="BY_STYLE";function bIe(t,e){let n={};for(let i of t){let s=e(i);s!=null&&(n[s]??(n[s]=[]),n[s].push(i))}return n}function*C2(t,e=1/0,n=1){for(let i=t;i!==e;i+=n)yield i}function Jd(t){return{x:t.x??0,y:t.y??0,z:t.z??0}}function H4(t,e,n){if(Vi(e,102))return Uf(e,n,t),!0;switch(e.code){case 0:t.type=e.value;break;case 5:t.handle=e.value;break;case 330:t.ownerBlockRecordSoftId=e.value;break;case 67:t.isInPaperSpace=!!e.value;break;case 8:t.layer=e.value;break;case 6:t.lineType=e.value;break;case 347:t.materialObjectHardId=e.value;break;case 62:t.colorIndex=e.value,t.color=GH(Math.abs(e.value));break;case 370:t.lineweight=e.value;break;case 48:t.lineTypeScale=e.value;break;case 60:t.isVisible=!!e.value;break;case 92:t.proxyByte=e.value;break;case 310:t.proxyEntity=e.value;break;case 100:break;case 420:t.color=e.value;break;case 430:t.transparency=e.value;break;case 390:t.plotStyleHardId=e.value;break;case 284:t.shadowMode=e.value;break;case 1001:t.xdata=HH(e,n);break;default:return!1}return!0}function eW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let _Ie={textStyle:"STANDARD",extrusionDirection:{x:0,y:0,z:1},rotation:0},vw=[{code:46,name:"annotationHeight",parser:Ae},{code:101,parser(t,e){(function(n){n.rewind();let i=n.next();if(i.code!==101)throw Error("Bad call for skipEmbeddedObject()");do i=n.next();while(i.code!==0);n.rewind()})(e)}},{code:50,name:"columnHeight",parser:Ae},{code:49,name:"columnGutter",parser:Ae},{code:48,name:"columnWidth",parser:Ae},{code:79,name:"columnAutoHeight",parser:Ae},{code:78,name:"columnFlowReversed",parser:Ae},{code:76,name:"columnCount",parser:Ae},{code:75,name:"columnType",parser:Ae},{code:441,name:"backgroundFillTransparency",parser:Ae},{code:63,name:"backgroundFillColor",parser:Ae},{code:45,name:"fillBoxScale",parser:Ae},{code:[...C2(430,440)],name:"backgroundColor",parser:Ae},{code:[...C2(420,430)],name:"backgroundColor",parser:Ae},{code:90,name:"backgroundFill",parser:Ae},{code:44,name:"lineSpacing",parser:Ae},{code:73,name:"lineSpacingStyle",parser:Ae},{code:50,name:"rotation",parser:Ae},{code:43},{code:42},{code:11,name:"direction",parser:an},{code:210,name:"extrusionDirection",parser:an},{code:7,name:"styleName",parser:Ae},...Jx("text"),{code:72,name:"drawingDirection",parser:Ae},{code:71,name:"attachmentPoint",parser:Ae},{code:41,name:"width",parser:Ae},{code:40,name:"height",parser:Ae},{code:10,name:"insertionPoint",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],tW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){eW(this,"parser",ki(vw,_Ie))}};function nW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}eW(tW,"ForEntityName","MTEXT");let wIe={thickness:0,rotation:0,scale:1,obliqueAngle:0,textStyle:"STANDARD",textGenerationFlag:0,horizontalJustification:0,verticalJustification:0,extrusionDirection:{x:0,y:0,z:1}},xIe=[...vw.slice(vw.findIndex(({name:t})=>t==="columnType"),vw.findIndex(({name:t})=>t==="subclassMarker")+1),{code:100},{code:0,parser(t){if(!Vi(t,0,"MTEXT"))return V4}},{code:2,name:"definitionTag",parser:Ae},{code:40,name:"annotationScale",parser:Ae},{code:10,name:"alignmentPoint",parser:an},{code:340,name:"secondaryAttributesHardId",parser:Ae},{code:70,name:"numberOfSecondaryAttributes",parser:Ae},{code:70,name:"isReallyLocked",parser:fs},{code:70,name:"mtextFlag",parser:Ae},{code:280,name:"isDuplicatedEntriesKeep",parser:fs},{code:100},{code:280,name:"lockPositionFlag",parser:fs},{code:210,name:"extrusionDirection",parser:an},{code:11,name:"alignmentPoint",parser:an},{code:74,name:"verticalJustification",parser:Ae},{code:72,name:"horizontalJustification",parser:Ae},{code:71,name:"textGenerationFlag",parser:Ae},{code:7,name:"textStyle",parser:Ae},{code:51,name:"obliqueAngle",parser:Ae},{code:41,name:"scale",parser:Ae},{code:50,name:"rotation",parser:Ae},{code:73},{code:70,name:"attributeFlag",parser:Ae},{code:2,name:"tag",parser:Ae},{code:280},{code:100,name:"subclassMarker",parser:Ae},{code:1,name:"text",parser:Ae},{code:40,name:"textHeight",parser:Ae},{code:10,name:"startPoint",parser:an},{code:39,name:"thickness",parser:Ae},{code:100},...ks],iW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){nW(this,"parser",ki(xIe,wIe))}};function sW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}nW(iW,"ForEntityName","ATTRIB");let SIe=[...Jx("data"),{code:70,name:"version",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],rW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){sW(this,"parser",ki(SIe))}};function oW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}sW(rW,"ForEntityName","BODY");let EIe={thickness:0,extrusionDirection:{x:0,y:0,z:1}},CIe=[{code:210,name:"extrusionDirection",parser:an},{code:40,name:"radius",parser:Ae},{code:10,name:"center",parser:an},{code:39,name:"thickness",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],aW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){oW(this,"parser",ki(CIe,EIe))}};oW(aW,"ForEntityName","CIRCLE");let yw=class{parseEntity(e,n){let i={};for(;!Vi(n,0,"EOF");){if(n.code===0){e.rewind();break}(function(s,r,o){switch(r.code){case 100:s.subclassMarker=r.value;break;case 280:s.version=r.value;break;case 2:s.name=r.value;break;case 10:s.definitionPoint=rs(o);break;case 11:s.textPoint=rs(o);break;case 12:s.insertionPoint=rs(o);break;case 13:s.subDefinitionPoint1=rs(o);break;case 14:s.subDefinitionPoint2=rs(o);break;case 15:s.centerPoint=rs(o);break;case 16:s.arcPoint=rs(o);break;case 70:s.dimensionType=r.value;break;case 71:s.attachmentPoint=r.value;break;case 72:s.textLineSpacingStyle=r.value;break;case 40:s.leaderLength=r.value;break;case 41:s.textLineSpacingFactor=r.value;break;case 42:s.measurement=r.value;break;case 1:s.text=r.value;break;case 50:s.rotationAngle=r.value;break;case 52:s.obliqueAngle=r.value;break;case 53:s.textRotation=r.value;break;case 51:s.ocsRotation=r.value;break;case 210:s.extrusionDirection=rs(o);break;case 3:s.styleName=r.value;break;default:H4(s,r,o)}})(i,n,e),n=e.next()}return i}};function lW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}AE="DIMENSION",(ME="ForEntityName")in yw?Object.defineProperty(yw,ME,{value:AE,enumerable:!0,configurable:!0,writable:!0}):yw[ME]=AE;let TIe={extrusionDirection:{x:0,y:0,z:1}},MIe=[{code:42,name:"endAngle",parser:Ae},{code:41,name:"startAngle",parser:Ae},{code:40,name:"axisRatio",parser:Ae},{code:210,name:"extrusionDirection",parser:an},{code:11,name:"majorAxisEndPoint",parser:an},{code:10,name:"center",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],cW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){lW(this,"parser",ki(MIe,TIe))}};lW(cW,"ForEntityName","ELLIPSE");(Cd={})[Cd.First=1]="First",Cd[Cd.Second=2]="Second",Cd[Cd.Third=4]="Third",Cd[Cd.Fourth=8]="Fourth";function uW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let AIe=[{code:13,name:"vertices.3",parser:an},{code:12,name:"vertices.2",parser:an},{code:11,name:"vertices.1",parser:an},{code:10,name:"vertices.0",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],dW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){uW(this,"parser",ki(AIe))}};uW(dW,"ForEntityName","3DFACE");let hW=[{code:330,name:"sourceBoundaryObjects",parser:Ae,isMultiple:!0},{code:97,name:"numberOfSourceBoundaryObjects",parser:Ae}],kIe=[{code:11,name:"end",parser:an},{code:10,name:"start",parser:an}],PIe=[{code:73,name:"isCCW",parser:fs},{code:51,name:"endAngle",parser:Ae},{code:50,name:"startAngle",parser:Ae},{code:40,name:"radius",parser:Ae},{code:10,name:"center",parser:an}],LIe=[{code:73,name:"isCCW",parser:fs},{code:51,name:"endAngle",parser:Ae},{code:50,name:"startAngle",parser:Ae},{code:40,name:"lengthOfMinorAxis",parser:Ae},{code:11,name:"end",parser:an},{code:10,name:"center",parser:an}],IIe=[{code:13,name:"endTangent",parser:an},{code:12,name:"startTangent",parser:an},{code:11,name:"fitDatum",isMultiple:!0,parser:an},{code:97,name:"numberOfFitData",parser:Ae},{code:10,name:"controlPoints",isMultiple:!0,parser(t,e){let n={...rs(e),weight:1};return(t=e.next()).code===42?n.weight=t.value:e.rewind(),n}},{code:40,name:"knots",isMultiple:!0,parser:Ae},{code:96,name:"numberOfControlPoints",parser:Ae},{code:95,name:"numberOfKnots",parser:Ae},{code:74,name:"isPeriodic",parser:fs},{code:73,name:"splineFlag",parser:Ae},{code:94,name:"degree",parser:Ae}],RIe={[Ib.Line]:kIe,[Ib.Circular]:PIe,[Ib.Elliptic]:LIe,[Ib.Spline]:IIe},OIe=[...hW,{code:72,name:"edges",parser(t,e){let n={type:t.value},i=ki(RIe[n.type]);if(!i)throw Error(`Invalid edge type ${n.type}`);return i(t=e.next(),e,n),n},isMultiple:!0},{code:93,name:"numberOfEdges",parser:Ae}],DIe=[...hW,{code:10,name:"vertices",parser(t,e){let n={...rs(e),bulge:0};return(t=e.next()).code===42?n.bulge=t.value:e.rewind(),n},isMultiple:!0},{code:93,name:"numberOfVertices",parser:Ae},{code:73,name:"isClosed",parser:fs},{code:72,name:"hasBulge",parser:fs}],NIe=[{code:49,name:"dashLengths",parser:Ae,isMultiple:!0},{code:79,name:"numberOfDashLengths",parser:Ae},{code:45,name:"offset",parser:U5},{code:43,name:"base",parser:U5},{code:53,name:"angle",parser:Ae}];function U5(t,e){let n=t.code+1,i={x:t.value,y:1};return(t=e.next()).code===n?i.y=t.value:e.rewind(),i}function fW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let BIe={extrusionDirection:{x:0,y:0,z:1},gradientRotation:0,colorTint:0},FIe=[{code:470},{code:463},{code:462,name:"colorTint",parser:Ae},{code:461,name:"gradientDefinition",parser:Ae},{code:460,name:"gradientRotation",parser:Ae},{code:453,name:"numberOfColors",parser:Ae},{code:452,name:"gradientColorFlag",parser:Ae},{code:451},{code:450,name:"gradientFlag",parser:Ae},{code:10,name:"seedPoints",parser:an,isMultiple:!0},{code:99},{code:11,name:"offsetVector",parser:an},{code:98,name:"numberOfSeedPoints",parser:Ae},{code:47,name:"pixelSize",parser:Ae},{code:53,name:"definitionLines",parser:function(t,e){let n={};return ki(NIe)(t,e,n),n},isMultiple:!0},{code:78,name:"numberOfDefinitionLines",parser:Ae},{code:77,name:"isDouble",parser:fs},{code:73,name:"isAnnotated",parser:fs},{code:41,name:"patternScale",parser:Ae},{code:52,name:"patternAngle",parser:Ae},{code:76,name:"patternType",parser:Ae},{code:75,name:"hatchStyle",parser:Ae},{code:92,name:"boundaryPaths",parser:function(t,e){let n={boundaryPathTypeFlag:t.value},i=n.boundaryPathTypeFlag&lIe.Polyline;return t=e.next(),i?ki(DIe)(t,e,n):ki(OIe)(t,e,n),n},isMultiple:!0},{code:91,name:"numberOfBoundaryPaths",parser:Ae},{code:71,name:"associativity",parser:Ae},{code:63,name:"patternFillColor",parser:Ae},{code:70,name:"solidFill",parser:Ae},{code:2,name:"patternName",parser:Ae},{code:210,name:"extrusionDirection",parser:an},{code:10,name:"elevationPoint",parser:an},{code:100,name:"subclassMarker",parser:Ae,pushContext:!0},...ks],pW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){fW(this,"parser",ki(FIe,BIe))}};fW(pW,"ForEntityName","HATCH");(Td={})[Td.ShowImage=1]="ShowImage",Td[Td.ShowImageWhenNotAlignedWithScreen=2]="ShowImageWhenNotAlignedWithScreen",Td[Td.UseClippingBoundary=4]="UseClippingBoundary",Td[Td.TransparencyIsOn=8]="TransparencyIsOn";(Ab={})[Ab.Rectangular=1]="Rectangular",Ab[Ab.Polygonal=2]="Polygonal";(kb={})[kb.Outside=0]="Outside",kb[kb.Inside=1]="Inside";function mW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let zIe={brightness:50,contrast:50,fade:0,clippingBoundaryPath:[]},UIe=[{code:290,name:"clipMode",parser:Ae},{code:14,name:"clippingBoundaryPath",isMultiple:!0,parser:an},{code:91,name:"countBoundaryPoints",parser:Ae},{code:71,name:"clippingBoundaryType",parser:Ae},{code:360,name:"imageDefReactorHandle",parser:Ae},{code:283,name:"fade",parser:Ae},{code:282,name:"contrast",parser:Ae},{code:281,name:"brightness",parser:Ae},{code:280,name:"isClipped",parser:fs},{code:70,name:"flags",parser:Ae},{code:340,name:"imageDefHandle",parser:Ae},{code:13,name:"imageSize",parser:an},{code:12,name:"vPixel",parser:an},{code:11,name:"uPixel",parser:an},{code:10,name:"position",parser:an},{code:90,name:"version",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],gW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){mW(this,"parser",ki(UIe,zIe))}};function vW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}mW(gW,"ForEntityName","IMAGE");let $Ie={xScale:1,yScale:1,zScale:1,rotation:0,columnCount:0,rowCount:0,columnSpacing:0,rowSpacing:0,extrusionDirection:{x:0,y:0,z:1}},VIe=[{code:210,name:"extrusionDirection",parser:an},{code:45,name:"rowSpacing",parser:Ae},{code:44,name:"columnSpacing",parser:Ae},{code:71,name:"rowCount",parser:Ae},{code:70,name:"columnCount",parser:Ae},{code:50,name:"rotation",parser:Ae},{code:43,name:"zScale",parser:Ae},{code:42,name:"yScale",parser:Ae},{code:41,name:"xScale",parser:Ae},{code:10,name:"insertionPoint",parser:an},{code:2,name:"name",parser:Ae},{code:66,name:"isVariableAttributes",parser:fs},{code:100,name:"subclassMarker",parser:Ae},...ks],yW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){vW(this,"parser",ki(VIe,$Ie))}};function bW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}vW(yW,"ForEntityName","INSERT");let HIe={isArrowheadEnabled:!0},WIe=[{code:213,name:"offsetFromAnnotation",parser:an},{code:212,name:"offsetFromBlock",parser:an},{code:211,name:"horizontalDirection",parser:an},{code:210,name:"normal",parser:an},{code:340,name:"associatedAnnotation",parser:Ae},{code:77,name:"byBlockColor",parser:Ae},{code:10,name:"vertices",parser:an,isMultiple:!0},{code:76,name:"numberOfVertices",parser:Ae},{code:41,name:"textWidth",parser:Ae},{code:40,name:"textHeight",parser:Ae},{code:75,name:"isHooklineExists",parser:fs},{code:74,name:"isHooklineSameDirection",parser:fs},{code:73,name:"leaderCreationFlag",parser:Ae},{code:72,name:"isSpline",parser:fs},{code:71,name:"isArrowheadEnabled",parser:fs},{code:3,name:"styleName",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],_W=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){bW(this,"parser",ki(WIe,HIe))}};bW(_W,"ForEntityName","LEADER");(Md={})[Md.TextAnnotation=0]="TextAnnotation",Md[Md.ToleranceAnnotation=1]="ToleranceAnnotation",Md[Md.BlockReferenceAnnotation=2]="BlockReferenceAnnotation",Md[Md.NoAnnotation=3]="NoAnnotation";function wW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let GIe={thickness:0,extrusionDirection:{x:0,y:0,z:1}},jIe=[{code:210,name:"extrusionDirection",parser:an},{code:11,name:"endPoint",parser:an},{code:10,name:"startPoint",parser:an},{code:39,name:"thickness",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],xW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){wW(this,"parser",ki(jIe,GIe))}};wW(xW,"ForEntityName","LINE");(Pb={})[Pb.IS_CLOSED=1]="IS_CLOSED",Pb[Pb.PLINE_GEN=128]="PLINE_GEN";let KIe={flag:0,elevation:0,thickness:0,extrusionDirection:{x:0,y:0,z:1},vertices:[]},qIe={bulge:0},YIe=[{code:42,name:"bulge",parser:Ae},{code:41,name:"endWidth",parser:Ae},{code:40,name:"startWidth",parser:Ae},{code:91,name:"id",parser:Ae},{code:20,name:"y",parser:Ae},{code:10,name:"x",parser:Ae}],XIe=[{code:210,name:"extrusionDirection",parser:an},{code:10,name:"vertices",isMultiple:!0,parser(t,e){let n={};return ki(YIe,qIe)(t,e,n),n}},{code:39,name:"thickness",parser:Ae},{code:38,name:"elevation",parser:Ae},{code:43,name:"constantWidth",parser:Ae},{code:70,name:"flag",parser:Ae},{code:90,name:"numberOfVertices",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],bw=class{parseEntity(e,n){let i={};return ki(XIe,KIe)(n,e,i),i}};function SW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}PE="LWPOLYLINE",(kE="ForEntityName")in bw?Object.defineProperty(bw,kE,{value:PE,enumerable:!0,configurable:!0,writable:!0}):bw[kE]=PE;let ZIe=[{code:90,name:"overridenSubEntityCount",parser:Ae},{code:140,name:"edgeCreaseWeights",parser:Ae,isMultiple:!0},{code:95,name:"edgeCreaseCount",parser:Ae},{code:94,parser(t,e,n){n.edgeCount=t.value,n.edgeIndices=[];for(let i=0;iVi(t,0,"VERTEX")?(t=e.next(),new W4().parseEntity(e,t)):V4},{code:210,name:"extrusionDirection",parser:an},{code:75,name:"smoothType",parser:Ae},{code:74,name:"surfaceNDensity",parser:Ae},{code:73,name:"surfaceMDensity",parser:Ae},{code:72,name:"meshNVertexCount",parser:Ae},{code:71,name:"meshMVertexCount",parser:Ae},{code:41,name:"endWidth",parser:Ae},{code:40,name:"startWidth",parser:Ae},{code:70,name:"flag",parser:Ae},{code:39,name:"thickness",parser:Ae},{code:30,name:"elevation",parser:Ae},{code:20},{code:10},{code:66},{code:100,name:"subclassMarker",parser:Ae},...ks],kW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){AW(this,"parser",ki(s8e,i8e))}};function PW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}AW(kW,"ForEntityName","POLYLINE");let r8e=[{code:11,name:"direction",parser:an},{code:10,name:"position",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],LW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){PW(this,"parser",ki(r8e))}};function IW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}PW(LW,"ForEntityName","RAY");let o8e=[...Jx("data"),{code:70,name:"version",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],RW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){IW(this,"parser",ki(o8e))}};function OW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}IW(RW,"ForEntityName","REGION");let a8e={vertices:[],backLineVertices:[]},l8e=[{code:360,name:"geometrySettingHardId",parser:Ae},{code:12,name:"backLineVertices",isMultiple:!0,parser:an},{code:93,name:"numberOfBackLineVertices",parser:Ae},{code:11,name:"vertices",isMultiple:!0,parser:an},{code:92,name:"verticesCount",parser:Ae},{code:[63,411],name:"indicatorColor",parser:Ae},{code:70,name:"indicatorTransparency",parser:Ae},{code:41,name:"bottomHeight",parser:Ae},{code:40,name:"topHeight",parser:Ae},{code:10,name:"verticalDirection",parser:an},{code:1,name:"name",parser:Ae},{code:91,name:"flag",parser:Ae},{code:90,name:"state",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],DW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){OW(this,"parser",ki(l8e,a8e))}};function NW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}OW(DW,"ForEntityName","SECTION");let c8e={points:[],thickness:0,extrusionDirection:{x:0,y:0,z:1}},u8e=[{code:210,name:"extrusionDirection",parser:an},{code:39,name:"thickness",parser:Ae},{code:[...C2(10,14)],name:"points",isMultiple:!0,parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],BW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){NW(this,"parser",ki(u8e,c8e))}};function FW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}NW(BW,"ForEntityName","SOLID");let d8e=[{code:350,name:"historyObjectSoftId",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Jx("data"),{code:70,name:"version",parser:Ae},{code:100},...ks],zW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){FW(this,"parser",ki(d8e))}};FW(zW,"ForEntityName","3DSOLID");(Ga={})[Ga.NONE=0]="NONE",Ga[Ga.CLOSED=1]="CLOSED",Ga[Ga.PERIODIC=2]="PERIODIC",Ga[Ga.RATIONAL=4]="RATIONAL",Ga[Ga.PLANAR=8]="PLANAR",Ga[Ga.LINEAR=16]="LINEAR";function UW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let h8e={knotTolerance:1e-6,controlTolerance:1e-6,fitTolerance:1e-9,knotValues:[],controlPoints:[],fitPoints:[]},f8e=[{code:11,name:"fitPoints",isMultiple:!0,parser:an},{code:10,name:"controlPoints",isMultiple:!0,parser:an},{code:41,name:"weights",isMultiple:!0,parser:Ae},{code:40,name:"knots",isMultiple:!0,parser:Ae},{code:13,name:"endTangent",parser:an},{code:12,name:"startTangent",parser:an},{code:44,name:"fitTolerance",parser:Ae},{code:43,name:"controlTolerance",parser:Ae},{code:42,name:"knotTolerance",parser:Ae},{code:74,name:"numberOfFitPoints",parser:Ae},{code:73,name:"numberOfControlPoints",parser:Ae},{code:72,name:"numberOfKnots",parser:Ae},{code:71,name:"degree",parser:Ae},{code:70,name:"flag",parser:Ae},{code:210,name:"normal",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],$W=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){UW(this,"parser",ki(f8e,h8e))}};UW($W,"ForEntityName","SPLINE");let _w=class{parseEntity(e,n){let i={};for(;!e.isEOF();){if(n.code===0){e.rewind();break}switch(n.code){case 100:i.subclassMarker=n.value,n=e.next();break;case 2:i.name=n.value,n=e.next();break;case 5:i.handle=n.value,n=e.next();break;case 10:i.startPoint=Jd(rs(e)),n=e.lastReadGroup;break;case 11:i.directionVector=Jd(rs(e)),n=e.lastReadGroup;break;case 90:i.tableValue=n.value,n=e.next();break;case 91:i.rowCount=n.value,n=e.next();break;case 92:i.columnCount=n.value,n=e.next();break;case 93:i.overrideFlag=n.value,n=e.next();break;case 94:i.borderColorOverrideFlag=n.value,n=e.next();break;case 95:i.borderLineWeightOverrideFlag=n.value,n=e.next();break;case 96:i.borderVisibilityOverrideFlag=n.value,n=e.next();break;case 141:i.rowHeightArr??(i.rowHeightArr=[]),i.rowHeightArr.push(n.value),n=e.next();break;case 142:i.columnWidthArr??(i.columnWidthArr=[]),i.columnWidthArr.push(n.value),n=e.next();break;case 280:i.version=n.value,n=e.next();break;case 310:i.bmpPreview??(i.bmpPreview=""),i.bmpPreview+=n.value,n=e.next();break;case 330:i.ownerDictionaryId=n.value,n=e.next();break;case 342:i.tableStyleId=n.value,n=e.next();break;case 343:i.blockRecordHandle=n.value,n=e.next();break;case 170:i.attachmentPoint=n.value,n=e.next();break;case 171:i.cells??(i.cells=[]),i.cells.push((function(s,r){let o=!1,a=!1,l={};for(;!s.isEOF()&&r.code!==0&&!a;)switch(r.code){case 171:if(o){a=!0;continue}l.cellType=r.value,o=!0,r=s.next();break;case 172:l.flagValue=r.value,r=s.next();break;case 173:l.mergedValue=r.value,r=s.next();break;case 174:l.autoFit=r.value,r=s.next();break;case 175:l.borderWidth=r.value,r=s.next();break;case 176:l.borderHeight=r.value,r=s.next();break;case 91:l.overrideFlag=r.value,r=s.next();break;case 178:l.virtualEdgeFlag=r.value,r=s.next();break;case 145:l.rotation=r.value,r=s.next();break;case 345:l.fieldObjetId=r.value,r=s.next();break;case 340:l.blockTableRecordId=r.value,r=s.next();break;case 146:l.blockScale=r.value,r=s.next();break;case 177:l.blockAttrNum=r.value,r=s.next();break;case 7:l.textStyle=r.value,r=s.next();break;case 140:l.textHeight=r.value,r=s.next();break;case 170:l.attachmentPoint=r.value,r=s.next();break;case 92:l.extendedCellFlags=r.value,r=s.next();break;case 285:l.rightBorderVisibility=!!(r.value??!0),r=s.next();break;case 286:l.bottomBorderVisibility=!!(r.value??!0),r=s.next();break;case 288:l.leftBorderVisibility=!!(r.value??!0),r=s.next();break;case 289:l.topBorderVisibility=!!(r.value??!0),r=s.next();break;case 301:(function(c,u,d){for(;d.code!==304;)switch(d.code){case 301:case 93:case 90:case 94:d=u.next();break;case 1:c.text=d.value,d=u.next();break;case 300:c.attrText=d.value,d=u.next();break;case 302:c.text=d.value?d.value:c.text,d=u.next();break;default:console.log(`Ignore code: ${d.code}, value: ${d.value}`),d=u.next()}})(l,s,r),r=s.next();break;default:return l}return o=!1,a=!1,l})(e,n)),n=e.lastReadGroup;break;default:H4(i,n,e),n=e.next()}}return i}};function VW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}IE="ACAD_TABLE",(LE="ForEntityName")in _w?Object.defineProperty(_w,LE,{value:IE,enumerable:!0,configurable:!0,writable:!0}):_w[LE]=IE;let p8e=[{code:11,name:"xAxisDirection",parser:an},{code:210,name:"extrusionDirection",parser:an},{code:1,name:"text",parser:Ae},{code:10,name:"position",parser:an},{code:3,name:"styleName",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],HW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){VW(this,"parser",ki(p8e))}};VW(HW,"ForEntityName","TOLERANCE");let ww=class{parseEntity(e,n){let i={};for(;n!=="EOF";){if(n.code===0){e.rewind();break}!(function(s,r,o){if(o==="EOF")return!1;switch(o.code){case 0:return!1;case 8:s.layer=o.value;break;case 100:s.subclassMarker=o.value;break;case 10:s.viewportCenter=Jd(rs(r));break;case 40:s.width=o.value;break;case 41:s.height=o.value;break;case 68:s.status=o.value;break;case 69:s.viewportId=o.value;break;case 12:s.displayCenter=rs(r);break;case 13:s.snapBase=rs(r);break;case 14:s.snapSpacing=rs(r);break;case 15:s.gridSpacing=rs(r);break;case 16:s.viewDirection=Jd(rs(r));break;case 17:s.targetPoint=Jd(rs(r));break;case 42:s.perspectiveLensLength=o.value;break;case 43:s.frontClipZ=o.value;break;case 44:s.backClipZ=o.value;break;case 45:s.viewHeight=o.value;break;case 50:s.snapAngle=o.value;break;case 51:s.viewTwistAngle=o.value;break;case 72:s.circleZoomPercent=o.value;break;case 331:s.frozenLayerIds??(s.frozenLayerIds=[]),s.frozenLayerIds.push(o.value);break;case 90:s.statusBitFlags=o.value;break;case 340:s.clippingBoundaryId=o.value;break;case 1:s.sheetName=o.value;break;case 281:s.renderMode=o.value;break;case 71:s.ucsPerViewport=o.value;break;case 110:s.ucsOrigin=Jd(rs(r));break;case 111:s.ucsXAxis=Jd(rs(r));break;case 112:s.ucsYAxis=Jd(rs(r));break;case 345:s.ucsId=o.value;break;case 346:s.ucsBaseId=o.value;break;case 79:s.orthographicType=o.value;break;case 146:s.elevation=o.value;break;case 170:s.shadePlotMode=o.value;break;case 61:s.majorGridFrequency=o.value;break;case 332:s.backgroundId=o.value;break;case 333:s.shadePlotId=o.value;break;case 348:s.visualStyleId=o.value;break;case 292:s.isDefaultLighting=!!o.value;break;case 282:s.defaultLightingType=o.value;break;case 141:s.brightness=o.value;break;case 142:s.contrast=o.value;break;case 63:case 421:case 431:s.ambientLightColor=o.value;break;case 361:s.sunId=o.value;break;case 335:case 343:case 344:case 91:s.softPointer=o.value}return!0})(i,e,n)&&H4(i,n,e),n=e.next()}return i}};OE="VIEWPORT",(RE="ForEntityName")in ww?Object.defineProperty(ww,RE,{value:OE,enumerable:!0,configurable:!0,writable:!0}):ww[RE]=OE;(Ad={})[Ad.ShowImage=1]="ShowImage",Ad[Ad.ShowImageWhenNotAligned=2]="ShowImageWhenNotAligned",Ad[Ad.UseClippingBoundary=4]="UseClippingBoundary",Ad[Ad.Transparency=8]="Transparency";function WW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let m8e={brightness:50,constrast:50,fade:0},g8e=[{code:14,name:"boundary",isMultiple:!0,parser:an},{code:91,name:"numberOfVertices",parser:Ae},{code:71,name:"boundaryType",parser:Ae},{code:360,name:"imageDefReactorHardId",parser:Ae},{code:283,name:"fade",parser:Ae},{code:282,name:"contrast",parser:Ae},{code:281,name:"brightness",parser:Ae},{code:280,name:"isClipping",parser:fs},{code:70,name:"displayFlag",parser:Ae},{code:340,name:"imageDefHardId",parser:Ae},{code:13,name:"imageSize",parser:an},{code:12,name:"vDirection",parser:an},{code:11,name:"uDirection",parser:an},{code:10,name:"position",parser:an},{code:90,name:"classVersion",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ks],GW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){WW(this,"parser",ki(g8e,m8e))}};function jW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}WW(GW,"ForEntityName","WIPEOUT");let v8e=[{code:11,name:"direction",parser:an},{code:10,name:"position",parser:an},{code:100,name:"subclassMarker",parser:Ae},...ks],KW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){jW(this,"parser",ki(v8e))}};function qW(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}jW(KW,"ForEntityName","XLINE");let y8e={},b8e=[{code:170,name:"multileaderType",parser:Ae},{code:291,name:"doglegEnabled",parser:fs},{code:40,name:"doglegLength",parser:Ae},{code:172,name:"contentType",parser:Ae},{code:3,name:"textContent",parser:Ae},{code:12,name:"textAnchor",parser:an},{code:344,name:"blockHandle",parser:Ae},{code:15,name:"blockPosition",parser:an},{code:302,name:"leaderSections",parser:function(t,e,n){let i,s={leaderLines:[]};for(;e.hasNext()&&(i=e.next()).code!==303;)switch(i.code){case 10:s.landingPoint=(i.value,rs(e));break;case 11:s.doglegVector=(i.value,rs(e));break;case 40:s.doglegLength=i.value;break;case 304:s.leaderLines.push((function(r,o,a){let l,c={vertices:[]};for(;o.hasNext()&&(l=o.next()).code!==305;)l.code===10&&c.vertices.push((l.value,rs(o)));return c})(0,e))}return s},isMultiple:!0},...ks],YW=class{parseEntity(e,n){let i={};return this.parser(n,e,i),i}constructor(){qW(this,"parser",ki(b8e,y8e))}};qW(YW,"ForEntityName","MULTILEADER");let _8e=Object.fromEntries([KH,QH,iW,rW,aW,yw,cW,dW,gW,yW,_W,xW,bw,EW,tW,YW,TW,kW,LW,RW,DW,BW,zW,$W,_w,ZH,HW,pW,W4,ww,GW,KW].map(t=>[t.ForEntityName,new t]));function XW(t,e){let n=[];for(;!Vi(t,0,"EOF");){if(t.code===0){if(t.value==="ENDBLK"||t.value==="ENDSEC"){e.rewind();break}let i=_8e[t.value];if(i){let s=t.value;t=e.next();let r=i.parseEntity(e,t);r.type=s,WH(r),n.push(r)}else e.debug&&console.warn(`Unsupported ENTITY type: ${t.value}`)}t=e.next()}return n}function w8e(t,e){let n={};for(;!Vi(t,0,"EOF")&&!Vi(t,0,"ENDSEC");){if(Vi(t,0,"BLOCK")){let i=x8e(t=e.next(),e);WH(i),i.name&&(n[i.name]=i)}t=e.next()}return n}function x8e(t,e){let n={};for(;!Vi(t,0,"EOF");){if(Vi(t,0,"ENDBLK")){for(t=e.next();!Vi(t,0,"EOF");){if(Vi(t,100,"AcDbBlockEnd"))return n;t=e.next()}break}switch(t.code){case 1:n.xrefPath=t.value;break;case 2:n.name=t.value;break;case 3:n.name2=t.value;break;case 5:n.handle=t.value;break;case 8:n.layer=t.value;break;case 10:n.position=rs(e);break;case 67:n.paperSpace=!!t.value&&t.value==1;break;case 70:t.value!==0&&(n.type=t.value);break;case 100:break;case 330:n.ownerHandle=t.value;break;case 0:n.entities=XW(t,e)}t=e.next()}return n}function S8e(t,e){let n=null,i={};for(;!Vi(t,0,"EOF")&&!Vi(t,0,"ENDSEC");)t.code===9?n=t.value:t.code===10?i[n]=rs(e):i[n]=t.value,t=e.next();return i}(ja={})[ja.NOT_APPLICABLE=0]="NOT_APPLICABLE",ja[ja.KEEP_EXISTING=1]="KEEP_EXISTING",ja[ja.USE_CLONE=2]="USE_CLONE",ja[ja.XREF_VALUE_NAME=3]="XREF_VALUE_NAME",ja[ja.VALUE_NAME=4]="VALUE_NAME",ja[ja.UNMANGLE_NAME=5]="UNMANGLE_NAME";let G4=[{code:330,name:"ownerObjectId",parser:Ae},{code:102,parser:Uf},{code:102,parser:Uf},{code:102,parser:Uf},{code:5,name:"handle",parser:Ae}],E8e=[{code:3,name:"entries",parser:(t,e)=>{let n={name:t.value};return(t=e.next()).code===350?n.objectSoftId=t.value:t.code===360?n.objectHardId=t.value:e.rewind(),n},isMultiple:!0},{code:281,name:"recordCloneFlag",parser:Ae},{code:280,name:"isHardOwned",parser:fs},{code:100,name:"subclassMarker",parser:Ae},...G4],C8e=[{code:330,name:"imageDefReactorIdSoft",isMultiple:!0,parser:Ae},{code:90,name:"version",parser:Ae},{code:1,name:"fileName",parser:Ae},{code:10,name:"size",parser:an},{code:11,name:"sizeOfOnePixel",parser:an},{code:280,name:"isLoaded",parser:Ae},{code:281,name:"resolutionUnits",parser:Ae},{code:100,name:"subclassMarker",parser:Ae}];(Wp={})[Wp.NOUNIT=0]="NOUNIT",Wp[Wp.CENTIMETERS=2]="CENTIMETERS",Wp[Wp.INCH=5]="INCH";(Lb={})[Lb.PSLTSCALE=1]="PSLTSCALE",Lb[Lb.LIMCHECK=2]="LIMCHECK";(Gp={})[Gp.INCHES=0]="INCHES",Gp[Gp.MILLIMETERS=1]="MILLIMETERS",Gp[Gp.PIXELS=2]="PIXELS";(Ka={})[Ka.LAST_SCREEN_DISPLAY=0]="LAST_SCREEN_DISPLAY",Ka[Ka.DRAWING_EXTENTS=1]="DRAWING_EXTENTS",Ka[Ka.DRAWING_LIMITS=2]="DRAWING_LIMITS",Ka[Ka.VIEW_SPECIFIED=3]="VIEW_SPECIFIED",Ka[Ka.WINDOW_SPECIFIED=4]="WINDOW_SPECIFIED",Ka[Ka.LAYOUT_INFORMATION=5]="LAYOUT_INFORMATION";(kd={})[kd.AS_DISPLAYED=0]="AS_DISPLAYED",kd[kd.WIREFRAME=1]="WIREFRAME",kd[kd.HIDDEN=2]="HIDDEN",kd[kd.RENDERED=3]="RENDERED";(qa={})[qa.DRAFT=0]="DRAFT",qa[qa.PREVIEW=1]="PREVIEW",qa[qa.NORMAL=2]="NORMAL",qa[qa.PRESENTATION=3]="PRESENTATION",qa[qa.MAXIMUM=4]="MAXIMUM",qa[qa.CUSTOM=5]="CUSTOM";let ZW=[{code:333,name:"shadePlotId",parser:Ae},{code:149,name:"imageOriginY",parser:Ae},{code:148,name:"imageOriginX",parser:Ae},{code:147,name:"scaleFactor",parser:Ae},{code:78,name:"shadePlotCustomDPI",parser:Ae},{code:77,name:"shadePlotResolution",parser:Ae},{code:76,name:"shadePlotMode",parser:Ae},{code:75,name:"standardScaleType",parser:Ae},{code:7,name:"currentStyleSheet",parser:Ae},{code:74,name:"plotType",parser:Ae},{code:73,name:"plotRotation",parser:Ae},{code:72,name:"plotPaperUnit",parser:Ae},{code:70,name:"layoutFlag",parser:Ae},{code:143,name:"printScaleDenominator",parser:Ae},{code:142,name:"printScaleNumerator",parser:Ae},{code:141,name:"windowAreaYMax",parser:Ae},{code:140,name:"windowAreaXMax",parser:Ae},{code:49,name:"windowAreaYMin",parser:Ae},{code:48,name:"windowAreaXMin",parser:Ae},{code:47,name:"plotOriginY",parser:Ae},{code:46,name:"plotOriginX",parser:Ae},{code:45,name:"paperHeight",parser:Ae},{code:44,name:"paperWidth",parser:Ae},{code:43,name:"marginTop",parser:Ae},{code:42,name:"marginRight",parser:Ae},{code:41,name:"marginBottom",parser:Ae},{code:40,name:"marginLeft",parser:Ae},{code:6,name:"plotViewName",parser:Ae},{code:4,name:"paperSize",parser:Ae},{code:2,name:"configName",parser:Ae},{code:1,name:"pageSetupName",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...G4],T8e=[{code:346,name:"orthographicUcsId",parser:Ae},{code:345,name:"namedUcsId",parser:Ae},{code:331,name:"viewportId",parser:Ae},{code:330,name:"paperSpaceTableId",parser:Ae},{code:76,name:"orthographicType",parser:Ae},{code:17,name:"ucsYAxis",parser:an},{code:16,name:"ucsXAxis",parser:an},{code:13,name:"ucsOrigin",parser:an},{code:146,name:"elevation",parser:Ae},{code:15,name:"maxExtent",parser:an},{code:14,name:"minExtent",parser:an},{code:12,name:"insertionPoint",parser:an},{code:11,name:"maxLimit",parser:an},{code:10,name:"minLimit",parser:an},{code:71,name:"tabOrder",parser:Ae},{code:70,name:"controlFlag",parser:Ae},{code:1,name:"layoutName",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...ZW],M8e=[{code:40,name:"wcsToOCSTransform",parser:$5},{code:40,name:"ocsToWCSTransform",parser:$5},{code:41,name:"backClippingDistance",parser:Ae},{code:73,name:"isBackClipping",parser:fs,pushContext:!0},{code:40,name:"frontClippingDistance",parser:Ae},{code:72,name:"isFrontClipping",parser:fs,pushContext:!0},{code:71,name:"isClipBoundaryDisplayed",parser:fs},{code:11,name:"position",parser:an},{code:210,name:"normal",parser:an},{code:10,name:"boundaryVertices",parser:an,isMultiple:!0},{code:70,name:"boundaryCount",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},{code:100},...G4];function $5(t,e){let n=[];for(let i=0;i<3&&Vi(t,40);++i){let s=[];for(let r=0;r<4&&Vi(t,40);++r)s.push(t.value),t=e.next();n.push(s)}return e.rewind(),n}let A8e={LAYOUT:T8e,PLOTSETTINGS:ZW,DICTIONARY:E8e,SPATIAL_FILTER:M8e,IMAGEDEF:C8e};function k8e(t,e){let n=[];for(;t.code!==0||!["EOF","ENDSEC"].includes(t.value);){let i=t.value,s=A8e[i];if(t.code===0&&s!=null&&s.length){let r=ki(s),o={name:i};r(t=e.next(),e,o)?(n.push(o),t=e.peek()):t=e.next()}else t=e.next()}return{byName:bIe(n,({name:i})=>i)}}let Xg=[{code:100,name:"subclassMarker",parser:Ae},{code:330,name:"ownerObjectId",parser:Ae},{code:102,parser(t,e){for(;!Vi(t,0,"EOF")&&!Vi(t,102,"}");)t=e.next()}},{code:5,name:"handle",parser:Ae}],P8e=ki([{code:310,name:"bmpPreview",parser:Ae},{code:281,name:"scalability",parser:Ae},{code:280,name:"explodability",parser:Ae},{code:70,name:"insertionUnits",parser:Ae},{code:340,name:"layoutObjects",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Xg]),L8e=[{name:"DIMPOST",code:3},{name:"DIMAPOST",code:4},{name:"DIMBLK_OBSOLETE",code:5},{name:"DIMBLK1_OBSOLETE",code:6},{name:"DIMBLK2_OBSOLETE",code:7},{name:"DIMSCALE",code:40,defaultValue:1},{name:"DIMASZ",code:41,defaultValue:.25},{name:"DIMEXO",code:42,defaultValue:.625,defaultValueImperial:.0625},{name:"DIMDLI",code:43,defaultValue:3.75,defaultValueImperial:.38},{name:"DIMEXE",code:44,defaultValue:2.25,defaultValueImperial:.28},{name:"DIMRND",code:45,defaultValue:0},{name:"DIMDLE",code:46,defaultValue:0},{name:"DIMTP",code:47,defaultValue:0},{name:"DIMTM",code:48,defaultValue:0},{name:"DIMTXT",code:140,defaultValue:2.5,defaultValueImperial:.28},{name:"DIMCEN",code:141,defaultValue:2.5,defaultValueImperial:.09},{name:"DIMTSZ",code:142,defaultValue:0},{name:"DIMALTF",code:143,defaultValue:25.4},{name:"DIMLFAC",code:144,defaultValue:1},{name:"DIMTVP",code:145,defaultValue:0},{name:"DIMTFAC",code:146,defaultValue:1},{name:"DIMGAP",code:147,defaultValue:.625,defaultValueImperial:.09},{name:"DIMALTRND",code:148,defaultValue:0},{name:"DIMTOL",code:71,defaultValue:0,defaultValueImperial:1},{name:"DIMLIM",code:72,defaultValue:0},{name:"DIMTIH",code:73,defaultValue:0,defaultValueImperial:1},{name:"DIMTOH",code:74,defaultValue:0,defaultValueImperial:1},{name:"DIMSE1",code:75,defaultValue:0},{name:"DIMSE2",code:76,defaultValue:0},{name:"DIMTAD",code:77,defaultValue:z5.Above,defaultValueImperial:z5.Center},{name:"DIMZIN",code:78,defaultValue:jp.Trailing,defaultValueImperial:jp.Feet},{name:"DIMAZIN",code:79,defaultValue:sIe.None},{name:"DIMALT",code:170,defaultValue:0},{name:"DIMALTD",code:171,defaultValue:3,defaultValueImperial:2},{name:"DIMTOFL",code:172,defaultValue:1,defaultValueImperial:0},{name:"DIMSAH",code:173,defaultValue:0},{name:"DIMTIX",code:174,defaultValue:0},{name:"DIMSOXD",code:175,defaultValue:0},{name:"DIMCLRD",code:176,defaultValue:0},{name:"DIMCLRE",code:177,defaultValue:0},{name:"DIMCLRT",code:178,defaultValue:0},{name:"DIMADEC",code:179},{name:"DIMUNIT",code:270},{name:"DIMDEC",code:271,defaultValue:2,defaultValueImperial:4},{name:"DIMTDEC",code:272,defaultValue:2,defaultValueImperial:4},{name:"DIMALTU",code:273,defaultValue:2},{name:"DIMALTTD",code:274,defaultValue:2,defaultValueImperial:4},{name:"DIMAUNIT",code:275,defaultValue:0},{name:"DIMFRAC",code:276,defaultValue:0},{name:"DIMLUNIT",code:277,defaultValue:2},{name:"DIMDSEP",code:278,defaultValue:",",defaultValueImperial:"."},{name:"DIMJUST",code:280,defaultValue:rIe.Center},{name:"DIMSD1",code:281,defaultValue:0},{name:"DIMSD2",code:282,defaultValue:0},{name:"DIMTOLJ",code:283,defaultValue:oIe.Center},{name:"DIMTZIN",code:284,defaultValue:jp.Trailing,defaultValueImperial:jp.Feet},{name:"DIMALTZ",code:285,defaultValue:jp.Trailing},{name:"DIMALTTZ",code:286,defaultValue:jp.Trailing},{name:"DIMFIT",code:287},{name:"DIMUPT",code:288,defaultValue:0},{name:"DIMATFIT",code:289,defaultValue:3},{name:"DIMTXSTY",code:340},{name:"DIMLDRBLK",code:341},{name:"DIMBLK",code:342},{name:"DIMBLK1",code:343},{name:"DIMBLK2",code:344},{name:"DIMLWD",code:371,defaultValue:-2},{name:"DIMLWD",code:372,defaultValue:-2}],I8e=ki([...L8e.map(t=>({...t,parser:Ae})),{code:70,name:"standardFlag",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},{code:105,name:"handle",parser:Ae},...Xg.filter(t=>t.code!==5)]),R8e=ki([{code:347,name:"materialObjectId",parser:Ae},{code:390,name:"plotStyleNameObjectId",parser:Ae},{code:370,name:"lineweight",parser:Ae},{code:290,name:"isPlotting",parser:fs},{code:6,name:"lineType",parser:Ae},{code:62,name:"colorIndex",parser:Ae},{code:70,name:"standardFlag",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Xg]);(Pd={})[Pd.NONE=0]="NONE",Pd[Pd.AbsoluteRotation=1]="AbsoluteRotation",Pd[Pd.TextEmbedded=2]="TextEmbedded",Pd[Pd.ShapeEmbedded=4]="ShapeEmbedded";let O8e=ki([{code:9,name:"text",parser:Ae},{code:45,name:"offsetY",parser:Ae},{code:44,name:"offsetX",parser:Ae},{code:50,name:"rotation",parser:Ae},{code:46,name:"scale",parser:Ae},{code:340,name:"styleObjectId",parser:Ae},{code:75,name:"shapeNumber",parser:Ae},{code:74,name:"elementTypeFlag",parser:Ae},{code:49,name:"elementLength",parser:Ae}],{elementTypeFlag:0,elementLength:0}),D8e=ki([{code:49,name:"pattern",parser(t,e){let n={};return O8e(t,e,n),n},isMultiple:!0},{code:40,name:"totalPatternLength",parser:Ae},{code:73,name:"numberOfLineTypes",parser:Ae},{code:72,parser:Ae},{code:3,name:"description",parser:Ae},{code:70,name:"standardFlag",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Xg]),N8e=ki([{code:1e3,name:"extendedFont",parser:Ae},{code:1001},{code:4,name:"bigFont",parser:Ae},{code:3,name:"font",parser:Ae},{code:42,name:"lastHeight",parser:Ae},{code:71,name:"textGenerationFlag",parser:Ae},{code:50,name:"obliqueAngle",parser:Ae},{code:41,name:"widthFactor",parser:Ae},{code:40,name:"fixedTextHeight",parser:Ae},{code:70,name:"standardFlag",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Xg]),B8e=ki([{code:[63,421,431],name:"ambientColor",parser:Ae},{code:142,name:"contrast",parser:Ae},{code:141,name:"brightness",parser:Ae},{code:282,name:"defaultLightingType",parser:Ae},{code:292,name:"isDefaultLightingOn",parser:fs},{code:348,name:"visualStyleObjectId",parser:Ae},{code:333,name:"shadePlotObjectId",parser:Ae},{code:332,name:"backgroundObjectId",parser:Ae},{code:61,name:"majorGridLines",parser:Ae},{code:170,name:"shadePlotSetting",parser:Ae},{code:146,name:"elevation",parser:Ae},{code:79,name:"orthographicType",parser:Ae},{code:112,name:"ucsYAxis",parser:an},{code:111,name:"ucsXAxis",parser:an},{code:110,name:"ucsOrigin",parser:an},{code:74,name:"ucsIconSetting",parser:Ae},{code:71,name:"viewMode",parser:Ae},{code:281,name:"renderMode",parser:Ae},{code:1,name:"styleSheet",parser:Ae},{code:[331,441],name:"frozenLayers",parser:Ae,isMultiple:!0},{code:72,name:"circleSides",parser:Ae},{code:51,name:"viewTwistAngle",parser:Ae},{code:50,name:"snapRotationAngle",parser:Ae},{code:45,name:"viewHeight",parser:Ae},{code:44,name:"backClippingPlane",parser:Ae},{code:43,name:"frontClippingPlane",parser:Ae},{code:42,name:"lensLength",parser:Ae},{code:17,name:"viewTarget",parser:an},{code:16,name:"viewDirectionFromTarget",parser:an},{code:15,name:"gridSpacing",parser:an},{code:14,name:"snapSpacing",parser:an},{code:13,name:"snapBasePoint",parser:an},{code:12,name:"center",parser:an},{code:11,name:"upperRightCorner",parser:an},{code:10,name:"lowerLeftCorner",parser:an},{code:70,name:"standardFlag",parser:Ae},{code:2,name:"name",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},...Xg]),F8e={BLOCK_RECORD:P8e,DIMSTYLE:I8e,LAYER:R8e,LTYPE:D8e,STYLE:N8e,VPORT:B8e},z8e=ki([{code:70,name:"maxNumberOfEntries",parser:Ae},{code:100,name:"subclassMarker",parser:Ae},{code:330,name:"ownerObjectId",parser:Ae},{code:102},{code:360,isMultiple:!0},{code:102},{code:5,name:"handle",parser:Ae},{code:2,name:"name",parser:Ae}]);function U8e(t,e){var n;let i={};for(;!Vi(t,0,"EOF")&&!Vi(t,0,"ENDSEC");){if(Vi(t,0,"TABLE")){t=e.next();let s={entries:[]};z8e(t,e,s),i[s.name]=s}if(Vi(t,0)&&!Vi(t,0,"ENDTAB")){let s=t.value;t=e.next();let r=F8e[s];if(!r){e.debug&&console.warn(`parseTable: Invalid table name '${s}'`),t=e.next();continue}let o={};r(t,e,o),(n=i[s])==null||n.entries.push(o)}t=e.next()}return i}function xv(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let V5=class{next(){if(!this.hasNext())return this._eof?this.debug&&console.warn("Cannot call 'next' after EOF group has been read"):this.debug&&console.warn("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]),{code:0,value:"EOF"};let e=parseInt(this._data[this._pointer++],10),n=H5(e,this._data[this._pointer++],this.debug),i={code:e,value:n};return Vi(i,0,"EOF")&&(this._eof=!0),this.lastReadGroup=i,i}peek(){if(!this.hasNext())throw this._eof?Error("Cannot call 'next' after EOF group has been read"):Error("Unexpected end of input: EOF group not read before end of file. Ended on code "+this._data[this._pointer]);let e={code:parseInt(this._data[this._pointer]),value:0};return e.value=H5(e.code,this._data[this._pointer+1],this.debug),e}rewind(e){e=e||1,this._pointer=this._pointer-2*e}hasNext(){return!this._eof&&!(this._pointer>this._data.length-2)}isEOF(){return this._eof}constructor(e,n=!1){xv(this,"_data",void 0),xv(this,"debug",void 0),xv(this,"_pointer",void 0),xv(this,"_eof",void 0),xv(this,"lastReadGroup",void 0),this._data=e,this.debug=n,this.lastReadGroup={code:0,value:0},this._pointer=0,this._eof=!1}};function H5(t,e,n=!1){return t<=9?e:t>=10&&t<=59?parseFloat(e.trim()):t>=60&&t<=99?parseInt(e.trim()):t>=100&&t<=109?e:t>=110&&t<=149?parseFloat(e.trim()):t>=160&&t<=179?parseInt(e.trim()):t>=210&&t<=239?parseFloat(e.trim()):t>=270&&t<=289?parseInt(e.trim()):t>=290&&t<=299?(function(i){if(i==="0")return!1;if(i==="1")return!0;throw TypeError("String '"+i+"' cannot be cast to Boolean type")})(e.trim()):t>=300&&t<=369?e:t>=370&&t<=389?parseInt(e.trim()):t>=390&&t<=399?e:t>=400&&t<=409?parseInt(e.trim()):t>=410&&t<=419?e:t>=420&&t<=429?parseInt(e.trim()):t>=430&&t<=439?e:t>=440&&t<=459?parseInt(e.trim()):t>=460&&t<=469?parseFloat(e.trim()):t>=470&&t<=481||t===999||t>=1e3&&t<=1009?e:t>=1010&&t<=1059?parseFloat(e.trim()):t>=1060&&t<=1071?parseInt(e.trim()):(n&&console.warn("WARNING: Group code does not have a defined type: %j",{code:t,value:e}),e)}function IM(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class $8e{constructor(){IM(this,"encoding","utf-8"),IM(this,"encodingFailureFatal",!1)}}class V8e extends EventTarget{parseSync(e,n=!1){let i=new V5(e.split(/\r\n|\r|\n/g),n);if(!i.hasNext())throw Error("Empty file");return this.parseAll(i)}parseStream(e){let n="",i=this;return new Promise((s,r)=>{e.on("data",o=>{n+=o}),e.on("end",()=>{try{let o=n.split(/\r\n|\r|\n/g),a=new V5(o);if(!a.hasNext())throw Error("Empty file");s(i.parseAll(a))}catch(o){r(o)}}),e.on("error",o=>{r(o)})})}async parseFromUrl(e,n){let i=await fetch(e,n);if(!i.body)return null;let s=i.body.getReader(),r="";for(;;){let{done:o,value:a}=await s.read();if(o){r+=this._decoder.decode(new ArrayBuffer(0),{stream:!1});break}r+=this._decoder.decode(a,{stream:!0})}return this.parseSync(r)}parseAll(e){let n={header:{},blocks:{},entities:[],tables:{},objects:{byName:{},byTree:void 0}},i=e.next();for(;!Vi(i,0,"EOF");)Vi(i,0,"SECTION")&&(Vi(i=e.next(),2,"HEADER")?(i=e.next(),n.header=S8e(i,e)):Vi(i,2,"BLOCKS")?(i=e.next(),n.blocks=w8e(i,e)):Vi(i,2,"ENTITIES")?(i=e.next(),n.entities=XW(i,e)):Vi(i,2,"TABLES")?(i=e.next(),n.tables=U8e(i,e)):Vi(i,2,"OBJECTS")&&(i=e.next(),n.objects=k8e(i,e))),i=e.next();return n}constructor(e=new $8e){super(),IM(this,"_decoder",void 0),this._decoder=new TextDecoder(e.encoding,{fatal:e.encodingFailureFatal})}}const W5=[{name:"AC1.2",value:1},{name:"AC1.40",value:2},{name:"AC1.50",value:3},{name:"AC2.20",value:4},{name:"AC2.10",value:5},{name:"AC2.21",value:6},{name:"AC2.22",value:7},{name:"AC1001",value:8},{name:"AC1002",value:9},{name:"AC1003",value:10},{name:"AC1004",value:11},{name:"AC1005",value:12},{name:"AC1006",value:13},{name:"AC1007",value:14},{name:"AC1008",value:15},{name:"AC1009",value:16},{name:"AC1010",value:17},{name:"AC1011",value:18},{name:"AC1012",value:19},{name:"AC1013",value:20},{name:"AC1014",value:21},{name:"AC1500",value:22},{name:"AC1015",value:23},{name:"AC1800a",value:24},{name:"AC1018",value:25},{name:"AC2100a",value:26},{name:"AC1021",value:27},{name:"AC2400a",value:28},{name:"AC1024",value:29},{name:"AC1027",value:31},{name:"AC3200a",value:32},{name:"AC1032",value:33}];let RM=class{constructor(e){if(typeof e=="string"){const n=W5.find(i=>i.name===e);if(!n)throw new Error(`Unknown DWG version name: ${e}`);this.name=n.name,this.value=n.value;return}if(typeof e=="number"){const n=W5.find(i=>i.value===e);if(!n)throw new Error(`Unknown DWG version value: ${e}`);this.name=n.name,this.value=n.value;return}throw new Error("Invalid constructor argument for AcDbDwgVersion")}};class H8e{parse(e){const n=new V8e,i=this.getDxfInfoFromBuffer(e);let s="";return i.version&&i.version.value<=23&&i.encoding?s=new TextDecoder(i.encoding).decode(e):s=new TextDecoder().decode(e),n.parseSync(s)}getDxfInfoFromBuffer(e){var n,i,s;const r=new TextDecoder("utf-8");let o=0,a="",l=null,c=null,u=!1;for(;on.setVertexAt(s,i)),n}convertArc(e){return new QV(e.center,e.radius,Ui.degToRad(e.startAngle),Ui.degToRad(e.endAngle),e.extrusionDirection??pn.Z_AXIS)}convertCirle(e){return new Yx(e.center,e.radius,e.extrusionDirection??pn.Z_AXIS)}convertEllipse(e){const n=new pn(e.majorAxisEndPoint),i=n.length();return new iH(e.center,e.extrusionDirection??pn.Z_AXIS,n,i,i*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const n=e.startPoint,i=e.endPoint;return new f1(new Yt(n.x,n.y,n.z||0),new Yt(i.x,i.y,i.z||0))}convertSpline(e){try{if(e.numberOfControlPoints>0&&e.numberOfKnots>0)return new E2(e.controlPoints,e.knots,e.weights,e.degree,!!(e.flag&1));if(e.numberOfFitPoints>0){const n=this.numberArrayToPointArray(e.fitPoints,e.numberOfFitPoints);if(n!=null)return new E2(n,"Uniform",e.degree,!!(e.flag&1))}}catch(n){console.log(`Failed to convert spline with error: ${n}`)}return null}convertPoint(e){const n=new wH;return n.position=e.position,n}convertSolid(e){const n=new vH;return e.points.forEach((i,s)=>n.setPointAt(s,i)),n.thickness=e.thickness,n}convertPolyline(e){const n=!!(e.flag&1),i=!!(e.flag&8),s=[],r=[];if(e.vertices.map(o=>{o.flag&e8e.SPLINE_CONTROL_POINT||(s.push({x:o.x,y:o.y,z:o.z}),r.push(o.bulge??0))}),i){let o=zf.SimplePoly;return e.flag&4&&(e.smoothType==Rb.CUBIC?o=zf.CubicSplinePoly:e.smoothType==Rb.QUADRATIC&&(o=zf.QuadSplinePoly)),new ZV(o,s,n)}else{let o=Bu.SimplePoly;return e.flag&2?o=Bu.FitCurvePoly:e.flag&4&&(e.smoothType==Rb.CUBIC?o=Bu.CubicSplinePoly:e.smoothType==Rb.QUADRATIC&&(o=Bu.QuadSplinePoly)),new YV(o,s,0,n,e.startWidth,e.endWidth,r)}}convertLWPolyline(e){const n=new bH;return n.closed=!!(e.flag&1),e.vertices.forEach((i,s)=>{n.addVertexAt(s,new Si(i.x,i.y),i.bulge,i.startWidth,i.endWidth)}),n}convertHatch(e){var n;const i=new D4;return(n=e.definitionLines)==null||n.forEach(s=>{i.definitionLines.push({angle:s.angle,origin:s.base,delta:s.offset,dashPattern:s.numberOfDashLengths>0?s.dashLengths:[]})}),i.isSolidFill=e.solidFill==aIe.SolidFill,i.hatchStyle=e.hatchStyle,i.patternName=e.patternName,i.patternType=e.patternType,i.patternAngle=e.patternAngle==null?0:e.patternAngle,i.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(s=>{if(s.boundaryPathTypeFlag&2){const r=s,o=new pp;o.closed=r.isClosed,r.vertices.forEach((a,l)=>{o.addVertexAt(l,{x:a.x,y:a.y,bulge:a.bulge})}),i.add(o)}else{const r=s,o=new O4;r.edges.forEach(a=>{if(a.type==1){const l=a;o.add(new b0(l.start,l.end))}else if(a.type==2){const l=a;o.add(new S2(l.center,l.radius,Ui.degToRad(l.startAngle||0),Ui.degToRad(l.endAngle||0),!l.isCCW))}else if(a.type==3){const l=a;new $s().subVectors(l.end,l.center);const c=Math.sqrt(Math.pow(l.end.x,2)+Math.pow(l.end.y,2)),u=c*l.lengthOfMinorAxis;let d=Ui.degToRad(l.startAngle||0),h=Ui.degToRad(l.endAngle||0);const f=Math.atan2(l.end.y,l.end.x);l.isCCW||(d=Math.PI*2-d,h=Math.PI*2-h),o.add(new OV({...l.center,z:0},c,u,d,h,!l.isCCW,f))}else if(a.type==4){const l=a;if(l.numberOfControlPoints>0&&l.numberOfKnots>0){const c=l.controlPoints.map(h=>({x:h.x,y:h.y,z:0}));let u=!0;const d=l.controlPoints.map(h=>(h.weight==null&&(u=!1),h.weight||1));o.add(new Qf(c,l.knots,u?d:void 0))}else if(l.numberOfFitData>0){const c=l.fitDatum.map(u=>({x:u.x,y:u.y,z:0}));o.add(new Qf(c,"Uniform"))}}}),i.add(o)}}),i}convertTable(e){const n=new fH(e.name,e.rowCount,e.columnCount);return n.attachmentPoint=e.attachmentPoint,n.position.copy(e.startPoint),e.columnWidthArr.forEach((i,s)=>n.setColumnWidth(s,i)),e.rowHeightArr.forEach((i,s)=>n.setRowHeight(s,i)),e.cells.forEach((i,s)=>{n.setCell(s,i)}),n}convertText(e){const n=new mH;return n.textString=e.text,n.styleName=e.styleName,n.height=e.textHeight,n.position.copy(e.startPoint),n.rotation=Ui.degToRad(e.rotation||0),n.oblique=e.obliqueAngle??0,n.thickness=e.thickness,n.horizontalMode=e.halign,n.verticalMode=e.valign,n.widthFactor=e.xScale??1,n}convertMText(e){const n=new N4;return n.contents=e.text,e.styleName!=null&&(n.styleName=e.styleName),n.height=e.height,n.width=e.width,n.rotation=Ui.degToRad(e.rotation||0),n.location=e.insertionPoint,n.attachmentPoint=e.attachmentPoint,e.direction&&(n.direction=new pn(e.direction)),n.drawingDirection=e.drawingDirection,n}convertLeader(e){const n=new lH;return e.vertices.forEach(i=>{n.appendVertex(i)}),n.hasArrowHead=e.isArrowheadEnabled,n.hasHookLine=e.isHooklineExists,n.isSplined=e.isSpline,n.dimensionStyle=e.styleName,n.annoType=e.leaderCreationFlag,n}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"||e.subclassMarker=="AcDbRotatedDimension"){const n=e,i=new Zx(n.subDefinitionPoint1,n.subDefinitionPoint2,n.definitionPoint);return n.insertionPoint&&(i.dimBlockPosition={...n.insertionPoint,z:0}),i.rotation=Ui.degToRad(n.rotationAngle||0),this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const n=e,i=new PH(n.centerPoint,n.subDefinitionPoint1,n.subDefinitionPoint2,n.definitionPoint);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbOrdinateDimension"){const n=e,i=new DH(n.subDefinitionPoint1,n.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbRadialDimension"){const n=e,i=new BH(n.definitionPoint,n.centerPoint,n.leaderLength);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbDiametricDimension"){const n=e,i=new RH(n.definitionPoint,n.centerPoint,n.leaderLength);return this.processDimensionCommonAttrs(e,i),i}return null}processImage(e,n){n.position.copy(e.position),n.brightness=e.brightness,n.contrast=e.contrast,n.fade=e.fade,n.isShownClipped=(e.flags|4)>0,n.isImageShown=(e.flags|3)>0,n.isImageTransparent=(e.flags|8)>0,n.imageDefId=e.imageDefHandle,n.isClipped=e.isClipped,e.clippingBoundaryPath.forEach(i=>{n.clipBoundary.push(new Si(i))}),n.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,n.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,n.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const n=new Xx;return this.processImage(e,n),n.clipBoundaryType=e.clippingBoundaryType,n}processWipeout(e,n){n.position.copy(e.position),n.brightness=e.brightness,n.contrast=e.contrast,n.fade=e.fade,n.isShownClipped=(e.displayFlag|4)>0,n.isImageShown=(e.displayFlag|3)>0,n.isImageTransparent=(e.displayFlag|8)>0,n.imageDefId=e.imageDefHardId,n.isClipped=e.isClipping,e.boundary.forEach(i=>{n.clipBoundary.push(new Si(i))}),n.clipBoundaryType=e.boundaryType,n.width=Math.sqrt(e.uDirection.x**2+e.uDirection.y**2+e.uDirection.z**2)*e.imageSize.x,n.height=Math.sqrt(e.vDirection.x**2+e.vDirection.y**2+e.vDirection.z**2)*e.imageSize.y,n.rotation=Math.atan2(e.uDirection.y,e.uDirection.x)}convertWipeout(e){const n=new TH;return this.processWipeout(e,n),n}convertViewport(e){const n=new F4;return n.number=e.viewportId,n.centerPoint.copy(e.viewportCenter),n.height=e.height,n.width=e.width,n.viewCenter.copy(e.displayCenter),n.viewHeight=e.viewHeight,n}convertRay(e){const n=new B4;return n.basePoint.copy(e.position),n.unitDir.copy(e.direction),n}convertXline(e){const n=new z4;return n.basePoint.copy(e.position),n.unitDir.copy(e.direction),n}convertBlockReference(e){const n=new qx(e.name);return e.insertionPoint&&n.position.copy(e.insertionPoint),n.scaleFactors.x=e.xScale||1,n.scaleFactors.y=e.yScale||1,n.scaleFactors.z=e.zScale||1,n.rotation=e.rotation!=null?Ui.degToRad(e.rotation):0,n.normal.copy(e.extrusionDirection??{x:0,y:0,z:1}),n}processDimensionCommonAttrs(e,n){n.dimBlockId=e.name,n.textPosition.copy(e.textPoint),n.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(n.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(n.textLineSpacingStyle=e.textLineSpacingStyle),n.dimensionStyleName=e.styleName,n.dimensionText=e.text||"",n.measurement=e.measurement,n.normal.copy(e.extrusionDirection??{x:0,y:0,z:1})}processCommonAttrs(e,n){n.layer=e.layer||"0",e.handle&&(n.objectId=e.handle),n.ownerId=e.ownerBlockRecordSoftId||"",e.lineType!=null&&(n.lineType=e.lineType),e.lineweight!=null&&(n.lineWeight=e.lineweight),e.lineTypeScale!=null&&(n.linetypeScale=e.lineTypeScale),e.color!=null&&n.color.setRGBValue(e.color),e.colorIndex!=null&&(n.color.colorIndex=e.colorIndex),e.colorName&&(n.color.colorName=e.colorName),e.isVisible!=null&&(n.visibility=e.isVisible),e.transparency!=null&&(n.transparency=Jf.deserialize(e.transparency))}numberArrayToPointArray(e,n){const i=e.length;let s=0;if(i/2==n?s=2:i/3==n&&(s=3),s==0)return;const r=[];for(let o=0,a=i/s;o{const r=this._entities.get(s);r&&i.push(r),this._entities.delete(s)}),i.length>0&&this.database.events.entityErased.dispatch({database:this.database,entity:i}),i.length>0}newIterator(){return new U4(this._entities)}getIdAt(e){return this._entities.get(e)}};OM.MODEL_SPACE_NAME="*MODEL_SPACE",OM.PAPER_SPACE_NAME_PREFIX="*PAPER_SPACE";let mo=OM;class W8e{convertLayout(e,n){var i,s;const r=new p1;if(r.layoutName=e.layoutName,r.tabOrder=e.tabOrder,e.layoutName==="Model"){const o=mo.MODEL_SPACE_NAME;(i=n.tables.BLOCK_RECORD)==null||i.entries.some(a=>a.name.toUpperCase()===o?(r.blockTableRecordId=a.handle,!0):!1)}else(s=n.tables.BLOCK_RECORD)==null||s.entries.some(o=>o.layoutObjects===e.handle?(r.blockTableRecordId=o.handle,!0):!1),r.blockTableRecordId||(r.blockTableRecordId=e.paperSpaceTableId);return r.limits.min.copy(e.minLimit),r.limits.max.copy(e.maxLimit),r.extents.min.copy(e.minExtent),r.extents.max.copy(e.maxExtent),this.processCommonAttrs(e,r),r}convertImageDef(e){const n=new zH;return n.sourceFileName=e.fileName,this.processCommonAttrs(e,n),n}processCommonAttrs(e,n){n.objectId=e.handle,n.ownerId=e.ownerObjectId}}class G8e{constructor(e){this.taskId=0,this.workers=new Map,this.pendingTasks=new Map,this.config={workerUrl:e.workerUrl,timeout:e.timeout??3e4,maxConcurrentWorkers:e.maxConcurrentWorkers??4}}async execute(e,n){const i=Date.now(),s=this.generateTaskId();try{return await this.executeInWorker(s,e,n||this.config.workerUrl)}catch(r){const o=Date.now()-i;return{success:!1,error:r instanceof Error?r.message:String(r),duration:o}}}async executeInWorker(e,n,i){const s=Date.now();return new Promise((r,o)=>{const a=this.getAvailableWorker(i),l=setTimeout(()=>{this.cleanupTask(e),this.releaseWorker(a),o(new Error(`Worker operation timed out after ${this.config.timeout}ms`))},this.config.timeout);this.pendingTasks.set(e,{resolve:d=>{clearTimeout(l),this.releaseWorker(a),r(d)},reject:d=>{clearTimeout(l),this.releaseWorker(a),o(d)},timeout:l});const c=d=>{const{id:h,success:f,data:p,error:m}=d.data;if(h!==e)return;this.cleanupTask(e);const b=Date.now()-s;r(f?{success:!0,data:p,duration:b}:{success:!1,error:m,duration:b})},u=d=>{this.cleanupTask(e),o(new Error(`Worker error: ${d.message}`))};a.addEventListener("message",c),a.addEventListener("error",u),a.postMessage({id:e,input:n})})}cleanupTask(e){const n=this.pendingTasks.get(e);n&&(clearTimeout(n.timeout),this.pendingTasks.delete(e))}generateTaskId(){return`task_${++this.taskId}_${Date.now()}`}detectWorkerSupport(){return typeof Worker<"u"}getAvailableWorker(e){for(const[i,s]of this.workers)if(!s.isBusy)return s.isBusy=!0,s.worker;if(this.workers.sizei.createdAt.getTime()-s.createdAt.getTime())[0];return n.isBusy=!0,n.worker}releaseWorker(e){for(const[n,i]of this.workers)if(i.worker===e){i.isBusy=!1;break}}generateWorkerId(){return`worker_${Date.now()}_${Math.random().toString(36).substr(2,9)}`}getStats(){return{totalWorkers:this.workers.size,busyWorkers:Array.from(this.workers.values()).filter(e=>e.isBusy).length,pendingTasks:this.pendingTasks.size,config:this.config}}destroy(){for(const[e,n]of this.pendingTasks)clearTimeout(n.timeout),n.reject(new Error("Framework destroyed"));this.pendingTasks.clear();for(const[e,n]of this.workers)n.worker.terminate();this.workers.clear()}}class j8e{constructor(e){this.framework=new G8e(e)}async execute(e,n){return this.framework.execute(e,n)}getStats(){return this.framework.getStats()}destroy(){this.framework.destroy()}}function JW(t){return new j8e(t)}class QW extends $4{constructor(e={}){super(e),e.parserWorkerUrl||(e.parserWorkerUrl="/assets/dxf-parser-worker.js")}async parse(e){if(this.config.useWorker&&this.config.parserWorkerUrl){const n=JW({workerUrl:this.config.parserWorkerUrl,maxConcurrentWorkers:1}),i=await n.execute(e);if(n.destroy(),i.success)return{model:i.data,data:{unknownEntityCount:0}};throw new Error(`Failed to parse drawing due to error: '${i.error}'`)}else return{model:new H8e().parse(e),data:{unknownEntityCount:0}}}getFonts(e){var n;const i=new Map,s=o=>{if(o){const a=o.lastIndexOf(".");return a>=0?o.substring(0,a).toLowerCase():o.toLowerCase()}};(n=e.tables.STYLE)==null||n.entries.forEach(o=>{const a=[];if(o.font){const l=s(o.font);l&&a.push(l)}if(o.bigFont){const l=s(o.bigFont);l&&a.push(l)}if(o.extendedFont){const l=s(o.extendedFont);l&&a.push(l)}i.set(o.name,a)});const r=new Set;return this.getFontsInBlock(e.entities,e.blocks,i,r),Array.from(r)}getFontsInBlock(e,n,i,s){const r=/\\f(.*?)\|/g;e.forEach(o=>{if(o.type=="MTEXT"){const a=o;[...a.text.matchAll(r)].forEach(c=>{s.add(c[1].toLowerCase())});const l=i.get(a.styleName);l?.forEach(c=>s.add(c))}else if(o.type=="TEXT"){const a=o,l=i.get(a.styleName);l?.forEach(c=>s.add(c))}else if(o.type=="INSERT"){const a=n[o.name];a&&a.entities&&this.getFontsInBlock(a.entities,n,i,s)}})}async processEntities(e,n,i,s,r){const o=new G5;let a=e.entities;const l=a.length,c=new P4(l,100-s.value,i);this.config.convertByEntityType&&(a=this.groupAndFlattenByType(a));const u=n.tables.blockTable.modelSpace;await c.processChunk(async(d,h)=>{let f=[],p=d100&&(m=100),await r(m,"ENTITY","IN-PROGRESS")}})}async processEntitiesInBlock(e,n){const i=new G5,s=e.length,r=[];for(let o=0;o0&&(n.tables.blockTable.removeAll(),s.forEach(r=>{const o=new mo;o.objectId=r.handle,o.name=r.name,o.layoutId=r.layoutObjects,n.tables.blockTable.add(o)}))}processObjects(e,n){const i=e.objects.byName,s=new W8e;if("LAYOUT"in i){const r=n.dictionaries.layouts;i.LAYOUT.forEach(o=>{const a=s.convertLayout(o,e);r.setAt(a.layoutName,a)})}if("IMAGEDEF"in i){const r=n.dictionaries.imageDefs;i.IMAGEDEF.forEach(o=>{const a=s.convertImageDef(o);r.setAt(a.objectId,a)})}}processViewports(e,n){var i,s;const r=(s=(i=e.tables)==null?void 0:i.VPORT)==null?void 0:s.entries;r&&r.length>0&&r.forEach(o=>{const a=new sG;this.processCommonTableEntryAttrs(o,a),o.circleSides&&(a.circleSides=o.circleSides),a.standardFlag=o.standardFlag,a.center.copy(o.center),a.lowerLeftCorner.copy(o.lowerLeftCorner),a.upperRightCorner.copy(o.upperRightCorner),o.snapBasePoint&&a.snapBase.copy(o.snapBasePoint),o.snapRotationAngle&&(a.snapAngle=o.snapRotationAngle),o.snapSpacing&&a.snapIncrements.copy(o.snapSpacing),o.majorGridLines&&(a.gridMajor=o.majorGridLines),o.gridSpacing&&a.gridIncrements.copy(o.gridSpacing),o.backgroundObjectId&&(a.backgroundObjectId=o.backgroundObjectId),a.gsView.center.copy(o.center),a.gsView.viewDirectionFromTarget.copy(o.viewDirectionFromTarget),a.gsView.viewTarget.copy(o.viewTarget),o.lensLength&&(a.gsView.lensLength=o.lensLength),o.frontClippingPlane&&(a.gsView.frontClippingPlane=o.frontClippingPlane),o.backClippingPlane&&(a.gsView.backClippingPlane=o.backClippingPlane),o.viewHeight&&(a.gsView.viewHeight=o.viewHeight),o.viewTwistAngle&&(a.gsView.viewTwistAngle=o.viewTwistAngle),o.frozenLayers&&(a.gsView.frozenLayers=o.frozenLayers),o.styleSheet&&(a.gsView.styleSheet=o.styleSheet),o.renderMode&&(a.gsView.renderMode=o.renderMode),o.viewMode&&(a.gsView.viewMode=o.viewMode),o.ucsIconSetting&&(a.gsView.ucsIconSetting=o.ucsIconSetting),o.ucsOrigin&&a.gsView.ucsOrigin.copy(o.ucsOrigin),o.ucsXAxis&&a.gsView.ucsXAxis.copy(o.ucsXAxis),o.ucsYAxis&&a.gsView.ucsYAxis.copy(o.ucsYAxis),o.orthographicType&&(a.gsView.orthographicType=o.orthographicType),o.shadePlotSetting&&(a.gsView.shadePlotSetting=o.shadePlotSetting),o.shadePlotObjectId&&(a.gsView.shadePlotObjectId=o.shadePlotObjectId),o.visualStyleObjectId&&(a.gsView.visualStyleObjectId=o.visualStyleObjectId),o.isDefaultLightingOn&&(a.gsView.isDefaultLightingOn=o.isDefaultLightingOn),o.defaultLightingType&&(a.gsView.defaultLightingType=o.defaultLightingType),o.brightness&&(a.gsView.brightness=o.brightness),o.contrast&&(a.gsView.contrast=o.contrast),o.ambientColor&&(a.gsView.ambientColor=o.ambientColor),n.tables.viewportTable.add(a)})}processLayers(e,n){var i,s;const r=(s=(i=e.tables)==null?void 0:i.LAYER)==null?void 0:s.entries;r&&r.length>0&&r.forEach(o=>{const a=new Er;a.colorIndex=o.colorIndex;const l=new Qx({name:o.name,standardFlags:o.standardFlag,linetype:o.lineType,lineWeight:o.lineweight,isOff:o.colorIndex<0,color:a,isPlottable:o.isPlotting});this.processCommonTableEntryAttrs(o,l),n.tables.layerTable.add(l)})}processLineTypes(e,n){var i,s;const r=(s=(i=e.tables)==null?void 0:i.LTYPE)==null?void 0:s.entries;r&&r.length>0&&r.forEach(o=>{const a=new _0(o);this.processCommonTableEntryAttrs(o,a),a.name=o.name,n.tables.linetypeTable.add(a)})}processTextStyles(e,n){var i;const s=(i=e.tables.STYLE)==null?void 0:i.entries;s&&s.length>0&&s.forEach(r=>{const o=new K4(r);this.processCommonTableEntryAttrs(r,o),n.tables.textStyleTable.add(o)})}processDimStyles(e,n){var i;const s=(i=e.tables.DIMSTYLE)==null?void 0:i.entries;s&&s.length>0&&s.forEach(r=>{const o={name:r.name,ownerId:r.ownerObjectId,dimpost:r.DIMPOST||"",dimapost:r.DIMAPOST||"",dimscale:r.DIMSCALE,dimasz:r.DIMASZ,dimexo:r.DIMEXO,dimdli:r.DIMDLI,dimexe:r.DIMEXE,dimrnd:r.DIMRND,dimdle:r.DIMDLE,dimtp:r.DIMTP,dimtm:r.DIMTM,dimtxt:r.DIMTXT,dimcen:r.DIMCEN,dimtsz:r.DIMTSZ,dimaltf:r.DIMALTF,dimlfac:r.DIMLFAC,dimtvp:r.DIMTVP,dimtfac:r.DIMTFAC,dimgap:r.DIMGAP,dimaltrnd:r.DIMALTRND,dimtol:r.DIMTOL==null||r.DIMTOL==0?0:1,dimlim:r.DIMLIM==null||r.DIMLIM==0?0:1,dimtih:r.DIMTIH==null||r.DIMTIH==0?0:1,dimtoh:r.DIMTOH==null||r.DIMTOH==0?0:1,dimse1:r.DIMSE1==null||r.DIMSE1==0?0:1,dimse2:r.DIMSE2==null||r.DIMSE2==0?0:1,dimtad:r.DIMTAD,dimzin:r.DIMZIN,dimazin:r.DIMAZIN,dimalt:r.DIMALT,dimaltd:r.DIMALTD,dimtofl:r.DIMTOFL,dimsah:r.DIMSAH,dimtix:r.DIMTIX,dimsoxd:r.DIMSOXD,dimclrd:r.DIMCLRD,dimclre:r.DIMCLRE,dimclrt:r.DIMCLRT,dimadec:r.DIMADEC||0,dimunit:r.DIMUNIT||2,dimdec:r.DIMDEC,dimtdec:r.DIMTDEC,dimaltu:r.DIMALTU,dimalttd:r.DIMALTTD,dimaunit:r.DIMAUNIT,dimfrac:r.DIMFRAC,dimlunit:r.DIMLUNIT,dimdsep:r.DIMDSEP,dimtmove:r.DIMTMOVE||0,dimjust:r.DIMJUST,dimsd1:r.DIMSD1,dimsd2:r.DIMSD2,dimtolj:r.DIMTOLJ,dimtzin:r.DIMTZIN,dimaltz:r.DIMALTZ,dimalttz:r.DIMALTTZ,dimfit:r.DIMFIT||0,dimupt:r.DIMUPT,dimatfit:r.DIMATFIT,dimtxsty:r.DIMTXSTY||"Standard",dimldrblk:r.DIMLDRBLK||"",dimblk:r.DIMBLK||"",dimblk1:r.DIMBLK1||"",dimblk2:r.DIMBLK2||"",dimlwd:r.DIMLWD,dimlwe:r.DIMLWE},a=new eS(o);this.processCommonTableEntryAttrs(r,a),n.tables.dimStyleTable.add(a)})}processCommonTableEntryAttrs(e,n){n.name=e.name,n.objectId=e.handle,n.ownerId=e.ownerObjectId}groupAndFlattenByType(e){const n={},i=[];for(const s of e)n[s.type]||(n[s.type]=[],i.push(s.type)),n[s.type].push(s);return i.flatMap(s=>n[s])}}class K8e extends $4{constructor(e){super({}),this._database=e}async parse(){return{model:this._database,data:{unknownEntityCount:0}}}getFonts(){return[]}async processEntities(e,n,i,s,r){let o=e.tables.blockTable.modelSpace.newIterator().toArray();const a=o.length,l=new P4(a,100-s.value,i);this.config.convertByEntityType&&(o=this.groupAndFlattenByType(o));const c=n.tables.blockTable.modelSpace;await l.processChunk(async(u,d)=>{let h=[],f=u100&&(p=100),await r(p,"ENTITY","IN-PROGRESS")}})}processBlocks(){const e=this._database.tables.blockTable.newIterator();for(const n of e){const i=n.newIterator().toArray();this.triggerEvents(n,i)}}processHeader(){}processBlockTables(){}processObjects(){const e=this._database.dictionaries.layouts.newIterator();for(const i of e)this._database.events.dictObjetSet.dispatch({database:this._database,object:i,key:i.layoutName});const n=this._database.dictionaries.imageDefs.newIterator();for(const i of n)this._database.events.dictObjetSet.dispatch({database:this._database,object:i,key:i.objectId})}processViewports(){}processLayers(){this._database.tables.layerTable.newIterator().toArray().forEach(e=>{this._database.events.layerAppended.dispatch({database:this._database,layer:e})})}processLineTypes(){}processTextStyles(){}processDimStyles(){}groupAndFlattenByType(e){const n={},i=[];for(const s of e)n[s.type]||(n[s.type]=[],i.push(s.type)),n[s.type].push(s);return i.flatMap(s=>n[s])}triggerEvents(e,n){(e.isModelSapce||e.isPaperSapce)&&e.database.events.entityAppended.dispatch({database:e.database,entity:n})}}var hh=(t=>(t.DXF="dxf",t.DWG="dwg",t))(hh||{});let T2=class Gd{constructor(){this.events={registered:new Qi,unregistered:new Qi},this._converters=new Map,this.register("dxf",new QW)}static createInstance(){return Gd._instance==null&&(Gd._instance=new Gd),this._instance}static get instance(){return Gd._instance||(Gd._instance=new Gd),Gd._instance}get fileTypes(){return this._converters.keys()}register(e,n){this._converters.set(e,n),this.events.registered.dispatch({fileType:e,converter:n})}get(e){return this._converters.get(e)}unregister(e){const n=this._converters.get(e);n&&(this._converters.delete(e),this.events.unregistered.dispatch({fileType:e,converter:n}))}},Jg=class extends mp{constructor(e){super(),this.database=e,this._recordsByName=new Map,this._recordsById=new Map}get numEntries(){return this._recordsByName.size}add(e){e.database=this.database;const n=this.normalizeName(e.name);this._recordsByName.set(n,e),this._recordsById.set(e.objectId,e)}remove(e){const n=this.normalizeName(e),i=this._recordsByName.get(n);return i?(this._recordsById.delete(i.objectId),this._recordsByName.delete(e),!0):!1}removeId(e){const n=this._recordsById.get(e);return n?(this._recordsByName.delete(n.name),this._recordsById.delete(e),!0):!1}removeAll(){this._recordsByName.clear(),this._recordsById.clear()}has(e){const n=this.normalizeName(e);return this._recordsByName.has(n)}hasId(e){return this._recordsById.has(e)}getAt(e){const n=this.normalizeName(e);return this._recordsByName.get(n)}getIdAt(e){return this._recordsById.get(e)}getOwnerIdAt(e){return this._recordsById.get(e)}newIterator(){return new U4(this._recordsByName)}normalizeName(e){return e}};class q8e extends Jg{constructor(e){super(e)}get modelSpace(){let e=this.getAt(mo.MODEL_SPACE_NAME);return e||(e=new mo,e.name=mo.MODEL_SPACE_NAME,this.add(e)),e}removeEntity(e){let n=!0;for(const i of this.database.tables.blockTable.newIterator())i.removeEntity(e)||(n=!1);return n}normalizeName(e){let n=e;if(mo.isModelSapceName(e))n=mo.MODEL_SPACE_NAME;else if(mo.isPaperSapceName(e)){const i=mo.PAPER_SPACE_NAME_PREFIX,s=e.substring(i.length);n=i+s}return n}}class Y8e extends Jg{constructor(e){super(e)}}let Qx=class extends Zg{constructor(e,n){e=e||{},u1(e,{color:new Er,description:"",standardFlags:0,isHidden:!1,isInUse:!0,isOff:!1,isPlottable:!0,transparency:new Jf,linetype:"",lineWeight:1,materialId:-1}),super(e,n),this.attrs.events.attrChanged.addEventListener(i=>{this.database.events.layerModified.dispatch({database:this.database,layer:this,changes:i.object.changedAttributes()})})}get color(){return this.getAttr("color")}set color(e){this.setAttr("color",e.clone())}get description(){return this.getAttr("description")}set description(e){this.setAttr("description",e)}get standardFlags(){return this.getAttr("standardFlags")}set standardFlags(e){this.setAttr("standardFlags",e)}get isFrozen(){return(this.standardFlags&1)==1}set isFrozen(e){const n=e?1:0;this.standardFlags=this.standardFlags|n}get isHidden(){return this.getAttr("isHidden")}set isHidden(e){this.setAttr("isHidden",e)}get isInUse(){return this.getAttr("isInUse")}set isInUse(e){this.setAttr("isInUse",e)}get isLocked(){return(this.standardFlags&4)==4}set isLocked(e){const n=e?4:0;this.standardFlags=this.standardFlags|n}get isOff(){return this.getAttr("isOff")}set isOff(e){this.setAttr("isOff",e)}get isPlottable(){return this.getAttr("isPlottable")}set isPlottable(e){this.setAttr("isPlottable",e)}get transparency(){return this.getAttr("transparency")}set transparency(e){this.setAttr("transparency",e.clone())}get linetype(){return this.getAttr("linetype")}set linetype(e){this.setAttr("linetype",e)}get lineStyle(){var e;const n=(e=this.database)==null?void 0:e.tables.linetypeTable.getAt(this.linetype);if(n)return{type:"UserSpecified",...n.linetype}}get lineWeight(){return this.getAttr("lineWeight")}set lineWeight(e){this.setAttr("lineWeight",e)}get materialId(){return this.getAttr("materialId")}set materialId(e){this.setAttr("materialId",e)}};class X8e extends Jg{constructor(e){super(e);const n=new Er,i=new Qx({name:"0",standardFlags:0,linetype:TM,lineWeight:ep.ByLineWeightDefault,isOff:!1,color:n,isPlottable:!0});this.add(i)}add(e){super.add(e),this.database.events.layerAppended.dispatch({database:this.database,layer:e})}}class Z8e extends Jg{constructor(e){super(e)}}class J8e extends Jg{constructor(e){super(e)}get fonts(){const e=new Set,n=s=>{if(s){const r=s.lastIndexOf(".");if(r>=0){const o=s.substring(0,r).toLowerCase();e.add(o)}else e.add(s.toLowerCase())}},i=this.newIterator();for(const s of i)n(s.fileName),n(s.bigFontFileName);return Array.from(e)}}class Q8e extends Jg{constructor(e){super(e)}}class e6e extends mp{constructor(){super(),this.events={dictObjetSet:new Qi,dictObjectErased:new Qi,entityAppended:new Qi,entityModified:new Qi,entityErased:new Qi,layerAppended:new Qi,layerModified:new Qi,layerErased:new Qi,openProgress:new Qi,headerSysVarChanged:new Qi},this._version=new RM("AC1014"),this._angBase=0,this._angDir=0,this._aunits=oV.DecimalDegrees,this._celtscale=1,this._cecolor=new Er,this._extents=new Zi,this._insunits=$H.Millimeters,this._ltscale=1,this._pdmode=0,this._pdsize=0,this._tables={blockTable:new q8e(this),dimStyleTable:new Y8e(this),linetypeTable:new Z8e(this),textStyleTable:new J8e(this),layerTable:new X8e(this),viewportTable:new Q8e(this)},this._dictionaries={layouts:new iIe(this),imageDefs:new FH(this)}}get tables(){return this._tables}get dictionaries(){return this._dictionaries}get currentSpaceId(){return this._currentSpace||(this._currentSpace=this._tables.blockTable.modelSpace),this._currentSpace.objectId}set currentSpaceId(e){const n=this.tables.blockTable.getIdAt(e);if(n==null)throw new Error(`[AcDbDatabase] The specified block table record id '${e}' doesn't exist in the drawing database!`);this._currentSpace=n}get aunits(){return this._aunits}set aunits(e){this._aunits=e||0,this.triggerHeaderSysVarChangedEvent("aunits")}get version(){return this._version}set version(e){this._version=new RM(e),this.triggerHeaderSysVarChangedEvent("version")}get insunits(){return this._insunits}set insunits(e){this._insunits=e||4,this.triggerHeaderSysVarChangedEvent("insunits")}get ltscale(){return this._ltscale}set ltscale(e){this._ltscale=e||1,this.triggerHeaderSysVarChangedEvent("ltscale")}get cecolor(){return this._cecolor}set cecolor(e){this._cecolor=e||0,this.triggerHeaderSysVarChangedEvent("cecolor")}get celtscale(){return this._celtscale}set celtscale(e){this._celtscale=e||1,this.triggerHeaderSysVarChangedEvent("celtscale")}get angBase(){return this._angBase}set angBase(e){this._angBase=e||0,this.triggerHeaderSysVarChangedEvent("angbase")}get angDir(){return this._angDir}set angDir(e){this._angDir=e||0,this.triggerHeaderSysVarChangedEvent("angdir")}get extmax(){return this._extents.max}set extmax(e){e&&(this._extents.expandByPoint(e),this.triggerHeaderSysVarChangedEvent("extmax"))}get extmin(){return this._extents.min}set extmin(e){e&&(this._extents.expandByPoint(e),this.triggerHeaderSysVarChangedEvent("extmin"))}get extents(){return this._extents}get pdmode(){return this._pdmode}set pdmode(e){this._pdmode=e||0,this.triggerHeaderSysVarChangedEvent("pdmode")}get pdsize(){return this._pdsize}set pdsize(e){this._pdsize=e||0,this.triggerHeaderSysVarChangedEvent("pdsize")}async read(e,n,i=hh.DXF){const s=T2.instance.get(i);if(s==null)throw new Error(`Database converter for file type '${i}' isn't registered and can can't read this file!`);this.clear(),await s.read(e,this,n&&n.minimumChunkSize||10,async(r,o,a,l)=>{if(this.events.openProgress.dispatch({database:this,percentage:r,stage:"CONVERSION",subStage:o,subStageStatus:a,data:l}),n&&n.fontLoader&&o=="FONT"&&a=="END"){const c=l||this.tables.textStyleTable.fonts;await n.fontLoader.load(c)}})}async openUri(e,n){var i;this.events.openProgress.dispatch({database:this,percentage:0,stage:"FETCH_FILE",subStageStatus:"START"});const s=await fetch(e);if(!s.ok)throw this.events.openProgress.dispatch({database:this,percentage:100,stage:"FETCH_FILE",subStageStatus:"ERROR"}),new Error(`Failed to fetch file '${e}' with HTTP status code '${s.status}'!`);const r=s.headers.get("content-length"),o=r?parseInt(r,10):null;let a=0;const l=(i=s.body)==null?void 0:i.getReader();if(!l)throw new Error("Failed to get response reader");const c=[];for(;;){const{done:h,value:f}=await l.read();if(h)break;if(c.push(f),a+=f.length,o!==null){const p=Math.round(a/o*100);this.events.openProgress.dispatch({database:this,percentage:p,stage:"FETCH_FILE",subStageStatus:"IN-PROGRESS"})}}const u=new Uint8Array(a);let d=0;for(const h of c)u.set(h,d),d+=h.length;this.getFileNameFromUri(e).toLowerCase().split(".").pop()==="dwg"?await this.read(u.buffer,n,hh.DWG):await this.read(u.buffer,n,hh.DXF),this.events.openProgress.dispatch({database:this,percentage:100,stage:"FETCH_FILE",subStageStatus:"END"})}async regen(){await new K8e(this).read(null,this,500,async(e,n,i,s)=>{this.events.openProgress.dispatch({database:this,percentage:e,stage:"CONVERSION",subStage:n,subStageStatus:i,data:s})})}createDefaultData(e={layer:!0,lineType:!0,textStyle:!0,dimStyle:!0,layout:!0}){const n=new UH(this);e.layer&&n.createDefaultLayer(),e.lineType&&n.createDefaultLineType(),e.textStyle&&n.createDefaultTextStyle(),e.dimStyle&&n.createDefaultDimStyle(),e.layout&&n.createDefaultLayout()}clear(){this._tables.blockTable.removeAll(),this._tables.dimStyleTable.removeAll(),this._tables.linetypeTable.removeAll(),this._tables.textStyleTable.removeAll(),this._tables.layerTable.removeAll(),this._tables.viewportTable.removeAll(),this._dictionaries.layouts.removeAll(),this._currentSpace=void 0,this._extents.makeEmpty()}triggerHeaderSysVarChangedEvent(e){this.events.headerSysVarChanged.dispatch({database:this,name:e})}getFileNameFromUri(e){try{const n=new URL(e).pathname.split("/");return n[n.length-1]||""}catch(n){return console.error("Invalid URI:",n),""}}}const eG=class tG extends Zg{constructor(e,n){e=e||{},u1(e,tG.DEFAULT_DIM_VALUES),super(e,n)}get dimpost(){return this.getAttr("dimpost")}set dimpost(e){this.setAttr("dimpost",e)}get dimapost(){return this.getAttr("dimapost")}set dimapost(e){this.setAttr("dimapost",e)}get dimscale(){return this.getAttr("dimscale")}set dimscale(e){this.setAttr("dimscale",e)}get dimasz(){return this.getAttr("dimasz")}set dimasz(e){this.setAttr("dimasz",e)}get dimexo(){return this.getAttr("dimexo")}set dimexo(e){this.setAttr("dimexo",e)}get dimdli(){return this.getAttr("dimdli")}set dimdli(e){this.setAttr("dimdli",e)}get dimexe(){return this.getAttr("dimexe")}set dimexe(e){this.setAttr("dimexe",e)}get dimrnd(){return this.getAttr("dimrnd")}set dimrnd(e){this.setAttr("dimrnd",e)}get dimdle(){return this.getAttr("dimdle")}set dimdle(e){this.setAttr("dimdle",e)}get dimtp(){return this.getAttr("dimtp")}set dimtp(e){this.setAttr("dimtp",e)}get dimtm(){return this.getAttr("dimtm")}set dimtm(e){this.setAttr("dimtm",e)}get dimtxt(){return this.getAttr("dimtxt")}set dimtxt(e){this.setAttr("dimtxt",e)}get dimcen(){return this.getAttr("dimcen")}set dimcen(e){this.setAttr("dimcen",e)}get dimtsz(){return this.getAttr("dimtsz")}set dimtsz(e){this.setAttr("dimtsz",e)}get dimaltf(){return this.getAttr("dimaltf")}set dimaltf(e){this.setAttr("dimaltf",e)}get dimlfac(){return this.getAttr("dimlfac")}set dimlfac(e){this.setAttr("dimlfac",e)}get dimtvp(){return this.getAttr("dimtvp")}set dimtvp(e){this.setAttr("dimtvp",e)}get dimtfac(){return this.getAttr("dimtfac")}set dimtfac(e){this.setAttr("dimtfac",e)}get dimgap(){return this.getAttr("dimgap")}set dimgap(e){this.setAttr("dimgap",e)}get dimaltrnd(){return this.getAttr("dimaltrnd")}set dimaltrnd(e){this.setAttr("dimaltrnd",e)}get dimtol(){return this.getAttr("dimtol")}set dimtol(e){this.setAttr("dimtol",e)}get dimlim(){return this.getAttr("dimlim")}set dimlim(e){this.setAttr("dimlim",e)}get dimtih(){return this.getAttr("dimtih")}set dimtih(e){this.setAttr("dimtih",e)}get dimtoh(){return this.getAttr("dimtoh")}set dimtoh(e){this.setAttr("dimtoh",e)}get dimse1(){return this.getAttr("dimse1")}set dimse1(e){this.setAttr("dimse1",e)}get dimse2(){return this.getAttr("dimse2")}set dimse2(e){this.setAttr("dimse2",e)}get dimtad(){return this.getAttr("dimtad")}set dimtad(e){this.setAttr("dimtad",e)}get dimzin(){return this.getAttr("dimzin")}set dimzin(e){this.setAttr("dimzin",e)}get dimazin(){return this.getAttr("dimazin")}set dimazin(e){this.setAttr("dimazin",e)}get dimalt(){return this.getAttr("dimalt")}set dimalt(e){this.setAttr("dimalt",e)}get dimaltd(){return this.getAttr("dimaltd")}set dimaltd(e){this.setAttr("dimaltd",e)}get dimtofl(){return this.getAttr("dimtofl")}set dimtofl(e){this.setAttr("dimtofl",e)}get dimsah(){return this.getAttr("dimsah")}set dimsah(e){this.setAttr("dimsah",e)}get dimtix(){return this.getAttr("dimtix")}set dimtix(e){this.setAttr("dimtix",e)}get dimsoxd(){return this.getAttr("dimsoxd")}set dimsoxd(e){this.setAttr("dimsoxd",e)}get dimclrd(){return this.getAttr("dimclrd")}set dimclrd(e){this.setAttr("dimclrd",e)}get dimclre(){return this.getAttr("dimclre")}set dimclre(e){this.setAttr("dimclre",e)}get dimclrt(){return this.getAttr("dimclrt")}set dimclrt(e){this.setAttr("dimclrt",e)}get dimadec(){return this.getAttr("dimadec")}set dimadec(e){this.setAttr("dimadec",e)}get dimunit(){return this.getAttr("dimunit")}set dimunit(e){this.setAttr("dimunit",e)}get dimdec(){return this.getAttr("dimdec")}set dimdec(e){this.setAttr("dimdec",e)}get dimtdec(){return this.getAttr("dimtdec")}set dimtdec(e){this.setAttr("dimtdec",e)}get dimaltu(){return this.getAttr("dimaltu")}set dimaltu(e){this.setAttr("dimaltu",e)}get dimalttd(){return this.getAttr("dimalttd")}set dimalttd(e){this.setAttr("dimalttd",e)}get dimaunit(){return this.getAttr("dimaunit")}set dimaunit(e){this.setAttr("dimaunit",e)}get dimfrac(){return this.getAttr("dimfrac")}set dimfrac(e){this.setAttr("dimfrac",e)}get dimlunit(){return this.getAttr("dimlunit")}set dimlunit(e){this.setAttr("dimlunit",e)}get dimdsep(){return this.getAttr("dimdsep")}set dimdsep(e){this.setAttr("dimdsep",e)}get dimtmove(){return this.getAttr("dimtmove")}set dimtmove(e){this.setAttr("dimtmove",e)}get dimjust(){return this.getAttr("dimjust")}set dimjust(e){this.setAttr("dimjust",e)}get dimsd1(){return this.getAttr("dimsd1")}set dimsd1(e){this.setAttr("dimsd1",e)}get dimsd2(){return this.getAttr("dimsd2")}set dimsd2(e){this.setAttr("dimsd2",e)}get dimtolj(){return this.getAttr("dimtolj")}set dimtolj(e){this.setAttr("dimtolj",e)}get dimtzin(){return this.getAttr("dimtzin")}set dimtzin(e){this.setAttr("dimtzin",e)}get dimaltz(){return this.getAttr("dimaltz")}set dimaltz(e){this.setAttr("dimaltz",e)}get dimalttz(){return this.getAttr("dimalttz")}set dimalttz(e){this.setAttr("dimalttz",e)}get dimfit(){return this.getAttr("dimfit")}set dimfit(e){this.setAttr("dimfit",e)}get dimupt(){return this.getAttr("dimupt")}set dimupt(e){this.setAttr("dimupt",e)}get dimatfit(){return this.getAttr("dimatfit")}set dimatfit(e){this.setAttr("dimatfit",e)}get dimtxsty(){return this.getAttr("dimtxsty")}set dimtxsty(e){this.setAttr("dimtxsty",e)}get dimldrblk(){return this.getAttr("dimldrblk")}set dimldrblk(e){this.setAttr("dimldrblk",e)}get dimblk(){return this.getAttr("dimblk")}set dimblk(e){this.setAttr("dimblk",e)}get dimblk1(){return this.getAttr("dimblk1")}set dimblk1(e){this.setAttr("dimblk1",e)}get dimblk2(){return this.getAttr("dimblk2")}set dimblk2(e){this.setAttr("dimblk2",e)}get dimlwd(){return this.getAttr("dimlwd")}set dimlwd(e){this.setAttr("dimlwd",e)}get dimlwe(){return this.getAttr("dimlwe")}set dimlwe(e){this.setAttr("dimlwe",e)}};eG.DEFAULT_DIM_VALUES={name:"",dimpost:"",dimapost:"",dimscale:1,dimasz:2.5,dimexo:.625,dimdli:.38,dimexe:.18,dimrnd:0,dimdle:0,dimtp:0,dimtm:0,dimtxt:2.5,dimcen:2.5,dimtsz:0,dimaltf:0,dimlfac:1,dimtvp:0,dimtfac:1,dimgap:1,dimaltrnd:0,dimtol:0,dimlim:0,dimtih:0,dimtoh:0,dimse1:0,dimse2:0,dimtad:0,dimzin:0,dimazin:0,dimalt:0,dimaltd:2,dimtofl:0,dimsah:0,dimtix:0,dimsoxd:0,dimclrd:0,dimclre:0,dimclrt:0,dimadec:0,dimunit:2,dimdec:4,dimtdec:4,dimaltu:2,dimalttd:2,dimaunit:0,dimfrac:0,dimlunit:2,dimdsep:".",dimtmove:0,dimjust:0,dimsd1:0,dimsd2:0,dimtolj:0,dimtzin:0,dimaltz:0,dimalttz:0,dimfit:0,dimupt:0,dimatfit:3,dimtxsty:"Standard",dimldrblk:"",dimblk:"",dimblk1:"",dimblk2:"",dimlwd:-2,dimlwe:-2};let eS=eG,_0=class extends Zg{constructor(e){super(),this.name=e.name,this._linetype=e}get numDashes(){return this._linetype.pattern?this._linetype.pattern.length:0}get patternLength(){return this._linetype.totalPatternLength}get comments(){return this._linetype.description}get linetype(){return this._linetype}dashLengthAt(e){if(e<0||e>=this.numDashes)throw new Error('Index must be greater than or equal to zero, but less than the value of property "numDashes".');return this._linetype.pattern[e].elementLength}};const nG=class iG{constructor(){this.registry=new Map,this.cache=new Map,this.events={sysVarChanged:new Qi},this.registerVar({name:"PICKBOX",type:"number",defaultValue:0})}static instance(){return this._instance||(this._instance=new iG),this._instance}registerVar(e){this.registry.set(e.name.toUpperCase(),e)}registerMany(e){e.forEach(n=>this.registerVar(n))}getVar(e){if(e=e.toUpperCase(),this.cache.has(e))return this.cache.get(e)}setVar(e,n){e=e.toUpperCase();const i=this.getDescriptor(e);if(i){const s=this.getVar(e);if(this.cache.set(e,n),i.type!=="string"&&(typeof n=="string"||n instanceof String))if(i.type==="number"){const r=Number(n);if(Number.isNaN(r))throw new Error("Invalid input!");n=r}else i.type==="boolean"&&(n=this.parseBoolean(n));this.events.sysVarChanged.dispatch({name:e,newVal:n,oldVal:s})}else throw new Error(`System variable ${e} not found!`)}getDescriptor(e){return this.registry.get(e.toUpperCase())}getAllDescriptors(){return[...this.registry.values()]}parseBoolean(e){if(e==null)return!1;const n=String(e).trim().toLowerCase(),i=new Set(["true","t","1","yes","y"]),s=new Set(["false","f","0","no","n"]);return i.has(n)?!0:(s.has(n),!1)}};nG._instance=null;let j4=nG,K4=class extends Zg{constructor(e){super(),this.name=e.name,this._textStyle=e,this._textStyle.font=this.getFileNameWithoutExtension(this._textStyle.font||this._textStyle.extendedFont||this.name),this._isVertical=!1}get obliquingAngle(){return this._textStyle.obliqueAngle}set obliquingAngle(e){this._textStyle.obliqueAngle=e}get priorSize(){return this._textStyle.lastHeight}set priorSize(e){this._textStyle.lastHeight=e}get textSize(){return this._textStyle.fixedTextHeight}set textSize(e){this._textStyle.fixedTextHeight=e}get xScale(){return this._textStyle.widthFactor}set xScale(e){this._textStyle.widthFactor=e}get isVertical(){return this._isVertical}set isVertical(e){this._isVertical=e}get fileName(){return this._textStyle.font}set fileName(e){this._textStyle.font=e}get bigFontFileName(){return this._textStyle.bigFont}set bigFontFileName(e){this._textStyle.bigFont=e}get textStyle(){return this._textStyle}getFileNameWithoutExtension(e){const n=e.split("/").pop();if(n){const i=n.lastIndexOf(".");return i===-1?n:n.substring(0,i)}return e}};const t6e={center:new Si,viewDirectionFromTarget:new Yt(0,0,1),viewTarget:new Yt(0,0,0),lensLength:500,frontClippingPlane:0,backClippingPlane:0,viewHeight:1e3,viewTwistAngle:0,frozenLayers:[],styleSheet:"",renderMode:$V.OPTIMIZED_2D,viewMode:0,ucsIconSetting:0,ucsOrigin:new Yt(0,0,0),ucsXAxis:new Yt(1,0,0),ucsYAxis:new Yt(0,1,0),orthographicType:VV.TOP,shadePlotSetting:0,shadePlotObjectId:void 0,visualStyleObjectId:void 0,isDefaultLightingOn:!1,defaultLightingType:HV.ONE_DISTANT_LIGHT,brightness:0,contrast:0,ambientColor:void 0};class sG extends Zg{constructor(){super(),this._circleSides=100,this._center=new Si,this._lowerLeftCorner=new Si(0,0),this._upperRightCorner=new Si(1,1),this._snapBase=new Si(0,0),this._snapAngle=0,this._snapSpacing=new Si(0,0),this._standardFlag=0,this._gridSpacing=new Si,this._gridMajor=10,this._gsView=t6e}get circleSides(){return this._circleSides}set circleSides(e){this._circleSides=e}get center(){return this._center}get lowerLeftCorner(){return this._lowerLeftCorner}set lowerLeftCorner(e){this._lowerLeftCorner.copy(e)}get upperRightCorner(){return this._upperRightCorner}set upperRightCorner(e){this._upperRightCorner.copy(e)}get snapBase(){return this._snapBase}set snapBase(e){this._snapBase.copy(e)}get snapAngle(){return this._snapAngle}set snapAngle(e){this._snapAngle=e}get snapIncrements(){return this._snapSpacing}set snapIncrements(e){this._snapSpacing.copy(e)}get gridMajor(){return this._gridMajor}set gridMajor(e){this._gridMajor=e}get gridIncrements(){return this._gridSpacing}set gridIncrements(e){this._gridSpacing.copy(e)}get standardFlag(){return this._standardFlag}set standardFlag(e){this._standardFlag=e}get snapEnabled(){return!!(this._standardFlag&256)}get backgroundObjectId(){return this._backgroundObjectId}set backgroundObjectId(e){this._backgroundObjectId=e}get gsView(){return this._gsView}}class n6e{constructor(){this.events={layoutCreated:new Qi,layoutRemoved:new Qi,layoutRenamed:new Qi,layoutSwitched:new Qi}}countLayouts(e){return this.getWorkingDatabase(e).dictionaries.layouts.numEntries}findLayoutNamed(e,n){return this.getWorkingDatabase(n).dictionaries.layouts.getAt(e)}findActiveLayout(){const e=this.getActiveLayout();return e?e.layoutName:"Model"}setCurrentLayoutId(e,n){const i=this.getWorkingDatabase(n),s=i.dictionaries.layouts.getIdAt(e);return this.setCurrentLayoutInternal(s,i)}setCurrentLayoutBtrId(e,n){const i=this.getWorkingDatabase(n),s=i.dictionaries.layouts.getBtrIdAt(e);return this.setCurrentLayoutInternal(s,i)}setCurrentLayout(e,n){const i=this.getWorkingDatabase(n),s=i.dictionaries.layouts.getAt(e);return this.setCurrentLayoutInternal(s,i)}renameLayout(e,n,i){const s=this.getWorkingDatabase(i).dictionaries.layouts.getAt(e);return s?(s.layoutName=n,this.events.layoutRenamed.dispatch({layout:s,oldName:e,newName:n}),!0):!1}layoutExists(e,n){return this.getWorkingDatabase(n).dictionaries.layouts.has(e)}deleteLayout(e,n){const i=this.getWorkingDatabase(n).dictionaries.layouts,s=i.getAt(e);let r=!1;return s&&(r=i.remove(e),r&&this.events.layoutRemoved.dispatch({layout:s})),r}createLayout(e,n){const i=this.getWorkingDatabase(n),s=new p1;s.layoutName=e,s.tabOrder=i.dictionaries.layouts.maxTabOrder;const r=new mo;return r.name=`*Paper_Space${s.tabOrder}`,i.tables.blockTable.add(r),i.dictionaries.layouts.setAt(e,s),this.events.layoutCreated.dispatch({layout:s}),{layout:s,btr:r}}getActiveLayout(e){const n=this.getWorkingDatabase(e);return n.dictionaries.layouts.getBtrIdAt(n.currentSpaceId)}getWorkingDatabase(e){return e||gp().workingDatabase}setCurrentLayoutInternal(e,n){return e?(this.events.layoutSwitched.dispatch({layout:e}),n.currentSpaceId=e.blockTableRecordId,!0):!1}}function gp(){return i6e.instance}const DM=class{constructor(){this._workingDatabase=null,this._layoutManager=new n6e}get workingDatabase(){if(this._workingDatabase==null)throw new Error("The current working database must be set before using it!");return this._workingDatabase}set workingDatabase(e){this._workingDatabase=e}get layoutManager(){return this._layoutManager}};DM.instance=new DM;let i6e=DM;const q4="172",Ku={ROTATE:0,DOLLY:1,PAN:2},ah={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},s6e=0,j5=1,r6e=2,rG=1,o6e=2,Mu=3,Mh=0,ma=1,Ac=2,fh=0,Km=1,K5=2,q5=3,Y5=4,a6e=5,mf=100,l6e=101,c6e=102,u6e=103,d6e=104,h6e=200,f6e=201,p6e=202,m6e=203,NM=204,BM=205,g6e=206,v6e=207,y6e=208,b6e=209,_6e=210,w6e=211,x6e=212,S6e=213,E6e=214,FM=0,zM=1,UM=2,wg=3,$M=4,VM=5,HM=6,WM=7,oG=0,C6e=1,T6e=2,ph=0,M6e=1,A6e=2,k6e=3,P6e=4,L6e=5,I6e=6,R6e=7,aG=300,xg=301,Sg=302,GM=303,jM=304,tS=306,KM=1e3,Af=1001,qM=1002,Ul=1003,O6e=1004,Ob=1005,Rl=1006,NE=1007,kf=1008,od=1009,lG=1010,cG=1011,cy=1012,Y4=1013,tp=1014,Fu=1015,m1=1016,X4=1017,Z4=1018,Eg=1020,uG=35902,dG=1021,hG=1022,Ol=1023,fG=1024,pG=1025,qm=1026,Cg=1027,mG=1028,J4=1029,gG=1030,Q4=1031,eP=1033,xw=33776,Sw=33777,Ew=33778,Cw=33779,YM=35840,XM=35841,ZM=35842,JM=35843,QM=36196,e3=37492,t3=37496,n3=37808,i3=37809,s3=37810,r3=37811,o3=37812,a3=37813,l3=37814,c3=37815,u3=37816,d3=37817,h3=37818,f3=37819,p3=37820,m3=37821,Tw=36492,g3=36494,v3=36495,vG=36283,y3=36284,b3=36285,_3=36286,D6e=3200,N6e=3201,B6e=0,F6e=1,nh="",Pa="srgb",Tg="srgb-linear",M2="linear",Cs="srgb",Kp=7680,X5=519,z6e=512,U6e=513,$6e=514,yG=515,V6e=516,H6e=517,W6e=518,G6e=519,w3=35044,Z5="300 es",zu=2e3,A2=2001;class vp{addEventListener(e,n){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(n)===-1&&i[e].push(n)}hasEventListener(e,n){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(n)!==-1}removeEventListener(e,n){if(this._listeners===void 0)return;const s=this._listeners[e];if(s!==void 0){const r=s.indexOf(n);r!==-1&&s.splice(r,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const s=i.slice(0);for(let r=0,o=s.length;r>8&255]+lo[t>>16&255]+lo[t>>24&255]+"-"+lo[e&255]+lo[e>>8&255]+"-"+lo[e>>16&15|64]+lo[e>>24&255]+"-"+lo[n&63|128]+lo[n>>8&255]+"-"+lo[n>>16&255]+lo[n>>24&255]+lo[i&255]+lo[i>>8&255]+lo[i>>16&255]+lo[i>>24&255]).toLowerCase()}function $i(t,e,n){return Math.max(e,Math.min(n,t))}function tP(t,e){return(t%e+e)%e}function j6e(t,e,n,i,s){return i+(t-e)*(s-i)/(n-e)}function K6e(t,e,n){return t!==e?(n-t)/(e-t):0}function x0(t,e,n){return(1-n)*t+n*e}function q6e(t,e,n,i){return x0(t,e,1-Math.exp(-n*i))}function Y6e(t,e=1){return e-Math.abs(tP(t,e*2)-e)}function X6e(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*(3-2*t))}function Z6e(t,e,n){return t<=e?0:t>=n?1:(t=(t-e)/(n-e),t*t*t*(t*(t*6-15)+10))}function J6e(t,e){return t+Math.floor(Math.random()*(e-t+1))}function Q6e(t,e){return t+Math.random()*(e-t)}function e5e(t){return t*(.5-Math.random())}function t5e(t){t!==void 0&&(J5=t);let e=J5+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function n5e(t){return t*w0}function i5e(t){return t*uy}function s5e(t){return(t&t-1)===0&&t!==0}function r5e(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))}function o5e(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))}function a5e(t,e,n,i,s){const r=Math.cos,o=Math.sin,a=r(n/2),l=o(n/2),c=r((e+i)/2),u=o((e+i)/2),d=r((e-i)/2),h=o((e-i)/2),f=r((i-e)/2),p=o((i-e)/2);switch(s){case"XYX":t.set(a*u,l*d,l*h,a*c);break;case"YZY":t.set(l*h,a*u,l*d,a*c);break;case"ZXZ":t.set(l*d,l*h,a*u,a*c);break;case"XZX":t.set(a*u,l*p,l*f,a*c);break;case"YXY":t.set(l*f,a*u,l*p,a*c);break;case"ZYZ":t.set(l*p,l*f,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+s)}}function Pl(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function bs(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(t*4294967295);case Uint16Array:return Math.round(t*65535);case Uint8Array:return Math.round(t*255);case Int32Array:return Math.round(t*2147483647);case Int16Array:return Math.round(t*32767);case Int8Array:return Math.round(t*127);default:throw new Error("Invalid component type.")}}const x3={DEG2RAD:w0,RAD2DEG:uy,generateUUID:zc,clamp:$i,euclideanModulo:tP,mapLinear:j6e,inverseLerp:K6e,lerp:x0,damp:q6e,pingpong:Y6e,smoothstep:X6e,smootherstep:Z6e,randInt:J6e,randFloat:Q6e,randFloatSpread:e5e,seededRandom:t5e,degToRad:n5e,radToDeg:i5e,isPowerOfTwo:s5e,ceilPowerOfTwo:r5e,floorPowerOfTwo:o5e,setQuaternionFromProperEuler:a5e,normalize:bs,denormalize:Pl};class vn{constructor(e=0,n=0){vn.prototype.isVector2=!0,this.x=e,this.y=n}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,n){return this.x=e,this.y=n,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const n=this.x,i=this.y,s=e.elements;return this.x=s[0]*n+s[3]*i+s[6],this.y=s[1]*n+s[4]*i+s[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,n){return this.x=$i(this.x,e.x,n.x),this.y=$i(this.y,e.y,n.y),this}clampScalar(e,n){return this.x=$i(this.x,e,n),this.y=$i(this.y,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar($i(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos($i(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y;return n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this}rotateAround(e,n){const i=Math.cos(n),s=Math.sin(n),r=this.x-e.x,o=this.y-e.y;return this.x=r*i-o*s+e.x,this.y=r*s+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ii{constructor(e,n,i,s,r,o,a,l,c){Ii.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,c)}set(e,n,i,s,r,o,a,l,c){const u=this.elements;return u[0]=e,u[1]=s,u[2]=a,u[3]=n,u[4]=r,u[5]=l,u[6]=i,u[7]=o,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],this}extractBasis(e,n,i){return e.setFromMatrix3Column(this,0),n.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const n=e.elements;return this.set(n[0],n[4],n[8],n[1],n[5],n[9],n[2],n[6],n[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[3],l=i[6],c=i[1],u=i[4],d=i[7],h=i[2],f=i[5],p=i[8],m=s[0],b=s[3],g=s[6],x=s[1],S=s[4],_=s[7],E=s[2],T=s[5],A=s[8];return r[0]=o*m+a*x+l*E,r[3]=o*b+a*S+l*T,r[6]=o*g+a*_+l*A,r[1]=c*m+u*x+d*E,r[4]=c*b+u*S+d*T,r[7]=c*g+u*_+d*A,r[2]=h*m+f*x+p*E,r[5]=h*b+f*S+p*T,r[8]=h*g+f*_+p*A,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=e,n[4]*=e,n[7]*=e,n[2]*=e,n[5]*=e,n[8]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8];return n*o*u-n*a*c-i*r*u+i*a*l+s*r*c-s*o*l}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=u*o-a*c,h=a*l-u*r,f=c*r-o*l,p=n*d+i*h+s*f;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const m=1/p;return e[0]=d*m,e[1]=(s*c-u*i)*m,e[2]=(a*i-s*o)*m,e[3]=h*m,e[4]=(u*n-s*l)*m,e[5]=(s*r-a*n)*m,e[6]=f*m,e[7]=(i*l-c*n)*m,e[8]=(o*n-i*r)*m,this}transpose(){let e;const n=this.elements;return e=n[1],n[1]=n[3],n[3]=e,e=n[2],n[2]=n[6],n[6]=e,e=n[5],n[5]=n[7],n[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const n=this.elements;return e[0]=n[0],e[1]=n[3],e[2]=n[6],e[3]=n[1],e[4]=n[4],e[5]=n[7],e[6]=n[2],e[7]=n[5],e[8]=n[8],this}setUvTransform(e,n,i,s,r,o,a){const l=Math.cos(r),c=Math.sin(r);return this.set(i*l,i*c,-i*(l*o+c*a)+o+e,-s*c,s*l,-s*(-c*o+l*a)+a+n,0,0,1),this}scale(e,n){return this.premultiply(BE.makeScale(e,n)),this}rotate(e){return this.premultiply(BE.makeRotation(-e)),this}translate(e,n){return this.premultiply(BE.makeTranslation(e,n)),this}makeTranslation(e,n){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,n,0,0,1),this}makeRotation(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,i,n,0,0,0,1),this}makeScale(e,n){return this.set(e,0,0,0,n,0,0,0,1),this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<9;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<9;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const BE=new Ii;function bG(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}function dy(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function l5e(){const t=dy("canvas");return t.style.display="block",t}const Q5={};function Cm(t){t in Q5||(Q5[t]=!0,console.warn(t))}function c5e(t,e,n){return new Promise(function(i,s){function r(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:s();break;case t.TIMEOUT_EXPIRED:setTimeout(r,n);break;default:i()}}setTimeout(r,n)})}function u5e(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function d5e(t){const e=t.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const eR=new Ii().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),tR=new Ii().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715);function h5e(){const t={enabled:!0,workingColorSpace:Tg,spaces:{},convert:function(s,r,o){return this.enabled===!1||r===o||!r||!o||(this.spaces[r].transfer===Cs&&(s.r=qu(s.r),s.g=qu(s.g),s.b=qu(s.b)),this.spaces[r].primaries!==this.spaces[o].primaries&&(s.applyMatrix3(this.spaces[r].toXYZ),s.applyMatrix3(this.spaces[o].fromXYZ)),this.spaces[o].transfer===Cs&&(s.r=Ym(s.r),s.g=Ym(s.g),s.b=Ym(s.b))),s},fromWorkingColorSpace:function(s,r){return this.convert(s,this.workingColorSpace,r)},toWorkingColorSpace:function(s,r){return this.convert(s,r,this.workingColorSpace)},getPrimaries:function(s){return this.spaces[s].primaries},getTransfer:function(s){return s===nh?M2:this.spaces[s].transfer},getLuminanceCoefficients:function(s,r=this.workingColorSpace){return s.fromArray(this.spaces[r].luminanceCoefficients)},define:function(s){Object.assign(this.spaces,s)},_getMatrix:function(s,r,o){return s.copy(this.spaces[r].toXYZ).multiply(this.spaces[o].fromXYZ)},_getDrawingBufferColorSpace:function(s){return this.spaces[s].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(s=this.workingColorSpace){return this.spaces[s].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],n=[.2126,.7152,.0722],i=[.3127,.329];return t.define({[Tg]:{primaries:e,whitePoint:i,transfer:M2,toXYZ:eR,fromXYZ:tR,luminanceCoefficients:n,workingColorSpaceConfig:{unpackColorSpace:Pa},outputColorSpaceConfig:{drawingBufferColorSpace:Pa}},[Pa]:{primaries:e,whitePoint:i,transfer:Cs,toXYZ:eR,fromXYZ:tR,luminanceCoefficients:n,outputColorSpaceConfig:{drawingBufferColorSpace:Pa}}}),t}const ss=h5e();function qu(t){return t<.04045?t*.0773993808:Math.pow(t*.9478672986+.0521327014,2.4)}function Ym(t){return t<.0031308?t*12.92:1.055*Math.pow(t,.41666)-.055}let qp;class f5e{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let n;if(e instanceof HTMLCanvasElement)n=e;else{qp===void 0&&(qp=dy("canvas")),qp.width=e.width,qp.height=e.height;const i=qp.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),n=qp}return n.width>2048||n.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),n.toDataURL("image/jpeg",.6)):n.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const n=dy("canvas");n.width=e.width,n.height=e.height;const i=n.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const s=i.getImageData(0,0,e.width,e.height),r=s.data;for(let o=0;o0&&(i.userData=this.userData),n||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==aG)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case KM:e.x=e.x-Math.floor(e.x);break;case Af:e.x=e.x<0?0:1;break;case qM:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case KM:e.y=e.y-Math.floor(e.y);break;case Af:e.y=e.y<0?0:1;break;case qM:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}Eo.DEFAULT_IMAGE=null;Eo.DEFAULT_MAPPING=aG;Eo.DEFAULT_ANISOTROPY=1;class Zs{constructor(e=0,n=0,i=0,s=1){Zs.prototype.isVector4=!0,this.x=e,this.y=n,this.z=i,this.w=s}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,n,i,s){return this.x=e,this.y=n,this.z=i,this.w=s,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;case 3:this.w=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this.w=e.w+n.w,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this.w+=e.w*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this.w=e.w-n.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=this.w,o=e.elements;return this.x=o[0]*n+o[4]*i+o[8]*s+o[12]*r,this.y=o[1]*n+o[5]*i+o[9]*s+o[13]*r,this.z=o[2]*n+o[6]*i+o[10]*s+o[14]*r,this.w=o[3]*n+o[7]*i+o[11]*s+o[15]*r,this}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this.w/=e.w,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const n=Math.sqrt(1-e.w*e.w);return n<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/n,this.y=e.y/n,this.z=e.z/n),this}setAxisAngleFromRotationMatrix(e){let n,i,s,r;const l=e.elements,c=l[0],u=l[4],d=l[8],h=l[1],f=l[5],p=l[9],m=l[2],b=l[6],g=l[10];if(Math.abs(u-h)<.01&&Math.abs(d-m)<.01&&Math.abs(p-b)<.01){if(Math.abs(u+h)<.1&&Math.abs(d+m)<.1&&Math.abs(p+b)<.1&&Math.abs(c+f+g-3)<.1)return this.set(1,0,0,0),this;n=Math.PI;const S=(c+1)/2,_=(f+1)/2,E=(g+1)/2,T=(u+h)/4,A=(d+m)/4,I=(p+b)/4;return S>_&&S>E?S<.01?(i=0,s=.707106781,r=.707106781):(i=Math.sqrt(S),s=T/i,r=A/i):_>E?_<.01?(i=.707106781,s=0,r=.707106781):(s=Math.sqrt(_),i=T/s,r=I/s):E<.01?(i=.707106781,s=.707106781,r=0):(r=Math.sqrt(E),i=A/r,s=I/r),this.set(i,s,r,n),this}let x=Math.sqrt((b-p)*(b-p)+(d-m)*(d-m)+(h-u)*(h-u));return Math.abs(x)<.001&&(x=1),this.x=(b-p)/x,this.y=(d-m)/x,this.z=(h-u)/x,this.w=Math.acos((c+f+g-1)/2),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this.w=n[15],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,n){return this.x=$i(this.x,e.x,n.x),this.y=$i(this.y,e.y,n.y),this.z=$i(this.z,e.z,n.z),this.w=$i(this.w,e.w,n.w),this}clampScalar(e,n){return this.x=$i(this.x,e,n),this.y=$i(this.y,e,n),this.z=$i(this.z,e,n),this.w=$i(this.w,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar($i(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this.w+=(e.w-this.w)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this.w=e.w+(n.w-e.w)*i,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this.w=e[n+3],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e[n+3]=this.w,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this.w=e.getW(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class g5e extends vp{constructor(e=1,n=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=n,this.depth=1,this.scissor=new Zs(0,0,e,n),this.scissorTest=!1,this.viewport=new Zs(0,0,e,n);const s={width:e,height:n,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Rl,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const r=new Eo(s,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);r.flipY=!1,r.generateMipmaps=i.generateMipmaps,r.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const E=Math.sqrt(S),T=Math.atan2(E,g*x);b=Math.sin(b*T)/E,a=Math.sin(a*T)/E}const _=a*x;if(l=l*b+h*_,c=c*b+f*_,u=u*b+p*_,d=d*b+m*_,b===1-a){const E=1/Math.sqrt(l*l+c*c+u*u+d*d);l*=E,c*=E,u*=E,d*=E}}e[n]=l,e[n+1]=c,e[n+2]=u,e[n+3]=d}static multiplyQuaternionsFlat(e,n,i,s,r,o){const a=i[s],l=i[s+1],c=i[s+2],u=i[s+3],d=r[o],h=r[o+1],f=r[o+2],p=r[o+3];return e[n]=a*p+u*d+l*f-c*h,e[n+1]=l*p+u*h+c*d-a*f,e[n+2]=c*p+u*f+a*h-l*d,e[n+3]=u*p-a*d-l*h-c*f,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,n,i,s){return this._x=e,this._y=n,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,n=!0){const i=e._x,s=e._y,r=e._z,o=e._order,a=Math.cos,l=Math.sin,c=a(i/2),u=a(s/2),d=a(r/2),h=l(i/2),f=l(s/2),p=l(r/2);switch(o){case"XYZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"YXZ":this._x=h*u*d+c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"ZXY":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d-h*f*p;break;case"ZYX":this._x=h*u*d-c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d+h*f*p;break;case"YZX":this._x=h*u*d+c*f*p,this._y=c*f*d+h*u*p,this._z=c*u*p-h*f*d,this._w=c*u*d-h*f*p;break;case"XZY":this._x=h*u*d-c*f*p,this._y=c*f*d-h*u*p,this._z=c*u*p+h*f*d,this._w=c*u*d+h*f*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return n===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,n){const i=n/2,s=Math.sin(i);return this._x=e.x*s,this._y=e.y*s,this._z=e.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const n=e.elements,i=n[0],s=n[4],r=n[8],o=n[1],a=n[5],l=n[9],c=n[2],u=n[6],d=n[10],h=i+a+d;if(h>0){const f=.5/Math.sqrt(h+1);this._w=.25/f,this._x=(u-l)*f,this._y=(r-c)*f,this._z=(o-s)*f}else if(i>a&&i>d){const f=2*Math.sqrt(1+i-a-d);this._w=(u-l)/f,this._x=.25*f,this._y=(s+o)/f,this._z=(r+c)/f}else if(a>d){const f=2*Math.sqrt(1+a-i-d);this._w=(r-c)/f,this._x=(s+o)/f,this._y=.25*f,this._z=(l+u)/f}else{const f=2*Math.sqrt(1+d-i-a);this._w=(o-s)/f,this._x=(r+c)/f,this._y=(l+u)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(e,n){let i=e.dot(n)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(this._x=e.y*n.z-e.z*n.y,this._y=e.z*n.x-e.x*n.z,this._z=e.x*n.y-e.y*n.x,this._w=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs($i(this.dot(e),-1,1)))}rotateTowards(e,n){const i=this.angleTo(e);if(i===0)return this;const s=Math.min(1,n/i);return this.slerp(e,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,n){const i=e._x,s=e._y,r=e._z,o=e._w,a=n._x,l=n._y,c=n._z,u=n._w;return this._x=i*u+o*a+s*c-r*l,this._y=s*u+o*l+r*a-i*c,this._z=r*u+o*c+i*l-s*a,this._w=o*u-i*a-s*l-r*c,this._onChangeCallback(),this}slerp(e,n){if(n===0)return this;if(n===1)return this.copy(e);const i=this._x,s=this._y,r=this._z,o=this._w;let a=o*e._w+i*e._x+s*e._y+r*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=s,this._z=r,this;const l=1-a*a;if(l<=Number.EPSILON){const f=1-n;return this._w=f*o+n*this._w,this._x=f*i+n*this._x,this._y=f*s+n*this._y,this._z=f*r+n*this._z,this.normalize(),this}const c=Math.sqrt(l),u=Math.atan2(c,a),d=Math.sin((1-n)*u)/c,h=Math.sin(n*u)/c;return this._w=o*d+this._w*h,this._x=i*d+this._x*h,this._y=s*d+this._y*h,this._z=r*d+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,n,i){return this.copy(e).slerp(n,i)}random(){const e=2*Math.PI*Math.random(),n=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(e),s*Math.cos(e),r*Math.sin(n),r*Math.cos(n))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,n=0){return this._x=e[n],this._y=e[n+1],this._z=e[n+2],this._w=e[n+3],this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._w,e}fromBufferAttribute(e,n){return this._x=e.getX(n),this._y=e.getY(n),this._z=e.getZ(n),this._w=e.getW(n),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class ct{constructor(e=0,n=0,i=0){ct.prototype.isVector3=!0,this.x=e,this.y=n,this.z=i}set(e,n,i){return i===void 0&&(i=this.z),this.x=e,this.y=n,this.z=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,n){switch(e){case 0:this.x=n;break;case 1:this.y=n;break;case 2:this.z=n;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,n){return this.x=e.x+n.x,this.y=e.y+n.y,this.z=e.z+n.z,this}addScaledVector(e,n){return this.x+=e.x*n,this.y+=e.y*n,this.z+=e.z*n,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,n){return this.x=e.x-n.x,this.y=e.y-n.y,this.z=e.z-n.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,n){return this.x=e.x*n.x,this.y=e.y*n.y,this.z=e.z*n.z,this}applyEuler(e){return this.applyQuaternion(nR.setFromEuler(e))}applyAxisAngle(e,n){return this.applyQuaternion(nR.setFromAxisAngle(e,n))}applyMatrix3(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[3]*i+r[6]*s,this.y=r[1]*n+r[4]*i+r[7]*s,this.z=r[2]*n+r[5]*i+r[8]*s,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const n=this.x,i=this.y,s=this.z,r=e.elements,o=1/(r[3]*n+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*n+r[4]*i+r[8]*s+r[12])*o,this.y=(r[1]*n+r[5]*i+r[9]*s+r[13])*o,this.z=(r[2]*n+r[6]*i+r[10]*s+r[14])*o,this}applyQuaternion(e){const n=this.x,i=this.y,s=this.z,r=e.x,o=e.y,a=e.z,l=e.w,c=2*(o*s-a*i),u=2*(a*n-r*s),d=2*(r*i-o*n);return this.x=n+l*c+o*d-a*u,this.y=i+l*u+a*c-r*d,this.z=s+l*d+r*u-o*c,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const n=this.x,i=this.y,s=this.z,r=e.elements;return this.x=r[0]*n+r[4]*i+r[8]*s,this.y=r[1]*n+r[5]*i+r[9]*s,this.z=r[2]*n+r[6]*i+r[10]*s,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,n){return this.x=$i(this.x,e.x,n.x),this.y=$i(this.y,e.y,n.y),this.z=$i(this.z,e.z,n.z),this}clampScalar(e,n){return this.x=$i(this.x,e,n),this.y=$i(this.y,e,n),this.z=$i(this.z,e,n),this}clampLength(e,n){const i=this.length();return this.divideScalar(i||1).multiplyScalar($i(i,e,n))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,n){return this.x+=(e.x-this.x)*n,this.y+=(e.y-this.y)*n,this.z+=(e.z-this.z)*n,this}lerpVectors(e,n,i){return this.x=e.x+(n.x-e.x)*i,this.y=e.y+(n.y-e.y)*i,this.z=e.z+(n.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,n){const i=e.x,s=e.y,r=e.z,o=n.x,a=n.y,l=n.z;return this.x=s*l-r*a,this.y=r*o-i*l,this.z=i*a-s*o,this}projectOnVector(e){const n=e.lengthSq();if(n===0)return this.set(0,0,0);const i=e.dot(this)/n;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return zE.copy(this).projectOnVector(e),this.sub(zE)}reflect(e){return this.sub(zE.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const n=Math.sqrt(this.lengthSq()*e.lengthSq());if(n===0)return Math.PI/2;const i=this.dot(e)/n;return Math.acos($i(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const n=this.x-e.x,i=this.y-e.y,s=this.z-e.z;return n*n+i*i+s*s}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,n,i){const s=Math.sin(n)*e;return this.x=s*Math.sin(i),this.y=Math.cos(n)*e,this.z=s*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,n,i){return this.x=e*Math.sin(n),this.y=i,this.z=e*Math.cos(n),this}setFromMatrixPosition(e){const n=e.elements;return this.x=n[12],this.y=n[13],this.z=n[14],this}setFromMatrixScale(e){const n=this.setFromMatrixColumn(e,0).length(),i=this.setFromMatrixColumn(e,1).length(),s=this.setFromMatrixColumn(e,2).length();return this.x=n,this.y=i,this.z=s,this}setFromMatrixColumn(e,n){return this.fromArray(e.elements,n*4)}setFromMatrix3Column(e,n){return this.fromArray(e.elements,n*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,n=0){return this.x=e[n],this.y=e[n+1],this.z=e[n+2],this}toArray(e=[],n=0){return e[n]=this.x,e[n+1]=this.y,e[n+2]=this.z,e}fromBufferAttribute(e,n){return this.x=e.getX(n),this.y=e.getY(n),this.z=e.getZ(n),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=Math.random()*Math.PI*2,n=Math.random()*2-1,i=Math.sqrt(1-n*n);return this.x=i*Math.cos(e),this.y=n,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const zE=new ct,nR=new Ah;class Gs{constructor(e=new ct(1/0,1/0,1/0),n=new ct(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=n}set(e,n){return this.min.copy(e),this.max.copy(n),this}setFromArray(e){this.makeEmpty();for(let n=0,i=e.length;n=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y&&e.z>=this.min.z&&e.z<=this.max.z}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y&&e.max.z>=this.min.z&&e.min.z<=this.max.z}intersectsSphere(e){return this.clampPoint(e.center,Sl),Sl.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let n,i;return e.normal.x>0?(n=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(n=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(n+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(n+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(n+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(n+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),n<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Sv),Nb.subVectors(this.max,Sv),Yp.subVectors(e.a,Sv),Xp.subVectors(e.b,Sv),Zp.subVectors(e.c,Sv),Ld.subVectors(Xp,Yp),Id.subVectors(Zp,Xp),Xh.subVectors(Yp,Zp);let n=[0,-Ld.z,Ld.y,0,-Id.z,Id.y,0,-Xh.z,Xh.y,Ld.z,0,-Ld.x,Id.z,0,-Id.x,Xh.z,0,-Xh.x,-Ld.y,Ld.x,0,-Id.y,Id.x,0,-Xh.y,Xh.x,0];return!UE(n,Yp,Xp,Zp,Nb)||(n=[1,0,0,0,1,0,0,0,1],!UE(n,Yp,Xp,Zp,Nb))?!1:(Bb.crossVectors(Ld,Id),n=[Bb.x,Bb.y,Bb.z],UE(n,Yp,Xp,Zp,Nb))}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Sl).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Sl).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(bu[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),bu[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),bu[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),bu[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),bu[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),bu[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),bu[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),bu[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(bu),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const bu=[new ct,new ct,new ct,new ct,new ct,new ct,new ct,new ct],Sl=new ct,Db=new Gs,Yp=new ct,Xp=new ct,Zp=new ct,Ld=new ct,Id=new ct,Xh=new ct,Sv=new ct,Nb=new ct,Bb=new ct,Zh=new ct;function UE(t,e,n,i,s){for(let r=0,o=t.length-3;r<=o;r+=3){Zh.fromArray(t,r);const a=s.x*Math.abs(Zh.x)+s.y*Math.abs(Zh.y)+s.z*Math.abs(Zh.z),l=e.dot(Zh),c=n.dot(Zh),u=i.dot(Zh);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>a)return!1}return!0}const y5e=new Gs,Ev=new ct,$E=new ct;class ga{constructor(e=new ct,n=-1){this.isSphere=!0,this.center=e,this.radius=n}set(e,n){return this.center.copy(e),this.radius=n,this}setFromPoints(e,n){const i=this.center;n!==void 0?i.copy(n):y5e.setFromPoints(e).getCenter(i);let s=0;for(let r=0,o=e.length;rthis.radius*this.radius&&(n.sub(this.center).normalize(),n.multiplyScalar(this.radius).add(this.center)),n}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Ev.subVectors(e,this.center);const n=Ev.lengthSq();if(n>this.radius*this.radius){const i=Math.sqrt(n),s=(i-this.radius)*.5;this.center.addScaledVector(Ev,s/i),this.radius+=s}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):($E.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Ev.copy(e.center).add($E)),this.expandByPoint(Ev.copy(e.center).sub($E))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const _u=new ct,VE=new ct,Fb=new ct,Rd=new ct,HE=new ct,zb=new ct,WE=new ct;class g1{constructor(e=new ct,n=new ct(0,0,-1)){this.origin=e,this.direction=n}set(e,n){return this.origin.copy(e),this.direction.copy(n),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,n){return n.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,_u)),this}closestPointToPoint(e,n){n.subVectors(e,this.origin);const i=n.dot(this.direction);return i<0?n.copy(this.origin):n.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const n=_u.subVectors(e,this.origin).dot(this.direction);return n<0?this.origin.distanceToSquared(e):(_u.copy(this.origin).addScaledVector(this.direction,n),_u.distanceToSquared(e))}distanceSqToSegment(e,n,i,s){VE.copy(e).add(n).multiplyScalar(.5),Fb.copy(n).sub(e).normalize(),Rd.copy(this.origin).sub(VE);const r=e.distanceTo(n)*.5,o=-this.direction.dot(Fb),a=Rd.dot(this.direction),l=-Rd.dot(Fb),c=Rd.lengthSq(),u=Math.abs(1-o*o);let d,h,f,p;if(u>0)if(d=o*l-a,h=o*a-l,p=r*u,d>=0)if(h>=-p)if(h<=p){const m=1/u;d*=m,h*=m,f=d*(d+o*h+2*a)+h*(o*d+h+2*l)+c}else h=r,d=Math.max(0,-(o*h+a)),f=-d*d+h*(h+2*l)+c;else h=-r,d=Math.max(0,-(o*h+a)),f=-d*d+h*(h+2*l)+c;else h<=-p?(d=Math.max(0,-(-o*r+a)),h=d>0?-r:Math.min(Math.max(-r,-l),r),f=-d*d+h*(h+2*l)+c):h<=p?(d=0,h=Math.min(Math.max(-r,-l),r),f=h*(h+2*l)+c):(d=Math.max(0,-(o*r+a)),h=d>0?r:Math.min(Math.max(-r,-l),r),f=-d*d+h*(h+2*l)+c);else h=o>0?-r:r,d=Math.max(0,-(o*h+a)),f=-d*d+h*(h+2*l)+c;return i&&i.copy(this.origin).addScaledVector(this.direction,d),s&&s.copy(VE).addScaledVector(Fb,h),f}intersectSphere(e,n){_u.subVectors(e.center,this.origin);const i=_u.dot(this.direction),s=_u.dot(_u)-i*i,r=e.radius*e.radius;if(s>r)return null;const o=Math.sqrt(r-s),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,n):this.at(a,n)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const n=e.normal.dot(this.direction);if(n===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/n;return i>=0?i:null}intersectPlane(e,n){const i=this.distanceToPlane(e);return i===null?null:this.at(i,n)}intersectsPlane(e){const n=e.distanceToPoint(this.origin);return n===0||e.normal.dot(this.direction)*n<0}intersectBox(e,n){let i,s,r,o,a,l;const c=1/this.direction.x,u=1/this.direction.y,d=1/this.direction.z,h=this.origin;return c>=0?(i=(e.min.x-h.x)*c,s=(e.max.x-h.x)*c):(i=(e.max.x-h.x)*c,s=(e.min.x-h.x)*c),u>=0?(r=(e.min.y-h.y)*u,o=(e.max.y-h.y)*u):(r=(e.max.y-h.y)*u,o=(e.min.y-h.y)*u),i>o||r>s||((r>i||isNaN(i))&&(i=r),(o=0?(a=(e.min.z-h.z)*d,l=(e.max.z-h.z)*d):(a=(e.max.z-h.z)*d,l=(e.min.z-h.z)*d),i>l||a>s)||((a>i||i!==i)&&(i=a),(l=0?i:s,n)}intersectsBox(e){return this.intersectBox(e,_u)!==null}intersectTriangle(e,n,i,s,r){HE.subVectors(n,e),zb.subVectors(i,e),WE.crossVectors(HE,zb);let o=this.direction.dot(WE),a;if(o>0){if(s)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Rd.subVectors(this.origin,e);const l=a*this.direction.dot(zb.crossVectors(Rd,zb));if(l<0)return null;const c=a*this.direction.dot(HE.cross(Rd));if(c<0||l+c>o)return null;const u=-a*Rd.dot(WE);return u<0?null:this.at(u/o,r)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class ps{constructor(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b){ps.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b)}set(e,n,i,s,r,o,a,l,c,u,d,h,f,p,m,b){const g=this.elements;return g[0]=e,g[4]=n,g[8]=i,g[12]=s,g[1]=r,g[5]=o,g[9]=a,g[13]=l,g[2]=c,g[6]=u,g[10]=d,g[14]=h,g[3]=f,g[7]=p,g[11]=m,g[15]=b,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new ps().fromArray(this.elements)}copy(e){const n=this.elements,i=e.elements;return n[0]=i[0],n[1]=i[1],n[2]=i[2],n[3]=i[3],n[4]=i[4],n[5]=i[5],n[6]=i[6],n[7]=i[7],n[8]=i[8],n[9]=i[9],n[10]=i[10],n[11]=i[11],n[12]=i[12],n[13]=i[13],n[14]=i[14],n[15]=i[15],this}copyPosition(e){const n=this.elements,i=e.elements;return n[12]=i[12],n[13]=i[13],n[14]=i[14],this}setFromMatrix3(e){const n=e.elements;return this.set(n[0],n[3],n[6],0,n[1],n[4],n[7],0,n[2],n[5],n[8],0,0,0,0,1),this}extractBasis(e,n,i){return e.setFromMatrixColumn(this,0),n.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,n,i){return this.set(e.x,n.x,i.x,0,e.y,n.y,i.y,0,e.z,n.z,i.z,0,0,0,0,1),this}extractRotation(e){const n=this.elements,i=e.elements,s=1/Jp.setFromMatrixColumn(e,0).length(),r=1/Jp.setFromMatrixColumn(e,1).length(),o=1/Jp.setFromMatrixColumn(e,2).length();return n[0]=i[0]*s,n[1]=i[1]*s,n[2]=i[2]*s,n[3]=0,n[4]=i[4]*r,n[5]=i[5]*r,n[6]=i[6]*r,n[7]=0,n[8]=i[8]*o,n[9]=i[9]*o,n[10]=i[10]*o,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromEuler(e){const n=this.elements,i=e.x,s=e.y,r=e.z,o=Math.cos(i),a=Math.sin(i),l=Math.cos(s),c=Math.sin(s),u=Math.cos(r),d=Math.sin(r);if(e.order==="XYZ"){const h=o*u,f=o*d,p=a*u,m=a*d;n[0]=l*u,n[4]=-l*d,n[8]=c,n[1]=f+p*c,n[5]=h-m*c,n[9]=-a*l,n[2]=m-h*c,n[6]=p+f*c,n[10]=o*l}else if(e.order==="YXZ"){const h=l*u,f=l*d,p=c*u,m=c*d;n[0]=h+m*a,n[4]=p*a-f,n[8]=o*c,n[1]=o*d,n[5]=o*u,n[9]=-a,n[2]=f*a-p,n[6]=m+h*a,n[10]=o*l}else if(e.order==="ZXY"){const h=l*u,f=l*d,p=c*u,m=c*d;n[0]=h-m*a,n[4]=-o*d,n[8]=p+f*a,n[1]=f+p*a,n[5]=o*u,n[9]=m-h*a,n[2]=-o*c,n[6]=a,n[10]=o*l}else if(e.order==="ZYX"){const h=o*u,f=o*d,p=a*u,m=a*d;n[0]=l*u,n[4]=p*c-f,n[8]=h*c+m,n[1]=l*d,n[5]=m*c+h,n[9]=f*c-p,n[2]=-c,n[6]=a*l,n[10]=o*l}else if(e.order==="YZX"){const h=o*l,f=o*c,p=a*l,m=a*c;n[0]=l*u,n[4]=m-h*d,n[8]=p*d+f,n[1]=d,n[5]=o*u,n[9]=-a*u,n[2]=-c*u,n[6]=f*d+p,n[10]=h-m*d}else if(e.order==="XZY"){const h=o*l,f=o*c,p=a*l,m=a*c;n[0]=l*u,n[4]=-d,n[8]=c*u,n[1]=h*d+m,n[5]=o*u,n[9]=f*d-p,n[2]=p*d-f,n[6]=a*u,n[10]=m*d+h}return n[3]=0,n[7]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,this}makeRotationFromQuaternion(e){return this.compose(b5e,e,_5e)}lookAt(e,n,i){const s=this.elements;return Ta.subVectors(e,n),Ta.lengthSq()===0&&(Ta.z=1),Ta.normalize(),Od.crossVectors(i,Ta),Od.lengthSq()===0&&(Math.abs(i.z)===1?Ta.x+=1e-4:Ta.z+=1e-4,Ta.normalize(),Od.crossVectors(i,Ta)),Od.normalize(),Ub.crossVectors(Ta,Od),s[0]=Od.x,s[4]=Ub.x,s[8]=Ta.x,s[1]=Od.y,s[5]=Ub.y,s[9]=Ta.y,s[2]=Od.z,s[6]=Ub.z,s[10]=Ta.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,n){const i=e.elements,s=n.elements,r=this.elements,o=i[0],a=i[4],l=i[8],c=i[12],u=i[1],d=i[5],h=i[9],f=i[13],p=i[2],m=i[6],b=i[10],g=i[14],x=i[3],S=i[7],_=i[11],E=i[15],T=s[0],A=s[4],I=s[8],P=s[12],k=s[1],B=s[5],R=s[9],H=s[13],q=s[2],oe=s[6],Z=s[10],V=s[14],D=s[3],K=s[7],W=s[11],Q=s[15];return r[0]=o*T+a*k+l*q+c*D,r[4]=o*A+a*B+l*oe+c*K,r[8]=o*I+a*R+l*Z+c*W,r[12]=o*P+a*H+l*V+c*Q,r[1]=u*T+d*k+h*q+f*D,r[5]=u*A+d*B+h*oe+f*K,r[9]=u*I+d*R+h*Z+f*W,r[13]=u*P+d*H+h*V+f*Q,r[2]=p*T+m*k+b*q+g*D,r[6]=p*A+m*B+b*oe+g*K,r[10]=p*I+m*R+b*Z+g*W,r[14]=p*P+m*H+b*V+g*Q,r[3]=x*T+S*k+_*q+E*D,r[7]=x*A+S*B+_*oe+E*K,r[11]=x*I+S*R+_*Z+E*W,r[15]=x*P+S*H+_*V+E*Q,this}multiplyScalar(e){const n=this.elements;return n[0]*=e,n[4]*=e,n[8]*=e,n[12]*=e,n[1]*=e,n[5]*=e,n[9]*=e,n[13]*=e,n[2]*=e,n[6]*=e,n[10]*=e,n[14]*=e,n[3]*=e,n[7]*=e,n[11]*=e,n[15]*=e,this}determinant(){const e=this.elements,n=e[0],i=e[4],s=e[8],r=e[12],o=e[1],a=e[5],l=e[9],c=e[13],u=e[2],d=e[6],h=e[10],f=e[14],p=e[3],m=e[7],b=e[11],g=e[15];return p*(+r*l*d-s*c*d-r*a*h+i*c*h+s*a*f-i*l*f)+m*(+n*l*f-n*c*h+r*o*h-s*o*f+s*c*u-r*l*u)+b*(+n*c*d-n*a*f-r*o*d+i*o*f+r*a*u-i*c*u)+g*(-s*a*u-n*l*d+n*a*h+s*o*d-i*o*h+i*l*u)}transpose(){const e=this.elements;let n;return n=e[1],e[1]=e[4],e[4]=n,n=e[2],e[2]=e[8],e[8]=n,n=e[6],e[6]=e[9],e[9]=n,n=e[3],e[3]=e[12],e[12]=n,n=e[7],e[7]=e[13],e[13]=n,n=e[11],e[11]=e[14],e[14]=n,this}setPosition(e,n,i){const s=this.elements;return e.isVector3?(s[12]=e.x,s[13]=e.y,s[14]=e.z):(s[12]=e,s[13]=n,s[14]=i),this}invert(){const e=this.elements,n=e[0],i=e[1],s=e[2],r=e[3],o=e[4],a=e[5],l=e[6],c=e[7],u=e[8],d=e[9],h=e[10],f=e[11],p=e[12],m=e[13],b=e[14],g=e[15],x=d*b*c-m*h*c+m*l*f-a*b*f-d*l*g+a*h*g,S=p*h*c-u*b*c-p*l*f+o*b*f+u*l*g-o*h*g,_=u*m*c-p*d*c+p*a*f-o*m*f-u*a*g+o*d*g,E=p*d*l-u*m*l-p*a*h+o*m*h+u*a*b-o*d*b,T=n*x+i*S+s*_+r*E;if(T===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/T;return e[0]=x*A,e[1]=(m*h*r-d*b*r-m*s*f+i*b*f+d*s*g-i*h*g)*A,e[2]=(a*b*r-m*l*r+m*s*c-i*b*c-a*s*g+i*l*g)*A,e[3]=(d*l*r-a*h*r-d*s*c+i*h*c+a*s*f-i*l*f)*A,e[4]=S*A,e[5]=(u*b*r-p*h*r+p*s*f-n*b*f-u*s*g+n*h*g)*A,e[6]=(p*l*r-o*b*r-p*s*c+n*b*c+o*s*g-n*l*g)*A,e[7]=(o*h*r-u*l*r+u*s*c-n*h*c-o*s*f+n*l*f)*A,e[8]=_*A,e[9]=(p*d*r-u*m*r-p*i*f+n*m*f+u*i*g-n*d*g)*A,e[10]=(o*m*r-p*a*r+p*i*c-n*m*c-o*i*g+n*a*g)*A,e[11]=(u*a*r-o*d*r-u*i*c+n*d*c+o*i*f-n*a*f)*A,e[12]=E*A,e[13]=(u*m*s-p*d*s+p*i*h-n*m*h-u*i*b+n*d*b)*A,e[14]=(p*a*s-o*m*s-p*i*l+n*m*l+o*i*b-n*a*b)*A,e[15]=(o*d*s-u*a*s+u*i*l-n*d*l-o*i*h+n*a*h)*A,this}scale(e){const n=this.elements,i=e.x,s=e.y,r=e.z;return n[0]*=i,n[4]*=s,n[8]*=r,n[1]*=i,n[5]*=s,n[9]*=r,n[2]*=i,n[6]*=s,n[10]*=r,n[3]*=i,n[7]*=s,n[11]*=r,this}getMaxScaleOnAxis(){const e=this.elements,n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],s=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(n,i,s))}makeTranslation(e,n,i){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,n,0,0,1,i,0,0,0,1),this}makeRotationX(e){const n=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,n,-i,0,0,i,n,0,0,0,0,1),this}makeRotationY(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,0,i,0,0,1,0,0,-i,0,n,0,0,0,0,1),this}makeRotationZ(e){const n=Math.cos(e),i=Math.sin(e);return this.set(n,-i,0,0,i,n,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,n){const i=Math.cos(n),s=Math.sin(n),r=1-i,o=e.x,a=e.y,l=e.z,c=r*o,u=r*a;return this.set(c*o+i,c*a-s*l,c*l+s*a,0,c*a+s*l,u*a+i,u*l-s*o,0,c*l-s*a,u*l+s*o,r*l*l+i,0,0,0,0,1),this}makeScale(e,n,i){return this.set(e,0,0,0,0,n,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,n,i,s,r,o){return this.set(1,i,r,0,e,1,o,0,n,s,1,0,0,0,0,1),this}compose(e,n,i){const s=this.elements,r=n._x,o=n._y,a=n._z,l=n._w,c=r+r,u=o+o,d=a+a,h=r*c,f=r*u,p=r*d,m=o*u,b=o*d,g=a*d,x=l*c,S=l*u,_=l*d,E=i.x,T=i.y,A=i.z;return s[0]=(1-(m+g))*E,s[1]=(f+_)*E,s[2]=(p-S)*E,s[3]=0,s[4]=(f-_)*T,s[5]=(1-(h+g))*T,s[6]=(b+x)*T,s[7]=0,s[8]=(p+S)*A,s[9]=(b-x)*A,s[10]=(1-(h+m))*A,s[11]=0,s[12]=e.x,s[13]=e.y,s[14]=e.z,s[15]=1,this}decompose(e,n,i){const s=this.elements;let r=Jp.set(s[0],s[1],s[2]).length();const o=Jp.set(s[4],s[5],s[6]).length(),a=Jp.set(s[8],s[9],s[10]).length();this.determinant()<0&&(r=-r),e.x=s[12],e.y=s[13],e.z=s[14],El.copy(this);const c=1/r,u=1/o,d=1/a;return El.elements[0]*=c,El.elements[1]*=c,El.elements[2]*=c,El.elements[4]*=u,El.elements[5]*=u,El.elements[6]*=u,El.elements[8]*=d,El.elements[9]*=d,El.elements[10]*=d,n.setFromRotationMatrix(El),i.x=r,i.y=o,i.z=a,this}makePerspective(e,n,i,s,r,o,a=zu){const l=this.elements,c=2*r/(n-e),u=2*r/(i-s),d=(n+e)/(n-e),h=(i+s)/(i-s);let f,p;if(a===zu)f=-(o+r)/(o-r),p=-2*o*r/(o-r);else if(a===A2)f=-o/(o-r),p=-o*r/(o-r);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=c,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=u,l[9]=h,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,n,i,s,r,o,a=zu){const l=this.elements,c=1/(n-e),u=1/(i-s),d=1/(o-r),h=(n+e)*c,f=(i+s)*u;let p,m;if(a===zu)p=(o+r)*d,m=-2*d;else if(a===A2)p=r*d,m=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-h,l[1]=0,l[5]=2*u,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=m,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const n=this.elements,i=e.elements;for(let s=0;s<16;s++)if(n[s]!==i[s])return!1;return!0}fromArray(e,n=0){for(let i=0;i<16;i++)this.elements[i]=e[i+n];return this}toArray(e=[],n=0){const i=this.elements;return e[n]=i[0],e[n+1]=i[1],e[n+2]=i[2],e[n+3]=i[3],e[n+4]=i[4],e[n+5]=i[5],e[n+6]=i[6],e[n+7]=i[7],e[n+8]=i[8],e[n+9]=i[9],e[n+10]=i[10],e[n+11]=i[11],e[n+12]=i[12],e[n+13]=i[13],e[n+14]=i[14],e[n+15]=i[15],e}}const Jp=new ct,El=new ps,b5e=new ct(0,0,0),_5e=new ct(1,1,1),Od=new ct,Ub=new ct,Ta=new ct,iR=new ps,sR=new Ah;class Xc{constructor(e=0,n=0,i=0,s=Xc.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=i,this._order=s}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,n,i,s=this._order){return this._x=e,this._y=n,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,n=this._order,i=!0){const s=e.elements,r=s[0],o=s[4],a=s[8],l=s[1],c=s[5],u=s[9],d=s[2],h=s[6],f=s[10];switch(n){case"XYZ":this._y=Math.asin($i(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,f),this._z=Math.atan2(-o,r)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-$i(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-d,r),this._z=0);break;case"ZXY":this._x=Math.asin($i(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-d,f),this._z=Math.atan2(-o,c)):(this._y=0,this._z=Math.atan2(l,r));break;case"ZYX":this._y=Math.asin(-$i(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(h,f),this._z=Math.atan2(l,r)):(this._x=0,this._z=Math.atan2(-o,c));break;case"YZX":this._z=Math.asin($i(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-d,r)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-$i(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-u,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,i){return iR.makeRotationFromQuaternion(e),this.setFromRotationMatrix(iR,n,i)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return sR.setFromEuler(this),this.setFromQuaternion(sR,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Xc.DEFAULT_ORDER="XYZ";class nP{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let n=0;n1){for(let i=0;i0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(s.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),this.boundingBox!==null&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()}));function r(a,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(s.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const l=a.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c0){s.children=[];for(let a=0;a0){s.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),u.length>0&&(i.images=u),d.length>0&&(i.shapes=d),h.length>0&&(i.skeletons=h),f.length>0&&(i.animations=f),p.length>0&&(i.nodes=p)}return i.object=s,i;function o(a){const l=[];for(const c in a){const u=a[c];delete u.metadata,l.push(u)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let i=0;i0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(e,n,i,s,r){Cl.subVectors(s,n),xu.subVectors(i,n),jE.subVectors(e,n);const o=Cl.dot(Cl),a=Cl.dot(xu),l=Cl.dot(jE),c=xu.dot(xu),u=xu.dot(jE),d=o*c-a*a;if(d===0)return r.set(0,0,0),null;const h=1/d,f=(c*l-a*u)*h,p=(o*u-a*l)*h;return r.set(1-f-p,p,f)}static containsPoint(e,n,i,s){return this.getBarycoord(e,n,i,s,Su)===null?!1:Su.x>=0&&Su.y>=0&&Su.x+Su.y<=1}static getInterpolation(e,n,i,s,r,o,a,l){return this.getBarycoord(e,n,i,s,Su)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(r,Su.x),l.addScaledVector(o,Su.y),l.addScaledVector(a,Su.z),l)}static getInterpolatedAttribute(e,n,i,s,r,o){return XE.setScalar(0),ZE.setScalar(0),JE.setScalar(0),XE.fromBufferAttribute(e,n),ZE.fromBufferAttribute(e,i),JE.fromBufferAttribute(e,s),o.setScalar(0),o.addScaledVector(XE,r.x),o.addScaledVector(ZE,r.y),o.addScaledVector(JE,r.z),o}static isFrontFacing(e,n,i,s){return Cl.subVectors(i,n),xu.subVectors(e,n),Cl.cross(xu).dot(s)<0}set(e,n,i){return this.a.copy(e),this.b.copy(n),this.c.copy(i),this}setFromPointsAndIndices(e,n,i,s){return this.a.copy(e[n]),this.b.copy(e[i]),this.c.copy(e[s]),this}setFromAttributeAndIndices(e,n,i,s){return this.a.fromBufferAttribute(e,n),this.b.fromBufferAttribute(e,i),this.c.fromBufferAttribute(e,s),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Cl.subVectors(this.c,this.b),xu.subVectors(this.a,this.b),Cl.cross(xu).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return tl.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,n){return tl.getBarycoord(e,this.a,this.b,this.c,n)}getInterpolation(e,n,i,s,r){return tl.getInterpolation(e,this.a,this.b,this.c,n,i,s,r)}containsPoint(e){return tl.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return tl.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,n){const i=this.a,s=this.b,r=this.c;let o,a;tm.subVectors(s,i),nm.subVectors(r,i),KE.subVectors(e,i);const l=tm.dot(KE),c=nm.dot(KE);if(l<=0&&c<=0)return n.copy(i);qE.subVectors(e,s);const u=tm.dot(qE),d=nm.dot(qE);if(u>=0&&d<=u)return n.copy(s);const h=l*d-u*c;if(h<=0&&l>=0&&u<=0)return o=l/(l-u),n.copy(i).addScaledVector(tm,o);YE.subVectors(e,r);const f=tm.dot(YE),p=nm.dot(YE);if(p>=0&&f<=p)return n.copy(r);const m=f*c-l*p;if(m<=0&&c>=0&&p<=0)return a=c/(c-p),n.copy(i).addScaledVector(nm,a);const b=u*p-f*d;if(b<=0&&d-u>=0&&f-p>=0)return uR.subVectors(r,s),a=(d-u)/(d-u+(f-p)),n.copy(s).addScaledVector(uR,a);const g=1/(b+m+h);return o=m*g,a=h*g,n.copy(i).addScaledVector(tm,o).addScaledVector(nm,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const xG={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Dd={h:0,s:0,l:0},Vb={h:0,s:0,l:0};function QE(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*6*(2/3-n):t}class Wi{constructor(e,n,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,n,i)}set(e,n,i){if(n===void 0&&i===void 0){const s=e;s&&s.isColor?this.copy(s):typeof s=="number"?this.setHex(s):typeof s=="string"&&this.setStyle(s)}else this.setRGB(e,n,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,n=Pa){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ss.toWorkingColorSpace(this,n),this}setRGB(e,n,i,s=ss.workingColorSpace){return this.r=e,this.g=n,this.b=i,ss.toWorkingColorSpace(this,s),this}setHSL(e,n,i,s=ss.workingColorSpace){if(e=tP(e,1),n=$i(n,0,1),i=$i(i,0,1),n===0)this.r=this.g=this.b=i;else{const r=i<=.5?i*(1+n):i+n-i*n,o=2*i-r;this.r=QE(o,r,e+1/3),this.g=QE(o,r,e),this.b=QE(o,r,e-1/3)}return ss.toWorkingColorSpace(this,s),this}setStyle(e,n=Pa){function i(r){r!==void 0&&parseFloat(r)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let s;if(s=/^(\w+)\(([^\)]*)\)/.exec(e)){let r;const o=s[1],a=s[2];switch(o){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,n);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,n);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,n);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(s=/^\#([A-Fa-f\d]+)$/.exec(e)){const r=s[1],o=r.length;if(o===3)return this.setRGB(parseInt(r.charAt(0),16)/15,parseInt(r.charAt(1),16)/15,parseInt(r.charAt(2),16)/15,n);if(o===6)return this.setHex(parseInt(r,16),n);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,n);return this}setColorName(e,n=Pa){const i=xG[e.toLowerCase()];return i!==void 0?this.setHex(i,n):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=qu(e.r),this.g=qu(e.g),this.b=qu(e.b),this}copyLinearToSRGB(e){return this.r=Ym(e.r),this.g=Ym(e.g),this.b=Ym(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Pa){return ss.fromWorkingColorSpace(co.copy(this),e),Math.round($i(co.r*255,0,255))*65536+Math.round($i(co.g*255,0,255))*256+Math.round($i(co.b*255,0,255))}getHexString(e=Pa){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,n=ss.workingColorSpace){ss.fromWorkingColorSpace(co.copy(this),n);const i=co.r,s=co.g,r=co.b,o=Math.max(i,s,r),a=Math.min(i,s,r);let l,c;const u=(a+o)/2;if(a===o)l=0,c=0;else{const d=o-a;switch(c=u<=.5?d/(o+a):d/(2-o-a),o){case i:l=(s-r)/d+(s0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const n in e){const i=e[n];if(i===void 0){console.warn(`THREE.Material: parameter '${n}' has value of undefined.`);continue}const s=this[n];if(s===void 0){console.warn(`THREE.Material: '${n}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[n]=i}}toJSON(e){const n=e===void 0||typeof e=="string";n&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==Km&&(i.blending=this.blending),this.side!==Mh&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==NM&&(i.blendSrc=this.blendSrc),this.blendDst!==BM&&(i.blendDst=this.blendDst),this.blendEquation!==mf&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==wg&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==X5&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Kp&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Kp&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Kp&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function s(r){const o=[];for(const a in r){const l=r[a];delete l.metadata,o.push(l)}return o}if(n){const r=s(e.textures),o=s(e.images);r.length>0&&(i.textures=r),o.length>0&&(i.images=o)}return i}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const n=e.clippingPlanes;let i=null;if(n!==null){const s=n.length;i=new Array(s);for(let r=0;r!==s;++r)i[r]=n[r].clone()}return this.clippingPlanes=i,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class v1 extends Rh{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Wi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Xc,this.combine=oG,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapRotation.copy(e.envMapRotation),this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const yr=new ct,Hb=new vn;class us{constructor(e,n,i=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=n,this.count=e!==void 0?e.length/n:0,this.normalized=i,this.usage=w3,this.updateRanges=[],this.gpuType=Fu,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,n,i){e*=this.itemSize,i*=n.itemSize;for(let s=0,r=this.itemSize;sn.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),n.needsUpdate=!0}return this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Gs);const e=this.attributes.position,n=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new ct(-1/0,-1/0,-1/0),new ct(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),n)for(let i=0,s=n.length;i0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const c in l)l[c]!==void 0&&(e[c]=l[c]);return e}e.data={attributes:{}};const n=this.index;n!==null&&(e.data.index={type:n.array.constructor.name,array:Array.prototype.slice.call(n.array)});const i=this.attributes;for(const l in i){const c=i[l];e.data.attributes[l]=c.toJSON(e.data)}const s={};let r=!1;for(const l in this.morphAttributes){const c=this.morphAttributes[l],u=[];for(let d=0,h=c.length;d0&&(s[l]=u,r=!0)}r&&(e.data.morphAttributes=s,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const n={};this.name=e.name;const i=e.index;i!==null&&this.setIndex(i.clone(n));const s=e.attributes;for(const c in s){const u=s[c];this.setAttribute(c,u.clone(n))}const r=e.morphAttributes;for(const c in r){const u=[],d=r[c];for(let h=0,f=d.length;h0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;r(e.far-e.near)**2))&&(dR.copy(r).invert(),Jh.copy(e.ray).applyMatrix4(dR),!(i.boundingBox!==null&&Jh.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,n,Jh)))}_computeIntersections(e,n,i){let s;const r=this.geometry,o=this.material,a=r.index,l=r.attributes.position,c=r.attributes.uv,u=r.attributes.uv1,d=r.attributes.normal,h=r.groups,f=r.drawRange;if(a!==null)if(Array.isArray(o))for(let p=0,m=h.length;pn.far?null:{distance:c,point:Yb.clone(),object:t}}function Xb(t,e,n,i,s,r,o,a,l,c){t.getVertexPosition(a,Gb),t.getVertexPosition(l,jb),t.getVertexPosition(c,Kb);const u=M5e(t,e,n,i,Gb,jb,Kb,fR);if(u){const d=new ct;tl.getBarycoord(fR,Gb,jb,Kb,d),s&&(u.uv=tl.getInterpolatedAttribute(s,a,l,c,d,new vn)),r&&(u.uv1=tl.getInterpolatedAttribute(r,a,l,c,d,new vn)),o&&(u.normal=tl.getInterpolatedAttribute(o,a,l,c,d,new ct),u.normal.dot(i.direction)>0&&u.normal.multiplyScalar(-1));const h={a,b:l,c,normal:new ct,materialIndex:0};tl.getNormal(Gb,jb,Kb,h.normal),u.face=h,u.barycoord=d}return u}class y1 extends es{constructor(e=1,n=1,i=1,s=1,r=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:n,depth:i,widthSegments:s,heightSegments:r,depthSegments:o};const a=this;s=Math.floor(s),r=Math.floor(r),o=Math.floor(o);const l=[],c=[],u=[],d=[];let h=0,f=0;p("z","y","x",-1,-1,i,n,e,o,r,0),p("z","y","x",1,-1,i,n,-e,o,r,1),p("x","z","y",1,1,e,i,n,s,o,2),p("x","z","y",1,-1,e,i,-n,s,o,3),p("x","y","z",1,-1,e,n,i,s,r,4),p("x","y","z",-1,-1,e,n,-i,s,r,5),this.setIndex(l),this.setAttribute("position",new Qr(c,3)),this.setAttribute("normal",new Qr(u,3)),this.setAttribute("uv",new Qr(d,2));function p(m,b,g,x,S,_,E,T,A,I,P){const k=_/A,B=E/I,R=_/2,H=E/2,q=T/2,oe=A+1,Z=I+1;let V=0,D=0;const K=new ct;for(let W=0;W0?1:-1,u.push(K.x,K.y,K.z),d.push(ie/A),d.push(1-W/I),V+=1}}for(let W=0;W0&&(n.defines=this.defines),n.vertexShader=this.vertexShader,n.fragmentShader=this.fragmentShader,n.lights=this.lights,n.clipping=this.clipping;const i={};for(const s in this.extensions)this.extensions[s]===!0&&(i[s]=!0);return Object.keys(i).length>0&&(n.extensions=i),n}}class CG extends Lr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new ps,this.projectionMatrix=new ps,this.projectionMatrixInverse=new ps,this.coordinateSystem=zu}copy(e,n){return super.copy(e,n),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,n){super.updateWorldMatrix(e,n),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}const Nd=new ct,pR=new vn,mR=new vn;class Al extends CG{constructor(e=50,n=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=n,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const n=.5*this.getFilmHeight()/e;this.fov=uy*2*Math.atan(n),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(w0*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return uy*2*Math.atan(Math.tan(w0*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,n,i){Nd.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Nd.x,Nd.y).multiplyScalar(-e/Nd.z),Nd.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(Nd.x,Nd.y).multiplyScalar(-e/Nd.z)}getViewSize(e,n){return this.getViewBounds(e,pR,mR),n.subVectors(mR,pR)}setViewOffset(e,n,i,s,r,o){this.aspect=e/n,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let n=e*Math.tan(w0*.5*this.fov)/this.zoom,i=2*n,s=this.aspect*i,r=-.5*s;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,c=o.fullHeight;r+=o.offsetX*s/l,n-=o.offsetY*i/c,s*=o.width/l,i*=o.height/c}const a=this.filmOffset;a!==0&&(r+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,n,n-i,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.fov=this.fov,n.object.zoom=this.zoom,n.object.near=this.near,n.object.far=this.far,n.object.focus=this.focus,n.object.aspect=this.aspect,this.view!==null&&(n.object.view=Object.assign({},this.view)),n.object.filmGauge=this.filmGauge,n.object.filmOffset=this.filmOffset,n}}const sm=-90,rm=1;class L5e extends Lr{constructor(e,n,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const s=new Al(sm,rm,e,n);s.layers=this.layers,this.add(s);const r=new Al(sm,rm,e,n);r.layers=this.layers,this.add(r);const o=new Al(sm,rm,e,n);o.layers=this.layers,this.add(o);const a=new Al(sm,rm,e,n);a.layers=this.layers,this.add(a);const l=new Al(sm,rm,e,n);l.layers=this.layers,this.add(l);const c=new Al(sm,rm,e,n);c.layers=this.layers,this.add(c)}updateCoordinateSystem(){const e=this.coordinateSystem,n=this.children.concat(),[i,s,r,o,a,l]=n;for(const c of n)this.remove(c);if(e===zu)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===A2)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const c of n)this.add(c),c.updateMatrixWorld()}update(e,n){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,o,a,l,c,u]=this.children,d=e.getRenderTarget(),h=e.getActiveCubeFace(),f=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,s),e.render(n,r),e.setRenderTarget(i,1,s),e.render(n,o),e.setRenderTarget(i,2,s),e.render(n,a),e.setRenderTarget(i,3,s),e.render(n,l),e.setRenderTarget(i,4,s),e.render(n,c),i.texture.generateMipmaps=m,e.setRenderTarget(i,5,s),e.render(n,u),e.setRenderTarget(d,h,f),e.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class TG extends Eo{constructor(e,n,i,s,r,o,a,l,c,u){e=e!==void 0?e:[],n=n!==void 0?n:xg,super(e,n,i,s,r,o,a,l,c,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class I5e extends np{constructor(e=1,n={}){super(e,e,n),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},s=[i,i,i,i,i,i];this.texture=new TG(s,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Rl}fromEquirectangularTexture(e,n){this.texture.type=n.type,this.texture.colorSpace=n.colorSpace,this.texture.generateMipmaps=n.generateMipmaps,this.texture.minFilter=n.minFilter,this.texture.magFilter=n.magFilter;const i={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include } `,fragmentShader:` uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); } `},s=new y1(5,5,5),r=new Yl({name:"CubemapFromEquirect",uniforms:Mg(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:ma,blending:fh});r.uniforms.tEquirect.value=n;const o=new xr(s,r),a=n.minFilter;return n.minFilter===kf&&(n.minFilter=Rl),new L5e(1,10,this).update(e,o),n.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,n,i,s){const r=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(n,i,s);e.setRenderTarget(r)}}class R5e extends Lr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Xc,this.environmentIntensity=1,this.environmentRotation=new Xc,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,n){return super.copy(e,n),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const n=super.toJSON(e);return this.fog!==null&&(n.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(n.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(n.object.backgroundIntensity=this.backgroundIntensity),n.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(n.object.environmentIntensity=this.environmentIntensity),n.object.environmentRotation=this.environmentRotation.toArray(),n}}class O5e{constructor(e,n){this.isInterleavedBuffer=!0,this.array=e,this.stride=n,this.count=e!==void 0?e.length/n:0,this.usage=w3,this.updateRanges=[],this.version=0,this.uuid=zc()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,n){this.updateRanges.push({start:e,count:n})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,n,i){e*=this.stride,i*=n.stride;for(let s=0,r=this.stride;se.far||n.push({distance:l,point:Mv.clone(),uv:tl.getInterpolation(Mv,Zb,kv,Jb,gR,nC,vR,new vn),face:null,object:this})}copy(e,n){return super.copy(e,n),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function Qb(t,e,n,i,s,r){cm.subVectors(t,n).addScalar(.5).multiply(i),s!==void 0?(Av.x=r*cm.x-s*cm.y,Av.y=s*cm.x+r*cm.y):Av.copy(cm),t.copy(e),t.x+=Av.x,t.y+=Av.y,t.applyMatrix4(AG)}const iC=new ct,N5e=new ct,B5e=new Ii;class Qd{constructor(e=new ct(1,0,0),n=0){this.isPlane=!0,this.normal=e,this.constant=n}set(e,n){return this.normal.copy(e),this.constant=n,this}setComponents(e,n,i,s){return this.normal.set(e,n,i),this.constant=s,this}setFromNormalAndCoplanarPoint(e,n){return this.normal.copy(e),this.constant=-n.dot(this.normal),this}setFromCoplanarPoints(e,n,i){const s=iC.subVectors(i,n).cross(N5e.subVectors(e,n)).normalize();return this.setFromNormalAndCoplanarPoint(s,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,n){return n.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,n){const i=e.delta(iC),s=this.normal.dot(i);if(s===0)return this.distanceToPoint(e.start)===0?n.copy(e.start):null;const r=-(e.start.dot(this.normal)+this.constant)/s;return r<0||r>1?null:n.copy(e.start).addScaledVector(i,r)}intersectsLine(e){const n=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return n<0&&i>0||i<0&&n>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,n){const i=n||B5e.getNormalMatrix(e),s=this.coplanarPoint(iC).applyMatrix4(e),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}}const Qh=new ga,e_=new ct;class kG{constructor(e=new Qd,n=new Qd,i=new Qd,s=new Qd,r=new Qd,o=new Qd){this.planes=[e,n,i,s,r,o]}set(e,n,i,s,r,o){const a=this.planes;return a[0].copy(e),a[1].copy(n),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(o),this}copy(e){const n=this.planes;for(let i=0;i<6;i++)n[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,n=zu){const i=this.planes,s=e.elements,r=s[0],o=s[1],a=s[2],l=s[3],c=s[4],u=s[5],d=s[6],h=s[7],f=s[8],p=s[9],m=s[10],b=s[11],g=s[12],x=s[13],S=s[14],_=s[15];if(i[0].setComponents(l-r,h-c,b-f,_-g).normalize(),i[1].setComponents(l+r,h+c,b+f,_+g).normalize(),i[2].setComponents(l+o,h+u,b+p,_+x).normalize(),i[3].setComponents(l-o,h-u,b-p,_-x).normalize(),i[4].setComponents(l-a,h-d,b-m,_-S).normalize(),n===zu)i[5].setComponents(l+a,h+d,b+m,_+S).normalize();else if(n===A2)i[5].setComponents(a,d,m,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+n);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Qh.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const n=e.geometry;n.boundingSphere===null&&n.computeBoundingSphere(),Qh.copy(n.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Qh)}intersectsSprite(e){return Qh.center.set(0,0,0),Qh.radius=.7071067811865476,Qh.applyMatrix4(e.matrixWorld),this.intersectsSphere(Qh)}intersectsSphere(e){const n=this.planes,i=e.center,s=-e.radius;for(let r=0;r<6;r++)if(n[r].distanceToPoint(i)0?e.max.x:e.min.x,e_.y=s.normal.y>0?e.max.y:e.min.y,e_.z=s.normal.z>0?e.max.z:e.min.z,s.distanceToPoint(e_)<0)return!1}return!0}containsPoint(e){const n=this.planes;for(let i=0;i<6;i++)if(n[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}class iS extends Rh{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Wi(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const k2=new ct,P2=new ct,yR=new ps,Pv=new g1,t_=new ga,sC=new ct,bR=new ct;class L2 extends Lr{constructor(e=new es,n=new iS){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=n,this.updateMorphTargets()}copy(e,n){return super.copy(e,n),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[0];for(let s=1,r=n.count;s0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;ri)return;sC.applyMatrix4(t.matrixWorld);const l=e.ray.origin.distanceTo(sC);if(!(le.far))return{distance:l,point:bR.clone().applyMatrix4(t.matrixWorld),index:s,face:null,faceIndex:null,barycoord:null,object:t}}const _R=new ct,wR=new ct;class Zc extends L2{constructor(e,n){super(e,n),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const n=e.attributes.position,i=[];for(let s=0,r=n.count;s0){const s=n[i[0]];if(s!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let r=0,o=s.length;rs.far)return;r.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class sl extends Lr{constructor(){super(),this.isGroup=!0,this.type="Group"}}class LG extends Eo{constructor(e,n,i,s,r,o,a,l,c,u=qm){if(u!==qm&&u!==Cg)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");i===void 0&&u===qm&&(i=tp),i===void 0&&u===Cg&&(i=Eg),super(null,s,r,o,a,l,u,i,c),this.isDepthTexture=!0,this.image={width:e,height:n},this.magFilter=a!==void 0?a:Ul,this.minFilter=l!==void 0?l:Ul,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const n=super.toJSON(e);return this.compareFunction!==null&&(n.compareFunction=this.compareFunction),n}}class nu{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,n){const i=this.getUtoTmapping(e);return this.getPoint(i,n)}getPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPoint(i/e));return n}getSpacedPoints(e=5){const n=[];for(let i=0;i<=e;i++)n.push(this.getPointAt(i/e));return n}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const n=[];let i,s=this.getPoint(0),r=0;n.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),r+=i.distanceTo(s),n.push(r),s=i;return this.cacheArcLengths=n,n}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,n){const i=this.getLengths();let s=0;const r=i.length;let o;n?o=n:o=e*i[r-1];let a=0,l=r-1,c;for(;a<=l;)if(s=Math.floor(a+(l-a)/2),c=i[s]-o,c<0)a=s+1;else if(c>0)l=s-1;else{l=s;break}if(s=l,i[s]===o)return s/(r-1);const u=i[s],h=i[s+1]-u,f=(o-u)/h;return(s+f)/(r-1)}getTangent(e,n){let s=e-1e-4,r=e+1e-4;s<0&&(s=0),r>1&&(r=1);const o=this.getPoint(s),a=this.getPoint(r),l=n||(o.isVector2?new vn:new ct);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,n){const i=this.getUtoTmapping(e);return this.getTangent(i,n)}computeFrenetFrames(e,n){const i=new ct,s=[],r=[],o=[],a=new ct,l=new ps;for(let f=0;f<=e;f++){const p=f/e;s[f]=this.getTangentAt(p,new ct)}r[0]=new ct,o[0]=new ct;let c=Number.MAX_VALUE;const u=Math.abs(s[0].x),d=Math.abs(s[0].y),h=Math.abs(s[0].z);u<=c&&(c=u,i.set(1,0,0)),d<=c&&(c=d,i.set(0,1,0)),h<=c&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),o[0].crossVectors(s[0],r[0]);for(let f=1;f<=e;f++){if(r[f]=r[f-1].clone(),o[f]=o[f-1].clone(),a.crossVectors(s[f-1],s[f]),a.length()>Number.EPSILON){a.normalize();const p=Math.acos($i(s[f-1].dot(s[f]),-1,1));r[f].applyMatrix4(l.makeRotationAxis(a,p))}o[f].crossVectors(s[f],r[f])}if(n===!0){let f=Math.acos($i(r[0].dot(r[e]),-1,1));f/=e,s[0].dot(a.crossVectors(r[0],r[e]))>0&&(f=-f);for(let p=1;p<=e;p++)r[p].applyMatrix4(l.makeRotationAxis(s[p],f*p)),o[p].crossVectors(s[p],r[p])}return{tangents:s,normals:r,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class fy extends nu{constructor(e=0,n=0,i=1,s=1,r=0,o=Math.PI*2,a=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=n,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=o,this.aClockwise=a,this.aRotation=l}getPoint(e,n=new vn){const i=n,s=Math.PI*2;let r=this.aEndAngle-this.aStartAngle;const o=Math.abs(r)s;)r-=s;r0?0:(Math.floor(Math.abs(a)/r)+1)*r:l===0&&a===r-1&&(a=r-2,l=1);let c,u;this.closed||a>0?c=s[(a-1)%r]:(r_.subVectors(s[0],s[1]).add(s[0]),c=r_);const d=s[a%r],h=s[(a+1)%r];if(this.closed||a+2s.length-2?s.length-1:o+1],d=s[o>s.length-3?s.length-1:o+2];return i.set(ER(a,l.x,c.x,u.x,d.x),ER(a,l.y,c.y,u.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let n=0,i=e.points.length;n=i){const o=s[r]-i,a=this.curves[r],l=a.getLength(),c=l===0?0:1-o/l;return a.getPointAt(c,n)}r++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let n=0;for(let i=0,s=this.curves.length;i1&&!n[n.length-1].equals(n[0])&&n.push(n[0]),n}copy(e){super.copy(e),this.curves=[];for(let n=0,i=e.curves.length;n0){const d=c.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(c);const u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Yu extends py{constructor(e){super(e),this.uuid=zc(),this.type="Shape",this.holes=[]}getPointsHoles(e){const n=[];for(let i=0,s=this.holes.length;i80*n){a=c=t[0],l=u=t[1];for(let p=n;pc&&(c=d),h>u&&(u=h);f=Math.max(c-a,u-l),f=f!==0?32767/f:0}return my(r,o,n,a,l,f,0),o}};function RG(t,e,n,i,s){let r,o;if(s===fRe(t,e,n,i)>0)for(r=e;r=e;r-=i)o=TR(r,t[r],t[r+1],o);return o&&sS(o,o.next)&&(vy(o),o=o.next),o}function sp(t,e){if(!t)return t;e||(e=t);let n=t,i;do if(i=!1,!n.steiner&&(sS(n,n.next)||Js(n.prev,n,n.next)===0)){if(vy(n),n=e=n.prev,n===n.next)break;i=!0}else n=n.next;while(i||n!==e);return e}function my(t,e,n,i,s,r,o){if(!t)return;!o&&r&&aRe(t,i,s,r);let a=t,l,c;for(;t.prev!==t.next;){if(l=t.prev,c=t.next,r?Q5e(t,i,s,r):J5e(t)){e.push(l.i/n|0),e.push(t.i/n|0),e.push(c.i/n|0),vy(t),t=c.next,a=c.next;continue}if(t=c,t===a){o?o===1?(t=eRe(sp(t),e,n),my(t,e,n,i,s,r,2)):o===2&&tRe(t,e,n,i,s,r):my(sp(t),e,n,i,s,r,1);break}}}function J5e(t){const e=t.prev,n=t,i=t.next;if(Js(e,n,i)>=0)return!1;const s=e.x,r=n.x,o=i.x,a=e.y,l=n.y,c=i.y,u=sr?s>o?s:o:r>o?r:o,f=a>l?a>c?a:c:l>c?l:c;let p=i.next;for(;p!==e;){if(p.x>=u&&p.x<=h&&p.y>=d&&p.y<=f&&Om(s,a,r,l,o,c,p.x,p.y)&&Js(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function Q5e(t,e,n,i){const s=t.prev,r=t,o=t.next;if(Js(s,r,o)>=0)return!1;const a=s.x,l=r.x,c=o.x,u=s.y,d=r.y,h=o.y,f=al?a>c?a:c:l>c?l:c,b=u>d?u>h?u:h:d>h?d:h,g=E3(f,p,e,n,i),x=E3(m,b,e,n,i);let S=t.prevZ,_=t.nextZ;for(;S&&S.z>=g&&_&&_.z<=x;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=b&&S!==s&&S!==o&&Om(a,u,l,d,c,h,S.x,S.y)&&Js(S.prev,S,S.next)>=0||(S=S.prevZ,_.x>=f&&_.x<=m&&_.y>=p&&_.y<=b&&_!==s&&_!==o&&Om(a,u,l,d,c,h,_.x,_.y)&&Js(_.prev,_,_.next)>=0))return!1;_=_.nextZ}for(;S&&S.z>=g;){if(S.x>=f&&S.x<=m&&S.y>=p&&S.y<=b&&S!==s&&S!==o&&Om(a,u,l,d,c,h,S.x,S.y)&&Js(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;_&&_.z<=x;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=b&&_!==s&&_!==o&&Om(a,u,l,d,c,h,_.x,_.y)&&Js(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function eRe(t,e,n){let i=t;do{const s=i.prev,r=i.next.next;!sS(s,r)&&OG(s,i,i.next,r)&&gy(s,r)&&gy(r,s)&&(e.push(s.i/n|0),e.push(i.i/n|0),e.push(r.i/n|0),vy(i),vy(i.next),i=t=r),i=i.next}while(i!==t);return sp(i)}function tRe(t,e,n,i,s,r){let o=t;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&uRe(o,a)){let l=DG(o,a);o=sp(o,o.next),l=sp(l,l.next),my(o,e,n,i,s,r,0),my(l,e,n,i,s,r,0);return}a=a.next}o=o.next}while(o!==t)}function nRe(t,e,n,i){const s=[];let r,o,a,l,c;for(r=0,o=e.length;r=n.next.y&&n.next.y!==n.y){const h=n.x+(o-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(h<=r&&h>i&&(i=h,s=n.x=n.x&&n.x>=l&&r!==n.x&&Om(os.x||n.x===s.x&&oRe(s,n)))&&(s=n,u=d)),n=n.next;while(n!==a);return s}function oRe(t,e){return Js(t.prev,t,e.prev)<0&&Js(e.next,t,t.next)<0}function aRe(t,e,n,i){let s=t;do s.z===0&&(s.z=E3(s.x,s.y,e,n,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==t);s.prevZ.nextZ=null,s.prevZ=null,lRe(s)}function lRe(t){let e,n,i,s,r,o,a,l,c=1;do{for(n=t,t=null,r=null,o=0;n;){for(o++,i=n,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||n.z<=i.z)?(s=n,n=n.nextZ,a--):(s=i,i=i.nextZ,l--),r?r.nextZ=s:t=s,s.prevZ=r,r=s;n=i}r.nextZ=null,c*=2}while(o>1);return t}function E3(t,e,n,i,s){return t=(t-n)*s|0,e=(e-i)*s|0,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t|e<<1}function cRe(t){let e=t,n=t;do(e.x=(t-o)*(r-a)&&(t-o)*(i-a)>=(n-o)*(e-a)&&(n-o)*(r-a)>=(s-o)*(i-a)}function uRe(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!dRe(t,e)&&(gy(t,e)&&gy(e,t)&&hRe(t,e)&&(Js(t.prev,t,e.prev)||Js(t,e.prev,e))||sS(t,e)&&Js(t.prev,t,t.next)>0&&Js(e.prev,e,e.next)>0)}function Js(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function sS(t,e){return t.x===e.x&&t.y===e.y}function OG(t,e,n,i){const s=a_(Js(t,e,n)),r=a_(Js(t,e,i)),o=a_(Js(n,i,t)),a=a_(Js(n,i,e));return!!(s!==r&&o!==a||s===0&&o_(t,n,e)||r===0&&o_(t,i,e)||o===0&&o_(n,t,i)||a===0&&o_(n,e,i))}function o_(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function a_(t){return t>0?1:t<0?-1:0}function dRe(t,e){let n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&OG(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}function gy(t,e){return Js(t.prev,t,t.next)<0?Js(t,e,t.next)>=0&&Js(t,t.prev,e)>=0:Js(t,e,t.prev)<0||Js(t,t.next,e)<0}function hRe(t,e){let n=t,i=!1;const s=(t.x+e.x)/2,r=(t.y+e.y)/2;do n.y>r!=n.next.y>r&&n.next.y!==n.y&&s<(n.next.x-n.x)*(r-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next;while(n!==t);return i}function DG(t,e){const n=new C3(t.i,t.x,t.y),i=new C3(e.i,e.x,e.y),s=t.next,r=e.prev;return t.next=e,e.prev=t,n.next=s,s.prev=n,i.next=n,n.prev=i,r.next=i,i.prev=r,i}function TR(t,e,n,i){const s=new C3(t,e,n);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function vy(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function C3(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function fRe(t,e,n,i){let s=0;for(let r=e,o=n-i;r2&&t[e-1].equals(t[0])&&t.pop()}function AR(t,e){for(let n=0;n{n&&n(r),this.manager.itemEnd(e)},0),r;if(Eu[e]!==void 0){Eu[e].push({onLoad:n,onProgress:i,onError:s});return}Eu[e]=[],Eu[e].push({onLoad:n,onProgress:i,onError:s});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(o).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||c.body===void 0||c.body.getReader===void 0)return c;const u=Eu[e],d=c.body.getReader(),h=c.headers.get("X-File-Size")||c.headers.get("Content-Length"),f=h?parseInt(h):0,p=f!==0;let m=0;const b=new ReadableStream({start(g){x();function x(){d.read().then(({done:S,value:_})=>{if(S)g.close();else{m+=_.byteLength;const E=new ProgressEvent("progress",{lengthComputable:p,loaded:m,total:f});for(let T=0,A=u.length;T{g.error(S)})}}});return new Response(b)}else throw new bRe(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`,c)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,a));case"json":return c.json();default:if(a===void 0)return c.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),h=d&&d[1]?d[1].toLowerCase():void 0,f=new TextDecoder(h);return c.arrayBuffer().then(p=>f.decode(p))}}}).then(c=>{O2.add(e,c);const u=Eu[e];delete Eu[e];for(let d=0,h=u.length;d{const u=Eu[e];if(u===void 0)throw this.manager.itemError(e),c;delete Eu[e];for(let d=0,h=u.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class wRe extends oS{constructor(e){super(e)}load(e,n,i,s){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const r=this,o=O2.get(e);if(o!==void 0)return r.manager.itemStart(e),setTimeout(function(){n&&n(o),r.manager.itemEnd(e)},0),o;const a=dy("img");function l(){u(),O2.add(e,this),n&&n(this),r.manager.itemEnd(e)}function c(d){u(),s&&s(d),r.manager.itemError(e),r.manager.itemEnd(e)}function u(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(a.crossOrigin=this.crossOrigin),r.manager.itemStart(e),a.src=e,a}}class xRe extends oS{constructor(e){super(e)}load(e,n,i,s){const r=new Eo,o=new wRe(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(a){r.image=a,r.needsUpdate=!0,n!==void 0&&n(r)},i,s),r}}class rP extends CG{constructor(e=-1,n=1,i=1,s=-1,r=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=n,this.top=i,this.bottom=s,this.near=r,this.far=o,this.updateProjectionMatrix()}copy(e,n){return super.copy(e,n),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,n,i,s,r,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),n=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,s=(this.top+this.bottom)/2;let r=i-e,o=i+e,a=s+n,l=s-n;if(this.view!==null&&this.view.enabled){const c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;r+=c*this.view.offsetX,o=r+c*this.view.width,a-=u*this.view.offsetY,l=a-u*this.view.height}this.projectionMatrix.makeOrthographic(r,o,a,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const n=super.toJSON(e);return n.object.zoom=this.zoom,n.object.left=this.left,n.object.right=this.right,n.object.top=this.top,n.object.bottom=this.bottom,n.object.near=this.near,n.object.far=this.far,this.view!==null&&(n.object.view=Object.assign({},this.view)),n}}class SRe extends Al{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}const kR=new ps;class ERe{constructor(e,n,i=0,s=1/0){this.ray=new g1(e,n),this.near=i,this.far=s,this.camera=null,this.layers=new nP,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,n){this.ray.set(e,n)}setFromCamera(e,n){n.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(n.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(n).sub(this.ray.origin).normalize(),this.camera=n):n.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(n.near+n.far)/(n.near-n.far)).unproject(n),this.ray.direction.set(0,0,-1).transformDirection(n.matrixWorld),this.camera=n):console.error("THREE.Raycaster: Unsupported camera type: "+n.type)}setFromXRController(e){return kR.identity().extractRotation(e.matrixWorld),this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(kR),this}intersectObject(e,n=!0,i=[]){return T3(e,this,i,n),i.sort(PR),i}intersectObjects(e,n=!0,i=[]){for(let s=0,r=e.length;s=this.min.x&&e.x<=this.max.x&&e.y>=this.min.y&&e.y<=this.max.y}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,n){return n.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return e.max.x>=this.min.x&&e.min.x<=this.max.x&&e.max.y>=this.min.y&&e.min.y<=this.max.y}clampPoint(e,n){return n.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,IR).distanceTo(e)}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}class BG{constructor(){this.type="ShapePath",this.color=new Wi,this.subPaths=[],this.currentPath=null}moveTo(e,n){return this.currentPath=new py,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,n),this}lineTo(e,n){return this.currentPath.lineTo(e,n),this}quadraticCurveTo(e,n,i,s){return this.currentPath.quadraticCurveTo(e,n,i,s),this}bezierCurveTo(e,n,i,s,r,o){return this.currentPath.bezierCurveTo(e,n,i,s,r,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function n(g){const x=[];for(let S=0,_=g.length;S<_;S++){const E=g[S],T=new Yu;T.curves=E.curves,x.push(T)}return x}function i(g,x){const S=x.length;let _=!1;for(let E=S-1,T=0;TNumber.EPSILON){if(k<0&&(A=x[T],P=-P,I=x[E],k=-k),g.yI.y)continue;if(g.y===A.y){if(g.x===A.x)return!0}else{const B=k*(g.x-A.x)-P*(g.y-A.y);if(B===0)return!0;if(B<0)continue;_=!_}}else{if(g.y!==A.y)continue;if(I.x<=g.x&&g.x<=A.x||A.x<=g.x&&g.x<=I.x)return!0}}return _}const s=mh.isClockWise,r=this.subPaths;if(r.length===0)return[];let o,a,l;const c=[];if(r.length===1)return a=r[0],l=new Yu,l.curves=a.curves,c.push(l),c;let u=!s(r[0].getPoints());u=e?!u:u;const d=[],h=[];let f=[],p=0,m;h[p]=void 0,f[p]=[];for(let g=0,x=r.length;g1){let g=!1,x=0;for(let S=0,_=h.length;S<_;S++)d[S]=[];for(let S=0,_=h.length;S<_;S++){const E=f[S];for(let T=0;T0&&g===!1&&(f=d)}let b;for(let g=0,x=h.length;gf.start-p.start);let h=0;for(let f=1;f 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; float clipOpacity = 1.0; #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); if ( clipOpacity == 0.0 ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES float unionClipOpacity = 1.0; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; distanceGradient = fwidth( distanceToPlane ) / 2.0; unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); } #pragma unroll_loop_end clipOpacity *= 1.0 - unionClipOpacity; #endif diffuseColor.a *= clipOpacity; if ( diffuseColor.a == 0.0 ) discard; #else #pragma unroll_loop_start for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; } #pragma unroll_loop_end #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES bool clipped = true; #pragma unroll_loop_start for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { plane = clippingPlanes[ i ]; clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; } #pragma unroll_loop_end if ( clipped ) discard; #endif #endif #endif`,WRe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; #endif`,GRe=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; #endif`,jRe=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; #endif`,KRe=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; #endif`,qRe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; #endif`,YRe=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; #endif`,XRe=`#if defined( USE_COLOR_ALPHA ) vColor = vec4( 1.0 ); #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) vColor = vec3( 1.0 ); #endif #ifdef USE_COLOR vColor *= color; #endif #ifdef USE_INSTANCING_COLOR vColor.xyz *= instanceColor.xyz; #endif #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); vColor.xyz *= batchingColor.xyz; #endif`,ZRe=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 #define RECIPROCAL_PI2 0.15915494309189535 #define EPSILON 1e-6 #ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif #define whiteComplement( a ) ( 1.0 - saturate( a ) ) float pow2( const in float x ) { return x*x; } vec3 pow2( const in vec3 x ) { return x*x; } float pow3( const in float x ) { return x*x*x; } float pow4( const in float x ) { float x2 = x*x; return x2*x2; } float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } highp float rand( const in vec2 uv ) { const highp float a = 12.9898, b = 78.233, c = 43758.5453; highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); return fract( sin( sn ) * c ); } #ifdef HIGH_PRECISION float precisionSafeLength( vec3 v ) { return length( v ); } #else float precisionSafeLength( vec3 v ) { float maxComponent = max3( abs( v ) ); return length( v / maxComponent ) * maxComponent; } #endif struct IncidentLight { vec3 color; vec3 direction; bool visible; }; struct ReflectedLight { vec3 directDiffuse; vec3 directSpecular; vec3 indirectDiffuse; vec3 indirectSpecular; }; #ifdef USE_ALPHAHASH varying vec3 vPosition; #endif vec3 transformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); } vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); } mat3 transposeMat3( const in mat3 m ) { mat3 tmp; tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); return tmp; } bool isPerspectiveMatrix( mat4 m ) { return m[ 2 ][ 3 ] == - 1.0; } vec2 equirectUv( in vec3 dir ) { float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; return vec2( u, v ); } vec3 BRDF_Lambert( const in vec3 diffuseColor ) { return RECIPROCAL_PI * diffuseColor; } vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); } // validated`,JRe=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { vec3 absDirection = abs( direction ); float face = - 1.0; if ( absDirection.x > absDirection.z ) { if ( absDirection.x > absDirection.y ) face = direction.x > 0.0 ? 0.0 : 3.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } else { if ( absDirection.z > absDirection.y ) face = direction.z > 0.0 ? 2.0 : 5.0; else face = direction.y > 0.0 ? 1.0 : 4.0; } return face; } vec2 getUV( vec3 direction, float face ) { vec2 uv; if ( face == 0.0 ) { uv = vec2( direction.z, direction.y ) / abs( direction.x ); } else if ( face == 1.0 ) { uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); } else if ( face == 2.0 ) { uv = vec2( - direction.x, direction.y ) / abs( direction.z ); } else if ( face == 3.0 ) { uv = vec2( - direction.z, direction.y ) / abs( direction.x ); } else if ( face == 4.0 ) { uv = vec2( - direction.x, direction.z ) / abs( direction.y ); } else { uv = vec2( direction.x, direction.y ) / abs( direction.z ); } return 0.5 * ( uv + 1.0 ); } vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { float face = getFace( direction ); float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); mipInt = max( mipInt, cubeUV_minMipLevel ); float faceSize = exp2( mipInt ); highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; if ( face > 2.0 ) { uv.y += faceSize; face -= 3.0; } uv.x += face * faceSize; uv.x += filterInt * 3.0 * cubeUV_minTileSize; uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); uv.x *= CUBEUV_TEXEL_WIDTH; uv.y *= CUBEUV_TEXEL_HEIGHT; #ifdef texture2DGradEXT return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; #else return texture2D( envMap, uv ).rgb; #endif } #define cubeUV_r0 1.0 #define cubeUV_m0 - 2.0 #define cubeUV_r1 0.8 #define cubeUV_m1 - 1.0 #define cubeUV_r4 0.4 #define cubeUV_m4 2.0 #define cubeUV_r5 0.305 #define cubeUV_m5 3.0 #define cubeUV_r6 0.21 #define cubeUV_m6 4.0 float roughnessToMip( float roughness ) { float mip = 0.0; if ( roughness >= cubeUV_r1 ) { mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; } else if ( roughness >= cubeUV_r4 ) { mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; } else if ( roughness >= cubeUV_r5 ) { mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; } else if ( roughness >= cubeUV_r6 ) { mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; } else { mip = - 2.0 * log2( 1.16 * roughness ); } return mip; } vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); float mipF = fract( mip ); float mipInt = floor( mip ); vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); if ( mipF == 0.0 ) { return vec4( color0, 1.0 ); } else { vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); return vec4( mix( color0, color1, mipF ), 1.0 ); } } #endif`,QRe=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif #ifdef USE_BATCHING mat3 bm = mat3( batchingMatrix ); transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); transformedNormal = bm * transformedNormal; #ifdef USE_TANGENT transformedTangent = bm * transformedTangent; #endif #endif #ifdef USE_INSTANCING mat3 im = mat3( instanceMatrix ); transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); transformedNormal = im * transformedNormal; #ifdef USE_TANGENT transformedTangent = im * transformedTangent; #endif #endif transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedNormal = - transformedNormal; #endif #ifdef USE_TANGENT transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif #endif`,eOe=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; #endif`,tOe=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); #endif`,nOe=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE emissiveColor = sRGBTransferEOTF( emissiveColor ); #endif totalEmissiveRadiance *= emissiveColor.rgb; #endif`,iOe=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; #endif`,sOe="gl_FragColor = linearToOutputTexel( gl_FragColor );",rOe=`vec4 LinearTransferOETF( in vec4 value ) { return value; } vec4 sRGBTransferEOTF( in vec4 value ) { return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); } vec4 sRGBTransferOETF( in vec4 value ) { return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); }`,oOe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToFrag = normalize( vWorldPosition - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vec3 reflectVec = reflect( cameraToFrag, worldNormal ); #else vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); #endif #else vec3 reflectVec = vReflect; #endif #ifdef ENVMAP_TYPE_CUBE vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); #else vec4 envColor = vec4( 0.0 ); #endif #ifdef ENVMAP_BLENDING_MULTIPLY outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_MIX ) outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif #endif`,aOe=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; #ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #else uniform sampler2D envMap; #endif #endif`,lOe=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; uniform float refractionRatio; #else varying vec3 vReflect; #endif #endif`,cOe=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif #ifdef ENV_WORLDPOS varying vec3 vWorldPosition; #else varying vec3 vReflect; uniform float refractionRatio; #endif #endif`,uOe=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else vec3 cameraToVertex; if ( isOrthographic ) { cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); } else { cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); } vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); #ifdef ENVMAP_MODE_REFLECTION vReflect = reflect( cameraToVertex, worldNormal ); #else vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif #endif`,dOe=`#ifdef USE_FOG vFogDepth = - mvPosition.z; #endif`,hOe=`#ifdef USE_FOG varying float vFogDepth; #endif`,fOe=`#ifdef USE_FOG #ifdef FOG_EXP2 float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); #else float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); #endif gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); #endif`,pOe=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 uniform float fogDensity; #else uniform float fogNear; uniform float fogFar; #endif #endif`,mOe=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { float dotNL = dot( normal, lightDirection ); vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); #ifdef USE_GRADIENTMAP return vec3( texture2D( gradientMap, coord ).r ); #else vec2 fw = fwidth( coord ) * 0.5; return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); #endif }`,gOe=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; #endif`,vOe=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularStrength = specularStrength;`,yOe=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; }; void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert #define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,bOe=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; #endif vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { float x = normal.x, y = normal.y, z = normal.z; vec3 result = shCoefficients[ 0 ] * 0.886227; result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); return result; } vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); return irradiance; } vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { vec3 irradiance = ambientLightColor; return irradiance; } float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); if ( cutoffDistance > 0.0 ) { distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); } return distanceFalloff; } float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { return smoothstep( coneCosine, penumbraCosine, angleCosine ); } #if NUM_DIR_LIGHTS > 0 struct DirectionalLight { vec3 direction; vec3 color; }; uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { light.color = directionalLight.color; light.direction = directionalLight.direction; light.visible = true; } #endif #if NUM_POINT_LIGHTS > 0 struct PointLight { vec3 position; vec3 color; float distance; float decay; }; uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = pointLight.position - geometryPosition; light.direction = normalize( lVector ); float lightDistance = length( lVector ); light.color = pointLight.color; light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } #endif #if NUM_SPOT_LIGHTS > 0 struct SpotLight { vec3 position; vec3 direction; vec3 color; float distance; float decay; float coneCos; float penumbraCos; }; uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { vec3 lVector = spotLight.position - geometryPosition; light.direction = normalize( lVector ); float angleCos = dot( light.direction, spotLight.direction ); float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); if ( spotAttenuation > 0.0 ) { float lightDistance = length( lVector ); light.color = spotLight.color * spotAttenuation; light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); light.visible = ( light.color != vec3( 0.0 ) ); } else { light.color = vec3( 0.0 ); light.visible = false; } } #endif #if NUM_RECT_AREA_LIGHTS > 0 struct RectAreaLight { vec3 color; vec3 position; vec3 halfWidth; vec3 halfHeight; }; uniform sampler2D ltc_1; uniform sampler2D ltc_2; uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; #endif #if NUM_HEMI_LIGHTS > 0 struct HemisphereLight { vec3 direction; vec3 skyColor; vec3 groundColor; }; uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { float dotNL = dot( normal, hemiLight.direction ); float hemiDiffuseWeight = 0.5 * dotNL + 0.5; vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } #endif`,_Oe=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); return PI * envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 reflectVec = reflect( - viewDir, normal ); reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); return envMapColor.rgb * envMapIntensity; #else return vec3( 0.0 ); #endif } #ifdef USE_ANISOTROPY vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 bentNormal = cross( bitangent, viewDir ); bentNormal = normalize( cross( bentNormal, bitangent ) ); bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); return getIBLRadiance( viewDir, bentNormal, roughness ); #else return vec3( 0.0 ); #endif } #endif #endif`,wOe=`ToonMaterial material; material.diffuseColor = diffuseColor.rgb;`,xOe=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon #define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,SOe=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; material.specularStrength = specularStrength;`,EOe=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; float specularShininess; float specularStrength; }; void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; } void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong #define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,COe=`PhysicalMaterial material; material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; material.roughness = min( material.roughness, 1.0 ); #ifdef IOR material.ior = ior; #ifdef USE_SPECULAR float specularIntensityFactor = specularIntensity; vec3 specularColorFactor = specularColor; #ifdef USE_SPECULAR_COLORMAP specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; #endif #ifdef USE_SPECULAR_INTENSITYMAP specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; #endif material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); #else float specularIntensityFactor = 1.0; vec3 specularColorFactor = vec3( 1.0 ); material.specularF90 = 1.0; #endif material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); #else material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); material.specularF90 = 1.0; #endif #ifdef USE_CLEARCOAT material.clearcoat = clearcoat; material.clearcoatRoughness = clearcoatRoughness; material.clearcoatF0 = vec3( 0.04 ); material.clearcoatF90 = 1.0; #ifdef USE_CLEARCOATMAP material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; #endif material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); material.clearcoatRoughness += geometryRoughness; material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); #endif #ifdef USE_DISPERSION material.dispersion = dispersion; #endif #ifdef USE_IRIDESCENCE material.iridescence = iridescence; material.iridescenceIOR = iridescenceIOR; #ifdef USE_IRIDESCENCEMAP material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; #else material.iridescenceThickness = iridescenceThicknessMaximum; #endif #endif #ifdef USE_SHEEN material.sheenColor = sheenColor; #ifdef USE_SHEEN_COLORMAP material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; #endif material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); #ifdef USE_SHEEN_ROUGHNESSMAP material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; #endif #endif #ifdef USE_ANISOTROPY #ifdef USE_ANISOTROPYMAP mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; #else vec2 anisotropyV = anisotropyVector; #endif material.anisotropy = length( anisotropyV ); if( material.anisotropy == 0.0 ) { anisotropyV = vec2( 1.0, 0.0 ); } else { anisotropyV /= material.anisotropy; material.anisotropy = saturate( material.anisotropy ); } material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; #endif`,TOe=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; float specularF90; float dispersion; #ifdef USE_CLEARCOAT float clearcoat; float clearcoatRoughness; vec3 clearcoatF0; float clearcoatF90; #endif #ifdef USE_IRIDESCENCE float iridescence; float iridescenceIOR; float iridescenceThickness; vec3 iridescenceFresnel; vec3 iridescenceF0; #endif #ifdef USE_SHEEN vec3 sheenColor; float sheenRoughness; #endif #ifdef IOR float ior; #endif #ifdef USE_TRANSMISSION float transmission; float transmissionAlpha; float thickness; float attenuationDistance; vec3 attenuationColor; #endif #ifdef USE_ANISOTROPY float anisotropy; float alphaT; vec3 anisotropyT; vec3 anisotropyB; #endif }; vec3 clearcoatSpecularDirect = vec3( 0.0 ); vec3 clearcoatSpecularIndirect = vec3( 0.0 ); vec3 sheenSpecularDirect = vec3( 0.0 ); vec3 sheenSpecularIndirect = vec3(0.0 ); vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); float x2 = x * x; float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); } float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { float a2 = pow2( alpha ); float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); return 0.5 / max( gv + gl, EPSILON ); } float D_GGX( const in float alpha, const in float dotNH ) { float a2 = pow2( alpha ); float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; return RECIPROCAL_PI * a2 / pow2( denom ); } #ifdef USE_ANISOTROPY float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); float v = 0.5 / ( gv + gl ); return saturate(v); } float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { float a2 = alphaT * alphaB; highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); highp float v2 = dot( v, v ); float w2 = a2 / v2; return RECIPROCAL_PI * a2 * pow2 ( w2 ); } #endif #ifdef USE_CLEARCOAT vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { vec3 f0 = material.clearcoatF0; float f90 = material.clearcoatF90; float roughness = material.clearcoatRoughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); return F * ( V * D ); } #endif vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { vec3 f0 = material.specularColor; float f90 = material.specularF90; float roughness = material.roughness; float alpha = pow2( roughness ); vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float dotVH = saturate( dot( viewDir, halfDir ) ); vec3 F = F_Schlick( f0, f90, dotVH ); #ifdef USE_IRIDESCENCE F = mix( F, material.iridescenceFresnel, material.iridescence ); #endif #ifdef USE_ANISOTROPY float dotTL = dot( material.anisotropyT, lightDir ); float dotTV = dot( material.anisotropyT, viewDir ); float dotTH = dot( material.anisotropyT, halfDir ); float dotBL = dot( material.anisotropyB, lightDir ); float dotBV = dot( material.anisotropyB, viewDir ); float dotBH = dot( material.anisotropyB, halfDir ); float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); #else float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); float D = D_GGX( alpha, dotNH ); #endif return F * ( V * D ); } vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { const float LUT_SIZE = 64.0; const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; const float LUT_BIAS = 0.5 / LUT_SIZE; float dotNV = saturate( dot( N, V ) ); vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); uv = uv * LUT_SCALE + LUT_BIAS; return uv; } float LTC_ClippedSphereFormFactor( const in vec3 f ) { float l = length( f ); return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); } vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { float x = dot( v1, v2 ); float y = abs( x ); float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; float b = 3.4175940 + ( 4.1616724 + y ) * y; float v = a / b; float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; return cross( v1, v2 ) * theta_sintheta; } vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; vec3 lightNormal = cross( v1, v2 ); if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); vec3 T1, T2; T1 = normalize( V - N * dot( V, N ) ); T2 = - cross( N, T1 ); mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); vec3 coords[ 4 ]; coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); coords[ 0 ] = normalize( coords[ 0 ] ); coords[ 1 ] = normalize( coords[ 1 ] ); coords[ 2 ] = normalize( coords[ 2 ] ); coords[ 3 ] = normalize( coords[ 3 ] ); vec3 vectorFormFactor = vec3( 0.0 ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); return vec3( result ); } #if defined( USE_SHEEN ) float D_Charlie( float roughness, float dotNH ) { float alpha = pow2( roughness ); float invAlpha = 1.0 / alpha; float cos2h = dotNH * dotNH; float sin2h = max( 1.0 - cos2h, 0.0078125 ); return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); } float V_Neubelt( float dotNV, float dotNL ) { return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); } vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { vec3 halfDir = normalize( lightDir + viewDir ); float dotNL = saturate( dot( normal, lightDir ) ); float dotNV = saturate( dot( normal, viewDir ) ); float dotNH = saturate( dot( normal, halfDir ) ); float D = D_Charlie( sheenRoughness, dotNH ); float V = V_Neubelt( dotNV, dotNL ); return sheenColor * ( D * V ); } #endif float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); float r2 = roughness * roughness; float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); return saturate( DG * RECIPROCAL_PI ); } vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { float dotNV = saturate( dot( normal, viewDir ) ); const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); vec4 r = roughness * c0 + c1; float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; return fab; } vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { vec2 fab = DFGApprox( normal, viewDir, roughness ); return specularColor * fab.x + specularF90 * fab.y; } #ifdef USE_IRIDESCENCE void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { #else void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { #endif vec2 fab = DFGApprox( normal, viewDir, roughness ); #ifdef USE_IRIDESCENCE vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); #else vec3 Fr = specularColor; #endif vec3 FssEss = Fr * fab.x + specularF90 * fab.y; float Ess = fab.x + fab.y; float Ems = 1.0 - Ess; vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); singleScatter += FssEss; multiScatter += Fms * Ems; } #if NUM_RECT_AREA_LIGHTS > 0 void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { vec3 normal = geometryNormal; vec3 viewDir = geometryViewDir; vec3 position = geometryPosition; vec3 lightPos = rectAreaLight.position; vec3 halfWidth = rectAreaLight.halfWidth; vec3 halfHeight = rectAreaLight.halfHeight; vec3 lightColor = rectAreaLight.color; float roughness = material.roughness; vec3 rectCoords[ 4 ]; rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; vec2 uv = LTC_Uv( normal, viewDir, roughness ); vec4 t1 = texture2D( ltc_1, uv ); vec4 t2 = texture2D( ltc_2, uv ); mat3 mInv = mat3( vec3( t1.x, 0, t1.y ), vec3( 0, 1, 0 ), vec3( t1.z, 0, t1.w ) ); vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); } #endif void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); vec3 irradiance = dotNL * directLight.color; #ifdef USE_CLEARCOAT float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); vec3 ccIrradiance = dotNLcc * directLight.color; clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); #endif #ifdef USE_SHEEN sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); #endif reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { #ifdef USE_CLEARCOAT clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); #endif #ifdef USE_SHEEN sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); #endif vec3 singleScattering = vec3( 0.0 ); vec3 multiScattering = vec3( 0.0 ); vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; #ifdef USE_IRIDESCENCE computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); #else computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); #endif vec3 totalScattering = singleScattering + multiScattering; vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); reflectedLight.indirectSpecular += radiance * singleScattering; reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; } #define RE_Direct RE_Direct_Physical #define RE_Direct_RectArea RE_Direct_RectArea_Physical #define RE_IndirectDiffuse RE_IndirectDiffuse_Physical #define RE_IndirectSpecular RE_IndirectSpecular_Physical float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); }`,MOe=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); vec3 geometryClearcoatNormal = vec3( 0.0 ); #ifdef USE_CLEARCOAT geometryClearcoatNormal = clearcoatNormal; #endif #ifdef USE_IRIDESCENCE float dotNVi = saturate( dot( normal, geometryViewDir ) ); if ( material.iridescenceThickness == 0.0 ) { material.iridescence = 0.0; } else { material.iridescence = saturate( material.iridescence ); } if ( material.iridescence > 0.0 ) { material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); } #endif IncidentLight directLight; #if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) PointLight pointLight; #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 PointLightShadow pointLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { pointLight = pointLights[ i ]; getPointLightInfo( pointLight, geometryPosition, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) pointLightShadow = pointLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) SpotLight spotLight; vec4 spotColor; vec3 spotLightCoord; bool inSpotLightMap; #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 SpotLightShadow spotLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { spotLight = spotLights[ i ]; getSpotLightInfo( spotLight, geometryPosition, directLight ); #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS #else #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) #endif #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; #endif #undef SPOT_LIGHT_MAP_INDEX #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) spotLightShadow = spotLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) DirectionalLight directionalLight; #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLightShadow directionalLightShadow; #endif #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { directionalLight = directionalLights[ i ]; getDirectionalLightInfo( directionalLight, directLight ); #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) directionalLightShadow = directionalLightShadows[ i ]; directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; #endif RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) RectAreaLight rectAreaLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { rectAreaLight = rectAreaLights[ i ]; RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); } #pragma unroll_loop_end #endif #if defined( RE_IndirectDiffuse ) vec3 iblIrradiance = vec3( 0.0 ); vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); #if defined( USE_LIGHT_PROBES ) irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); #endif #if ( NUM_HEMI_LIGHTS > 0 ) #pragma unroll_loop_start for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); } #pragma unroll_loop_end #endif #endif #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); #endif`,AOe=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; irradiance += lightMapIrradiance; #endif #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) iblIrradiance += getIBLIrradiance( geometryNormal ); #endif #endif #if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) #ifdef USE_ANISOTROPY radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); #else radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); #endif #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif #endif`,kOe=`#if defined( RE_IndirectDiffuse ) RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif #if defined( RE_IndirectSpecular ) RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); #endif`,POe=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; #endif`,LOe=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; #endif`,IOe=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; #endif`,ROe=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); #endif`,OOe=`#ifdef USE_MAP vec4 sampledDiffuseColor = texture2D( map, vMapUv ); #ifdef DECODE_VIDEO_TEXTURE sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor ); #endif diffuseColor *= sampledDiffuseColor; #endif`,DOe=`#ifdef USE_MAP uniform sampler2D map; #endif`,NOe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; #endif #endif #ifdef USE_MAP diffuseColor *= texture2D( map, uv ); #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; #endif`,BOe=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) uniform mat3 uvTransform; #endif #endif #ifdef USE_MAP uniform sampler2D map; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; #endif`,FOe=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; #endif`,zOe=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; #endif`,UOe=`#ifdef USE_INSTANCING_MORPH float morphTargetInfluences[ MORPHTARGETS_COUNT ]; float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; } #endif`,$Oe=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; #elif defined( USE_COLOR ) if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } #endif`,VOe=`#ifdef USE_MORPHNORMALS objectNormal *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; } #endif`,HOe=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; #endif uniform sampler2DArray morphTargetsTexture; uniform ivec2 morphTargetsTextureSize; vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; int y = texelIndex / morphTargetsTextureSize.x; int x = texelIndex - y * morphTargetsTextureSize.x; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } #endif`,WOe=`#ifdef USE_MORPHTARGETS transformed *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; } #endif`,GOe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); vec3 normal = normalize( cross( fdx, fdy ) ); #else vec3 normal = normalize( vNormal ); #ifdef DOUBLE_SIDED normal *= faceDirection; #endif #endif #if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) #ifdef USE_TANGENT mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); #else mat3 tbn = getTangentFrame( - vViewPosition, normal, #if defined( USE_NORMALMAP ) vNormalMapUv #elif defined( USE_CLEARCOAT_NORMALMAP ) vClearcoatNormalMapUv #else vUv #endif ); #endif #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) tbn[0] *= faceDirection; tbn[1] *= faceDirection; #endif #endif #ifdef USE_CLEARCOAT_NORMALMAP #ifdef USE_TANGENT mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); #else mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); #endif #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) tbn2[0] *= faceDirection; tbn2[1] *= faceDirection; #endif #endif vec3 nonPerturbedNormal = normal;`,jOe=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; #endif #ifdef DOUBLE_SIDED normal = normal * faceDirection; #endif normal = normalize( normalMatrix * normal ); #elif defined( USE_NORMALMAP_TANGENTSPACE ) vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; mapN.xy *= normalScale; normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); #endif`,KOe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif`,qOe=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif #endif`,YOe=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif #endif`,XOe=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif #ifdef USE_NORMALMAP_OBJECTSPACE uniform mat3 normalMatrix; #endif #if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { vec3 q0 = dFdx( eye_pos.xyz ); vec3 q1 = dFdy( eye_pos.xyz ); vec2 st0 = dFdx( uv.st ); vec2 st1 = dFdy( uv.st ); vec3 N = surf_norm; vec3 q1perp = cross( q1, N ); vec3 q0perp = cross( N, q0 ); vec3 T = q1perp * st0.x + q0perp * st1.x; vec3 B = q1perp * st0.y + q0perp * st1.y; float det = max( dot( T, T ), dot( B, B ) ); float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } #endif`,ZOe=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; #endif`,JOe=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); #endif`,QOe=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP uniform sampler2D clearcoatNormalMap; uniform vec2 clearcoatNormalScale; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; #endif`,eDe=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; #endif`,tDe=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,nDe=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { return 2.0 * rgb.xyz - 1.0; } const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; const float Inv255 = 1. / 255.; const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); vec4 packDepthToRGBA( const in float v ) { if( v <= 0.0 ) return vec4( 0., 0., 0., 0. ); if( v >= 1.0 ) return vec4( 1., 1., 1., 1. ); float vuf; float af = modf( v * PackFactors.a, vuf ); float bf = modf( vuf * ShiftRight8, vuf ); float gf = modf( vuf * ShiftRight8, vuf ); return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); } vec3 packDepthToRGB( const in float v ) { if( v <= 0.0 ) return vec3( 0., 0., 0. ); if( v >= 1.0 ) return vec3( 1., 1., 1. ); float vuf; float bf = modf( v * PackFactors.b, vuf ); float gf = modf( vuf * ShiftRight8, vuf ); return vec3( vuf * Inv255, gf * PackUpscale, bf ); } vec2 packDepthToRG( const in float v ) { if( v <= 0.0 ) return vec2( 0., 0. ); if( v >= 1.0 ) return vec2( 1., 1. ); float vuf; float gf = modf( v * 256., vuf ); return vec2( vuf * Inv255, gf ); } float unpackRGBAToDepth( const in vec4 v ) { return dot( v, UnpackFactors4 ); } float unpackRGBToDepth( const in vec3 v ) { return dot( v, UnpackFactors3 ); } float unpackRGToDepth( const in vec2 v ) { return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; } vec4 pack2HalfToRGBA( const in vec2 v ) { vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); } vec2 unpackRGBATo2Half( const in vec4 v ) { return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); } float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { return ( viewZ + near ) / ( near - far ); } float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { return depth * ( near - far ) - near; } float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); }`,iDe=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; #endif`,sDe=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif #ifdef USE_INSTANCING mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; gl_Position = projectionMatrix * mvPosition;`,rDe=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); #endif`,oDe=`#ifdef DITHERING vec3 dithering( vec3 color ) { float grid_position = rand( gl_FragCoord.xy ); vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); return color + dither_shift_RGB; } #endif`,aDe=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; #endif`,lDe=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; #endif`,cDe=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; struct SpotLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); } vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { return unpackRGBATo2Half( texture2D( shadow, uv ) ); } float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ float occlusion = 1.0; vec2 distribution = texture2DDistribution( shadow, uv ); float hard_shadow = step( compare , distribution.x ); if (hard_shadow != 1.0 ) { float distance = compare - distribution.x ; float variance = max( 0.00000, distribution.y * distribution.y ); float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); } return occlusion; } float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { float shadow = 1.0; shadowCoord.xyz /= shadowCoord.w; shadowCoord.z += shadowBias; bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; bool frustumTest = inFrustum && shadowCoord.z <= 1.0; if ( frustumTest ) { #if defined( SHADOWMAP_TYPE_PCF ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx0 = - texelSize.x * shadowRadius; float dy0 = - texelSize.y * shadowRadius; float dx1 = + texelSize.x * shadowRadius; float dy1 = + texelSize.y * shadowRadius; float dx2 = dx0 / 2.0; float dy2 = dy0 / 2.0; float dx3 = dx1 / 2.0; float dy3 = dy1 / 2.0; shadow = ( texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) ) * ( 1.0 / 17.0 ); #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) vec2 texelSize = vec2( 1.0 ) / shadowMapSize; float dx = texelSize.x; float dy = texelSize.y; vec2 uv = shadowCoord.xy; vec2 f = fract( uv * shadowMapSize + 0.5 ); uv -= f * texelSize; shadow = ( texture2DCompare( shadowMap, uv, shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), f.x ) + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), f.y ) + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), f.x ), mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), f.x ), f.y ) ) * ( 1.0 / 9.0 ); #elif defined( SHADOWMAP_TYPE_VSM ) shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); #else shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); #endif } return mix( 1.0, shadow, shadowIntensity ); } vec2 cubeToUV( vec3 v, float texelSizeY ) { vec3 absV = abs( v ); float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); absV *= scaleToCube; v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); vec2 planar = v.xy; float almostATexel = 1.5 * texelSizeY; float almostOne = 1.0 - almostATexel; if ( absV.z >= almostOne ) { if ( v.z > 0.0 ) planar.x = 4.0 - v.x; } else if ( absV.x >= almostOne ) { float signX = sign( v.x ); planar.x = v.z * signX + 2.0 * signX; } else if ( absV.y >= almostOne ) { float signY = sign( v.y ); planar.x = v.x + 2.0 * signY + 2.0; planar.y = v.z * signY - 2.0; } return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); } float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { float shadow = 1.0; vec3 lightToPosition = shadowCoord.xyz; float lightToPositionLength = length( lightToPosition ); if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; vec3 bd3D = normalize( lightToPosition ); vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; shadow = ( texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) ) * ( 1.0 / 9.0 ); #else shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); #endif } return mix( 1.0, shadow, shadowIntensity ); } #endif`,uDe=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; struct DirectionalLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 struct SpotLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; }; uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; #endif #if NUM_POINT_LIGHT_SHADOWS > 0 uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; struct PointLightShadow { float shadowIntensity; float shadowBias; float shadowNormalBias; float shadowRadius; vec2 shadowMapSize; float shadowCameraNear; float shadowCameraFar; }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif #endif`,dDe=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); vec4 shadowWorldPosition; #endif #if defined( USE_SHADOWMAP ) #if NUM_DIR_LIGHT_SHADOWS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif #if NUM_POINT_LIGHT_SHADOWS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif #endif #if NUM_SPOT_LIGHT_COORDS > 0 #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { shadowWorldPosition = worldPosition; #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; #endif vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end #endif`,hDe=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 DirectionalLightShadow directionalLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { directionalLight = directionalLightShadows[ i ]; shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; } #pragma unroll_loop_end #endif #if NUM_SPOT_LIGHT_SHADOWS > 0 SpotLightShadow spotLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { spotLight = spotLightShadows[ i ]; shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; } #pragma unroll_loop_end #endif #if NUM_POINT_LIGHT_SHADOWS > 0 PointLightShadow pointLight; #pragma unroll_loop_start for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { pointLight = pointLightShadows[ i ]; shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; } #pragma unroll_loop_end #endif #endif return shadow; }`,fDe=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); #endif`,pDe=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; mat4 getBoneMatrix( const in float i ) { int size = textureSize( boneTexture, 0 ).x; int j = int( i ) * 4; int x = j % size; int y = j / size; vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } #endif`,mDe=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; skinned += boneMatY * skinVertex * skinWeight.y; skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; #endif`,gDe=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; skinMatrix += skinWeight.z * boneMatZ; skinMatrix += skinWeight.w * boneMatW; skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif #endif`,vDe=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; #endif`,yDe=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; #endif`,bDe=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); #endif`,_De=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; vec3 LinearToneMapping( vec3 color ) { return saturate( toneMappingExposure * color ); } vec3 ReinhardToneMapping( vec3 color ) { color *= toneMappingExposure; return saturate( color / ( vec3( 1.0 ) + color ) ); } vec3 CineonToneMapping( vec3 color ) { color *= toneMappingExposure; color = max( vec3( 0.0 ), color - 0.004 ); return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); } vec3 RRTAndODTFit( vec3 v ) { vec3 a = v * ( v + 0.0245786 ) - 0.000090537; vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; return a / b; } vec3 ACESFilmicToneMapping( vec3 color ) { const mat3 ACESInputMat = mat3( vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), vec3( 0.04823, 0.01566, 0.83777 ) ); const mat3 ACESOutputMat = mat3( vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), vec3( -0.07367, -0.00605, 1.07602 ) ); color *= toneMappingExposure / 0.6; color = ACESInputMat * color; color = RRTAndODTFit( color ); color = ACESOutputMat * color; return saturate( color ); } const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( vec3( 1.6605, - 0.1246, - 0.0182 ), vec3( - 0.5876, 1.1329, - 0.1006 ), vec3( - 0.0728, - 0.0083, 1.1187 ) ); const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( vec3( 0.6274, 0.0691, 0.0164 ), vec3( 0.3293, 0.9195, 0.0880 ), vec3( 0.0433, 0.0113, 0.8956 ) ); vec3 agxDefaultContrastApprox( vec3 x ) { vec3 x2 = x * x; vec3 x4 = x2 * x2; return + 15.5 * x4 * x2 - 40.14 * x4 * x + 31.96 * x4 - 6.868 * x2 * x + 0.4298 * x2 + 0.1191 * x - 0.00232; } vec3 AgXToneMapping( vec3 color ) { const mat3 AgXInsetMatrix = mat3( vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) ); const mat3 AgXOutsetMatrix = mat3( vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) ); const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; color *= toneMappingExposure; color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; color = AgXInsetMatrix * color; color = max( color, 1e-10 ); color = log2( color ); color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); color = clamp( color, 0.0, 1.0 ); color = agxDefaultContrastApprox( color ); color = AgXOutsetMatrix * color; color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); color = LINEAR_REC2020_TO_LINEAR_SRGB * color; color = clamp( color, 0.0, 1.0 ); return color; } vec3 NeutralToneMapping( vec3 color ) { const float StartCompression = 0.8 - 0.04; const float Desaturation = 0.15; color *= toneMappingExposure; float x = min( color.r, min( color.g, color.b ) ); float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; color -= offset; float peak = max( color.r, max( color.g, color.b ) ); if ( peak < StartCompression ) return color; float d = 1. - StartCompression; float newPeak = 1. - d * d / ( peak + d - StartCompression ); color *= newPeak / peak; float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } vec3 CustomToneMapping( vec3 color ) { return color; }`,wDe=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; material.attenuationDistance = attenuationDistance; material.attenuationColor = attenuationColor; #ifdef USE_TRANSMISSIONMAP material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; #endif #ifdef USE_THICKNESSMAP material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; #endif vec3 pos = vWorldPosition; vec3 v = normalize( cameraPosition - pos ); vec3 n = inverseTransformDirection( normal, viewMatrix ); vec4 transmitted = getIBLVolumeRefraction( n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); #endif`,xDe=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; uniform vec3 attenuationColor; #ifdef USE_TRANSMISSIONMAP uniform sampler2D transmissionMap; #endif #ifdef USE_THICKNESSMAP uniform sampler2D thicknessMap; #endif uniform vec2 transmissionSamplerSize; uniform sampler2D transmissionSamplerMap; uniform mat4 modelMatrix; uniform mat4 projectionMatrix; varying vec3 vWorldPosition; float w0( float a ) { return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); } float w1( float a ) { return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); } float w2( float a ){ return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); } float w3( float a ) { return ( 1.0 / 6.0 ) * ( a * a * a ); } float g0( float a ) { return w0( a ) + w1( a ); } float g1( float a ) { return w2( a ) + w3( a ); } float h0( float a ) { return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); } float h1( float a ) { return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); } vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { uv = uv * texelSize.zw + 0.5; vec2 iuv = floor( uv ); vec2 fuv = fract( uv ); float g0x = g0( fuv.x ); float g1x = g1( fuv.x ); float h0x = h0( fuv.x ); float h1x = h1( fuv.x ); float h0y = h0( fuv.y ); float h1y = h1( fuv.y ); vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); } vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); vec2 fLodSizeInv = 1.0 / fLodSize; vec2 cLodSizeInv = 1.0 / cLodSize; vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); return mix( fSample, cSample, fract( lod ) ); } vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); vec3 modelScale; modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); return normalize( refractionVector ) * thickness * modelScale; } float applyIorToRoughness( const in float roughness, const in float ior ) { return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); } vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); } vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { if ( isinf( attenuationDistance ) ) { return vec3( 1.0 ); } else { vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; } } vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, const in vec3 attenuationColor, const in float attenuationDistance ) { vec4 transmittedLight; vec3 transmittance; #ifdef USE_DISPERSION float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); for ( int i = 0; i < 3; i ++ ) { vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); vec3 refractedRayExit = position + transmissionRay; vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); vec2 refractionCoords = ndcPos.xy / ndcPos.w; refractionCoords += 1.0; refractionCoords /= 2.0; vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); transmittedLight[ i ] = transmissionSample[ i ]; transmittedLight.a += transmissionSample.a; transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; } transmittedLight.a /= 3.0; #else vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); vec3 refractedRayExit = position + transmissionRay; vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); vec2 refractionCoords = ndcPos.xy / ndcPos.w; refractionCoords += 1.0; refractionCoords /= 2.0; transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); #endif vec3 attenuatedColor = transmittance * transmittedLight.rgb; vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } #endif`,SDe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP varying vec2 vMapUv; #endif #ifdef USE_ALPHAMAP varying vec2 vAlphaMapUv; #endif #ifdef USE_LIGHTMAP varying vec2 vLightMapUv; #endif #ifdef USE_AOMAP varying vec2 vAoMapUv; #endif #ifdef USE_BUMPMAP varying vec2 vBumpMapUv; #endif #ifdef USE_NORMALMAP varying vec2 vNormalMapUv; #endif #ifdef USE_EMISSIVEMAP varying vec2 vEmissiveMapUv; #endif #ifdef USE_METALNESSMAP varying vec2 vMetalnessMapUv; #endif #ifdef USE_ROUGHNESSMAP varying vec2 vRoughnessMapUv; #endif #ifdef USE_ANISOTROPYMAP varying vec2 vAnisotropyMapUv; #endif #ifdef USE_CLEARCOATMAP varying vec2 vClearcoatMapUv; #endif #ifdef USE_CLEARCOAT_NORMALMAP varying vec2 vClearcoatNormalMapUv; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP varying vec2 vClearcoatRoughnessMapUv; #endif #ifdef USE_IRIDESCENCEMAP varying vec2 vIridescenceMapUv; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP varying vec2 vIridescenceThicknessMapUv; #endif #ifdef USE_SHEEN_COLORMAP varying vec2 vSheenColorMapUv; #endif #ifdef USE_SHEEN_ROUGHNESSMAP varying vec2 vSheenRoughnessMapUv; #endif #ifdef USE_SPECULARMAP varying vec2 vSpecularMapUv; #endif #ifdef USE_SPECULAR_COLORMAP varying vec2 vSpecularColorMapUv; #endif #ifdef USE_SPECULAR_INTENSITYMAP varying vec2 vSpecularIntensityMapUv; #endif #ifdef USE_TRANSMISSIONMAP uniform mat3 transmissionMapTransform; varying vec2 vTransmissionMapUv; #endif #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; #endif`,EDe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP uniform mat3 mapTransform; varying vec2 vMapUv; #endif #ifdef USE_ALPHAMAP uniform mat3 alphaMapTransform; varying vec2 vAlphaMapUv; #endif #ifdef USE_LIGHTMAP uniform mat3 lightMapTransform; varying vec2 vLightMapUv; #endif #ifdef USE_AOMAP uniform mat3 aoMapTransform; varying vec2 vAoMapUv; #endif #ifdef USE_BUMPMAP uniform mat3 bumpMapTransform; varying vec2 vBumpMapUv; #endif #ifdef USE_NORMALMAP uniform mat3 normalMapTransform; varying vec2 vNormalMapUv; #endif #ifdef USE_DISPLACEMENTMAP uniform mat3 displacementMapTransform; varying vec2 vDisplacementMapUv; #endif #ifdef USE_EMISSIVEMAP uniform mat3 emissiveMapTransform; varying vec2 vEmissiveMapUv; #endif #ifdef USE_METALNESSMAP uniform mat3 metalnessMapTransform; varying vec2 vMetalnessMapUv; #endif #ifdef USE_ROUGHNESSMAP uniform mat3 roughnessMapTransform; varying vec2 vRoughnessMapUv; #endif #ifdef USE_ANISOTROPYMAP uniform mat3 anisotropyMapTransform; varying vec2 vAnisotropyMapUv; #endif #ifdef USE_CLEARCOATMAP uniform mat3 clearcoatMapTransform; varying vec2 vClearcoatMapUv; #endif #ifdef USE_CLEARCOAT_NORMALMAP uniform mat3 clearcoatNormalMapTransform; varying vec2 vClearcoatNormalMapUv; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform mat3 clearcoatRoughnessMapTransform; varying vec2 vClearcoatRoughnessMapUv; #endif #ifdef USE_SHEEN_COLORMAP uniform mat3 sheenColorMapTransform; varying vec2 vSheenColorMapUv; #endif #ifdef USE_SHEEN_ROUGHNESSMAP uniform mat3 sheenRoughnessMapTransform; varying vec2 vSheenRoughnessMapUv; #endif #ifdef USE_IRIDESCENCEMAP uniform mat3 iridescenceMapTransform; varying vec2 vIridescenceMapUv; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform mat3 iridescenceThicknessMapTransform; varying vec2 vIridescenceThicknessMapUv; #endif #ifdef USE_SPECULARMAP uniform mat3 specularMapTransform; varying vec2 vSpecularMapUv; #endif #ifdef USE_SPECULAR_COLORMAP uniform mat3 specularColorMapTransform; varying vec2 vSpecularColorMapUv; #endif #ifdef USE_SPECULAR_INTENSITYMAP uniform mat3 specularIntensityMapTransform; varying vec2 vSpecularIntensityMapUv; #endif #ifdef USE_TRANSMISSIONMAP uniform mat3 transmissionMapTransform; varying vec2 vTransmissionMapUv; #endif #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; #endif`,CDe=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; #endif #ifdef USE_ALPHAMAP vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; #endif #ifdef USE_LIGHTMAP vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; #endif #ifdef USE_AOMAP vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; #endif #ifdef USE_BUMPMAP vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; #endif #ifdef USE_NORMALMAP vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; #endif #ifdef USE_DISPLACEMENTMAP vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; #endif #ifdef USE_EMISSIVEMAP vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; #endif #ifdef USE_METALNESSMAP vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_ROUGHNESSMAP vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_ANISOTROPYMAP vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOATMAP vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOAT_NORMALMAP vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_IRIDESCENCEMAP vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_SHEEN_COLORMAP vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; #endif #ifdef USE_SHEEN_ROUGHNESSMAP vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULARMAP vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULAR_COLORMAP vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; #endif #ifdef USE_SPECULAR_INTENSITYMAP vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; #endif #ifdef USE_TRANSMISSIONMAP vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; #endif`,TDe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 vec4 worldPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING worldPosition = batchingMatrix * worldPosition; #endif #ifdef USE_INSTANCING worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; #endif`;const MDe=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); }`,ADe=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { vec4 texColor = texture2D( t2D, vUv ); #ifdef DECODE_VIDEO_TEXTURE texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,kDe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,PDe=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; #endif uniform float flipEnvMap; uniform float backgroundBlurriness; uniform float backgroundIntensity; uniform mat3 backgroundRotation; varying vec3 vWorldDirection; #include void main() { #ifdef ENVMAP_TYPE_CUBE vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); #elif defined( ENVMAP_TYPE_CUBE_UV ) vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); #else vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); #endif texColor.rgb *= backgroundIntensity; gl_FragColor = texColor; #include #include }`,LDe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; }`,IDe=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; void main() { vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); gl_FragColor = texColor; gl_FragColor.a *= opacity; #include #include }`,RDe=`#include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { #include #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vHighPrecisionZW = gl_Position.zw; }`,ODe=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include #include #include #include #include #include #include #include #include varying vec2 vHighPrecisionZW; void main() { vec4 diffuseColor = vec4( 1.0 ); #include #if DEPTH_PACKING == 3200 diffuseColor.a = opacity; #endif #include #include #include #include #include float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; #if DEPTH_PACKING == 3200 gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #elif DEPTH_PACKING == 3202 gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); #elif DEPTH_PACKING == 3203 gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); #endif }`,DDe=`#define DISTANCE varying vec3 vWorldPosition; #include #include #include #include #include #include #include void main() { #include #include #include #include #ifdef USE_DISPLACEMENTMAP #include #include #include #endif #include #include #include #include #include #include #include vWorldPosition = worldPosition.xyz; }`,NDe=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; varying vec3 vWorldPosition; #include #include #include #include #include #include #include #include void main () { vec4 diffuseColor = vec4( 1.0 ); #include #include #include #include #include float dist = length( vWorldPosition - referencePosition ); dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); }`,BDe=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include }`,FDe=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { vec3 direction = normalize( vWorldDirection ); vec2 sampleUV = equirectUv( direction ); gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include }`,zDe=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vLineDistance = scale * lineDistance; #include #include #include #include #include #include #include #include #include #include }`,UDe=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; varying float vLineDistance; #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include if ( mod( vLineDistance, totalSize ) > dashSize ) { discard; } vec3 outgoingLight = vec3( 0.0 ); #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,$De=`#include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) #include #include #include #include #include #endif #include #include #include #include #include #include #include #include #include }`,VDe=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; #else reflectedLight.indirectDiffuse += vec3( 1.0 ); #endif #include reflectedLight.indirectDiffuse *= diffuseColor.rgb; vec3 outgoingLight = reflectedLight.indirectDiffuse; #include #include #include #include #include #include #include }`,HDe=`#define LAMBERT varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,WDe=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,GDe=`#define MATCAP varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; }`,jDe=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include #include #include #include #include #include #include #include #include vec3 viewDir = normalize( vViewPosition ); vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); vec3 y = cross( viewDir, x ); vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; #ifdef USE_MATCAP vec4 matcapColor = texture2D( matcap, uv ); #else vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); #endif vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; #include #include #include #include #include #include }`,KDe=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif }`,qDe=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); #include #include #include #include gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); #ifdef OPAQUE gl_FragColor.a = 1.0; #endif }`,YDe=`#define PHONG varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #include }`,XDe=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; uniform float shininess; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; #include #include #include #include #include #include #include }`,ZDe=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; #endif #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif }`,JDe=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR #endif uniform vec3 diffuse; uniform vec3 emissive; uniform float roughness; uniform float metalness; uniform float opacity; #ifdef IOR uniform float ior; #endif #ifdef USE_SPECULAR uniform float specularIntensity; uniform vec3 specularColor; #ifdef USE_SPECULAR_COLORMAP uniform sampler2D specularColorMap; #endif #ifdef USE_SPECULAR_INTENSITYMAP uniform sampler2D specularIntensityMap; #endif #endif #ifdef USE_CLEARCOAT uniform float clearcoat; uniform float clearcoatRoughness; #endif #ifdef USE_DISPERSION uniform float dispersion; #endif #ifdef USE_IRIDESCENCE uniform float iridescence; uniform float iridescenceIOR; uniform float iridescenceThicknessMinimum; uniform float iridescenceThicknessMaximum; #endif #ifdef USE_SHEEN uniform vec3 sheenColor; uniform float sheenRoughness; #ifdef USE_SHEEN_COLORMAP uniform sampler2D sheenColorMap; #endif #ifdef USE_SHEEN_ROUGHNESSMAP uniform sampler2D sheenRoughnessMap; #endif #endif #ifdef USE_ANISOTROPY uniform vec2 anisotropyVector; #ifdef USE_ANISOTROPYMAP uniform sampler2D anisotropyMap; #endif #endif varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; #include vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; #ifdef USE_SHEEN float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; #endif #ifdef USE_CLEARCOAT float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; #endif #include #include #include #include #include #include }`,QDe=`#define TOON varying vec3 vViewPosition; #include #include #include #include #include #include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include vViewPosition = - mvPosition.xyz; #include #include #include }`,eNe=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); vec3 totalEmissiveRadiance = emissive; #include #include #include #include #include #include #include #include #include #include #include #include #include #include vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; #include #include #include #include #include #include }`,tNe=`uniform float size; uniform float scale; #include #include #include #include #include #include #ifdef USE_POINTS_UV varying vec2 vUv; uniform mat3 uvTransform; #endif void main() { #ifdef USE_POINTS_UV vUv = ( uvTransform * vec3( uv, 1 ) ).xy; #endif #include #include #include #include #include #include gl_PointSize = size; #ifdef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); #endif #include #include #include #include }`,nNe=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include #include }`,iNe=`#include #include #include #include #include #include #include void main() { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include }`,sNe=`uniform vec3 color; uniform float opacity; #include #include #include #include #include #include #include #include void main() { #include gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); #include #include #include }`,rNe=`uniform float rotation; uniform vec2 center; #include #include #include #include #include void main() { #include vec4 mvPosition = modelViewMatrix[ 3 ]; vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); #ifndef USE_SIZEATTENUATION bool isPerspective = isPerspectiveMatrix( projectionMatrix ); if ( isPerspective ) scale *= - mvPosition.z; #endif vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; vec2 rotatedPosition; rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; mvPosition.xy += rotatedPosition; gl_Position = projectionMatrix * mvPosition; #include #include #include }`,oNe=`uniform vec3 diffuse; uniform float opacity; #include #include #include #include #include #include #include #include #include void main() { vec4 diffuseColor = vec4( diffuse, opacity ); #include vec3 outgoingLight = vec3( 0.0 ); #include #include #include #include #include outgoingLight = diffuseColor.rgb; #include #include #include #include }`,zi={alphahash_fragment:ARe,alphahash_pars_fragment:kRe,alphamap_fragment:PRe,alphamap_pars_fragment:LRe,alphatest_fragment:IRe,alphatest_pars_fragment:RRe,aomap_fragment:ORe,aomap_pars_fragment:DRe,batching_pars_vertex:NRe,batching_vertex:BRe,begin_vertex:FRe,beginnormal_vertex:zRe,bsdfs:URe,iridescence_fragment:$Re,bumpmap_pars_fragment:VRe,clipping_planes_fragment:HRe,clipping_planes_pars_fragment:WRe,clipping_planes_pars_vertex:GRe,clipping_planes_vertex:jRe,color_fragment:KRe,color_pars_fragment:qRe,color_pars_vertex:YRe,color_vertex:XRe,common:ZRe,cube_uv_reflection_fragment:JRe,defaultnormal_vertex:QRe,displacementmap_pars_vertex:eOe,displacementmap_vertex:tOe,emissivemap_fragment:nOe,emissivemap_pars_fragment:iOe,colorspace_fragment:sOe,colorspace_pars_fragment:rOe,envmap_fragment:oOe,envmap_common_pars_fragment:aOe,envmap_pars_fragment:lOe,envmap_pars_vertex:cOe,envmap_physical_pars_fragment:_Oe,envmap_vertex:uOe,fog_vertex:dOe,fog_pars_vertex:hOe,fog_fragment:fOe,fog_pars_fragment:pOe,gradientmap_pars_fragment:mOe,lightmap_pars_fragment:gOe,lights_lambert_fragment:vOe,lights_lambert_pars_fragment:yOe,lights_pars_begin:bOe,lights_toon_fragment:wOe,lights_toon_pars_fragment:xOe,lights_phong_fragment:SOe,lights_phong_pars_fragment:EOe,lights_physical_fragment:COe,lights_physical_pars_fragment:TOe,lights_fragment_begin:MOe,lights_fragment_maps:AOe,lights_fragment_end:kOe,logdepthbuf_fragment:POe,logdepthbuf_pars_fragment:LOe,logdepthbuf_pars_vertex:IOe,logdepthbuf_vertex:ROe,map_fragment:OOe,map_pars_fragment:DOe,map_particle_fragment:NOe,map_particle_pars_fragment:BOe,metalnessmap_fragment:FOe,metalnessmap_pars_fragment:zOe,morphinstance_vertex:UOe,morphcolor_vertex:$Oe,morphnormal_vertex:VOe,morphtarget_pars_vertex:HOe,morphtarget_vertex:WOe,normal_fragment_begin:GOe,normal_fragment_maps:jOe,normal_pars_fragment:KOe,normal_pars_vertex:qOe,normal_vertex:YOe,normalmap_pars_fragment:XOe,clearcoat_normal_fragment_begin:ZOe,clearcoat_normal_fragment_maps:JOe,clearcoat_pars_fragment:QOe,iridescence_pars_fragment:eDe,opaque_fragment:tDe,packing:nDe,premultiplied_alpha_fragment:iDe,project_vertex:sDe,dithering_fragment:rDe,dithering_pars_fragment:oDe,roughnessmap_fragment:aDe,roughnessmap_pars_fragment:lDe,shadowmap_pars_fragment:cDe,shadowmap_pars_vertex:uDe,shadowmap_vertex:dDe,shadowmask_pars_fragment:hDe,skinbase_vertex:fDe,skinning_pars_vertex:pDe,skinning_vertex:mDe,skinnormal_vertex:gDe,specularmap_fragment:vDe,specularmap_pars_fragment:yDe,tonemapping_fragment:bDe,tonemapping_pars_fragment:_De,transmission_fragment:wDe,transmission_pars_fragment:xDe,uv_pars_fragment:SDe,uv_pars_vertex:EDe,uv_vertex:CDe,worldpos_vertex:TDe,background_vert:MDe,background_frag:ADe,backgroundCube_vert:kDe,backgroundCube_frag:PDe,cube_vert:LDe,cube_frag:IDe,depth_vert:RDe,depth_frag:ODe,distanceRGBA_vert:DDe,distanceRGBA_frag:NDe,equirect_vert:BDe,equirect_frag:FDe,linedashed_vert:zDe,linedashed_frag:UDe,meshbasic_vert:$De,meshbasic_frag:VDe,meshlambert_vert:HDe,meshlambert_frag:WDe,meshmatcap_vert:GDe,meshmatcap_frag:jDe,meshnormal_vert:KDe,meshnormal_frag:qDe,meshphong_vert:YDe,meshphong_frag:XDe,meshphysical_vert:ZDe,meshphysical_frag:JDe,meshtoon_vert:QDe,meshtoon_frag:eNe,points_vert:tNe,points_frag:nNe,shadow_vert:iNe,shadow_frag:sNe,sprite_vert:rNe,sprite_frag:oNe},kn={common:{diffuse:{value:new Wi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ii},alphaMap:{value:null},alphaMapTransform:{value:new Ii},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ii}},envmap:{envMap:{value:null},envMapRotation:{value:new Ii},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ii}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ii}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ii},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ii},normalScale:{value:new vn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ii},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ii}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ii}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ii}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Wi(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Wi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ii},alphaTest:{value:0},uvTransform:{value:new Ii}},sprite:{diffuse:{value:new Wi(16777215)},opacity:{value:1},center:{value:new vn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ii},alphaMap:{value:null},alphaMapTransform:{value:new Ii},alphaTest:{value:0}}},Tc={basic:{uniforms:Bo([kn.common,kn.specularmap,kn.envmap,kn.aomap,kn.lightmap,kn.fog]),vertexShader:zi.meshbasic_vert,fragmentShader:zi.meshbasic_frag},lambert:{uniforms:Bo([kn.common,kn.specularmap,kn.envmap,kn.aomap,kn.lightmap,kn.emissivemap,kn.bumpmap,kn.normalmap,kn.displacementmap,kn.fog,kn.lights,{emissive:{value:new Wi(0)}}]),vertexShader:zi.meshlambert_vert,fragmentShader:zi.meshlambert_frag},phong:{uniforms:Bo([kn.common,kn.specularmap,kn.envmap,kn.aomap,kn.lightmap,kn.emissivemap,kn.bumpmap,kn.normalmap,kn.displacementmap,kn.fog,kn.lights,{emissive:{value:new Wi(0)},specular:{value:new Wi(1118481)},shininess:{value:30}}]),vertexShader:zi.meshphong_vert,fragmentShader:zi.meshphong_frag},standard:{uniforms:Bo([kn.common,kn.envmap,kn.aomap,kn.lightmap,kn.emissivemap,kn.bumpmap,kn.normalmap,kn.displacementmap,kn.roughnessmap,kn.metalnessmap,kn.fog,kn.lights,{emissive:{value:new Wi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:zi.meshphysical_vert,fragmentShader:zi.meshphysical_frag},toon:{uniforms:Bo([kn.common,kn.aomap,kn.lightmap,kn.emissivemap,kn.bumpmap,kn.normalmap,kn.displacementmap,kn.gradientmap,kn.fog,kn.lights,{emissive:{value:new Wi(0)}}]),vertexShader:zi.meshtoon_vert,fragmentShader:zi.meshtoon_frag},matcap:{uniforms:Bo([kn.common,kn.bumpmap,kn.normalmap,kn.displacementmap,kn.fog,{matcap:{value:null}}]),vertexShader:zi.meshmatcap_vert,fragmentShader:zi.meshmatcap_frag},points:{uniforms:Bo([kn.points,kn.fog]),vertexShader:zi.points_vert,fragmentShader:zi.points_frag},dashed:{uniforms:Bo([kn.common,kn.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:zi.linedashed_vert,fragmentShader:zi.linedashed_frag},depth:{uniforms:Bo([kn.common,kn.displacementmap]),vertexShader:zi.depth_vert,fragmentShader:zi.depth_frag},normal:{uniforms:Bo([kn.common,kn.bumpmap,kn.normalmap,kn.displacementmap,{opacity:{value:1}}]),vertexShader:zi.meshnormal_vert,fragmentShader:zi.meshnormal_frag},sprite:{uniforms:Bo([kn.sprite,kn.fog]),vertexShader:zi.sprite_vert,fragmentShader:zi.sprite_frag},background:{uniforms:{uvTransform:{value:new Ii},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:zi.background_vert,fragmentShader:zi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Ii}},vertexShader:zi.backgroundCube_vert,fragmentShader:zi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:zi.cube_vert,fragmentShader:zi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:zi.equirect_vert,fragmentShader:zi.equirect_frag},distanceRGBA:{uniforms:Bo([kn.common,kn.displacementmap,{referencePosition:{value:new ct},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:zi.distanceRGBA_vert,fragmentShader:zi.distanceRGBA_frag},shadow:{uniforms:Bo([kn.lights,kn.fog,{color:{value:new Wi(0)},opacity:{value:1}}]),vertexShader:zi.shadow_vert,fragmentShader:zi.shadow_frag}};Tc.physical={uniforms:Bo([Tc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ii},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ii},clearcoatNormalScale:{value:new vn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ii},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ii},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ii},sheen:{value:0},sheenColor:{value:new Wi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ii},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ii},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ii},transmissionSamplerSize:{value:new vn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ii},attenuationDistance:{value:0},attenuationColor:{value:new Wi(0)},specularColor:{value:new Wi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ii},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ii},anisotropyVector:{value:new vn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ii}}]),vertexShader:zi.meshphysical_vert,fragmentShader:zi.meshphysical_frag};const l_={r:0,b:0,g:0},ef=new Xc,aNe=new ps;function lNe(t,e,n,i,s,r,o){const a=new Wi(0);let l=r===!0?0:1,c,u,d=null,h=0,f=null;function p(S){let _=S.isScene===!0?S.background:null;return _&&_.isTexture&&(_=(S.backgroundBlurriness>0?n:e).get(_)),_}function m(S){let _=!1;const E=p(S);E===null?g(a,l):E&&E.isColor&&(g(E,1),_=!0);const T=t.xr.getEnvironmentBlendMode();T==="additive"?i.buffers.color.setClear(0,0,0,1,o):T==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(t.autoClear||_)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))}function b(S,_){const E=p(_);E&&(E.isCubeTexture||E.mapping===tS)?(u===void 0&&(u=new xr(new y1(1,1,1),new Yl({name:"BackgroundCubeMaterial",uniforms:Mg(Tc.backgroundCube.uniforms),vertexShader:Tc.backgroundCube.vertexShader,fragmentShader:Tc.backgroundCube.fragmentShader,side:ma,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(T,A,I){this.matrixWorld.copyPosition(I.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),s.update(u)),ef.copy(_.backgroundRotation),ef.x*=-1,ef.y*=-1,ef.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(ef.y*=-1,ef.z*=-1),u.material.uniforms.envMap.value=E,u.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,u.material.uniforms.backgroundBlurriness.value=_.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(aNe.makeRotationFromEuler(ef)),u.material.toneMapped=ss.getTransfer(E.colorSpace)!==Cs,(d!==E||h!==E.version||f!==t.toneMapping)&&(u.material.needsUpdate=!0,d=E,h=E.version,f=t.toneMapping),u.layers.enableAll(),S.unshift(u,u.geometry,u.material,0,0,null)):E&&E.isTexture&&(c===void 0&&(c=new xr(new rS(2,2),new Yl({name:"BackgroundMaterial",uniforms:Mg(Tc.background.uniforms),vertexShader:Tc.background.vertexShader,fragmentShader:Tc.background.fragmentShader,side:Mh,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),Object.defineProperty(c.material,"map",{get:function(){return this.uniforms.t2D.value}}),s.update(c)),c.material.uniforms.t2D.value=E,c.material.uniforms.backgroundIntensity.value=_.backgroundIntensity,c.material.toneMapped=ss.getTransfer(E.colorSpace)!==Cs,E.matrixAutoUpdate===!0&&E.updateMatrix(),c.material.uniforms.uvTransform.value.copy(E.matrix),(d!==E||h!==E.version||f!==t.toneMapping)&&(c.material.needsUpdate=!0,d=E,h=E.version,f=t.toneMapping),c.layers.enableAll(),S.unshift(c,c.geometry,c.material,0,0,null))}function g(S,_){S.getRGB(l_,SG(t)),i.buffers.color.setClear(l_.r,l_.g,l_.b,_,o)}function x(){u!==void 0&&(u.geometry.dispose(),u.material.dispose()),c!==void 0&&(c.geometry.dispose(),c.material.dispose())}return{getClearColor:function(){return a},setClearColor:function(S,_=1){a.set(S),l=_,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(S){l=S,g(a,l)},render:m,addToRenderList:b,dispose:x}}function cNe(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),i={},s=h(null);let r=s,o=!1;function a(k,B,R,H,q){let oe=!1;const Z=d(H,R,B);r!==Z&&(r=Z,c(r.object)),oe=f(k,H,R,q),oe&&p(k,H,R,q),q!==null&&e.update(q,t.ELEMENT_ARRAY_BUFFER),(oe||o)&&(o=!1,_(k,B,R,H),q!==null&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(q).buffer))}function l(){return t.createVertexArray()}function c(k){return t.bindVertexArray(k)}function u(k){return t.deleteVertexArray(k)}function d(k,B,R){const H=R.wireframe===!0;let q=i[k.id];q===void 0&&(q={},i[k.id]=q);let oe=q[B.id];oe===void 0&&(oe={},q[B.id]=oe);let Z=oe[H];return Z===void 0&&(Z=h(l()),oe[H]=Z),Z}function h(k){const B=[],R=[],H=[];for(let q=0;q=0){const W=q[D];let Q=oe[D];if(Q===void 0&&(D==="instanceMatrix"&&k.instanceMatrix&&(Q=k.instanceMatrix),D==="instanceColor"&&k.instanceColor&&(Q=k.instanceColor)),W===void 0||W.attribute!==Q||Q&&W.data!==Q.data)return!0;Z++}return r.attributesNum!==Z||r.index!==H}function p(k,B,R,H){const q={},oe=B.attributes;let Z=0;const V=R.getAttributes();for(const D in V)if(V[D].location>=0){let W=oe[D];W===void 0&&(D==="instanceMatrix"&&k.instanceMatrix&&(W=k.instanceMatrix),D==="instanceColor"&&k.instanceColor&&(W=k.instanceColor));const Q={};Q.attribute=W,W&&W.data&&(Q.data=W.data),q[D]=Q,Z++}r.attributes=q,r.attributesNum=Z,r.index=H}function m(){const k=r.newAttributes;for(let B=0,R=k.length;B=0){let K=q[V];if(K===void 0&&(V==="instanceMatrix"&&k.instanceMatrix&&(K=k.instanceMatrix),V==="instanceColor"&&k.instanceColor&&(K=k.instanceColor)),K!==void 0){const W=K.normalized,Q=K.itemSize,ie=e.get(K);if(ie===void 0)continue;const ne=ie.buffer,ce=ie.type,ae=ie.bytesPerElement,_e=ce===t.INT||ce===t.UNSIGNED_INT||K.gpuType===Y4;if(K.isInterleavedBufferAttribute){const ke=K.data,Te=ke.stride,Ke=K.offset;if(ke.isInstancedInterleavedBuffer){for(let Fe=0;Fe0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";A="mediump"}return A==="mediump"&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let c=n.precision!==void 0?n.precision:"highp";const u=l(c);u!==c&&(console.warn("THREE.WebGLRenderer:",c,"not supported, using",u,"instead."),c=u);const d=n.logarithmicDepthBuffer===!0,h=n.reverseDepthBuffer===!0&&e.has("EXT_clip_control"),f=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),p=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),m=t.getParameter(t.MAX_TEXTURE_SIZE),b=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),g=t.getParameter(t.MAX_VERTEX_ATTRIBS),x=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),S=t.getParameter(t.MAX_VARYING_VECTORS),_=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),E=p>0,T=t.getParameter(t.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:r,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:c,logarithmicDepthBuffer:d,reverseDepthBuffer:h,maxTextures:f,maxVertexTextures:p,maxTextureSize:m,maxCubemapSize:b,maxAttributes:g,maxVertexUniforms:x,maxVaryings:S,maxFragmentUniforms:_,vertexTextures:E,maxSamples:T}}function hNe(t){const e=this;let n=null,i=0,s=!1,r=!1;const o=new Qd,a=new Ii,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,h){const f=d.length!==0||h||i!==0||s;return s=h,i=d.length,f},this.beginShadows=function(){r=!0,u(null)},this.endShadows=function(){r=!1},this.setGlobalState=function(d,h){n=u(d,h,0)},this.setState=function(d,h,f){const p=d.clippingPlanes,m=d.clipIntersection,b=d.clipShadows,g=t.get(d);if(!s||p===null||p.length===0||r&&!b)r?u(null):c();else{const x=r?0:i,S=x*4;let _=g.clippingState||null;l.value=_,_=u(p,h,S,f);for(let E=0;E!==S;++E)_[E]=n[E];g.clippingState=_,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==n&&(l.value=n,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function u(d,h,f,p){const m=d!==null?d.length:0;let b=null;if(m!==0){if(b=l.value,p!==!0||b===null){const g=f+m*4,x=h.matrixWorldInverse;a.getNormalMatrix(x),(b===null||b.length0){const c=new I5e(l.height);return c.fromEquirectangularTexture(t,o),e.set(o,c),o.addEventListener("dispose",s),n(c.texture,o.mapping)}else return null}}return o}function s(o){const a=o.target;a.removeEventListener("dispose",s);const l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function r(){e=new WeakMap}return{get:i,dispose:r}}const Dm=4,OR=[.125,.215,.35,.446,.526,.582],gf=20,lC=new rP,DR=new Wi;let cC=null,uC=0,dC=0,hC=!1;const cf=(1+Math.sqrt(5))/2,um=1/cf,NR=[new ct(-cf,um,0),new ct(cf,um,0),new ct(-um,0,cf),new ct(um,0,cf),new ct(0,cf,-um),new ct(0,cf,um),new ct(-1,1,-1),new ct(1,1,-1),new ct(-1,1,1),new ct(1,1,1)];class BR{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,i=.1,s=100){cC=this._renderer.getRenderTarget(),uC=this._renderer.getActiveCubeFace(),dC=this._renderer.getActiveMipmapLevel(),hC=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const r=this._allocateTargets();return r.depthBuffer=!0,this._sceneToCubeUV(e,i,s,r),n>0&&this._blur(r,0,0,n),this._applyPMREM(r),this._cleanup(r),r}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=UR(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=zR(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?S:0,S,S),u.setRenderTarget(s),m&&u.render(p,a),u.render(e,a)}p.geometry.dispose(),p.material.dispose(),u.toneMapping=h,u.autoClear=d,e.background=b}_textureToCubeUV(e,n){const i=this._renderer,s=e.mapping===xg||e.mapping===Sg;s?(this._cubemapMaterial===null&&(this._cubemapMaterial=UR()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=zR());const r=s?this._cubemapMaterial:this._equirectMaterial,o=new xr(this._lodPlanes[0],r),a=r.uniforms;a.envMap.value=e;const l=this._cubeSize;c_(n,0,0,3*l,2*l),i.setRenderTarget(n),i.render(o,lC)}_applyPMREM(e){const n=this._renderer,i=n.autoClear;n.autoClear=!1;const s=this._lodPlanes.length;for(let r=1;rgf&&console.warn(`sigmaRadians, ${r}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${gf}`);const g=[];let x=0;for(let A=0;AS-Dm?s-S+Dm:0),T=4*(this._cubeSize-_);c_(n,E,T,3*_,2*_),l.setRenderTarget(n),l.render(d,lC)}}function pNe(t){const e=[],n=[],i=[];let s=t;const r=t-Dm+1+OR.length;for(let o=0;ot-Dm?l=OR[o-t+Dm-1]:o===0&&(l=0),i.push(l);const c=1/(a-2),u=-c,d=1+c,h=[u,u,d,u,d,d,u,u,d,d,u,d],f=6,p=6,m=3,b=2,g=1,x=new Float32Array(m*p*f),S=new Float32Array(b*p*f),_=new Float32Array(g*p*f);for(let T=0;T2?0:-1,P=[A,I,0,A+2/3,I,0,A+2/3,I+1,0,A,I,0,A+2/3,I+1,0,A,I+1,0];x.set(P,m*p*T),S.set(h,b*p*T);const k=[T,T,T,T,T,T];_.set(k,g*p*T)}const E=new es;E.setAttribute("position",new us(x,m)),E.setAttribute("uv",new us(S,b)),E.setAttribute("faceIndex",new us(_,g)),e.push(E),s>Dm&&s--}return{lodPlanes:e,sizeLods:n,sigmas:i}}function FR(t,e,n){const i=new np(t,e,n);return i.texture.mapping=tS,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function c_(t,e,n,i,s){t.viewport.set(e,n,i,s),t.scissor.set(e,n,i,s)}function mNe(t,e,n){const i=new Float32Array(gf),s=new ct(0,1,0);return new Yl({name:"SphericalGaussianBlur",defines:{n:gf,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${t}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:s}},vertexShader:oP(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; uniform int samples; uniform float weights[ n ]; uniform bool latitudinal; uniform float dTheta; uniform float mipInt; uniform vec3 poleAxis; #define ENVMAP_TYPE_CUBE_UV #include vec3 getSample( float theta, vec3 axis ) { float cosTheta = cos( theta ); // Rodrigues' axis-angle rotation vec3 sampleDirection = vOutputDirection * cosTheta + cross( axis, vOutputDirection ) * sin( theta ) + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); return bilinearCubeUV( envMap, sampleDirection, mipInt ); } void main() { vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); if ( all( equal( axis, vec3( 0.0 ) ) ) ) { axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); } axis = normalize( axis ); gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); for ( int i = 1; i < n; i++ ) { if ( i >= samples ) { break; } float theta = dTheta * float( i ); gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); } } `,blending:fh,depthTest:!1,depthWrite:!1})}function zR(){return new Yl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:oP(),fragmentShader:` precision mediump float; precision mediump int; varying vec3 vOutputDirection; uniform sampler2D envMap; #include void main() { vec3 outputDirection = normalize( vOutputDirection ); vec2 uv = equirectUv( outputDirection ); gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } `,blending:fh,depthTest:!1,depthWrite:!1})}function UR(){return new Yl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:oP(),fragmentShader:` precision mediump float; precision mediump int; uniform float flipEnvMap; varying vec3 vOutputDirection; uniform samplerCube envMap; void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } `,blending:fh,depthTest:!1,depthWrite:!1})}function oP(){return` precision mediump float; precision mediump int; attribute float faceIndex; varying vec3 vOutputDirection; // RH coordinate system; PMREM face-indexing convention vec3 getDirection( vec2 uv, float face ) { uv = 2.0 * uv - 1.0; vec3 direction = vec3( uv, 1.0 ); if ( face == 0.0 ) { direction = direction.zyx; // ( 1, v, u ) pos x } else if ( face == 1.0 ) { direction = direction.xzy; direction.xz *= -1.0; // ( -u, 1, -v ) pos y } else if ( face == 2.0 ) { direction.x *= -1.0; // ( -u, v, 1 ) pos z } else if ( face == 3.0 ) { direction = direction.zyx; direction.xz *= -1.0; // ( -1, v, -u ) neg x } else if ( face == 4.0 ) { direction = direction.xzy; direction.xy *= -1.0; // ( -u, -1, v ) neg y } else if ( face == 5.0 ) { direction.z *= -1.0; // ( u, v, -1 ) neg z } return direction; } void main() { vOutputDirection = getDirection( uv, faceIndex ); gl_Position = vec4( position, 1.0 ); } `}function gNe(t){let e=new WeakMap,n=null;function i(a){if(a&&a.isTexture){const l=a.mapping,c=l===GM||l===jM,u=l===xg||l===Sg;if(c||u){let d=e.get(a);const h=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==h)return n===null&&(n=new BR(t)),d=c?n.fromEquirectangular(a,d):n.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),d.texture;if(d!==void 0)return d.texture;{const f=a.image;return c&&f&&f.height>0||u&&f&&s(f)?(n===null&&(n=new BR(t)),d=c?n.fromEquirectangular(a):n.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),a.addEventListener("dispose",r),d.texture):null}}}return a}function s(a){let l=0;const c=6;for(let u=0;ue.maxTextureSize&&(E=Math.ceil(_/e.maxTextureSize),_=e.maxTextureSize);const T=new Float32Array(_*E*4*d),A=new wG(T,_,E,d);A.type=Fu,A.needsUpdate=!0;const I=S*4;for(let k=0;k0)return t;const s=e*n;let r=VR[s];if(r===void 0&&(r=new Float32Array(s),VR[s]=r),e!==0){i.toArray(r,0);for(let o=1,a=0;o!==e;++o)a+=n,t[o].toArray(r,a)}return r}function Nr(t,e){if(t.length!==e.length)return!1;for(let n=0,i=t.length;n":" "} ${a}: ${n[o]}`)}return i.join(` `)}const YR=new Ii;function gBe(t){ss._getMatrix(YR,ss.workingColorSpace,t);const e=`mat3( ${YR.elements.map(n=>n.toFixed(4))} )`;switch(ss.getTransfer(t)){case M2:return[e,"LinearTransferOETF"];case Cs:return[e,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",t),[e,"LinearTransferOETF"]}}function XR(t,e,n){const i=t.getShaderParameter(e,t.COMPILE_STATUS),s=t.getShaderInfoLog(e).trim();if(i&&s==="")return"";const r=/ERROR: 0:(\d+)/.exec(s);if(r){const o=parseInt(r[1]);return n.toUpperCase()+` `+s+` `+mBe(t.getShaderSource(e),o)}else return s}function vBe(t,e){const n=gBe(e);return[`vec4 ${t}( vec4 value ) {`,` return ${n[1]}( vec4( value.rgb * ${n[0]}, value.a ) );`,"}"].join(` `)}function yBe(t,e){let n;switch(e){case M6e:n="Linear";break;case A6e:n="Reinhard";break;case k6e:n="Cineon";break;case P6e:n="ACESFilmic";break;case I6e:n="AgX";break;case R6e:n="Neutral";break;case L6e:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const u_=new ct;function bBe(){ss.getLuminanceCoefficients(u_);const t=u_.x.toFixed(4),e=u_.y.toFixed(4),n=u_.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${t}, ${e}, ${n} );`," return dot( weights, rgb );","}"].join(` `)}function _Be(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(jv).join(` `)}function wBe(t){const e=[];for(const n in t){const i=t[n];i!==!1&&e.push("#define "+n+" "+i)}return e.join(` `)}function xBe(t,e){const n={},i=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let s=0;s/gm;function M3(t){return t.replace(SBe,CBe)}const EBe=new Map;function CBe(t,e){let n=zi[e];if(n===void 0){const i=EBe.get(e);if(i!==void 0)n=zi[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return M3(n)}const TBe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function QR(t){return t.replace(TBe,MBe)}function MBe(t,e,n,i){let s="";for(let r=parseInt(e);r0&&(b+=` `),g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p].filter(jv).join(` `),g.length>0&&(g+=` `)):(b=[eO(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&n.flatShading===!1?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(jv).join(` `),g=[eO(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,p,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+d:"",h?"#define CUBEUV_TEXEL_WIDTH "+h.texelWidth:"",h?"#define CUBEUV_TEXEL_HEIGHT "+h.texelHeight:"",h?"#define CUBEUV_MAX_MIP "+h.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&n.flatShading===!1?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==ph?"#define TONE_MAPPING":"",n.toneMapping!==ph?zi.tonemapping_pars_fragment:"",n.toneMapping!==ph?yBe("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",zi.colorspace_pars_fragment,vBe("linearToOutputTexel",n.outputColorSpace),bBe(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"",` `].filter(jv).join(` `)),o=M3(o),o=ZR(o,n),o=JR(o,n),a=M3(a),a=ZR(a,n),a=JR(a,n),o=QR(o),a=QR(a),n.isRawShaderMaterial!==!0&&(x=`#version 300 es `,b=[f,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+b,g=["#define varying in",n.glslVersion===Z5?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===Z5?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` `)+` `+g);const S=x+b+o,_=x+g+a,E=qR(s,s.VERTEX_SHADER,S),T=qR(s,s.FRAGMENT_SHADER,_);s.attachShader(m,E),s.attachShader(m,T),n.index0AttributeName!==void 0?s.bindAttribLocation(m,0,n.index0AttributeName):n.morphTargets===!0&&s.bindAttribLocation(m,0,"position"),s.linkProgram(m);function A(B){if(t.debug.checkShaderErrors){const R=s.getProgramInfoLog(m).trim(),H=s.getShaderInfoLog(E).trim(),q=s.getShaderInfoLog(T).trim();let oe=!0,Z=!0;if(s.getProgramParameter(m,s.LINK_STATUS)===!1)if(oe=!1,typeof t.debug.onShaderError=="function")t.debug.onShaderError(s,m,E,T);else{const V=XR(s,E,"vertex"),D=XR(s,T,"fragment");console.error("THREE.WebGLProgram: Shader Error "+s.getError()+" - VALIDATE_STATUS "+s.getProgramParameter(m,s.VALIDATE_STATUS)+` Material Name: `+B.name+` Material Type: `+B.type+` Program Info Log: `+R+` `+V+` `+D)}else R!==""?console.warn("THREE.WebGLProgram: Program Info Log:",R):(H===""||q==="")&&(Z=!1);Z&&(B.diagnostics={runnable:oe,programLog:R,vertexShader:{log:H,prefix:b},fragmentShader:{log:q,prefix:g}})}s.deleteShader(E),s.deleteShader(T),I=new Mw(s,m),P=xBe(s,m)}let I;this.getUniforms=function(){return I===void 0&&A(this),I};let P;this.getAttributes=function(){return P===void 0&&A(this),P};let k=n.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return k===!1&&(k=s.getProgramParameter(m,fBe)),k},this.destroy=function(){i.releaseStatesOfProgram(this),s.deleteProgram(m),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=pBe++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=E,this.fragmentShader=T,this}let OBe=0;class DBe{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const n=e.vertexShader,i=e.fragmentShader,s=this._getShaderStage(n),r=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(s)===!1&&(o.add(s),s.usedTimes++),o.has(r)===!1&&(o.add(r),r.usedTimes++),this}remove(e){const n=this.materialCache.get(e);for(const i of n)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const n=this.materialCache;let i=n.get(e);return i===void 0&&(i=new Set,n.set(e,i)),i}_getShaderStage(e){const n=this.shaderCache;let i=n.get(e);return i===void 0&&(i=new NBe(e),n.set(e,i)),i}}class NBe{constructor(e){this.id=OBe++,this.code=e,this.usedTimes=0}}function BBe(t,e,n,i,s,r,o){const a=new nP,l=new DBe,c=new Set,u=[],d=s.logarithmicDepthBuffer,h=s.vertexTextures;let f=s.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function m(P){return c.add(P),P===0?"uv":`uv${P}`}function b(P,k,B,R,H){const q=R.fog,oe=H.geometry,Z=P.isMeshStandardMaterial?R.environment:null,V=(P.isMeshStandardMaterial?n:e).get(P.envMap||Z),D=V&&V.mapping===tS?V.image.height:null,K=p[P.type];P.precision!==null&&(f=s.getMaxPrecision(P.precision),f!==P.precision&&console.warn("THREE.WebGLProgram.getParameters:",P.precision,"not supported, using",f,"instead."));const W=oe.morphAttributes.position||oe.morphAttributes.normal||oe.morphAttributes.color,Q=W!==void 0?W.length:0;let ie=0;oe.morphAttributes.position!==void 0&&(ie=1),oe.morphAttributes.normal!==void 0&&(ie=2),oe.morphAttributes.color!==void 0&&(ie=3);let ne,ce,ae,_e;if(K){const rt=Tc[K];ne=rt.vertexShader,ce=rt.fragmentShader}else ne=P.vertexShader,ce=P.fragmentShader,l.update(P),ae=l.getVertexShaderID(P),_e=l.getFragmentShaderID(P);const ke=t.getRenderTarget(),Te=t.state.buffers.depth.getReversed(),Ke=H.isInstancedMesh===!0,Fe=H.isBatchedMesh===!0,ve=!!P.map,fe=!!P.matcap,Me=!!V,ge=!!P.aoMap,Qe=!!P.lightMap,G=!!P.bumpMap,ee=!!P.normalMap,j=!!P.displacementMap,he=!!P.emissiveMap,be=!!P.metalnessMap,re=!!P.roughnessMap,le=P.anisotropy>0,Ce=P.clearcoat>0,Ee=P.dispersion>0,Oe=P.iridescence>0,Ge=P.sheen>0,$e=P.transmission>0,ot=le&&!!P.anisotropyMap,dt=Ce&&!!P.clearcoatMap,Jt=Ce&&!!P.clearcoatNormalMap,at=Ce&&!!P.clearcoatRoughnessMap,Mt=Oe&&!!P.iridescenceMap,Bt=Oe&&!!P.iridescenceThicknessMap,$t=Ge&&!!P.sheenColorMap,Ze=Ge&&!!P.sheenRoughnessMap,vt=!!P.specularMap,qe=!!P.specularColorMap,kt=!!P.specularIntensityMap,Je=$e&&!!P.transmissionMap,Ft=$e&&!!P.thicknessMap,Ne=!!P.gradientMap,et=!!P.alphaMap,ut=P.alphaTest>0,Qt=!!P.alphaHash,Cn=!!P.extensions;let ei=ph;P.toneMapped&&(ke===null||ke.isXRRenderTarget===!0)&&(ei=t.toneMapping);const Tt={shaderID:K,shaderType:P.type,shaderName:P.name,vertexShader:ne,fragmentShader:ce,defines:P.defines,customVertexShaderID:ae,customFragmentShaderID:_e,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:f,batching:Fe,batchingColor:Fe&&H._colorsTexture!==null,instancing:Ke,instancingColor:Ke&&H.instanceColor!==null,instancingMorph:Ke&&H.morphTexture!==null,supportsVertexTextures:h,outputColorSpace:ke===null?t.outputColorSpace:ke.isXRRenderTarget===!0?ke.texture.colorSpace:Tg,alphaToCoverage:!!P.alphaToCoverage,map:ve,matcap:fe,envMap:Me,envMapMode:Me&&V.mapping,envMapCubeUVHeight:D,aoMap:ge,lightMap:Qe,bumpMap:G,normalMap:ee,displacementMap:h&&j,emissiveMap:he,normalMapObjectSpace:ee&&P.normalMapType===F6e,normalMapTangentSpace:ee&&P.normalMapType===B6e,metalnessMap:be,roughnessMap:re,anisotropy:le,anisotropyMap:ot,clearcoat:Ce,clearcoatMap:dt,clearcoatNormalMap:Jt,clearcoatRoughnessMap:at,dispersion:Ee,iridescence:Oe,iridescenceMap:Mt,iridescenceThicknessMap:Bt,sheen:Ge,sheenColorMap:$t,sheenRoughnessMap:Ze,specularMap:vt,specularColorMap:qe,specularIntensityMap:kt,transmission:$e,transmissionMap:Je,thicknessMap:Ft,gradientMap:Ne,opaque:P.transparent===!1&&P.blending===Km&&P.alphaToCoverage===!1,alphaMap:et,alphaTest:ut,alphaHash:Qt,combine:P.combine,mapUv:ve&&m(P.map.channel),aoMapUv:ge&&m(P.aoMap.channel),lightMapUv:Qe&&m(P.lightMap.channel),bumpMapUv:G&&m(P.bumpMap.channel),normalMapUv:ee&&m(P.normalMap.channel),displacementMapUv:j&&m(P.displacementMap.channel),emissiveMapUv:he&&m(P.emissiveMap.channel),metalnessMapUv:be&&m(P.metalnessMap.channel),roughnessMapUv:re&&m(P.roughnessMap.channel),anisotropyMapUv:ot&&m(P.anisotropyMap.channel),clearcoatMapUv:dt&&m(P.clearcoatMap.channel),clearcoatNormalMapUv:Jt&&m(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:at&&m(P.clearcoatRoughnessMap.channel),iridescenceMapUv:Mt&&m(P.iridescenceMap.channel),iridescenceThicknessMapUv:Bt&&m(P.iridescenceThicknessMap.channel),sheenColorMapUv:$t&&m(P.sheenColorMap.channel),sheenRoughnessMapUv:Ze&&m(P.sheenRoughnessMap.channel),specularMapUv:vt&&m(P.specularMap.channel),specularColorMapUv:qe&&m(P.specularColorMap.channel),specularIntensityMapUv:kt&&m(P.specularIntensityMap.channel),transmissionMapUv:Je&&m(P.transmissionMap.channel),thicknessMapUv:Ft&&m(P.thicknessMap.channel),alphaMapUv:et&&m(P.alphaMap.channel),vertexTangents:!!oe.attributes.tangent&&(ee||le),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!oe.attributes.color&&oe.attributes.color.itemSize===4,pointsUvs:H.isPoints===!0&&!!oe.attributes.uv&&(ve||et),fog:!!q,useFog:P.fog===!0,fogExp2:!!q&&q.isFogExp2,flatShading:P.flatShading===!0,sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:Te,skinning:H.isSkinnedMesh===!0,morphTargets:oe.morphAttributes.position!==void 0,morphNormals:oe.morphAttributes.normal!==void 0,morphColors:oe.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:ie,numDirLights:k.directional.length,numPointLights:k.point.length,numSpotLights:k.spot.length,numSpotLightMaps:k.spotLightMap.length,numRectAreaLights:k.rectArea.length,numHemiLights:k.hemi.length,numDirLightShadows:k.directionalShadowMap.length,numPointLightShadows:k.pointShadowMap.length,numSpotLightShadows:k.spotShadowMap.length,numSpotLightShadowsWithMaps:k.numSpotLightShadowsWithMaps,numLightProbes:k.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:P.dithering,shadowMapEnabled:t.shadowMap.enabled&&B.length>0,shadowMapType:t.shadowMap.type,toneMapping:ei,decodeVideoTexture:ve&&P.map.isVideoTexture===!0&&ss.getTransfer(P.map.colorSpace)===Cs,decodeVideoTextureEmissive:he&&P.emissiveMap.isVideoTexture===!0&&ss.getTransfer(P.emissiveMap.colorSpace)===Cs,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===Ac,flipSided:P.side===ma,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionClipCullDistance:Cn&&P.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Cn&&P.extensions.multiDraw===!0||Fe)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()};return Tt.vertexUv1s=c.has(1),Tt.vertexUv2s=c.has(2),Tt.vertexUv3s=c.has(3),c.clear(),Tt}function g(P){const k=[];if(P.shaderID?k.push(P.shaderID):(k.push(P.customVertexShaderID),k.push(P.customFragmentShaderID)),P.defines!==void 0)for(const B in P.defines)k.push(B),k.push(P.defines[B]);return P.isRawShaderMaterial===!1&&(x(k,P),S(k,P),k.push(t.outputColorSpace)),k.push(P.customProgramCacheKey),k.join()}function x(P,k){P.push(k.precision),P.push(k.outputColorSpace),P.push(k.envMapMode),P.push(k.envMapCubeUVHeight),P.push(k.mapUv),P.push(k.alphaMapUv),P.push(k.lightMapUv),P.push(k.aoMapUv),P.push(k.bumpMapUv),P.push(k.normalMapUv),P.push(k.displacementMapUv),P.push(k.emissiveMapUv),P.push(k.metalnessMapUv),P.push(k.roughnessMapUv),P.push(k.anisotropyMapUv),P.push(k.clearcoatMapUv),P.push(k.clearcoatNormalMapUv),P.push(k.clearcoatRoughnessMapUv),P.push(k.iridescenceMapUv),P.push(k.iridescenceThicknessMapUv),P.push(k.sheenColorMapUv),P.push(k.sheenRoughnessMapUv),P.push(k.specularMapUv),P.push(k.specularColorMapUv),P.push(k.specularIntensityMapUv),P.push(k.transmissionMapUv),P.push(k.thicknessMapUv),P.push(k.combine),P.push(k.fogExp2),P.push(k.sizeAttenuation),P.push(k.morphTargetsCount),P.push(k.morphAttributeCount),P.push(k.numDirLights),P.push(k.numPointLights),P.push(k.numSpotLights),P.push(k.numSpotLightMaps),P.push(k.numHemiLights),P.push(k.numRectAreaLights),P.push(k.numDirLightShadows),P.push(k.numPointLightShadows),P.push(k.numSpotLightShadows),P.push(k.numSpotLightShadowsWithMaps),P.push(k.numLightProbes),P.push(k.shadowMapType),P.push(k.toneMapping),P.push(k.numClippingPlanes),P.push(k.numClipIntersection),P.push(k.depthPacking)}function S(P,k){a.disableAll(),k.supportsVertexTextures&&a.enable(0),k.instancing&&a.enable(1),k.instancingColor&&a.enable(2),k.instancingMorph&&a.enable(3),k.matcap&&a.enable(4),k.envMap&&a.enable(5),k.normalMapObjectSpace&&a.enable(6),k.normalMapTangentSpace&&a.enable(7),k.clearcoat&&a.enable(8),k.iridescence&&a.enable(9),k.alphaTest&&a.enable(10),k.vertexColors&&a.enable(11),k.vertexAlphas&&a.enable(12),k.vertexUv1s&&a.enable(13),k.vertexUv2s&&a.enable(14),k.vertexUv3s&&a.enable(15),k.vertexTangents&&a.enable(16),k.anisotropy&&a.enable(17),k.alphaHash&&a.enable(18),k.batching&&a.enable(19),k.dispersion&&a.enable(20),k.batchingColor&&a.enable(21),P.push(a.mask),a.disableAll(),k.fog&&a.enable(0),k.useFog&&a.enable(1),k.flatShading&&a.enable(2),k.logarithmicDepthBuffer&&a.enable(3),k.reverseDepthBuffer&&a.enable(4),k.skinning&&a.enable(5),k.morphTargets&&a.enable(6),k.morphNormals&&a.enable(7),k.morphColors&&a.enable(8),k.premultipliedAlpha&&a.enable(9),k.shadowMapEnabled&&a.enable(10),k.doubleSided&&a.enable(11),k.flipSided&&a.enable(12),k.useDepthPacking&&a.enable(13),k.dithering&&a.enable(14),k.transmission&&a.enable(15),k.sheen&&a.enable(16),k.opaque&&a.enable(17),k.pointsUvs&&a.enable(18),k.decodeVideoTexture&&a.enable(19),k.decodeVideoTextureEmissive&&a.enable(20),k.alphaToCoverage&&a.enable(21),P.push(a.mask)}function _(P){const k=p[P.type];let B;if(k){const R=Tc[k];B=EG.clone(R.uniforms)}else B=P.uniforms;return B}function E(P,k){let B;for(let R=0,H=u.length;R0?i.push(g):f.transparent===!0?s.push(g):n.push(g)}function l(d,h,f,p,m,b){const g=o(d,h,f,p,m,b);f.transmission>0?i.unshift(g):f.transparent===!0?s.unshift(g):n.unshift(g)}function c(d,h){n.length>1&&n.sort(d||zBe),i.length>1&&i.sort(h||tO),s.length>1&&s.sort(h||tO)}function u(){for(let d=e,h=t.length;d=r.length?(o=new nO,r.push(o)):o=r[s],o}function n(){t=new WeakMap}return{get:e,dispose:n}}function $Be(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new ct,color:new Wi};break;case"SpotLight":n={position:new ct,direction:new ct,color:new Wi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new ct,color:new Wi,distance:0,decay:0};break;case"HemisphereLight":n={direction:new ct,skyColor:new Wi,groundColor:new Wi};break;case"RectAreaLight":n={color:new Wi,position:new ct,halfWidth:new ct,halfHeight:new ct};break}return t[e.id]=n,n}}}function VBe(){const t={};return{get:function(e){if(t[e.id]!==void 0)return t[e.id];let n;switch(e.type){case"DirectionalLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new vn};break;case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new vn};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new vn,shadowCameraNear:1,shadowCameraFar:1e3};break}return t[e.id]=n,n}}}let HBe=0;function WBe(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function GBe(t){const e=new $Be,n=VBe(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new ct);const s=new ct,r=new ps,o=new ps;function a(c){let u=0,d=0,h=0;for(let P=0;P<9;P++)i.probe[P].set(0,0,0);let f=0,p=0,m=0,b=0,g=0,x=0,S=0,_=0,E=0,T=0,A=0;c.sort(WBe);for(let P=0,k=c.length;P0&&(t.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=kn.LTC_FLOAT_1,i.rectAreaLTC2=kn.LTC_FLOAT_2):(i.rectAreaLTC1=kn.LTC_HALF_1,i.rectAreaLTC2=kn.LTC_HALF_2)),i.ambient[0]=u,i.ambient[1]=d,i.ambient[2]=h;const I=i.hash;(I.directionalLength!==f||I.pointLength!==p||I.spotLength!==m||I.rectAreaLength!==b||I.hemiLength!==g||I.numDirectionalShadows!==x||I.numPointShadows!==S||I.numSpotShadows!==_||I.numSpotMaps!==E||I.numLightProbes!==A)&&(i.directional.length=f,i.spot.length=m,i.rectArea.length=b,i.point.length=p,i.hemi.length=g,i.directionalShadow.length=x,i.directionalShadowMap.length=x,i.pointShadow.length=S,i.pointShadowMap.length=S,i.spotShadow.length=_,i.spotShadowMap.length=_,i.directionalShadowMatrix.length=x,i.pointShadowMatrix.length=S,i.spotLightMatrix.length=_+E-T,i.spotLightMap.length=E,i.numSpotLightShadowsWithMaps=T,i.numLightProbes=A,I.directionalLength=f,I.pointLength=p,I.spotLength=m,I.rectAreaLength=b,I.hemiLength=g,I.numDirectionalShadows=x,I.numPointShadows=S,I.numSpotShadows=_,I.numSpotMaps=E,I.numLightProbes=A,i.version=HBe++)}function l(c,u){let d=0,h=0,f=0,p=0,m=0;const b=u.matrixWorldInverse;for(let g=0,x=c.length;g=o.length?(a=new iO(t),o.push(a)):a=o[r],a}function i(){e=new WeakMap}return{get:n,dispose:i}}const KBe=`void main() { gl_Position = vec4( position, 1.0 ); }`,qBe=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include void main() { const float samples = float( VSM_SAMPLES ); float mean = 0.0; float squared_mean = 0.0; float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); float uvStart = samples <= 1.0 ? 0.0 : - 1.0; for ( float i = 0.0; i < samples; i ++ ) { float uvOffset = uvStart + i * uvStride; #ifdef HORIZONTAL_PASS vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); mean += distribution.x; squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; #else float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); mean += depth; squared_mean += depth * depth; #endif } mean = mean / samples; squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); }`;function YBe(t,e,n){let i=new kG;const s=new vn,r=new vn,o=new Zs,a=new mRe({depthPacking:N6e}),l=new gRe,c={},u=n.maxTextureSize,d={[Mh]:ma,[ma]:Mh,[Ac]:Ac},h=new Yl({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new vn},radius:{value:4}},vertexShader:KBe,fragmentShader:qBe}),f=h.clone();f.defines.HORIZONTAL_PASS=1;const p=new es;p.setAttribute("position",new us(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new xr(p,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=rG;let g=this.type;this.render=function(T,A,I){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||T.length===0)return;const P=t.getRenderTarget(),k=t.getActiveCubeFace(),B=t.getActiveMipmapLevel(),R=t.state;R.setBlending(fh),R.buffers.color.setClear(1,1,1,1),R.buffers.depth.setTest(!0),R.setScissorTest(!1);const H=g!==Mu&&this.type===Mu,q=g===Mu&&this.type!==Mu;for(let oe=0,Z=T.length;oeu||s.y>u)&&(s.x>u&&(r.x=Math.floor(u/K.x),s.x=r.x*K.x,D.mapSize.x=r.x),s.y>u&&(r.y=Math.floor(u/K.y),s.y=r.y*K.y,D.mapSize.y=r.y)),D.map===null||H===!0||q===!0){const Q=this.type!==Mu?{minFilter:Ul,magFilter:Ul}:{};D.map!==null&&D.map.dispose(),D.map=new np(s.x,s.y,Q),D.map.texture.name=V.name+".shadowMap",D.camera.updateProjectionMatrix()}t.setRenderTarget(D.map),t.clear();const W=D.getViewportCount();for(let Q=0;Q0||A.map&&A.alphaTest>0){const R=k.uuid,H=A.uuid;let q=c[R];q===void 0&&(q={},c[R]=q);let oe=q[H];oe===void 0&&(oe=k.clone(),q[H]=oe,A.addEventListener("dispose",E)),k=oe}if(k.visible=A.visible,k.wireframe=A.wireframe,P===Mu?k.side=A.shadowSide!==null?A.shadowSide:A.side:k.side=A.shadowSide!==null?A.shadowSide:d[A.side],k.alphaMap=A.alphaMap,k.alphaTest=A.alphaTest,k.map=A.map,k.clipShadows=A.clipShadows,k.clippingPlanes=A.clippingPlanes,k.clipIntersection=A.clipIntersection,k.displacementMap=A.displacementMap,k.displacementScale=A.displacementScale,k.displacementBias=A.displacementBias,k.wireframeLinewidth=A.wireframeLinewidth,k.linewidth=A.linewidth,I.isPointLight===!0&&k.isMeshDistanceMaterial===!0){const R=t.properties.get(k);R.light=I}return k}function _(T,A,I,P,k){if(T.visible===!1)return;if(T.layers.test(A.layers)&&(T.isMesh||T.isLine||T.isPoints)&&(T.castShadow||T.receiveShadow&&k===Mu)&&(!T.frustumCulled||i.intersectsObject(T))){T.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,T.matrixWorld);const H=e.update(T),q=T.material;if(Array.isArray(q)){const oe=H.groups;for(let Z=0,V=oe.length;Z=1):D.indexOf("OpenGL ES")!==-1&&(V=parseFloat(/^OpenGL ES (\d)/.exec(D)[1]),Z=V>=2);let K=null,W={};const Q=t.getParameter(t.SCISSOR_BOX),ie=t.getParameter(t.VIEWPORT),ne=new Zs().fromArray(Q),ce=new Zs().fromArray(ie);function ae(Je,Ft,Ne,et){const ut=new Uint8Array(4),Qt=t.createTexture();t.bindTexture(Je,Qt),t.texParameteri(Je,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(Je,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let Cn=0;Cn"u"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new vn,u=new WeakMap;let d;const h=new WeakMap;let f=!1;try{f=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function p(re,le){return f?new OffscreenCanvas(re,le):dy("canvas")}function m(re,le,Ce){let Ee=1;const Oe=be(re);if((Oe.width>Ce||Oe.height>Ce)&&(Ee=Ce/Math.max(Oe.width,Oe.height)),Ee<1)if(typeof HTMLImageElement<"u"&&re instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&re instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&re instanceof ImageBitmap||typeof VideoFrame<"u"&&re instanceof VideoFrame){const Ge=Math.floor(Ee*Oe.width),$e=Math.floor(Ee*Oe.height);d===void 0&&(d=p(Ge,$e));const ot=le?p(Ge,$e):d;return ot.width=Ge,ot.height=$e,ot.getContext("2d").drawImage(re,0,0,Ge,$e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Oe.width+"x"+Oe.height+") to ("+Ge+"x"+$e+")."),ot}else return"data"in re&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Oe.width+"x"+Oe.height+")."),re;return re}function b(re){return re.generateMipmaps}function g(re){t.generateMipmap(re)}function x(re){return re.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:re.isWebGL3DRenderTarget?t.TEXTURE_3D:re.isWebGLArrayRenderTarget||re.isCompressedArrayTexture?t.TEXTURE_2D_ARRAY:t.TEXTURE_2D}function S(re,le,Ce,Ee,Oe=!1){if(re!==null){if(t[re]!==void 0)return t[re];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+re+"'")}let Ge=le;if(le===t.RED&&(Ce===t.FLOAT&&(Ge=t.R32F),Ce===t.HALF_FLOAT&&(Ge=t.R16F),Ce===t.UNSIGNED_BYTE&&(Ge=t.R8)),le===t.RED_INTEGER&&(Ce===t.UNSIGNED_BYTE&&(Ge=t.R8UI),Ce===t.UNSIGNED_SHORT&&(Ge=t.R16UI),Ce===t.UNSIGNED_INT&&(Ge=t.R32UI),Ce===t.BYTE&&(Ge=t.R8I),Ce===t.SHORT&&(Ge=t.R16I),Ce===t.INT&&(Ge=t.R32I)),le===t.RG&&(Ce===t.FLOAT&&(Ge=t.RG32F),Ce===t.HALF_FLOAT&&(Ge=t.RG16F),Ce===t.UNSIGNED_BYTE&&(Ge=t.RG8)),le===t.RG_INTEGER&&(Ce===t.UNSIGNED_BYTE&&(Ge=t.RG8UI),Ce===t.UNSIGNED_SHORT&&(Ge=t.RG16UI),Ce===t.UNSIGNED_INT&&(Ge=t.RG32UI),Ce===t.BYTE&&(Ge=t.RG8I),Ce===t.SHORT&&(Ge=t.RG16I),Ce===t.INT&&(Ge=t.RG32I)),le===t.RGB_INTEGER&&(Ce===t.UNSIGNED_BYTE&&(Ge=t.RGB8UI),Ce===t.UNSIGNED_SHORT&&(Ge=t.RGB16UI),Ce===t.UNSIGNED_INT&&(Ge=t.RGB32UI),Ce===t.BYTE&&(Ge=t.RGB8I),Ce===t.SHORT&&(Ge=t.RGB16I),Ce===t.INT&&(Ge=t.RGB32I)),le===t.RGBA_INTEGER&&(Ce===t.UNSIGNED_BYTE&&(Ge=t.RGBA8UI),Ce===t.UNSIGNED_SHORT&&(Ge=t.RGBA16UI),Ce===t.UNSIGNED_INT&&(Ge=t.RGBA32UI),Ce===t.BYTE&&(Ge=t.RGBA8I),Ce===t.SHORT&&(Ge=t.RGBA16I),Ce===t.INT&&(Ge=t.RGBA32I)),le===t.RGB&&Ce===t.UNSIGNED_INT_5_9_9_9_REV&&(Ge=t.RGB9_E5),le===t.RGBA){const $e=Oe?M2:ss.getTransfer(Ee);Ce===t.FLOAT&&(Ge=t.RGBA32F),Ce===t.HALF_FLOAT&&(Ge=t.RGBA16F),Ce===t.UNSIGNED_BYTE&&(Ge=$e===Cs?t.SRGB8_ALPHA8:t.RGBA8),Ce===t.UNSIGNED_SHORT_4_4_4_4&&(Ge=t.RGBA4),Ce===t.UNSIGNED_SHORT_5_5_5_1&&(Ge=t.RGB5_A1)}return(Ge===t.R16F||Ge===t.R32F||Ge===t.RG16F||Ge===t.RG32F||Ge===t.RGBA16F||Ge===t.RGBA32F)&&e.get("EXT_color_buffer_float"),Ge}function _(re,le){let Ce;return re?le===null||le===tp||le===Eg?Ce=t.DEPTH24_STENCIL8:le===Fu?Ce=t.DEPTH32F_STENCIL8:le===cy&&(Ce=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):le===null||le===tp||le===Eg?Ce=t.DEPTH_COMPONENT24:le===Fu?Ce=t.DEPTH_COMPONENT32F:le===cy&&(Ce=t.DEPTH_COMPONENT16),Ce}function E(re,le){return b(re)===!0||re.isFramebufferTexture&&re.minFilter!==Ul&&re.minFilter!==Rl?Math.log2(Math.max(le.width,le.height))+1:re.mipmaps!==void 0&&re.mipmaps.length>0?re.mipmaps.length:re.isCompressedTexture&&Array.isArray(re.image)?le.mipmaps.length:1}function T(re){const le=re.target;le.removeEventListener("dispose",T),I(le),le.isVideoTexture&&u.delete(le)}function A(re){const le=re.target;le.removeEventListener("dispose",A),k(le)}function I(re){const le=i.get(re);if(le.__webglInit===void 0)return;const Ce=re.source,Ee=h.get(Ce);if(Ee){const Oe=Ee[le.__cacheKey];Oe.usedTimes--,Oe.usedTimes===0&&P(re),Object.keys(Ee).length===0&&h.delete(Ce)}i.remove(re)}function P(re){const le=i.get(re);t.deleteTexture(le.__webglTexture);const Ce=re.source,Ee=h.get(Ce);delete Ee[le.__cacheKey],o.memory.textures--}function k(re){const le=i.get(re);if(re.depthTexture&&(re.depthTexture.dispose(),i.remove(re.depthTexture)),re.isWebGLCubeRenderTarget)for(let Ee=0;Ee<6;Ee++){if(Array.isArray(le.__webglFramebuffer[Ee]))for(let Oe=0;Oe=s.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+re+" texture units while this GPU supports only "+s.maxTextures),B+=1,re}function q(re){const le=[];return le.push(re.wrapS),le.push(re.wrapT),le.push(re.wrapR||0),le.push(re.magFilter),le.push(re.minFilter),le.push(re.anisotropy),le.push(re.internalFormat),le.push(re.format),le.push(re.type),le.push(re.generateMipmaps),le.push(re.premultiplyAlpha),le.push(re.flipY),le.push(re.unpackAlignment),le.push(re.colorSpace),le.join()}function oe(re,le){const Ce=i.get(re);if(re.isVideoTexture&&j(re),re.isRenderTargetTexture===!1&&re.version>0&&Ce.__version!==re.version){const Ee=re.image;if(Ee===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(Ee.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{ce(Ce,re,le);return}}n.bindTexture(t.TEXTURE_2D,Ce.__webglTexture,t.TEXTURE0+le)}function Z(re,le){const Ce=i.get(re);if(re.version>0&&Ce.__version!==re.version){ce(Ce,re,le);return}n.bindTexture(t.TEXTURE_2D_ARRAY,Ce.__webglTexture,t.TEXTURE0+le)}function V(re,le){const Ce=i.get(re);if(re.version>0&&Ce.__version!==re.version){ce(Ce,re,le);return}n.bindTexture(t.TEXTURE_3D,Ce.__webglTexture,t.TEXTURE0+le)}function D(re,le){const Ce=i.get(re);if(re.version>0&&Ce.__version!==re.version){ae(Ce,re,le);return}n.bindTexture(t.TEXTURE_CUBE_MAP,Ce.__webglTexture,t.TEXTURE0+le)}const K={[KM]:t.REPEAT,[Af]:t.CLAMP_TO_EDGE,[qM]:t.MIRRORED_REPEAT},W={[Ul]:t.NEAREST,[O6e]:t.NEAREST_MIPMAP_NEAREST,[Ob]:t.NEAREST_MIPMAP_LINEAR,[Rl]:t.LINEAR,[NE]:t.LINEAR_MIPMAP_NEAREST,[kf]:t.LINEAR_MIPMAP_LINEAR},Q={[z6e]:t.NEVER,[G6e]:t.ALWAYS,[U6e]:t.LESS,[yG]:t.LEQUAL,[$6e]:t.EQUAL,[W6e]:t.GEQUAL,[V6e]:t.GREATER,[H6e]:t.NOTEQUAL};function ie(re,le){if(le.type===Fu&&e.has("OES_texture_float_linear")===!1&&(le.magFilter===Rl||le.magFilter===NE||le.magFilter===Ob||le.magFilter===kf||le.minFilter===Rl||le.minFilter===NE||le.minFilter===Ob||le.minFilter===kf)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(re,t.TEXTURE_WRAP_S,K[le.wrapS]),t.texParameteri(re,t.TEXTURE_WRAP_T,K[le.wrapT]),(re===t.TEXTURE_3D||re===t.TEXTURE_2D_ARRAY)&&t.texParameteri(re,t.TEXTURE_WRAP_R,K[le.wrapR]),t.texParameteri(re,t.TEXTURE_MAG_FILTER,W[le.magFilter]),t.texParameteri(re,t.TEXTURE_MIN_FILTER,W[le.minFilter]),le.compareFunction&&(t.texParameteri(re,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(re,t.TEXTURE_COMPARE_FUNC,Q[le.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(le.magFilter===Ul||le.minFilter!==Ob&&le.minFilter!==kf||le.type===Fu&&e.has("OES_texture_float_linear")===!1)return;if(le.anisotropy>1||i.get(le).__currentAnisotropy){const Ce=e.get("EXT_texture_filter_anisotropic");t.texParameterf(re,Ce.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(le.anisotropy,s.getMaxAnisotropy())),i.get(le).__currentAnisotropy=le.anisotropy}}}function ne(re,le){let Ce=!1;re.__webglInit===void 0&&(re.__webglInit=!0,le.addEventListener("dispose",T));const Ee=le.source;let Oe=h.get(Ee);Oe===void 0&&(Oe={},h.set(Ee,Oe));const Ge=q(le);if(Ge!==re.__cacheKey){Oe[Ge]===void 0&&(Oe[Ge]={texture:t.createTexture(),usedTimes:0},o.memory.textures++,Ce=!0),Oe[Ge].usedTimes++;const $e=Oe[re.__cacheKey];$e!==void 0&&(Oe[re.__cacheKey].usedTimes--,$e.usedTimes===0&&P(le)),re.__cacheKey=Ge,re.__webglTexture=Oe[Ge].texture}return Ce}function ce(re,le,Ce){let Ee=t.TEXTURE_2D;(le.isDataArrayTexture||le.isCompressedArrayTexture)&&(Ee=t.TEXTURE_2D_ARRAY),le.isData3DTexture&&(Ee=t.TEXTURE_3D);const Oe=ne(re,le),Ge=le.source;n.bindTexture(Ee,re.__webglTexture,t.TEXTURE0+Ce);const $e=i.get(Ge);if(Ge.version!==$e.__version||Oe===!0){n.activeTexture(t.TEXTURE0+Ce);const ot=ss.getPrimaries(ss.workingColorSpace),dt=le.colorSpace===nh?null:ss.getPrimaries(le.colorSpace),Jt=le.colorSpace===nh||ot===dt?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,le.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,le.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,le.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,Jt);let at=m(le.image,!1,s.maxTextureSize);at=he(le,at);const Mt=r.convert(le.format,le.colorSpace),Bt=r.convert(le.type);let $t=S(le.internalFormat,Mt,Bt,le.colorSpace,le.isVideoTexture);ie(Ee,le);let Ze;const vt=le.mipmaps,qe=le.isVideoTexture!==!0,kt=$e.__version===void 0||Oe===!0,Je=Ge.dataReady,Ft=E(le,at);if(le.isDepthTexture)$t=_(le.format===Cg,le.type),kt&&(qe?n.texStorage2D(t.TEXTURE_2D,1,$t,at.width,at.height):n.texImage2D(t.TEXTURE_2D,0,$t,at.width,at.height,0,Mt,Bt,null));else if(le.isDataTexture)if(vt.length>0){qe&&kt&&n.texStorage2D(t.TEXTURE_2D,Ft,$t,vt[0].width,vt[0].height);for(let Ne=0,et=vt.length;Ne0){const ut=RR(Ze.width,Ze.height,le.format,le.type);for(const Qt of le.layerUpdates){const Cn=Ze.data.subarray(Qt*ut/Ze.data.BYTES_PER_ELEMENT,(Qt+1)*ut/Ze.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,Ne,0,0,Qt,Ze.width,Ze.height,1,Mt,Cn)}le.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,Ne,0,0,0,Ze.width,Ze.height,at.depth,Mt,Ze.data)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,Ne,$t,Ze.width,Ze.height,at.depth,0,Ze.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else qe?Je&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,Ne,0,0,0,Ze.width,Ze.height,at.depth,Mt,Bt,Ze.data):n.texImage3D(t.TEXTURE_2D_ARRAY,Ne,$t,Ze.width,Ze.height,at.depth,0,Mt,Bt,Ze.data)}else{qe&&kt&&n.texStorage2D(t.TEXTURE_2D,Ft,$t,vt[0].width,vt[0].height);for(let Ne=0,et=vt.length;Ne0){const Ne=RR(at.width,at.height,le.format,le.type);for(const et of le.layerUpdates){const ut=at.data.subarray(et*Ne/at.data.BYTES_PER_ELEMENT,(et+1)*Ne/at.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,et,at.width,at.height,1,Mt,Bt,ut)}le.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,at.width,at.height,at.depth,Mt,Bt,at.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,$t,at.width,at.height,at.depth,0,Mt,Bt,at.data);else if(le.isData3DTexture)qe?(kt&&n.texStorage3D(t.TEXTURE_3D,Ft,$t,at.width,at.height,at.depth),Je&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,at.width,at.height,at.depth,Mt,Bt,at.data)):n.texImage3D(t.TEXTURE_3D,0,$t,at.width,at.height,at.depth,0,Mt,Bt,at.data);else if(le.isFramebufferTexture){if(kt)if(qe)n.texStorage2D(t.TEXTURE_2D,Ft,$t,at.width,at.height);else{let Ne=at.width,et=at.height;for(let ut=0;ut>=1,et>>=1}}else if(vt.length>0){if(qe&&kt){const Ne=be(vt[0]);n.texStorage2D(t.TEXTURE_2D,Ft,$t,Ne.width,Ne.height)}for(let Ne=0,et=vt.length;Ne0&&Ft++;const et=be(Mt[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,Ft,vt,et.width,et.height)}for(let et=0;et<6;et++)if(at){qe?Je&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+et,0,0,0,Mt[et].width,Mt[et].height,$t,Ze,Mt[et].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+et,0,vt,Mt[et].width,Mt[et].height,0,$t,Ze,Mt[et].data);for(let ut=0;ut>Ge),Bt=Math.max(1,le.height>>Ge);Oe===t.TEXTURE_3D||Oe===t.TEXTURE_2D_ARRAY?n.texImage3D(Oe,Ge,dt,Mt,Bt,le.depth,0,$e,ot,null):n.texImage2D(Oe,Ge,dt,Mt,Bt,0,$e,ot,null)}n.bindFramebuffer(t.FRAMEBUFFER,re),ee(le)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,Ee,Oe,at.__webglTexture,0,G(le)):(Oe===t.TEXTURE_2D||Oe>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&Oe<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,Ee,Oe,at.__webglTexture,Ge),n.bindFramebuffer(t.FRAMEBUFFER,null)}function ke(re,le,Ce){if(t.bindRenderbuffer(t.RENDERBUFFER,re),le.depthBuffer){const Ee=le.depthTexture,Oe=Ee&&Ee.isDepthTexture?Ee.type:null,Ge=_(le.stencilBuffer,Oe),$e=le.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,ot=G(le);ee(le)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,ot,Ge,le.width,le.height):Ce?t.renderbufferStorageMultisample(t.RENDERBUFFER,ot,Ge,le.width,le.height):t.renderbufferStorage(t.RENDERBUFFER,Ge,le.width,le.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,$e,t.RENDERBUFFER,re)}else{const Ee=le.textures;for(let Oe=0;Oe{delete le.__boundDepthTexture,delete le.__depthDisposeCallback,Ee.removeEventListener("dispose",Oe)};Ee.addEventListener("dispose",Oe),le.__depthDisposeCallback=Oe}le.__boundDepthTexture=Ee}if(re.depthTexture&&!le.__autoAllocateDepthBuffer){if(Ce)throw new Error("target.depthTexture not supported in Cube render targets");Te(le.__webglFramebuffer,re)}else if(Ce){le.__webglDepthbuffer=[];for(let Ee=0;Ee<6;Ee++)if(n.bindFramebuffer(t.FRAMEBUFFER,le.__webglFramebuffer[Ee]),le.__webglDepthbuffer[Ee]===void 0)le.__webglDepthbuffer[Ee]=t.createRenderbuffer(),ke(le.__webglDepthbuffer[Ee],re,!1);else{const Oe=re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Ge=le.__webglDepthbuffer[Ee];t.bindRenderbuffer(t.RENDERBUFFER,Ge),t.framebufferRenderbuffer(t.FRAMEBUFFER,Oe,t.RENDERBUFFER,Ge)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,le.__webglFramebuffer),le.__webglDepthbuffer===void 0)le.__webglDepthbuffer=t.createRenderbuffer(),ke(le.__webglDepthbuffer,re,!1);else{const Ee=re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,Oe=le.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,Oe),t.framebufferRenderbuffer(t.FRAMEBUFFER,Ee,t.RENDERBUFFER,Oe)}n.bindFramebuffer(t.FRAMEBUFFER,null)}function Fe(re,le,Ce){const Ee=i.get(re);le!==void 0&&_e(Ee.__webglFramebuffer,re,re.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),Ce!==void 0&&Ke(re)}function ve(re){const le=re.texture,Ce=i.get(re),Ee=i.get(le);re.addEventListener("dispose",A);const Oe=re.textures,Ge=re.isWebGLCubeRenderTarget===!0,$e=Oe.length>1;if($e||(Ee.__webglTexture===void 0&&(Ee.__webglTexture=t.createTexture()),Ee.__version=le.version,o.memory.textures++),Ge){Ce.__webglFramebuffer=[];for(let ot=0;ot<6;ot++)if(le.mipmaps&&le.mipmaps.length>0){Ce.__webglFramebuffer[ot]=[];for(let dt=0;dt0){Ce.__webglFramebuffer=[];for(let ot=0;ot0&&ee(re)===!1){Ce.__webglMultisampledFramebuffer=t.createFramebuffer(),Ce.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,Ce.__webglMultisampledFramebuffer);for(let ot=0;ot0)for(let dt=0;dt0)for(let dt=0;dt0){if(ee(re)===!1){const le=re.textures,Ce=re.width,Ee=re.height;let Oe=t.COLOR_BUFFER_BIT;const Ge=re.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,$e=i.get(re),ot=le.length>1;if(ot)for(let dt=0;dt0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&le.__useRenderToTexture!==!1}function j(re){const le=o.render.frame;u.get(re)!==le&&(u.set(re,le),re.update())}function he(re,le){const Ce=re.colorSpace,Ee=re.format,Oe=re.type;return re.isCompressedTexture===!0||re.isVideoTexture===!0||Ce!==Tg&&Ce!==nh&&(ss.getTransfer(Ce)===Cs?(Ee!==Ol||Oe!==od)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",Ce)),le}function be(re){return typeof HTMLImageElement<"u"&&re instanceof HTMLImageElement?(c.width=re.naturalWidth||re.width,c.height=re.naturalHeight||re.height):typeof VideoFrame<"u"&&re instanceof VideoFrame?(c.width=re.displayWidth,c.height=re.displayHeight):(c.width=re.width,c.height=re.height),c}this.allocateTextureUnit=H,this.resetTextureUnits=R,this.setTexture2D=oe,this.setTexture2DArray=Z,this.setTexture3D=V,this.setTextureCube=D,this.rebindTextures=Fe,this.setupRenderTarget=ve,this.updateRenderTargetMipmap=fe,this.updateMultisampleRenderTarget=Qe,this.setupDepthRenderbuffer=Ke,this.setupFrameBufferTexture=_e,this.useMultisampledRTT=ee}function QBe(t,e){function n(i,s=nh){let r;const o=ss.getTransfer(s);if(i===od)return t.UNSIGNED_BYTE;if(i===X4)return t.UNSIGNED_SHORT_4_4_4_4;if(i===Z4)return t.UNSIGNED_SHORT_5_5_5_1;if(i===uG)return t.UNSIGNED_INT_5_9_9_9_REV;if(i===lG)return t.BYTE;if(i===cG)return t.SHORT;if(i===cy)return t.UNSIGNED_SHORT;if(i===Y4)return t.INT;if(i===tp)return t.UNSIGNED_INT;if(i===Fu)return t.FLOAT;if(i===m1)return t.HALF_FLOAT;if(i===dG)return t.ALPHA;if(i===hG)return t.RGB;if(i===Ol)return t.RGBA;if(i===fG)return t.LUMINANCE;if(i===pG)return t.LUMINANCE_ALPHA;if(i===qm)return t.DEPTH_COMPONENT;if(i===Cg)return t.DEPTH_STENCIL;if(i===mG)return t.RED;if(i===J4)return t.RED_INTEGER;if(i===gG)return t.RG;if(i===Q4)return t.RG_INTEGER;if(i===eP)return t.RGBA_INTEGER;if(i===xw||i===Sw||i===Ew||i===Cw)if(o===Cs)if(r=e.get("WEBGL_compressed_texture_s3tc_srgb"),r!==null){if(i===xw)return r.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===Sw)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Ew)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Cw)return r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(r=e.get("WEBGL_compressed_texture_s3tc"),r!==null){if(i===xw)return r.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===Sw)return r.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Ew)return r.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Cw)return r.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===YM||i===XM||i===ZM||i===JM)if(r=e.get("WEBGL_compressed_texture_pvrtc"),r!==null){if(i===YM)return r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===XM)return r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===ZM)return r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===JM)return r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===QM||i===e3||i===t3)if(r=e.get("WEBGL_compressed_texture_etc"),r!==null){if(i===QM||i===e3)return o===Cs?r.COMPRESSED_SRGB8_ETC2:r.COMPRESSED_RGB8_ETC2;if(i===t3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===n3||i===i3||i===s3||i===r3||i===o3||i===a3||i===l3||i===c3||i===u3||i===d3||i===h3||i===f3||i===p3||i===m3)if(r=e.get("WEBGL_compressed_texture_astc"),r!==null){if(i===n3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:r.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===i3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:r.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===s3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:r.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===r3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:r.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===o3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:r.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===a3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:r.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===l3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:r.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===c3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:r.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===u3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:r.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===d3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:r.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===h3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:r.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===f3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:r.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===p3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:r.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===m3)return o===Cs?r.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:r.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Tw||i===g3||i===v3)if(r=e.get("EXT_texture_compression_bptc"),r!==null){if(i===Tw)return o===Cs?r.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:r.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===g3)return r.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===v3)return r.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===vG||i===y3||i===b3||i===_3)if(r=e.get("EXT_texture_compression_rgtc"),r!==null){if(i===Tw)return r.COMPRESSED_RED_RGTC1_EXT;if(i===y3)return r.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===b3)return r.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===_3)return r.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Eg?t.UNSIGNED_INT_24_8:t[i]!==void 0?t[i]:null}return{convert:n}}const eFe={type:"move"};class pC{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new sl,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new sl,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new ct,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new ct),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new sl,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new ct,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new ct),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const n=this._hand;if(n)for(const i of e.hand.values())this._getHandJoint(n,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,n,i){let s=null,r=null,o=null;const a=this._targetRay,l=this._grip,c=this._hand;if(e&&n.session.visibilityState!=="visible-blurred"){if(c&&e.hand){o=!0;for(const m of e.hand.values()){const b=n.getJointPose(m,i),g=this._getHandJoint(c,m);b!==null&&(g.matrix.fromArray(b.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=b.radius),g.visible=b!==null}const u=c.joints["index-finger-tip"],d=c.joints["thumb-tip"],h=u.position.distanceTo(d.position),f=.02,p=.005;c.inputState.pinching&&h>f+p?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!c.inputState.pinching&&h<=f-p&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(r=n.getPose(e.gripSpace,i),r!==null&&(l.matrix.fromArray(r.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,r.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(r.linearVelocity)):l.hasLinearVelocity=!1,r.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(r.angularVelocity)):l.hasAngularVelocity=!1));a!==null&&(s=n.getPose(e.targetRaySpace,i),s===null&&r!==null&&(s=r),s!==null&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(eFe)))}return a!==null&&(a.visible=s!==null),l!==null&&(l.visible=r!==null),c!==null&&(c.visible=o!==null),this}_getHandJoint(e,n){if(e.joints[n.jointName]===void 0){const i=new sl;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[n.jointName]=i,e.add(i)}return e.joints[n.jointName]}}const tFe=` void main() { gl_Position = vec4( position, 1.0 ); }`,nFe=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; void main() { vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); if ( coord.x >= 1.0 ) { gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; } else { gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; } }`;class iFe{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,i){if(this.texture===null){const s=new Eo,r=e.properties.get(s);r.__webglTexture=n.texture,(n.depthNear!==i.depthNear||n.depthFar!==i.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=s}}getMesh(e){if(this.texture!==null&&this.mesh===null){const n=e.cameras[0].viewport,i=new Yl({vertexShader:tFe,fragmentShader:nFe,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new xr(new rS(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class sFe extends vp{constructor(e,n){super();const i=this;let s=null,r=1,o=null,a="local-floor",l=1,c=null,u=null,d=null,h=null,f=null,p=null;const m=new iFe,b=n.getContextAttributes();let g=null,x=null;const S=[],_=[],E=new vn;let T=null;const A=new Al;A.viewport=new Zs;const I=new Al;I.viewport=new Zs;const P=[A,I],k=new SRe;let B=null,R=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ce){let ae=S[ce];return ae===void 0&&(ae=new pC,S[ce]=ae),ae.getTargetRaySpace()},this.getControllerGrip=function(ce){let ae=S[ce];return ae===void 0&&(ae=new pC,S[ce]=ae),ae.getGripSpace()},this.getHand=function(ce){let ae=S[ce];return ae===void 0&&(ae=new pC,S[ce]=ae),ae.getHandSpace()};function H(ce){const ae=_.indexOf(ce.inputSource);if(ae===-1)return;const _e=S[ae];_e!==void 0&&(_e.update(ce.inputSource,ce.frame,c||o),_e.dispatchEvent({type:ce.type,data:ce.inputSource}))}function q(){s.removeEventListener("select",H),s.removeEventListener("selectstart",H),s.removeEventListener("selectend",H),s.removeEventListener("squeeze",H),s.removeEventListener("squeezestart",H),s.removeEventListener("squeezeend",H),s.removeEventListener("end",q),s.removeEventListener("inputsourceschange",oe);for(let ce=0;ce=0&&(_[ke]=null,S[ke].disconnect(_e))}for(let ae=0;ae=_.length){_.push(_e),ke=Ke;break}else if(_[Ke]===null){_[Ke]=_e,ke=Ke;break}if(ke===-1)break}const Te=S[ke];Te&&Te.connect(_e)}}const Z=new ct,V=new ct;function D(ce,ae,_e){Z.setFromMatrixPosition(ae.matrixWorld),V.setFromMatrixPosition(_e.matrixWorld);const ke=Z.distanceTo(V),Te=ae.projectionMatrix.elements,Ke=_e.projectionMatrix.elements,Fe=Te[14]/(Te[10]-1),ve=Te[14]/(Te[10]+1),fe=(Te[9]+1)/Te[5],Me=(Te[9]-1)/Te[5],ge=(Te[8]-1)/Te[0],Qe=(Ke[8]+1)/Ke[0],G=Fe*ge,ee=Fe*Qe,j=ke/(-ge+Qe),he=j*-ge;if(ae.matrixWorld.decompose(ce.position,ce.quaternion,ce.scale),ce.translateX(he),ce.translateZ(j),ce.matrixWorld.compose(ce.position,ce.quaternion,ce.scale),ce.matrixWorldInverse.copy(ce.matrixWorld).invert(),Te[10]===-1)ce.projectionMatrix.copy(ae.projectionMatrix),ce.projectionMatrixInverse.copy(ae.projectionMatrixInverse);else{const be=Fe+j,re=ve+j,le=G-he,Ce=ee+(ke-he),Ee=fe*ve/re*be,Oe=Me*ve/re*be;ce.projectionMatrix.makePerspective(le,Ce,Ee,Oe,be,re),ce.projectionMatrixInverse.copy(ce.projectionMatrix).invert()}}function K(ce,ae){ae===null?ce.matrixWorld.copy(ce.matrix):ce.matrixWorld.multiplyMatrices(ae.matrixWorld,ce.matrix),ce.matrixWorldInverse.copy(ce.matrixWorld).invert()}this.updateCamera=function(ce){if(s===null)return;let ae=ce.near,_e=ce.far;m.texture!==null&&(m.depthNear>0&&(ae=m.depthNear),m.depthFar>0&&(_e=m.depthFar)),k.near=I.near=A.near=ae,k.far=I.far=A.far=_e,(B!==k.near||R!==k.far)&&(s.updateRenderState({depthNear:k.near,depthFar:k.far}),B=k.near,R=k.far),A.layers.mask=ce.layers.mask|2,I.layers.mask=ce.layers.mask|4,k.layers.mask=A.layers.mask|I.layers.mask;const ke=ce.parent,Te=k.cameras;K(k,ke);for(let Ke=0;Ke0&&(b.alphaTest.value=g.alphaTest);const x=e.get(g),S=x.envMap,_=x.envMapRotation;S&&(b.envMap.value=S,tf.copy(_),tf.x*=-1,tf.y*=-1,tf.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(tf.y*=-1,tf.z*=-1),b.envMapRotation.value.setFromMatrix4(rFe.makeRotationFromEuler(tf)),b.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,b.reflectivity.value=g.reflectivity,b.ior.value=g.ior,b.refractionRatio.value=g.refractionRatio),g.lightMap&&(b.lightMap.value=g.lightMap,b.lightMapIntensity.value=g.lightMapIntensity,n(g.lightMap,b.lightMapTransform)),g.aoMap&&(b.aoMap.value=g.aoMap,b.aoMapIntensity.value=g.aoMapIntensity,n(g.aoMap,b.aoMapTransform))}function o(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform))}function a(b,g){b.dashSize.value=g.dashSize,b.totalSize.value=g.dashSize+g.gapSize,b.scale.value=g.scale}function l(b,g,x,S){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.size.value=g.size*x,b.scale.value=S*.5,g.map&&(b.map.value=g.map,n(g.map,b.uvTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function c(b,g){b.diffuse.value.copy(g.color),b.opacity.value=g.opacity,b.rotation.value=g.rotation,g.map&&(b.map.value=g.map,n(g.map,b.mapTransform)),g.alphaMap&&(b.alphaMap.value=g.alphaMap,n(g.alphaMap,b.alphaMapTransform)),g.alphaTest>0&&(b.alphaTest.value=g.alphaTest)}function u(b,g){b.specular.value.copy(g.specular),b.shininess.value=Math.max(g.shininess,1e-4)}function d(b,g){g.gradientMap&&(b.gradientMap.value=g.gradientMap)}function h(b,g){b.metalness.value=g.metalness,g.metalnessMap&&(b.metalnessMap.value=g.metalnessMap,n(g.metalnessMap,b.metalnessMapTransform)),b.roughness.value=g.roughness,g.roughnessMap&&(b.roughnessMap.value=g.roughnessMap,n(g.roughnessMap,b.roughnessMapTransform)),g.envMap&&(b.envMapIntensity.value=g.envMapIntensity)}function f(b,g,x){b.ior.value=g.ior,g.sheen>0&&(b.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),b.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(b.sheenColorMap.value=g.sheenColorMap,n(g.sheenColorMap,b.sheenColorMapTransform)),g.sheenRoughnessMap&&(b.sheenRoughnessMap.value=g.sheenRoughnessMap,n(g.sheenRoughnessMap,b.sheenRoughnessMapTransform))),g.clearcoat>0&&(b.clearcoat.value=g.clearcoat,b.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(b.clearcoatMap.value=g.clearcoatMap,n(g.clearcoatMap,b.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(b.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,n(g.clearcoatRoughnessMap,b.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(b.clearcoatNormalMap.value=g.clearcoatNormalMap,n(g.clearcoatNormalMap,b.clearcoatNormalMapTransform),b.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===ma&&b.clearcoatNormalScale.value.negate())),g.dispersion>0&&(b.dispersion.value=g.dispersion),g.iridescence>0&&(b.iridescence.value=g.iridescence,b.iridescenceIOR.value=g.iridescenceIOR,b.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],b.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(b.iridescenceMap.value=g.iridescenceMap,n(g.iridescenceMap,b.iridescenceMapTransform)),g.iridescenceThicknessMap&&(b.iridescenceThicknessMap.value=g.iridescenceThicknessMap,n(g.iridescenceThicknessMap,b.iridescenceThicknessMapTransform))),g.transmission>0&&(b.transmission.value=g.transmission,b.transmissionSamplerMap.value=x.texture,b.transmissionSamplerSize.value.set(x.width,x.height),g.transmissionMap&&(b.transmissionMap.value=g.transmissionMap,n(g.transmissionMap,b.transmissionMapTransform)),b.thickness.value=g.thickness,g.thicknessMap&&(b.thicknessMap.value=g.thicknessMap,n(g.thicknessMap,b.thicknessMapTransform)),b.attenuationDistance.value=g.attenuationDistance,b.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(b.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(b.anisotropyMap.value=g.anisotropyMap,n(g.anisotropyMap,b.anisotropyMapTransform))),b.specularIntensity.value=g.specularIntensity,b.specularColor.value.copy(g.specularColor),g.specularColorMap&&(b.specularColorMap.value=g.specularColorMap,n(g.specularColorMap,b.specularColorMapTransform)),g.specularIntensityMap&&(b.specularIntensityMap.value=g.specularIntensityMap,n(g.specularIntensityMap,b.specularIntensityMapTransform))}function p(b,g){g.matcap&&(b.matcap.value=g.matcap)}function m(b,g){const x=e.get(g).light;b.referencePosition.value.setFromMatrixPosition(x.matrixWorld),b.nearDistance.value=x.shadow.camera.near,b.farDistance.value=x.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:s}}function aFe(t,e,n,i){let s={},r={},o=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(x,S){const _=S.program;i.uniformBlockBinding(x,_)}function c(x,S){let _=s[x.id];_===void 0&&(p(x),_=u(x),s[x.id]=_,x.addEventListener("dispose",b));const E=S.program;i.updateUBOMapping(x,E);const T=e.render.frame;r[x.id]!==T&&(h(x),r[x.id]=T)}function u(x){const S=d();x.__bindingPointIndex=S;const _=t.createBuffer(),E=x.__size,T=x.usage;return t.bindBuffer(t.UNIFORM_BUFFER,_),t.bufferData(t.UNIFORM_BUFFER,E,T),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,S,_),_}function d(){for(let x=0;x0&&(_+=E-T),x.__size=_,x.__cache={},this}function m(x){const S={boundary:0,storage:0};return typeof x=="number"||typeof x=="boolean"?(S.boundary=4,S.storage=4):x.isVector2?(S.boundary=8,S.storage=8):x.isVector3||x.isColor?(S.boundary=16,S.storage=12):x.isVector4?(S.boundary=16,S.storage=16):x.isMatrix3?(S.boundary=48,S.storage=48):x.isMatrix4?(S.boundary=64,S.storage=64):x.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",x),S}function b(x){const S=x.target;S.removeEventListener("dispose",b);const _=o.indexOf(S.__bindingPointIndex);o.splice(_,1),t.deleteBuffer(s[S.id]),delete s[S.id],delete r[S.id]}function g(){for(const x in s)t.deleteBuffer(s[x]);o=[],s={},r={}}return{bind:l,update:c,dispose:g}}class lFe{constructor(e={}){const{canvas:n=l5e(),context:i=null,depth:s=!0,stencil:r=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:d=!1,reverseDepthBuffer:h=!1}=e;this.isWebGLRenderer=!0;let f;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");f=i.getContextAttributes().alpha}else f=o;const p=new Uint32Array(4),m=new Int32Array(4);let b=null,g=null;const x=[],S=[];this.domElement=n,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=Pa,this.toneMapping=ph,this.toneMappingExposure=1;const _=this;let E=!1,T=0,A=0,I=null,P=-1,k=null;const B=new Zs,R=new Zs;let H=null;const q=new Wi(0);let oe=0,Z=n.width,V=n.height,D=1,K=null,W=null;const Q=new Zs(0,0,Z,V),ie=new Zs(0,0,Z,V);let ne=!1;const ce=new kG;let ae=!1,_e=!1;this.transmissionResolutionScale=1;const ke=new ps,Te=new ps,Ke=new ct,Fe=new Zs,ve={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let fe=!1;function Me(){return I===null?D:1}let ge=i;function Qe(Ie,tt){return n.getContext(Ie,tt)}try{const Ie={alpha:!0,depth:s,stencil:r,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:d};if("setAttribute"in n&&n.setAttribute("data-engine",`three.js r${q4}`),n.addEventListener("webglcontextlost",et,!1),n.addEventListener("webglcontextrestored",ut,!1),n.addEventListener("webglcontextcreationerror",Qt,!1),ge===null){const tt="webgl2";if(ge=Qe(tt,Ie),ge===null)throw Qe(tt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(Ie){throw console.error("THREE.WebGLRenderer: "+Ie.message),Ie}let G,ee,j,he,be,re,le,Ce,Ee,Oe,Ge,$e,ot,dt,Jt,at,Mt,Bt,$t,Ze,vt,qe,kt,Je;function Ft(){G=new vNe(ge),G.init(),qe=new QBe(ge,G),ee=new dNe(ge,G,e,qe),j=new ZBe(ge,G),ee.reverseDepthBuffer&&h&&j.buffers.depth.setReversed(!0),he=new _Ne(ge),be=new FBe,re=new JBe(ge,G,j,be,ee,qe,he),le=new fNe(_),Ce=new gNe(_),Ee=new MRe(ge),kt=new cNe(ge,Ee),Oe=new yNe(ge,Ee,he,kt),Ge=new xNe(ge,Oe,Ee,he),$t=new wNe(ge,ee,re),at=new hNe(be),$e=new BBe(_,le,Ce,G,ee,kt,at),ot=new oFe(_,be),dt=new UBe,Jt=new jBe(G),Bt=new lNe(_,le,Ce,j,Ge,f,l),Mt=new YBe(_,Ge,ee),Je=new aFe(ge,he,ee,j),Ze=new uNe(ge,G,he),vt=new bNe(ge,G,he),he.programs=$e.programs,_.capabilities=ee,_.extensions=G,_.properties=be,_.renderLists=dt,_.shadowMap=Mt,_.state=j,_.info=he}Ft();const Ne=new sFe(_,ge);this.xr=Ne,this.getContext=function(){return ge},this.getContextAttributes=function(){return ge.getContextAttributes()},this.forceContextLoss=function(){const Ie=G.get("WEBGL_lose_context");Ie&&Ie.loseContext()},this.forceContextRestore=function(){const Ie=G.get("WEBGL_lose_context");Ie&&Ie.restoreContext()},this.getPixelRatio=function(){return D},this.setPixelRatio=function(Ie){Ie!==void 0&&(D=Ie,this.setSize(Z,V,!1))},this.getSize=function(Ie){return Ie.set(Z,V)},this.setSize=function(Ie,tt,bt=!0){if(Ne.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}Z=Ie,V=tt,n.width=Math.floor(Ie*D),n.height=Math.floor(tt*D),bt===!0&&(n.style.width=Ie+"px",n.style.height=tt+"px"),this.setViewport(0,0,Ie,tt)},this.getDrawingBufferSize=function(Ie){return Ie.set(Z*D,V*D).floor()},this.setDrawingBufferSize=function(Ie,tt,bt){Z=Ie,V=tt,D=bt,n.width=Math.floor(Ie*bt),n.height=Math.floor(tt*bt),this.setViewport(0,0,Ie,tt)},this.getCurrentViewport=function(Ie){return Ie.copy(B)},this.getViewport=function(Ie){return Ie.copy(Q)},this.setViewport=function(Ie,tt,bt,St){Ie.isVector4?Q.set(Ie.x,Ie.y,Ie.z,Ie.w):Q.set(Ie,tt,bt,St),j.viewport(B.copy(Q).multiplyScalar(D).round())},this.getScissor=function(Ie){return Ie.copy(ie)},this.setScissor=function(Ie,tt,bt,St){Ie.isVector4?ie.set(Ie.x,Ie.y,Ie.z,Ie.w):ie.set(Ie,tt,bt,St),j.scissor(R.copy(ie).multiplyScalar(D).round())},this.getScissorTest=function(){return ne},this.setScissorTest=function(Ie){j.setScissorTest(ne=Ie)},this.setOpaqueSort=function(Ie){K=Ie},this.setTransparentSort=function(Ie){W=Ie},this.getClearColor=function(Ie){return Ie.copy(Bt.getClearColor())},this.setClearColor=function(){Bt.setClearColor.apply(Bt,arguments)},this.getClearAlpha=function(){return Bt.getClearAlpha()},this.setClearAlpha=function(){Bt.setClearAlpha.apply(Bt,arguments)},this.clear=function(Ie=!0,tt=!0,bt=!0){let St=0;if(Ie){let ft=!1;if(I!==null){const nn=I.texture.format;ft=nn===eP||nn===Q4||nn===J4}if(ft){const nn=I.texture.type,Ye=nn===od||nn===tp||nn===cy||nn===Eg||nn===X4||nn===Z4,Et=Bt.getClearColor(),Ot=Bt.getClearAlpha(),Wt=Et.r,Rn=Et.g,Ln=Et.b;Ye?(p[0]=Wt,p[1]=Rn,p[2]=Ln,p[3]=Ot,ge.clearBufferuiv(ge.COLOR,0,p)):(m[0]=Wt,m[1]=Rn,m[2]=Ln,m[3]=Ot,ge.clearBufferiv(ge.COLOR,0,m))}else St|=ge.COLOR_BUFFER_BIT}tt&&(St|=ge.DEPTH_BUFFER_BIT),bt&&(St|=ge.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),ge.clear(St)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){n.removeEventListener("webglcontextlost",et,!1),n.removeEventListener("webglcontextrestored",ut,!1),n.removeEventListener("webglcontextcreationerror",Qt,!1),Bt.dispose(),dt.dispose(),Jt.dispose(),be.dispose(),le.dispose(),Ce.dispose(),Ge.dispose(),kt.dispose(),Je.dispose(),$e.dispose(),Ne.dispose(),Ne.removeEventListener("sessionstart",ms),Ne.removeEventListener("sessionend",pe),Qn.stop()};function et(Ie){Ie.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function ut(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const Ie=he.autoReset,tt=Mt.enabled,bt=Mt.autoUpdate,St=Mt.needsUpdate,ft=Mt.type;Ft(),he.autoReset=Ie,Mt.enabled=tt,Mt.autoUpdate=bt,Mt.needsUpdate=St,Mt.type=ft}function Qt(Ie){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",Ie.statusMessage)}function Cn(Ie){const tt=Ie.target;tt.removeEventListener("dispose",Cn),ei(tt)}function ei(Ie){Tt(Ie),be.remove(Ie)}function Tt(Ie){const tt=be.get(Ie).programs;tt!==void 0&&(tt.forEach(function(bt){$e.releaseProgram(bt)}),Ie.isShaderMaterial&&$e.releaseShaderCache(Ie))}this.renderBufferDirect=function(Ie,tt,bt,St,ft,nn){tt===null&&(tt=ve);const Ye=ft.isMesh&&ft.matrixWorld.determinant()<0,Et=di(Ie,tt,bt,St,ft);j.setMaterial(St,Ye);let Ot=bt.index,Wt=1;if(St.wireframe===!0){if(Ot=Oe.getWireframeAttribute(bt),Ot===void 0)return;Wt=2}const Rn=bt.drawRange,Ln=bt.attributes.position;let oi=Rn.start*Wt,In=(Rn.start+Rn.count)*Wt;nn!==null&&(oi=Math.max(oi,nn.start*Wt),In=Math.min(In,(nn.start+nn.count)*Wt)),Ot!==null?(oi=Math.max(oi,0),In=Math.min(In,Ot.count)):Ln!=null&&(oi=Math.max(oi,0),In=Math.min(In,Ln.count));const ai=In-oi;if(ai<0||ai===1/0)return;kt.setup(ft,St,Et,bt,Ot);let Ji,vi=Ze;if(Ot!==null&&(Ji=Ee.get(Ot),vi=vt,vi.setIndex(Ji)),ft.isMesh)St.wireframe===!0?(j.setLineWidth(St.wireframeLinewidth*Me()),vi.setMode(ge.LINES)):vi.setMode(ge.TRIANGLES);else if(ft.isLine){let Nn=St.linewidth;Nn===void 0&&(Nn=1),j.setLineWidth(Nn*Me()),ft.isLineSegments?vi.setMode(ge.LINES):ft.isLineLoop?vi.setMode(ge.LINE_LOOP):vi.setMode(ge.LINE_STRIP)}else ft.isPoints?vi.setMode(ge.POINTS):ft.isSprite&&vi.setMode(ge.TRIANGLES);if(ft.isBatchedMesh)if(ft._multiDrawInstances!==null)vi.renderMultiDrawInstances(ft._multiDrawStarts,ft._multiDrawCounts,ft._multiDrawCount,ft._multiDrawInstances);else if(G.get("WEBGL_multi_draw"))vi.renderMultiDraw(ft._multiDrawStarts,ft._multiDrawCounts,ft._multiDrawCount);else{const Nn=ft._multiDrawStarts,Ps=ft._multiDrawCounts,On=ft._multiDrawCount,yi=Ot?Ee.get(Ot).bytesPerElement:1,Ua=be.get(St).currentProgram.getUniforms();for(let fr=0;fr{function nn(){if(St.forEach(function(Ye){be.get(Ye).currentProgram.isReady()&&St.delete(Ye)}),St.size===0){ft(Ie);return}setTimeout(nn,10)}G.get("KHR_parallel_shader_compile")!==null?nn():setTimeout(nn,10)})};let jt=null;function Di(Ie){jt&&jt(Ie)}function ms(){Qn.stop()}function pe(){Qn.start()}const Qn=new FG;Qn.setAnimationLoop(Di),typeof self<"u"&&Qn.setContext(self),this.setAnimationLoop=function(Ie){jt=Ie,Ne.setAnimationLoop(Ie),Ie===null?Qn.stop():Qn.start()},Ne.addEventListener("sessionstart",ms),Ne.addEventListener("sessionend",pe),this.render=function(Ie,tt){if(tt!==void 0&&tt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(Ie.matrixWorldAutoUpdate===!0&&Ie.updateMatrixWorld(),tt.parent===null&&tt.matrixWorldAutoUpdate===!0&&tt.updateMatrixWorld(),Ne.enabled===!0&&Ne.isPresenting===!0&&(Ne.cameraAutoUpdate===!0&&Ne.updateCamera(tt),tt=Ne.getCamera()),Ie.isScene===!0&&Ie.onBeforeRender(_,Ie,tt,I),g=Jt.get(Ie,S.length),g.init(tt),S.push(g),Te.multiplyMatrices(tt.projectionMatrix,tt.matrixWorldInverse),ce.setFromProjectionMatrix(Te),_e=this.localClippingEnabled,ae=at.init(this.clippingPlanes,_e),b=dt.get(Ie,x.length),b.init(),x.push(b),Ne.enabled===!0&&Ne.isPresenting===!0){const nn=_.xr.getDepthSensingMesh();nn!==null&&gs(nn,tt,-1/0,_.sortObjects)}gs(Ie,tt,0,_.sortObjects),b.finish(),_.sortObjects===!0&&b.sort(K,W),fe=Ne.enabled===!1||Ne.isPresenting===!1||Ne.hasDepthSensing()===!1,fe&&Bt.addToRenderList(b,Ie),this.info.render.frame++,ae===!0&&at.beginShadows();const bt=g.state.shadowsArray;Mt.render(bt,Ie,tt),ae===!0&&at.endShadows(),this.info.autoReset===!0&&this.info.reset();const St=b.opaque,ft=b.transmissive;if(g.setupLights(),tt.isArrayCamera){const nn=tt.cameras;if(ft.length>0)for(let Ye=0,Et=nn.length;Ye0&&ts(St,ft,Ie,tt),fe&&Bt.render(Ie),An(b,Ie,tt);I!==null&&A===0&&(re.updateMultisampleRenderTarget(I),re.updateRenderTargetMipmap(I)),Ie.isScene===!0&&Ie.onAfterRender(_,Ie,tt),kt.resetDefaultState(),P=-1,k=null,S.pop(),S.length>0?(g=S[S.length-1],ae===!0&&at.setGlobalState(_.clippingPlanes,g.state.camera)):g=null,x.pop(),x.length>0?b=x[x.length-1]:b=null};function gs(Ie,tt,bt,St){if(Ie.visible===!1)return;if(Ie.layers.test(tt.layers)){if(Ie.isGroup)bt=Ie.renderOrder;else if(Ie.isLOD)Ie.autoUpdate===!0&&Ie.update(tt);else if(Ie.isLight)g.pushLight(Ie),Ie.castShadow&&g.pushShadow(Ie);else if(Ie.isSprite){if(!Ie.frustumCulled||ce.intersectsSprite(Ie)){St&&Fe.setFromMatrixPosition(Ie.matrixWorld).applyMatrix4(Te);const Ye=Ge.update(Ie),Et=Ie.material;Et.visible&&b.push(Ie,Ye,Et,bt,Fe.z,null)}}else if((Ie.isMesh||Ie.isLine||Ie.isPoints)&&(!Ie.frustumCulled||ce.intersectsObject(Ie))){const Ye=Ge.update(Ie),Et=Ie.material;if(St&&(Ie.boundingSphere!==void 0?(Ie.boundingSphere===null&&Ie.computeBoundingSphere(),Fe.copy(Ie.boundingSphere.center)):(Ye.boundingSphere===null&&Ye.computeBoundingSphere(),Fe.copy(Ye.boundingSphere.center)),Fe.applyMatrix4(Ie.matrixWorld).applyMatrix4(Te)),Array.isArray(Et)){const Ot=Ye.groups;for(let Wt=0,Rn=Ot.length;Wt0&&Ur(ft,tt,bt),nn.length>0&&Ur(nn,tt,bt),Ye.length>0&&Ur(Ye,tt,bt),j.buffers.depth.setTest(!0),j.buffers.depth.setMask(!0),j.buffers.color.setMask(!0),j.setPolygonOffset(!1)}function ts(Ie,tt,bt,St){if((bt.isScene===!0?bt.overrideMaterial:null)!==null)return;g.state.transmissionRenderTarget[St.id]===void 0&&(g.state.transmissionRenderTarget[St.id]=new np(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")||G.has("EXT_color_buffer_float")?m1:od,minFilter:kf,samples:4,stencilBuffer:r,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:ss.workingColorSpace}));const nn=g.state.transmissionRenderTarget[St.id],Ye=St.viewport||B;nn.setSize(Ye.z*_.transmissionResolutionScale,Ye.w*_.transmissionResolutionScale);const Et=_.getRenderTarget();_.setRenderTarget(nn),_.getClearColor(q),oe=_.getClearAlpha(),oe<1&&_.setClearColor(16777215,.5),_.clear(),fe&&Bt.render(bt);const Ot=_.toneMapping;_.toneMapping=ph;const Wt=St.viewport;if(St.viewport!==void 0&&(St.viewport=void 0),g.setupLightsView(St),ae===!0&&at.setGlobalState(_.clippingPlanes,St),Ur(Ie,bt,St),re.updateMultisampleRenderTarget(nn),re.updateRenderTargetMipmap(nn),G.has("WEBGL_multisampled_render_to_texture")===!1){let Rn=!1;for(let Ln=0,oi=tt.length;Ln0),Ln=!!bt.morphAttributes.position,oi=!!bt.morphAttributes.normal,In=!!bt.morphAttributes.color;let ai=ph;St.toneMapped&&(I===null||I.isXRRenderTarget===!0)&&(ai=_.toneMapping);const Ji=bt.morphAttributes.position||bt.morphAttributes.normal||bt.morphAttributes.color,vi=Ji!==void 0?Ji.length:0,Nn=be.get(St),Ps=g.state.lights;if(ae===!0&&(_e===!0||Ie!==k)){const Ni=Ie===k&&St.id===P;at.setState(St,Ie,Ni)}let On=!1;St.version===Nn.__version?(Nn.needsLights&&Nn.lightsStateVersion!==Ps.state.version||Nn.outputColorSpace!==Et||ft.isBatchedMesh&&Nn.batching===!1||!ft.isBatchedMesh&&Nn.batching===!0||ft.isBatchedMesh&&Nn.batchingColor===!0&&ft.colorTexture===null||ft.isBatchedMesh&&Nn.batchingColor===!1&&ft.colorTexture!==null||ft.isInstancedMesh&&Nn.instancing===!1||!ft.isInstancedMesh&&Nn.instancing===!0||ft.isSkinnedMesh&&Nn.skinning===!1||!ft.isSkinnedMesh&&Nn.skinning===!0||ft.isInstancedMesh&&Nn.instancingColor===!0&&ft.instanceColor===null||ft.isInstancedMesh&&Nn.instancingColor===!1&&ft.instanceColor!==null||ft.isInstancedMesh&&Nn.instancingMorph===!0&&ft.morphTexture===null||ft.isInstancedMesh&&Nn.instancingMorph===!1&&ft.morphTexture!==null||Nn.envMap!==Ot||St.fog===!0&&Nn.fog!==nn||Nn.numClippingPlanes!==void 0&&(Nn.numClippingPlanes!==at.numPlanes||Nn.numIntersection!==at.numIntersection)||Nn.vertexAlphas!==Wt||Nn.vertexTangents!==Rn||Nn.morphTargets!==Ln||Nn.morphNormals!==oi||Nn.morphColors!==In||Nn.toneMapping!==ai||Nn.morphTargetsCount!==vi)&&(On=!0):(On=!0,Nn.__version=St.version);let yi=Nn.currentProgram;On===!0&&(yi=Un(St,tt,ft));let Ua=!1,fr=!1,cr=!1;const vs=yi.getUniforms(),pr=Nn.uniforms;if(j.useProgram(yi.program)&&(Ua=!0,fr=!0,cr=!0),St.id!==P&&(P=St.id,fr=!0),Ua||k!==Ie){j.buffers.depth.getReversed()?(ke.copy(Ie.projectionMatrix),u5e(ke),d5e(ke),vs.setValue(ge,"projectionMatrix",ke)):vs.setValue(ge,"projectionMatrix",Ie.projectionMatrix),vs.setValue(ge,"viewMatrix",Ie.matrixWorldInverse);const Ls=vs.map.cameraPosition;Ls!==void 0&&Ls.setValue(ge,Ke.setFromMatrixPosition(Ie.matrixWorld)),ee.logarithmicDepthBuffer&&vs.setValue(ge,"logDepthBufFC",2/(Math.log(Ie.far+1)/Math.LN2)),(St.isMeshPhongMaterial||St.isMeshToonMaterial||St.isMeshLambertMaterial||St.isMeshBasicMaterial||St.isMeshStandardMaterial||St.isShaderMaterial)&&vs.setValue(ge,"isOrthographic",Ie.isOrthographicCamera===!0),k!==Ie&&(k=Ie,fr=!0,cr=!0)}if(ft.isSkinnedMesh){vs.setOptional(ge,ft,"bindMatrix"),vs.setOptional(ge,ft,"bindMatrixInverse");const Ni=ft.skeleton;Ni&&(Ni.boneTexture===null&&Ni.computeBoneTexture(),vs.setValue(ge,"boneTexture",Ni.boneTexture,re))}ft.isBatchedMesh&&(vs.setOptional(ge,ft,"batchingTexture"),vs.setValue(ge,"batchingTexture",ft._matricesTexture,re),vs.setOptional(ge,ft,"batchingIdTexture"),vs.setValue(ge,"batchingIdTexture",ft._indirectTexture,re),vs.setOptional(ge,ft,"batchingColorTexture"),ft._colorsTexture!==null&&vs.setValue(ge,"batchingColorTexture",ft._colorsTexture,re));const Ys=bt.morphAttributes;if((Ys.position!==void 0||Ys.normal!==void 0||Ys.color!==void 0)&&$t.update(ft,bt,yi),(fr||Nn.receiveShadow!==ft.receiveShadow)&&(Nn.receiveShadow=ft.receiveShadow,vs.setValue(ge,"receiveShadow",ft.receiveShadow)),St.isMeshGouraudMaterial&&St.envMap!==null&&(pr.envMap.value=Ot,pr.flipEnvMap.value=Ot.isCubeTexture&&Ot.isRenderTargetTexture===!1?-1:1),St.isMeshStandardMaterial&&St.envMap===null&&tt.environment!==null&&(pr.envMapIntensity.value=tt.environmentIntensity),fr&&(vs.setValue(ge,"toneMappingExposure",_.toneMappingExposure),Nn.needsLights&&mt(pr,cr),nn&&St.fog===!0&&ot.refreshFogUniforms(pr,nn),ot.refreshMaterialUniforms(pr,St,D,V,g.state.transmissionRenderTarget[Ie.id]),Mw.upload(ge,Yn(Nn),pr,re)),St.isShaderMaterial&&St.uniformsNeedUpdate===!0&&(Mw.upload(ge,Yn(Nn),pr,re),St.uniformsNeedUpdate=!1),St.isSpriteMaterial&&vs.setValue(ge,"center",ft.center),vs.setValue(ge,"modelViewMatrix",ft.modelViewMatrix),vs.setValue(ge,"normalMatrix",ft.normalMatrix),vs.setValue(ge,"modelMatrix",ft.matrixWorld),St.isShaderMaterial||St.isRawShaderMaterial){const Ni=St.uniformsGroups;for(let Ls=0,ba=Ni.length;Ls0&&re.useMultisampledRTT(Ie)===!1?ft=be.get(Ie).__webglMultisampledFramebuffer:Array.isArray(Rn)?ft=Rn[bt]:ft=Rn,B.copy(Ie.viewport),R.copy(Ie.scissor),H=Ie.scissorTest}else B.copy(Q).multiplyScalar(D).floor(),R.copy(ie).multiplyScalar(D).floor(),H=ne;if(bt!==0&&(ft=ln),j.bindFramebuffer(ge.FRAMEBUFFER,ft)&&St&&j.drawBuffers(Ie,ft),j.viewport(B),j.scissor(R),j.setScissorTest(H),nn){const Ot=be.get(Ie.texture);ge.framebufferTexture2D(ge.FRAMEBUFFER,ge.COLOR_ATTACHMENT0,ge.TEXTURE_CUBE_MAP_POSITIVE_X+tt,Ot.__webglTexture,bt)}else if(Ye){const Ot=be.get(Ie.texture),Wt=tt;ge.framebufferTextureLayer(ge.FRAMEBUFFER,ge.COLOR_ATTACHMENT0,Ot.__webglTexture,bt,Wt)}else if(Ie!==null&&bt!==0){const Ot=be.get(Ie.texture);ge.framebufferTexture2D(ge.FRAMEBUFFER,ge.COLOR_ATTACHMENT0,ge.TEXTURE_2D,Ot.__webglTexture,bt)}P=-1},this.readRenderTargetPixels=function(Ie,tt,bt,St,ft,nn,Ye){if(!(Ie&&Ie.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Et=be.get(Ie).__webglFramebuffer;if(Ie.isWebGLCubeRenderTarget&&Ye!==void 0&&(Et=Et[Ye]),Et){j.bindFramebuffer(ge.FRAMEBUFFER,Et);try{const Ot=Ie.texture,Wt=Ot.format,Rn=Ot.type;if(!ee.textureFormatReadable(Wt)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!ee.textureTypeReadable(Rn)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}tt>=0&&tt<=Ie.width-St&&bt>=0&&bt<=Ie.height-ft&&ge.readPixels(tt,bt,St,ft,qe.convert(Wt),qe.convert(Rn),nn)}finally{const Ot=I!==null?be.get(I).__webglFramebuffer:null;j.bindFramebuffer(ge.FRAMEBUFFER,Ot)}}},this.readRenderTargetPixelsAsync=async function(Ie,tt,bt,St,ft,nn,Ye){if(!(Ie&&Ie.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Et=be.get(Ie).__webglFramebuffer;if(Ie.isWebGLCubeRenderTarget&&Ye!==void 0&&(Et=Et[Ye]),Et){const Ot=Ie.texture,Wt=Ot.format,Rn=Ot.type;if(!ee.textureFormatReadable(Wt))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!ee.textureTypeReadable(Rn))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(tt>=0&&tt<=Ie.width-St&&bt>=0&&bt<=Ie.height-ft){j.bindFramebuffer(ge.FRAMEBUFFER,Et);const Ln=ge.createBuffer();ge.bindBuffer(ge.PIXEL_PACK_BUFFER,Ln),ge.bufferData(ge.PIXEL_PACK_BUFFER,nn.byteLength,ge.STREAM_READ),ge.readPixels(tt,bt,St,ft,qe.convert(Wt),qe.convert(Rn),0);const oi=I!==null?be.get(I).__webglFramebuffer:null;j.bindFramebuffer(ge.FRAMEBUFFER,oi);const In=ge.fenceSync(ge.SYNC_GPU_COMMANDS_COMPLETE,0);return ge.flush(),await c5e(ge,In,4),ge.bindBuffer(ge.PIXEL_PACK_BUFFER,Ln),ge.getBufferSubData(ge.PIXEL_PACK_BUFFER,0,nn),ge.deleteBuffer(Ln),ge.deleteSync(In),nn}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(Ie,tt=null,bt=0){Ie.isTexture!==!0&&(Cm("WebGLRenderer: copyFramebufferToTexture function signature has changed."),tt=arguments[0]||null,Ie=arguments[1]);const St=Math.pow(2,-bt),ft=Math.floor(Ie.image.width*St),nn=Math.floor(Ie.image.height*St),Ye=tt!==null?tt.x:0,Et=tt!==null?tt.y:0;re.setTexture2D(Ie,0),ge.copyTexSubImage2D(ge.TEXTURE_2D,bt,0,0,Ye,Et,ft,nn),j.unbindTexture()};const Ci=ge.createFramebuffer(),ji=ge.createFramebuffer();this.copyTextureToTexture=function(Ie,tt,bt=null,St=null,ft=0,nn=null){Ie.isTexture!==!0&&(Cm("WebGLRenderer: copyTextureToTexture function signature has changed."),St=arguments[0]||null,Ie=arguments[1],tt=arguments[2],nn=arguments[3]||0,bt=null),nn===null&&(ft!==0?(Cm("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),nn=ft,ft=0):nn=0);let Ye,Et,Ot,Wt,Rn,Ln,oi,In,ai;const Ji=Ie.isCompressedTexture?Ie.mipmaps[nn]:Ie.image;if(bt!==null)Ye=bt.max.x-bt.min.x,Et=bt.max.y-bt.min.y,Ot=bt.isBox3?bt.max.z-bt.min.z:1,Wt=bt.min.x,Rn=bt.min.y,Ln=bt.isBox3?bt.min.z:0;else{const Ys=Math.pow(2,-ft);Ye=Math.floor(Ji.width*Ys),Et=Math.floor(Ji.height*Ys),Ie.isDataArrayTexture?Ot=Ji.depth:Ie.isData3DTexture?Ot=Math.floor(Ji.depth*Ys):Ot=1,Wt=0,Rn=0,Ln=0}St!==null?(oi=St.x,In=St.y,ai=St.z):(oi=0,In=0,ai=0);const vi=qe.convert(tt.format),Nn=qe.convert(tt.type);let Ps;tt.isData3DTexture?(re.setTexture3D(tt,0),Ps=ge.TEXTURE_3D):tt.isDataArrayTexture||tt.isCompressedArrayTexture?(re.setTexture2DArray(tt,0),Ps=ge.TEXTURE_2D_ARRAY):(re.setTexture2D(tt,0),Ps=ge.TEXTURE_2D),ge.pixelStorei(ge.UNPACK_FLIP_Y_WEBGL,tt.flipY),ge.pixelStorei(ge.UNPACK_PREMULTIPLY_ALPHA_WEBGL,tt.premultiplyAlpha),ge.pixelStorei(ge.UNPACK_ALIGNMENT,tt.unpackAlignment);const On=ge.getParameter(ge.UNPACK_ROW_LENGTH),yi=ge.getParameter(ge.UNPACK_IMAGE_HEIGHT),Ua=ge.getParameter(ge.UNPACK_SKIP_PIXELS),fr=ge.getParameter(ge.UNPACK_SKIP_ROWS),cr=ge.getParameter(ge.UNPACK_SKIP_IMAGES);ge.pixelStorei(ge.UNPACK_ROW_LENGTH,Ji.width),ge.pixelStorei(ge.UNPACK_IMAGE_HEIGHT,Ji.height),ge.pixelStorei(ge.UNPACK_SKIP_PIXELS,Wt),ge.pixelStorei(ge.UNPACK_SKIP_ROWS,Rn),ge.pixelStorei(ge.UNPACK_SKIP_IMAGES,Ln);const vs=Ie.isDataArrayTexture||Ie.isData3DTexture,pr=tt.isDataArrayTexture||tt.isData3DTexture;if(Ie.isDepthTexture){const Ys=be.get(Ie),Ni=be.get(tt),Ls=be.get(Ys.__renderTarget),ba=be.get(Ni.__renderTarget);j.bindFramebuffer(ge.READ_FRAMEBUFFER,Ls.__webglFramebuffer),j.bindFramebuffer(ge.DRAW_FRAMEBUFFER,ba.__webglFramebuffer);for(let w=0;wMath.PI&&(i-=oa),s<-Math.PI?s+=oa:s>Math.PI&&(s-=oa),i<=s?this._spherical.theta=Math.max(i,Math.min(s,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(i+s)/2?Math.max(i,this._spherical.theta):Math.min(s,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let r=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const o=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),r=o!=this._spherical.radius}if(Ar.setFromSpherical(this._spherical),Ar.applyQuaternion(this._quatInverse),n.copy(this.target).add(Ar),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let o=null;if(this.object.isPerspectiveCamera){const a=Ar.length();o=this._clampDistance(a*this._scale);const l=a-o;this.object.position.addScaledVector(this._dollyDirection,l),this.object.updateMatrixWorld(),r=!!l}else if(this.object.isOrthographicCamera){const a=new ct(this._mouse.x,this._mouse.y,0);a.unproject(this.object);const l=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),r=l!==this.object.zoom;const c=new ct(this._mouse.x,this._mouse.y,0);c.unproject(this.object),this.object.position.sub(c).add(a),this.object.updateMatrixWorld(),o=Ar.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;o!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position):(d_.origin.copy(this.object.position),d_.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(d_.direction))mC||8*(1-this._lastQuaternion.dot(this.object.quaternion))>mC||this._lastTargetPosition.distanceToSquared(this.target)>mC?(this.dispatchEvent(rO),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(e){return e!==null?oa/60*this.autoRotateSpeed*e:oa/60/60*this.autoRotateSpeed}_getZoomScale(e){const n=Math.abs(e*.01);return Math.pow(.95,this.zoomSpeed*n)}_rotateLeft(e){this._sphericalDelta.theta-=e}_rotateUp(e){this._sphericalDelta.phi-=e}_panLeft(e,n){Ar.setFromMatrixColumn(n,0),Ar.multiplyScalar(-e),this._panOffset.add(Ar)}_panUp(e,n){this.screenSpacePanning===!0?Ar.setFromMatrixColumn(n,1):(Ar.setFromMatrixColumn(n,0),Ar.crossVectors(this.object.up,Ar)),Ar.multiplyScalar(e),this._panOffset.add(Ar)}_pan(e,n){const i=this.domElement;if(this.object.isPerspectiveCamera){const s=this.object.position;Ar.copy(s).sub(this.target);let r=Ar.length();r*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*e*r/i.clientHeight,this.object.matrix),this._panUp(2*n*r/i.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(e*(this.object.right-this.object.left)/this.object.zoom/i.clientWidth,this.object.matrix),this._panUp(n*(this.object.top-this.object.bottom)/this.object.zoom/i.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(e){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(e,n){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const i=this.domElement.getBoundingClientRect(),s=e-i.left,r=n-i.top,o=i.width,a=i.height;this._mouse.x=s/o*2-1,this._mouse.y=-(r/a)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(e){return Math.max(this.minDistance,Math.min(this.maxDistance,e))}_handleMouseDownRotate(e){this._rotateStart.set(e.clientX,e.clientY)}_handleMouseDownDolly(e){this._updateZoomParameters(e.clientX,e.clientX),this._dollyStart.set(e.clientX,e.clientY)}_handleMouseDownPan(e){this._panStart.set(e.clientX,e.clientY)}_handleMouseMoveRotate(e){this._rotateEnd.set(e.clientX,e.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const n=this.domElement;this._rotateLeft(oa*this._rotateDelta.x/n.clientHeight),this._rotateUp(oa*this._rotateDelta.y/n.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(e){this._dollyEnd.set(e.clientX,e.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(e){this._panEnd.set(e.clientX,e.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(e){this._updateZoomParameters(e.clientX,e.clientY),e.deltaY<0?this._dollyIn(this._getZoomScale(e.deltaY)):e.deltaY>0&&this._dollyOut(this._getZoomScale(e.deltaY)),this.update()}_handleKeyDown(e){let n=!1;switch(e.code){case this.keys.UP:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(oa*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),n=!0;break;case this.keys.BOTTOM:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateUp(-oa*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),n=!0;break;case this.keys.LEFT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(oa*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),n=!0;break;case this.keys.RIGHT:e.ctrlKey||e.metaKey||e.shiftKey?this.enableRotate&&this._rotateLeft(-oa*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),n=!0;break}n&&(e.preventDefault(),this.update())}_handleTouchStartRotate(e){if(this._pointers.length===1)this._rotateStart.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._rotateStart.set(i,s)}}_handleTouchStartPan(e){if(this._pointers.length===1)this._panStart.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._panStart.set(i,s)}}_handleTouchStartDolly(e){const n=this._getSecondPointerPosition(e),i=e.pageX-n.x,s=e.pageY-n.y,r=Math.sqrt(i*i+s*s);this._dollyStart.set(0,r)}_handleTouchStartDollyPan(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enablePan&&this._handleTouchStartPan(e)}_handleTouchStartDollyRotate(e){this.enableZoom&&this._handleTouchStartDolly(e),this.enableRotate&&this._handleTouchStartRotate(e)}_handleTouchMoveRotate(e){if(this._pointers.length==1)this._rotateEnd.set(e.pageX,e.pageY);else{const i=this._getSecondPointerPosition(e),s=.5*(e.pageX+i.x),r=.5*(e.pageY+i.y);this._rotateEnd.set(s,r)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const n=this.domElement;this._rotateLeft(oa*this._rotateDelta.x/n.clientHeight),this._rotateUp(oa*this._rotateDelta.y/n.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(e){if(this._pointers.length===1)this._panEnd.set(e.pageX,e.pageY);else{const n=this._getSecondPointerPosition(e),i=.5*(e.pageX+n.x),s=.5*(e.pageY+n.y);this._panEnd.set(i,s)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(e){const n=this._getSecondPointerPosition(e),i=e.pageX-n.x,s=e.pageY-n.y,r=Math.sqrt(i*i+s*s);this._dollyEnd.set(0,r),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const o=(e.pageX+n.x)*.5,a=(e.pageY+n.y)*.5;this._updateZoomParameters(o,a)}_handleTouchMoveDollyPan(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enablePan&&this._handleTouchMovePan(e)}_handleTouchMoveDollyRotate(e){this.enableZoom&&this._handleTouchMoveDolly(e),this.enableRotate&&this._handleTouchMoveRotate(e)}_addPointer(e){this._pointers.push(e.pointerId)}_removePointer(e){delete this._pointerPositions[e.pointerId];for(let n=0;n=r+1e3&&(a.update(o*1e3/(u-r),100),r=u,o=0,c)){var d=performance.memory;c.update(d.usedJSHeapSize/1048576,d.jsHeapSizeLimit/1048576)}return u},update:function(){s=this.end()},domElement:e,setMode:i}};T0.Panel=function(t,e,n){var i=1/0,s=0,r=Math.round,o=r(window.devicePixelRatio||1),a=80*o,l=48*o,c=3*o,u=2*o,d=3*o,h=15*o,f=74*o,p=30*o,m=document.createElement("canvas");m.width=a,m.height=l,m.style.cssText="width:80px;height:48px";var b=m.getContext("2d");return b.font="bold "+9*o+"px Helvetica,Arial,sans-serif",b.textBaseline="top",b.fillStyle=n,b.fillRect(0,0,a,l),b.fillStyle=e,b.fillText(t,c,u),b.fillRect(d,h,f,p),b.fillStyle=n,b.globalAlpha=.9,b.fillRect(d,h,f,p),{dom:m,update:function(g,x){i=Math.min(i,g),s=Math.max(s,g),b.fillStyle=n,b.globalAlpha=1,b.fillRect(0,0,a,h),b.fillStyle=e,b.fillText(r(g)+" "+t+" ("+r(i)+"-"+r(s)+")",c,u),b.drawImage(m,d+o,h,f-o,p,d,h,f-o,p),b.fillRect(d+f-o,h,o,p),b.fillStyle=n,b.globalAlpha=.9,b.fillRect(d+f-o,h,o,r((1-g/x)*p))}}};class EFe{constructor(e,n){this._view=e,this._doc=n,n.database.events.entityAppended.addEventListener(i=>{this.view.addEntity(i.entity)}),n.database.events.entityModified.addEventListener(i=>{this.view.updateEntity(i.entity)}),n.database.events.layerAppended.addEventListener(i=>{this._view.addLayer(i.layer)}),n.database.events.layerModified.addEventListener(i=>{this._view.updateLayer(i.layer,i.changes)}),n.database.events.headerSysVarChanged.addEventListener(i=>{i.name=="pdmode"&&this._view.rerenderPoints(i.database.pdmode)}),n.database.events.dictObjetSet.addEventListener(i=>{i.object instanceof p1&&this._view.addLayout(i.object)}),e.selectionSet.events.selectionAdded.addEventListener(i=>{e.highlight(i.ids)}),e.selectionSet.events.selectionRemoved.addEventListener(i=>{e.unhighlight(i.ids)})}get view(){return this._view}get doc(){return this._doc}}class Mo{constructor(){this.events={commandWillStart:new Qi,commandEnded:new Qi},this._globalName="",this._localName=""}get globalName(){return this._globalName}set globalName(e){this._globalName=e}get localName(){return this._localName}set localName(e){this._localName=e}tirgger(e){this.events.commandWillStart.dispatch({command:this}),this.execute(e),this.events.commandEnded.dispatch({command:this})}execute(e){}}class CFe{constructor(e){this._index=0,this._commands=[],e.forEach(n=>{const i=n.groupName;n.commandsByGlobalName.forEach(s=>{this._commands.push({command:s,commandGroup:i})})})}[Symbol.iterator](){return this}get command(){return this._indexa.groupName==e);o?r=o:r={groupName:e,commandsByGlobalName:new Map,commandsByLocalName:new Map}}if(r.commandsByGlobalName.has(n))throw new Error(`[AcEdCommandStack] The command with global name '${n}' already exists!`);if(r.commandsByLocalName.has(i))throw new Error(`[AcEdCommandStack] The command with local name '${i}' already exists!`);r.commandsByGlobalName.set(n,s),r.commandsByLocalName.set(i,s),s.globalName=n,s.localName=i}iterator(){return new CFe(this._commandsByGroup)}searchCommandsByPrefix(e){e=e.toUpperCase();const n=[],i=this.iterator();let s=i.next();for(;!s.done;){const{command:r}=s.value;(r.globalName.startsWith(e)||r.localName.startsWith(e))&&n.push(s.value),s=i.next()}return n}lookupGlobalCmd(e){e=e.toUpperCase();let n;for(const i of this._commandsByGroup)if(n=i.commandsByGlobalName.get(e),n)break;return n}lookupLocalCmd(e){e=e.toUpperCase();let n;for(const i of this._commandsByGroup)if(n=i.commandsByLocalName.get(e),n)break;return n}removeCmd(e,n){e=e.toUpperCase(),n=n.toUpperCase();for(const i of this._commandsByGroup)if(i.groupName==e)return i.commandsByGlobalName.delete(n);return!1}removeGroup(e){e=e.toUpperCase();let n=-1;return this._commandsByGroup.some((i,s)=>(n=s,i.groupName==e)),n>=0?(this._commandsByGroup.splice(n,1),!0):!1}};A3.SYSTEMT_COMMAND_GROUP_NAME="ACAD",A3.DEFAUT_COMMAND_GROUP_NAME="USER";let Us=A3;function TFe(t){return{all:t=t||new Map,on:function(e,n){var i=t.get(e);i?i.push(n):t.set(e,[n])},off:function(e,n){var i=t.get(e);i&&(n?i.splice(i.indexOf(n)>>>0,1):t.set(e,[]))},emit:function(e,n){var i=t.get(e);i&&i.slice().map(function(s){s(n)}),(i=t.get("*"))&&i.slice().map(function(s){s(e,n)})}}}const _o=TFe();let MFe=class{constructor(e,n,i=1e3,s=0){this.condition=e,this.action=n,this.checkInterval=i,this.timeout=s,this.timerId=null,this.timeoutId=null}start(){this.timerId===null&&(this.timerId=window.setInterval(()=>{this.condition()&&this.executeAndStop()},this.checkInterval),this.timeout>0&&(this.timeoutId=window.setTimeout(()=>{console.warn("AcEdConditionWaiter: Timeout reached."),this.executeAndStop()},this.timeout)))}stop(){this.timerId!==null&&(clearInterval(this.timerId),this.timerId=null),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}executeAndStop(){this.stop(),this.action()}isRunning(){return this.timerId!==null}};var b1=(t=>(t[t.NoSpecialCursor=-1]="NoSpecialCursor",t[t.Crosshair=0]="Crosshair",t[t.RectCursor=1]="RectCursor",t[t.RubberBand=2]="RubberBand",t[t.NotRotated=3]="NotRotated",t[t.TargetBox=4]="TargetBox",t[t.RotatedCrosshair=5]="RotatedCrosshair",t[t.CrosshairNoRotate=6]="CrosshairNoRotate",t[t.Invisible=7]="Invisible",t[t.EntitySelect=8]="EntitySelect",t[t.Parallelogram=9]="Parallelogram",t[t.EntitySelectNoPersp=10]="EntitySelectNoPersp",t[t.PkfirstOrGrips=11]="PkfirstOrGrips",t[t.CrosshairDashed=12]="CrosshairDashed",t[t.Grab=13]="Grab",t))(b1||{});let AFe=class{constructor(e){this._view=e,this._cursorMap=new Map;const n=20,i=10;this._cursorMap.set(0,this.createRectCrossIcon(i,n-i)),j4.instance().events.sysVarChanged.addEventListener(s=>{if(s.name==="PICKBOX"){let r=s.newVal;r=r>=0?r:0,this._cursorMap.set(0,this.createRectCrossIcon(r,n-r)),this.setCursor(this._currentCursor)}}),this.setCursor(0)}get currentCursor(){return this._currentCursor}setCursor(e){const n=this._view.canvas;if(e<=-1)n.style.cursor="default";else if(e==13)n.style.cursor="grab";else{const i=this._cursorMap.get(e);i&&(n.style.cursor=i)}this._currentCursor=e}encodeSvgToCursor(e,n,i){return`url('data:image/svg+xml;base64,${btoa(e)}') ${n} ${i}, auto`}createRectCrossIcon(e,n,i="white"){const s=e/2,r=e+2*n,o=` `;return this.encodeSvgToCursor(o,s+n,s+n)}};const Tm=class{static get messages(){return this._messages}static getLocaleMessage(e){return this._messages[e]}static mergeLocaleMessage(e,n){WG(this._messages[e],n)}static registerMessage(e,n){this.mergeLocaleMessage(e,n)}static setCurrentLocale(e){const n=this._currentLocale;this._currentLocale=e,this.events.localeChanged.dispatch({old:n,new:this._currentLocale})}static get currentLocale(){return this._currentLocale}static t(e,n){const i=this._currentLocale,s=this._messages[i],r=e.split(".");let o=s;for(const a of r){if(!o||typeof o!="object")return n?.fallback??e;o=o[a]}return typeof o=="string"?o:n?.fallback??e}static cmdDescription(e,n){const i=`command.${e}.${n.toLowerCase()}`;return this.t(i)}static sysCmdDescription(e){return this.cmdDescription(Us.SYSTEMT_COMMAND_GROUP_NAME,e)}};Tm._messages={en:{},zh:{}},Tm._currentLocale="en",Tm.events={localeChanged:new Qi},Tm.userCmdDescription=t=>Tm.cmdDescription(Us.DEFAUT_COMMAND_GROUP_NAME,t);let sr=Tm;function WG(t,e){for(const n of Object.keys(e)){const i=e[n],s=t[n];aO(s)&&aO(i)?WG(s,i):t[n]=i}}function aO(t){return typeof t=="object"&&t!==null}const kFe={ACAD:{circle:"Creates one circle by center and radius",csvg:"Converts current drawing to SVG",dimlinear:"Creates linear dimensions",line:"Draws straight line segments between points",log:"Logs debug information in console",open:"Opens an existing drawing file",pan:"Shifts the view without changing the viewing direction or magnification",pickbox:"Sets the size (in pixels) of the selection box used to pick objects",qnew:"Starts a new drawing",regen:"Redraw the current drawing",select:"Selects entities",zoom:"Zooms to display the maximum extents of all entities",zoomw:"Zooms to display an area specified by a rectangular window"},USER:{}},PFe={circle:{center:"Specify the center of circle:",radius:"Specify the radius of circle:"},dimlinear:{xLine1Point:"Specify the first extension line origin:",xLine2Point:"Specify the second extension line origin:",dimLinePoint:"Specify dimension line location:"},line:{firstPoint:"Specify the first point:",nextPoint:"Specify the next point:"},sysvar:{prompt:"Please input new value:"}},LFe={commandLine:{noLast:"(no last command)",unknownCommand:"Unknown command",executed:"Executed command",showHistory:"Show command history",placeholder:"Type command",showMessages:"Show message history",canceled:"*Canceled*",noHistory:"(no history)",close:"Close command line"},inputManager:{firstCorner:"Specify the first corner or",secondCorner:"Specify the second corner or"},message:{fetchingDrawingFile:"Fetching file ..."},progress:{start:"Start parsing file ...",parse:"Parsing file ...",font:"Downloading fonts needed by this drawing ...",ltype:"Parsing line types ...",style:"Parsing text syltes ...",dimstyle:"Parsing dimension styles ...",layer:"Parsing layers ...",vport:"Parsing viewports ...",blockrecord:"Parsing block record ...",header:"Parsing header ...",block:"Parsing blocks ...",entity:"Parsing entities ...",object:"Parsing named dictionaries ...",end:"Finished!"}},IFe={ACAD:{circle:"使用圆心和半径创建圆",csvg:"转换当前图纸为SVG格式",dimlinear:"创建线性尺寸标注",line:"在指定点之间绘制直线段",log:"在控制台输出调试信息",open:"打开图纸",pan:"平移视图",pickbox:"控制用于选择对象的拾取框大小(像素)",qnew:"创建新图纸",regen:"重绘图纸",select:"选择图元",zoom:"缩放以显示所有对象",zoomw:"缩放以显示矩形窗口内的对象"},USER:{}},RFe={circle:{center:"指定圆的圆心:",radius:"指定圆的半径:"},dimlinear:{xLine1Point:"指定第一条尺寸界限原点:",xLine2Point:"指定第二条尺寸界限原点:",dimLinePoint:"指定尺寸线位置:"},line:{firstPoint:"指定第一个点:",nextPoint:"指定下一个点:"},sysvar:{prompt:"请输入新的值:"}},OFe={commandLine:{noLast:"(无上一次命令)",unknownCommand:"未知命令",executed:"已执行命令",showHistory:"显示命令历史",placeholder:"输入命令",showMessages:"显示消息历史",canceled:"*已取消*",noHistory:"(无历史记录)",close:"关闭命令行"},inputManager:{firstCorner:"指定第一个角点或",secondCorner:"指定第二个角点或"},message:{fetchingDrawingFile:"正在加载图纸文件..."},progress:{start:"开始解析文件...",parse:"正在解析文件 ...",font:"正在下载图纸所需字体...",ltype:"正在解析线形...",style:"正在解析文字样式...",dimstyle:"正在解析标注样式...",layer:"正在解析图层...",vport:"正在解析视口...",blockrecord:"正在解析BTRs...",header:"正在解析文件头...",block:"正在解析块..",entity:"正在解析图元...",object:"正在解析NODs...",end:"完成!"}};sr.mergeLocaleMessage("en",{command:kFe,jig:PFe,main:LFe});sr.mergeLocaleMessage("zh",{command:IFe,jig:RFe,main:OFe});let DFe=class{constructor(e=document.body){this.container=e,this.history=[],this.historyIndex=-1,this.lastExecuted=null,this.isCmdPopupOpen=!1,this.isMsgPanelOpen=!1,this.minWidth=420,this.widthRatio=.66,this.autoCompleteIndex=-1,this.injectCSS(),this.createUI(),this.bindEvents(),this.resizeHandler(),window.addEventListener("resize",()=>this.resizeHandler()),sr.events.localeChanged.addEventListener(()=>this.refreshLocale())}get visible(){return this.cliContainer.style.display!=="none"}set visible(e){this.cliContainer.style.display=e?"block":"none"}localize(e,n){return sr.t(e,{fallback:n})}refreshLocale(){Array.from(this.msgPanel.children).forEach(e=>{var n,i,s,r;const o=e,a=o.dataset.msgKey;if(a)if(a==="main.commandLine.executed"){const l=((i=(n=o.textContent)==null?void 0:n.split(":")[1])==null?void 0:i.trim())??"";o.textContent=`${this.localize(a)}: ${l}`}else if(a==="main.commandLine.unknownCommand"){const l=((r=(s=o.textContent)==null?void 0:s.split(":")[1])==null?void 0:r.trim())??"";o.textContent=`${this.localize(a)}: ${l}`}else o.textContent=this.localize(a)}),this.input.setAttribute("data-placeholder",this.localize("main.commandLine.placeholder")),this.downBtn.title=this.localize("main.commandLine.showHistory"),this.upBtn.title=this.localize("main.commandLine.showMessages")}executeCommand(e){if(!e||!e.trim())if(this.lastExecuted)e=this.lastExecuted;else{this.printMessage(this.localize("main.commandLine.noLast","(no last command)"));return}const n=this.resolveCommand(e);if(!n){const s=this.localize("main.commandLine.unknownCommand");this.printError(`${s}: ${e}`);return}this.history.push(n.globalName),this.historyIndex=this.history.length,this.lastExecuted=n.globalName,this.printHistoryLine(e);const i=this.localize("main.commandLine.executed");this.printMessage(`${i}: ${n.localName}`),si.instance.sendStringToExecute(e),this.renderCommandLine("")}injectCSS(){const e=document.createElement("style");e.textContent=` .ml-cli-container { position: fixed; bottom: 45px; left: 50%; transform: translateX(-50%); font-family: "Segoe UI", Arial, sans-serif; font-size: 13px; box-sizing: border-box; user-select: none; } .ml-cli-bar { display: flex; align-items: center; gap: 6px; border-radius: 6px; background: linear-gradient(#ededed, #e0e0e0); border: 1px solid rgba(0, 0, 0, 0.35); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25); min-width: 300px; height: 30px; } .ml-cli-left { display: flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, 0.06); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.08); height: 100%; } .ml-cli-close-btn { width: 18px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #222; font-size: 12px; background: transparent; cursor: pointer; padding: 0; } .ml-cli-close-btn:hover { background: rgba(0,0,0,0.10); } .ml-cli-down, .ml-cli-up { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; background: transparent; border: none; cursor: pointer; font-size: 16px; color: #222; padding: 0; } .ml-cli-up { transform: rotate(180deg); transform-origin: center; } .ml-cli-right { display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.06); border-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.08); height: 100%; } .ml-cli-input { flex: 1; display: flex; align-items: center; min-height: 22px; padding: 0 6px; border-radius: 3px; background: transparent; outline: none; border: none; font-family: monospace; color: #333; white-space: nowrap; overflow: hidden; line-height: normal; } .ml-cli-input[data-placeholder]:empty:before { content: attr(data-placeholder); color: #9a9a9a; font-weight: 400; display: flex; align-items: center; height: 100%; } .ml-cli-option { display: inline-block; color: #222; background: #f7f7f7; border: 1px solid rgba(0, 0, 0, 0.06); padding: 2px 6px; border-radius: 3px; margin: 0 4px; cursor: pointer; font-size: 12px; } .ml-cli-option:hover { background: #eaeaea; } .ml-cli-cmd-popup { position: absolute; bottom: 100%; left: 0; transform: translate(0, 0); max-height: 220px; overflow-y: auto; background: #333; border: 1px solid rgba(0, 0, 0, 0.5); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); border-radius: 4px; padding: 6px 0; color: #fff; } .ml-cli-cmd-popup .item { padding: 8px 14px; cursor: pointer; color: #fff; font-size: 14px; } .ml-cli-cmd-popup .item:hover { background: #444; } .ml-cli-msg-panel { position: absolute; bottom: 100%; left: 0; transform: translate(0, 0); max-height: 340px; overflow-y: auto; background: #333; border: 1px solid rgba(0, 0, 0, 0.5); box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); border-radius: 4px; padding: 6px 0; font-family: "Microsoft YaHei", Arial, sans-serif; color: #fff; font-size: 14px; white-space: pre-wrap; line-height: 1.35; } .ml-cli-history-line { padding: 4px 6px; color: #fff; } .ml-cli-msg-error { color: #ff5555; } .ml-cli-wrapper { position: relative; width: 100%; } .hidden { display: none !important; } .ml-cli-cmd-popup::-webkit-scrollbar, .ml-cli-msg-panel::-webkit-scrollbar { width: 10px; } .ml-cli-cmd-popup::-webkit-scrollbar-thumb, .ml-cli-msg-panel::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 6px; } `,document.head.appendChild(e)}createUI(){this.cliContainer=document.createElement("div"),this.cliContainer.className="ml-cli-container",this.wrapper=document.createElement("div"),this.wrapper.className="ml-cli-wrapper",this.cliContainer.appendChild(this.wrapper),this.bar=document.createElement("div"),this.bar.className="ml-cli-bar",this.wrapper.appendChild(this.bar),this.leftGroup=document.createElement("div"),this.leftGroup.className="ml-cli-left",this.bar.appendChild(this.leftGroup),this.closeBtn=document.createElement("div"),this.closeBtn.className="ml-cli-close-btn",this.closeBtn.title=this.localize("main.commandLine.close","Close"),this.closeBtn.innerHTML="✕",this.leftGroup.appendChild(this.closeBtn),this.downBtn=document.createElement("button"),this.downBtn.className="ml-cli-down",this.downBtn.title=this.localize("main.commandLine.showHistory"),this.downBtn.innerHTML="▾",this.leftGroup.appendChild(this.downBtn),this.input=document.createElement("div"),this.input.className="ml-cli-input",this.input.contentEditable="true",this.input.setAttribute("spellcheck","false"),this.input.setAttribute("data-placeholder",this.localize("main.commandLine.placeholder")),this.bar.appendChild(this.input);const e=document.createElement("div");e.className="ml-cli-right",this.bar.appendChild(e),this.upBtn=document.createElement("button"),this.upBtn.className="ml-cli-up",this.upBtn.title=this.localize("main.commandLine.showMessages"),this.upBtn.innerHTML="▾",e.appendChild(this.upBtn),this.cmdPopup=document.createElement("div"),this.cmdPopup.className="ml-cli-cmd-popup hidden",this.wrapper.appendChild(this.cmdPopup),this.msgPanel=document.createElement("div"),this.msgPanel.className="ml-cli-msg-panel hidden",this.wrapper.appendChild(this.msgPanel),this.container.appendChild(this.cliContainer)}bindEvents(){this.closeBtn.addEventListener("click",e=>{e.stopPropagation(),this.visible=!1,wr.instance.isShowCommandLine=!1}),this.downBtn.addEventListener("click",e=>{e.stopPropagation(),this.isCmdPopupOpen=!this.isCmdPopupOpen,this.updatePopups({showCmd:this.isCmdPopupOpen,showMsg:!1}),this.isCmdPopupOpen&&this.showCommandHistoryPopup()}),this.upBtn.addEventListener("click",e=>{e.stopPropagation(),this.isMsgPanelOpen=!this.isMsgPanelOpen,this.updatePopups({showCmd:!1,showMsg:this.isMsgPanelOpen}),this.isMsgPanelOpen&&this.showMessagePanel()}),document.addEventListener("click",e=>{this.cliContainer.contains(e.target)||this.updatePopups({showCmd:!1,showMsg:!1})}),this.input.addEventListener("keydown",e=>this.handleKeyDown(e)),this.input.addEventListener("keydown",e=>this.handleArrowKeys(e)),this.input.addEventListener("input",()=>this.handleInputChange()),this.input.addEventListener("focus",()=>this.updatePopups({showCmd:!1,showMsg:!1})),this.cmdPopup.addEventListener("click",e=>{const n=e.target.closest(".item");n&&(this.setInputText(n.dataset.value||""),this.input.focus(),this.updatePopups({showCmd:!1,showMsg:!1}))})}handleKeyDown(e){if(e.key==="Enter"){e.preventDefault();const n=this.getInputText();this.executeCommand(n),this.updatePopups({showCmd:!1,showMsg:!1})}else e.key==="Escape"&&(e.preventDefault(),this.setInputText(""),this.printMessage(this.localize("main.commandLine.canceled")),this.updatePopups({showCmd:!1,showMsg:!1}))}handleArrowKeys(e){e.key==="ArrowUp"&&(e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(-1):this.navigateHistory(-1)),e.key==="ArrowDown"&&(e.preventDefault(),this.isCmdPopupOpen?this.navigateAutoComplete(1):this.navigateHistory(1))}handleInputChange(){const e=this.getInputText();if(!e){this.updatePopups({showCmd:!1});return}const n=Us.instance.searchCommandsByPrefix(e);n.length?(this.autoCompleteIndex=-1,this.cmdPopup.innerHTML="",n.forEach((i,s)=>{const r=document.createElement("div");r.className="item",r.dataset.value=i.command.globalName;const o=sr.cmdDescription(i.commandGroup,i.command.globalName);r.innerHTML=`${i.command.globalName} - ${o}`,s===this.autoCompleteIndex&&r.classList.add("selected"),this.cmdPopup.appendChild(r)}),this.updatePopups({showCmd:!0})):this.updatePopups({showCmd:!1})}navigateAutoComplete(e){const n=Array.from(this.cmdPopup.querySelectorAll(".item"));if(!n.length)return;this.autoCompleteIndex+=e,this.autoCompleteIndex<0&&(this.autoCompleteIndex=0),this.autoCompleteIndex>=n.length&&(this.autoCompleteIndex=n.length-1),n.forEach((s,r)=>{s.classList.toggle("selected",r===this.autoCompleteIndex)});const i=n[this.autoCompleteIndex];i&&this.setInputText(i.dataset.value??"")}navigateHistory(e){this.history.length&&(this.historyIndex===-1&&(this.historyIndex=this.history.length),this.historyIndex+=e,this.historyIndex<0&&(this.historyIndex=0),this.historyIndex>this.history.length&&(this.historyIndex=this.history.length),this.historyIndex>=0&&this.historyIndexn.remove()),e.innerText.replace(/\u00A0/g," ").trim()}setInputText(e=""){this.input.innerHTML="",e&&this.input.appendChild(document.createTextNode(e+" ")),this.setCursorToEnd()}renderCommandLine(e,n=[]){this.input.innerHTML="",e&&this.input.appendChild(document.createTextNode(e+" ")),n.forEach(i=>{const s=document.createElement("span");s.className="ml-cli-option",s.textContent=i,s.addEventListener("click",r=>{r.stopPropagation(),this.insertOption(i)}),this.input.appendChild(s),this.input.appendChild(document.createTextNode(" "))}),this.setCursorToEnd(),this.input.focus()}insertOption(e){this.input.appendChild(document.createTextNode(e+" ")),this.setCursorToEnd(),this.input.focus()}setCursorToEnd(){const e=document.createRange();e.selectNodeContents(this.input),e.collapse(!1);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(e),this.input.scrollLeft=this.input.scrollWidth)}resolveCommand(e){const n=e.trim().split(/\s+/)[0].toUpperCase();return Us.instance.lookupLocalCmd(n)}updatePopups({showCmd:e=!1,showMsg:n=!1}={}){this.isCmdPopupOpen=e,this.isMsgPanelOpen=n,this.cmdPopup.classList.toggle("hidden",!e),this.msgPanel.classList.toggle("hidden",!n),e&&this.positionCmdPopup(),n&&this.positionMsgPanel()}showCommandHistoryPopup(){if(this.cmdPopup.innerHTML="",this.history.length)for(let e=this.history.length-1;e>=0;e--){const n=document.createElement("div");n.className="item",n.dataset.value=this.history[e],n.textContent=this.history[e],this.cmdPopup.appendChild(n)}else{const e=document.createElement("div");e.className="item",e.textContent=this.localize("main.commandLine.noHistory"),this.cmdPopup.appendChild(e)}this.positionCmdPopup()}positionCmdPopup(){this.cmdPopup.style.left="0px",this.cmdPopup.style.width=this.bar.offsetWidth+"px"}showMessagePanel(){if(!this.msgPanel.children.length){const e=document.createElement("div");e.className="ml-cli-history-line",e.textContent=this.localize("main.commandLine.noHistory"),e.dataset.msgKey="main.commandLine.noHistory",this.msgPanel.appendChild(e)}this.msgPanel.scrollTop=this.msgPanel.scrollHeight,this.positionMsgPanel()}positionMsgPanel(){this.msgPanel.style.width=this.bar.offsetWidth+"px"}clearNoHistoryPlaceholder(){Array.from(this.msgPanel.children).forEach(e=>{const n=e;n.dataset.msgKey==="main.commandLine.noHistory"&&this.msgPanel.removeChild(n)})}printMessage(e,n){this.clearNoHistoryPlaceholder();const i=document.createElement("div");i.className="ml-cli-history-line",i.textContent=e,n&&(i.dataset.msgKey=n),this.msgPanel.appendChild(i),this.showMessagePanel()}printError(e,n){this.clearNoHistoryPlaceholder();const i=document.createElement("div");i.className="ml-cli-history-line ml-cli-msg-error",i.textContent=e,n&&(i.dataset.msgKey=n),this.msgPanel.appendChild(i),this.showMessagePanel()}printHistoryLine(e){this.clearNoHistoryPlaceholder();const n=document.createElement("div");n.className="ml-cli-history-line",n.textContent="> "+e,n.dataset.msgKey="main.commandLine.executed",this.msgPanel.appendChild(n),this.showMessagePanel()}resizeHandler(){let e=Math.max(this.minWidth,window.innerWidth*this.widthRatio);e=Math.min(e,window.innerWidth-20),this.bar.style.width=e+"px",this.positionMsgPanel(),this.positionCmdPopup()}},NFe=class{constructor(e){this.options=e}parse(e){const n=Number(e);return isNaN(n)||!this.options.allowNegative&&n<0||!this.options.allowZero&&n===0?null:n}};class lP{constructor(e){this.options=e}parse(e){const n=Number(e);return isNaN(n)||!this.options.allowNegative&&n<0||!this.options.allowZero&&n===0?null:n}}class lO extends lP{}let BFe=class extends lP{},FFe=class extends lP{constructor(e){super(e)}parse(e){const n=super.parse(e);return n==null?n:!Number.isInteger(n)||this.options.lowerLimit!==void 0&&nthis.options.upperLimit?null:n}},zFe=class{constructor(e){this.options=e}parse(e,n){const i=Number(e),s=Number(n);return isNaN(i)||isNaN(s)?null:{x:i,y:s,z:0}}},UFe=class{constructor(e){this.options=e}parse(e){return!this.options.allowSpaces&&e.includes(" ")||!this.options.allowEmpty&&e.length===0||this.options.maxLength&&e.length>this.options.maxLength?null:e}},$Fe=class{constructor(e,n,i,s=!0,r=!1,o=!0){this._displayName=e,this._globalName=n??e,this._localName=i??this._globalName,this._enabled=s,this._isReadOnly=r,this._visible=o}get displayName(){return this._displayName}set displayName(e){this._isReadOnly||(this._displayName=e)}get enabled(){return this._enabled}set enabled(e){this._isReadOnly||(this._enabled=e)}get globalName(){return this._globalName}set globalName(e){this._isReadOnly||(this._globalName=e)}get isReadOnly(){return this._isReadOnly}get localName(){return this._localName}set localName(e){this._isReadOnly||(this._localName=e)}get visible(){return this._visible}set visible(e){this._isReadOnly||(this._visible=e)}},VFe=class{constructor(){this._keywords=[]}add(e,n,i,s=!0,r=!0){let o,a,l;n===void 0?(o=e,a=e,l=e):i===void 0?(o=n,a=e,l=n):(o=e,a=n,l=i);const c=new $Fe(o,a,l,s,!1,r);return this._keywords.push(c),c}clear(){this._keywords=[],this._defaultKeyword=void 0}toArray(){return this._keywords.slice()}get default(){return this._defaultKeyword}set default(e){if(e&&!this._keywords.includes(e))throw new Error("Default keyword must be one of the collection's keywords");this._defaultKeyword=e}getDisplayString(e=!1){return this._keywords.filter(n=>n.visible&&n.enabled).map(n=>(!e&&this._defaultKeyword,n.displayName)).join("/")}[Symbol.iterator](){let e=0;const n=this._keywords;return{next(){return en.displayName.toLowerCase()===e.toLowerCase())}findByGlobalName(e){return this._keywords.find(n=>n.globalName.toLowerCase()===e.toLowerCase())}get count(){return this._keywords.length}};class cP{constructor(e){this._message=e,this._appendKeywordsToMessage=!0,this._isReadOnly=!1,this._keywords=new VFe}get jig(){return this._jig}set jig(e){this._isReadOnly||(this._jig=e)}get message(){return this._message}set message(e){this._isReadOnly||(this._message=e)}get appendKeywordsToMessage(){return this._appendKeywordsToMessage}set appendKeywordsToMessage(e){this._isReadOnly||(this._appendKeywordsToMessage=e)}get isReadOnly(){return this._isReadOnly}get keywords(){return this._keywords}setMessageAndKeywords(e,n){if(this._isReadOnly)return this;const i=e.match(/^(.*?)\s*(?:\[(.*)\])?$/);if(i){const[,s,r]=i;if(this._message=s.trim(),r!==void 0){const o=r.split("/").map(a=>a.trim()).filter(a=>a.length>0);this._keywords.clear();for(const a of o){let l=n.split(/\s+/).find(c=>c.toLowerCase()===a.toLowerCase());l||(l=a),this._keywords.add(a,l)}}}return this}}class HFe extends cP{constructor(e){super(e),this._defaultValue=0,this._useDefaultValue=!1,this._allowNone=!1,this._allowArbitraryInput=!1,this._allowNegative=!1,this._allowZero=!0}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}get allowArbitraryInput(){return this._allowArbitraryInput}set allowArbitraryInput(e){this.isReadOnly||(this._allowArbitraryInput=e)}get allowNegative(){return this._allowNegative}set allowNegative(e){this.isReadOnly||(this._allowNegative=e)}get allowZero(){return this._allowZero}set allowZero(e){this.isReadOnly||(this._allowZero=e)}}let WFe=class extends HFe{constructor(e){super(e),this._useBasePoint=!0,this._useDashedLine=!0,this._only2d=!0,this.allowNegative=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get only2d(){return this._only2d}set only2d(e){this.isReadOnly||(this._only2d=e)}};class gh extends cP{constructor(e){super(e),this._useBasePoint=!1,this._useDashedLine=!1,this._allowNone=!1}get basePoint(){return this._basePoint}set basePoint(e){this.isReadOnly||(e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e))}get useBasePoint(){return this._useBasePoint}set useBasePoint(e){this.isReadOnly||(this._useBasePoint=e)}get useDashedLine(){return this._useDashedLine}set useDashedLine(e){this.isReadOnly||(this._useDashedLine=e)}get allowNone(){return this._allowNone}set allowNone(e){this.isReadOnly||(this._allowNone=e)}}let GFe=class extends cP{constructor(e){super(e),this._allowSpaces=!0,this._allowEmpty=!1,this._defaultValue="",this._useDefaultValue=!1}get allowSpaces(){return this._allowSpaces}set allowSpaces(e){this.isReadOnly||(this._allowSpaces=e)}get allowEmpty(){return this._allowEmpty}set allowEmpty(e){this.isReadOnly||(this._allowEmpty=e)}get maxLength(){return this._maxLength}set maxLength(e){this.isReadOnly||(this._maxLength=e)}get defaultValue(){return this._defaultValue}set defaultValue(e){this.isReadOnly||(this._defaultValue=e)}get useDefaultValue(){return this._useDefaultValue}set useDefaultValue(e){this.isReadOnly||(this._useDefaultValue=e)}};class uP{constructor(e="rect",n=8,i="green"){this._type=e,this._size=n,this._color=i,uP.injectCSS(),this._el=document.createElement("div"),this._el.classList.add("ml-marker"),this._el.style.color=i,this.applyShape(),document.body.appendChild(this._el)}get color(){return this._color}set color(e){this._color=e,this._el.style.color=e}get type(){return this._type}set type(e){this._type=e,this.applyShape()}static injectCSS(){if(document.getElementById("ml-marker-style"))return;const e=document.createElement("style");e.id="ml-marker-style",e.textContent=` .ml-marker { position: absolute; pointer-events: none; transform: translate(-50%, -50%); z-index: 999999; } .ml-marker-circle { border-radius: 50%; border: 2px solid currentColor; background: transparent; } .ml-marker-rect { border: 2px solid currentColor; background: transparent; } .ml-marker-triangle { width: 0; height: 0; border-left: 0.5em solid transparent; border-right: 0.5em solid transparent; border-bottom: 1em solid currentColor; transform: translate(-50%, -100%); } `,document.head.appendChild(e)}applyShape(){switch(this._type){case"circle":this._el.classList.add("ml-marker-circle"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"rect":this._el.classList.add("ml-marker-rect"),this._el.style.width=`${this._size}px`,this._el.style.height=`${this._size}px`;break;case"triangle":this._el.classList.add("ml-marker-triangle"),this._el.style.fontSize=`${this._size}px`;break}}setPosition(e){this._el.style.left=`${e.x}px`,this._el.style.top=`${e.y}px`}destroy(){this._el.remove()}}let jFe=class{constructor(e){this.stack=[],this.view=e}showMarker(e,n,i,s){const r=this.view.wcs2Cwcs(e),o=new uP(n,i,s);return o.setPosition(r),this.stack.push(o),o}hideMarker(){const e=this.stack.pop();e&&e.destroy()}clear(){for(const e of this.stack)e.destroy();this.stack=[]}top(){return this.stack[this.stack.length-1]}},cO=class{constructor(e){this.userTyped=!1,this.parent=e,this.input=document.createElement("input"),this.input.type="text",this.boundOnInput=()=>{this.userTyped=!0,this.resetValidation()},this.input.addEventListener("input",this.boundOnInput),this.parent.appendChild(this.input)}markInvalid(){this.input.classList.add("invalid")}markValid(){this.input.classList.remove("invalid")}resetValidation(){this.input.classList.remove("invalid")}get placeholder(){return this.input.placeholder}set placeholder(e){e&&(this.input.placeholder=e)}set value(e){e!==void 0&&(this.input.value=e)}get value(){return this.input.value}get focused(){return document.activeElement===this.input}focus(){this.input.focus()}select(){this.input.select()}remove(){this.input.remove()}isEventTarget(e){return e.target===this.input}dispose(){this.input.removeEventListener("input",this.boundOnInput),this.remove()}addEventListener(e,n,i){this.input.addEventListener(e,n,i)}removeEventListener(e,n,i){this.input.removeEventListener(e,n,i)}},KFe=class{constructor(e){this.parent=e.parent,this.twoInputs=e.twoInputs??!0,this.boundOnInput=()=>this.handleInput(),this.boundOnKeyDown=n=>this.handleKeyDown(n),this.xInput=new cO(this.parent),this.xInput.addEventListener("input",this.boundOnInput),this.xInput.addEventListener("keydown",this.boundOnKeyDown),this.twoInputs&&(this.yInput=new cO(this.parent),this.yInput.addEventListener("input",this.boundOnInput),this.yInput.addEventListener("keydown",this.boundOnKeyDown)),this.validateFn=e.validate,this.onCommit=e.onCommit,this.onChange=e.onChange,this.onCancel=e.onCancel,setTimeout(()=>{this.yInput&&this.yInput.select(),this.xInput.focus(),this.xInput.select()},0)}get userTyped(){var e;return this.xInput.userTyped||!!((e=this.xInput)!=null&&e.userTyped)}get focused(){var e;return this.xInput.focused||((e=this.yInput)==null?void 0:e.focused)}focus(){this.xInput.focus()}setValue(e){this.xInput.userTyped||(this.xInput.value=e.x),this.twoInputs&&this.yInput&&!this.yInput.userTyped&&(this.yInput.value=e.y??"")}dispose(){var e;this.xInput.removeEventListener("input",this.boundOnInput),this.xInput.removeEventListener("keydown",this.boundOnKeyDown),this.xInput.dispose(),this.yInput&&(this.yInput.removeEventListener("input",this.boundOnInput),this.yInput.removeEventListener("keydown",this.boundOnKeyDown),(e=this.yInput)==null||e.dispose())}handleInput(){var e;const n=this.validate();(e=this.onChange)==null||e.call(this,n)}handleKeyDown(e){var n,i;let s=this.xInput,r=this.yInput;if(this.yInput&&this.yInput.isEventTarget(e)&&(s=this.yInput,r=this.xInput),e.key==="Enter"){const o=this.validate();o.isValid&&o.value!=null?((n=this.onCommit)==null||n.call(this,o.value),s.markValid()):s.markInvalid(),e.preventDefault(),e.stopPropagation()}else e.key==="Escape"?((i=this.onCancel)==null||i.call(this),e.preventDefault(),e.stopPropagation()):e.key==="Tab"&&(e.preventDefault(),r&&(r?.focus(),r?.select()))}validate(){const e=this.xInput.value.trim(),n=this.twoInputs&&this.yInput?this.yInput.value.trim():void 0;return this.validateFn({x:e,y:n})}},qFe=class{constructor(e){this.container=null,this.baseLine=null,this.perpLineAtBase=null,this.perpLineAtCursor=null,this.connectorLine=null,this.labelEl=null,this.angleLabelEl=null,this.xAxisLine=null,this.angleSvg=null,this.anglePath=null,this.options={},this.view=e}get element(){return this.container}start(e,n){this.basePoint=new Yt(e),this.options=n||{};const i=this.options.color||"#0f0";this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.left="0",this.container.style.top="0",this.container.style.pointerEvents="none",this.container.style.zIndex="99999",document.body.appendChild(this.container),this.baseLine=document.createElement("div"),this.baseLine.style.position="fixed",this.baseLine.style.borderTop=`1px solid ${i}`,this.container.appendChild(this.baseLine);const s=()=>{const r=document.createElement("div");return r.style.position="fixed",r.style.borderTop=`1px dashed ${i}`,this.container.appendChild(r),r};this.options.showBaseLineOnly||(this.perpLineAtBase=s(),this.perpLineAtCursor=s(),this.connectorLine=s(),this.labelEl=document.createElement("div"),this.labelEl.style.position="fixed",this.labelEl.style.color=i,this.labelEl.style.fontSize="12px",this.labelEl.style.padding="2px 4px",this.labelEl.style.borderRadius="4px",this.container.appendChild(this.labelEl),this.xAxisLine=document.createElement("div"),this.xAxisLine.style.position="fixed",this.xAxisLine.style.borderTop=`1px solid ${i}`,this.container.appendChild(this.xAxisLine),this.angleSvg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.angleSvg.setAttribute("style","position:absolute; overflow:visible; pointer-events:none;"),this.anglePath=document.createElementNS("http://www.w3.org/2000/svg","path"),this.anglePath.setAttribute("fill","none"),this.anglePath.setAttribute("stroke",i),this.anglePath.setAttribute("stroke-width","1"),this.anglePath.setAttribute("stroke-dasharray","4 4"),this.angleSvg.appendChild(this.anglePath),this.container.appendChild(this.angleSvg),this.angleLabelEl=document.createElement("div"),this.angleLabelEl.style.position="fixed",this.angleLabelEl.style.color=i,this.angleLabelEl.style.fontSize="12px",this.angleLabelEl.style.padding="2px 4px",this.angleLabelEl.style.borderRadius="4px",this.container.appendChild(this.angleLabelEl))}update(e){if(!this.container||!this.basePoint||!this.baseLine)return;const n=this.view.canvas.getBoundingClientRect(),i=this.view.wcs2Cwcs(this.basePoint),s=this.view.wcs2Cwcs(e),r=n.left,o=n.top,a=(b,g,x)=>{const S=x.x-g.x,_=x.y-g.y,E=Math.sqrt(S*S+_*_),T=Math.atan2(_,S)*(180/Math.PI);b.style.width=`${E}px`,b.style.transformOrigin="0 0",b.style.transform=`translate(${g.x+r}px, ${g.y+o}px) rotate(${T}deg)`};if(a(this.baseLine,i,s),this.options.showBaseLineOnly||!this.perpLineAtBase||!this.perpLineAtCursor||!this.connectorLine)return;const l=s.x-i.x,c=s.y-i.y,u=Math.sqrt(l*l+c*c);if(u===0){this.perpLineAtBase&&(this.perpLineAtBase.style.width="0px"),this.perpLineAtCursor&&(this.perpLineAtCursor.style.width="0px"),this.connectorLine&&(this.connectorLine.style.width="0px"),this.xAxisLine&&(this.xAxisLine.style.width="0px"),this.anglePath&&this.anglePath.setAttribute("d",""),this.angleLabelEl&&(this.angleLabelEl.style.display="none");return}const d=this.options.perpendicularLength??50,h=-c/u,f=l/u,p={x:i.x+h*d,y:i.y+f*d},m={x:s.x+h*d,y:s.y+f*d};if(a(this.perpLineAtBase,i,p),a(this.perpLineAtCursor,s,m),a(this.connectorLine,p,m),this.labelEl){const b=(p.x+m.x)/2+r,g=(p.y+m.y)/2+o-24,x=Math.sqrt((e.x-this.basePoint.x)**2+(e.y-this.basePoint.y)**2);this.labelEl.textContent=x.toFixed(3),this.labelEl.style.left=`${b-20}px`,this.labelEl.style.top=`${g}px`,this.labelEl.style.display=""}if(this.xAxisLine){const b={x:i.x+u,y:i.y};a(this.xAxisLine,i,b)}if(this.angleSvg&&this.anglePath&&this.angleLabelEl){const b=u,g=i.x+r,x=i.y+o,S=Math.atan2(s.y-i.y,s.x-i.x),_=S*180/Math.PI,E=S/2,T=g-b,A=x-b,I=b*2;this.angleSvg.style.left=`${T}px`,this.angleSvg.style.top=`${A}px`,this.angleSvg.setAttribute("width",`${I}`),this.angleSvg.setAttribute("height",`${I}`),this.angleSvg.setAttribute("viewBox",`0 0 ${I} ${I}`);const P=b,k=b,B=P+b,R=k,H=P+b*Math.cos(S),q=k+b*Math.sin(S),oe=Math.abs(S)>Math.PI?"1":"0",Z=S>=0?"1":"0",V=`M ${B} ${R} A ${b} ${b} 0 ${oe} ${Z} ${H} ${q}`;this.anglePath.setAttribute("d",V);const D=`${Math.abs(_).toFixed(1)}°`,K=g+b*Math.cos(E),W=x+b*Math.sin(E);this.angleLabelEl.textContent=D;const Q=40;this.angleLabelEl.style.left=`${K-Q/2}px`,this.angleLabelEl.style.top=`${W-12}px`,this.angleLabelEl.style.display=""}}dispose(){this.container&&this.container.remove(),this.container=null,this.baseLine=null,this.perpLineAtBase=null,this.perpLineAtCursor=null,this.connectorLine=null,this.labelEl=null,this.angleLabelEl=null,this.xAxisLine=null,this.angleSvg=null,this.anglePath=null}};const GG=class k3{constructor(e,n){this.lastPoint=null,this.visible=!1,this.disposed=!1,this.view=e,n.disableOSnap||(this.osnapMarkerManager=new jFe(e)),n.basePoint&&(this.rubberBand=new qFe(this.view),this.rubberBand.start(n.basePoint,{color:"#0f0",showBaseLineOnly:n.showBaseLineOnly})),this.parent=n.parent??document.body,this.validateFn=n.validate,this.getDynamicValue=n.getDynamicValue,this.drawPreview=n.drawPreview,this.onCommit=n.onCommit,this.onChange=n.onChange,this.onCancel=n.onCancel,this.container=document.createElement("div"),this.container.className="ml-floating-input";const i=document.createElement("span");i.className="ml-floating-input-label",i.textContent=n.message??"",this.container.appendChild(i),this.inputs=new KFe({parent:this.container,twoInputs:n.twoInputs,validate:this.validateFn,onCancel:this.onCancel,onCommit:this.onCommit,onChange:this.onChange}),document.body.appendChild(this.container),this.boundOnMouseEnter=s=>this.handleMouseEnter(s),this.boundOnMouseLeave=()=>this.handleMouseLeave(),this.boundOnMouseMove=s=>this.handleMouseMove(s),this.boundOnClick=s=>this.handleClick(s),this.parent.addEventListener("mouseenter",this.boundOnMouseEnter),this.parent.addEventListener("mouseleave",this.boundOnMouseLeave),this.injectCSS()}injectCSS(){if(k3.stylesInjected)return;k3.stylesInjected=!0;const e=document.createElement("style");e.textContent=` .ml-floating-input { position: absolute; display: flex; align-items: center; padding: 2px 4px; background: #444; /* gray background for container */ color: #fff; /* white text for message */ border: none; border-radius: 4px; font-size: 12px; pointer-events: none; z-index: 10000; } .ml-floating-input input { font-size: 12px; padding: 2px 4px; margin-left: 6px; height: 22px; width: 90px; /* wider to show coordinates */ background: #888; /* gray background for input */ border: 1px solid #666; /* subtle border */ border-radius: 2px; } .ml-floating-input input.invalid { border-color: red; color: red; } .ml-floating-input-label { white-space: nowrap; color: #fff; /* white label text */ } `,document.head.appendChild(e)}get isVisible(){return this.visible}showAt(e){this.disposed||(this.container.style.display="flex",this.visible=!0,this.inputs.focus(),this.setPosition(e),this.parent.addEventListener("mousemove",this.boundOnMouseMove),this.parent.addEventListener("click",this.boundOnClick))}hide(){this.visible&&(this.container.style.display="none",this.visible=!1,this.removeListener())}dispose(){var e,n;this.disposed||(this.disposed=!0,(e=this.osnapMarkerManager)==null||e.clear(),this.inputs.dispose(),(n=this.rubberBand)==null||n.dispose(),this.removeListener(!0),this.container.remove())}setPosition(e){const n=this.parent.getBoundingClientRect(),i=this.container.getBoundingClientRect(),s={x:e.x-n.left,y:e.y-n.top};let r=s.x+10,o=s.y+10;return r+i.width>n.right&&(r=n.right-i.width),o+i.height>n.bottom&&(o=n.bottom-i.height),r0){const s=gp().workingDatabase.tables.blockTable.modelSpace.getIdAt(i[0]);if(s){const r=[];s.subGetOsnapPoints(cs.EndPoint,{...this.view.curPos,z:0},this.lastPoint,r);let o=Number.MAX_VALUE,a=-1;for(let l=0;l({value:0,raw:{x:""}});return this.makePromise({message:e.message,twoInputs:!1,jig:e.jig,showBaseLineOnly:!1,useBasePoint:!1,handler:n,getDynamicValue:i})}getDistance(e){if(!this.lastPoint)return this.getNumberTyped(e,new lO(e));const n=s=>{const r=s.x-this.lastPoint.x,o=s.y-this.lastPoint.y,a=Math.sqrt(r*r+o*o);return{value:a,raw:{x:this.formatNumber(a,"distance")}}},i=new lO(e);return this.makePromise({message:e.message,twoInputs:!1,jig:e.jig,showBaseLineOnly:!e.useDashedLine,useBasePoint:!0,basePoint:e.basePoint,handler:i,getDynamicValue:n})}getAngle(e){const n=s=>{const r=s.x-this.lastPoint.x,o=s.y-this.lastPoint.y,a=Math.atan2(o,r)*180/Math.PI;return{value:a,raw:{x:this.formatNumber(a,"angle")}}},i=new NFe(e);return this.makePromise({message:e.message,twoInputs:!1,jig:e.jig,showBaseLineOnly:!e.useDashedLine,useBasePoint:!0,basePoint:e.basePoint,handler:i,getDynamicValue:n})}getDouble(e){return this.getNumberTyped(e,new BFe(e))}getInteger(e){return this.getNumberTyped(e,new FFe(e))}getString(e){const n=()=>({value:"",raw:{x:""}}),i=new UFe(e);return this.makePromise({message:e.message,twoInputs:!1,jig:e.jig,showBaseLineOnly:!1,useBasePoint:!1,handler:i,getDynamicValue:n})}async getBox(){const e=sr.t("main.inputManager.firstCorner"),n=new gh(e);n.useDashedLine=!1,n.useBasePoint=!1;const i=await this.getPoint(n),s=this.view.wcs2Cwcs(i),r=document.createElement("div");r.className="ml-jig-preview-rect",document.body.appendChild(r);const o=()=>{r.remove()},a=d=>{const h=this.view.wcs2Cwcs(d),f=Math.min(h.x,s.x),p=Math.min(h.y,s.y),m=Math.abs(h.x-s.x),b=Math.abs(h.y-s.y);Object.assign(r.style,{left:`${f}px`,top:`${p}px`,width:`${m}px`,height:`${b}px`})},l=sr.t("main.inputManager.secondCorner"),c=new gh(l);c.useDashedLine=!1,c.useBasePoint=!1;const u=await this.getPointInternal(c,o,a);return new ar().expandByPoint(i).expandByPoint(u)}getPointInternal(e,n,i){const s=o=>({value:{x:o.x,y:o.y,z:0},raw:{x:this.formatNumber(o.x,"point"),y:this.formatNumber(o.y,"point")}}),r=new zFe(e);return this.makePromise({message:e.message,twoInputs:!0,jig:e.jig,showBaseLineOnly:!e.useDashedLine,useBasePoint:e.useBasePoint,basePoint:e.basePoint,cleanup:n,handler:r,getDynamicValue:s,drawPreview:i})}makePromise(e){return new Promise((n,i)=>{this.active=!0;const s=d=>{const h=e.handler.parse(d.x,d.y);return{isValid:h!=null,value:h??void 0}};let r;e.useBasePoint&&(e.basePoint?r=e.basePoint:this.lastPoint&&(r={x:this.lastPoint.x,y:this.lastPoint.y}));const o=new YFe(this.view,{parent:this.view.canvas,twoInputs:e.twoInputs,message:e.message,disableOSnap:e.disableOSnap,showBaseLineOnly:e.showBaseLineOnly,basePoint:r,validate:s,getDynamicValue:e.getDynamicValue,drawPreview:d=>{var h;if(e.jig){const f=e.getDynamicValue(d);e.jig.update(f.value),e.jig.render()}(h=e.drawPreview)==null||h.call(e,d)},onCommit:d=>{l(d),o.lastPoint&&(this.lastPoint={x:o.lastPoint.x,y:o.lastPoint.y})},onCancel:()=>c()}),a=()=>{var d,h;this.active=!1,(d=e.cleanup)==null||d.call(e),(h=e.jig)==null||h.end(),document.removeEventListener("keydown",u),o.dispose()},l=d=>{a(),n(d)},c=()=>{a(),i(new Error("cancelled"))},u=d=>{d.key==="Escape"&&c()};document.addEventListener("keydown",u),o.showAt(this.view.curMousePos)})}};jG.stylesInjected=!1;let XFe=jG,ZFe=class{constructor(e){this.events={sysVarChanged:new Qi},this._view=e,this._cursorManager=new AFe(e),this._inputManager=new XFe(e)}get isActive(){return this._inputManager.isActive}get currentCursor(){return this._currentCursor}restoreCursor(){this._previousCursor!=null&&this.setCursor(this._previousCursor)}setCursor(e){this._cursorManager.setCursor(e),this._previousCursor=this._currentCursor,this._currentCursor=e}async getPoint(e){return await this._inputManager.getPoint(e)}async getAngle(e){return await this._inputManager.getAngle(e)}async getDistance(e){return await this._inputManager.getDistance(e)}async getString(e){return await this._inputManager.getString(e)}async getSelection(){return await this._inputManager.getBox()}};class dP{constructor(e){this.view=e}render(){this.entity&&this.view.addTransientEntity(this.entity)}end(){this.entity&&this.view.removeTransientEntity(this.entity.objectId)}}let JFe=class{constructor(e=[]){this.events={selectionAdded:new Qi,selectionRemoved:new Qi},this._ids=new Set(e)}get ids(){return Array.from(this._ids)}get count(){return this._ids.size}add(e){Array.isArray(e)?(e.forEach(n=>this._ids.add(n)),this.events.selectionAdded.dispatch({ids:e})):(this._ids.add(e),this.events.selectionAdded.dispatch({ids:[e]}))}delete(e){Array.isArray(e)?(e.forEach(n=>this._ids.delete(n)),this.events.selectionRemoved.dispatch({ids:e})):(this._ids.delete(e),this.events.selectionRemoved.dispatch({ids:[e]}))}has(e){return this._ids.has(e)}clear(){if(this._ids.size>0){const e=Array.from(this._ids);this._ids.clear(),this.events.selectionRemoved.dispatch({ids:e})}}};var vh=(t=>(t[t.SELECTION=0]="SELECTION",t[t.PAN=1]="PAN",t))(vh||{});let QFe=class{constructor(e){this.events={mouseMove:new Qi,viewResize:new Qi,hover:new Qi,unhover:new Qi},this._canvas=e;const n=e.getBoundingClientRect();this._bbox=new Zi,this._width=n.width,this._height=n.height,this._curPos=new Si,this._curMousePos=new Si,this._selectionSet=new JFe,this._editor=new ZFe(this),this._canvas.addEventListener("mousemove",i=>this.onMouseMove(i)),this._canvas.addEventListener("mousedown",i=>{i.button===1&&this._editor.setCursor(b1.Grab)}),this._canvas.addEventListener("mouseup",i=>{i.button===1&&this._editor.restoreCursor()}),window.addEventListener("resize",this.onWindowResize.bind(this)),this._selectionBoxSize=4,this._hoverTimer=null,this._pauseTimer=null,this._hoveredObjectId=null}get editor(){return this._editor}get selectionBoxSize(){return this._selectionBoxSize}set selectionBoxSize(e){this._selectionBoxSize=e}setCursor(e){this._editor.setCursor(e)}setCalculateSizeCallback(e){this._calculateSizeCallback=e}get width(){return this._width}set width(e){this._width=e}get height(){return this._height}set height(e){this._height=e}get bbox(){return this._bbox}get canvas(){return this._canvas}get aspect(){return this._width/this._height}get curPos(){return this._curPos}get curMousePos(){return this._curMousePos}get selectionSet(){return this._selectionSet}onWindowResize(){if(this._calculateSizeCallback){const{width:e,height:n}=this._calculateSizeCallback();this._width=e,this._height=n}else this._width=this._canvas.clientWidth,this._height=this._canvas.clientHeight;this.events.viewResize.dispatch({width:this._width,height:this._height})}onMouseMove(e){this._curMousePos=new Si(e.clientX,e.clientY);const n=this.cwcs2Wcs(this._curMousePos);this._curPos.copy(n),this.events.mouseMove.dispatch({x:n.x,y:n.y}),this.mode==0&&(this._editor.isActive||this.startHoverTimer(n.x,n.y))}setHoveredObjectId(e){this._hoveredObjectId&&(this.events.unhover.dispatch({id:this._hoveredObjectId,x:this.curMousePos.x,y:this.curMousePos.y}),this.onUnhover(this._hoveredObjectId)),this._hoveredObjectId=e,e&&(this.startPauseTimer(e),this.onHover(e))}hoverAt(e,n){const i=this.pick({x:e,y:n});i.length>0?this.setHoveredObjectId(i[0]):(this.setHoveredObjectId(null),this.clearPauseTimer())}clearHoverTimer(){this._hoverTimer&&clearTimeout(this._hoverTimer)}clearPauseTimer(){this._pauseTimer&&clearTimeout(this._pauseTimer)}startHoverTimer(e,n){this.clearHoverTimer(),this._hoverTimer=setTimeout(()=>{this.hoverAt(e,n)},50)}startPauseTimer(e){this._pauseTimer=setTimeout(()=>{this.events.hover.dispatch({id:e,x:this.curMousePos.x,y:this.curMousePos.y})},500)}},e9e=class{constructor(){this._fileName="",this._docTitle="",this._isReadOnly=!0,this._database=new e6e,this.docTitle="Untitled"}async openUri(e,n){this._uri=e,this._isReadOnly=n&&n.readOnly||!1,this._fileName=this.getFileNameFromUri(e);let i=!0;try{await this._database.openUri(e,n),this.docTitle=this._fileName}catch{i=!1,_o.emit("failed-to-open-file",{fileName:e})}return i}async openDocument(e,n,i){var s;let r=!0;this._fileName=e;try{const o=(s=e.split(".").pop())==null?void 0:s.toLocaleLowerCase();await this._database.read(n,i,o=="dwg"?hh.DWG:hh.DXF),this.docTitle=this._fileName}catch(o){r=!1,_o.emit("failed-to-open-file",{fileName:e}),console.error(o)}return r}get uri(){return this._uri}get database(){return this._database}get docTitle(){return this._docTitle}set docTitle(e){this._docTitle=e,typeof document<"u"&&(document.title=e)}get isReadOnly(){return this._isReadOnly}getFileNameFromUri(e){try{const n=new URL(e).pathname.split("/");return n[n.length-1]||""}catch(n){return console.error("Invalid URI:",n),""}}},uO=class{constructor(){this.listeners=[]}addEventListener(e){this.listeners.push(e)}removeEventListener(e){this.listeners=this.listeners.filter(n=>n!==e)}replaceEventListener(e){this.removeEventListener(e),this.addEventListener(e)}dispatch(e,...n){for(const i of this.listeners)i.call(null,e,...n)}},t9e=class{constructor(){this.cache=new Map}hasGeometry(e,n){const i=this.generateKey(e,n);return this.cache.has(i)}getGeometry(e,n){const i=this.generateKey(e,n);if(this.cache.has(i))return this.cache.get(i)}setGeometry(e,n,i){const s=this.generateKey(e,n);this.cache.set(s,i)}dispose(){for(const e of this.cache.values())e.dispose();this.cache.clear()}generateKey(e,n){return`${e}_${n}`}},KG=class{constructor(e){this.names=new Set,this.unsupportedChars={},this.encoding=e.encoding,e.alias.forEach(n=>this.names.add(n)),this.cache=new t9e}addUnsupportedChar(e){this.unsupportedChars[e]||(this.unsupportedChars[e]=0),this.unsupportedChars[e]++}},qG=class extends Yu{constructor(){super(...arguments),this.width=0}};const L3=(t,e)=>e.some(n=>t instanceof n);let dO,hO;function n9e(){return dO||(dO=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}function i9e(){return hO||(hO=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}const I3=new WeakMap,gC=new WeakMap,lS=new WeakMap;function s9e(t){const e=new Promise((n,i)=>{const s=()=>{t.removeEventListener("success",r),t.removeEventListener("error",o)},r=()=>{n($f(t.result)),s()},o=()=>{i(t.error),s()};t.addEventListener("success",r),t.addEventListener("error",o)});return lS.set(e,t),e}function r9e(t){if(I3.has(t))return;const e=new Promise((n,i)=>{const s=()=>{t.removeEventListener("complete",r),t.removeEventListener("error",o),t.removeEventListener("abort",o)},r=()=>{n(),s()},o=()=>{i(t.error||new DOMException("AbortError","AbortError")),s()};t.addEventListener("complete",r),t.addEventListener("error",o),t.addEventListener("abort",o)});I3.set(t,e)}let R3={get(t,e,n){if(t instanceof IDBTransaction){if(e==="done")return I3.get(t);if(e==="store")return n.objectStoreNames[1]?void 0:n.objectStore(n.objectStoreNames[0])}return $f(t[e])},set(t,e,n){return t[e]=n,!0},has(t,e){return t instanceof IDBTransaction&&(e==="done"||e==="store")?!0:e in t}};function YG(t){R3=t(R3)}function o9e(t){return i9e().includes(t)?function(...e){return t.apply(O3(this),e),$f(this.request)}:function(...e){return $f(t.apply(O3(this),e))}}function a9e(t){return typeof t=="function"?o9e(t):(t instanceof IDBTransaction&&r9e(t),L3(t,n9e())?new Proxy(t,R3):t)}function $f(t){if(t instanceof IDBRequest)return s9e(t);if(gC.has(t))return gC.get(t);const e=a9e(t);return e!==t&&(gC.set(t,e),lS.set(e,t)),e}const O3=t=>lS.get(t);function l9e(t,e,{blocked:n,upgrade:i,blocking:s,terminated:r}={}){const o=indexedDB.open(t,e),a=$f(o);return i&&o.addEventListener("upgradeneeded",l=>{i($f(o.result),l.oldVersion,l.newVersion,$f(o.transaction),l)}),n&&o.addEventListener("blocked",l=>n(l.oldVersion,l.newVersion,l)),a.then(l=>{r&&l.addEventListener("close",()=>r()),s&&l.addEventListener("versionchange",c=>s(c.oldVersion,c.newVersion,c))}).catch(()=>{}),a}const c9e=["get","getKey","getAll","getAllKeys","count"],u9e=["put","add","delete","clear"],vC=new Map;function fO(t,e){if(!(t instanceof IDBDatabase&&!(e in t)&&typeof e=="string"))return;if(vC.get(e))return vC.get(e);const n=e.replace(/FromIndex$/,""),i=e!==n,s=u9e.includes(n);if(!(n in(i?IDBIndex:IDBObjectStore).prototype)||!(s||c9e.includes(n)))return;const r=async function(o,...a){const l=this.transaction(o,s?"readwrite":"readonly");let c=l.store;return i&&(c=c.index(a.shift())),(await Promise.all([c[n](...a),s&&l.done]))[0]};return vC.set(e,r),r}YG(t=>({...t,get:(e,n,i)=>fO(e,n)||t.get(e,n,i),has:(e,n)=>!!fO(e,n)||t.has(e,n)}));const d9e=["continue","continuePrimaryKey","advance"],pO={},D3=new WeakMap,XG=new WeakMap,h9e={get(t,e){if(!d9e.includes(e))return t[e];let n=pO[e];return n||(n=pO[e]=function(...i){D3.set(this,XG.get(this)[e](...i))}),n}};async function*f9e(...t){let e=this;if(e instanceof IDBCursor||(e=await e.openCursor(...t)),!e)return;e=e;const n=new Proxy(e,h9e);for(XG.set(n,e),lS.set(n,O3(e));e;)yield n,e=await(D3.get(n)||e.continue()),D3.delete(n)}function mO(t,e){return e===Symbol.asyncIterator&&L3(t,[IDBIndex,IDBObjectStore,IDBCursor])||e==="iterate"&&L3(t,[IDBIndex,IDBObjectStore])}YG(t=>({...t,get(e,n,i){return mO(e,n)?f9e:t.get(e,n,i)},has(e,n){return mO(e,n)||t.has(e,n)}}));const vf={fonts:"fonts"},N3=[{version:1,stores:[{name:vf.fonts,keyPath:"name"}]},{version:2,stores:[{name:vf.fonts,keyPath:"name"}]}],B3=class xc{constructor(){this.isClosing=!1,typeof window<"u"&&window.addEventListener("unload",()=>{this.close()})}static get instance(){return xc._instance||(xc._instance=new xc),xc._instance}async set(e,n){await(await this.getDatabase()).put(vf.fonts,{...n,name:e})}async get(e){return await(await this.getDatabase()).get(vf.fonts,e)}async delete(e){await(await this.getDatabase()).delete(vf.fonts,e)}async getAll(){return await(await this.getDatabase()).getAll(vf.fonts)}async clear(){await(await this.getDatabase()).clear(vf.fonts)}async has(e){return await this.get(e)!==void 0}close(){if(!this.isClosing){this.isClosing=!0;try{this.db&&(this.db.close(),this.db=void 0)}finally{this.isClosing=!1}}}async destroy(){this.close(),await indexedDB.deleteDatabase(xc.DATABASE_NAME),xc._instance=void 0}async getDatabase(){if(this.isClosing)throw new Error("Cannot perform operation while database is closing");return this.db?this.db:(this.db=await l9e(xc.DATABASE_NAME,xc.DATABASE_VERSION,{upgrade:(e,n,i)=>this.handleUpgrade(e,n,i),blocked(){console.warn("Database upgrade blocked - please close other tabs using the application")},blocking(){console.warn("Database blocking newer version - closing connection"),xc.instance.close()}}),this.db)}handleUpgrade(e,n,i){const s=N3.filter(r=>r.version>n&&(!i||r.version<=i));for(const r of s)this.applySchemaVersion(e,r)}applySchemaVersion(e,n){for(const i of n.stores)e.objectStoreNames.contains(i.name)||e.createObjectStore(i.name,{keyPath:i.keyPath})}};B3.DATABASE_NAME="mlightcad",B3.DATABASE_VERSION=N3[N3.length-1].version;let yC=B3;const ZG=t=>t.split("/").pop(),gO=t=>{const e=ZG(t);if(e){const n=e.lastIndexOf(".");return n===-1?e:e.substring(0,n)}return t},p9e=[0,16711680,16776960,65280,65535,255,16711935,16777215,8421504,12632256,16711680,16744319,13369344,13395558,10027008,10046540,8323072,8339263,4980736,4990502,16727808,16752511,13382400,13401958,10036736,10051404,8331008,8343359,4985600,4992806,16744192,16760703,13395456,13408614,10046464,10056268,8339200,8347455,4990464,4995366,16760576,16768895,13408512,13415014,10056192,10061132,8347392,8351551,4995328,4997670,16776960,16777087,13421568,13421670,10000384,10000460,8355584,8355647,5000192,5000230,12582656,14679935,10079232,11717734,7510016,8755276,6258432,7307071,3755008,4344870,8388352,12582783,6736896,10079334,5019648,7510092,4161280,6258495,2509824,3755046,4194048,10485631,3394560,8375398,2529280,6264908,2064128,5209919,1264640,3099686,65280,8388479,52224,6736998,38912,5019724,32512,4161343,19456,2509862,65343,8388511,52275,6737023,38950,5019743,32543,4161359,19475,2509871,65407,8388543,52326,6737049,38988,5019762,32575,4161375,19494,2509881,65471,8388575,52377,6737074,39026,5019781,32607,4161391,19513,2509890,65535,8388607,52428,6737100,39064,5019800,32639,4161407,19532,2509900,49151,8380415,39372,6730444,29336,5014936,24447,4157311,14668,2507340,32767,8372223,26316,6724044,19608,5010072,16255,4153215,9804,2505036,16383,8364031,13260,6717388,9880,5005208,8063,4149119,4940,2502476,255,8355839,204,6710988,152,5000344,127,4145023,76,2500172,4129023,10452991,3342540,8349388,2490520,6245528,2031743,5193599,1245260,3089996,8323327,12550143,6684876,10053324,4980888,7490712,4128895,6242175,2490444,3745356,12517631,14647295,10027212,11691724,7471256,8735896,6226047,7290751,3735628,4335180,16711935,16744447,13369548,13395660,9961624,9981080,8323199,8339327,4980812,4990540,16711871,16744415,13369497,13395634,9961586,9981061,8323167,8339311,4980793,4990530,16711807,16744383,13369446,13395609,9961548,9981042,8323135,8339295,4980774,4990521,16711743,16744351,13369395,13395583,9961510,9981023,8323103,8339279,4980755,4990511,3355443,5987163,8684676,11382189,14079702,16777215,0],m9e=t=>p9e[t];String.prototype.codePointAt||(function(){var t=(function(){try{var n={},i=Object.defineProperty,s=i(n,n,n)&&i}catch{}return s})(),e=function(n){if(this==null)throw TypeError();var i=String(this),s=i.length,r=n?Number(n):0;if(r!=r&&(r=0),!(r<0||r>=s)){var o=i.charCodeAt(r),a;return o>=55296&&o<=56319&&s>r+1&&(a=i.charCodeAt(r+1),a>=56320&&a<=57343)?(o-55296)*1024+a-56320+65536:o}};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e})();var hP=0,JG=-3;function yy(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function g9e(t,e){this.source=t,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=e,this.destLen=0,this.ltree=new yy,this.dtree=new yy}var QG=new yy,ej=new yy,fP=new Uint8Array(30),pP=new Uint16Array(30),tj=new Uint8Array(30),nj=new Uint16Array(30),v9e=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),vO=new yy,gc=new Uint8Array(320);function ij(t,e,n,i){var s,r;for(s=0;s>>=1,e}function Ec(t,e,n){if(!e)return n;for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<>>16-e;return t.tag>>>=e,t.bitcount-=e,i+n}function F3(t,e){for(;t.bitcount<24;)t.tag|=t.source[t.sourceIndex++]<>>=1,++s,n+=e.table[s],i-=e.table[s];while(i>=0);return t.tag=r,t.bitcount-=s,e.trans[n+i]}function _9e(t,e,n){var i,s,r,o,a,l;for(i=Ec(t,5,257),s=Ec(t,5,1),r=Ec(t,4,4),o=0;o<19;++o)gc[o]=0;for(o=0;o8;)t.sourceIndex--,t.bitcount-=8;if(e=t.source[t.sourceIndex+1],e=256*e+t.source[t.sourceIndex],n=t.source[t.sourceIndex+3],n=256*n+t.source[t.sourceIndex+2],e!==(~n&65535))return JG;for(t.sourceIndex+=4,i=e;i;--i)t.dest[t.destLen++]=t.source[t.sourceIndex++];return t.bitcount=0,hP}function x9e(t,e){var n=new g9e(t,e),i,s,r;do{switch(i=b9e(n),s=Ec(n,2,0),s){case 0:r=w9e(n);break;case 1:r=bO(n,QG,ej);break;case 2:_9e(n,n.ltree,n.dtree),r=bO(n,n.ltree,n.dtree);break;default:r=JG}if(r!==hP)throw new Error("Data error")}while(!i);return n.destLenthis.x2&&(this.x2=t)),typeof e=="number"&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),ethis.y2&&(this.y2=e))};Oh.prototype.addX=function(t){this.addPoint(t,null)};Oh.prototype.addY=function(t){this.addPoint(null,t)};Oh.prototype.addBezier=function(t,e,n,i,s,r,o,a){var l=[t,e],c=[n,i],u=[s,r],d=[o,a];this.addPoint(t,e),this.addPoint(o,a);for(var h=0;h<=1;h++){var f=6*l[h]-12*c[h]+6*u[h],p=-3*l[h]+9*c[h]-9*u[h]+3*d[h],m=3*c[h]-3*l[h];if(p===0){if(f===0)continue;var b=-m/f;0=0&&l>0&&(a+=" "),a+=e(c)}return a}for(var i="",s=0;s=0&&t<=255,"Byte value should be between 0 and 255."),[t]};bi.BYTE=ac(1);Pn.CHAR=function(t){return[t.charCodeAt(0)]};bi.CHAR=ac(1);Pn.CHARARRAY=function(t){typeof t>"u"&&(t="",console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));for(var e=[],n=0;n"u"?0:t.length};Pn.USHORT=function(t){return[t>>8&255,t&255]};bi.USHORT=ac(2);Pn.SHORT=function(t){return t>=wO&&(t=-(2*wO-t)),[t>>8&255,t&255]};bi.SHORT=ac(2);Pn.UINT24=function(t){return[t>>16&255,t>>8&255,t&255]};bi.UINT24=ac(3);Pn.ULONG=function(t){return[t>>24&255,t>>16&255,t>>8&255,t&255]};bi.ULONG=ac(4);Pn.LONG=function(t){return t>=xO&&(t=-(2*xO-t)),[t>>24&255,t>>16&255,t>>8&255,t&255]};bi.LONG=ac(4);Pn.FIXED=Pn.ULONG;bi.FIXED=bi.ULONG;Pn.FWORD=Pn.SHORT;bi.FWORD=bi.SHORT;Pn.UFWORD=Pn.USHORT;bi.UFWORD=bi.USHORT;Pn.LONGDATETIME=function(t){return[0,0,0,0,t>>24&255,t>>16&255,t>>8&255,t&255]};bi.LONGDATETIME=ac(8);Pn.TAG=function(t){return mi.argument(t.length===4,"Tag should be exactly 4 ASCII characters."),[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]};bi.TAG=ac(4);Pn.Card8=Pn.BYTE;bi.Card8=bi.BYTE;Pn.Card16=Pn.USHORT;bi.Card16=bi.USHORT;Pn.OffSize=Pn.BYTE;bi.OffSize=bi.BYTE;Pn.SID=Pn.USHORT;bi.SID=bi.USHORT;Pn.NUMBER=function(t){return t>=-107&&t<=107?[t+139]:t>=108&&t<=1131?(t=t-108,[(t>>8)+247,t&255]):t>=-1131&&t<=-108?(t=-t-108,[(t>>8)+251,t&255]):t>=-32768&&t<=32767?Pn.NUMBER16(t):Pn.NUMBER32(t)};bi.NUMBER=function(t){return Pn.NUMBER(t).length};Pn.NUMBER16=function(t){return[28,t>>8&255,t&255]};bi.NUMBER16=ac(3);Pn.NUMBER32=function(t){return[29,t>>24&255,t>>16&255,t>>8&255,t&255]};bi.NUMBER32=ac(5);Pn.REAL=function(t){var e=t.toString(),n=/\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);if(n){var i=parseFloat("1e"+((n[2]?+n[2]:0)+n[1].length));e=(Math.round(t*i)/i).toString()}for(var s="",r=0,o=e.length;r>8&255,e[e.length]=i&255}return e};bi.UTF16=function(t){return t.length*2};var z3={"x-mac-croatian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊©⁄€‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ","x-mac-cyrillic":"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю","x-mac-gaelic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØḂ±≤≥ḃĊċḊḋḞḟĠġṀæøṁṖṗɼƒſṠ«»… ÀÃÕŒœ–—“”‘’ṡẛÿŸṪ€‹›Ŷŷṫ·Ỳỳ⁊ÂÊÁËÈÍÎÏÌÓÔ♣ÒÚÛÙıÝýŴŵẄẅẀẁẂẃ","x-mac-greek":"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦€ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ­","x-mac-icelandic":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-inuit":"ᐃᐄᐅᐆᐊᐋᐱᐲᐳᐴᐸᐹᑉᑎᑏᑐᑑᑕᑖᑦᑭᑮᑯᑰᑲᑳᒃᒋᒌᒍᒎᒐᒑ°ᒡᒥᒦ•¶ᒧ®©™ᒨᒪᒫᒻᓂᓃᓄᓅᓇᓈᓐᓯᓰᓱᓲᓴᓵᔅᓕᓖᓗᓘᓚᓛᓪᔨᔩᔪᔫᔭ… ᔮᔾᕕᕖᕗ–—“”‘’ᕘᕙᕚᕝᕆᕇᕈᕉᕋᕌᕐᕿᖀᖁᖂᖃᖄᖅᖏᖐᖑᖒᖓᖔᖕᙱᙲᙳᙴᙵᙶᖖᖠᖡᖢᖣᖤᖥᖦᕼŁł","x-mac-ce":"ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ",macintosh:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-romanian":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂȘ∞±≤≥¥µ∂∑∏π∫ªºΩăș¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄€‹›Țț‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ","x-mac-turkish":"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"};Ag.MACSTRING=function(t,e,n,i){var s=z3[i];if(s!==void 0){for(var r="",o=0;o=128&&(r=n[r],r===void 0))return;i[s]=r}return i}};bi.MACSTRING=function(t,e){var n=Pn.MACSTRING(t,e);return n!==void 0?n.length:0};function U3(t){return t>=-128&&t<=127}function C9e(t,e,n){for(var i=0,s=t.length;e>8&255,l+256&255)}return r}Pn.VARDELTAS=function(t){for(var e=0,n=[];e=-128&&i<=127?e=T9e(t,e,n):e=M9e(t,e,n)}return n};Pn.INDEX=function(t){for(var e=1,n=[e],i=[],s=0;s>8,e[d+1]=h&255,e=e.concat(i[u])}return e};bi.TABLE=function(t){for(var e=0,n=t.fields.length,i=0;i0)return new Lt(this.data,this.offset+e).parseStruct(t)};Lt.prototype.parsePointer32=function(t){var e=this.parseOffset32();if(e>0)return new Lt(this.data,this.offset+e).parseStruct(t)};Lt.prototype.parseListOfLists=function(t){for(var e=this.parseOffset16List(),n=e.length,i=this.relativeOffset,s=new Array(n),r=0;r>1,e.skip("uShort",3),t.glyphIndexMap={};for(var o=new Kn.Parser(n,i+s+14),a=new Kn.Parser(n,i+s+16+r*2),l=new Kn.Parser(n,i+s+16+r*4),c=new Kn.Parser(n,i+s+16+r*6),u=i+s+16+r*8,d=0;d=0;s-=1){var r=Kn.getUShort(t,e+4+s*8),o=Kn.getUShort(t,e+4+s*8+2);if(r===3&&(o===0||o===1||o===10)||r===0&&(o===0||o===1||o===2||o===3||o===4)){i=Kn.getULong(t,e+4+s*8+4);break}}if(i===-1)throw new Error("No valid cmap sub-tables found.");var a=new Kn.Parser(t,e+i);if(n.format=a.parseUShort(),n.format===12)O9e(n,a);else if(n.format===4)D9e(n,a,t,e,i);else throw new Error("Only format 4 and 12 cmap tables are supported (found format "+n.format+").");return n}function B9e(t,e,n){t.segments.push({end:e,start:e,delta:-(e-n),offset:0,glyphIndex:n})}function F9e(t){t.segments.push({end:65535,start:65535,delta:1,offset:0})}function z9e(t){var e=!0,n;for(n=t.length-1;n>0;n-=1){var i=t.get(n);if(i.unicode>65535){console.log("Adding CMAP format 12 (needed!)"),e=!1;break}}var s=[{name:"version",type:"USHORT",value:0},{name:"numTables",type:"USHORT",value:e?1:2},{name:"platformID",type:"USHORT",value:3},{name:"encodingID",type:"USHORT",value:1},{name:"offset",type:"ULONG",value:e?12:20}];e||(s=s.concat([{name:"cmap12PlatformID",type:"USHORT",value:3},{name:"cmap12EncodingID",type:"USHORT",value:10},{name:"cmap12Offset",type:"ULONG",value:0}])),s=s.concat([{name:"format",type:"USHORT",value:4},{name:"cmap4Length",type:"USHORT",value:0},{name:"language",type:"USHORT",value:0},{name:"segCountX2",type:"USHORT",value:0},{name:"searchRange",type:"USHORT",value:0},{name:"entrySelector",type:"USHORT",value:0},{name:"rangeShift",type:"USHORT",value:0}]);var r=new $n.Table("cmap",s);for(r.segments=[],n=0;n>4,o=s&15;if(r===n||(e+=i[r],o===n))break;e+=i[o]}return parseFloat(e)}function Q9e(t,e){var n,i,s,r;if(e===28)return n=t.parseByte(),i=t.parseByte(),n<<8|i;if(e===29)return n=t.parseByte(),i=t.parseByte(),s=t.parseByte(),r=t.parseByte(),n<<24|i<<16|s<<8|r;if(e===30)return J9e(t);if(e>=32&&e<=246)return e-139;if(e>=247&&e<=250)return n=t.parseByte(),(e-247)*256+n+108;if(e>=251&&e<=254)return n=t.parseByte(),-(e-251)*256-n-108;throw new Error("Invalid b0 "+e)}function e7e(t){for(var e={},n=0;n>1,l.length=0,u=!0}function A(I){for(var P,k,B,R,H,q,oe,Z,V,D,K,W,Q=0;Q1&&!u&&(_=l.shift()+g,u=!0),f+=l.pop(),E(h,f);break;case 5:for(;l.length>0;)h+=l.shift(),f+=l.shift(),a.lineTo(h,f);break;case 6:for(;l.length>0&&(h+=l.shift(),a.lineTo(h,f),l.length!==0);)f+=l.shift(),a.lineTo(h,f);break;case 7:for(;l.length>0&&(f+=l.shift(),a.lineTo(h,f),l.length!==0);)h+=l.shift(),a.lineTo(h,f);break;case 8:for(;l.length>0;)i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o+l.shift(),a.curveTo(i,s,r,o,h,f);break;case 10:H=l.pop()+m,q=p[H],q&&A(q);break;case 11:return;case 12:switch(ie=I[Q],Q+=1,ie){case 35:i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),oe=r+l.shift(),Z=o+l.shift(),V=oe+l.shift(),D=Z+l.shift(),K=V+l.shift(),W=D+l.shift(),h=K+l.shift(),f=W+l.shift(),l.shift(),a.curveTo(i,s,r,o,oe,Z),a.curveTo(V,D,K,W,h,f);break;case 34:i=h+l.shift(),s=f,r=i+l.shift(),o=s+l.shift(),oe=r+l.shift(),Z=o,V=oe+l.shift(),D=o,K=V+l.shift(),W=f,h=K+l.shift(),a.curveTo(i,s,r,o,oe,Z),a.curveTo(V,D,K,W,h,f);break;case 36:i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),oe=r+l.shift(),Z=o,V=oe+l.shift(),D=o,K=V+l.shift(),W=D+l.shift(),h=K+l.shift(),a.curveTo(i,s,r,o,oe,Z),a.curveTo(V,D,K,W,h,f);break;case 37:i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),oe=r+l.shift(),Z=o+l.shift(),V=oe+l.shift(),D=Z+l.shift(),K=V+l.shift(),W=D+l.shift(),Math.abs(K-h)>Math.abs(W-f)?h=K+l.shift():f=W+l.shift(),a.curveTo(i,s,r,o,oe,Z),a.curveTo(V,D,K,W,h,f);break;default:console.log("Glyph "+e.index+": unknown operator 1200"+ie),l.length=0}break;case 14:l.length>0&&!u&&(_=l.shift()+g,u=!0),d&&(a.closePath(),d=!1);break;case 18:T();break;case 19:case 20:T(),Q+=c+7>>3;break;case 21:l.length>2&&!u&&(_=l.shift()+g,u=!0),f+=l.pop(),h+=l.pop(),E(h,f);break;case 22:l.length>1&&!u&&(_=l.shift()+g,u=!0),h+=l.pop(),E(h,f);break;case 23:T();break;case 24:for(;l.length>2;)i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o+l.shift(),a.curveTo(i,s,r,o,h,f);h+=l.shift(),f+=l.shift(),a.lineTo(h,f);break;case 25:for(;l.length>6;)h+=l.shift(),f+=l.shift(),a.lineTo(h,f);i=h+l.shift(),s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o+l.shift(),a.curveTo(i,s,r,o,h,f);break;case 26:for(l.length%2&&(h+=l.shift());l.length>0;)i=h,s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r,f=o+l.shift(),a.curveTo(i,s,r,o,h,f);break;case 27:for(l.length%2&&(f+=l.shift());l.length>0;)i=h+l.shift(),s=f,r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o,a.curveTo(i,s,r,o,h,f);break;case 28:P=I[Q],k=I[Q+1],l.push((P<<24|k<<16)>>16),Q+=2;break;case 29:H=l.pop()+t.gsubrsBias,q=t.gsubrs[H],q&&A(q);break;case 30:for(;l.length>0&&(i=h,s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(i,s,r,o,h,f),l.length!==0);)i=h+l.shift(),s=f,r=i+l.shift(),o=s+l.shift(),f=o+l.shift(),h=r+(l.length===1?l.shift():0),a.curveTo(i,s,r,o,h,f);break;case 31:for(;l.length>0&&(i=h+l.shift(),s=f,r=i+l.shift(),o=s+l.shift(),f=o+l.shift(),h=r+(l.length===1?l.shift():0),a.curveTo(i,s,r,o,h,f),l.length!==0);)i=h,s=f+l.shift(),r=i+l.shift(),o=s+l.shift(),h=r+l.shift(),f=o+(l.length===1?l.shift():0),a.curveTo(i,s,r,o,h,f);break;default:ie<32?console.log("Glyph "+e.index+": unknown operator "+ie):ie<247?l.push(ie-139):ie<251?(P=I[Q],Q+=1,l.push((ie-247)*256+P+108)):ie<255?(P=I[Q],Q+=1,l.push(-(ie-251)*256-P-108)):(P=I[Q],k=I[Q+1],B=I[Q+2],R=I[Q+3],Q+=4,l.push((P<<24|k<<16|B<<8|R)/65536))}}}return A(n),e.advanceWidth=_,a}function r7e(t,e,n,i){var s=[],r,o=new Kn.Parser(t,e),a=o.parseCard8();if(a===0)for(var l=0;l=i)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+i+")");s.push(r)}else if(a===3){var c=o.parseCard16(),u=o.parseCard16();if(u!==0)throw new Error("CFF Table CID Font FDSelect format 3 range has bad initial GID "+u);for(var d,h=0;h=i)throw new Error("CFF table CID Font FDSelect has bad FD index value "+r+" (FD count "+i+")");if(d>n)throw new Error("CFF Table CID Font FDSelect format 3 range has bad GID "+d);for(;u=0&&(n=i),i=e.indexOf(t),i>=0?n=i+Aw.length:(n=Aw.length+e.length,e.push(t)),n}function a7e(){return new $n.Record("Header",[{name:"major",type:"Card8",value:1},{name:"minor",type:"Card8",value:0},{name:"hdrSize",type:"Card8",value:4},{name:"major",type:"Card8",value:1}])}function l7e(t){var e=new $n.Record("Name INDEX",[{name:"names",type:"INDEX",value:[]}]);e.names=[];for(var n=0;n=n.begin&&t=1&&(n.ulCodePageRange1=i.parseULong(),n.ulCodePageRange2=i.parseULong()),n.version>=2&&(n.sxHeight=i.parseShort(),n.sCapHeight=i.parseShort(),n.usDefaultChar=i.parseUShort(),n.usBreakChar=i.parseUShort(),n.usMaxContent=i.parseUShort()),n}function B7e(t){return new $n.Table("OS/2",[{name:"version",type:"USHORT",value:3},{name:"xAvgCharWidth",type:"SHORT",value:0},{name:"usWeightClass",type:"USHORT",value:0},{name:"usWidthClass",type:"USHORT",value:0},{name:"fsType",type:"USHORT",value:0},{name:"ySubscriptXSize",type:"SHORT",value:650},{name:"ySubscriptYSize",type:"SHORT",value:699},{name:"ySubscriptXOffset",type:"SHORT",value:0},{name:"ySubscriptYOffset",type:"SHORT",value:140},{name:"ySuperscriptXSize",type:"SHORT",value:650},{name:"ySuperscriptYSize",type:"SHORT",value:699},{name:"ySuperscriptXOffset",type:"SHORT",value:0},{name:"ySuperscriptYOffset",type:"SHORT",value:479},{name:"yStrikeoutSize",type:"SHORT",value:49},{name:"yStrikeoutPosition",type:"SHORT",value:258},{name:"sFamilyClass",type:"SHORT",value:0},{name:"bFamilyType",type:"BYTE",value:0},{name:"bSerifStyle",type:"BYTE",value:0},{name:"bWeight",type:"BYTE",value:0},{name:"bProportion",type:"BYTE",value:0},{name:"bContrast",type:"BYTE",value:0},{name:"bStrokeVariation",type:"BYTE",value:0},{name:"bArmStyle",type:"BYTE",value:0},{name:"bLetterform",type:"BYTE",value:0},{name:"bMidline",type:"BYTE",value:0},{name:"bXHeight",type:"BYTE",value:0},{name:"ulUnicodeRange1",type:"ULONG",value:0},{name:"ulUnicodeRange2",type:"ULONG",value:0},{name:"ulUnicodeRange3",type:"ULONG",value:0},{name:"ulUnicodeRange4",type:"ULONG",value:0},{name:"achVendID",type:"CHARARRAY",value:"XXXX"},{name:"fsSelection",type:"USHORT",value:0},{name:"usFirstCharIndex",type:"USHORT",value:0},{name:"usLastCharIndex",type:"USHORT",value:0},{name:"sTypoAscender",type:"SHORT",value:0},{name:"sTypoDescender",type:"SHORT",value:0},{name:"sTypoLineGap",type:"SHORT",value:0},{name:"usWinAscent",type:"USHORT",value:0},{name:"usWinDescent",type:"USHORT",value:0},{name:"ulCodePageRange1",type:"ULONG",value:0},{name:"ulCodePageRange2",type:"ULONG",value:0},{name:"sxHeight",type:"SHORT",value:0},{name:"sCapHeight",type:"SHORT",value:0},{name:"usDefaultChar",type:"USHORT",value:0},{name:"usBreakChar",type:"USHORT",value:0},{name:"usMaxContext",type:"USHORT",value:0}],t)}var G3={parse:N7e,make:B7e,unicodeRanges:W3,getUnicodeRange:D7e};function F7e(t,e){var n={},i=new Kn.Parser(t,e);switch(n.version=i.parseVersion(),n.italicAngle=i.parseFixed(),n.underlinePosition=i.parseShort(),n.underlineThickness=i.parseShort(),n.isFixedPitch=i.parseULong(),n.minMemType42=i.parseULong(),n.maxMemType42=i.parseULong(),n.minMemType1=i.parseULong(),n.maxMemType1=i.parseULong(),n.version){case 1:n.names=yf.slice();break;case 2:n.numberOfGlyphs=i.parseUShort(),n.glyphNameIndex=new Array(n.numberOfGlyphs);for(var s=0;s=yf.length){var o=i.parseChar();n.names.push(i.parseString(o))}break;case 2.5:n.numberOfGlyphs=i.parseUShort(),n.offset=new Array(n.numberOfGlyphs);for(var a=0;ad.value.tag?1:-1}),e.fields=e.fields.concat(i),e.fields=e.fields.concat(s),e}function RO(t,e,n){for(var i=0;i0){var r=t.glyphs.get(s);return r.getMetrics()}}return n}function W7e(t){for(var e=0,n=0;nb||l===void 0)&&b>0&&(l=b),c 123 are reserved for internal usage");if(m.name!==".notdef"){var x=m.getMetrics();e.push(x.xMin),n.push(x.yMin),i.push(x.xMax),s.push(x.yMax),o.push(x.leftSideBearing),a.push(x.rightSideBearing),r.push(m.advanceWidth)}}var S={xMin:Math.min.apply(null,e),yMin:Math.min.apply(null,n),xMax:Math.max.apply(null,i),yMax:Math.max.apply(null,s),advanceWidthMax:Math.max.apply(null,r),advanceWidthAvg:W7e(r),minLeftSideBearing:Math.min.apply(null,o),maxLeftSideBearing:Math.max.apply(null,o),minRightSideBearing:Math.min.apply(null,a)};S.ascender=t.ascender,S.descender=t.descender;var _=yj.make({flags:3,unitsPerEm:t.unitsPerEm,xMin:S.xMin,yMin:S.yMin,xMax:S.xMax,yMax:S.yMax,lowestRecPPEM:3,createdTimestamp:t.createdTimestamp}),E=bj.make({ascender:S.ascender,descender:S.descender,advanceWidthMax:S.advanceWidthMax,minLeftSideBearing:S.minLeftSideBearing,minRightSideBearing:S.minRightSideBearing,xMaxExtent:S.maxLeftSideBearing+(S.xMax-S.xMin),numberOfHMetrics:t.glyphs.length}),T=xj.make(t.glyphs.length),A=G3.make(Object.assign({xAvgCharWidth:Math.round(S.advanceWidthAvg),usFirstCharIndex:l,usLastCharIndex:c,ulUnicodeRange1:u,ulUnicodeRange2:d,ulUnicodeRange3:h,ulUnicodeRange4:f,sTypoAscender:S.ascender,sTypoDescender:S.descender,sTypoLineGap:0,usWinAscent:S.yMax,usWinDescent:Math.abs(S.yMin),ulCodePageRange1:1,sxHeight:RO(t,"xyvw",{yMax:Math.round(S.ascender/2)}).yMax,sCapHeight:RO(t,"HIKLEFJMNTZBDPRAGOQSUVWXY",S).yMax,usDefaultChar:t.hasChar(" ")?32:0,usBreakChar:t.hasChar(" ")?32:0},t.tables.os2)),I=_j.make(t.glyphs),P=oj.make(t.glyphs),k=t.getEnglishName("fontFamily"),B=t.getEnglishName("fontSubfamily"),R=k+" "+B,H=t.getEnglishName("postScriptName");H||(H=k.replace(/\s/g,"")+"-"+B);var q={};for(var oe in t.names)q[oe]=t.names[oe];q.uniqueID||(q.uniqueID={en:t.getEnglishName("manufacturer")+":"+R}),q.postScriptName||(q.postScriptName={en:H}),q.preferredFamily||(q.preferredFamily=t.names.fontFamily),q.preferredSubfamily||(q.preferredSubfamily=t.names.fontSubfamily);var Z=[],V=Mj.make(q,Z),D=Z.length>0?wj.make(Z):void 0,K=Aj.make(),W=vj.make(t.glyphs,{version:t.getEnglishName("version"),fullName:R,familyName:k,weightName:B,postScriptName:H,unitsPerEm:t.unitsPerEm,fontBBox:[0,S.yMin,S.ascender,S.advanceWidthMax]}),Q=t.metas&&Object.keys(t.metas).length>0?Pj.make(t.metas):void 0,ie=[_,E,T,A,V,P,K,W,I];D&&ie.push(D),t.tables.gsub&&ie.push(kj.make(t.tables.gsub)),Q&&ie.push(Q);for(var ne=Lj(ie),ce=ne.encode(),ae=yP(ce),_e=ne.fields,ke=!1,Te=0;Te<_e.length;Te+=1)if(_e[Te].name==="head table"){_e[Te].value.checkSumAdjustment=2981146554-ae,ke=!0;break}if(!ke)throw new Error("Could not find head table with checkSum to adjust.");return ne}var j7e={make:Lj,fontToTable:G7e,computeCheckSum:yP};function wC(t,e){for(var n=0,i=t.length-1;n<=i;){var s=n+i>>>1,r=t[s].tag;if(r===e)return s;r>>1,r=t[s];if(r===e)return s;r>>1;n=t[r];var o=n.start;if(o===e)return n;o0)return n=t[i-1],e>n.end?0:n}function _1(t,e){this.font=t,this.tableName=e}_1.prototype={searchTag:wC,binSearch:OO,getTable:function(t){var e=this.font.tables[this.tableName];return!e&&t&&(e=this.font.tables[this.tableName]=this.createDefaultTable()),e},getScriptNames:function(){var t=this.getTable();return t?t.scripts.map(function(e){return e.tag}):[]},getDefaultScriptName:function(){var t=this.getTable();if(t){for(var e=!1,n=0;n=0)return i[s].script;if(e){var r={tag:t,script:{defaultLangSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]},langSysRecords:[]}};return i.splice(-1-s,0,r),r.script}}},getLangSysTable:function(t,e,n){var i=this.getScriptTable(t,n);if(i){if(!e||e==="dflt"||e==="DFLT")return i.defaultLangSys;var s=wC(i.langSysRecords,e);if(s>=0)return i.langSysRecords[s].langSys;if(n){var r={tag:e,langSys:{reserved:0,reqFeatureIndex:65535,featureIndexes:[]}};return i.langSysRecords.splice(-1-s,0,r),r.langSys}}},getFeatureTable:function(t,e,n,i){var s=this.getLangSysTable(t,e,i);if(s){for(var r,o=s.featureIndexes,a=this.font.tables[this.tableName].features,l=0;l=a[c-1].tag,"Features must be added in alphabetical order."),r={tag:n,feature:{params:0,lookupListIndexes:[]}},a.push(r),o.push(c),r.feature}}},getLookupTables:function(t,e,n,i,s){var r=this.getFeatureTable(t,e,n,s),o=[];if(r){for(var a,l=r.lookupListIndexes,c=this.font.tables[this.tableName].lookups,u=0;u=0?n:-1;case 2:var i=DO(t.ranges,e);return i?i.index+e-i.start:-1}},expandCoverage:function(t){if(t.format===1)return t.glyphs;for(var e=[],n=t.ranges,i=0;i1,'Multiple: "by" must be an array of two or more ids');var s=this.getLookupTables(n,i,t,2,!0)[0],r=bP(s,1,{substFormat:1,coverage:{format:1,glyphs:[]},sequences:[]});mi.assert(r.coverage.format===1,"Multiple: unable to modify coverage table format "+r.coverage.format);var o=e.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.sequences.splice(a,0,0)),r.sequences[a]=e.by};Fa.prototype.addAlternate=function(t,e,n,i){var s=this.getLookupTables(n,i,t,3,!0)[0],r=bP(s,1,{substFormat:1,coverage:{format:1,glyphs:[]},alternateSets:[]});mi.assert(r.coverage.format===1,"Alternate: unable to modify coverage table format "+r.coverage.format);var o=e.sub,a=this.binSearch(r.coverage.glyphs,o);a<0&&(a=-1-a,r.coverage.glyphs.splice(a,0,o),r.alternateSets.splice(a,0,0)),r.alternateSets[a]=e.by};Fa.prototype.addLigature=function(t,e,n,i){var s=this.getLookupTables(n,i,t,4,!0)[0],r=s.subtables[0];r||(r={substFormat:1,coverage:{format:1,glyphs:[]},ligatureSets:[]},s.subtables[0]=r),mi.assert(r.coverage.format===1,"Ligature: unable to modify coverage table format "+r.coverage.format);var o=e.sub[0],a=e.sub.slice(1),l={ligGlyph:e.by,components:a},c=this.binSearch(r.coverage.glyphs,o);if(c>=0){for(var u=r.ligatureSets[c],d=0;d0?(r=t.parseByte(),e&s||(r=-r),r=n+r):(e&s)>0?r=n:r=n+t.parseShort(),r}function Ij(t,e,n){var i=new Kn.Parser(e,n);t.numberOfContours=i.parseShort(),t._xMin=i.parseShort(),t._yMin=i.parseShort(),t._xMax=i.parseShort(),t._yMax=i.parseShort();var s,r;if(t.numberOfContours>0){for(var o=t.endPointIndices=[],a=0;a0)for(var d=i.parseByte(),h=0;h0){var f=[],p;if(c>0){for(var m=0;m=0,f.push(p);for(var b=0,g=0;g0?(s&2)>0?(E.dx=i.parseShort(),E.dy=i.parseShort()):E.matchedPoints=[i.parseUShort(),i.parseUShort()]:(s&2)>0?(E.dx=i.parseChar(),E.dy=i.parseChar()):E.matchedPoints=[i.parseByte(),i.parseByte()],(s&8)>0?E.xScale=E.yScale=i.parseF2Dot14():(s&64)>0?(E.xScale=i.parseF2Dot14(),E.yScale=i.parseF2Dot14()):(s&128)>0&&(E.xScale=i.parseF2Dot14(),E.scale01=i.parseF2Dot14(),E.scale10=i.parseF2Dot14(),E.yScale=i.parseF2Dot14()),t.components.push(E),_=!!(s&32)}if(s&256){t.instructionLength=i.parseUShort(),t.instructions=[];for(var T=0;Te.points.length-1||i.matchedPoints[1]>s.points.length-1)throw Error("Matched points out of range in "+e.name);var o=e.points[i.matchedPoints[0]],a=s.points[i.matchedPoints[1]],l={xScale:i.xScale,scale01:i.scale01,scale10:i.scale10,yScale:i.yScale,dx:0,dy:0};a=xC([a],l)[0],l.dx=o.x-a.x,l.dy=o.y-a.y,r=xC(s.points,l)}e.points=e.points.concat(r)}}return Rj(e.points)}function Z7e(t,e,n,i){for(var s=new Uc.GlyphSet(i),r=0;r2)){var n=this.font,i=this._prepState;if(!i||i.ppem!==e){var s=this._fpgmState;if(!s){lh.prototype=rze,s=this._fpgmState=new lh("fpgm",n.tables.fpgm),s.funcs=[],s.font=n,exports.DEBUG&&(console.log("---EXEC FPGM---"),s.step=-1);try{op(s)}catch(c){console.log("Hinting error in FPGM:"+c),this._errorState=3;return}}lh.prototype=s,i=this._prepState=new lh("prep",n.tables.prep),i.ppem=e;var r=n.tables.cvt;if(r)for(var o=i.cvt=new Array(r.length),a=e/n.unitsPerEm,l=0;l1))try{return Bj(t,i)}catch(c){this._errorState<1&&(console.log("Hinting error:"+c),console.log("Note: further hinting errors are silenced")),this._errorState=1;return}}};Bj=function(t,e){var n=e.ppem/e.font.unitsPerEm,i=n,s=t.components,r,o,a;if(lh.prototype=e,!s)a=new lh("glyf",t.instructions),exports.DEBUG&&(console.log("---EXEC GLYPH---"),a.step=-1),j3(t,a,n,i),o=a.gZone;else{var l=e.font;o=[],r=[];for(var c=0;c=176&&r<=183)i+=r-176+1;else if(r>=184&&r<=191)i+=(r-184+1)*2;else if(e&&s===1&&r===27)break;while(s>0);t.ip=i}function BO(t,e){exports.DEBUG&&console.log(e.step,"SVTCA["+t.axis+"]"),e.fv=e.pv=e.dpv=t}function FO(t,e){exports.DEBUG&&console.log(e.step,"SPVTCA["+t.axis+"]"),e.pv=e.dpv=t}function zO(t,e){exports.DEBUG&&console.log(e.step,"SFVTCA["+t.axis+"]"),e.fv=t}function UO(t,e){var n=e.stack,i=n.pop(),s=n.pop(),r=e.z2[i],o=e.z1[s];exports.DEBUG&&console.log("SPVTL["+t+"]",i,s);var a,l;t?(a=r.y-o.y,l=o.x-r.x):(a=o.x-r.x,l=o.y-r.y),e.pv=e.dpv=S1(a,l)}function $O(t,e){var n=e.stack,i=n.pop(),s=n.pop(),r=e.z2[i],o=e.z1[s];exports.DEBUG&&console.log("SFVTL["+t+"]",i,s);var a,l;t?(a=r.y-o.y,l=o.x-r.x):(a=o.x-r.x,l=o.y-r.y),e.fv=S1(a,l)}function oze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"SPVFS[]",n,i),t.pv=t.dpv=S1(i,n)}function aze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"SPVFS[]",n,i),t.fv=S1(i,n)}function lze(t){var e=t.stack,n=t.pv;exports.DEBUG&&console.log(t.step,"GPV[]"),e.push(n.x*16384),e.push(n.y*16384)}function cze(t){var e=t.stack,n=t.fv;exports.DEBUG&&console.log(t.step,"GFV[]"),e.push(n.x*16384),e.push(n.y*16384)}function uze(t){t.fv=t.pv,exports.DEBUG&&console.log(t.step,"SFVTPV[]")}function dze(t){var e=t.stack,n=e.pop(),i=e.pop(),s=e.pop(),r=e.pop(),o=e.pop(),a=t.z0,l=t.z1,c=a[n],u=a[i],d=l[s],h=l[r],f=t.z2[o];exports.DEBUG&&console.log("ISECT[], ",n,i,s,r,o);var p=c.x,m=c.y,b=u.x,g=u.y,x=d.x,S=d.y,_=h.x,E=h.y,T=(p-b)*(S-E)-(m-g)*(x-_),A=p*g-m*b,I=x*E-S*_;f.x=(A*(x-_)-I*(p-b))/T,f.y=(A*(S-E)-I*(m-g))/T}function hze(t){t.rp0=t.stack.pop(),exports.DEBUG&&console.log(t.step,"SRP0[]",t.rp0)}function fze(t){t.rp1=t.stack.pop(),exports.DEBUG&&console.log(t.step,"SRP1[]",t.rp1)}function pze(t){t.rp2=t.stack.pop(),exports.DEBUG&&console.log(t.step,"SRP2[]",t.rp2)}function mze(t){var e=t.stack.pop();switch(exports.DEBUG&&console.log(t.step,"SZP0[]",e),t.zp0=e,e){case 0:t.tZone||cS(t),t.z0=t.tZone;break;case 1:t.z0=t.gZone;break;default:throw new Error("Invalid zone pointer")}}function gze(t){var e=t.stack.pop();switch(exports.DEBUG&&console.log(t.step,"SZP1[]",e),t.zp1=e,e){case 0:t.tZone||cS(t),t.z1=t.tZone;break;case 1:t.z1=t.gZone;break;default:throw new Error("Invalid zone pointer")}}function vze(t){var e=t.stack.pop();switch(exports.DEBUG&&console.log(t.step,"SZP2[]",e),t.zp2=e,e){case 0:t.tZone||cS(t),t.z2=t.tZone;break;case 1:t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}}function yze(t){var e=t.stack.pop();switch(exports.DEBUG&&console.log(t.step,"SZPS[]",e),t.zp0=t.zp1=t.zp2=e,e){case 0:t.tZone||cS(t),t.z0=t.z1=t.z2=t.tZone;break;case 1:t.z0=t.z1=t.z2=t.gZone;break;default:throw new Error("Invalid zone pointer")}}function bze(t){t.loop=t.stack.pop(),exports.DEBUG&&console.log(t.step,"SLOOP[]",t.loop)}function _ze(t){exports.DEBUG&&console.log(t.step,"RTG[]"),t.round=zj}function wze(t){exports.DEBUG&&console.log(t.step,"RTHG[]"),t.round=nze}function xze(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"SMD[]",e),t.minDis=e/64}function Sze(t){exports.DEBUG&&console.log(t.step,"ELSE[]"),$j(t,!1)}function Eze(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"JMPR[]",e),t.ip+=e-1}function Cze(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"SCVTCI[]",e),t.cvCutIn=e/64}function Tze(t){var e=t.stack;exports.DEBUG&&console.log(t.step,"DUP[]"),e.push(e[e.length-1])}function SC(t){exports.DEBUG&&console.log(t.step,"POP[]"),t.stack.pop()}function Mze(t){exports.DEBUG&&console.log(t.step,"CLEAR[]"),t.stack.length=0}function Aze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"SWAP[]"),e.push(n),e.push(i)}function kze(t){var e=t.stack;exports.DEBUG&&console.log(t.step,"DEPTH[]"),e.push(e.length)}function Pze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"LOOPCALL[]",n,i);var s=t.ip,r=t.prog;t.prog=t.funcs[n];for(var o=0;o1?"loop "+(e.loop-a)+": ":"")+"SHP["+(t?"rp1":"rp2")+"]",c)}e.loop=1}function GO(t,e){var n=e.stack,i=t?e.rp1:e.rp2,s=(t?e.z0:e.z1)[i],r=e.fv,o=e.pv,a=n.pop(),l=e.z2[e.contours[a]],c=l;exports.DEBUG&&console.log(e.step,"SHC["+t+"]",a);var u=o.distance(s,s,!1,!0);do c!==s&&r.setRelative(c,c,u,o),c=c.nextPointOnContour;while(c!==l)}function jO(t,e){var n=e.stack,i=t?e.rp1:e.rp2,s=(t?e.z0:e.z1)[i],r=e.fv,o=e.pv,a=n.pop();exports.DEBUG&&console.log(e.step,"SHZ["+t+"]",a);var l;switch(a){case 0:l=e.tZone;break;case 1:l=e.gZone;break;default:throw new Error("Invalid zone")}for(var c,u=o.distance(s,s,!1,!0),d=l.length-2,h=0;h1?"loop "+(t.loop-n)+": ":"")+"SHPIX[]",o,s),i.setRelative(a,a,s),i.touch(a)}t.loop=1}function Nze(t){for(var e=t.stack,n=t.rp1,i=t.rp2,s=t.loop,r=t.z0[n],o=t.z1[i],a=t.fv,l=t.dpv,c=t.z2;s--;){var u=e.pop(),d=c[u];exports.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-s)+": ":"")+"IP[]",u,n,"<->",i),a.interpolate(d,r,o,l),a.touch(d)}t.loop=1}function KO(t,e){var n=e.stack,i=n.pop()/64,s=n.pop(),r=e.z1[s],o=e.z0[e.rp0],a=e.fv,l=e.pv;a.setRelative(r,o,i,l),a.touch(r),exports.DEBUG&&console.log(e.step,"MSIRP["+t+"]",i,s),e.rp1=e.rp0,e.rp2=s,t&&(e.rp0=s)}function Bze(t){for(var e=t.stack,n=t.rp0,i=t.z0[n],s=t.loop,r=t.fv,o=t.pv,a=t.z1;s--;){var l=e.pop(),c=a[l];exports.DEBUG&&console.log(t.step,(t.loop>1?"loop "+(t.loop-s)+": ":"")+"ALIGNRP[]",l),r.setRelative(c,i,0,o),r.touch(c)}t.loop=1}function Fze(t){exports.DEBUG&&console.log(t.step,"RTDG[]"),t.round=tze}function qO(t,e){var n=e.stack,i=n.pop(),s=n.pop(),r=e.z0[s],o=e.fv,a=e.pv,l=e.cvt[i];exports.DEBUG&&console.log(e.step,"MIAP["+t+"]",i,"(",l,")",s);var c=a.distance(r,wy);t&&(Math.abs(c-l)",a),e.stack.push(Math.round(a*64))}function Gze(t){exports.DEBUG&&console.log(t.step,"MPPEM[]"),t.stack.push(t.ppem)}function jze(t){exports.DEBUG&&console.log(t.step,"FLIPON[]"),t.autoFlip=!0}function Kze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"LT[]",n,i),e.push(in?1:0)}function Xze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"GTEQ[]",n,i),e.push(i>=n?1:0)}function Zze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"EQ[]",n,i),e.push(n===i?1:0)}function Jze(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"NEQ[]",n,i),e.push(n!==i?1:0)}function Qze(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"ODD[]",n),e.push(Math.trunc(n)%2?1:0)}function eUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"EVEN[]",n),e.push(Math.trunc(n)%2?0:1)}function tUe(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"IF[]",e),e||($j(t,!0),exports.DEBUG&&console.log(t.step,"EIF[]"))}function nUe(t){exports.DEBUG&&console.log(t.step,"EIF[]")}function iUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"AND[]",n,i),e.push(n&&i?1:0)}function sUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"OR[]",n,i),e.push(n||i?1:0)}function rUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"NOT[]",n),e.push(n?0:1)}function EC(t,e){var n=e.stack,i=n.pop(),s=e.fv,r=e.pv,o=e.ppem,a=e.deltaBase+(t-1)*16,l=e.deltaShift,c=e.z0;exports.DEBUG&&console.log(e.step,"DELTAP["+t+"]",i,n);for(var u=0;u>4);if(f===o){var p=(h&15)-8;p>=0&&p++,exports.DEBUG&&console.log(e.step,"DELTAPFIX",d,"by",p*l);var m=c[d];s.setRelative(m,m,p*l,r)}}}function oUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"SDB[]",n),t.deltaBase=n}function aUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"SDS[]",n),t.deltaShift=Math.pow(.5,n)}function lUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"ADD[]",n,i),e.push(i+n)}function cUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"SUB[]",n,i),e.push(i-n)}function uUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"DIV[]",n,i),e.push(i*64/n)}function dUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"MUL[]",n,i),e.push(i*n/64)}function hUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"ABS[]",n),e.push(Math.abs(n))}function fUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"NEG[]",n),e.push(-n)}function pUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"FLOOR[]",n),e.push(Math.floor(n/64)*64)}function mUe(t){var e=t.stack,n=e.pop();exports.DEBUG&&console.log(t.step,"CEILING[]",n),e.push(Math.ceil(n/64)*64)}function g_(t,e){var n=e.stack,i=n.pop();exports.DEBUG&&console.log(e.step,"ROUND[]"),n.push(e.round(i/64)*64)}function gUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"WCVTF[]",n,i),t.cvt[i]=n*t.ppem/t.font.unitsPerEm}function CC(t,e){var n=e.stack,i=n.pop(),s=e.ppem,r=e.deltaBase+(t-1)*16,o=e.deltaShift;exports.DEBUG&&console.log(e.step,"DELTAC["+t+"]",i,n);for(var a=0;a>4);if(u===s){var d=(c&15)-8;d>=0&&d++;var h=d*o;exports.DEBUG&&console.log(e.step,"DELTACFIX",l,"by",h),e.cvt[l]+=h}}}function vUe(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"SROUND[]",e),t.round=Uj;var n;switch(e&192){case 0:n=.5;break;case 64:n=1;break;case 128:n=2;break;default:throw new Error("invalid SROUND value")}switch(t.srPeriod=n,e&48){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*n;break;case 32:t.srPhase=.5*n;break;case 48:t.srPhase=.75*n;break;default:throw new Error("invalid SROUND value")}e&=15,e===0?t.srThreshold=0:t.srThreshold=(e/8-.5)*n}function yUe(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"S45ROUND[]",e),t.round=Uj;var n;switch(e&192){case 0:n=Math.sqrt(2)/2;break;case 64:n=Math.sqrt(2);break;case 128:n=2*Math.sqrt(2);break;default:throw new Error("invalid S45ROUND value")}switch(t.srPeriod=n,e&48){case 0:t.srPhase=0;break;case 16:t.srPhase=.25*n;break;case 32:t.srPhase=.5*n;break;case 48:t.srPhase=.75*n;break;default:throw new Error("invalid S45ROUND value")}e&=15,e===0?t.srThreshold=0:t.srThreshold=(e/8-.5)*n}function bUe(t){exports.DEBUG&&console.log(t.step,"ROFF[]"),t.round=eze}function _Ue(t){exports.DEBUG&&console.log(t.step,"RUTG[]"),t.round=ize}function wUe(t){exports.DEBUG&&console.log(t.step,"RDTG[]"),t.round=sze}function xUe(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"SCANCTRL[]",e)}function ZO(t,e){var n=e.stack,i=n.pop(),s=n.pop(),r=e.z2[i],o=e.z1[s];exports.DEBUG&&console.log(e.step,"SDPVTL["+t+"]",i,s);var a,l;t?(a=r.y-o.y,l=o.x-r.x):(a=o.x-r.x,l=o.y-r.y),e.dpv=S1(a,l)}function SUe(t){var e=t.stack,n=e.pop(),i=0;exports.DEBUG&&console.log(t.step,"GETINFO[]",n),n&1&&(i=35),n&32&&(i|=4096),e.push(i)}function EUe(t){var e=t.stack,n=e.pop(),i=e.pop(),s=e.pop();exports.DEBUG&&console.log(t.step,"ROLL[]"),e.push(i),e.push(n),e.push(s)}function CUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"MAX[]",n,i),e.push(Math.max(i,n))}function TUe(t){var e=t.stack,n=e.pop(),i=e.pop();exports.DEBUG&&console.log(t.step,"MIN[]",n,i),e.push(Math.min(i,n))}function MUe(t){var e=t.stack.pop();exports.DEBUG&&console.log(t.step,"SCANTYPE[]",e)}function AUe(t){var e=t.stack.pop(),n=t.stack.pop();switch(exports.DEBUG&&console.log(t.step,"INSTCTRL[]",e,n),e){case 1:t.inhibitGridFit=!!n;return;case 2:t.ignoreCvt=!!n;return;default:throw new Error("invalid INSTCTRL[] selector")}}function Bd(t,e){var n=e.stack,i=e.prog,s=e.ip;exports.DEBUG&&console.log(e.step,"PUSHB["+t+"]");for(var r=0;r=0?1:-1,b=Math.abs(b),t&&(x=r.cvt[a],i&&Math.abs(b-x)":"_")+(i?"R":"_")+(s===0?"Gr":s===1?"Bl":s===2?"Wh":"")+"]",t?a+"("+r.cvt[a]+","+x+")":"",l,"(d =",m,"->",g*b,")"),r.rp1=r.rp0,r.rp2=l,e&&(r.rp0=l)}Nj=[BO.bind(void 0,Uu),BO.bind(void 0,Lc),FO.bind(void 0,Uu),FO.bind(void 0,Lc),zO.bind(void 0,Uu),zO.bind(void 0,Lc),UO.bind(void 0,0),UO.bind(void 0,1),$O.bind(void 0,0),$O.bind(void 0,1),oze,aze,lze,cze,uze,dze,hze,fze,pze,mze,gze,vze,yze,bze,_ze,wze,xze,Sze,Eze,Cze,void 0,void 0,Tze,SC,Mze,Aze,kze,Ize,Rze,void 0,void 0,void 0,Pze,Lze,Oze,void 0,VO.bind(void 0,0),VO.bind(void 0,1),HO.bind(void 0,Uu),HO.bind(void 0,Lc),WO.bind(void 0,0),WO.bind(void 0,1),GO.bind(void 0,0),GO.bind(void 0,1),jO.bind(void 0,0),jO.bind(void 0,1),Dze,Nze,KO.bind(void 0,0),KO.bind(void 0,1),Bze,Fze,qO.bind(void 0,0),qO.bind(void 0,1),zze,Uze,$ze,Vze,Hze,Wze,YO.bind(void 0,0),YO.bind(void 0,1),void 0,XO.bind(void 0,0),XO.bind(void 0,1),Gze,void 0,jze,void 0,void 0,Kze,qze,Yze,Xze,Zze,Jze,Qze,eUe,tUe,nUe,iUe,sUe,rUe,EC.bind(void 0,1),oUe,aUe,lUe,cUe,uUe,dUe,hUe,fUe,pUe,mUe,g_.bind(void 0,0),g_.bind(void 0,1),g_.bind(void 0,2),g_.bind(void 0,3),void 0,void 0,void 0,void 0,gUe,EC.bind(void 0,2),EC.bind(void 0,3),CC.bind(void 0,1),CC.bind(void 0,2),CC.bind(void 0,3),vUe,yUe,void 0,void 0,bUe,void 0,_Ue,wUe,SC,SC,void 0,void 0,void 0,void 0,void 0,xUe,ZO.bind(void 0,0),ZO.bind(void 0,1),SUe,void 0,EUe,CUe,TUe,MUe,AUe,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Bd.bind(void 0,1),Bd.bind(void 0,2),Bd.bind(void 0,3),Bd.bind(void 0,4),Bd.bind(void 0,5),Bd.bind(void 0,6),Bd.bind(void 0,7),Bd.bind(void 0,8),Fd.bind(void 0,1),Fd.bind(void 0,2),Fd.bind(void 0,3),Fd.bind(void 0,4),Fd.bind(void 0,5),Fd.bind(void 0,6),Fd.bind(void 0,7),Fd.bind(void 0,8),Hn.bind(void 0,0,0,0,0,0),Hn.bind(void 0,0,0,0,0,1),Hn.bind(void 0,0,0,0,0,2),Hn.bind(void 0,0,0,0,0,3),Hn.bind(void 0,0,0,0,1,0),Hn.bind(void 0,0,0,0,1,1),Hn.bind(void 0,0,0,0,1,2),Hn.bind(void 0,0,0,0,1,3),Hn.bind(void 0,0,0,1,0,0),Hn.bind(void 0,0,0,1,0,1),Hn.bind(void 0,0,0,1,0,2),Hn.bind(void 0,0,0,1,0,3),Hn.bind(void 0,0,0,1,1,0),Hn.bind(void 0,0,0,1,1,1),Hn.bind(void 0,0,0,1,1,2),Hn.bind(void 0,0,0,1,1,3),Hn.bind(void 0,0,1,0,0,0),Hn.bind(void 0,0,1,0,0,1),Hn.bind(void 0,0,1,0,0,2),Hn.bind(void 0,0,1,0,0,3),Hn.bind(void 0,0,1,0,1,0),Hn.bind(void 0,0,1,0,1,1),Hn.bind(void 0,0,1,0,1,2),Hn.bind(void 0,0,1,0,1,3),Hn.bind(void 0,0,1,1,0,0),Hn.bind(void 0,0,1,1,0,1),Hn.bind(void 0,0,1,1,0,2),Hn.bind(void 0,0,1,1,0,3),Hn.bind(void 0,0,1,1,1,0),Hn.bind(void 0,0,1,1,1,1),Hn.bind(void 0,0,1,1,1,2),Hn.bind(void 0,0,1,1,1,3),Hn.bind(void 0,1,0,0,0,0),Hn.bind(void 0,1,0,0,0,1),Hn.bind(void 0,1,0,0,0,2),Hn.bind(void 0,1,0,0,0,3),Hn.bind(void 0,1,0,0,1,0),Hn.bind(void 0,1,0,0,1,1),Hn.bind(void 0,1,0,0,1,2),Hn.bind(void 0,1,0,0,1,3),Hn.bind(void 0,1,0,1,0,0),Hn.bind(void 0,1,0,1,0,1),Hn.bind(void 0,1,0,1,0,2),Hn.bind(void 0,1,0,1,0,3),Hn.bind(void 0,1,0,1,1,0),Hn.bind(void 0,1,0,1,1,1),Hn.bind(void 0,1,0,1,1,2),Hn.bind(void 0,1,0,1,1,3),Hn.bind(void 0,1,1,0,0,0),Hn.bind(void 0,1,1,0,0,1),Hn.bind(void 0,1,1,0,0,2),Hn.bind(void 0,1,1,0,0,3),Hn.bind(void 0,1,1,0,1,0),Hn.bind(void 0,1,1,0,1,1),Hn.bind(void 0,1,1,0,1,2),Hn.bind(void 0,1,1,0,1,3),Hn.bind(void 0,1,1,1,0,0),Hn.bind(void 0,1,1,1,0,1),Hn.bind(void 0,1,1,1,0,2),Hn.bind(void 0,1,1,1,0,3),Hn.bind(void 0,1,1,1,1,0),Hn.bind(void 0,1,1,1,1,1),Hn.bind(void 0,1,1,1,1,2),Hn.bind(void 0,1,1,1,1,3)];function tv(t){this.char=t,this.state={},this.activeState=null}function _P(t,e,n){this.contextName=n,this.startIndex=t,this.endOffset=e}function kUe(t,e,n){this.contextName=t,this.openRange=null,this.ranges=[],this.checkStart=e,this.checkEnd=n}function Zl(t,e){this.context=t,this.index=e,this.length=t.length,this.current=t[e],this.backtrack=t.slice(0,e),this.lookahead=t.slice(e+1)}function uS(t){this.eventId=t,this.subscribers=[]}function PUe(t){var e=this,n=["start","end","next","newToken","contextStart","contextEnd","insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD","updateContextsRanges"];n.forEach(function(s){Object.defineProperty(e.events,s,{value:new uS(s)})}),t&&n.forEach(function(s){var r=t[s];typeof r=="function"&&e.events[s].subscribe(r)});var i=["insertToken","removeToken","removeRange","replaceToken","replaceRange","composeRUD"];i.forEach(function(s){e.events[s].subscribe(e.updateContextsRanges)})}function lr(t){this.tokens=[],this.registeredContexts={},this.contextCheckers=[],this.events={},this.registeredModifiers=[],PUe.call(this,t)}tv.prototype.setState=function(t,e){return this.state[t]=e,this.activeState={key:t,value:this.state[t]},this.activeState};tv.prototype.getState=function(t){return this.state[t]||null};lr.prototype.inboundIndex=function(t){return t>=0&&t0&&t<=this.lookahead.length):return this.lookahead[t-1];default:return null}};lr.prototype.rangeToText=function(t){if(t instanceof _P)return this.getRangeTokens(t).map(function(e){return e.char}).join("")};lr.prototype.getText=function(){return this.tokens.map(function(t){return t.char}).join("")};lr.prototype.getContext=function(t){var e=this.registeredContexts[t];return e||null};lr.prototype.on=function(t,e){var n=this.events[t];return n?n.subscribe(e):null};lr.prototype.dispatch=function(t,e){var n=this,i=this.events[t];i instanceof uS&&i.subscribers.forEach(function(s){s.apply(n,e||[])})};lr.prototype.registerContextChecker=function(t,e,n){if(this.getContext(t))return{FAIL:"context name '"+t+"' is already registered."};if(typeof e!="function")return{FAIL:"missing context start check."};if(typeof n!="function")return{FAIL:"missing context end check."};var i=new kUe(t,e,n);return this.registeredContexts[t]=i,this.contextCheckers.push(i),i};lr.prototype.getRangeTokens=function(t){var e=t.startIndex+t.endOffset;return[].concat(this.tokens.slice(t.startIndex,e))};lr.prototype.getContextRanges=function(t){var e=this.getContext(t);return e?e.ranges:{FAIL:"context checker '"+t+"' is not registered."}};lr.prototype.resetContextsRanges=function(){var t=this.registeredContexts;for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];n.ranges=[]}};lr.prototype.updateContextsRanges=function(){this.resetContextsRanges();for(var t=this.tokens.map(function(i){return i.char}),e=0;e=s.start&&t<=s.end){var r=t-s.start;return s.index+r}}break;default:return-1}return-1}function IUe(t,e){var n=E1(t,e.coverage);return n===-1?null:t+e.deltaGlyphId}function RUe(t,e){var n=E1(t,e.coverage);return n===-1?null:e.substitute[n]}function TC(t,e){for(var n=[],i=0;i=0;n--){var i=e[n],s=Vj(i),r=kh(i);if(!s&&!r)return!0;if(s)return!1}return!1}function qUe(t){if(Vj(t.current))return!1;for(var e=0;e0}e("fontFamily"),e("weightName"),e("manufacturer"),e("copyright"),e("version"),this.unitsPerEm>0};Rs.prototype.toTables=function(){return j7e.fontToTable(this)};Rs.prototype.toBuffer=function(){return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."),this.toArrayBuffer()};Rs.prototype.toArrayBuffer=function(){for(var t=this.toTables(),e=t.encode(),n=new ArrayBuffer(e.length),i=new Uint8Array(n),s=0;s=1.2&&(s.markGlyphSets=n.parsePointer(v$e)),s}var b$e={parse:y$e},Jl=new Array(10);Jl[1]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();if(e===1)return{posFormat:1,coverage:this.parsePointer(Lt.coverage),value:this.parseValueRecord()};if(e===2)return{posFormat:2,coverage:this.parsePointer(Lt.coverage),values:this.parseValueRecordList()};mi.assert(!1,"0x"+t.toString(16)+": GPOS lookup type 1 format must be 1 or 2.")};Jl[2]=function(){var t=this.offset+this.relativeOffset,e=this.parseUShort();mi.assert(e===1||e===2,"0x"+t.toString(16)+": GPOS lookup type 2 format must be 1 or 2.");var n=this.parsePointer(Lt.coverage),i=this.parseUShort(),s=this.parseUShort();if(e===1)return{posFormat:e,coverage:n,valueFormat1:i,valueFormat2:s,pairSets:this.parseList(Lt.pointer(Lt.list(function(){return{secondGlyph:this.parseUShort(),value1:this.parseValueRecord(i),value2:this.parseValueRecord(s)}})))};if(e===2){var r=this.parsePointer(Lt.classDef),o=this.parsePointer(Lt.classDef),a=this.parseUShort(),l=this.parseUShort();return{posFormat:e,coverage:n,valueFormat1:i,valueFormat2:s,classDef1:r,classDef2:o,class1Count:a,class2Count:l,classRecords:this.parseList(a,Lt.list(l,function(){return{value1:this.parseValueRecord(i),value2:this.parseValueRecord(s)}}))}}};Jl[3]=function(){return{error:"GPOS Lookup 3 not supported"}};Jl[4]=function(){return{error:"GPOS Lookup 4 not supported"}};Jl[5]=function(){return{error:"GPOS Lookup 5 not supported"}};Jl[6]=function(){return{error:"GPOS Lookup 6 not supported"}};Jl[7]=function(){return{error:"GPOS Lookup 7 not supported"}};Jl[8]=function(){return{error:"GPOS Lookup 8 not supported"}};Jl[9]=function(){return{error:"GPOS Lookup 9 not supported"}};function _$e(t,e){e=e||0;var n=new Lt(t,e),i=n.parseVersion(1);return mi.argument(i===1||i===1.1,"Unsupported GPOS table version "+i),i===1?{version:i,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Jl)}:{version:i,scripts:n.parseScriptList(),features:n.parseFeatureList(),lookups:n.parseLookupList(Jl),variations:n.parseFeatureVariationsList()}}var w$e=new Array(10);function x$e(t){return new $n.Table("GPOS",[{name:"version",type:"ULONG",value:65536},{name:"scripts",type:"TABLE",value:new $n.ScriptList(t.scripts)},{name:"features",type:"TABLE",value:new $n.FeatureList(t.features)},{name:"lookups",type:"TABLE",value:new $n.LookupList(t.lookups,w$e)}])}var S$e={parse:_$e,make:x$e};function E$e(t){var e={};t.skip("uShort");var n=t.parseUShort();mi.argument(n===0,"Unsupported kern sub-table version."),t.skip("uShort",2);var i=t.parseUShort();t.skip("uShort",3);for(var s=0;s1&&console.warn("Only the first kern subtable is supported."),t.skip("uLong");var i=t.parseUShort(),s=i&255;if(t.skip("uShort"),s===0){var r=t.parseUShort();t.skip("uShort",3);for(var o=0;o{const P=new A.array.constructor(A.count*A.itemSize);c[_][I]=new A.constructor(P,A.itemSize,A.normalized)}))}const f=e*.5,p=Math.log10(1/e),m=Math.pow(10,p),b=f*m;for(let x=0;x{s.push(...W$e(r))}),s}}function B$e(t,e,n,i="ltr"){const s=Array.from(t),r=e/n.resolution,o=(n.boundingBox.yMax-n.boundingBox.yMin+n.underlineThickness)*r,a=[];let l=0,c=0;(i==="rtl"||i==="tb")&&s.reverse();for(const u of s)if(u===` `)l=0,c-=o;else{const d=F$e(u,r,l,c,n);if(!d)continue;i==="tb"?(l=0,c+=n.ascender*r):l+=d.offsetX,a.push(d.path)}return a}function F$e(t,e,n,i,s){const r=s.glyphs[t]||s.glyphs["?"];if(!r){console.error(`THREE.Font: character "${t}" does not exist in font family ${s.familyName}.`);return}const o=new BG;if(r.o){const a=r.o.split(" ");let l=0;for(;ls!=d>s&&i<(u-l)*(s-c)/(d-c)+l&&(n=!n)}return n}function U$e(t){const e=t.length,n=Array(e).fill(null);for(let i=0;iz$e(a,t[o]))){const a=Math.abs(mh.area(t[o]));a[]);for(let i=0;ie===null?n:-1).filter(e=>e>=0)}function H$e(t){const e=[];for(let n=t.length-1;n>=0;n--){const i=t[n];if(i instanceof C0)e.push(new C0(i.v2.clone(),i.v1.clone()));else if(i instanceof R2)e.push(new R2(i.v2.clone(),i.v1.clone(),i.v0.clone()));else if(i instanceof I2)e.push(new I2(i.v3.clone(),i.v2.clone(),i.v1.clone(),i.v0.clone()));else if(i instanceof fy)e.push(new fy(i.aX,i.aY,i.xRadius,i.yRadius,i.aEndAngle,i.aStartAngle,!i.aClockwise,i.aRotation));else if(typeof i.getPoints=="function"){const s=i.getPoints(8);for(let r=s.length-1;r>0;r--)e.push(new C0(s[r].clone(),s[r-1].clone()))}}return e}function rD(t,e){const n=mh.area(t.getPoints(32))>0,i=e===n?t.curves.slice():H$e(t.curves),s=new Yu;return s.curves.push(...i),s}function W$e(t,e=32){const n=t.subPaths;if(!n||n.length===0)return[];const i=n.map(f=>f.getPoints(e)),s=U$e(i),r=$$e(s),o=V$e(s),a=n.length,l=Array(a).fill(-1),c=Array(a).fill(-1);for(const f of o){const p=[{idx:f,d:0}];for(;p.length;){const m=p.pop();l[m.idx]=m.d,c[m.idx]=f;for(const b of r[m.idx])p.push({idx:b,d:m.d+1})}}const u=[],d=new Set;function h(f){const p=rD(n[f],!0);d.add(f);for(const m of r[f])if(!d.has(m)&&l[m]===l[f]+1){const b=rD(n[m],!1);p.holes.push(b),d.add(m)}u.push(p)}for(const f of o)h(f);for(let f=0;f=this.maxSize){const i=this.map.keys().next().value;i!==void 0&&this.map.delete(i)}this.map.set(e,n)}has(e){return this.map.has(e)}clear(){this.map.clear()}}class j$e extends KG{constructor(e){super(e),this.type="mesh",this.glyphCache=new G$e(512);const n=e.data;if(n instanceof ArrayBuffer){const i=this.parseMeshFont(n);this.data=i.data,this.opentypeFont=i.font}else throw new Error("Invalid font cache data. Please remove font cache database named 'mlightcad' in IndexedDB and try again!");this.font=new N$e(this.data)}parseMeshFont(e){const n=L$e(e),i=Math.round,s=n.charToGlyph("A"),r=s?n.unitsPerEm/(s.yMax||n.unitsPerEm):1,o={glyphs:{},familyName:n.getEnglishName("fullName"),ascender:i(n.ascender),descender:i(n.descender),underlinePosition:n.tables.post.underlinePosition,underlineThickness:n.tables.post.underlineThickness,boundingBox:{xMin:n.tables.head.xMin,xMax:n.tables.head.xMax,yMin:n.tables.head.yMin,yMax:n.tables.head.yMax},resolution:n.unitsPerEm||1e3,scaleFactor:r,original_font_information:n.tables.name};return{font:n,data:o}}hasChar(e){return this.opentypeFont.hasChar(e)}hasCode(e){return this.hasChar(String.fromCodePoint(e))}_loadGlyphIfNeeded(e){if(this.data.glyphs[e]||!this.opentypeFont)return;const n=this.glyphCache.get(e);if(n){this.data.glyphs[e]=n;return}const i=this.opentypeFont.charToGlyph(e);if(!i||!i.path)return;const s=Math.round,r={ha:s(i.advanceWidth??0),x_min:s(i.xMin??0),x_max:s(i.xMax??0),o:""};i.path.commands.forEach(o=>{let a=o.type.toLowerCase();a==="c"&&(a="b"),r.o+=a+" ",o.x!==void 0&&o.y!==void 0&&(r.o+=s(o.x)+" "+s(o.y)+" "),o.x1!==void 0&&o.y1!==void 0&&(r.o+=s(o.x1)+" "+s(o.y1)+" "),o.x2!==void 0&&o.y2!==void 0&&(r.o+=s(o.x2)+" "+s(o.y2)+" ")}),this.data.glyphs[e]=r,this.glyphCache.set(e,r)}generateShapes(e,n){for(const i of e)this._loadGlyphIfNeeded(i);return this.font.generateShapes(e,n)}getCharShape(e,n){if(this._loadGlyphIfNeeded(e),!this.data.glyphs[e]){this.addUnsupportedChar(e);return}return new sD(e,n,this)}getCodeShape(e,n){return this.getCharShape(String.fromCodePoint(e),n)}getScaleFactor(){return this.scaleFactor==null?(this.scaleFactor=this.data.scaleFactor,this.scaleFactor):this.scaleFactor}getNotFoundTextShape(e){return new sD("?",e,this)}}let No=class{static byteToSByte(e){return(e&127)-(e&128?128:0)}constructor(e){this.position=0,this.data=new DataView(e)}readBytes(e=1){this.data.byteLength(t.SHAPES="shapes",t.BIGFONT="bigfont",t.UNIFONT="unifont",t))(Wo||{});class K$e{parse(e){const n=this.parseHeader(e).split(" "),i=n[1].toLocaleLowerCase();if(!Object.values(Wo).includes(i))throw new Error(`Invalid font type: ${i}`);return{fileHeader:n[0],fontType:i,fileVersion:n[2]}}parseHeader(e){let n="",i=0;for(;e.currentPosition0&&i.push({code:a,length:l})}const s={};for(const o of i)try{const a=e.readBytes(o.length);a.length===o.length&&(s[o.code]=a)}catch{console.warn(`Failed to read shape data for code ${o.code}`)}const r={data:s,info:"",baseUp:8,baseDown:2,height:rl,width:rl,orientation:"horizontal",isExtended:!1};if(0 in s){const o=s[0];try{const a=new TextDecoder().decode(o);let l=o.findIndex(c=>q$e.includes(c));l>=0&&(r.info=a.substring(0,l),l+3=0&&(o.info=l.text,c++,c+34?(o.height=a[c++],c++,o.orientation=a[c++]===0?"horizontal":"vertical",o.width=a[c++],o.baseUp=o.height,o.baseDown=0,o.isExtended=!0):(o.baseUp=a[c++],o.baseDown=a[c++],o.height=o.baseDown+o.baseUp,o.width=o.height,o.orientation=a[c]===0?"horizontal":"vertical")))}catch{console.warn("Failed to parse bigfont info block")}}return o}catch(n){return console.error("Error parsing big font:",n),{data:{},info:"Failed to parse font file",baseUp:8,baseDown:2,height:rl,width:rl,orientation:"horizontal",isExtended:!1}}}utf8ArrayToStr(e){let n="",i=0;for(;i>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:n+=String.fromCharCode(s);break;case 12:case 13:{const r=e[i++];n+=String.fromCharCode((s&31)<<6|r&63);break}case 14:{const r=e[i++],o=e[i++];n+=String.fromCharCode((s&15)<<12|(r&63)<<6|(o&63)<<0);break}}if(n.charCodeAt(n.length-1)===0)break;i++}return{text:n,pos:i}}}let Z$e=class{parse(t){try{const e=t.readInt32();if(e<=0)throw new Error("Invalid character count in font file");const n=t.readInt16(),i=t.readBytes(n),s={data:{},info:"",baseUp:8,baseDown:2,height:rl,width:rl,orientation:"horizontal",isExtended:!1};try{const o=new TextDecoder().decode(i);let a=o.indexOf("\0");a>=0&&(s.info=o.substring(0,a),a+30){const c=t.readBytes(l);if(c.length===l){const u=c.indexOf(0);let d=0;u>=0&&u=this.startAngle&&(this.endAngle-=2*Math.PI):this.endAngle<=this.startAngle&&(this.endAngle+=2*Math.PI)}else if(e.center&&e.radius!==void 0&&e.startOctant!==void 0&&e.octantCount!==void 0&&e.isClockwise!==void 0){this.center=e.center.clone(),this.radius=e.radius,this.isClockwise=e.isClockwise,this.startAngle=e.startOctant*oD;const n=(e.octantCount===0?8:e.octantCount)*oD;this.endAngle=this.startAngle+(this.isClockwise?-n:n),this.start=this.center.clone().add(new br(this.radius*Math.cos(this.startAngle),this.radius*Math.sin(this.startAngle))),this.end=this.center.clone().add(new br(this.radius*Math.cos(this.endAngle),this.radius*Math.sin(this.endAngle)))}else throw new Error("Invalid arc parameters")}tessellate(e=Math.PI/18){if(this.radius===0)return[this.start.clone(),this.end.clone()];const n=[this.start.clone()],i=Math.abs(this.endAngle-this.startAngle),s=Math.max(1,Math.floor(i/e));for(let r=1;r{r.forEach(o=>{e=Math.min(e,o.x),n=Math.max(n,o.x),i=Math.min(i,o.y),s=Math.max(s,o.y)})}),this._bbox={minX:e,minY:i,maxX:n,maxY:s},this._bbox}offset(e,n=!0){var i,s;return n?new Gj((i=this.lastPoint)==null?void 0:i.clone().add(e),this.polylines.map(r=>r.map(o=>o.clone().add(e)))):((s=this.lastPoint)==null||s.add(e),this.polylines.forEach(r=>r.forEach(o=>o.add(e))),this._bbox&&(this._bbox.maxX+=e.x,this._bbox.minX+=e.x,this._bbox.maxY+=e.y,this._bbox.minY+=e.y),this)}normalizeToOrigin(e=!1){const n=this.bbox;return this.offset(new br(-n.minX,-n.minY),e)}toSVG(e={}){const{strokeWidth:n="0.5%",strokeColor:i="black",isAutoFit:s=!1}=e;let r,o;if(s){const a=this.bbox,l=.2,c=a.maxX-a.minX,u=a.maxY-a.minY,d=c===0?u:c,h=u===0?c:u,f=a.minX-d*l,p=a.maxX+d*l,m=a.minY-h*l,b=a.maxY+h*l;o=this.polylines.map(g=>{let x="";return g.forEach((S,_)=>{const E=S.x,T=-S.y;x+=_===0?`M ${E} ${T} `:`L ${E} ${T} `}),``}).join(""),r=`${f} ${-b} ${p-f} ${b-m}`}else r="0 0 20 20",o=this.polylines.map(a=>{let l="";return a.forEach((c,u)=>{const d=c.x+5,h=-c.y+15;l+=u===0?`M ${d} ${h} `:`L ${d} ${h} `}),``}).join("");return`${o}`}};const Q$e=Math.PI/18;class eVe{constructor(e){this.shapeCache=new Map,this.shapeData=new Map,this.fontData=e}release(){this.shapeCache.clear(),this.shapeData.clear()}getCharShape(e,n){const i=n/this.fontData.content.height;return this.parseAndScale(e,{factor:i})}parseAndScale(e,n){if(e===0)return;let i;if(this.shapeCache.has(e))i=this.shapeCache.get(e);else{const s=this.fontData.content.data;if(s[e]){const r=s[e];i=this.parseShape(r),this.shapeData.set(e,i),this.shapeCache.set(e,i)}}if(i){if(n.factor!==void 0)return this.scaleShapeByFactor(i,n.factor);if(n.height!==void 0){const s=n.width??n.height;return this.scaleShapeByHeightAndWidth(i,n.height,s)}else return i}}scaleShapeByFactor(e,n){var i;return new AC((i=e.lastPoint)==null?void 0:i.clone().multiply(n),e.polylines.map(s=>s.map(r=>r.clone().multiply(n))))}scaleShapeByHeightAndWidth(e,n,i){var s;const r=e.bbox,o=r.maxY-r.minY,a=r.maxX-r.minX,l=o>0?n/o:1,c=a>0?i/a:1,u=(s=e.lastPoint)==null?void 0:s.clone();u&&(u.x*=c,u.y*=l);const d=e.polylines.map(h=>h.map(f=>{const p=f.clone();return p.x*=c,p.y*=l,p}));return new AC(u,d)}parseShape(e){const n={currentPoint:new br,polylines:[],currentPolyline:[],sp:[],isPenDown:!1,scale:1};for(let i=0;i1&&s.polylines.push(s.currentPolyline.slice()),s.currentPolyline=[];break;case 3:r++,s.scale/=n[r];break;case 4:r++,s.scale*=n[r];break;case 5:if(s.sp.length===4)throw new Error("The position stack is only four locations deep");s.sp.push(s.currentPoint.clone());break;case 6:s.currentPoint=s.sp.pop()??s.currentPoint;break;case 7:r=this.handleSubshapeCommand(n,r,s);break;case 8:r=this.handleXYDisplacement(n,r,s);break;case 9:r=this.handleMultipleXYDisplacements(n,r,s);break;case 10:r=this.handleOctantArc(n,r,s);break;case 11:r=this.handleFractionalArc(n,r,s);break;case 12:r=this.handleBulgeArc(n,r,s);break;case 13:r=this.handleMultipleBulgeArcs(n,r,s);break;case 14:r=this.skipCode(n,++r);break}return r}handleVectorCommand(e,n){const i=(e&240)>>4,s=e&15,r=this.getVectorForDirection(s);n.currentPoint.add(r.multiply(i*n.scale)),n.isPenDown&&n.currentPolyline.push(n.currentPoint.clone())}getVectorForDirection(e){const n=new br;switch(e){case 0:n.x=1;break;case 1:n.x=1,n.y=.5;break;case 2:n.x=1,n.y=1;break;case 3:n.x=.5,n.y=1;break;case 4:n.y=1;break;case 5:n.x=-.5,n.y=1;break;case 6:n.x=-1,n.y=1;break;case 7:n.x=-1,n.y=.5;break;case 8:n.x=-1;break;case 9:n.x=-1,n.y=-.5;break;case 10:n.x=-1,n.y=-1;break;case 11:n.x=-.5,n.y=-1;break;case 12:n.y=-1;break;case 13:n.x=.5,n.y=-1;break;case 14:n.x=1,n.y=-1;break;case 15:n.x=1,n.y=-.5;break}return n}handleSubshapeCommand(e,n,i){let s=n,r=0,o,a=i.scale*this.fontData.content.height,l=a;const c=i.currentPoint.clone();switch(i.currentPolyline.length>1&&(i.polylines.push(i.currentPolyline.slice()),i.currentPolyline=[]),this.fontData.header.fontType){case Wo.SHAPES:s++,r=e[s];break;case Wo.BIGFONT:s++,r=e[s],r===0&&(s++,r=e[s++]<<8|e[s++],c.x=No.byteToSByte(e[s++])*i.scale,c.y=No.byteToSByte(e[s++])*i.scale,this.fontData.content.isExtended&&(l=e[s++]*i.scale),a=e[s]*i.scale);break;case Wo.UNIFONT:s++,r=e[s++]<<8|e[s++];break}return r!==0&&(o=this.getScaledSubshapeAtInsertPoint(r,l,a,c),o&&i.polylines.push(...o.polylines.slice())),i.currentPolyline=[],s}handleXYDisplacement(e,n,i){let s=n;const r=new br;return r.x=No.byteToSByte(e[++s]),r.y=No.byteToSByte(e[++s]),i.currentPoint.add(r.multiply(i.scale)),i.isPenDown&&i.currentPolyline.push(i.currentPoint.clone()),s}handleMultipleXYDisplacements(e,n,i){let s=n;for(;;){const r=new br;if(r.x=No.byteToSByte(e[++s]),r.y=No.byteToSByte(e[++s]),r.x===0&&r.y===0)break;i.currentPoint.add(r.multiply(i.scale)),i.isPenDown&&i.currentPolyline.push(i.currentPoint.clone())}return s}handleOctantArc(e,n,i){var s;let r=n;const o=e[++r]*i.scale,a=No.byteToSByte(e[++r]),l=(a&112)>>4;let c=a&7;const u=a<0,d=Math.PI/4*l,h=i.currentPoint.clone().subtract(new br(Math.cos(d)*o,Math.sin(d)*o)),f=aD.fromOctant(h,o,l,c,u);if(i.isPenDown){const p=f.tessellate();i.currentPolyline.pop(),i.currentPolyline.push(...p.slice())}return i.currentPoint=(s=f.tessellate().pop())==null?void 0:s.clone(),r}handleFractionalArc(e,n,i){let s=n;const r=e[++s],o=e[++s],a=e[++s],l=e[++s],c=(a*255+l)*i.scale,u=No.byteToSByte(e[++s]),d=(u&112)>>4;let h=u&7;h===0&&(h=8),o!==0&&h--;const f=Math.PI/4;let p=f*h,m=Q$e,b=1;u<0&&(m=-m,p=-p,b=-1);let g=f*d,x=g+p;g+=f*r/256*b,x+=f*o/256*b;const S=i.currentPoint.clone().subtract(new br(c*Math.cos(g),c*Math.sin(g)));if(i.currentPoint=S.clone().add(new br(c*Math.cos(x),c*Math.sin(x))),i.isPenDown){let _=g;const E=[];if(E.push(S.clone().add(new br(c*Math.cos(_),c*Math.sin(_)))),m>0)for(;_+mx;)_+=m,E.push(S.clone().add(new br(c*Math.cos(_),c*Math.sin(_))));E.push(S.clone().add(new br(c*Math.cos(x),c*Math.sin(x)))),i.currentPolyline.push(...E)}return s}handleBulgeArc(e,n,i){let s=n;const r=new br;r.x=No.byteToSByte(e[++s]),r.y=No.byteToSByte(e[++s]);const o=No.byteToSByte(e[++s]);return i.currentPoint=this.handleArcSegment(i.currentPoint,r,o,i.scale,i.isPenDown,i.currentPolyline),s}handleMultipleBulgeArcs(e,n,i){let s=n;for(;;){const r=new br;if(r.x=No.byteToSByte(e[++s]),r.y=No.byteToSByte(e[++s]),r.x===0&&r.y===0)break;const o=No.byteToSByte(e[++s]);i.currentPoint=this.handleArcSegment(i.currentPoint,r,o,i.scale,i.isPenDown,i.currentPolyline)}return s}skipCode(e,n){switch(e[n]){case 0:break;case 1:break;case 2:break;case 3:case 4:n++;break;case 5:break;case 6:break;case 7:switch(this.fontData.header.fontType){case Wo.SHAPES:n++;break;case Wo.BIGFONT:n++,e[n]===0&&(n+=this.fontData.content.isExtended?6:5);break;case Wo.UNIFONT:n+=2;break}break;case 8:n+=2;break;case 9:for(;;){const i=e[++n],s=e[++n];if(i===0&&s===0)break}break;case 10:n+=2;break;case 11:n+=5;break;case 12:n+=3;break;case 13:for(;;){const i=e[++n],s=e[++n];if(i===0&&s===0)break;n++}break}return n}getScaledSubshapeAtInsertPoint(e,n,i,s){let r=this.shapeCache.get(e);if(!r){const a=this.fontData.content.data[e];if(!a)return;r=this.parseShape(a),this.shapeData.set(e,r),this.shapeCache.set(e,r)}const o=r.normalizeToOrigin(!0);return this.scaleShapeByHeightAndWidth(o,i,n).offset(s,!1)}handleArcSegment(e,n,i,s,r,o){n.x*=s,n.y*=s,i<-127&&(i=-127);const a=e.clone();if(r)if(i===0)o.push(a.clone().add(n));else{const l=a.clone().add(n),c=aD.fromBulge(a,l,i/127).tessellate();o.push(...c.slice(1))}return a.add(n),a}}let tVe=class{constructor(t){if(t instanceof ArrayBuffer){const e=new No(t),n=new K$e().parse(e),i=J$e.createParser(n.fontType).parse(e);this.fontData={header:n,content:i}}else this.fontData=t;this.shapeParser=new eVe(this.fontData)}hasChar(t){return this.fontData.content.data[t]!==void 0}getCharShape(t,e){let n=this.shapeParser.getCharShape(t,e);return n&&this.fontData.header.fontType===Wo.BIGFONT&&(n=n.normalizeToOrigin()),n}release(){this.shapeParser.release()}};function nVe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function iVe(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(i){var s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:function(){return t[i]}})}),n}var jj={exports:{}},SP={},dS={};dS.byteLength=oVe;dS.toByteArray=lVe;dS.fromByteArray=dVe;var kc=[],Xa=[],sVe=typeof Uint8Array<"u"?Uint8Array:Array,kC="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var hm=0,rVe=kC.length;hm0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");n===-1&&(n=e);var i=n===e?0:4-n%4;return[n,i]}function oVe(t){var e=Kj(t),n=e[0],i=e[1];return(n+i)*3/4-i}function aVe(t,e,n){return(e+n)*3/4-n}function lVe(t){var e,n=Kj(t),i=n[0],s=n[1],r=new sVe(aVe(t,i,s)),o=0,a=s>0?i-4:i,l;for(l=0;l>16&255,r[o++]=e>>8&255,r[o++]=e&255;return s===2&&(e=Xa[t.charCodeAt(l)]<<2|Xa[t.charCodeAt(l+1)]>>4,r[o++]=e&255),s===1&&(e=Xa[t.charCodeAt(l)]<<10|Xa[t.charCodeAt(l+1)]<<4|Xa[t.charCodeAt(l+2)]>>2,r[o++]=e>>8&255,r[o++]=e&255),r}function cVe(t){return kc[t>>18&63]+kc[t>>12&63]+kc[t>>6&63]+kc[t&63]}function uVe(t,e,n){for(var i,s=[],r=e;ra?a:o+r));return i===1?(e=t[n-1],s.push(kc[e>>2]+kc[e<<4&63]+"==")):i===2&&(e=(t[n-2]<<8)+t[n-1],s.push(kc[e>>10]+kc[e>>4&63]+kc[e<<2&63]+"=")),s.join("")}var EP={};EP.read=function(t,e,n,i,s){var r,o,a=s*8-i-1,l=(1<>1,u=-7,d=n?s-1:0,h=n?-1:1,f=t[e+d];for(d+=h,r=f&(1<<-u)-1,f>>=-u,u+=a;u>0;r=r*256+t[e+d],d+=h,u-=8);for(o=r&(1<<-u)-1,r>>=-u,u+=i;u>0;o=o*256+t[e+d],d+=h,u-=8);if(r===0)r=1-c;else{if(r===l)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,i),r=r-c}return(f?-1:1)*o*Math.pow(2,r-i)};EP.write=function(t,e,n,i,s,r){var o,a,l,c=r*8-s-1,u=(1<>1,h=s===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:r-1,p=i?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?e+=h/l:e+=h*Math.pow(2,1-d),e*l>=2&&(o++,l/=2),o+d>=u?(a=0,o=u):o+d>=1?(a=(e*l-1)*Math.pow(2,s),o=o+d):(a=e*Math.pow(2,d-1)*Math.pow(2,s),o=0));s>=8;t[n+f]=a&255,f+=p,a/=256,s-=8);for(o=o<0;t[n+f]=o&255,f+=p,o/=256,c-=8);t[n+f-p]|=m*128};(function(t){var e=dS,n=EP,i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=x,t.INSPECT_MAX_BYTES=50;var s=2147483647;t.kMaxLength=s,a.TYPED_ARRAY_SUPPORT=r(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function r(){try{var G=new Uint8Array(1),ee={foo:function(){return 42}};return Object.setPrototypeOf(ee,Uint8Array.prototype),Object.setPrototypeOf(G,ee),G.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(G){if(G>s)throw new RangeError('The value "'+G+'" is invalid for option "size"');var ee=new Uint8Array(G);return Object.setPrototypeOf(ee,a.prototype),ee}function a(G,ee,j){if(typeof G=="number"){if(typeof ee=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(G)}return l(G,ee,j)}a.poolSize=8192;function l(G,ee,j){if(typeof G=="string")return h(G,ee);if(ArrayBuffer.isView(G))return p(G);if(G==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G);if(Me(G,ArrayBuffer)||G&&Me(G.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Me(G,SharedArrayBuffer)||G&&Me(G.buffer,SharedArrayBuffer)))return m(G,ee,j);if(typeof G=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var he=G.valueOf&&G.valueOf();if(he!=null&&he!==G)return a.from(he,ee,j);var be=b(G);if(be)return be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof G[Symbol.toPrimitive]=="function")return a.from(G[Symbol.toPrimitive]("string"),ee,j);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof G)}a.from=function(G,ee,j){return l(G,ee,j)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(G){if(typeof G!="number")throw new TypeError('"size" argument must be of type number');if(G<0)throw new RangeError('The value "'+G+'" is invalid for option "size"')}function u(G,ee,j){return c(G),G<=0?o(G):ee!==void 0?typeof j=="string"?o(G).fill(ee,j):o(G).fill(ee):o(G)}a.alloc=function(G,ee,j){return u(G,ee,j)};function d(G){return c(G),o(G<0?0:g(G)|0)}a.allocUnsafe=function(G){return d(G)},a.allocUnsafeSlow=function(G){return d(G)};function h(G,ee){if((typeof ee!="string"||ee==="")&&(ee="utf8"),!a.isEncoding(ee))throw new TypeError("Unknown encoding: "+ee);var j=S(G,ee)|0,he=o(j),be=he.write(G,ee);return be!==j&&(he=he.slice(0,be)),he}function f(G){for(var ee=G.length<0?0:g(G.length)|0,j=o(ee),he=0;he=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return G|0}function x(G){return+G!=G&&(G=0),a.alloc(+G)}a.isBuffer=function(G){return G!=null&&G._isBuffer===!0&&G!==a.prototype},a.compare=function(G,ee){if(Me(G,Uint8Array)&&(G=a.from(G,G.offset,G.byteLength)),Me(ee,Uint8Array)&&(ee=a.from(ee,ee.offset,ee.byteLength)),!a.isBuffer(G)||!a.isBuffer(ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===ee)return 0;for(var j=G.length,he=ee.length,be=0,re=Math.min(j,he);behe.length?a.from(re).copy(he,be):Uint8Array.prototype.set.call(he,re,be);else if(a.isBuffer(re))re.copy(he,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=re.length}return he};function S(G,ee){if(a.isBuffer(G))return G.length;if(ArrayBuffer.isView(G)||Me(G,ArrayBuffer))return G.byteLength;if(typeof G!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof G);var j=G.length,he=arguments.length>2&&arguments[2]===!0;if(!he&&j===0)return 0;for(var be=!1;;)switch(ee){case"ascii":case"latin1":case"binary":return j;case"utf8":case"utf-8":return Te(G).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j*2;case"hex":return j>>>1;case"base64":return ve(G).length;default:if(be)return he?-1:Te(G).length;ee=(""+ee).toLowerCase(),be=!0}}a.byteLength=S;function _(G,ee,j){var he=!1;if((ee===void 0||ee<0)&&(ee=0),ee>this.length||((j===void 0||j>this.length)&&(j=this.length),j<=0)||(j>>>=0,ee>>>=0,j<=ee))return"";for(G||(G="utf8");;)switch(G){case"hex":return K(this,ee,j);case"utf8":case"utf-8":return q(this,ee,j);case"ascii":return V(this,ee,j);case"latin1":case"binary":return D(this,ee,j);case"base64":return H(this,ee,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return W(this,ee,j);default:if(he)throw new TypeError("Unknown encoding: "+G);G=(G+"").toLowerCase(),he=!0}}a.prototype._isBuffer=!0;function E(G,ee,j){var he=G[ee];G[ee]=G[j],G[j]=he}a.prototype.swap16=function(){var G=this.length;if(G%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ee=0;eeee&&(G+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(G,ee,j,he,be){if(Me(G,Uint8Array)&&(G=a.from(G,G.offset,G.byteLength)),!a.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof G);if(ee===void 0&&(ee=0),j===void 0&&(j=G?G.length:0),he===void 0&&(he=0),be===void 0&&(be=this.length),ee<0||j>G.length||he<0||be>this.length)throw new RangeError("out of range index");if(he>=be&&ee>=j)return 0;if(he>=be)return-1;if(ee>=j)return 1;if(ee>>>=0,j>>>=0,he>>>=0,be>>>=0,this===G)return 0;for(var re=be-he,le=j-ee,Ce=Math.min(re,le),Ee=this.slice(he,be),Oe=G.slice(ee,j),Ge=0;Ge2147483647?j=2147483647:j<-2147483648&&(j=-2147483648),j=+j,ge(j)&&(j=be?0:G.length-1),j<0&&(j=G.length+j),j>=G.length){if(be)return-1;j=G.length-1}else if(j<0)if(be)j=0;else return-1;if(typeof ee=="string"&&(ee=a.from(ee,he)),a.isBuffer(ee))return ee.length===0?-1:A(G,ee,j,he,be);if(typeof ee=="number")return ee=ee&255,typeof Uint8Array.prototype.indexOf=="function"?be?Uint8Array.prototype.indexOf.call(G,ee,j):Uint8Array.prototype.lastIndexOf.call(G,ee,j):A(G,[ee],j,he,be);throw new TypeError("val must be string, number or Buffer")}function A(G,ee,j,he,be){var re=1,le=G.length,Ce=ee.length;if(he!==void 0&&(he=String(he).toLowerCase(),he==="ucs2"||he==="ucs-2"||he==="utf16le"||he==="utf-16le")){if(G.length<2||ee.length<2)return-1;re=2,le/=2,Ce/=2,j/=2}function Ee(dt,Jt){return re===1?dt[Jt]:dt.readUInt16BE(Jt*re)}var Oe;if(be){var Ge=-1;for(Oe=j;Oele&&(j=le-Ce),Oe=j;Oe>=0;Oe--){for(var $e=!0,ot=0;otbe&&(he=be)):he=be;var re=ee.length;he>re/2&&(he=re/2);for(var le=0;le>>0,isFinite(j)?(j=j>>>0,he===void 0&&(he="utf8")):(he=j,j=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var be=this.length-ee;if((j===void 0||j>be)&&(j=be),G.length>0&&(j<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");he||(he="utf8");for(var re=!1;;)switch(he){case"hex":return I(this,G,ee,j);case"utf8":case"utf-8":return P(this,G,ee,j);case"ascii":case"latin1":case"binary":return k(this,G,ee,j);case"base64":return B(this,G,ee,j);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R(this,G,ee,j);default:if(re)throw new TypeError("Unknown encoding: "+he);he=(""+he).toLowerCase(),re=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function H(G,ee,j){return ee===0&&j===G.length?e.fromByteArray(G):e.fromByteArray(G.slice(ee,j))}function q(G,ee,j){j=Math.min(G.length,j);for(var he=[],be=ee;be239?4:re>223?3:re>191?2:1;if(be+Ce<=j){var Ee,Oe,Ge,$e;switch(Ce){case 1:re<128&&(le=re);break;case 2:Ee=G[be+1],(Ee&192)===128&&($e=(re&31)<<6|Ee&63,$e>127&&(le=$e));break;case 3:Ee=G[be+1],Oe=G[be+2],(Ee&192)===128&&(Oe&192)===128&&($e=(re&15)<<12|(Ee&63)<<6|Oe&63,$e>2047&&($e<55296||$e>57343)&&(le=$e));break;case 4:Ee=G[be+1],Oe=G[be+2],Ge=G[be+3],(Ee&192)===128&&(Oe&192)===128&&(Ge&192)===128&&($e=(re&15)<<18|(Ee&63)<<12|(Oe&63)<<6|Ge&63,$e>65535&&$e<1114112&&(le=$e))}}le===null?(le=65533,Ce=1):le>65535&&(le-=65536,he.push(le>>>10&1023|55296),le=56320|le&1023),he.push(le),be+=Ce}return Z(he)}var oe=4096;function Z(G){var ee=G.length;if(ee<=oe)return String.fromCharCode.apply(String,G);for(var j="",he=0;hehe)&&(j=he);for(var be="",re=ee;rej&&(G=j),ee<0?(ee+=j,ee<0&&(ee=0)):ee>j&&(ee=j),eej)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(G,ee,j){G=G>>>0,ee=ee>>>0,j||Q(G,ee,this.length);for(var he=this[G],be=1,re=0;++re>>0,ee=ee>>>0,j||Q(G,ee,this.length);for(var he=this[G+--ee],be=1;ee>0&&(be*=256);)he+=this[G+--ee]*be;return he},a.prototype.readUint8=a.prototype.readUInt8=function(G,ee){return G=G>>>0,ee||Q(G,1,this.length),this[G]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(G,ee){return G=G>>>0,ee||Q(G,2,this.length),this[G]|this[G+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(G,ee){return G=G>>>0,ee||Q(G,2,this.length),this[G]<<8|this[G+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),(this[G]|this[G+1]<<8|this[G+2]<<16)+this[G+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),this[G]*16777216+(this[G+1]<<16|this[G+2]<<8|this[G+3])},a.prototype.readIntLE=function(G,ee,j){G=G>>>0,ee=ee>>>0,j||Q(G,ee,this.length);for(var he=this[G],be=1,re=0;++re=be&&(he-=Math.pow(2,8*ee)),he},a.prototype.readIntBE=function(G,ee,j){G=G>>>0,ee=ee>>>0,j||Q(G,ee,this.length);for(var he=ee,be=1,re=this[G+--he];he>0&&(be*=256);)re+=this[G+--he]*be;return be*=128,re>=be&&(re-=Math.pow(2,8*ee)),re},a.prototype.readInt8=function(G,ee){return G=G>>>0,ee||Q(G,1,this.length),this[G]&128?(255-this[G]+1)*-1:this[G]},a.prototype.readInt16LE=function(G,ee){G=G>>>0,ee||Q(G,2,this.length);var j=this[G]|this[G+1]<<8;return j&32768?j|4294901760:j},a.prototype.readInt16BE=function(G,ee){G=G>>>0,ee||Q(G,2,this.length);var j=this[G+1]|this[G]<<8;return j&32768?j|4294901760:j},a.prototype.readInt32LE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24},a.prototype.readInt32BE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]},a.prototype.readFloatLE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),n.read(this,G,!0,23,4)},a.prototype.readFloatBE=function(G,ee){return G=G>>>0,ee||Q(G,4,this.length),n.read(this,G,!1,23,4)},a.prototype.readDoubleLE=function(G,ee){return G=G>>>0,ee||Q(G,8,this.length),n.read(this,G,!0,52,8)},a.prototype.readDoubleBE=function(G,ee){return G=G>>>0,ee||Q(G,8,this.length),n.read(this,G,!1,52,8)};function ie(G,ee,j,he,be,re){if(!a.isBuffer(G))throw new TypeError('"buffer" argument must be a Buffer instance');if(ee>be||eeG.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(G,ee,j,he){if(G=+G,ee=ee>>>0,j=j>>>0,!he){var be=Math.pow(2,8*j)-1;ie(this,G,ee,j,be,0)}var re=1,le=0;for(this[ee]=G&255;++le>>0,j=j>>>0,!he){var be=Math.pow(2,8*j)-1;ie(this,G,ee,j,be,0)}var re=j-1,le=1;for(this[ee+re]=G&255;--re>=0&&(le*=256);)this[ee+re]=G/le&255;return ee+j},a.prototype.writeUint8=a.prototype.writeUInt8=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,1,255,0),this[ee]=G&255,ee+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,2,65535,0),this[ee]=G&255,this[ee+1]=G>>>8,ee+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,2,65535,0),this[ee]=G>>>8,this[ee+1]=G&255,ee+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,4,4294967295,0),this[ee+3]=G>>>24,this[ee+2]=G>>>16,this[ee+1]=G>>>8,this[ee]=G&255,ee+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,4,4294967295,0),this[ee]=G>>>24,this[ee+1]=G>>>16,this[ee+2]=G>>>8,this[ee+3]=G&255,ee+4},a.prototype.writeIntLE=function(G,ee,j,he){if(G=+G,ee=ee>>>0,!he){var be=Math.pow(2,8*j-1);ie(this,G,ee,j,be-1,-be)}var re=0,le=1,Ce=0;for(this[ee]=G&255;++re>0)-Ce&255;return ee+j},a.prototype.writeIntBE=function(G,ee,j,he){if(G=+G,ee=ee>>>0,!he){var be=Math.pow(2,8*j-1);ie(this,G,ee,j,be-1,-be)}var re=j-1,le=1,Ce=0;for(this[ee+re]=G&255;--re>=0&&(le*=256);)G<0&&Ce===0&&this[ee+re+1]!==0&&(Ce=1),this[ee+re]=(G/le>>0)-Ce&255;return ee+j},a.prototype.writeInt8=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,1,127,-128),G<0&&(G=255+G+1),this[ee]=G&255,ee+1},a.prototype.writeInt16LE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,2,32767,-32768),this[ee]=G&255,this[ee+1]=G>>>8,ee+2},a.prototype.writeInt16BE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,2,32767,-32768),this[ee]=G>>>8,this[ee+1]=G&255,ee+2},a.prototype.writeInt32LE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,4,2147483647,-2147483648),this[ee]=G&255,this[ee+1]=G>>>8,this[ee+2]=G>>>16,this[ee+3]=G>>>24,ee+4},a.prototype.writeInt32BE=function(G,ee,j){return G=+G,ee=ee>>>0,j||ie(this,G,ee,4,2147483647,-2147483648),G<0&&(G=4294967295+G+1),this[ee]=G>>>24,this[ee+1]=G>>>16,this[ee+2]=G>>>8,this[ee+3]=G&255,ee+4};function ne(G,ee,j,he,be,re){if(j+he>G.length)throw new RangeError("Index out of range");if(j<0)throw new RangeError("Index out of range")}function ce(G,ee,j,he,be){return ee=+ee,j=j>>>0,be||ne(G,ee,j,4),n.write(G,ee,j,he,23,4),j+4}a.prototype.writeFloatLE=function(G,ee,j){return ce(this,G,ee,!0,j)},a.prototype.writeFloatBE=function(G,ee,j){return ce(this,G,ee,!1,j)};function ae(G,ee,j,he,be){return ee=+ee,j=j>>>0,be||ne(G,ee,j,8),n.write(G,ee,j,he,52,8),j+8}a.prototype.writeDoubleLE=function(G,ee,j){return ae(this,G,ee,!0,j)},a.prototype.writeDoubleBE=function(G,ee,j){return ae(this,G,ee,!1,j)},a.prototype.copy=function(G,ee,j,he){if(!a.isBuffer(G))throw new TypeError("argument should be a Buffer");if(j||(j=0),!he&&he!==0&&(he=this.length),ee>=G.length&&(ee=G.length),ee||(ee=0),he>0&&he=this.length)throw new RangeError("Index out of range");if(he<0)throw new RangeError("sourceEnd out of bounds");he>this.length&&(he=this.length),G.length-ee>>0,j=j===void 0?this.length:j>>>0,G||(G=0);var re;if(typeof G=="number")for(re=ee;re55295&&j<57344){if(!be){if(j>56319){(ee-=3)>-1&&re.push(239,191,189);continue}else if(le+1===he){(ee-=3)>-1&&re.push(239,191,189);continue}be=j;continue}if(j<56320){(ee-=3)>-1&&re.push(239,191,189),be=j;continue}j=(be-55296<<10|j-56320)+65536}else be&&(ee-=3)>-1&&re.push(239,191,189);if(be=null,j<128){if((ee-=1)<0)break;re.push(j)}else if(j<2048){if((ee-=2)<0)break;re.push(j>>6|192,j&63|128)}else if(j<65536){if((ee-=3)<0)break;re.push(j>>12|224,j>>6&63|128,j&63|128)}else if(j<1114112){if((ee-=4)<0)break;re.push(j>>18|240,j>>12&63|128,j>>6&63|128,j&63|128)}else throw new Error("Invalid code point")}return re}function Ke(G){for(var ee=[],j=0;j>8,be=j%256,re.push(be),re.push(he);return re}function ve(G){return e.toByteArray(ke(G))}function fe(G,ee,j,he){for(var be=0;be=ee.length||be>=G.length);++be)ee[be+j]=G[be];return be}function Me(G,ee){return G instanceof ee||G!=null&&G.constructor!=null&&G.constructor.name!=null&&G.constructor.name===ee.name}function ge(G){return G!==G}var Qe=(function(){for(var G="0123456789abcdef",ee=new Array(256),j=0;j<16;++j)for(var he=j*16,be=0;be<16;++be)ee[he+be]=G[j]+G[be];return ee})()})(SP);var Pw=SP,Zm=Pw.Buffer,Ja={},Qa;for(Qa in Pw)Pw.hasOwnProperty(Qa)&&(Qa==="SlowBuffer"||Qa==="Buffer"||(Ja[Qa]=Pw[Qa]));var Jm=Ja.Buffer={};for(Qa in Zm)Zm.hasOwnProperty(Qa)&&(Qa==="allocUnsafe"||Qa==="allocUnsafeSlow"||(Jm[Qa]=Zm[Qa]));Ja.Buffer.prototype=Zm.prototype;(!Jm.from||Jm.from===Uint8Array.from)&&(Jm.from=function(t,e,n){if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&typeof t.length>"u")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return Zm(t,e,n)});Jm.alloc||(Jm.alloc=function(t,e,n){if(typeof t!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=Zm(t);return!e||e.length===0?i.fill(0):typeof n=="string"?i.fill(e,n):i.fill(e),i});if(!Ja.kStringMaxLength)try{Ja.kStringMaxLength=process.binding("buffer").kStringMaxLength}catch{}Ja.constants||(Ja.constants={MAX_LENGTH:Ja.kMaxLength},Ja.kStringMaxLength&&(Ja.constants.MAX_STRING_LENGTH=Ja.kStringMaxLength));var Dh=Ja,CP={},qj="\uFEFF";CP.PrependBOM=TP;function TP(t,e){this.encoder=t,this.addBOM=!0}TP.prototype.write=function(t){return this.addBOM&&(t=qj+t,this.addBOM=!1),this.encoder.write(t)};TP.prototype.end=function(){return this.encoder.end()};CP.StripBOM=MP;function MP(t,e){this.decoder=t,this.pass=!1,this.options=e||{}}MP.prototype.write=function(t){var e=this.decoder.write(t);return this.pass||!e||(e[0]===qj&&(e=e.slice(1),typeof this.options.stripBOM=="function"&&this.options.stripBOM()),this.pass=!0),e};MP.prototype.end=function(){return this.decoder.end()};var hVe=typeof Object.hasOwn>"u"?Function.call.bind(Object.prototype.hasOwnProperty):Object.hasOwn;function fVe(t,e){for(var n in e)hVe(e,n)&&(t[n]=e[n])}var Yj=fVe,lD={},PC={},LC={exports:{}};var cD;function pVe(){return cD||(cD=1,(function(t,e){var n=SP,i=n.Buffer;function s(o,a){for(var l in o)a[l]=o[l]}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(s(n,e),e.Buffer=r);function r(o,a,l){return i(o,a,l)}r.prototype=Object.create(i.prototype),s(i,r),r.from=function(o,a,l){if(typeof o=="number")throw new TypeError("Argument must not be a number");return i(o,a,l)},r.alloc=function(o,a,l){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=i(o);return a!==void 0?typeof l=="string"?c.fill(a,l):c.fill(a):c.fill(0),c},r.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return i(o)},r.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n.SlowBuffer(o)}})(LC,LC.exports)),LC.exports}var uD;function mVe(){if(uD)return PC;uD=1;var t=pVe().Buffer,e=t.isEncoding||function(g){switch(g=""+g,g&&g.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function n(g){if(!g)return"utf8";for(var x;;)switch(g){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return g;default:if(x)return;g=(""+g).toLowerCase(),x=!0}}function i(g){var x=n(g);if(typeof x!="string"&&(t.isEncoding===e||!e(g)))throw new Error("Unknown encoding: "+g);return x||g}PC.StringDecoder=s;function s(g){this.encoding=i(g);var x;switch(this.encoding){case"utf16le":this.text=d,this.end=h,x=4;break;case"utf8":this.fillLast=l,x=4;break;case"base64":this.text=f,this.end=p,x=3;break;default:this.write=m,this.end=b;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=t.allocUnsafe(x)}s.prototype.write=function(g){if(g.length===0)return"";var x,S;if(this.lastNeed){if(x=this.fillLast(g),x===void 0)return"";S=this.lastNeed,this.lastNeed=0}else S=0;return S>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function o(g,x,S){var _=x.length-1;if(_=0?(E>0&&(g.lastNeed=E-1),E):--_=0?(E>0&&(g.lastNeed=E-2),E):--_=0?(E>0&&(E===2?E=0:g.lastNeed=E-3),E):0))}function a(g,x,S){if((x[0]&192)!==128)return g.lastNeed=0,"�";if(g.lastNeed>1&&x.length>1){if((x[1]&192)!==128)return g.lastNeed=1,"�";if(g.lastNeed>2&&x.length>2&&(x[2]&192)!==128)return g.lastNeed=2,"�"}}function l(g){var x=this.lastTotal-this.lastNeed,S=a(this,g);if(S!==void 0)return S;if(this.lastNeed<=g.length)return g.copy(this.lastChar,x,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,x,0,g.length),this.lastNeed-=g.length}function c(g,x){var S=o(this,g,x);if(!this.lastNeed)return g.toString("utf8",x);this.lastTotal=S;var _=g.length-(S-this.lastNeed);return g.copy(this.lastChar,0,_),g.toString("utf8",x,_)}function u(g){var x=g&&g.length?this.write(g):"";return this.lastNeed?x+"�":x}function d(g,x){if((g.length-x)%2===0){var S=g.toString("utf16le",x);if(S){var _=S.charCodeAt(S.length-1);if(_>=55296&&_<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],S.slice(0,-1)}return S}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",x,g.length-1)}function h(g){var x=g&&g.length?this.write(g):"";if(this.lastNeed){var S=this.lastTotal-this.lastNeed;return x+this.lastChar.toString("utf16le",0,S)}return x}function f(g,x){var S=(g.length-x)%3;return S===0?g.toString("base64",x):(this.lastNeed=3-S,this.lastTotal=3,S===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",x,g.length-S))}function p(g){var x=g&&g.length?this.write(g):"";return this.lastNeed?x+this.lastChar.toString("base64",0,3-this.lastNeed):x}function m(g){return g.toString(this.encoding)}function b(g){return g&&g.length?this.write(g):""}return PC}var IC,dD;function gVe(){if(dD)return IC;dD=1;var t=Dh.Buffer;IC={utf8:{type:"_internal",bomAware:!0},cesu8:{type:"_internal",bomAware:!0},unicode11utf8:"utf8",ucs2:{type:"_internal",bomAware:!0},utf16le:"ucs2",binary:{type:"_internal"},base64:{type:"_internal"},hex:{type:"_internal"},_internal:e};function e(c,u){this.enc=c.encodingName,this.bomAware=c.bomAware,this.enc==="base64"?this.encoder=r:this.enc==="utf8"?this.encoder=l:this.enc==="cesu8"&&(this.enc="utf8",this.encoder=o,t.from("eda0bdedb2a9","hex").toString()!=="💩"&&(this.decoder=a,this.defaultCharUnicode=u.defaultCharUnicode))}e.prototype.encoder=s,e.prototype.decoder=i;var n=mVe().StringDecoder;function i(c,u){this.decoder=new n(u.enc)}i.prototype.write=function(c){return t.isBuffer(c)||(c=t.from(c)),this.decoder.write(c)},i.prototype.end=function(){return this.decoder.end()};function s(c,u){this.enc=u.enc}s.prototype.write=function(c){return t.from(c,this.enc)},s.prototype.end=function(){};function r(c,u){this.prevStr=""}r.prototype.write=function(c){c=this.prevStr+c;var u=c.length-c.length%4;return this.prevStr=c.slice(u),c=c.slice(0,u),t.from(c,"base64")},r.prototype.end=function(){return t.from(this.prevStr,"base64")};function o(c,u){}o.prototype.write=function(c){for(var u=t.alloc(c.length*3),d=0,h=0;h>>6),u[d++]=128+(f&63)):(u[d++]=224+(f>>>12),u[d++]=128+(f>>>6&63),u[d++]=128+(f&63))}return u.slice(0,d)},o.prototype.end=function(){};function a(c,u){this.acc=0,this.contBytes=0,this.accBytes=0,this.defaultCharUnicode=u.defaultCharUnicode}a.prototype.write=function(c){for(var u=this.acc,d=this.contBytes,h=this.accBytes,f="",p=0;p0&&(f+=this.defaultCharUnicode,d=0),m<128?f+=String.fromCharCode(m):m<224?(u=m&31,d=1,h=1):m<240?(u=m&15,d=2,h=1):f+=this.defaultCharUnicode):d>0?(u=u<<6|m&63,d--,h++,d===0&&(h===2&&u<128&&u>0?f+=this.defaultCharUnicode:h===3&&u<2048?f+=this.defaultCharUnicode:f+=String.fromCharCode(u))):f+=this.defaultCharUnicode}return this.acc=u,this.contBytes=d,this.accBytes=h,f},a.prototype.end=function(){var c=0;return this.contBytes>0&&(c+=this.defaultCharUnicode),c};function l(c,u){this.highSurrogate=""}return l.prototype.write=function(c){if(this.highSurrogate&&(c=this.highSurrogate+c,this.highSurrogate=""),c.length>0){var u=c.charCodeAt(c.length-1);u>=55296&&u<56320&&(this.highSurrogate=c[c.length-1],c=c.slice(0,c.length-1))}return t.from(c,this.enc)},l.prototype.end=function(){if(this.highSurrogate){var c=this.highSurrogate;return this.highSurrogate="",t.from(c,this.enc)}},IC}var Cu={},hD;function vVe(){if(hD)return Cu;hD=1;var t=Dh.Buffer;Cu._utf32=e;function e(c,u){this.iconv=u,this.bomAware=!0,this.isLE=c.isLE}Cu.utf32le={type:"_utf32",isLE:!0},Cu.utf32be={type:"_utf32",isLE:!1},Cu.ucs4le="utf32le",Cu.ucs4be="utf32be",e.prototype.encoder=n,e.prototype.decoder=i;function n(c,u){this.isLE=u.isLE,this.highSurrogate=0}n.prototype.write=function(c){for(var u=t.from(c,"ucs2"),d=t.alloc(u.length*2),h=this.isLE?d.writeUInt32LE:d.writeUInt32BE,f=0,p=0;p=55296&&m<56320,g=m>=56320&&m<57344;if(this.highSurrogate)if(b||!g)h.call(d,this.highSurrogate,f),f+=4;else{var x=(this.highSurrogate-55296<<10|m-56320)+65536;h.call(d,x,f),f+=4,this.highSurrogate=0;continue}b?this.highSurrogate=m:(h.call(d,m,f),f+=4,this.highSurrogate=0)}return f0){for(;u1114111)&&(d=h),d>=65536){d-=65536;var f=55296|d>>10;c[u++]=f&255,c[u++]=f>>8;var d=56320|d&1023}return c[u++]=d&255,c[u++]=d>>8,u}i.prototype.end=function(){this.overflow.length=0},Cu.utf32=r,Cu.ucs4="utf32";function r(c,u){this.iconv=u}r.prototype.encoder=o,r.prototype.decoder=a;function o(c,u){c=c||{},c.addBOM===void 0&&(c.addBOM=!0),this.encoder=u.iconv.getEncoder(c.defaultEncoding||"utf-32le",c)}o.prototype.write=function(c){return this.encoder.write(c)},o.prototype.end=function(){return this.encoder.end()};function a(c,u){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=c||{},this.iconv=u.iconv}a.prototype.write=function(c){if(!this.decoder){if(this.initialBufs.push(c),this.initialBufsLen+=c.length,this.initialBufsLen<32)return"";var u=l(this.initialBufs,this.options.defaultEncoding);this.decoder=this.iconv.getDecoder(u,this.options);for(var d="",h=0;h16)&&p++,(d[3]!==0||d[2]>16)&&f++,d[0]===0&&d[1]===0&&(d[2]!==0||d[3]!==0)&&b++,(d[0]!==0||d[1]!==0)&&d[2]===0&&d[3]===0&&m++,d.length=0,h++,h>=100)break e}return b-p>m-f?"utf-32be":b-p=100)break e}return f>h?"utf-16be":f0&&(m=this.iconv.decode(t.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m},Iv.utf7imap=d;function d(m,b){this.iconv=b}d.prototype.encoder=h,d.prototype.decoder=f,d.prototype.bomAware=!0;function h(m,b){this.iconv=b.iconv,this.inBase64=!1,this.base64Accum=t.alloc(6),this.base64AccumIdx=0}h.prototype.write=function(m){for(var b=this.inBase64,g=this.base64Accum,x=this.base64AccumIdx,S=t.alloc(m.length*5+10),_=0,E=0;E=32&&T<=126?(b&&(x>0&&(_+=S.write(g.slice(0,x).toString("base64").replace(/\//g,",").replace(/=+$/,""),_),x=0),S[_++]=c,b=!1),b||(S[_++]=T,T===u&&(S[_++]=c))):(b||(S[_++]=u,b=!0),b&&(g[x++]=T>>8,g[x++]=T&255,x==g.length&&(_+=S.write(g.toString("base64").replace(/\//g,","),_),x=0)))}return this.inBase64=b,this.base64AccumIdx=x,S.slice(0,_)},h.prototype.end=function(){var m=t.alloc(10),b=0;return this.inBase64&&(this.base64AccumIdx>0&&(b+=m.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),b),this.base64AccumIdx=0),m[b++]=c,this.inBase64=!1),m.slice(0,b)};function f(m,b){this.iconv=b.iconv,this.inBase64=!1,this.base64Accum=""}var p=o.slice();return p[44]=!0,f.prototype.write=function(m){for(var b="",g=0,x=this.inBase64,S=this.base64Accum,_=0;_0&&(m=this.iconv.decode(t.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",m},Iv}var RC={},mD;function _Ve(){if(mD)return RC;mD=1;var t=Dh.Buffer;RC._sbcs=e;function e(s,r){if(!s)throw new Error("SBCS codec is called without the data.");if(!s.chars||s.chars.length!==128&&s.chars.length!==256)throw new Error("Encoding '"+s.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(s.chars.length===128){for(var o="",a=0;a<128;a++)o+=String.fromCharCode(a);s.chars=o+s.chars}this.decodeBuf=t.from(s.chars,"ucs2");for(var l=t.alloc(65536,r.defaultCharSingleByte.charCodeAt(0)),a=0;a?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�`},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖרÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖרÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈ƫȅ ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"},maccyrillic:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"},macgreek:{type:"_sbcs",chars:"Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"},maciceland:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüݰ¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},macroman:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},macromania:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},macthai:{type:"_sbcs",chars:"«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู\uFEFF​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"},macturkish:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"},macukraine:{type:"_sbcs",chars:"АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"},koi8r:{type:"_sbcs",chars:"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"},koi8u:{type:"_sbcs",chars:"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"},koi8ru:{type:"_sbcs",chars:"─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"},koi8t:{type:"_sbcs",chars:"қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"},armscii8:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"},rk1048:{type:"_sbcs",chars:"ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"},tcvn:{type:"_sbcs",chars:`\0ÚỤỪỬỮ\x07\b \v\f\rỨỰỲỶỸÝỴ\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ`},georgianacademy:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},georgianps:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"},pt154:{type:"_sbcs",chars:"ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"},viscii:{type:"_sbcs",chars:`\0ẲẴẪ\x07\b \v\f\rỶỸ\x1BỴ !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ`},iso646cn:{type:"_sbcs",chars:`\0\x07\b \v\f\r\x1B !"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},iso646jp:{type:"_sbcs",chars:`\0\x07\b \v\f\r\x1B !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_\`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������`},hproman8:{type:"_sbcs",chars:"€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"},macintosh:{type:"_sbcs",chars:"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"},ascii:{type:"_sbcs",chars:"��������������������������������������������������������������������������������������������������������������������������������"},tis620:{type:"_sbcs",chars:"���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"}}),yD}var OC={},_D;function SVe(){if(_D)return OC;_D=1;var t=Dh.Buffer;OC._dbcs=l;for(var e=-1,n=-2,i=-10,s=-1e3,r=new Array(256),o=-1,a=0;a<256;a++)r[a]=e;function l(h,f){if(this.encodingName=h.encodingName,!h)throw new Error("DBCS codec is called without the data.");if(!h.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var p=h.table();this.decodeTables=[],this.decodeTables[0]=r.slice(0),this.decodeTableSeq=[];for(var m=0;ms)throw new Error("gb18030 decode tables conflict at byte 2");for(var E=this.decodeTables[s-S[_]],T=129;T<=254;T++){if(E[T]===e)E[T]=s-g;else{if(E[T]===s-g)continue;if(E[T]>s)throw new Error("gb18030 decode tables conflict at byte 3")}for(var A=this.decodeTables[s-E[T]],I=48;I<=57;I++)A[I]===e&&(A[I]=n)}}}this.defaultCharUnicode=f.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var P={};if(h.encodeSkipVals)for(var m=0;m0;h>>>=8)f.push(h&255);f.length==0&&f.push(0);for(var p=this.decodeTables[0],m=f.length-1;m>0;m--){var b=p[f[m]];if(b==e)p[f[m]]=s-this.decodeTables.length,this.decodeTables.push(p=r.slice(0));else if(b<=s)p=this.decodeTables[s-b];else throw new Error("Overwrite byte in "+this.encodingName+", addr: "+h.toString(16))}return p},l.prototype._addDecodeChunk=function(h){var f=parseInt(h[0],16),p=this._getDecodeTrieNode(f);f=f&255;for(var m=1;m=55296&&x<56320){var S=b.charCodeAt(g++);if(S>=56320&&S<57344)p[f++]=65536+(x-55296)*1024+(S-56320);else throw new Error("Incorrect surrogate pair in "+this.encodingName+" at chunk "+h[0])}else if(x>4080&&x<=4095){for(var _=4095-x+2,E=[],T=0;T<_;T++)E.push(b.charCodeAt(g++));p[f++]=i-this.decodeTableSeq.length,this.decodeTableSeq.push(E)}else p[f++]=x}else if(typeof b=="number")for(var A=p[f-1]+1,g=0;g255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+h[0]+": too long"+f)},l.prototype._getEncodeBucket=function(h){var f=h>>8;return this.encodeTable[f]===void 0&&(this.encodeTable[f]=r.slice(0)),this.encodeTable[f]},l.prototype._setEncodeChar=function(h,f){var p=this._getEncodeBucket(h),m=h&255;p[m]<=i?this.encodeTableSeq[i-p[m]][o]=f:p[m]==e&&(p[m]=f)},l.prototype._setEncodeSequence=function(h,f){var p=h[0],m=this._getEncodeBucket(p),b=p&255,g;m[b]<=i?g=this.encodeTableSeq[i-m[b]]:(g={},m[b]!==e&&(g[o]=m[b]),m[b]=i-this.encodeTableSeq.length,this.encodeTableSeq.push(g));for(var x=1;x=0)this._setEncodeChar(S,_),b=!0;else if(S<=s){var E=s-S;if(!g[E]){var T=_<<8>>>0;this._fillEncodeTable(E,T,p)?b=!0:g[E]=!0}}else S<=i&&(this._setEncodeSequence(this.decodeTableSeq[i-S],_),b=!0)}return b};function c(h,f){this.leadSurrogate=-1,this.seqObj=void 0,this.encodeTable=f.encodeTable,this.encodeTableSeq=f.encodeTableSeq,this.defaultCharSingleByte=f.defCharSB,this.gb18030=f.gb18030}c.prototype.write=function(h){for(var f=t.alloc(h.length*(this.gb18030?4:3)),p=this.leadSurrogate,m=this.seqObj,b=-1,g=0,x=0;;){if(b===-1){if(g==h.length)break;var S=h.charCodeAt(g++)}else{var S=b;b=-1}if(S>=55296&&S<57344)if(S<56320)if(p===-1){p=S;continue}else p=S,S=e;else p!==-1?(S=65536+(p-55296)*1024+(S-56320),p=-1):S=e;else p!==-1&&(b=S,S=e,p=-1);var _=e;if(m!==void 0&&S!=e){var E=m[S];if(typeof E=="object"){m=E;continue}else typeof E=="number"?_=E:E==null&&(E=m[o],E!==void 0&&(_=E,b=S));m=void 0}else if(S>=0){var T=this.encodeTable[S>>8];if(T!==void 0&&(_=T[S&255]),_<=i){m=this.encodeTableSeq[i-_];continue}if(_==e&&this.gb18030){var A=d(this.gb18030.uChars,S);if(A!=-1){var _=this.gb18030.gbChars[A]+(S-this.gb18030.uChars[A]);f[x++]=129+Math.floor(_/12600),_=_%12600,f[x++]=48+Math.floor(_/1260),_=_%1260,f[x++]=129+Math.floor(_/10),_=_%10,f[x++]=48+_;continue}}}_===e&&(_=this.defaultCharSingleByte),_<256?f[x++]=_:_<65536?(f[x++]=_>>8,f[x++]=_&255):_<16777216?(f[x++]=_>>16,f[x++]=_>>8&255,f[x++]=_&255):(f[x++]=_>>>24,f[x++]=_>>>16&255,f[x++]=_>>>8&255,f[x++]=_&255)}return this.seqObj=m,this.leadSurrogate=p,f.slice(0,x)},c.prototype.end=function(){if(!(this.leadSurrogate===-1&&this.seqObj===void 0)){var h=t.alloc(10),f=0;if(this.seqObj){var p=this.seqObj[o];p!==void 0&&(p<256?h[f++]=p:(h[f++]=p>>8,h[f++]=p&255)),this.seqObj=void 0}return this.leadSurrogate!==-1&&(h[f++]=this.defaultCharSingleByte,this.leadSurrogate=-1),h.slice(0,f)}},c.prototype.findIdx=d;function u(h,f){this.nodeIdx=0,this.prevBytes=[],this.decodeTables=f.decodeTables,this.decodeTableSeq=f.decodeTableSeq,this.defaultCharUnicode=f.defaultCharUnicode,this.gb18030=f.gb18030}u.prototype.write=function(h){for(var f=t.alloc(h.length*2),p=this.nodeIdx,m=this.prevBytes,b=this.prevBytes.length,g=-this.prevBytes.length,x,S=0,_=0;S=0?h[S]:m[S+b],x=this.decodeTables[p][E];if(!(x>=0))if(x===e)x=this.defaultCharUnicode.charCodeAt(0),S=g;else if(x===n){if(S>=3)var T=(h[S-3]-129)*12600+(h[S-2]-48)*1260+(h[S-1]-129)*10+(E-48);else var T=(m[S-3+b]-129)*12600+((S-2>=0?h[S-2]:m[S-2+b])-48)*1260+((S-1>=0?h[S-1]:m[S-1+b])-129)*10+(E-48);var A=d(this.gb18030.gbChars,T);x=this.gb18030.uChars[A]+T-this.gb18030.gbChars[A]}else if(x<=s){p=s-x;continue}else if(x<=i){for(var I=this.decodeTableSeq[i-x],P=0;P>8;x=I[I.length-1]}else throw new Error("iconv-lite internal error: invalid decoding table value "+x+" at "+p+"/"+E);if(x>=65536){x-=65536;var k=55296|x>>10;f[_++]=k&255,f[_++]=k>>8,x=56320|x&1023}f[_++]=x&255,f[_++]=x>>8,p=0,g=S+1}return this.nodeIdx=p,this.prevBytes=g>=0?Array.prototype.slice.call(h,g):m.slice(g+b).concat(Array.prototype.slice.call(h)),f.slice(0,_).toString("ucs2")},u.prototype.end=function(){for(var h="";this.prevBytes.length>0;){h+=this.defaultCharUnicode;var f=this.prevBytes.slice(1);this.prevBytes=[],this.nodeIdx=0,f.length>0&&(h+=this.write(f))}return this.prevBytes=[],this.nodeIdx=0,h};function d(h,f){if(h[0]>f)return-1;for(var p=0,m=h.length;p>1);h[b]<=f?p=b:m=b}return p}return OC}const EVe=[["0","\0",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","0",9],["8260","A",25],["8281","a",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"Ⅰ",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","ⅰ",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]],CVe=[["0","\0",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","0",9],["a3c1","A",25],["a3e1","a",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"Ⅰ",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","ⅰ",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]],DC=[["0","\0",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]],wD=[["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc","ḿ"],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93],["8135f437",""]],TVe=[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],MVe=[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189e3],AVe={uChars:TVe,gbChars:MVe},kVe=[["0","\0",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"ⅰ",9],["a5b0","Ⅰ",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆÐªĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]],xD=[["0","\0",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]],PVe=[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]];var SD,ED;function LVe(){return ED||(ED=1,SD={shiftjis:{type:"_dbcs",table:function(){return EVe},encodeAdd:{"¥":92,"‾":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return CVe},encodeAdd:{"¥":92,"‾":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return DC}},gbk:{type:"_dbcs",table:function(){return DC.concat(wD)}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return DC.concat(wD)},gb18030:function(){return AVe},encodeSkipVals:[128],encodeAdd:{"€":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return kVe}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return xD}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return xD.concat(PVe)},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}),SD}var CD;function IVe(){return CD||(CD=1,(function(t){for(var e=Yj,n=[gVe(),vVe(),yVe(),bVe(),_Ve(),wVe(),xVe(),SVe(),LVe()],i=0;i0?e.concat([u,d]):u},s.decode=function(o,a,l){typeof o=="string"&&(s.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),s.skipDecodeWarning=!0),o=e.from(""+(o||""),"binary"));var c=s.getDecoder(a,l),u=c.write(o),d=c.end();return d?u+d:u},s.encodingExists=function(o){try{return s.getCodec(o),!0}catch{return!1}},s.toEncoding=s.encode,s.fromEncoding=s.decode,s._codecDataCache={__proto__:null},s.getCodec=function(o){if(!s.encodings){var a=IVe();s.encodings={__proto__:null},i(s.encodings,a)}for(var l=s._canonicalizeEncoding(o),c={};;){var u=s._codecDataCache[l];if(u)return u;var d=s.encodings[l];switch(typeof d){case"string":l=d;break;case"object":for(var h in d)c[h]=d[h];c.encodingName||(c.encodingName=l),l=d.type;break;case"function":return c.encodingName||(c.encodingName=l),u=new d(c,s),s._codecDataCache[c.encodingName]=u,u;default:throw new Error("Encoding not recognized: '"+o+"' (searched as: '"+l+"')")}}},s._canonicalizeEncoding=function(o){return(""+o).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},s.getEncoder=function(o,a){var l=s.getCodec(o),c=new l.encoder(a,l);return l.bomAware&&a&&a.addBOM&&(c=new n.PrependBOM(c,a)),c},s.getDecoder=function(o,a){var l=s.getCodec(o),c=new l.decoder(a,l);return l.bomAware&&!(a&&a.stripBOM===!1)&&(c=new n.StripBOM(c,a)),c},s.enableStreamingAPI=function(o){if(!s.supportsStreams){var a=RVe()(o);s.IconvLiteEncoderStream=a.IconvLiteEncoderStream,s.IconvLiteDecoderStream=a.IconvLiteDecoderStream,s.encodeStream=function(l,c){return new s.IconvLiteEncoderStream(s.getEncoder(l,c),c)},s.decodeStream=function(l,c){return new s.IconvLiteDecoderStream(s.getDecoder(l,c),c)},s.supportsStreams=!0}};var r;try{r=NVe}catch{}r&&r.Transform?s.enableStreamingAPI(r):s.encodeStream=s.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}})(jj);var BVe=jj.exports;const FVe=nVe(BVe);class AP extends qG{constructor(e,n,i,s){var r;super(),this.fontSize=n,this.shape=i,this.font=s,this.code=e,s.data.header.fontType===Wo.BIGFONT?this.width=this.calcWidth():this.width=((r=i.lastPoint)==null?void 0:r.x)??this.calcWidth()}calcWidth(){const e=this.shape.bbox;return e.maxX-e.minX}offset(e){return new AP(this.code,this.fontSize,this.shape.offset(e),this.font)}toGeometry(){let e=this.font.cache.getGeometry(this.code,this.fontSize);if(e==null){const n=this.shape.polylines,i=[],s=[];let r=0;e=new es;for(let o=0;o{s.forEach((r,o)=>{const a=r.status==="fulfilled",l=e[o].url,c=gO(l.toLowerCase());i.push({fontName:c,url:l,status:a?"Success":"FailedToLoad"}),a&&this.fileNames.push(c)})}),i}findAndReplaceFont(e){let n=this.loadedFontMap.get(e.toLowerCase());if(n==null){const i=this.fontMapping[e];if(i)return n=this.loadedFontMap.get(i.toLowerCase()),i}return n?e:this.defaultFont}getFontByName(e,n=!0){if(this.loadedFontMap.size===0)return;e==null&&(e="");const i=e.lastIndexOf(".");(i>0&&i==e.length-4||i==e.length-5)&&(e=e.substring(0,i));const s=this.loadedFontMap.get(e.toLowerCase());if(!s){n&&this.recordMissedFonts(e);return}return s}getFontByChar(e){for(const[,n]of this.loadedFontMap)if(n.hasChar(e))return n}getCharShape(e,n,i){let s=this.getFontByName(n);return s||(s=this.getFontByChar(e)),s?.getCharShape(e,i)}getFontScaleFactor(e){const n=this.loadedFontMap.get(e.toLowerCase());return n?n.getScaleFactor():1}getFontType(e){const n=this.loadedFontMap.get(e.toLowerCase());return n?.type}getNotFoundTextShape(e){for(const[,n]of this.loadedFontMap){const i=n.getNotFoundTextShape(e);if(i)return i}}isFontLoaded(e){return this.loadedFontMap.has(e.toLowerCase())}recordMissedFonts(e){e&&(this.missedFonts[e]||(this.missedFonts[e]=0),this.missedFonts[e]++,this.events.fontNotFound.dispatch({fontName:e,count:this.missedFonts[e]}))}async loadFont(e){if(!ZG(e.file))throw new Error(`Invalid font file name: ${e.file}`);const n=this.fontInfoToFontData(e),i=n.name;if(this.isFontLoaded(n.name))return;const s=await yC.instance.get(i);if(s){const r=BC.instance.createFont(s);this.loadedFontMap.set(i,r)}else{const r=await this.loader.loadAsync(e.url);n.data=r;const o=BC.instance.createFont(n);o&&(e.name.forEach(a=>o.names.add(a)),this.loadedFontMap.set(i,o),this.enableFontCache&&await yC.instance.set(i,n))}this.events.fontLoaded.dispatch({fontName:i})}fontInfoToFontData(e){const n=gO(e.file).toLowerCase(),i=["ttf","otf","woff"].includes(e.type)?"mesh":e.type;return{name:n,alias:e.name,type:i,encoding:e.encoding}}async getAllFontsFromCache(){if(this.loadedFontMap.size!==0)return;const e=await yC.instance.getAll();for(const n of e){const{name:i}=n;if(this.fileNames&&!this.fileNames.includes(i))continue;const s=BC.instance.createFont(n);this.loadedFontMap.set(i,s)}}getUnsupportedChar(){for(const[,e]of this.loadedFontMap)Object.assign(this.unsupportedChars,e.unsupportedChars);return this.unsupportedChars}release(e){return e==null?(this.loadedFontMap.clear(),!0):this.loadedFontMap.delete(e)}},Xj=class{constructor(){this._avaiableFonts=[],this._avaiableFontMap=new Map,this._baseUrl="https://mlightcad.gitlab.io/cad-data/fonts/"}get baseUrl(){return this._baseUrl}set baseUrl(e){this._baseUrl=e,this.onFontUrlChanged(e)}get avaiableFonts(){return this._avaiableFonts}onFontUrlChanged(e){}async getAvailableFonts(){if(this._avaiableFonts.length==0){const e=this._baseUrl+"fonts.json";try{const n=await fetch(e);this._avaiableFonts=await n.json()}catch(n){throw new Error(`Filed to get avaiable font from '${e}' due to ${n}!`)}this._avaiableFonts.forEach(n=>{n.url=this._baseUrl+n.file})}return this.buildFontMap(),this._avaiableFonts}async load(e){if(e==null||e.length===0)return[];await this.getAvailableFonts();const n=[],i=[];e.forEach(o=>{const a=o.toLowerCase(),l=this._avaiableFontMap.get(a);l&&($u.instance.isFontLoaded(a)&&n.push({fontName:a,url:l.url,status:"Success"}),i.push(l))});const s=await $u.instance.loadFonts(i),r={};return[...n,...s].forEach(o=>{r[o.fontName]=o}),e.map(o=>{const a=o.toLowerCase();return r[a]||{fontName:a,url:"",status:"NotFound"}})}buildFontMap(){const e=this._avaiableFontMap;this._avaiableFonts.forEach(n=>{n.name.forEach(i=>{e.set(i.toLocaleLowerCase(),n)})})}};var Mm=(t=>(t[t.NONE=0]="NONE",t[t.WORD=1]="WORD",t[t.STACK=2]="STACK",t[t.SPACE=3]="SPACE",t[t.NBSP=4]="NBSP",t[t.TABULATOR=5]="TABULATOR",t[t.NEW_PARAGRAPH=6]="NEW_PARAGRAPH",t[t.NEW_COLUMN=7]="NEW_COLUMN",t[t.WRAP_AT_DIMLINE=8]="WRAP_AT_DIMLINE",t[t.PROPERTIES_CHANGED=9]="PROPERTIES_CHANGED",t))(Mm||{}),Yv=(t=>(t[t.BOTTOM=0]="BOTTOM",t[t.MIDDLE=1]="MIDDLE",t[t.TOP=2]="TOP",t))(Yv||{}),kl=(t=>(t[t.DEFAULT=0]="DEFAULT",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.CENTER=3]="CENTER",t[t.JUSTIFIED=4]="JUSTIFIED",t[t.DISTRIBUTED=5]="DISTRIBUTED",t))(kl||{});const UVe={c:"Ø",d:"°",p:"±","%":"%"},$Ve={l:1,r:2,c:3,j:4,d:5};function VVe(t,e=!1){const n=new Set,i=/\\[fF](.*?)[;|]/g;return[...t.matchAll(i)].forEach(s=>{let r=s[1].toLowerCase();e&&(r=r.replace(/\.(ttf|otf|woff|shx)$/,"")),n.add(r)}),n}class HVe{constructor(e){this.stack=[],this.stack.push(e)}push(e){this.stack.push(e)}pop(){if(this.stack.length<=1)return;const e=this.stack.pop(),n=this.stack[this.stack.length-1];return JSON.stringify(n.paragraph)!==JSON.stringify(e.paragraph)&&(n.paragraph={...e.paragraph}),e}get current(){return this.stack[this.stack.length-1]}get depth(){return this.stack.length-1}get root(){return this.stack[0]}setCurrent(e){this.stack[this.stack.length-1]=e}}class WVe{constructor(e,n,i={}){this.continueStroke=!1,this.inStackContext=!1,this.scanner=new FC(e);const s=n??new PP;this.ctxStack=new HVe(s),this.yieldPropertyCommands=i.yieldPropertyCommands??!1,this.resetParagraphParameters=i.resetParagraphParameters??!1,this.mifDecoder=i.mifDecoder??this.decodeMultiByteChar.bind(this),this.mifCodeLength=i.mifCodeLength??"auto"}decodeMultiByteChar(e){try{if(e.length===5){const n=e[0];let i="gbk";n==="1"?i="shift-jis":n==="2"&&(i="big5");const s=new Uint8Array([parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16)]);return new TextDecoder(i).decode(s)}else if(e.length===4){const n=new Uint8Array([parseInt(e.substr(0,2),16),parseInt(e.substr(2,2),16)]),i=new TextDecoder("gbk").decode(n);if(i!=="▯")return i;const s=new TextDecoder("big5").decode(n);if(s!=="▯")return s}return"▯"}catch{return"▯"}}extractMifCode(e){var n,i,s;return e==="auto"?((n=this.scanner.tail.match(/^[0-9A-Fa-f]{5}/))==null?void 0:n[0])||((i=this.scanner.tail.match(/^[0-9A-Fa-f]{4}/))==null?void 0:i[0])||null:((s=this.scanner.tail.match(new RegExp(`^[0-9A-Fa-f]{${e}}`)))==null?void 0:s[0])||null}pushCtx(){this.ctxStack.push(this.ctxStack.current)}popCtx(){this.ctxStack.pop()}parseStacking(){const e=new FC(this.extractExpression(!0));let n="",i="",s="";const r=()=>{let l=e.peek(),c=!1;return l.charCodeAt(0)<32&&(l=" "),l==="\\"&&(c=!0,e.consume(1),l=e.peek()),e.consume(1),[l,c]},o=()=>{let l="";for(;e.hasData;){const[c,u]=r();if(!u&&(c==="/"||c==="#"||c==="^"))return[l,c];l+=c}return[l,""]},a=l=>{let c="",u=l;for(;e.hasData;){const[d,h]=r();if(!(u&&d===" ")){if(u=!1,!h&&d===";")break;c+=d}}return c};return[n,s]=o(),s&&(i=a(s==="^")),n===""&&i.includes("I/")?[2,[" "," ","/"]]:s==="^"?[2,[n,i,"^"]]:[2,[n,i,s]]}parseProperties(e){const n=this.ctxStack.current.copy(),i=this.ctxStack.current.copy();switch(e){case"L":i.underline=!0,this.continueStroke=!0;break;case"l":i.underline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"O":i.overline=!0,this.continueStroke=!0;break;case"o":i.overline=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"K":i.strikeThrough=!0,this.continueStroke=!0;break;case"k":i.strikeThrough=!1,i.hasAnyStroke||(this.continueStroke=!1);break;case"A":this.parseAlign(i);break;case"C":this.parseAciColor(i);break;case"c":this.parseRgbColor(i);break;case"H":this.parseHeight(i);break;case"W":this.parseWidth(i);break;case"Q":this.parseOblique(i);break;case"T":this.parseCharTracking(i);break;case"p":this.parseParagraphProperties(i);break;case"f":case"F":this.parseFontProperties(i);break;default:throw new Error(`Unknown command: ${e}`)}if(this.continueStroke=i.hasAnyStroke,i.continueStroke=this.continueStroke,this.ctxStack.setCurrent(i),this.yieldPropertyCommands){const s=this.getPropertyChanges(n,i);if(Object.keys(s).length>0)return{command:e,changes:s,depth:this.ctxStack.depth}}}getPropertyChanges(e,n){const i={};if(e.underline!==n.underline&&(i.underline=n.underline),e.overline!==n.overline&&(i.overline=n.overline),e.strikeThrough!==n.strikeThrough&&(i.strikeThrough=n.strikeThrough),e.color.aci!==n.color.aci&&(i.aci=n.color.aci),e.color.rgbValue!==n.color.rgbValue&&(i.rgb=n.color.rgb),e.align!==n.align&&(i.align=n.align),JSON.stringify(e.fontFace)!==JSON.stringify(n.fontFace)&&(i.fontFace=n.fontFace),(e.capHeight.value!==n.capHeight.value||e.capHeight.isRelative!==n.capHeight.isRelative)&&(i.capHeight=n.capHeight),(e.widthFactor.value!==n.widthFactor.value||e.widthFactor.isRelative!==n.widthFactor.isRelative)&&(i.widthFactor=n.widthFactor),(e.charTrackingFactor.value!==n.charTrackingFactor.value||e.charTrackingFactor.isRelative!==n.charTrackingFactor.isRelative)&&(i.charTrackingFactor=n.charTrackingFactor),e.oblique!==n.oblique&&(i.oblique=n.oblique),JSON.stringify(e.paragraph)!==JSON.stringify(n.paragraph)){const s={};e.paragraph.indent!==n.paragraph.indent&&(s.indent=n.paragraph.indent),e.paragraph.align!==n.paragraph.align&&(s.align=n.paragraph.align),e.paragraph.left!==n.paragraph.left&&(s.left=n.paragraph.left),e.paragraph.right!==n.paragraph.right&&(s.right=n.paragraph.right),JSON.stringify(e.paragraph.tabs)!==JSON.stringify(n.paragraph.tabs)&&(s.tabs=n.paragraph.tabs),Object.keys(s).length>0&&(i.paragraph=s)}return i}parseAlign(e){const n=this.scanner.get();"012".includes(n)?e.align=parseInt(n):e.align=0,this.consumeOptionalTerminator()}parseHeight(e){const n=this.extractFloatExpression(!0);if(n)try{n.endsWith("x")?e.capHeight={value:parseFloat(n.slice(0,-1)),isRelative:!0}:e.capHeight={value:parseFloat(n),isRelative:!1}}catch{this.scanner.consume(-n.length);return}this.consumeOptionalTerminator()}parseWidth(e){const n=this.extractFloatExpression(!0);if(n)try{n.endsWith("x")?e.widthFactor={value:parseFloat(n.slice(0,-1)),isRelative:!0}:e.widthFactor={value:parseFloat(n),isRelative:!1}}catch{this.scanner.consume(-n.length);return}this.consumeOptionalTerminator()}parseCharTracking(e){const n=this.extractFloatExpression(!0);if(n)try{n.endsWith("x")?e.charTrackingFactor={value:Math.abs(parseFloat(n.slice(0,-1))),isRelative:!0}:e.charTrackingFactor={value:Math.abs(parseFloat(n)),isRelative:!1}}catch{this.scanner.consume(-n.length);return}this.consumeOptionalTerminator()}parseFloatValueOrFactor(e){const n=this.extractFloatExpression(!0);if(n)if(n.endsWith("x")){const i=parseFloat(n.slice(0,-1));e*=i}else e=parseFloat(n);return e}parseOblique(e){const n=this.extractFloatExpression(!1);n&&(e.oblique=parseFloat(n)),this.consumeOptionalTerminator()}parseAciColor(e){const n=this.extractIntExpression();if(n){const i=parseInt(n);i<257&&(e.color.aci=i)}this.consumeOptionalTerminator()}parseRgbColor(e){const n=this.extractIntExpression();if(n){const i=parseInt(n)&16777215;e.color.rgbValue=i}this.consumeOptionalTerminator()}extractFloatExpression(e=!1){const n=e?/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?x?/:/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,i=this.scanner.tail.match(n);if(i){const s=i[0];return this.scanner.consume(s.length),s}return""}extractIntExpression(){const e=this.scanner.tail.match(/^\d+/);if(e){const n=e[0];return this.scanner.consume(n.length),n}return""}extractExpression(e=!1){const n=this.scanner.find(";",e);if(n<0){const r=this.scanner.tail;return this.scanner.consume(r.length),r}const i=this.scanner.peek(n-this.scanner.currentIndex-1)==="\\",s=this.scanner.tail.slice(0,n-this.scanner.currentIndex+(i?1:0));return this.scanner.consume(s.length+1),s}parseFontProperties(e){const n=this.extractExpression().split("|");if(n.length>0&&n[0]){const i=n[0];let s="Regular",r=400;for(const o of n.slice(1))o.startsWith("b1")?r=700:o==="i"||o.startsWith("i1")?s="Italic":(o==="i0"||o.startsWith("i0"))&&(s="Regular");e.fontFace={family:i,style:s,weight:r}}}parseParagraphProperties(e){const n=new FC(this.extractExpression());let i=e.paragraph.indent,s=e.paragraph.left,r=e.paragraph.right,o=e.paragraph.align,a=[];const l=()=>{const c=n.tail.match(/^[+-]?\d+(?:\.\d*)?(?:[eE][+-]?\d+)?/);if(c){const u=parseFloat(c[0]);for(n.consume(c[0].length);n.peek()===",";)n.consume(1);return u}return 0};for(;n.hasData;)switch(n.get()){case"i":i=l();break;case"l":s=l();break;case"r":r=l();break;case"x":break;case"q":{const c=n.get();for(o=$Ve[c]||0;n.peek()===",";)n.consume(1);break}case"t":for(a=[];n.hasData;){const c=n.peek();if(c==="r"||c==="c"){n.consume(1);const u=l();a.push(c+u.toString())}else{const u=l();isNaN(u)?n.consume(1):a.push(u)}}break}e.paragraph={indent:i,left:s,right:r,align:o,tabs:a}}consumeOptionalTerminator(){this.scanner.peek()===";"&&this.scanner.consume(1)}*parse(){let e=null;function n(s){const r={...s.paragraph};s.paragraph={indent:0,left:0,right:0,align:0,tabs:[]};const o={};return r.indent!==0&&(o.indent=0),r.left!==0&&(o.left=0),r.right!==0&&(o.right=0),r.align!==0&&(o.align=0),JSON.stringify(r.tabs)!==JSON.stringify([])&&(o.tabs=[]),o}const i=()=>{let s="";for(;this.scanner.hasData;){let r=!1,o=this.scanner.peek();const a=this.scanner.currentIndex;if(o.charCodeAt(0)<32){if(this.scanner.consume(1),o===" ")return[5,null];if(o===` `)return[6,null];o=" "}if(o==="\\")if("\\{}".includes(this.scanner.peek(1)))r=!0,this.scanner.consume(1),o=this.scanner.peek();else{if(s)return[1,s];this.scanner.consume(1);const l=this.scanner.get();switch(l){case"~":return[4,null];case"P":return[6,null];case"N":return[7,null];case"X":return[8,null];case"S":{this.inStackContext=!0;const c=this.parseStacking();return this.inStackContext=!1,c}case"m":case"M":if(this.scanner.peek()==="+"){this.scanner.consume(1);const c=this.extractMifCode(this.mifCodeLength);if(c){this.scanner.consume(c.length);const u=this.mifDecoder(c);return s?[1,s]:[1,u]}this.scanner.consume(-1)}s+="\\M";continue;case"U":if(this.scanner.peek()==="+"){this.scanner.consume(1);const c=this.scanner.tail.match(/^[0-9A-Fa-f]{4,8}/);if(c){const u=c[0];this.scanner.consume(u.length);const d=parseInt(u,16);let h="";try{h=String.fromCodePoint(d)}catch{h="▯"}return s?[1,s]:[1,h]}this.scanner.consume(-1)}s+="\\U";continue;default:if(l)try{const c=this.parseProperties(l);if(this.yieldPropertyCommands&&c)return[9,c];continue}catch{const c=this.scanner.tail.slice(a,this.scanner.currentIndex);s+=c}}continue}if(o==="%"&&this.scanner.peek(1)==="%"){const l=this.scanner.peek(2).toLowerCase(),c=UVe[l];if(c){this.scanner.consume(3),s+=c;continue}else{const u=[l,this.scanner.peek(3),this.scanner.peek(4)];if(u.every(d=>d>="0"&&d<="9")){const d=Number.parseInt(u.join(""),10);this.scanner.consume(5),s+=String.fromCharCode(d)}else this.scanner.consume(3);continue}}if(o===" ")return s?(this.scanner.consume(1),e=3,[1,s]):(this.scanner.consume(1),[3,null]);if(!r){if(o==="{"){if(s)return[1,s];this.scanner.consume(1),this.pushCtx();continue}else if(o==="}"){if(s)return[1,s];if(this.scanner.consume(1),this.yieldPropertyCommands){const l=this.ctxStack.current;this.popCtx();const c=this.getPropertyChanges(l,this.ctxStack.current);if(Object.keys(c).length>0)return[9,{command:void 0,changes:c,depth:this.ctxStack.depth}]}else this.popCtx();continue}}if(!this.inStackContext&&o==="^"){const l=this.scanner.peek(1);if(l){const c=l.charCodeAt(0);if(this.scanner.consume(2),c===32)s+="^";else{if(c===73)return s?[1,s]:[5,null];if(c===74)return s?[1,s]:[6,null];if(c===77)continue;s+="▯"}continue}}this.scanner.consume(1),o.charCodeAt(0)>=32&&(s+=o)}return s?[1,s]:[0,null]};for(;;){const[s,r]=i.call(this);if(s){if(yield new zC(s,this.ctxStack.current.copy(),r),s===6&&this.resetParagraphParameters){const o=this.ctxStack.current,a=n(o);this.yieldPropertyCommands&&Object.keys(a).length>0&&(yield new zC(9,o.copy(),{command:void 0,changes:{paragraph:a},depth:this.ctxStack.depth}))}e&&(yield new zC(e,this.ctxStack.current.copy(),null),e=null)}else break}}}class FC{constructor(e){this.text=e,this.textLen=e.length,this._index=0}get currentIndex(){return this._index}get isEmpty(){return this._index>=this.textLen}get hasData(){return this._index=this.textLen||n<0?"":this.text[n]}find(e,n=!1){let i=this._index;for(;i=0&&e<=256)this._aci=e,this._rgbValue=null;else throw new Error("ACI not in range [0, 256]")}get rgb(){if(this._rgbValue===null)return null;const e=this._rgbValue>>16&255,n=this._rgbValue>>8&255,i=this._rgbValue&255;return[e,n,i]}set rgb(e){if(e){const[n,i,s]=e;this._rgbValue=(n&255)<<16|(i&255)<<8|s&255,this._aci=null}else this._rgbValue=null}get isRgb(){return this._rgbValue!==null}get isAci(){return this._rgbValue===null&&this._aci!==null}get rgbValue(){return this._rgbValue}set rgbValue(e){e===null?this._rgbValue=null:(this._rgbValue=e&16777215,this._aci=null)}copy(){const e=new kP;return e._aci=this._aci,e._rgbValue=this._rgbValue,e}toObject(){return{aci:this._aci,rgb:this.rgb,rgbValue:this._rgbValue}}equals(e){return this._aci===e._aci&&this._rgbValue===e._rgbValue}}let PP=class Zj{constructor(){this._stroke=0,this.continueStroke=!1,this.color=new kP,this.align=0,this.fontFace={family:"",style:"Regular",weight:400},this._capHeight={value:1,isRelative:!1},this._widthFactor={value:1,isRelative:!1},this._charTrackingFactor={value:1,isRelative:!1},this.oblique=0,this.paragraph={indent:0,left:0,right:0,align:0,tabs:[]}}get capHeight(){return this._capHeight}set capHeight(e){this._capHeight={value:Math.abs(e.value),isRelative:e.isRelative}}get widthFactor(){return this._widthFactor}set widthFactor(e){this._widthFactor={value:Math.abs(e.value),isRelative:e.isRelative}}get charTrackingFactor(){return this._charTrackingFactor}set charTrackingFactor(e){this._charTrackingFactor={value:Math.abs(e.value),isRelative:e.isRelative}}get aci(){return this.color.aci}set aci(e){this.color.aci=e}get rgb(){return this.color.rgb}set rgb(e){this.color.rgb=e}get italic(){return this.fontFace.style==="Italic"}set italic(e){this.fontFace.style=e?"Italic":"Regular"}get bold(){return(this.fontFace.weight||400)>=700}set bold(e){this.fontFace.weight=e?700:400}get underline(){return!!(this._stroke&1)}set underline(e){this._setStrokeState(1,e)}get strikeThrough(){return!!(this._stroke&4)}set strikeThrough(e){this._setStrokeState(4,e)}get overline(){return!!(this._stroke&2)}set overline(e){this._setStrokeState(2,e)}get hasAnyStroke(){return!!this._stroke}_setStrokeState(e,n=!0){n?this._stroke|=e:this._stroke&=~e}copy(){const e=new Zj;return e._stroke=this._stroke,e.continueStroke=this.continueStroke,e.color=this.color.copy(),e.align=this.align,e.fontFace={...this.fontFace},e._capHeight={...this._capHeight},e._widthFactor={...this._widthFactor},e._charTrackingFactor={...this._charTrackingFactor},e.oblique=this.oblique,e.paragraph={...this.paragraph},e}};class zC{constructor(e,n,i){this.type=e,this.ctx=n,this.data=i}}var xy=(t=>(t[t.LEFT_TO_RIGHT=1]="LEFT_TO_RIGHT",t[t.RIGHT_TO_LEFT=2]="RIGHT_TO_LEFT",t[t.TOP_TO_BOTTOM=3]="TOP_TO_BOTTOM",t[t.BOTTOM_TO_TOP=4]="BOTTOM_TO_TOP",t[t.BY_STYLE=5]="BY_STYLE",t))(xy||{});const GVe=new ct,jVe=1.666666;class LP extends PP{constructor(e){super(),this.fontScaleFactor=1,this.fontSize=1,this.fontSizeScaleFactor=1,this.blankWidth=0,e&&Object.assign(this,e)}clone(){const e=new LP;return e.continueStroke=this.continueStroke,e.color=this.color.copy(),e.align=this.align,e.fontFace={...this.fontFace},e.capHeight={...this.capHeight},e.widthFactor={...this.widthFactor},e.charTrackingFactor={...this.charTrackingFactor},e.oblique=this.oblique,e.paragraph={...this.paragraph},e.fontScaleFactor=this.fontScaleFactor,e.fontSize=this.fontSize,e.fontSizeScaleFactor=this.fontSizeScaleFactor,e.blankWidth=this.blankWidth,e}getColorAsHex(){return this.color.isRgb&&this.color.rgbValue!==null?this.color.rgbValue:this.color.isAci&&this.color.aci!==null?m9e(this.color.aci):16777215}setColorFromHex(e){const n=e>>16&255,i=e>>8&255,s=e&255;this.color.rgb=[n,i,s]}}class KVe{constructor(e,n,i,s){this._contextStack=[],this._maxFontSize=0,this._currentIndent=0,this._currentLeftMargin=0,this._currentRightMargin=0,this._style=e,this._styleManager=n,this._fontManager=i,this._options=s,this._totalHeight=0,this._hOffset=0,this._vOffset=0,this._lineCount=1,this._currentLineObjects=[],this._currentContext=new LP({fontScaleFactor:this.fontManager.getFontScaleFactor(this.textStyle.font.toLowerCase()),fontSize:s.fontSize,fontSizeScaleFactor:1,italic:!1,bold:!1,blankWidth:this.calculateBlankWidthForFont(this.textStyle.font.toLowerCase(),s.fontSize)}),this._currentContext.setColorFromHex(e.color),this._currentContext.fontFace.family=this.textStyle.font.toLowerCase(),this._currentContext.widthFactor={value:s.widthFactor,isRelative:!0},this._currentContext.oblique=e.obliqueAngle||0,this._maxFontSize=0,this._currentHorizontalAlignment=s.horizontalAlignment,this._currentIndent=0,this._currentLeftMargin=0,this._currentRightMargin=0,this.initLineParams()}get fontManager(){return this._fontManager}get styleManager(){return this._styleManager}get textStyle(){return this._style}get totalHeight(){return this._lineCount==1?this.currentMaxFontSize:this._totalHeight+this.currentLineHeight}get maxWidth(){return this._options.maxWidth}get flowDirection(){return this._options.flowDirection}get defaultHorizontalAlignment(){return this._options.horizontalAlignment}get defaultWidthFactor(){return this._options.widthFactor}get defaultFontSize(){return this._options.fontSize}get defaultLineSpaceFactor(){return this._options.lineSpaceFactor}get currentFont(){return this._currentContext.fontFace.family}get currentHorizontalAlignment(){return this._currentHorizontalAlignment}get currentFontSize(){return this._currentContext.fontSize}get currentLineHeight(){return this.defaultLineSpaceFactor*this.currentFontSize*jVe+this.currentMaxFontSize}get currentMaxFontSize(){return this._maxFontSize}get currentWordSpace(){return this._currentContext.charTrackingFactor.value}get currentWidthFactor(){return this._currentContext.widthFactor.value}get currentLineObjects(){return this._currentLineObjects}get hOffset(){return this._hOffset}set hOffset(e){this._hOffset=e}get vOffset(){return this._vOffset}set vOffset(e){this._vOffset=e}get currentIndent(){return this._currentIndent}get currentLeftMargin(){return this._currentLeftMargin}get currentRightMargin(){return this._currentRightMargin}get maxLineWidth(){return this.maxWidth-this._currentLeftMargin-this._currentRightMargin}processFormat(e){switch(e.command){case"f":case"F":e.changes.fontFace&&(this.changeFont(e.changes.fontFace.family),this.fontManager.getFontType(this._currentContext.fontFace.family)==="mesh"?(this._currentContext.italic=e.changes.fontFace.style==="Italic",this._currentContext.bold=(e.changes.fontFace.weight||400)>=700,this._currentContext.oblique=this.textStyle.obliqueAngle||0):(this._currentContext.italic=!1,this._currentContext.bold=!1,e.changes.fontFace.style==="Italic"?this._currentContext.oblique=15:this._currentContext.oblique=this.textStyle.obliqueAngle||0));break;case"c":case"C":e.changes.aci?e.changes.aci===0?this._currentContext.setColorFromHex(this._options.byBlockColor):e.changes.aci===256?this._currentContext.setColorFromHex(this._options.byLayerColor):this._currentContext.color.aci=e.changes.aci:e.changes.rgb&&(this._currentContext.color.rgb=e.changes.rgb);break;case"W":e.changes.widthFactor&&(e.changes.widthFactor.isRelative?this._currentContext.widthFactor={value:e.changes.widthFactor.value*this.maxWidth,isRelative:!1}:this._currentContext.widthFactor={value:e.changes.widthFactor.value*.93,isRelative:!1});break;case"H":e.changes.capHeight&&(e.changes.capHeight.isRelative?this.changeFontSizeScaleFactor(e.changes.capHeight.value):this.changeFontHeight(e.changes.capHeight.value));break;case"T":e.changes.charTrackingFactor&&(e.changes.charTrackingFactor.isRelative?this._currentContext.charTrackingFactor={value:e.changes.charTrackingFactor.value+1,isRelative:!1}:this._currentContext.charTrackingFactor={value:e.changes.charTrackingFactor.value,isRelative:!1});break;case"p":e.changes.paragraph&&(e.changes.paragraph.align&&(this._currentHorizontalAlignment=e.changes.paragraph.align),typeof e.changes.paragraph.indent=="number"&&(this._currentIndent=e.changes.paragraph.indent*this.defaultFontSize,this._hOffset+=this._currentIndent),typeof e.changes.paragraph.left=="number"&&(this._currentLeftMargin=e.changes.paragraph.left*this.defaultFontSize),typeof e.changes.paragraph.right=="number"&&(this._currentRightMargin=e.changes.paragraph.right*this.defaultFontSize));break;case"L":this._currentContext.underline=!0;break;case"l":this._currentContext.underline=!1;break;case"O":this._currentContext.overline=!0;break;case"o":this._currentContext.overline=!1;break;case"K":this._currentContext.strikeThrough=!0;break;case"k":this._currentContext.strikeThrough=!1;break;case"Q":e.changes.oblique!==void 0&&(this._currentContext.oblique=e.changes.oblique);break}}resetParagraphProperties(){this._currentIndent=0,this._currentLeftMargin=0,this._currentRightMargin=0,this._currentHorizontalAlignment=this._options.horizontalAlignment}startNewParagraph(e,n,i){this.processGeometries(e,n,i),this.startNewLine(),this.resetParagraphProperties()}processText(e){const n=[],i=[],s=new sl;for(const r of e)if(r.type===Mm.NEW_PARAGRAPH)this.startNewParagraph(n,i,s);else if(r.type===Mm.WORD){const o=r.data;Array.isArray(o)?o.forEach(a=>this.processWord(a,n,i)):typeof o=="string"&&o.length>0&&this.processWord(o,n,i)}else if(r.type===Mm.SPACE)this.processBlank();else if(r.type===Mm.PROPERTIES_CHANGED){this.processGeometries(n,i,s);const o=r.data;o.command===void 0?this._contextStack.length>0&&(this._currentContext=this._contextStack.pop()):(o.depth>0&&this._contextStack.push(this._currentContext.clone()),this.processFormat(o))}else r.type===Mm.STACK&&(this.processStack(r.data,n,i),this.processGeometries(n,i,s));return(n.length>0||i.length>0)&&this.processGeometries(n,i,s),this.processLastLine(),s}processGeometries(e,n,i){if(e.length>0||n.length>0){const s=this.toThreeObject(e,n);i.add(s),this._currentLineObjects.push(s),e.length=0,n.length=0}}processWord(e,n,i){let s=0;for(let r=0;r(this.maxLineWidth||1/0)&&this.startNewLine();for(let r=0;r(this.maxLineWidth||1/0)&&this.startNewLine();const l=this.hOffset,c=this.flowDirection==xy.BOTTOM_TO_TOP?this.vOffset:this.vOffset-this.currentFontSize,u=s.width*this.currentWidthFactor,d=this.currentFontSize;r.translate(l,c,0),this.currentHorizontalAlignment==kl.DISTRIBUTED?this._hOffset+=s.width*this.currentWidthFactor:this._hOffset+=s.width*this.currentWordSpace*this.currentWidthFactor,n.push(r);const h=d*.05,f=.001;if(this._currentContext.underline){const p=new es,m=c-h;p.setAttribute("position",new us(new Float32Array([l,m,f,l+u,m,f]),3)),p.setIndex(null),i.push(p)}if(this._currentContext.overline){const p=new es,m=c+d+h;p.setAttribute("position",new us(new Float32Array([l,m,f,l+u,m,f]),3)),p.setIndex(null),i.push(p)}if(this._currentContext.strikeThrough){const p=new es,m=c+d/2-d*.2;p.setAttribute("position",new us(new Float32Array([l,m,f,l+u,m,f]),3)),p.setIndex(null),i.push(p)}}processLastLine(){this.processAlignment()}initLineParams(){this.calcuateLineParams()}changeFont(e){let n=e;this._options.removeFontExtension&&(n=e.replace(/\.(ttf|otf|woff|shx)$/,"")),this._currentContext.fontFace.family=this.fontManager.findAndReplaceFont(n),this._currentContext.blankWidth=this.calculateBlankWidthForFont(this._currentContext.fontFace.family,this._currentContext.fontSize),this.calcuateLineParams()}calcuateLineParams(e){this._currentContext.fontScaleFactor=this.fontManager.getFontScaleFactor(this.currentFont);const n=e||this.defaultFontSize||this.textStyle.fixedTextHeight;this._currentContext.fontSize=n*this._currentContext.fontScaleFactor*this._currentContext.fontSizeScaleFactor}getCharShape(e){let n=this.fontManager.getCharShape(e,this.currentFont,this.currentFontSize);return this.textStyle.bigFont&&!n&&(n=this.fontManager.getCharShape(e,this.textStyle.bigFont,this.currentFontSize)),n||(n=this.fontManager.getCharShape(e,"",this.currentFontSize)),n||(n=this.fontManager.getNotFoundTextShape(this.currentFontSize)),this.currentFontSize>this._maxFontSize&&(this._maxFontSize=this.currentFontSize),n}startNewLine(){this._hOffset=0,this.flowDirection==xy.BOTTOM_TO_TOP?this._vOffset+=this.currentLineHeight:this._vOffset-=this.currentLineHeight,this._lineCount++,this.processAlignment(),this._currentLineObjects=[],this._lineCount==2?this._totalHeight=this.currentMaxFontSize:this._totalHeight=this._totalHeight+this.currentLineHeight,this._maxFontSize=0}processAlignment(){const e=[];if(this.currentLineObjects.forEach(i=>i.traverse(s=>{"geometry"in s&&e.push(s.geometry)})),e.length==0)return;let n;if(e.forEach((i,s)=>{i.boundingBox||i.computeBoundingBox(),s===0?n=i.boundingBox:n.union(i.boundingBox)}),n){const i=n.getSize(GVe);switch(this.currentHorizontalAlignment){case kl.LEFT:e.forEach(s=>s.translate(this._currentLeftMargin-n.min.x,0,0));break;case kl.CENTER:e.forEach(s=>s.translate(this._currentLeftMargin+(this.maxLineWidth-i.x)/2-n.min.x,0,0));break;case kl.RIGHT:e.forEach(s=>s.translate(this._currentLeftMargin+this.maxLineWidth-i.x-n.min.x,0,0));break;case kl.DISTRIBUTED:if(e.length>1){const s=(this.maxLineWidth-i.x)/(e.length-1);for(let r=1;rs.translate(this._currentLeftMargin-n.min.x,0,0));break}}}calculateBlankWidthForFont(e,n){return this.fontManager.getFontType(e)==="shx"?n*.5:n*.3}toThreeObject(e,n){const i=new sl,s=this._currentContext.getColorAsHex(),r=e.filter(a=>a instanceof rp);if(r.length>0){const a=new xr;a.geometry=nD(r),a.material=this.styleManager.getMeshBasicMaterial({layer:this._style.layer,isByLayer:this._style.isByLayer,color:s}),a.userData.bboxIntersectionCheck=!0,i.add(a)}const o=[...n,...e.filter(a=>!(a instanceof rp))];if(o.length>0){const a=new Zc;a.geometry=nD(o),a.material=this.styleManager.getLineBasicMaterial({layer:this._style.layer,isByLayer:this._style.isByLayer,color:s}),a.userData.bboxIntersectionCheck=!0,i.add(a)}return i.children.length===1?i.children[0]:i}changeFontSizeScaleFactor(e){this._currentContext.fontSizeScaleFactor*=e,this.calcuateLineParams()}changeFontHeight(e){this._currentContext.fontSize=e*this._currentContext.fontScaleFactor*this._currentContext.fontSizeScaleFactor,this.calcuateLineParams()}}const UC=new ct,sf=new ct,$C=new ct,VC=new Ah,HC=new ps,MD=new ps,AD=new ct(1,0,0);let kD=class Jj extends Lr{static getFonts(e,n=!1){return VVe(e,n)}constructor(e,n,i,s,r={byLayerColor:16777215,byBlockColor:16777215}){super(),this._style=n,this._styleManager=i,this._fontManager=s,this._colorSettings={byLayerColor:r.byLayerColor,byBlockColor:r.byBlockColor},this._box=new Gs,this._boxes=[],this._mtextData=e,this._fontsInStyleLoaded=!1}get fontManager(){return this._fontManager}dispose(){this.disposeThreeObject(this)}async asyncDraw(){const e=Array.from(Jj.getFonts(this._mtextData.text||"",!0));if(!this._fontsInStyleLoaded){if(this._style.font){const n=this.getFontName(this._style.font);n&&e.push(n)}if(this._style.bigFont){const n=this.getFontName(this._style.bigFont);n&&e.push(n)}if(this._style.extendedFont){const n=this.getFontName(this._style.extendedFont);n&&e.push(n)}}e.length>0&&(await this._fontManager.loadFontsByNames(e),this._fontsInStyleLoaded=!0),this.syncDraw()}syncDraw(){const e=this.loadMText(this._mtextData,this._style);e&&(this.getBoxes(e,this._boxes),this._boxes.forEach(n=>this.box.union(n)),this.add(e))}get styleManager(){return this._styleManager}get textStyle(){return this._style}get box(){return this._box}set box(e){this._box.copy(e)}raycast(e,n){this._boxes.forEach(i=>{if(e.ray.intersectBox(i,UC)){const s=e.ray.origin.distanceTo(UC);n.push({distance:s,point:UC.clone(),object:this,face:null,faceIndex:void 0,uv:void 0})}})}loadMText(e,n){const{object:i,height:s}=this.createMTextGroup(e,n);if(!i)return;i.matrix.decompose(sf,VC,$C),e.position&&(sf.x+=e.position.x,sf.y+=e.position.y,i.matrix.compose(sf,VC,$C));const r=e.width,o=this.calculateAnchorPoint(r,s,e.attachmentPoint,e.drawingDirection);i.traverse(c=>{"geometry"in c&&c.geometry.translate(o.x,o.y,0),c.layers.enableAll()});let a=e.rotation||0;if(e.directionVector){const c=e.directionVector,u=new ct(c.x,c.y,c.z),d=u.clone().cross(AD),h=AD.angleTo(u);a=d.z>0?-h:h}i.matrix.compose(sf,VC,$C);const l=e.position?sf.clone().sub(e.position):sf;return HC.makeTranslation(-l.x,-l.y,0),MD.makeRotationZ(a),i.matrix.multiply(HC),i.matrix.multiply(MD),i.matrix.multiply(HC.invert()),i.matrix.decompose(i.position,i.quaternion,i.scale),i}createMTextGroup(e,n){if(n&&n.font&&n.font.endsWith(".shx")){const f=`${n.font}_${n.name}`;this.styleManager.unsupportedTextStyles[f]||(this.styleManager.unsupportedTextStyles[f]=0),this.styleManager.unsupportedTextStyles[f]++}const i=e.width||0;let s=kl.LEFT;e.width&&e.attachmentPoint&&([1,4,7].includes(e.attachmentPoint)?s=kl.LEFT:[2,5,8].includes(e.attachmentPoint)?s=kl.CENTER:[3,6,9].includes(e.attachmentPoint)&&(s=kl.RIGHT));let r=Yv.BOTTOM;e.attachmentPoint&&([1,2,3].includes(e.attachmentPoint)?r=Yv.TOP:[4,5,6].includes(e.attachmentPoint)?r=Yv.MIDDLE:[7,8,9].includes(e.attachmentPoint)&&(r=Yv.BOTTOM));const o=e.height||0,a=e.lineSpaceFactor||.3,l=e.drawingDirection??xy.LEFT_TO_RIGHT,c={fontSize:o,widthFactor:e.widthFactor??1,lineSpaceFactor:a,horizontalAlignment:s,maxWidth:i,flowDirection:l,byBlockColor:this._colorSettings.byBlockColor,byLayerColor:this._colorSettings.byLayerColor,removeFontExtension:!0},u=new PP;u.fontFace.family=n.font,u.capHeight={value:e.height||1,isRelative:!0},u.widthFactor={value:e.widthFactor??1,isRelative:!0},u.align=r,u.paragraph.align=s;const d=new KVe(n,this.styleManager,this.fontManager,c),h=new WVe(e.text,u,{resetParagraphParameters:!0,yieldPropertyCommands:!0}).parse();return{object:d.processText(h),height:d.totalHeight}}calculateAnchorPoint(e,n,i,s){let r=0,o=0;switch(i){case void 0:case 1:r=0,o=0;break;case 2:r-=e/2,o=0;break;case 3:r-=e,o=0;break;case 4:r=0,o+=n/2;break;case 5:r-=e/2,o+=n/2;break;case 6:r-=e,o+=n/2;break;case 7:r=0,o+=n;break;case 8:r-=e/2,o+=n;break;case 9:r-=e,o+=n;break}return s==xy.BOTTOM_TO_TOP&&(o-=n),{x:r,y:o}}getBoxes(e,n){if(e.updateWorldMatrix(!1,!1),e instanceof L2||e instanceof xr){const s=e.geometry;s.boundingBox===null&&s.computeBoundingBox();const r=new Gs().copy(s.boundingBox);r.applyMatrix4(e.matrixWorld),n.push(r)}const i=e.children;for(let s=0,r=i.length;s{if(n.geometry&&typeof n.geometry.dispose=="function")try{n.geometry.dispose()}catch{}if(n.material){const i=s=>{if(s&&typeof s.dispose=="function")try{s.dispose()}catch{}};Array.isArray(n.material)?n.material.forEach(i):i(n.material)}})}getFontName(e){if(e){const n=e.lastIndexOf(".");return n>=0?e.substring(0,n).toLowerCase():e.toLowerCase()}}},Qj=class{constructor(){this.lineBasicMaterials={},this.meshBasicMaterials={},this.unsupportedTextStyles={}}getMeshBasicMaterial(e){const n=this.buildKey(e);return this.meshBasicMaterials[n]||(this.meshBasicMaterials[n]=new v1({color:e.color})),this.meshBasicMaterials[n]}getLineBasicMaterial(e){const n=this.buildKey(e);return this.lineBasicMaterials[n]||(this.lineBasicMaterials[n]=new iS({color:e.color})),this.lineBasicMaterials[n]}buildKey(e){return e.isByLayer&&e.layer?`layer_${e.layer}_${e.color}`:`entity_${e.color}`}};class qVe{constructor(e={}){this.workers=[],this.inFlightPerWorker=[],this.pendingRequests=new Map,this.requestId=0,this.readyPromise=null,this.poolSize=e.poolSize??Math.max(1,navigator.hardwareConcurrency?Math.min(4,navigator.hardwareConcurrency):2),this.defaultStyleManager=new Qj;const n=e.workerUrl??"./mtext-renderer-worker.js";this.timeOut=e.timeOut??12e4;for(let i=0;i{this.handleWorkerMessage(i.data,n)},e.onerror=i=>{console.error(`Worker ${n} error:`,i);const s=[];this.pendingRequests.forEach((r,o)=>{r.workerIndex===n&&s.push(o)}),s.forEach(r=>{const o=this.pendingRequests.get(r);o&&(o.reject(new Error("Worker error occurred")),this.pendingRequests.delete(r))}),this.inFlightPerWorker[n]=0}}pickLeastLoadedWorker(){let e=0,n=this.inFlightPerWorker[0]??0;for(let i=1;ithis.sendMessageToOneWorker(e,i)))}sendMessageToOneWorker(e,n){const i=n??this.pickLeastLoadedWorker(),s=this.workers[i];return new Promise((r,o)=>{const a=`req_${++this.requestId}`,l={...e,id:a};this.pendingRequests.set(a,{resolve:c=>r(c),reject:o,workerIndex:i}),this.inFlightPerWorker[i]=(this.inFlightPerWorker[i]??0)+1,s.postMessage(l),setTimeout(()=>{this.pendingRequests.get(a)&&(this.pendingRequests.delete(a),this.inFlightPerWorker[i]=Math.max(0,this.inFlightPerWorker[i]-1),o(new Error("Worker request timeout")))},this.timeOut)})}ensureTasksFinished(){return this.readyPromise?this.readyPromise:this.workers.length===0?Promise.resolve():(this.readyPromise=Promise.all(this.workers.map((e,n)=>new Promise((i,s)=>{const r=`req_${++this.requestId}`;this.pendingRequests.set(r,{resolve:()=>i(),reject:s,workerIndex:n}),this.inFlightPerWorker[n]=(this.inFlightPerWorker[n]??0)+1,e.postMessage({type:"getAvailableFonts",id:r}),setTimeout(()=>{this.pendingRequests.get(r)&&(this.pendingRequests.delete(r),this.inFlightPerWorker[n]=Math.max(0,this.inFlightPerWorker[n]-1),s(new Error("Worker init timeout")))},this.timeOut)}))).then(()=>{}),this.readyPromise)}async setFontUrl(e){await this.sendMessageToAllWorkers({type:"setFontUrl",data:{url:e}})}async asyncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215}){await this.ensureInitialized();const s=await this.sendMessageToOneWorker({type:"render",data:{mtextContent:e,textStyle:n,colorSettings:i}});return this.reconstructMText(s,n)}syncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215}){throw new Error("Fuction 'syncRenderMText' isn't supported in 'WebWorkerRenderer'!")}async loadFonts(e){await this.ensureTasksFinished();const n=await this.sendMessageToAllWorkers({type:"loadFonts",data:{fonts:e}}),i=new Set;return n.forEach(s=>{var r;return(r=s?.loaded)==null?void 0:r.forEach(o=>i.add(o))}),{loaded:Array.from(i)}}async getAvailableFonts(){return(await this.sendMessageToAllWorkers({type:"getAvailableFonts"}))[0]??{fonts:[]}}reconstructMText(e,n){const i=new sl;return e.children.forEach(s=>{const r=new es;if(Object.keys(s.geometry.attributes).forEach(l=>{const c=s.geometry.attributes[l],u=new Float32Array(c.arrayBuffer,c.byteOffset,c.length),d=new us(u,c.itemSize,c.normalized);r.setAttribute(l,d)}),s.geometry.index)if(s.geometry.index.componentType==="uint32"){const l=new Uint32Array(s.geometry.index.arrayBuffer,s.geometry.index.byteOffset,s.geometry.index.length);r.setIndex(new iP(l,1))}else{const l=new Uint16Array(s.geometry.index.arrayBuffer,s.geometry.index.byteOffset,s.geometry.index.length);r.setIndex(new nS(l,1))}let o;s.type==="mesh"?(o=this.defaultStyleManager.getMeshBasicMaterial({layer:n.layer,isByLayer:n.isByLayer,color:s.material.color}),s.material.transparent!==void 0&&(o.transparent=s.material.transparent),s.material.opacity!==void 0&&(o.opacity=s.material.opacity),s.material.side!==void 0&&(o.side=s.material.side)):(o=this.defaultStyleManager.getLineBasicMaterial({layer:n.layer,isByLayer:n.isByLayer,color:s.material.color}),s.material.transparent!==void 0&&(o.transparent=s.material.transparent),s.material.opacity!==void 0&&(o.opacity=s.material.opacity),s.material.linewidth!==void 0&&(o.linewidth=s.material.linewidth));let a;s.type==="mesh"?a=new xr(r,o):a=new Zc(r,o),r.boundingBox||r.computeBoundingBox(),r.boundingSphere||r.computeBoundingSphere(),a.position.set(s.position.x,s.position.y,s.position.z),a.quaternion.set(s.rotation.x,s.rotation.y,s.rotation.z,s.rotation.w),a.scale.set(s.scale.x,s.scale.y,s.scale.z),i.add(a)}),i.box=new Gs(new ct(e.box.min.x,e.box.min.y,e.box.min.z),new ct(e.box.max.x,e.box.max.y,e.box.max.z)),i}terminate(){this.workers.forEach(e=>e.terminate()),this.workers=[],this.inFlightPerWorker=[],this.readyPromise=null,this.pendingRequests.forEach(({reject:e})=>{e(new Error("Renderer terminated"))}),this.pendingRequests.clear()}destroy(){this.terminate()}}class YVe{constructor(){this.fontManager=$u.instance,this.defaultStyleManager=new Qj,this.isInitialized=!1}get styleManager(){return this.defaultStyleManager}set styleManager(e){this.defaultStyleManager=e}async setFontUrl(e){this.fontManager.baseUrl=e}async asyncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215}){await this.ensureInitialized();const s=new kD(e,n,this.defaultStyleManager,this.fontManager,i);return await s.asyncDraw(),s.updateMatrixWorld(!0),s}syncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215}){const s=new kD(e,n,this.defaultStyleManager,this.fontManager,i);return s.syncDraw(),s.updateMatrixWorld(!0),s}async loadFonts(e){return await this.fontManager.loadFontsByNames(e),{loaded:e}}async getAvailableFonts(){return{fonts:await this.fontManager.getAvailableFonts()}}destroy(){}async ensureInitialized(){this.isInitialized||(await this.loadFonts([$u.instance.defaultFont]),this.isInitialized=!0)}}class XVe{constructor(e="main",n={}){this.defaultMode=e,this.mainThreadRenderer=new YVe,this.webWorkerRenderer=new qVe(n),this.renderer=this.mainThreadRenderer,e==="worker"&&(this.renderer=this.webWorkerRenderer)}setStyleManager(e){this.renderer.styleManager=e}setDefaultMode(e){this.defaultMode!==e&&(this.defaultMode=e,e==="worker"?this.renderer=this.webWorkerRenderer:this.renderer=this.mainThreadRenderer)}setFontUrl(e){return this.renderer.setFontUrl(e)}getDefaultMode(){return this.defaultMode}async asyncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215},s){return s?(s==="worker"?this.webWorkerRenderer:this.mainThreadRenderer).asyncRenderMText(e,n,i):this.renderer.asyncRenderMText(e,n,i)}syncRenderMText(e,n,i={byLayerColor:16777215,byBlockColor:16777215}){return this.mainThreadRenderer.syncRenderMText(e,n,i)}async loadFonts(e){return this.renderer.loadFonts(e)}async getAvailableFonts(){return this.renderer.getAvailableFonts()}destroy(){this.webWorkerRenderer&&this.webWorkerRenderer.terminate(),this.mainThreadRenderer.destroy()}}var $o;(function(t){t[t.BeforeStart=0]="BeforeStart",t[t.EqualStart=1]="EqualStart",t[t.BetweenStartAndEnd=2]="BetweenStartAndEnd",t[t.EqualEnd=3]="EqualEnd",t[t.AfterEnd=4]="AfterEnd"})($o||($o={}));class ZVe{pointsSame(e,n){return this.pointsSameX(e,n)&&this.pointsSameY(e,n)}pointsCompare(e,n){return this.pointsSameX(e,n)?this.pointsSameY(e,n)?0:e[1]=-this.epsilon}pointBetween(e,n,i){const s=e[1]-n[1],r=i[0]-n[0],o=e[0]-n[0],a=i[1]-n[1],l=o*r+s*a;if(l-this.epsilon)}pointsSameX(e,n){return Math.abs(e[0]-n[0])b<=-this.epsilon?$o.BeforeStart:b=0&&this.nodes.splice(n,1)}getIndex(e){return this.nodes.indexOf(e)}isEmpty(){return this.nodes.length<=0}getHead(){return this.nodes[0]}removeHead(){this.nodes.shift()}insertBefore(e,n){this.findTransition(e,n).insert(e)}findTransition(e,n){var i,s;const r=(l,c)=>n(c)-n(l);let o=0,a=this.nodes.length;for(;o>1;r(this.nodes[l],e)>0?a=l:o=l+1}return{before:o<=0?null:(i=this.nodes[o-1])!==null&&i!==void 0?i:null,after:(s=this.nodes[o])!==null&&s!==void 0?s:null,insert:l=>(this.nodes.splice(o,0,l),l)}}},Qm=class{constructor(e,n,i,s){var r;this.otherFill=null,this.id=(r=s?.segmentId())!==null&&r!==void 0?r:-1,this.start=e,this.end=n,this.myFill={above:i?i.myFill.above:null,below:i?i.myFill.below:null}}},LD=class{constructor(e,n,i,s){this.status=null,this.isStart=e,this.p=n,this.seg=i,this.primary=s}},ID=class{constructor(e,n,i=null){this.events=new PD,this.status=new PD,this.selfIntersection=e,this.geo=n,this.log=i}compareEvents(e,n,i,s,r,o){const a=this.geo.pointsCompare(n,r);return a!==0?a:this.geo.pointsSame(i,o)?0:e!==s?e?1:-1:this.geo.pointAboveOrOnLine(i,s?r:o,s?o:r)?1:-1}addEvent(e){this.events.insertBefore(e,n=>n===e?0:this.compareEvents(e.isStart,e.p,e.other.p,n.isStart,n.p,n.other.p))}divideEvent(e,n){var i;const s=new Qm(n,e.seg.end,e.seg,this.log);return(i=this.log)===null||i===void 0||i.segmentChop(e.seg,n),this.events.remove(e.other),e.seg.end=n,e.other.p=n,this.addEvent(e.other),this.addSegment(s,e.primary)}newSegment(e,n){const i=this.geo.pointsCompare(e,n);return i===0?null:i<0?new Qm(e,n,null,this.log):new Qm(n,e,null,this.log)}addSegment(e,n){const i=new LD(!0,e.start,e,n),s=new LD(!1,e.end,e,n);return i.other=s,s.other=i,this.addEvent(i),this.addEvent(s),i}addRegion(e){let n,i=e[e.length-1];for(let s=0;sn===e?0:-this.compareStatus(e,n))}checkIntersection(e,n){var i;const s=e.seg,r=n.seg,o=s.start,a=s.end,l=r.start,c=r.end;(i=this.log)===null||i===void 0||i.checkIntersection(s,r);const u=this.geo.linesIntersect(o,a,l,c);if(u===null){if(!this.geo.pointsCollinear(o,a,l)||this.geo.pointsSame(o,c)||this.geo.pointsSame(a,l))return null;const d=this.geo.pointsSame(o,l),h=this.geo.pointsSame(a,c);if(d&&h)return n;const f=!d&&this.geo.pointBetween(o,l,c),p=!h&&this.geo.pointBetween(a,l,c);if(d)return p?this.divideEvent(n,a):this.divideEvent(e,c),n;f&&(h||(p?this.divideEvent(n,a):this.divideEvent(e,c)),this.divideEvent(n,o))}else u.alongA===$o.BetweenStartAndEnd&&(u.alongB===$o.EqualStart?this.divideEvent(e,l):u.alongB===$o.BetweenStartAndEnd?this.divideEvent(e,u.p):u.alongB===$o.EqualEnd&&this.divideEvent(e,c)),u.alongB===$o.BetweenStartAndEnd&&(u.alongA===$o.EqualStart?this.divideEvent(n,o):u.alongA===$o.BetweenStartAndEnd?this.divideEvent(n,u.p):u.alongA===$o.EqualEnd&&this.divideEvent(n,a));return null}calculate(e,n){var i,s,r,o,a,l,c,u;const d=[];for(;!this.events.isEmpty();){const h=this.events.getHead();if((i=this.log)===null||i===void 0||i.vert(h.p[0]),h.isStart){(s=this.log)===null||s===void 0||s.segmentNew(h.seg,h.primary);const f=this.statusFindSurrounding(h),p=f.before,m=f.after;(r=this.log)===null||r===void 0||r.tempStatus(h.seg,p?p.seg:!1,m?m.seg:!1);const b=(()=>{if(p){const g=this.checkIntersection(h,p);if(g)return g}return m?this.checkIntersection(h,m):null})();if(b){if(this.selfIntersection){let g;h.seg.myFill.below===null?g=!0:g=h.seg.myFill.above!==h.seg.myFill.below,g&&(b.seg.myFill.above=!b.seg.myFill.above)}else b.seg.otherFill=h.seg.myFill;(o=this.log)===null||o===void 0||o.segmentUpdate(b.seg),this.events.remove(h.other),this.events.remove(h)}if(this.events.getHead()!==h){(a=this.log)===null||a===void 0||a.rewind(h.seg);continue}if(this.selfIntersection){let g;h.seg.myFill.below===null?g=!0:g=h.seg.myFill.above!==h.seg.myFill.below,m?h.seg.myFill.below=m.seg.myFill.above:h.seg.myFill.below=e,g?h.seg.myFill.above=!h.seg.myFill.below:h.seg.myFill.above=h.seg.myFill.below}else if(h.seg.otherFill===null){let g;if(!m)g=h.primary?n:e;else if(h.primary===m.primary){if(m.seg.otherFill===null)throw new Error("otherFill is null");g=m.seg.otherFill.above}else g=m.seg.myFill.above;h.seg.otherFill={above:g,below:g}}(l=this.log)===null||l===void 0||l.status(h.seg,p?p.seg:!1,m?m.seg:!1),h.other.status=f.insert(h)}else{const f=h.status;if(f===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");const p=this.status.getIndex(f);if(p>0&&p{const s=new es;s.setAttribute("position",new us(n.position,3)),s.setIndex(new us(n.indices,1)),e.set(i,s)}),e}}const RD=new ps,Dv=new ct,y_=new ct,b_=new ct;let nK=class q3{static release(e){e.index=null,e.attributes={}}static toNonIndexed(e){if(!e.index)return e;const n=new es,i=e.index;for(const s in e.attributes)n.setAttribute(s,q3.createGeometryAttributeByIndex(e.attributes[s],i));return n}static createGeometryAttributeByIndex(e,n){const i=n.count,s=e.itemSize,r=e.array.constructor,o=new r(i*s);for(let a=0;a{const i=e.attributes[n];if(i instanceof hy){const s=i.clone();e.attributes[n]=s}})}static createBufferGeometryByPoints(e){const n=new es,i=new Float32Array(e.length*3),s=new Uint16Array((e.length-1)*2);return e.forEach((r,o)=>{let a=o*3;i[a]=r.x,i[a+1]=r.y,i[a+2]=r.z,o>0&&(a=(o-1)*2,s[a]=o-1,s[a+1]=o)}),n.setAttribute("position",new Qr(i,3)),n.setIndex(new nS(s,1)),n}static computeLineDistance(e){const n=e.isLineSegments===!0;let i=e.geometry;const s=e.matrixWorld;if(i.index&&(i=q3.toNonIndexed(i)),i.index===null){const r=i.attributes.position;if(!r||r.count===0)return;const o=[];if(n)for(let a=0,l=r.count;a{let i=n;i.isLine&&i.material instanceof Yl&&this.computeLineDistance(i)})}static apply2dTransform(e,n,i=0,s=1){const r=e.attributes.position,o=r.itemSize,a=r.array;if(i!=0){const l=Math.cos(i),c=Math.sin(i);for(let u=0;uo+a,0);if(r==="object"){let o=0;for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&(o+=a.length*2,o+=i(s[a]));return o}return 0}return i(e)}static getFileName(e){return e.split("/").pop()}static getFileNameWithoutExtension(e){const n=iK.getFileName(e);if(n){const i=n.lastIndexOf(".");return i===-1?n:n.substring(0,i)}return e}};class Y3{static createDefaultTraits(){return{color:new Er,rgbColor:16777215,lineType:{type:"ByLayer",name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0},lineTypeScale:1,lineWeight:ep.ByLayer,fillType:{solidFill:!0,patternAngle:0,patternLines:[]},transparency:new Jf,thickness:0,layer:"0"}}static createTraitsForMText(e){const n=new Er;return e.isByLayer||n.setRGBValue(e.color),{color:n,rgbColor:e.color,lineType:{type:"ByLayer",name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0},lineTypeScale:1,lineWeight:ep.ByLayer,fillType:{solidFill:!0,patternAngle:0,patternLines:[]},transparency:new Jf,thickness:0,layer:e.layer??"0"}}}const tHe=new Wi(583902);class $2{static cloneMaterial(e){if(!e)return e;if(Array.isArray(e)){const n=[];return e.forEach(i=>{n.push(i.clone())}),n}return e.clone()}static setMaterialColor(e,n=tHe){if(Array.isArray(e)){e.forEach(i=>this.setMaterialColor(i,n));return}this.hasColorProperty(e)&&(e.color.set(n),this.hasEmissiveProperty(e)&&e.emissive.set(n)),this.hasUniformsProperty(e)&&e.uniforms.u_color&&e.uniforms.u_color.value.set(n)}static hasColorProperty(e){return"color"in e&&e.color instanceof Wi}static hasEmissiveProperty(e){return"emissive"in e&&e.emissive instanceof Wi}static hasUniformsProperty(e){return"uniforms"in e&&e.uniforms!==void 0}}function RP(t,e){return t-e}function OP(t,e,n=0){const i=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){const s=t.count;for(let r=0;r0&&(n=IP.estimateObjectSize(this._geometryInfo[0])),{count:e,size:e*n}}_initializeGeometry(e){const n=this.geometry,i=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const r in e.attributes){const o=e.getAttribute(r),{array:a,itemSize:l,normalized:c}=o,u=new a.constructor(i*l),d=new us(u,l,c);n.setAttribute(r,d)}if(e.getIndex()!==null){const r=i>65535?new Uint32Array(s):new Uint16Array(s);n.setIndex(new us(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('AcTrBatchedLine: All geometries must consistently have "index".');for(const i in n.attributes){if(!e.hasAttribute(i))throw new Error(`AcTrBatchedLine: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=n.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("AcTrBatchedLine: All attributes must have a consistent itemSize and normalized value.")}}_resizeSpaceIfNeeded(e){const n=e.getIndex(),i=n!==null;let s=this._maxIndexCount;i&&this.unusedIndexCountthis._maxIndexCount||o>this._maxVertexCount)&&this.setGeometrySize(o,s)}validateGeometryId(e){const n=this._geometryInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`AcTrBatchedLine: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}reset(){this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._geometryInfo.length=0,this._geometryInitialized=!1,this.geometry.dispose()}getUserData(){const e=[];return this._geometryInfo.forEach(n=>{e.push({position:n.position,objectId:n.objectId,bboxIntersectionCheck:n.bboxIntersectionCheck})}),e}resetGeometry(e){const n=this.getUserData();this.reset();const i=ch.instance;n.forEach(s=>{if(s.position){const r=i.create(e,s.position);if(r.line){const o=this.addGeometry(r.line);this.setGeometryInfo(o,s)}}})}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Gs);const e=this.boundingBox,n=this._geometryInfo;e.makeEmpty();for(let i=0,s=n.length;ithis._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("AcTrBatchedLine: Reserved space request exceeds the maximum buffer size.");let a;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(RP),a=this._availableGeometryIds.shift(),r[a]=s):(a=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(a,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,a}setGeometryInfo(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");const i=this._geometryInfo[e],s=n.position;s&&(i.position={...s}),i.objectId=n.objectId,i.bboxIntersectionCheck=n.bboxIntersectionCheck}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");this._validateGeometry(n);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=n.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("AcTrBatchedLine: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in i.attributes){const d=n.getAttribute(u),h=i.getAttribute(u);OP(d,h,l);const f=d.itemSize;for(let p=d.count,m=c;p=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableGeometryIds.push(e),this)}optimize(){let e=0,n=0;const i=this._geometryInfo,s=i.map((o,a)=>a).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Gs,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new ga;this.getBoundingBoxAt(e,OD),OD.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;c({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this}dispose(){return this.geometry.dispose(),this}}const DD=new Gs,mm=new ct,gm=new xr,w_=[];class iHe extends xr{constructor(e=1e3,n=e*2,i){super(new es,i),this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextIndexStart=0,this._nextVertexStart=0,this._geometryCount=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxVertexCount=e,this._maxIndexCount=n}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get unusedIndexCount(){return this._maxIndexCount-this._nextIndexStart}get mappingStats(){const e=this._geometryInfo.length;let n=0;return e>0&&(n=IP.estimateObjectSize(this._geometryInfo[0])),{count:e,size:e*n}}_initializeGeometry(e){const n=this.geometry,i=this._maxVertexCount,s=this._maxIndexCount;if(this._geometryInitialized===!1){for(const r in e.attributes){const o=e.getAttribute(r),{array:a,itemSize:l,normalized:c}=o,u=new a.constructor(i*l),d=new us(u,l,c);n.setAttribute(r,d)}if(e.getIndex()!==null){const r=i>65535?new Uint32Array(s):new Uint16Array(s);n.setIndex(new us(r,1))}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;if(!!e.getIndex()!=!!n.getIndex())throw new Error('AcTrBatchedMesh: All geometries must consistently have "index".');for(const i in n.attributes){if(!e.hasAttribute(i))throw new Error(`AcTrBatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=n.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("AcTrBatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}_resizeSpaceIfNeeded(e){const n=e.getIndex(),i=n!==null;let s=this._maxIndexCount;i&&this.unusedIndexCountthis._maxIndexCount||o>this._maxVertexCount)&&this.setGeometrySize(o,s)}validateGeometryId(e){const n=this._geometryInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`AcTrBatchedMesh: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Gs);const e=this.boundingBox,n=this._geometryInfo;e.makeEmpty();for(let i=0,s=n.length;ithis._maxIndexCount||s.vertexStart+s.reservedVertexCount>this._maxVertexCount)throw new Error("AcTrBatchedMesh: Reserved space request exceeds the maximum buffer size.");let a;return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(RP),a=this._availableGeometryIds.shift(),r[a]=s):(a=this._geometryCount,this._geometryCount++,r.push(s)),this.setGeometryAt(a,e),this._nextIndexStart=s.indexStart+s.reservedIndexCount,this._nextVertexStart=s.vertexStart+s.reservedVertexCount,a}setGeometryInfo(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedMesh: Maximum geometry count reached.");const i=this._geometryInfo[e];i.objectId=n.objectId,i.bboxIntersectionCheck=n.bboxIntersectionCheck}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedMesh: Maximum geometry count reached.");this._validateGeometry(n);const i=this.geometry,s=i.getIndex()!==null,r=i.getIndex(),o=n.getIndex(),a=this._geometryInfo[e];if(s&&o.count>a.reservedIndexCount||n.attributes.position.count>a.reservedVertexCount)throw new Error("AcTrBatchedMesh: Reserved space not large enough for provided geometry.");const l=a.vertexStart,c=a.reservedVertexCount;a.vertexCount=n.getAttribute("position").count;for(const u in i.attributes){const d=n.getAttribute(u),h=i.getAttribute(u);OP(d,h,l);const f=d.itemSize;for(let p=d.count,m=c;p=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableGeometryIds.push(e),this)}optimize(){let e=0,n=0;const i=this._geometryInfo,s=i.map((o,a)=>a).sort((o,a)=>i[o].vertexStart-i[a].vertexStart),r=this.geometry;for(let o=0,a=i.length;o=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Gs,o=i.index,a=i.attributes.position;for(let l=s.start,c=s.start+s.count;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new ga;this.getBoundingBoxAt(e,DD),DD.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.start,u=s.start+s.count;c({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this}dispose(){return this.geometry.dispose(),this}}const ND=new Gs,vm=new ct,ym=new ip,x_=[];class sHe extends ip{constructor(e=1e3,n){super(new es,n),this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextVertexStart=0,this._geometryCount=0,this._geometryInitialized=!1,this.frustumCulled=!1,this._maxVertexCount=e}get geometryCount(){return this._geometryCount}get unusedVertexCount(){return this._maxVertexCount-this._nextVertexStart}get mappingStats(){const e=this._geometryInfo.length;let n=0;return e>0&&(n=IP.estimateObjectSize(this._geometryInfo[0])),{count:e,size:e*n}}_initializeGeometry(e){const n=this.geometry,i=this._maxVertexCount;if(this._geometryInitialized===!1){for(const s in e.attributes){const r=e.getAttribute(s),{array:o,itemSize:a,normalized:l}=r,c=new o.constructor(i*a),u=new us(c,a,l);n.setAttribute(s,u)}this._geometryInitialized=!0}}_validateGeometry(e){const n=this.geometry;for(const i in n.attributes){if(!e.hasAttribute(i))throw new Error(`AcTrBatchedLine: Added geometry missing "${i}". All geometries must have consistent attributes.`);const s=e.getAttribute(i),r=n.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw new Error("AcTrBatchedLine: All attributes must have a consistent itemSize and normalized value.")}}_resizeSpaceIfNeeded(e){const n=e.getAttribute("position");let i=this._maxVertexCount;n&&this.unusedVertexCountthis._maxVertexCount&&this.setGeometrySize(i)}validateGeometryId(e){const n=this._geometryInfo;if(e<0||e>=n.length||n[e].active===!1)throw new Error(`AcTrBatchedLine: Invalid geometryId ${e}. Geometry is either out of range or has been deleted.`)}reset(){this.boundingBox=null,this.boundingSphere=null,this._geometryInfo=[],this._availableGeometryIds=[],this._nextVertexStart=0,this._geometryCount=0,this._geometryInfo.length=0,this._geometryInitialized=!1,this.geometry.dispose()}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Gs);const e=this.boundingBox,n=this._geometryInfo;e.makeEmpty();for(let i=0,s=n.length;i0?(this._availableGeometryIds.sort(RP),r=this._availableGeometryIds.shift(),s[r]=i):(r=this._geometryCount,this._geometryCount++,s.push(i)),this.setGeometryAt(r,e),this._nextVertexStart=i.vertexStart+i.reservedVertexCount,this.geometry.setDrawRange(0,this._nextVertexStart),r}setGeometryInfo(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");const i=this._geometryInfo[e],s=n.position;s&&(i.position={...s}),i.objectId=n.objectId,i.bboxIntersectionCheck=n.bboxIntersectionCheck}setGeometryAt(e,n){if(e>=this._geometryCount)throw new Error("AcTrBatchedLine: Maximum geometry count reached.");this._validateGeometry(n);const i=this.geometry,s=this._geometryInfo[e],r=s.vertexStart,o=s.reservedVertexCount;s.vertexCount=n.getAttribute("position").count;for(const a in i.attributes){const l=n.getAttribute(a),c=i.getAttribute(a);OP(l,c,r);const u=l.itemSize;for(let d=l.count,h=o;d=n.length||n[e].active===!1?this:(n[e].active=!1,this._availableGeometryIds.push(e),this)}optimize(){let e=0;const n=this._geometryInfo,i=n.map((r,o)=>o).sort((r,o)=>n[r].vertexStart-n[o].vertexStart),s=this.geometry;for(let r=0,o=n.length;r=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingBox===null){const r=new Gs,o=i.index,a=i.attributes.position;for(let l=s.vertexStart,c=s.vertexStart+s.vertexCount;l=this._geometryCount)return null;const i=this.geometry,s=this._geometryInfo[e];if(s.boundingSphere===null){const r=new ga;this.getBoundingBoxAt(e,ND),ND.getCenter(r.center);const o=i.index,a=i.attributes.position;let l=0;for(let c=s.vertexStart,u=s.vertexStart+s.vertexCount;c({...n,boundingBox:n.boundingBox!==null?n.boundingBox.clone():null,boundingSphere:n.boundingSphere!==null?n.boundingSphere.clone():null})),this._maxVertexCount=e._maxVertexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this}dispose(){return this.geometry.dispose(),this}}class rHe extends sl{constructor(){super(),this._pointBatches=new Map,this._pointSymbolBatches=new Map,this._lineBatches=new Map,this._lineWithIndexBatches=new Map,this._meshBatches=new Map,this._meshWithIndexBatches=new Map,this._entitiesMap=new Map,this._selectedObjects=new sl,this._hoverObjects=new sl,this.add(this._selectedObjects),this.add(this._hoverObjects)}get entityCount(){return this._entitiesMap.size}get stats(){const e={summary:{entityCount:this._entitiesMap.size,totalGeometrySize:0,totalMappingSize:0},mesh:{indexed:{count:this._meshWithIndexBatches.size,geometrySize:this.getBatchedGeometrySize(this._meshWithIndexBatches),mappingSize:this.getBatchedGeometryMappingSize(this._meshWithIndexBatches)},nonIndexed:{count:this._meshBatches.size,geometrySize:this.getBatchedGeometrySize(this._meshBatches),mappingSize:this.getBatchedGeometryMappingSize(this._meshBatches)}},line:{indexed:{count:this._lineWithIndexBatches.size,geometrySize:this.getBatchedGeometrySize(this._lineWithIndexBatches),mappingSize:this.getBatchedGeometryMappingSize(this._lineWithIndexBatches)},nonIndexed:{count:this._lineBatches.size,geometrySize:this.getBatchedGeometrySize(this._lineBatches),mappingSize:this.getBatchedGeometryMappingSize(this._lineBatches)}},point:{indexed:{count:this._pointSymbolBatches.size,geometrySize:this.getBatchedGeometrySize(this._pointSymbolBatches),mappingSize:this.getBatchedGeometryMappingSize(this._pointSymbolBatches)},nonIndexed:{count:this._pointBatches.size,geometrySize:this.getBatchedGeometrySize(this._pointBatches),mappingSize:this.getBatchedGeometryMappingSize(this._pointBatches)}}};return e.summary.totalGeometrySize=e.line.indexed.geometrySize+e.line.nonIndexed.geometrySize+e.mesh.indexed.geometrySize+e.mesh.nonIndexed.geometrySize+e.point.indexed.geometrySize+e.point.nonIndexed.geometrySize,e.summary.totalMappingSize=e.line.indexed.mappingSize+e.line.nonIndexed.mappingSize+e.mesh.indexed.mappingSize+e.mesh.nonIndexed.mappingSize+e.point.indexed.mappingSize+e.point.nonIndexed.mappingSize,e}rerenderPoints(e){const n=ch.instance.create(e);n.line&&this._pointSymbolBatches.forEach(s=>{s.resetGeometry(e)});const i=n.point!=null;this._pointBatches.forEach(s=>{s.visible=i})}clear(){return this.groups.forEach(e=>{e.forEach(n=>{n.dispose()}),e.clear()}),this}updateMaterial(e,n){this.groups.forEach(i=>{const s=i.get(e);s&&(s.material=n,i.set(n.id,s))})}hasEntity(e){return this._entitiesMap.has(e)}addEntity(e){const n=[];this._entitiesMap.set(e.objectId,n),e.updateMatrixWorld(!0),e.traverse(i=>{const s=!!i.userData.bboxIntersectionCheck;i instanceof Zc?n.push(this.addLine(i,{position:i.userData.position,objectId:e.objectId,bboxIntersectionCheck:s})):i instanceof xr?n.push(this.addMesh(i,{objectId:e.objectId,bboxIntersectionCheck:s})):i instanceof ip&&n.push(this.addPoint(i,{objectId:e.objectId,bboxIntersectionCheck:s}))})}isIntersectWith(e,n){const i=this._entitiesMap.get(e);if(i){const s=[];for(let r=0,o=i.length;r0)return!0}}return!1}hover(e){this.highlight(e,this._hoverObjects)}unhover(e){this.unhighlight(e,this._hoverObjects)}select(e){this.highlight(e,this._selectedObjects)}unselect(e){this.unhighlight(e,this._selectedObjects)}get groups(){return[this._lineBatches,this._lineWithIndexBatches,this._meshBatches,this._meshWithIndexBatches,this._pointBatches,this._pointSymbolBatches]}highlight(e,n){const i=this._entitiesMap.get(e);i&&i.forEach(s=>{const r=this.getObjectById(s.batchedObjectId).getObjectAt(s.batchId),o=$2.cloneMaterial(r.material);$2.setMaterialColor(o),r.material=o,r.userData.objectId=e,n.add(r)})}unhighlight(e,n){const i=[];n.children.forEach(s=>{s.userData.objectId===e&&i.push(s)}),n.remove(...i)}addLine(e,n){const i=e.material,s=this.getMatchedLineBatches(e);let r=s.get(i.id);r==null&&(r=new nHe(1e3,2e3,i),s.set(i.id,r),this.add(r)),e.geometry.applyMatrix4(e.matrixWorld);const o=r.addGeometry(e.geometry);return r.setGeometryInfo(o,n),{batchedObjectId:r.id,batchId:o}}addMesh(e,n){const i=e.material,s=this.getMatchedMeshBatches(e);let r=s.get(i.id);r==null&&(r=new iHe(1e3,2e3,i),s.set(i.id,r),this.add(r)),e.geometry.applyMatrix4(e.matrixWorld);const o=r.addGeometry(e.geometry);return r.setGeometryInfo(o,n),{batchedObjectId:r.id,batchId:o}}addPoint(e,n){const i=e.material;let s=this._pointBatches.get(i.id);s==null&&(s=new sHe(100,i),s.visible=e.visible,this._pointBatches.set(i.id,s),this.add(s)),e.geometry.applyMatrix4(e.matrixWorld);const r=s.addGeometry(e.geometry);return s.setGeometryInfo(r,n),{batchedObjectId:s.id,batchId:r}}getMatchedLineBatches(e){if(e.userData.isPoint)return this._pointSymbolBatches;{const n=e.geometry.getIndex()!==null;let i=this._lineBatches;return n&&(i=this._lineWithIndexBatches),i}}getMatchedMeshBatches(e){const n=e.geometry.getIndex()!==null;let i=this._meshBatches;return n&&(i=this._meshWithIndexBatches),i}getBatchedGeometrySize(e){let n=0;return e.forEach(i=>{n+=this.getGeometrySize(i)}),n}getBatchedGeometryMappingSize(e){let n=0;return e.forEach(i=>{n+=i.mappingStats.size}),n}getGeometrySize(e){let n=0;if("geometry"in e){const i=e.geometry;i.attributes.position&&(n+=i.attributes.position.array.byteLength),i.attributes.normal&&(n+=i.attributes.normal.array.byteLength),i.attributes.uv&&(n+=i.attributes.uv.array.byteLength),i.index&&(n+=i.index.array.byteLength)}return n}}let sK=class extends Lr{constructor(e){super(),this._styleManager=e}get styleManager(){return this._styleManager}copy(e,n){return this._styleManager=e._styleManager,super.copy(e,n)}},Ql=class Lw extends sK{constructor(e){super(e),this._box=new Gs}get box(){return this._box}set box(e){this._box.copy(e)}get basePoint(){return this._basePoint}set basePoint(e){e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e)}get objectId(){return this.userData.objectId}set objectId(e){this.userData.objectId=e}get ownerId(){return this.userData.ownerId}set ownerId(e){this.userData.ownerId=e}get layerName(){return this.userData.layerName}set layerName(e){this.userData.layerName=e}static flattenObject(e){const n=[];function i(r){r.position.set(0,0,0),r.rotation.set(0,0,0),r.scale.set(1,1,1),r.matrix.identity()}function s(r,o){const a=[...r.children];for(const l of a)!l.userData.layerName&&r.userData.layerName&&(l.userData.layerName=r.userData.layerName),l.applyMatrix4(o),i(l),l.children.length>0?s(l,l.matrixWorld):n.push(l);r.children=[]}e.updateMatrixWorld(!0),s(e,e.matrixWorld);for(const r of n)"geometry"in r&&(r.geometry.applyMatrix4(r.matrixWorld),r.matrixWorld.identity(),r.matrixWorldNeedsUpdate=!1,e.add(r));i(e),e.matrixWorld.identity(),e.matrixWorldNeedsUpdate=!1}static disposeObject(e,n=!0){n&&e.removeFromParent(),(e instanceof xr||e instanceof L2||e instanceof ip)&&e.geometry&&e.geometry.dispose(),(e instanceof xr||e instanceof L2||e instanceof ip)&&(Array.isArray(e.material)?e.material:[e.material]).forEach(i=>{var s,r,o,a,l,c,u,d;i.dispose(),(s=i.map)==null||s.dispose(),(r=i.envMap)==null||r.dispose(),(o=i.lightMap)==null||o.dispose(),(a=i.bumpMap)==null||a.dispose(),(l=i.normalMap)==null||l.dispose(),(c=i.roughnessMap)==null||c.dispose(),(u=i.metalnessMap)==null||u.dispose(),(d=i.alphaMap)==null||d.dispose()}),e.children.forEach(i=>this.disposeObject(i)),"geometry"in e&&(e.geometry=null),"material"in e&&(e.material=null),e.children=[]}flatten(){Lw.flattenObject(this)}dispose(){Lw.disposeObject(this)}async draw(){}applyMatrix(e){const n=e.elements,i=new ps(n[0],n[4],n[8],n[12],n[1],n[5],n[9],n[13],n[2],n[6],n[10],n[14],n[3],n[7],n[11],n[15]);this.applyMatrix4(i),this.updateMatrixWorld(!0),this._box.applyMatrix4(i)}highlight(){this.highlightObject(this)}highlightObject(e){if("material"in e){const n=e.material;if(e.userData.originalMaterial==null){const i=$2.cloneMaterial(n);$2.setMaterialColor(i),e.userData.originalMaterial=e.material,e.material=i}}else e.children.length>0&&e.children.forEach(n=>{this.highlightObject(n)})}unhighlight(){this.unhighlightObject(this)}fastDeepClone(){const e=new Lw(this.styleManager);return e.copy(this,!1),this.copyGeometry(this,e),e}copy(e,n){return this.objectId=e.objectId,this.ownerId=e.ownerId,this.layerName=e.layerName,this.box=e.box,super.copy(e,n)}copyGeometry(e,n){for(let i=0;ii.dispose()):n instanceof Rh&&n.dispose()}else e.children.length>0&&e.children.forEach(n=>{this.unhighlightObject(n)})}createColorArray(e,n){const i=(e>>16&255)/256,s=(e>>8&255)/256,r=(e&255)/256,o=new Float32Array(n*3);for(let a=0,l=0;a{if(Array.isArray(r)){const o=new Ql(n);this.add(o),this.box.union(o.box)}else this.add(r),this.box.union(r.box)}),this.flatten();let i=!1;const s=this.children;for(let r=0;rd%3===0)),r=Math.max(...n.filter((u,d)=>d%3===0)),o=Math.min(...n.filter((u,d)=>d%3===1)),a=Math.max(...n.filter((u,d)=>d%3===1)),l=r-s,c=a-o;for(let u=0;u65535?new Uint32Array(r*2):new Uint16Array(r*2);for(let u=0,d=0;u{i.userData.bboxIntersectionCheck=!0}),this.box=this._mtext.box}catch(n){console.log(`Failed to render mtext '${this._text.text}' with the following error: `,n)}}async draw(){const e=Ph.getInstance();if(e)try{const n=this._style;this._mtext=await e.asyncRenderMText(this._text,n,{byLayerColor:n.byLayerColor,byBlockColor:n.byBlockColor}).then(i=>{this._mtext=i,this.add(this._mtext),this.flatten(),this.traverse(s=>{s.userData.bboxIntersectionCheck=!0}),this.box=this._mtext.box})}catch(n){console.log(`Failed to render mtext '${this._text.text}' with the following error: `,n)}}raycast(e,n){var i;(i=this._mtext)==null||i.raycast(e,n)}}const hHe=new ct;class fHe extends Ql{constructor(e,n,i,s){super(s);const r=ch.instance.create(i.displayMode,e);this.isShowPoint=r.point!=null;const o=r.point??new es().setFromPoints([hHe.copy(e)]);o.computeBoundingBox(),o.boundingBox&&this.box.union(o.boundingBox);const a=this.styleManager.getPointsMaterial(n),l=new ip(o,a);if(l.userData.bboxIntersectionCheck=!0,l.visible=this.isShowPoint,this.add(l),r.line){const c=r.line;c.computeBoundingBox(),c.boundingBox&&this.box.union(c.boundingBox);const u=this.styleManager.getLineMaterial(n,!0),d=new Zc(c,u);d.userData.bboxIntersectionCheck=!0,d.userData.isPoint=!0,d.userData.position={x:e.x,y:e.y,z:e.z},this.add(d)}}}class pHe extends Ql{constructor(e,n,i){var s;super(i);const r=e.getPoints(100),o=e.buildHierarchy(),a=[];this.buildHatchGeometry(r,o,a);let l;if(a.length>0&&(l=cFe(a)),!l||!l.getIndex()||((s=l.getIndex())==null?void 0:s.count)===0)console.warn("Failed to convert hatch boundaries!");else{l.computeBoundingBox(),this.box=l.boundingBox;const c=this.styleManager.getFillMaterial(n);this.add(new xr(l,c))}}buildHatchGeometry(e,n,i){if(n.children.length===0)return;const s=[],r=new Map;n.children.forEach(l=>{l.children.length===0?s.push(l.index):r.set(l.index,l.children.map(c=>c.index))});const o=l=>{try{const c=new rp(l);c.hasAttribute("uv")&&c.deleteAttribute("uv"),c.hasAttribute("normal")&&c.deleteAttribute("normal"),i.push(c)}catch{console.warn(`Triangulate shape error: ${l.getPoints().map(c=>c.toArray()).toString()}`)}};s.forEach(l=>{const c=e[l];if(c.length===0)return;const u=new Yu(c);o(u)});const a=l=>l.map(c=>c.toArray());for(const l of r){const c=new Yu(e[l[0]]);let u={regions:[],inverted:!1};const d=this.findIntersectHole(e,l[1]);d.forEach(f=>{let p={segments:[],inverted:!1},m=1e-6;try{f.forEach((b,g)=>{m=Math.min(e[b][0].relativeEps(),1e-6);const x=new tK(new eK(m));if(g===0)p=x.segments({regions:[a(e[b])],inverted:!1});else{const S=x.segments({regions:[a(e[b])],inverted:!1}),_=x.combine(p,S);u=x.polygon(x.selectUnion(_)),u.regions.length>0?u.regions.forEach(E=>{if(E.length===0)return;const T=E.map(A=>new vn(A[0],A[1]));c.holes.push(new py(T))}):console.warn("mergedHoles.regions is empty!")}})}catch(b){console.warn(`Polybool error: ${b}, epsilon is ${m}`)}});const h=d.flat(2);for(let f=0;f{l.children.forEach(c=>{this.buildHatchGeometry(e,c,i)})})}findIntersectHole(e,n){const i=n.length,s=[];for(let r=0;r void main() { //vec4 worldPosition = modelMatrix * vec4(position, 1.0); v_pos = position; #include #include #include }`,a=` uniform mat4 modelMatrix; uniform float u_cameraZoom; uniform vec3 u_color; varying vec3 v_pos; struct PatternLine { vec2 origin; vec2 delta; float angle; float pattern[MAX_PATTERN_SEGMENT_COUNT]; float patternSum[MAX_PATTERN_SEGMENT_COUNT+1]; float patternLength; }; uniform PatternLine u_patternLines[${t.length}]; uniform float u_patternAngle; #include // Clamp [0..1] range #define saturate(a) clamp(a, 0.0, 1.0) const float EPS = 1000.0; vec2 getWorldScale() { return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz)); } vec2 rotate(vec2 st, float rotation) { const float PI = 3.1415926; float angle = rotation * PI/180.0; float sine = sin(angle), cosine = cos(angle); return vec2(cosine * st.x - sine * st.y, cosine * st.y + sine * st.x); } vec2 translate(vec2 samplePosition, vec2 offset) { //move sample point in the opposite direction that we want to move shapes in return samplePosition - offset; } vec2 scale(vec2 samplePosition, float scale) { return samplePosition / scale; } float sdfLine(vec2 st, vec2 a, vec2 b) { vec2 ap = st - a; vec2 ab = b - a; return abs(((ap.x * ab.y) - (ab.x * ap.y))) / length(ab); } float drawSpaceLine(vec2 st, float distanceBetweenLines, float thick) { float dist = sdfLine(st , vec2(0.0, 0.0) , vec2(1.0, 0.0)); //vec2 tt = dFdy(st); //float scale = (abs(tt.x)+abs(tt.y))/2.0; //float scale = length(fwidth(st)) * 0.5; // close to a pixel //float thick = 2.0; //thick = (thick * 0.5 - 0.5) * scale; float lineDistance = abs(fract(dist / distanceBetweenLines + 0.5) - 0.5) * distanceBetweenLines; //float lineDistance = fract(dist / distanceBetweenLines); //float distanceChange = fwidth(dist) * 0.5; //float threshold = smoothstep(thick - distanceChange, thick + distanceChange, lineDistance); //float threshold = step(thick, lineDistance); // remove gradient //float threshold = step(0.001, lineDistance); float threshold = step(thick, lineDistance); return threshold; } float drawSolidLine(PatternLine patternLine, float thick) { vec2 origin = patternLine.origin; vec2 delta = patternLine.delta; float distanceBetweenLines = length(delta); origin = rotate(origin,u_patternAngle); vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle)); return drawSpaceLine(st, distanceBetweenLines , thick); } int getPatternIndex(PatternLine patternLine, float u, out float distance ) { //u = mod(u, patternLine.patternLength); float y = floor(u/patternLine.patternLength); u = u - patternLine.patternLength * y; //float distance = 0.0; #pragma unroll_loop_start for(int i = 1; i < patternLine.patternSum.length(); i++){ if(u <= patternLine.patternSum[i]) { distance = u - patternLine.patternSum[i-1]; return i - 1; } } #pragma unroll_loop_end return -1; } float drawDashedLine(PatternLine patternLine, float thick){ float threshold = 1.0; vec2 origin = patternLine.origin; vec2 delta = patternLine.delta; float distanceBetweenLines = abs(delta.y); origin = rotate(origin, u_patternAngle); vec2 st = rotate(v_pos.xy - origin, -(patternLine.angle + u_patternAngle)); float offsetX = st.y * delta.x/delta.y; float u = st.x - offsetX; float distance = 0.0; int index = getPatternIndex(patternLine, u, distance); if(index < 0) { return threshold; } float size = patternLine.pattern[index]; if(size >= 0.0) { threshold = drawSpaceLine(st, distanceBetweenLines , thick); // Try to solve the problem caused by the precision after zooming out by drawing a part of the dashed line } else if (distance < thick) { //threshold = 0.8; threshold = drawSpaceLine(st, distanceBetweenLines , thick); } return threshold; } float drawLine(PatternLine patternLine, float thick) { float t = 0.0; if(patternLine.patternLength > 0.0) { t = drawDashedLine(patternLine, thick); } else { t = drawSolidLine(patternLine, thick); } return t; } void main() { #include // Idealy, the thickness of lines in hatch pattern should always be 1 pixel. // In Viewer2d, it uses orthographic camera and always in top view, // so we adjust thickness by cameraZoom (and also consider worldScale). // While 3d view is more complex, it can use perspective camera, // its camera position and direction is flexible. We cannot keep line thickness // in a fixed pixel any more, and there is no proper way to adjust thickness as camera // position changes. So, we need to use a fixed thickness in world coordinates. #if ${s} > 0 float thick = float(${s}); #else vec2 worldScale = getWorldScale(); float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0; // possible size of a pixel float thick = (0.7 / averageScale) / u_cameraZoom; #endif if(thick > EPS) { gl_FragColor = vec4(u_color, 1.0); #include return; } float total = 0.0; #if ${t.length} > 1 #pragma unroll_loop_start for (int i = 0; i < u_patternLines.length(); i++) { PatternLine pl = u_patternLines[i]; float t = drawLine(pl, thick); total += (1.0 - t); } #pragma unroll_loop_end #else float t = drawLine(u_patternLines[0], thick); total += (1.0 - t); #endif total = saturate(total); if (total < 0.001) { discard; } gl_FragColor = vec4(u_color * total, 1.0); #include } `;return new Yl({uniforms:r,vertexShader:o,fragmentShader:a,clipping:!0})}class DP{constructor(e){this.cache={},this.keyToTraits={},this.options=e}getMaterial(e,n){const i=this.buildKey(e,n);return this.keyToTraits[i]||(this.keyToTraits[i]={...x2(e),...n}),this.cache[i]?this.cache[i]:this.createMaterial(i,e,n)}updateLayerMaterial(e,n){const i={};for(const s of Object.keys(this.cache)){const r=this.cache[s],o=r.userData||{};if(!(o.layer===e&&o.isByLayer))continue;const a=this.keyToTraits[s];if(!a)continue;const l={...x2(a),...n},c=this.buildKey(l,l),u=r.id;r.dispose(),delete this.cache[s],delete this.keyToTraits[s];const d=this.createMaterial(c,l,l);this.keyToTraits[c]=l,i[u]=d}return i}dispose(){Object.values(this.cache).forEach(e=>e.dispose()),this.cache={},this.keyToTraits={}}createMaterial(e,n,i){const s=this.createMaterialImpl(n,i);return s.userData.layer=n.layer,s.userData.isByLayer=this.isByLayer(n),this.cache[e]=s,s}isByLayer(e){return e.color.isByLayer||e.lineType.type==="ByLayer"}}class gHe extends DP{createMaterialImpl(e,n){const i=e.fillType;return!i.patternLines||i.patternLines.length<1?this.createMeshBasicMaterial(e):i.patternLines.some(s=>!s.dashPattern)?(console.warn("Invalid dash pattern",i),this.createMeshBasicMaterial(e)):this.createHatchShaderMaterial(e,n)}createHatchShaderMaterial(e,n){const i=e.fillType,s=.005,r=.05;let o=2;i.patternLines.forEach(d=>{o=Math.max(d.dashPattern.length,o)});let a=0;const l=[],c=new vn;for(const d of i.patternLines){const h=new vn(d.origin.x,d.origin.y).sub(n.rebaseOffset).rotateAround(c,-x3.degToRad(i.patternAngle)),f=new vn(d.delta.x,d.delta.y).rotateAround(c,-x3.degToRad(d.angle));if(f.y===0){console.warn("delta.y is zero, skipping pattern line");continue}const p=d.dashPattern.length;let m=!0,b=0;for(let T=0;T0&&(m=!1),b+=Math.abs(A)}const g=m?r:s,x=[],S=[];let _=0;S[0]=_;for(let T=0;Tthis.options.maxFragmentUniforms){console.warn("There will be warning in fragment shader when number of uniforms exceeds 1024, so extra hatch line patterns are ignored here!");break}l.push(E)}const u=mHe(l,i.patternAngle,this.options.cameraZoomUniform,new Wi(e.rgbColor));return u.defines={MAX_PATTERN_SEGMENT_COUNT:o},u}createMeshBasicMaterial(e){return new v1({color:e.rgbColor})}buildKey(e,n){const i=e.fillType;if(!i.patternLines||i.patternLines.length===0)return`solid_${e.layer}_${e.rgbColor}`;const s=i.patternLines.map(r=>r.dashPattern.join(",")+`@${r.angle},${r.origin.x},${r.origin.y}`).join("|");return`hatch_${e.layer}_${e.rgbColor}_${i.patternAngle}_${s}`}}class vHe{static createLineShaderMaterial(e,n,i,s,r){let o=0;const a=[];for(let d=0;d void main() { vLineDistance = lineDistance; #include #include #include }`,u=` uniform mat4 modelMatrix; uniform vec3 diffuse; uniform vec3 u_color; uniform float opacity; uniform float pattern[${e.length}]; uniform float patternLength; uniform float u_viewportScale; uniform float u_cameraZoom; varying float vLineDistance; #include vec2 getWorldScale() { return vec2(length(modelMatrix[0].xyz), length(modelMatrix[1].xyz)); } void main() { #include // vec2 worldScale = getWorldScale(); // float averageScale = (abs(worldScale.x) + abs(worldScale.y))/2.0; // When zoomed out to a certain extent, it is displayed as a solid line. if(patternLength * u_viewportScale * u_cameraZoom/1.5 < 1.0){ gl_FragColor = vec4(u_color, opacity); #include return; } float pos = mod(vLineDistance, patternLength * u_viewportScale); for ( int i = 0; i < ${e.length}; i++ ) { pos = pos - abs(pattern[i] * u_viewportScale); if ( pos < 0.0 ) { if ( pattern[i] > 0.0 ) { gl_FragColor = vec4(u_color, opacity); break; } discard; } } #include }`;return new Yl({uniforms:l,vertexShader:c,fragmentShader:u,clipping:!0})}}class yHe extends DP{buildKey(e,n){const i=this.isByLayer(e);return this.isShaderMaterial(e,n)?i?`layer_${e.layer}_${e.lineType.name}_${e.rgbColor}_${e.lineTypeScale}`:`entity_${e.lineType.name}_${e.rgbColor}_${e.lineTypeScale}`:i?`layer_${e.layer}_${e.rgbColor}`:`entity_${e.rgbColor}`}isShaderMaterial(e,n){return!!(!n.basicMaterialOnly&&e.lineType.pattern&&e.lineType.pattern.length>0)}createMaterialImpl(e,n={}){let i;return this.isShaderMaterial(e,n)?i=vHe.createLineShaderMaterial(e.lineType.pattern,e.rgbColor,e.lineTypeScale,this.options.viewportScaleUniform,this.options.cameraZoomUniform):i=new iS({color:e.rgbColor}),i}}class bHe extends DP{buildKey(e,n){const i=n.size??1;return this.isByLayer(e)?`layer_${e.layer}_${e.rgbColor}_${i}`:`entity_${e.rgbColor}_${i}`}isByLayer(e){return e.color.isByLayer}createMaterialImpl(e,n={}){return new PG({color:e.rgbColor,size:n.size})}}const oK=class Iw{constructor(){this.unsupportedTextStyles={},this.pointMgr=new bHe(Iw.options),this.lineMgr=new yHe(Iw.options),this.fillMgr=new gHe(Iw.options)}getPointsMaterial(e,n=2){return this.pointMgr.getMaterial(e,{size:n})}getLineMaterial(e,n){return this.lineMgr.getMaterial(e,{basicMaterialOnly:n})}getFillMaterial(e,n=wHe){return this.fillMgr.getMaterial(e,{rebaseOffset:n})}updateLayerMaterial(e,n){return{...this.lineMgr.updateLayerMaterial(e,n),...this.pointMgr.updateLayerMaterial(e,n),...this.fillMgr.updateLayerMaterial(e,n)}}dispose(){this.lineMgr.dispose(),this.pointMgr.dispose(),this.fillMgr.dispose()}};oK.options={cameraZoomUniform:1,viewportScaleUniform:1,maxFragmentUniforms:1024};let _He=oK;const wHe=new vn(0,0);class xHe{constructor(e){this.events={fontNotFound:new Qi},this._renderer=e,this._styleManager=new _He,Ph.getInstance().overrideStyleManager(this._styleManager),$u.instance.events.fontNotFound.addEventListener(n=>{this.events.fontNotFound.dispatch(n)}),this._subEntityTraits=Y3.createDefaultTraits()}get subEntityTraits(){return this._subEntityTraits}get autoClear(){return this._renderer.autoClear}set autoClear(e){this._renderer.autoClear=e}get domElement(){return this._renderer.domElement}get basePoint(){return this._basePoint}set basePoint(e){e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e)}setSize(e,n){this._renderer.setSize(e,n)}getViewport(e){return this._renderer.getViewport(e)}setViewport(e,n,i,s){this._renderer.setViewport(e,n,i,s)}clear(){this._renderer.clear()}clearDepth(){this._renderer.clearDepth()}render(e,n){this._renderer.render(e,n.internalCamera)}setClearColor(e,n){this._renderer.setClearColor(e,n)}getClearColor(){const e=new Wi;return this._renderer.getClearColor(e),e.getHex()}setClearAlpha(e){this._renderer.setClearAlpha(e)}getClearAlpha(){return this._renderer.getClearAlpha()}get internalRenderer(){return this._renderer}setFontMapping(e){$u.instance.setFontMapping(e)}get missedFonts(){return $u.instance.missedFonts}updateLayerMaterial(e,n){return this._styleManager.updateLayerMaterial(e,n)}createObject(){return new sK(this._styleManager)}createEntity(){return new Ql(this._styleManager)}group(e){return new hS(e,this._styleManager)}point(e,n){return new fHe(e,this._subEntityTraits,n,this._styleManager)}circularArc(e){return this.linePoints(e.getPoints(100))}ellipticalArc(e){return this.linePoints(e.getPoints(100))}lines(e){return this.linePoints(e)}lineSegments(e,n,i){return new uHe(e,n,i,this._subEntityTraits,this._styleManager)}area(e){return new pHe(e,this._subEntityTraits,this._styleManager)}mtext(e,n,i){return new dHe(e,this._subEntityTraits,n,this._styleManager,i)}image(e,n){return new lHe(e,n,this._styleManager)}dispose(){this._styleManager.dispose(),$u.instance.missedFonts={}}linePoints(e){return new cHe(e,this._subEntityTraits,this._styleManager)}}class SHe{constructor(e){this._camera=e}get position(){return this._camera.position}get left(){return this._camera.left}set left(e){this._camera.left=e}get right(){return this._camera.right}set right(e){this._camera.right=e}get top(){return this._camera.top}set top(e){this._camera.top=e}get bottom(){return this._camera.bottom}set bottom(e){this._camera.bottom=e}get zoom(){return this._camera.zoom}set zoom(e){this._camera.zoom=e}get internalCamera(){return this._camera}lookAt(e){this._camera.lookAt(e)}setRotationFromEuler(e){this._camera.setRotationFromEuler(e)}updateProjectionMatrix(){this._camera.updateProjectionMatrix()}cwcs2Wcs(e,n,i){const s=new ct(e.x,e.y,0);s.x=e.x/n*2-1,s.y=-(e.y/i)*2+1;const r=s.unproject(this._camera);return new Si(r.x,r.y)}wcs2Cwcs(e,n,i){const s=new ct(e.x,e.y,0).project(this._camera);return new Si((s.x+1)/2*n,(-s.y+1)/2*i)}wcs2Ndc(e,n,i){const s=this.wcs2Cwcs(e,n,i);return this.cwcs2Ndc(s,n,i)}cwcs2Ndc(e,n,i){return new Si(e.x/n*2-1,-(e.y/i)*2+1)}}let aK=class{constructor(e,n,i){this._frustum=400,this.events={viewChanged:new Qi},this._renderer=e,this._width=n,this._height=i;const s=this.createCamera();this._camera=new SHe(s),this._cameraControls=this.createCameraControls(),this._cameraControls.addEventListener("change",()=>{this.events.viewChanged.dispatch({view:this})}),this._raycaster=new ERe}get width(){return this._width}set width(e){this._width=e}get height(){return this._height}set height(e){this._height=e}get enabled(){return this._cameraControls.enabled}set enabled(e){this._cameraControls.enabled=e}get center(){return this._camera.cwcs2Wcs({x:this._width/2,y:this._height/2},this._width,this._height)}set center(e){this._camera.position.set(e.x,e.y,this._camera.position.z),this._camera.updateProjectionMatrix()}cwcs2Wcs(e){return this._camera.cwcs2Wcs(e,this._width,this._height)}wcs2Cwcs(e){return this._camera.wcs2Cwcs(e,this._width,this._height)}pointToBox(e,n){const i=this.wcs2Cwcs(e),s=this.cwcs2Wcs({x:i.x+n,y:i.y+n}),r=this.cwcs2Wcs({x:i.x-n,y:i.y-n});return new ar().setFromPoints([s,r])}resetRaycaster(e,n){const i=this._camera.wcs2Ndc(e,this._width,this._height);return this._raycaster.setFromCamera(new vn(i.x,i.y),this._camera.internalCamera),this._raycaster.params.Line.threshold=n,this._raycaster.params.Points.threshold=n,this._raycaster}zoomTo(e,n=1.1){const i=new $s;e.getSize(i);const s=new $s;e.getCenter(s);const r=new ct(s.x,s.y,0);this._camera.position.set(s.x,s.y,this._camera.position.z),this._camera.lookAt(r),this._camera.setRotationFromEuler(new Xc(0,0,0));const o=i.x*n,a=i.y*n,l=this._width/o,c=this._height/a;this._camera.zoom=Math.min(l,c),this._cameraControls.target=r,this.updateCameraFrustum()}updateCameraFrustum(e,n){const i=(e??this._width)/(n??this._height);this._camera.left=-i*this._frustum,this._camera.right=i*this._frustum,this._camera.top=this._frustum,this._camera.bottom=-this._frustum,this._camera.updateProjectionMatrix(),this._cameraControls.update()}createCamera(){const e=new rP(-this._width/2,this._width/2,this._height/2,-this._height/2,.1,1e3);return e.position.set(0,0,500),e.up.set(0,1,0),e.updateProjectionMatrix(),e}createCameraControls(){const e=new dFe(this._camera.internalCamera,this._renderer.domElement);return e.enableDamping=!1,e.autoRotate=!1,e.enableRotate=!1,e.zoomSpeed=5,e.mouseButtons={MIDDLE:Ku.PAN},e.touches={ONE:ah.PAN,TWO:ah.DOLLY_PAN},e.update(),e}};class V2 extends aK{static calculateViewportWindowBox(e,n){const i=n.box,s=new ar;return s.expandByPoint(e.wcs2Cwcs(i.min)),s.expandByPoint(e.wcs2Cwcs(i.max)),s}constructor(e,n,i){const s=V2.calculateViewportWindowBox(e,n).size;super(i,s.width,s.height),this._parentView=e,this._viewport=n.clone(),this._frustum*=n.height/e.height,this.zoomTo(this._viewport.viewBox),this.enabled=!1}get viewport(){return this._viewport}update(){this.zoomTo(this._viewport.viewBox)}render(e){const n=V2.calculateViewportWindowBox(this._parentView,this._viewport);if(!n.isEmpty()){const i=this._parentView.height-n.min.y-n.size.height;this._renderer.setViewport(n.min.x,i,n.size.width,n.size.height),this._renderer.internalRenderer.setScissor(n.min.x,i,n.size.width,n.size.height),this._renderer.internalRenderer.setScissorTest(!0),this._renderer.render(e,this._camera),this._renderer.internalRenderer.setScissorTest(!1)}}}class EHe extends dP{constructor(e,n){super(e),this._circle=new Yx(n,0)}get entity(){return this._circle}update(e){this._circle.radius=e}}class CHe extends Mo{async execute(e){const n=new gh(sr.t("jig.circle.center")),i=await si.instance.editor.getPoint(n),s=new WFe(sr.t("jig.circle.radius"));s.jig=new EHe(e.view,i);const r=await si.instance.editor.getDistance(s),o=e.doc.database,a=new Yx(i,r);o.tables.blockTable.modelSpace.appendEntity(a)}}let fS=class{constructor(){this._objectId="",this._ownerId="",this._layerName="",this._visible=!0,this._userData={},this._box=new ar,this._svg=""}get box(){return this._box}set box(e){this._box.copy(e)}get basePoint(){return this._basePoint}set basePoint(e){e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e)}get svg(){return this._svg}set svg(e){this._svg=e}get objectId(){return this._objectId}set objectId(e){this._objectId=e}get ownerId(){return this._ownerId}set ownerId(e){this._ownerId=e}get layerName(){return this._layerName}set layerName(e){this._layerName=e}get visible(){return this._visible}set visible(e){this._visible=e}get userData(){return this._userData}set userData(e){this._userData=e}applyMatrix(e){}recomputeBoundingBox(){}highlight(){}unhighlight(){}fastDeepClone(){return this}};class THe extends fS{constructor(e){if(super(),e.closed)this.svg=` `;else{const i=e.startPoint,s=e.endPoint,r=e.clockwise?0:1;this.svg=` `}const n=e.box;this._box.min.copy(n.min),this._box.max.copy(n.max)}}class MHe extends fS{constructor(e){if(super(),e.closed)this.svg=` `;else{const i=e.startPoint,s=e.endPoint,r=Ui.radToDeg(e.majorAxis.angleTo(pn.X_AXIS)),o=e.clockwise?0:1;this.svg=` `}const n=e.box;this._box.min.copy(n.min),this._box.max.copy(n.max)}}class AHe extends fS{constructor(e){super();const n=e.reduce((i,s,r)=>(i+=r===0?"M":"L",i+=s.x+","+s.y,this.box.expandByPoint(s),i),"");n&&(this.svg=``)}}class kHe{constructor(){this._container=new Array,this._bbox=new ar,this._subEntityTraits={color:new Er,rgbColor:0,lineType:{type:"ByLayer",name:"Continuous",standardFlag:0,description:"Solid line",totalPatternLength:0},lineTypeScale:1,lineWeight:ep.ByLayer,fillType:{solidFill:!0,patternAngle:0,patternLines:[]},transparency:new Jf,thickness:0,layer:"0"}}get subEntityTraits(){return this._subEntityTraits}get basePoint(){return this._basePoint}set basePoint(e){e==null?this._basePoint=e:this._basePoint=this._basePoint?this._basePoint.copy(e):new Yt(e)}setFontMapping(e){}group(e){return bm}point(e){return bm}circularArc(e){const n=new THe(e);return this._container.push(n.svg),this._bbox.union(n.box),n}ellipticalArc(e){const n=new MHe(e);return this._container.push(n.svg),this._bbox.union(n.box),n}lines(e){const n=new AHe(e);return this._container.push(n.svg),this._bbox.union(n.box),n}lineSegments(e,n,i){return bm}area(e){return bm}mtext(e,n,i){return bm}image(e,n){return bm}export(){const e=this._container.join(` `),n=this._bbox.isEmpty()?{x:0,y:0,width:0,height:0}:{x:this._bbox.min.x,y:-this._bbox.max.y,width:this._bbox.max.x-this._bbox.min.x,height:this._bbox.max.y-this._bbox.min.y};return` ${e} `}}const bm=new fS;class PHe{convert(){const e=si.instance.curDocument.database.tables.blockTable.modelSpace.newIterator(),n=new kHe;for(const i of e)i.worldDraw(n);this.createFileAndDownloadIt(n.export())}createFileAndDownloadIt(e){const n=new Blob([e],{type:"image/svg+xml;charset=utf-8"}),i=URL.createObjectURL(n),s=document.createElement("a");s.href=i,s.download="example.svg",document.body.appendChild(s),s.click()}}class lK extends Mo{execute(e){new PHe().convert()}}class LHe extends dP{constructor(e,n,i,s){super(e),this._dimBlockName="*UDIM",this._db=n,new UH(n).createArrowBlock(),this._dim=new Zx(i,s,i),this._dim.rotation=0}get entity(){return this._dim}update(e){this._dim.dimLinePoint=e,this._dim.rotation=this.calculateAngle(this._dim.xLine1Point,this._dim.xLine2Point),this._dim.dimensionText=this._dim.xLine1Point.distanceTo(this._dim.xLine2Point).toFixed(3);const n=this._dimBlockName;this._db.tables.blockTable.remove(n),this._db.tables.blockTable.add(this._dim.createDimBlock(n)),this._dim.dimBlockId=n}end(){super.end(),this._db.tables.blockTable.remove(this._dimBlockName)}calculateAngle(e,n){const i=n.x-e.x,s=n.y-e.y;return Math.atan2(s,i)}}class IHe extends Mo{async execute(e){const n=new gh(sr.t("jig.dimlinear.xLine1Point")),i=await si.instance.editor.getPoint(n),s=new gh(sr.t("jig.dimlinear.xLine2Point"));s.useBasePoint=!0;const r=await si.instance.editor.getPoint(s),o=new gh(sr.t("jig.dimlinear.dimLinePoint"));o.jig=new LHe(e.view,e.doc.database,i,r);const a=await si.instance.editor.getPoint(o),l=e.doc.database,c=new Zx(i,r,a),u=this.getAvaiableDimBlockName(l);l.tables.blockTable.add(c.createDimBlock(u)),c.dimBlockId=u,l.tables.blockTable.modelSpace.appendEntity(c)}getAvaiableDimBlockName(e){const n=e.tables.blockTable.newIterator();let i=0;for(const s of n){const r=s.name;if(!r.startsWith("*D"))continue;const o=Number(r.slice(2));Number.isInteger(o)&&o>i&&(i=o)}return`*D${i+1}`}}class RHe extends dP{constructor(e,n){super(e),this._line=new f1(n,n)}get entity(){return this._line}update(e){this._line.endPoint=e}}class OHe extends Mo{async execute(e){const n=new gh(sr.t("jig.line.firstPoint")),i=await si.instance.editor.getPoint(n),s=new gh(sr.t("jig.line.nextPoint"));s.useDashedLine=!0,s.jig=new RHe(e.view,i),s.useDashedLine=!0,s.useBasePoint=!0;const r=await si.instance.editor.getPoint(s),o=e.doc.database,a=new f1(i,r);o.tables.blockTable.modelSpace.appendEntity(a)}}class DHe extends Mo{execute(e){this.printSelectionSet(e),this.printStats(e),this.printPerformanceData()}printSelectionSet(e){const n=e.doc.database.tables.blockTable.modelSpace;e.view.selectionSet.ids.forEach(i=>{const s=n.getIdAt(i);s&&console.log(s)})}printStats(e){const n=e.view.stats.layouts;console.log("Geometry information in current drawing:");for(let i=0;i(r[0]=l.line.indexed.geometrySize/1024,r[1]=l.line.nonIndexed.geometrySize/1024,r[2]=l.mesh.indexed.geometrySize/1024,r[3]=l.mesh.nonIndexed.geometrySize/1024,r[4]=l.point.indexed.geometrySize/1024,r[5]=l.point.nonIndexed.geometrySize/1024,o[0]+=r[0],o[1]+=r[1],o[2]+=r[2],o[3]+=r[3],o[4]+=r[4],o[5]+=r[5],{name:l.name,"idx line (KB)":r[0].toFixed(1),"line (KB)":r[1].toFixed(1),"idx mesh (KB)":r[2].toFixed(1),"mesh (KB)":r[3].toFixed(1),"idx point (KB)":r[4].toFixed(1),"point (KB)":r[5].toFixed(1),"total geo (KB)":(l.summary.totalGeometrySize/1024).toFixed(1),"total mapping (KB)":(l.summary.totalMappingSize/1024).toFixed(1)}));a.push({name:"total","idx line (KB)":o[0].toFixed(1),"line (KB)":o[1].toFixed(1),"idx mesh (KB)":o[2].toFixed(1),"mesh (KB)":o[3].toFixed(1),"idx point (KB)":o[4].toFixed(1),"point (KB)":o[5].toFixed(1),"total geo (KB)":(s.summary.totalSize.geometry/1024).toFixed(1),"total mapping (KB)":(s.summary.totalSize.mapping/1024).toFixed(1)}),console.table(a),console.groupEnd()}}printPerformanceData(){k4.getInstance().printAll()}}class cK extends Mo{execute(e){_o.emit("open-file",{})}}class uK extends Mo{execute(e){const n=si.instance.baseUrl;si.instance.openUrl(n+"templates/acadiso.dxf")}}class NHe extends Mo{execute(){si.instance.regen()}}class BHe extends Mo{execute(e){e.view.mode=vh.SELECTION,e.view.setCursor(b1.Crosshair)}}class FHe extends Mo{async execute(e){const n=new GFe(sr.t("jig.sysvar.prompt")),i=await si.instance.editor.getString(n),s=j4.instance();s.getDescriptor(this.globalName)&&s.setVar(this.globalName,i)}}class zHe extends Mo{execute(e){e.view.zoomToFitDrawing()}}class UHe extends Mo{async execute(e){const n=await si.instance.editor.getSelection();return e.view.zoomTo(n,1)}}class $He extends Mo{execute(e){e.view.mode=vh.PAN,e.view.setCursor(b1.Grab)}}const VHe=t=>new Zi(t.min,t.max),HHe=t=>new ar(t.min,t.max),WHe=t=>new Gs(t.min,t.max),GHe=t=>new ar(t.min,t.max),jHe=t=>new NG(t.min,t.max),KHe=t=>new ar(t.min,t.max),qHe=t=>{const e=new Gs;return e.min.set(t.min.x,t.min.y,0),e.max.set(t.max.x,t.max.y,0),e},FD={threeBo2dToGeBox2d:GHe,geBox2dToThreeBox2d:jHe,threeBox3dToGeBox3d:VHe,geBox3dToThreeBox3d:WHe,goBox3dToGeBox2d:HHe,threeBox3dToGeBox2d:KHe,geBox2dToThreeBox3d:qHe};var pS=(t=>(t[t.LEFT_BOTTOM=0]="LEFT_BOTTOM",t[t.LEFT_TOP=1]="LEFT_TOP",t[t.RIGHT_TOP=2]="RIGHT_TOP",t[t.RIGHT_BOTTOM=4]="RIGHT_BOTTOM",t))(pS||{});class YHe extends Lr{constructor(e,n,i=150,s=2){super(),this.camera=e,this.renderer=n,this.gizmoCamera=new rP(-2,2,2,-2,0,4),this.gizmoCamera.position.set(0,0,2),this.gizmoDim=i,this.gizmoPos=s,this.initialize()}initialize(){}update(){this.updateOrientation();const e=this.renderer.autoClear;this.renderer.autoClear=!1,this.renderer.clearDepth();const n=new Zs;this.renderer.getViewport(n);const i=this.calculateViewportPos();this.renderer.setViewport(i.x,i.y,this.gizmoDim,this.gizmoDim),this.renderer.render(this,this.gizmoCamera),this.renderer.setViewport(n.x,n.y,n.z,n.w),this.renderer.autoClear=e}dispose(){}updateOrientation(){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld()}calculatePosInViewport(e,n,i){const s=(e-i.min.x)/this.gizmoDim*2-1,r=-((n-i.min.y)/this.gizmoDim)*2+1;return{x:s,y:r}}calculateViewportPos(){const e=this.renderer.domElement,n=e.offsetWidth,i=e.offsetHeight,s=this.gizmoPos,r=this.gizmoDim;let o=n-r,a=i-r;switch(s){case 0:o=0,a=0;break;case 1:o=0;break;case 4:a=0;break}return{x:o,y:a}}calculateViewportBbox(){const e=this.renderer.domElement,n=e.offsetWidth,i=e.offsetHeight,s=this.gizmoPos,r=this.gizmoDim,o=new NG(new vn(n-r,0),new vn(n,r));switch(s){case 0:o.set(new vn(0,i-r),new vn(r,i));break;case 1:o.set(new vn(0,0),new vn(r,r));break;case 4:o.set(new vn(n-r,i-r),new vn(n,i));break}return o}}function XHe(t,e){const n=e.font||"Helvetica",i=e.fontSize||30,s=e.width||200,r=e.height||200,o=e.bgColor?e.bgColor.join(", "):"255, 255, 255, 1.0",a=e.color?e.color.join(", "):"0, 0, 0, 1.0",l=document.createElement("canvas");l.width=s,l.height=r;const c=l.getContext("2d");if(c){c.font=`bold ${i}px ${n}`,c.fillStyle=`rgba(${o})`,c.fillRect(0,0,s,r);const d=c.measureText(t).width;c.fillStyle=`rgba(${a})`,c.fillText(t,s/2-d/2,r/2+i/2-2)}const u=new Eo(l);return u.minFilter=Rl,u.needsUpdate=!0,u}function WC(t){const e=XHe(t,{fontSize:100,font:"Arial Narrow, sans-serif",color:[255,255,255,1],bgColor:[0,0,0,0]}),n=new MG({map:e,transparent:!0});return new D5e(n)}pS.RIGHT_TOP;const ZHe={pos:pS.LEFT_BOTTOM,size:100,hasZAxis:!0};class JHe extends YHe{constructor(e,n,i){const s={...ZHe,...i};super(e,n,s.size,i.pos),this.hasZAxis=s.hasZAxis;const r=[0,0,0,2,0,0,0,0,0,0,2,0],o=[1,0,0,1,.6,0,0,1,0,.6,1,0];this.hasZAxis&&(r.push(0,0,0,0,0,2),o.push(0,0,1,0,.6,1));const a=new es;a.setAttribute("position",new Qr(r,3)),a.setAttribute("color",new Qr(o,3));const l=new iS({vertexColors:!0,toneMapped:!1});this.axes=new Zc(a,l),this.axes.position.set(-1,-1,-1),this.add(this.axes),this.xText=WC("X"),this.xText.position.set(1.5,-1,-1),this.add(this.xText),this.yText=WC("Y"),this.yText.position.set(-1,1.5,-1),this.add(this.yText),this.hasZAxis&&(this.zText=WC("Z"),this.zText.position.set(-1,-1,1.5),this.add(this.zText))}setLineColors(e,n){const i=new Wi,s=this.axes.geometry.attributes.color.array;return i.set(e),i.toArray(s,0),i.toArray(s,3),i.set(n),i.toArray(s,6),i.toArray(s,9),this.axes.geometry.attributes.color.needsUpdate=!0,this}setTextColor(e){this.xText.material.color=e,this.yText.material.color=e}dispose(){var e,n;this.axes.geometry.dispose(),this.axes.material.dispose(),this.xText.geometry.dispose(),this.xText.material.dispose(),this.yText.geometry.dispose(),this.yText.material.dispose(),this.hasZAxis&&((e=this.zText)==null||e.geometry.dispose(),(n=this.zText)==null||n.material.dispose())}}class QHe extends aK{constructor(e,n,i,s){super(e,i,s),this._layoutBtrId=n,this._mode=vh.SELECTION,this._axesGizmo=this.createAxesGizmo(),this._viewportViews=new Map}get layoutBtrId(){return this._layoutBtrId}get mode(){return this._mode}set mode(e){e==vh.SELECTION?this._cameraControls.mouseButtons={MIDDLE:Ku.PAN}:e==vh.PAN&&(this._cameraControls.mouseButtons={LEFT:Ku.PAN}),this._cameraControls.update(),this._mode=e}get viewportCount(){return this._viewportViews.size}addViewport(e){this._viewportViews.set(e.viewport.id,e)}removeViewport(e){this._viewportViews.delete(e)}resize(e,n){this._height=n,this._width=e,this.updateCameraFrustum(),this._viewportViews.forEach(i=>{i.update()})}render(e){var n;this._renderer.clear(),this._renderer.render(e.internalScene,this._camera);const i=e.modelSpaceLayout;i&&this.drawViewports(i.internalObject),(n=this._axesGizmo)==null||n.update()}createAxesGizmo(){return new JHe(this._camera.internalCamera,this._renderer.internalRenderer,{hasZAxis:!1,pos:pS.LEFT_BOTTOM})}drawViewports(e){if(this._viewportViews.size>0){const n=this._renderer.autoClear;this._renderer.autoClear=!1;const i=new Zs;this._renderer.getViewport(i),this._renderer.clearDepth();const s=e.visible;e.visible=!0,this._viewportViews.forEach(r=>{r.render(e)}),e.visible=s,this._renderer.setViewport(i.x,i.y,i.z,i.w),this._renderer.autoClear=n}}}class eWe{constructor(){this._activeLayoutBtrId="",this._layoutViews=new Map}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layoutViews.forEach(n=>{n.enabled=n.layoutBtrId==e})}get activeLayoutView(){return this._layoutViews.get(this._activeLayoutBtrId)}has(e){return this._layoutViews.has(e)}getAt(e){return this._layoutViews.get(e)}resize(e,n){this._layoutViews.forEach(i=>{i.resize(e,n)})}add(e){this._layoutViews.set(e.layoutBtrId,e)}render(e){var n;(n=this.activeLayoutView)==null||n.render(e)}}function dK(t,e,n=0,i=t.length-1,s=tWe){for(;i>n;){if(i-n>600){const l=i-n+1,c=e-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),f=Math.max(n,Math.floor(e-c*d/l+h)),p=Math.min(i,Math.floor(e+(l-c)*d/l+h));dK(t,e,f,p,s)}const r=t[e];let o=n,a=i;for(Nv(t,n,e),s(t[i],r)>0&&Nv(t,n,i);o0;)a--}s(t[n],r)===0?Nv(t,n,a):(a++,Nv(t,a,i)),a<=e&&(n=a+1),e<=a&&(i=a-1)}}function Nv(t,e,n){const i=t[e];t[e]=t[n],t[n]=i}function tWe(t,e){return te?1:0}class nWe{constructor(e=9){this._maxEntries=Math.max(4,e),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()}all(){return this._all(this.data,[])}search(e){let n=this.data;const i=[];if(!E_(e,n))return i;const s=this.toBBox,r=[];for(;n;){for(let o=0;o=0&&r[n].children.length>this._maxEntries;)this._split(r,n),n--;this._adjustParentBBoxes(s,r,n)}_split(e,n){const i=e[n],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const o=this._chooseSplitIndex(i,r,s),a=Am(i.children.splice(o,i.children.length-o));a.height=i.height,a.leaf=i.leaf,_m(i,this.toBBox),_m(a,this.toBBox),n?e[n-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,n){this.data=Am([e,n]),this.data.height=e.height+1,this.data.leaf=!1,_m(this.data,this.toBBox)}_chooseSplitIndex(e,n,i){let s,r=1/0,o=1/0;for(let a=n;a<=i-n;a++){const l=Zv(e,0,a,this.toBBox),c=Zv(e,a,i,this.toBBox),u=aWe(l,c),d=GC(l)+GC(c);u=n;c--){const u=e.children[c];Jv(a,e.leaf?r(u):u),l+=S_(a)}return l}_adjustParentBBoxes(e,n,i){for(let s=i;s>=0;s--)Jv(n[s],e)}_condense(e){for(let n=e.length-1,i;n>=0;n--)e[n].children.length===0?n>0?(i=e[n-1].children,i.splice(i.indexOf(e[n]),1)):this.clear():_m(e[n],this.toBBox)}}function iWe(t,e,n){if(!n)return e.indexOf(t);for(let i=0;i=t.minX&&e.maxY>=t.minY}function Am(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function zD(t,e,n,i,s){const r=[e,n];for(;r.length;){if(n=r.pop(),e=r.pop(),n-e<=i)continue;const o=e+Math.ceil((n-e)/i/2)*i;dK(t,o,e,n,s),r.push(e,o,o,n)}}class lWe{constructor(e){this._group=new rHe,this._name=e.name,this._box=new Gs,this._group.visible=!(e.isFrozen||e.isOff)}get name(){return this._name}set name(e){this._name=e}get box(){return this._box}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get internalObject(){return this._group}get stats(){const e=this._group.stats;return{name:this._name,...e}}get entityCount(){return this._group.entityCount}update(e){this._name=e.name,this._group.visible=!(e.isFrozen||e.isOff)}updateMaterial(e,n){this._group.updateMaterial(e,n)}rerenderPoints(e){this._group.rerenderPoints(e)}hasEntity(e){return this._group.hasEntity(e)}addEntity(e,n=!0){this._group.addEntity(e);const i=e.box;n&&this._box.union(i)}isIntersectWith(e,n){return this._group.isIntersectWith(e,n)}removeEntity(e){throw new Error("Not implemented yet!")}updateEntity(e){return this._group.add(e),!0}hover(e){e.forEach(n=>{this._group.hover(n)})}unhover(e){e.forEach(n=>{this._group.unhover(n)})}select(e){e.forEach(n=>{this._group.select(n)})}unselect(e){e.forEach(n=>{this._group.unselect(n)})}}class cWe{constructor(){this._group=new sl,this._indexTree=new nWe,this._box=new Gs,this._layers=new Map}get internalObject(){return this._group}get layers(){return this._layers}get box(){return this._box}get visible(){return this._group.visible}set visible(e){this._group.visible=e}get entityCount(){let e=0;return this._layers.forEach(n=>e+=n.entityCount),e}get stats(){const e=[];let n=0,i=0,s=0,r=0,o=0;return this._layers.forEach(a=>{const l=a.stats;e.push(l),s+=l.line.indexed.geometrySize+l.line.nonIndexed.geometrySize,r+=l.mesh.indexed.geometrySize+l.mesh.nonIndexed.geometrySize,o+=l.point.indexed.geometrySize+l.point.nonIndexed.geometrySize,n+=l.summary.totalGeometrySize,i+=l.summary.totalMappingSize}),{layers:e,summary:{entityCount:this.entityCount,totalSize:{line:s,mesh:r,point:o,geometry:n,mapping:i}}}}clear(){return this._layers.forEach(e=>{this._group.remove(e.internalObject)}),this._layers.clear(),this._box.makeEmpty(),this._indexTree.clear(),this}rerenderPoints(e){this._layers.forEach(n=>{n.rerenderPoints(e)})}isIntersectWith(e,n){const i=this.getLayersByObjectId(e);for(let s=0;s{this.getLayersByObjectId(n).forEach(i=>i.hover([n]))})}unhover(e){e.forEach(n=>{this.getLayersByObjectId(n).forEach(i=>i.unhover([n]))})}select(e){e.forEach(n=>{this.getLayersByObjectId(n).forEach(i=>i.unselect([n]))})}unselect(e){e.forEach(n=>{this.getLayersByObjectId(n).forEach(i=>i.unselect([n]))})}setSnapObject(e){this._snapPointsObject&&this._group.remove(this._snapPointsObject),this._snapPointsObject=e,this._group.add(e)}search(e){return this._indexTree.search({minX:e.min.x,minY:e.min.y,maxX:e.max.x,maxY:e.max.y})}getLayersByObjectId(e){const n=[];for(const[i,s]of this._layers)s.hasEntity(e)&&n.push(s);return n}}class uWe{constructor(){this._scene=new R5e,this._transientManager=new BD(this._scene),this._layers=new Map,this._layouts=new Map,this._activeLayoutBtrId="",this._modelSpaceBtrId=""}get layers(){return this._layers}get layouts(){return this._layouts}get box(){var e;return(e=this.activeLayout)==null?void 0:e.box}get internalScene(){return this._scene}get modelSpaceBtrId(){return this._modelSpaceBtrId}set modelSpaceBtrId(e){if(this._modelSpaceBtrId=e,!this._layouts.has(e))throw new Error(`[AcTrScene] No layout assiciated with the specified block table record id '${e}'!`)}get activeLayoutBtrId(){return this._activeLayoutBtrId}set activeLayoutBtrId(e){this._activeLayoutBtrId=e,this._layouts.forEach((n,i)=>{n.visible=e==i})}get activeLayout(){if(this._activeLayoutBtrId&&this._layouts.has(this._activeLayoutBtrId))return this._layouts.get(this._activeLayoutBtrId)}get modelSpaceLayout(){if(this._modelSpaceBtrId&&this._layouts.has(this._modelSpaceBtrId))return this._layouts.get(this._modelSpaceBtrId)}get stats(){const e=[];return this._layouts.forEach(n=>e.push(n.stats)),{layouts:e}}addEmptyLayout(e){const n=new cWe;return this._layouts.set(e,n),this._scene.add(n.internalObject),n.visible=e==this._activeLayoutBtrId,this._layers.forEach(i=>{n.addLayer(i)}),n}clear(){return this._layouts.forEach(e=>{this._scene.remove(e.internalObject),e.clear()}),this._layouts.clear(),this._layers.clear(),this._transientManager.clear(),this._scene.clear(),this._transientManager=new BD(this._scene),this}hover(e){return this.activeLayout?(this.activeLayout.hover(e),!0):!1}unhover(e){return this.activeLayout?(this.activeLayout.unhover(e),!0):!1}select(e){return this.activeLayout?(this.activeLayout.select(e),!0):!1}unselect(e){return this.activeLayout?(this.activeLayout.unselect(e),!0):!1}search(e){const n=this.activeLayout;return n?n?.search(e):[]}addLayer(e){const n=[];return this._layers.set(e.name,e),this._layouts.forEach(i=>{const s=i.addLayer(e);s&&n.push(s)}),n}updateLayer(e){const n=[];return this._layers.set(e.name,e),this._layouts.forEach(i=>{const s=i.updateLayer(e);s&&n.push(s)}),n}addTransientEntity(e){this._transientManager.update(e)}removeTransientEntity(e){this._transientManager.remove(e)}addEntity(e,n=!0){const i=e.ownerId;if(i){let s=this._layouts.get(i);s||(s=this.addEmptyLayout(i)),s.addEntity(e,n)}else console.warn("[AcTrSecene] The owner id of one entity cannot be empty!");return this}removeEntity(e){for(const[n,i]of this._layouts)if(i.removeEntity(e))return!0;return!1}updateEntity(e){for(const[n,i]of this._layouts)if(i.updateEntity(e))return!0;return!1}setSnapObject(e){return this._layouts.forEach(n=>{n.setSnapObject(e)}),this}}const UD={background:0};class dWe extends QFe{constructor(e=UD){const n={...UD,...e},i=new lFe({antialias:!0,alpha:!0,canvas:e.canvas});n.canvas==null&&(n.canvas=i.domElement),super(n.canvas),e.calculateSizeCallback&&this.setCalculateSizeCallback(e.calculateSizeCallback),i.setPixelRatio(Math.min(window.devicePixelRatio,2)),i.setSize(this.width,this.height),this._renderer=new xHe(i);const s=wr.instance.fontMapping;this._renderer.setFontMapping(s),this._renderer.events.fontNotFound.addEventListener(r=>{_o.emit("font-not-found",{fontName:r.fontName,count:r.count??0})}),this._scene=this.createScene(),this._renderer.setClearColor(n.background||0),this._stats=this.createStats(wr.instance.isShowStats),wr.instance.events.modified.addEventListener(r=>{r.key=="isShowStats"&&this.toggleStatsVisibility(this._stats,r.value)}),this.canvas.addEventListener("click",()=>{this.mode==vh.SELECTION&&this.select()}),document.addEventListener("keydown",r=>{r.code==="Escape"&&this.selectionSet.clear()}),gp().layoutManager.events.layoutSwitched.addEventListener(r=>{this.activeLayoutBtrId=r.layout.blockTableRecordId}),this._missedImages=new Map,this._layoutViewManager=new eWe,this.initialize(),this.onWindowResize(),this.animate(),this._isDirty=!0,this._numOfEntitiesToProcess=0}initialize(){this.setCursor(b1.Crosshair)}get mode(){const e=this.activeLayoutView;return e?e.mode:vh.SELECTION}set mode(e){this.activeLayoutView.mode=e}get renderer(){return this._renderer}get isDirty(){return this._isDirty}set isDirty(e){this._isDirty=e}get missedData(){return{fonts:this._renderer.missedFonts,images:this._missedImages}}get center(){return this.activeLayoutView.center}set center(e){this.activeLayoutView.center=e}get backgroundColor(){return this._renderer.getClearColor()}set backgroundColor(e){this._renderer.setClearColor(e),this._isDirty=!0}get modelSpaceBtrId(){return this._scene.modelSpaceBtrId}set modelSpaceBtrId(e){this._scene.modelSpaceBtrId=e}get activeLayoutBtrId(){return this._scene.activeLayoutBtrId}set activeLayoutBtrId(e){this._layoutViewManager.activeLayoutBtrId=e,this._scene.activeLayoutBtrId=e,this._isDirty=!0}get activeLayoutView(){return this._layoutViewManager.activeLayoutView}get stats(){return this._scene.stats}animate(){var e;requestAnimationFrame(this.animate.bind(this)),this._isDirty&&(this._layoutViewManager.render(this._scene),(e=this._stats)==null||e.update(),this._isDirty=!1)}cwcs2Wcs(e){const n=this.activeLayoutView;return n?n.cwcs2Wcs(e):new Si(e)}wcs2Cwcs(e){const n=this.activeLayoutView;return n?n.wcs2Cwcs(e):new Si(e)}zoomTo(e,n=1.1){this.activeLayoutView.zoomTo(e,n),this._isDirty=!0}rerenderPoints(e){const n=this._scene.activeLayout;n&&(n.rerenderPoints(e),this._isDirty=!0)}zoomToFitDrawing(e=0){new MFe(()=>this._numOfEntitiesToProcess<=0,()=>{if(this._scene.box){const n=FD.threeBox3dToGeBox2d(this._scene.box);this.zoomTo(n),this._isDirty=!0}},300,e).start()}zoomToFitLayer(e){const n=this._scene.activeLayout;if(n){const i=n.getLayer(e);if(i&&!i.box.isEmpty()){const s=FD.threeBox3dToGeBox2d(i.box);return this.zoomTo(s),this._isDirty=!0,!0}}return!1}pick(e,n){e==null&&(e=this.curPos);const i=[],s=this._scene.activeLayout;if(s){const r=this.activeLayoutView,o=r.pointToBox(e,n??this.selectionBoxSize),a=this._scene.search(o),l=Math.max(o.size.width/2,o.size.height/2),c=r.resetRaycaster(e,l);a.forEach(u=>{const d=u.id;s.isIntersectWith(d,c)&&i.push(d)})}return i}search(e){return this._scene.search(e)}select(e){const n=[];this.pick(e).forEach(i=>n.push(i)),n.length>0&&this.selectionSet.add(n)}selectByBox(e){const n=[];this._scene.search(e).forEach(i=>n.push(i.id)),this.selectionSet.add(n)}addLayer(e){this._scene.addLayer({name:e.name,isFrozen:e.isFrozen,isOff:e.isOff,color:e.color}),this._isDirty=!0}updateLayer(e,n){const i=this._scene.updateLayer({name:e.name,isFrozen:e.isFrozen,isOff:e.isOff,color:e.color}),s={};n.color&&(s.color=n.color.clone(),s.rgbColor=n.color.RGB),n.lineStyle&&(s.lineType=e.lineStyle),n.lineWeight!==void 0&&(s.lineWeight=n.lineWeight),n.transparency!==void 0&&(s.transparency=n.transparency),s.layer=e.name;const r=this._renderer.updateLayerMaterial(e.name,s);i.forEach(o=>{for(const a in r){const l=r[a];o.updateMaterial(Number(a),l)}}),this._isDirty=!0}addTransientEntity(e){const n=Array.isArray(e)?e:[e];for(let i=0;i{await this.batchConvert(n)})}removeEntity(e){this._scene.removeEntity(e)}updateEntity(e){let n=[];Array.isArray(e)?n=e:n.push(e);for(let i=0;i{this._isDirty=!0},100)}addLayout(e){this._scene.addEmptyLayout(e.blockTableRecordId),this.createLayoutViewIfNeeded(e.blockTableRecordId),this._isDirty=!0}clear(){this._scene.clear(),this._isDirty=!0,this._missedImages.clear(),this._renderer.dispose()}highlight(e){this._isDirty=this._scene.select(e)}unhighlight(e){this._isDirty=this._scene.unselect(e)}onHover(e){this._isDirty=this._scene.hover([e])}onUnhover(e){this._isDirty=this._scene.unhover([e])}createScene(){const e=new uWe;return e.layouts.forEach(n=>{n.setSnapObject(this.renderer.createObject())}),e}createStats(e){const n=new T0;document.body.appendChild(n.dom);const i=n.dom;return i.style.position="fixed",i.style.inset="unset",i.style.bottom="30px",i.style.right="0px",this.toggleStatsVisibility(n,e),n}onWindowResize(){super.onWindowResize(),this._renderer.setSize(this.width,this.height),this._layoutViewManager.resize(this.width,this.height),this._isDirty=!0}createLayoutViewIfNeeded(e){let n=this._layoutViewManager.getAt(e);return n==null&&(n=new QHe(this._renderer,e,this.width,this.height),n.events.viewChanged.addEventListener(()=>{this._isDirty=!0}),this._layoutViewManager.add(n)),n}toggleStatsVisibility(e,n){n?e.dom.style.display="block":e.dom.style.display="none"}drawEntity(e,n){return e.worldDraw(this._renderer,n)}async batchConvert(e){for(let n=0;n{this._scene.addEntity(s,r),s.dispose(),this._isDirty=!0}).finally(()=>{this.decreaseNumOfEntitiesToProcess()})}if(i instanceof F4){if(i.number>1){const r=this._layoutViewManager.getAt(i.ownerId);if(r){const o=new V2(r,i.toGiViewport(),this._renderer);r.addViewport(o)}}}else if(i instanceof Xx){const r=i.imageFileName;r&&this._missedImages.set(i.objectId,r)}}else this.decreaseNumOfEntitiesToProcess()}}handleGroup(e){const n=e.children,i=new Map;n.forEach(l=>{var c;const u=l.userData.layerName;i.has(u)||i.set(u,[]),(c=i.get(u))==null||c.push(l)}),e.children=[];for(const l of n)l.parent=null;const s=e.styleManager,r=e.objectId,o=e.layerName,a=e.box;i.forEach((l,c)=>{const u=new Ql(s);u.applyMatrix4(e.matrix),u.objectId=r,u.ownerId=e.ownerId,u.layerName=c==="0"?o:c,u.box=a;for(let d=0;d{r.status==="NotFound"?i.push(r.fontName):r.status==="FailedToLoad"&&s.push({fontName:r.fontName,url:r.url})}),i.length>0&&_o.emit("fonts-not-found",{fonts:i}),s.length>0&&_o.emit("fonts-not-loaded",{fonts:s})}}let $D=class{convert(e){const n=this.createEntity(e);return n&&this.processCommonAttrs(e,n),n}createEntity(e){return e.type=="3DFACE"?this.convertFace(e):e.type=="ARC"?this.convertArc(e):e.type=="CIRCLE"?this.convertCirle(e):e.type=="DIMENSION"?this.convertDimension(e):e.type=="ELLIPSE"?this.convertEllipse(e):e.type=="HATCH"?this.convertHatch(e):e.type=="IMAGE"?this.convertImage(e):e.type=="LEADER"?this.convertLeader(e):e.type=="LINE"?this.convertLine(e):e.type=="LWPOLYLINE"?this.convertLWPolyline(e):e.type=="MTEXT"?this.convertMText(e):e.type=="POINT"?this.convertPoint(e):e.type=="POLYLINE2D"?this.convertPolyline2d(e):e.type=="POLYLINE3D"?this.convertPolyline3d(e):e.type=="RAY"?this.convertRay(e):e.type=="SPLINE"?this.convertSpline(e):e.type=="ACAD_TABLE"?this.convertTable(e):e.type=="TEXT"?this.convertText(e):e.type=="SOLID"?this.convertSolid(e):e.type=="VIEWPORT"?this.convertViewport(e):e.type=="WIPEOUT"?this.convertWipeout(e):e.type=="XLINE"?this.convertXline(e):e.type=="INSERT"?this.convertBlockReference(e):null}convertFace(e){const n=new rH;return e.corner1&&n.setVertexAt(0,e.corner1),e.corner2&&n.setVertexAt(1,e.corner2),e.corner3&&n.setVertexAt(2,e.corner3),e.corner4&&n.setVertexAt(3,e.corner4),n.setEdgeInvisibilities(e.flag),n}convertArc(e){return new QV(e.center,e.radius,e.startAngle,e.endAngle,e.extrusionDirection??pn.Z_AXIS)}convertCirle(e){return new Yx(e.center,e.radius,e.extrusionDirection??pn.Z_AXIS)}convertEllipse(e){const n=new pn(e.majorAxisEndPoint),i=n.length();return new iH(e.center,e.extrusionDirection??pn.Z_AXIS,n,i,i*e.axisRatio,e.startAngle,e.endAngle)}convertLine(e){const n=e.startPoint,i=e.endPoint;return new f1(new Yt(n.x,n.y,n.z),new Yt(i.x,i.y,i.z))}convertSpline(e){try{if(e.numberOfControlPoints>0&&e.numberOfKnots>0)return new E2(e.controlPoints,e.knots,e.weights,e.degree,!!(e.flag&1));if(e.numberOfFitPoints>0)return new E2(e.fitPoints,"Uniform",e.degree,!!(e.flag&1))}catch(n){console.log(`Failed to convert spline with error: ${n}`)}return null}convertPoint(e){const n=new wH;return n.position=e.position,n}convertSolid(e){const n=new vH;return n.setPointAt(0,{...e.corner1,z:0}),n.setPointAt(1,{...e.corner2,z:0}),n.setPointAt(2,{...e.corner3,z:0}),n.setPointAt(3,e.corner4?{...e.corner4,z:0}:{...e.corner3,z:0}),n.thickness=e.thickness,n}convertLWPolyline(e){const n=new bH;return n.closed=!!(e.flag&512),e.vertices.forEach((i,s)=>{n.addVertexAt(s,new Si(i.x,i.y),i.bulge,i.startWidth,i.endWidth)}),n}convertPolyline2d(e){const n=!!(e.flag&1),i=[],s=[];e.vertices.map(o=>{o.flag&16||(i.push({x:o.x,y:o.y,z:o.z}),s.push(o.bulge??0))});let r=Bu.SimplePoly;return e.flag&2?r=Bu.FitCurvePoly:e.flag&4&&(e.smoothType==6?r=Bu.CubicSplinePoly:e.smoothType==5&&(r=Bu.QuadSplinePoly)),new YV(r,i,0,n,e.startWidth,e.endWidth,s)}convertPolyline3d(e){const n=!!(e.flag&1),i=[];e.vertices.map(r=>{r.flag&16||i.push({x:r.x,y:r.y,z:r.z})});let s=zf.SimplePoly;return e.flag&4&&(e.smoothType==6?s=zf.CubicSplinePoly:e.smoothType==5&&(s=zf.QuadSplinePoly)),new ZV(s,i,n)}convertHatch(e){var n;const i=new D4;return(n=e.definitionLines)==null||n.forEach(s=>{i.definitionLines.push({angle:s.angle,origin:s.base,delta:s.offset,dashPattern:s.numberOfDashLengths>0?s.dashLengths:[]})}),i.isSolidFill=e.solidFill==1,i.hatchStyle=e.hatchStyle,i.patternName=e.patternName,i.patternType=e.patternType,i.patternAngle=e.patternAngle==null?0:e.patternAngle,i.patternScale=e.patternScale==null?0:e.patternScale,e.boundaryPaths.forEach(s=>{if(s.boundaryPathTypeFlag&2){const r=s,o=new pp;o.closed=r.isClosed,r.vertices.forEach((a,l)=>{o.addVertexAt(l,{x:a.x,y:a.y,bulge:a.bulge})}),i.add(o)}else{const r=s,o=new O4;r.edges.forEach(a=>{if(a!=null){if(a.type==1){const l=a;o.add(new b0(l.start,l.end))}else if(a.type==2){const l=a;o.add(new S2(l.center,l.radius,l.startAngle,l.endAngle,!l.isCCW))}else if(a.type==3){const l=a;new $s().subVectors(l.end,l.center);const c=Math.sqrt(Math.pow(l.end.x,2)+Math.pow(l.end.y,2)),u=c*l.lengthOfMinorAxis;let d=l.startAngle,h=l.endAngle;const f=Math.atan2(l.end.y,l.end.x);l.isCCW||(d=Math.PI*2-d,h=Math.PI*2-h),o.add(new OV({...l.center,z:0},c,u,d,h,!l.isCCW,f))}else if(a.type==4){const l=a;if(l.numberOfControlPoints>0&&l.numberOfKnots>0){const c=l.controlPoints.map(h=>({x:h.x,y:h.y,z:0}));let u=!0;const d=l.controlPoints.map(h=>(h.weight==null&&(u=!1),h.weight||1));o.add(new Qf(c,l.knots,u?d:void 0))}else if(l.numberOfFitData>0){const c=l.fitDatum.map(u=>({x:u.x,y:u.y,z:0}));o.add(new Qf(c,"Uniform"))}}}}),i.add(o)}}),i}convertTable(e){const n=new fH(e.name,e.rowCount,e.columnCount);return n.attachmentPoint=e.attachmentPoint,n.position.copy(e.startPoint),e.columnWidthArr.forEach((i,s)=>n.setColumnWidth(s,i)),e.rowHeightArr.forEach((i,s)=>n.setRowHeight(s,i)),e.cells.forEach((i,s)=>{n.setCell(s,i)}),n}convertText(e){const n=new mH;return n.textString=e.text,n.styleName=e.styleName,n.height=e.textHeight,n.position.copy(e.startPoint),n.rotation=e.rotation,n.oblique=e.obliqueAngle??0,n.thickness=e.thickness,n.horizontalMode=e.halign,n.verticalMode=e.valign,n.widthFactor=e.xScale??1,n}convertMText(e){const n=new N4;return n.contents=e.text,e.styleName!=null&&(n.styleName=e.styleName),n.height=e.textHeight,n.width=e.rectWidth,n.rotation=e.rotation||0,n.location=e.insertionPoint,n.attachmentPoint=e.attachmentPoint,e.direction&&(n.direction=new pn(e.direction)),n.drawingDirection=e.drawingDirection,n}convertLeader(e){const n=new lH;return e.vertices.forEach(i=>{n.appendVertex(i)}),n.hasArrowHead=e.isArrowheadEnabled,n.hasHookLine=e.isHooklineExists,n.isSplined=e.isSpline,n.dimensionStyle=e.styleName,n.annoType=e.leaderCreationFlag,n}convertDimension(e){if(e.subclassMarker=="AcDbAlignedDimension"||e.subclassMarker=="AcDbRotatedDimension"){const n=e,i=new Zx(n.subDefinitionPoint1,n.subDefinitionPoint2,n.definitionPoint);return n.insertionPoint&&(i.dimBlockPosition={x:n.insertionPoint.x,y:n.insertionPoint.y,z:0}),i.rotation=n.rotationAngle,this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDb3PointAngularDimension"){const n=e,i=new PH(n.centerPoint,n.subDefinitionPoint1,n.subDefinitionPoint2,n.definitionPoint);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbOrdinateDimension"){const n=e,i=new DH(n.subDefinitionPoint1,n.subDefinitionPoint2);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbRadialDimension"){const n=e,i=new BH(n.definitionPoint,n.centerPoint,n.leaderLength);return this.processDimensionCommonAttrs(e,i),i}else if(e.subclassMarker=="AcDbDiametricDimension"){const n=e,i=new RH(n.definitionPoint,n.centerPoint,n.leaderLength);return this.processDimensionCommonAttrs(e,i),i}return null}processImage(e,n){n.position.copy(e.position),n.brightness=e.brightness,n.contrast=e.contrast,n.fade=e.fade,n.imageDefId=e.imageDefHandle.toString(),n.isClipped=e.clipping>0,n.isShownClipped=(e.flags|4)>0,n.isImageShown=(e.flags|3)>0,n.isImageTransparent=(e.flags|8)>0,e.clippingBoundaryPath.forEach(i=>{n.clipBoundary.push(new Si(i))}),n.clipBoundaryType=e.clippingBoundaryType,n.width=Math.sqrt(e.uPixel.x**2+e.uPixel.y**2+e.uPixel.z**2)*e.imageSize.x,n.height=Math.sqrt(e.vPixel.x**2+e.vPixel.y**2+e.vPixel.z**2)*e.imageSize.y,n.rotation=Math.atan2(e.uPixel.y,e.uPixel.x)}convertImage(e){const n=new Xx;return this.processImage(e,n),n}convertWipeout(e){const n=new TH;return this.processImage(e,n),n}convertViewport(e){const n=new F4;return n.number=e.viewportId,n.centerPoint.copy(e.viewportCenter),n.height=e.height,n.width=e.width,n.viewCenter.copy(e.displayCenter),n.viewHeight=e.viewHeight,n}convertRay(e){const n=new B4;return n.basePoint.copy(e.firstPoint),n.unitDir.copy(e.unitDirection),n}convertXline(e){const n=new z4;return n.basePoint.copy(e.firstPoint),n.unitDir.copy(e.unitDirection),n}convertBlockReference(e){const n=new qx(e.name);return e.insertionPoint&&n.position.copy(e.insertionPoint),n.scaleFactors.x=e.xScale,n.scaleFactors.y=e.yScale,n.scaleFactors.z=e.zScale,n.rotation=e.rotation,n.normal.copy(e.extrusionDirection),n}processDimensionCommonAttrs(e,n){n.dimBlockId=e.name,n.textPosition.copy(e.textPoint),n.textRotation=e.textRotation||0,e.textLineSpacingFactor&&(n.textLineSpacingFactor=e.textLineSpacingFactor),e.textLineSpacingStyle&&(n.textLineSpacingStyle=e.textLineSpacingStyle),n.dimensionStyleName=e.styleName,n.dimensionText=e.text||"",n.measurement=e.measurement}processCommonAttrs(e,n){if(n.layer=e.layer||"0",n.objectId=e.handle.toString(),n.ownerId=e.ownerBlockRecordSoftId.toString(),e.lineType!=null&&(n.lineType=e.lineType),e.lineweight!=null&&(n.lineWeight=e.lineweight),e.lineTypeScale!=null&&(n.linetypeScale=e.lineTypeScale),e.color!=null&&n.color.setRGBValue(e.color),e.colorIndex!=null&&(n.color.colorIndex=e.colorIndex),e.colorName&&(n.color.colorName=e.colorName),e.isVisible!=null&&(n.visibility=e.isVisible),e.transparency!=null){const i=new Jf;i.method=e.transparencyType,(i.isByBlock||i.isByBlock)&&(i.alpha=e.transparency),n.transparency=i}}};class fWe extends $4{constructor(e={}){super(e),e.useWorker=!0,e.parserWorkerUrl||(e.parserWorkerUrl="/assets/libredwg-parser-worker.js")}async parse(e){if(this.config.useWorker&&this.config.parserWorkerUrl){const n=JW({workerUrl:this.config.parserWorkerUrl,maxConcurrentWorkers:1}),i=await n.execute(e);return n.destroy(),i.data}else throw new Error("dwg converter can run in web worker only!")}getFonts(e){const n=new Map;e.tables.BLOCK_RECORD.entries.forEach(o=>{n.set(o.name,o)});const i=new Map,s=o=>{if(o){const a=o.lastIndexOf(".");return a>=0?o.substring(0,a).toLowerCase():o.toLowerCase()}};e.tables.STYLE.entries.forEach(o=>{const a=[];let l=s(o.font);l&&a.push(l),l=s(o.bigFont),l&&a.push(l),i.set(o.name,a)});const r=new Set;return this.getFontsInBlock(e.entities,n,i,r),Array.from(r)}getFontsInBlock(e,n,i,s){const r=/\\f(.*?)\|/g;e.forEach(o=>{if(o.type=="MTEXT"){const a=o;[...a.text.matchAll(r)].forEach(c=>{s.add(c[1].toLowerCase())});const l=i.get(a.styleName);l?.forEach(c=>s.add(c))}else if(o.type=="TEXT"){const a=o,l=i.get(a.styleName);l?.forEach(c=>s.add(c))}else if(o.type=="INSERT"){const a=o,l=n.get(a.name);l&&this.getFontsInBlock(l.entities,n,i,s)}})}processLineTypes(e,n){e.tables.LTYPE.entries.forEach(i=>{const s={name:i.name,description:i.description,standardFlag:i.standardFlag,totalPatternLength:i.totalPatternLength,pattern:i.pattern},r=new _0(s);this.processCommonTableEntryAttrs(i,r),r.name=i.name,n.tables.linetypeTable.add(r)})}processTextStyles(e,n){e.tables.STYLE.entries.forEach(i=>{const s=new K4(i);this.processCommonTableEntryAttrs(i,s),n.tables.textStyleTable.add(s)})}processDimStyles(e,n){e.tables.DIMSTYLE.entries.forEach(i=>{const s={name:i.name,ownerId:i.ownerHandle.toString(),dimpost:i.DIMPOST||"",dimapost:i.DIMAPOST||"",dimscale:i.DIMSCALE,dimasz:i.DIMASZ,dimexo:i.DIMEXO,dimdli:i.DIMDLI,dimexe:i.DIMEXE,dimrnd:i.DIMRND,dimdle:i.DIMDLE,dimtp:i.DIMTP,dimtm:i.DIMTM,dimtxt:i.DIMTXT,dimcen:i.DIMCEN,dimtsz:i.DIMTSZ,dimaltf:i.DIMALTF,dimlfac:i.DIMLFAC,dimtvp:i.DIMTVP,dimtfac:i.DIMTFAC,dimgap:i.DIMGAP,dimaltrnd:i.DIMALTRND,dimtol:i.DIMTOL==null||i.DIMTOL==0?0:1,dimlim:i.DIMLIM==null||i.DIMLIM==0?0:1,dimtih:i.DIMTIH==null||i.DIMTIH==0?0:1,dimtoh:i.DIMTOH==null||i.DIMTOH==0?0:1,dimse1:i.DIMSE1==null||i.DIMSE1==0?0:1,dimse2:i.DIMSE2==null||i.DIMSE2==0?0:1,dimtad:i.DIMTAD,dimzin:i.DIMZIN,dimazin:i.DIMAZIN,dimalt:i.DIMALT,dimaltd:i.DIMALTD,dimtofl:i.DIMTOFL,dimsah:i.DIMSAH,dimtix:i.DIMTIX,dimsoxd:i.DIMSOXD,dimclrd:i.DIMCLRD,dimclre:i.DIMCLRE,dimclrt:i.DIMCLRT,dimadec:i.DIMADEC||0,dimunit:i.DIMUNIT||2,dimdec:i.DIMDEC,dimtdec:i.DIMTDEC,dimaltu:i.DIMALTU,dimalttd:i.DIMALTTD,dimaunit:i.DIMAUNIT,dimfrac:i.DIMFRAC,dimlunit:i.DIMLUNIT,dimdsep:i.DIMDSEP,dimtmove:i.DIMTMOVE||0,dimjust:i.DIMJUST,dimsd1:i.DIMSD1,dimsd2:i.DIMSD2,dimtolj:i.DIMTOLJ,dimtzin:i.DIMTZIN,dimaltz:i.DIMALTZ,dimalttz:i.DIMALTTZ,dimfit:i.DIMFIT||0,dimupt:i.DIMUPT,dimatfit:i.DIMATFIT,dimtxsty:"Standard",dimldrblk:"",dimblk:i.DIMBLK||"",dimblk1:i.DIMBLK1||"",dimblk2:i.DIMBLK2||"",dimlwd:i.DIMLWD,dimlwe:i.DIMLWE},r=new eS(s);this.processCommonTableEntryAttrs(i,r),n.tables.dimStyleTable.add(r)})}processLayers(e,n){e.tables.LAYER.entries.forEach(i=>{const s=new Er;s.colorIndex=i.colorIndex;const r=new Qx({name:i.name,standardFlags:i.standardFlag,linetype:i.lineType,lineWeight:i.lineweight,isOff:i.off,color:s,isPlottable:i.plotFlag!=0});this.processCommonTableEntryAttrs(i,r),n.tables.layerTable.add(r)})}processViewports(e,n){e.tables.VPORT.entries.forEach(i=>{const s=new sG;this.processCommonTableEntryAttrs(i,s),i.circleSides&&(s.circleSides=i.circleSides),s.standardFlag=i.standardFlag,s.center.copy(i.center),s.lowerLeftCorner.copy(i.lowerLeftCorner),s.upperRightCorner.copy(i.upperRightCorner),i.snapBasePoint&&s.snapBase.copy(i.snapBasePoint),i.snapRotationAngle&&(s.snapAngle=i.snapRotationAngle),i.snapSpacing&&s.snapIncrements.copy(i.snapSpacing),i.majorGridLines&&(s.gridMajor=i.majorGridLines),i.gridSpacing&&s.gridIncrements.copy(i.gridSpacing),i.backgroundObjectId&&(s.backgroundObjectId=i.backgroundObjectId),s.gsView.center.copy(i.center),s.gsView.viewDirectionFromTarget.copy(i.viewDirectionFromTarget),s.gsView.viewTarget.copy(i.viewTarget),i.lensLength&&(s.gsView.lensLength=i.lensLength),i.frontClippingPlane&&(s.gsView.frontClippingPlane=i.frontClippingPlane),i.backClippingPlane&&(s.gsView.backClippingPlane=i.backClippingPlane),i.viewHeight&&(s.gsView.viewHeight=i.viewHeight),i.viewTwistAngle&&(s.gsView.viewTwistAngle=i.viewTwistAngle),i.frozenLayers&&(s.gsView.frozenLayers=i.frozenLayers),i.styleSheet&&(s.gsView.styleSheet=i.styleSheet),i.renderMode&&(s.gsView.renderMode=i.renderMode),i.viewMode&&(s.gsView.viewMode=i.viewMode),i.ucsIconSetting&&(s.gsView.ucsIconSetting=i.ucsIconSetting),i.ucsOrigin&&s.gsView.ucsOrigin.copy(i.ucsOrigin),i.ucsXAxis&&s.gsView.ucsXAxis.copy(i.ucsXAxis),i.ucsYAxis&&s.gsView.ucsYAxis.copy(i.ucsYAxis),i.orthographicType&&(s.gsView.orthographicType=i.orthographicType),i.shadePlotSetting&&(s.gsView.shadePlotSetting=i.shadePlotSetting),i.shadePlotObjectId&&(s.gsView.shadePlotObjectId=i.shadePlotObjectId),i.visualStyleObjectId&&(s.gsView.visualStyleObjectId=i.visualStyleObjectId),i.isDefaultLightingOn&&(s.gsView.isDefaultLightingOn=i.isDefaultLightingOn),i.defaultLightingType&&(s.gsView.defaultLightingType=i.defaultLightingType),i.brightness&&(s.gsView.brightness=i.brightness),i.contrast&&(s.gsView.contrast=i.contrast),i.ambientColor&&(s.gsView.ambientColor=i.ambientColor),n.tables.viewportTable.add(s)})}processBlockTables(e,n){e.tables.BLOCK_RECORD.entries.forEach(i=>{let s=n.tables.blockTable.getAt(i.name);s||(s=new mo,s.objectId=i.handle.toString(),s.name=i.name,s.ownerId=i.ownerHandle.toString(),s.origin.copy(i.basePoint),s.layoutId=i.layout.toString(),n.tables.blockTable.add(s)),!s.isModelSapce&&!s.isPaperSapce&&i.entities&&i.entities.length>0&&this.processEntitiesInBlock(i.entities,s)})}processBlocks(e,n){}async processEntitiesInBlock(e,n){const i=new $D,s=e.length,r=[];for(let o=0;o{const f=[];for(let p=d;p100&&(p=100),await r(p,"ENTITY","IN-PROGRESS")}})}processHeader(e,n){const i=e.header;i.CECOLOR&&(i.CECOLOR.index>=0&&i.CECOLOR.index<=256?n.cecolor.colorIndex=i.CECOLOR.index:n.cecolor.setRGBValue(i.CECOLOR.rgb)),n.angBase=i.ANGBASE??0,n.angDir=i.ANGDIR??0,n.aunits=i.AUNITS??0,i.EXTMAX&&(n.extmax=i.EXTMAX),i.EXTMIN&&(n.extmin=i.EXTMIN),n.insunits=i.INSUNITS??1,n.pdmode=i.PDMODE??0,n.pdsize=i.PDSIZE??0}processCommonTableEntryAttrs(e,n){n.name=e.name,n.objectId=e.handle.toString(),n.ownerId=e.ownerHandle.toString()}processObjects(e,n){this.processLayouts(e,n),this.processImageDefs(e,n)}processLayouts(e,n){const i=n.dictionaries.layouts;e.objects.LAYOUT.forEach(s=>{const r=new p1;r.layoutName=s.layoutName,r.tabOrder=s.tabOrder;const o=n.tables.blockTable.newIterator();r.objectId=s.handle.toString();for(const a of o)if(a.layoutId===r.objectId){r.blockTableRecordId=a.objectId;break}r.blockTableRecordId||s.layoutName==="Model"&&(r.blockTableRecordId=n.tables.blockTable.modelSpace.objectId),r.limits.min.copy(s.minLimit),r.limits.max.copy(s.maxLimit),r.extents.min.copy(s.minExtent),r.extents.max.copy(s.maxExtent),this.processCommonObjectAttrs(s,r),i.setAt(r.layoutName,r)})}processImageDefs(e,n){const i=n.dictionaries.imageDefs;e.objects.IMAGEDEF.forEach(s=>{const r=new zH;r.sourceFileName=s.fileName,this.processCommonObjectAttrs(s,r),i.setAt(r.objectId,r)})}processCommonObjectAttrs(e,n){n.objectId=e.handle.toString(),n.ownerId=e.ownerHandle.toString()}groupAndFlattenByType(e){const n={},i=[];for(const s of e)n[s.type]||(n[s.type]=[],i.push(s.type)),n[s.type].push(s);return i.flatMap(s=>n[s])}}function pWe(){try{const t=new QW({convertByEntityType:!1,useWorker:!0,parserWorkerUrl:"./assets/dxf-parser-worker.js"});T2.instance.register(hh.DXF,t)}catch(t){console.error("Failed to register dxf converter: ",t)}try{const t=new fWe({convertByEntityType:!1,useWorker:!0,parserWorkerUrl:"./assets/libredwg-parser-worker.js"});T2.instance.register(hh.DWG,t)}catch(t){console.error("Failed to register dwg converter: ",t)}}function mWe(){pWe(),typeof window<"u"&&window.location&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1")?Ph.getInstance().initialize("/assets/mtext-renderer-worker.js"):Ph.getInstance().initialize("./mtext-renderer-worker.js")}const X3=class km{constructor(e={}){this.options={size:e.size??"48px",borderWidth:e.borderWidth??"5px",color:e.color??"#0b84ff",overlay:e.overlay??!0,overlayColor:e.overlayColor??"rgba(0,0,0,0.5)",message:e.message??""},km.stylesInjected||this.injectStyles(),this.createDom()}show(){return this.root.style.display="flex",this}hide(){return this.root.style.display="none",this}setMessage(e=""){return this.messageEl.textContent=e,this.messageEl.style.display=e?"block":"none",this}destroy(){var e;(e=this.root)!=null&&e.parentNode&&this.root.parentNode.removeChild(this.root)}createDom(){const e=document.createElement("div");e.className="ml-ccl-overlay",e.style.display="flex",e.style.background=this.options.overlay?this.options.overlayColor:"transparent";const n=document.createElement("div");n.className="ml-ccl-spinner",n.style.width=this.options.size,n.style.height=this.options.size,n.style.borderWidth=this.options.borderWidth,n.style.borderTopColor=this.options.color;const i=document.createElement("div");i.className="ml-ccl-message",i.textContent=this.options.message,i.style.display=this.options.message?"block":"none";const s=document.createElement("div");s.className="ml-ccl-wrapper",s.appendChild(n),s.appendChild(i),e.appendChild(s),document.body.appendChild(e),this.root=e,this.spinner=n,this.messageEl=i}injectStyles(){if(document.getElementById(km.styleId)){km.stylesInjected=!0;return}const e=` .ml-ccl-overlay { position: fixed; inset: 0; display: none; justify-content: center; align-items: center; z-index: 9999; pointer-events: auto; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial; } .ml-ccl-wrapper { display: flex; flex-direction: column; align-items: center; } .ml-ccl-spinner { border-radius: 50%; border-style: solid; border-color: rgba(0,0,0,0.25); border-top-color: #0b84ff; animation: ml-ccl-rotate 0.85s linear infinite; box-sizing: border-box; } .ml-ccl-message { margin-top: 12px; font-size: 14px; color: #FFF; text-align: center; user-select: none; } @keyframes ml-ccl-rotate { to { transform: rotate(360deg); } } `.trim(),n=document.createElement("style");n.id=km.styleId,n.textContent=e,document.head.appendChild(n),km.stylesInjected=!0}};X3.styleId="ml-ccl-loader-styles",X3.stylesInjected=!1;let gWe=X3;const vWe={isDebug:!1,isShowCommandLine:!0,isShowCoordinate:!0,isShowEntityInfo:!1,isShowLanguageSelector:!0,isShowMainMenu:!0,isShowToolbar:!0,isShowStats:!1,fontMapping:{}},VD="settings";let wr=class hK{constructor(){this.events={modified:new Qi}}static get instance(){return this._instance||(this._instance=new hK),this._instance}set(e,n){const i=this.settings;i[e]=n,localStorage.setItem(VD,JSON.stringify(i)),this.events.modified.dispatch({key:e,value:n})}get(e){return this.settings[e]}toggle(e){const n=this.get(e);this.set(e,!n)}get isDebug(){return this.get("isDebug")}set isDebug(e){this.set("isDebug",e)}get isShowCommandLine(){return this.get("isShowCommandLine")}set isShowCommandLine(e){this.set("isShowCommandLine",e)}get isShowCoordinate(){return this.get("isShowCoordinate")}set isShowCoordinate(e){this.set("isShowCoordinate",e)}get isShowEntityInfo(){return this.get("isShowEntityInfo")}set isShowEntityInfo(e){this.set("isShowEntityInfo",e)}get isShowLanguageSelector(){return this.get("isShowLanguageSelector")}set isShowLanguageSelector(e){this.set("isShowLanguageSelector",e)}get isShowMainMenu(){return this.get("isShowMainMenu")}set isShowMainMenu(e){this.set("isShowMainMenu",e)}get isShowToolbar(){return this.get("isShowToolbar")}set isShowToolbar(e){this.set("isShowToolbar",e)}get isShowStats(){return this.get("isShowStats")}set isShowStats(e){this.set("isShowStats",e)}get fontMapping(){return this.get("fontMapping")}set fontMapping(e){this.set("fontMapping",e)}setFontMapping(e,n){const i=this.get("fontMapping");i[e]=n,this.set("fontMapping",i)}get settings(){const e=localStorage.getItem(VD),n=e==null?{}:JSON.parse(e);return fce(n,vWe)}};const yWe="https://mlightcad.gitlab.io/cad-data/";class si{constructor(e={}){this.events={documentCreated:new Qi,documentActivated:new Qi},this._baseUrl=e.baseUrl??yWe,e.useMainThreadDraw?Ph.getInstance().setRenderMode("main"):Ph.getInstance().setRenderMode("worker");const n=new e9e;n.database.events.openProgress.addEventListener(r=>{const o={database:n.database,percentage:r.percentage,stage:r.stage,subStage:r.subStage,subStageStatus:r.subStageStatus,data:r.data};_o.emit("open-file-progress",o),this.updateProgress(o)});const i=()=>({width:window.innerWidth,height:window.innerHeight-30}),s=new dWe({canvas:e.canvas,calculateSizeCallback:i});this._context=new EFe(s,n),this._fontLoader=new hWe,this._fontLoader.baseUrl=this._baseUrl+"fonts/",gp().workingDatabase=n.database,this.registerCommands(),this._progress=new gWe,this._progress.hide(),e.notLoadDefaultFonts||this.loadDefaultFonts(),mWe(),this.createCommandLine()}static createInstance(e={}){return si._instance==null&&(si._instance=new si(e)),this._instance}static get instance(){return si._instance||(si._instance=new si),si._instance}get context(){return this._context}get curDocument(){return this._context.doc}get mdiActiveDocument(){return this._context.doc}get curView(){return this._context.view}get editor(){return this._context.view.editor}get baseUrl(){return this._baseUrl}get avaiableFonts(){return this._fontLoader.avaiableFonts}async loadFonts(e){await this._fontLoader.load(e)}async loadDefaultFonts(e){e==null?await this._fontLoader.load(["simkai"]):await this._fontLoader.load(e)}async openUrl(e,n){this.onBeforeOpenDocument(),n=this.setOptions(n);const i=await this.context.doc.openUri(e,n);return this.onAfterOpenDocument(i),i}async openDocument(e,n,i){this.onBeforeOpenDocument(),i=this.setOptions(i);const s=await this.context.doc.openDocument(e,n,i);return this.onAfterOpenDocument(s),s}regen(){this.curView.clear(),this.context.doc.database.regen()}registerCommands(){const e=Us.instance;e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"circle","circle",new CHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"csvg","csvg",new lK),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"dimlinear","dimlinear",new IHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"line","line",new OHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"log","log",new DHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"open","open",new cK),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"pan","pan",new $He),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"qnew","qnew",new uK),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"regen","regen",new NHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"select","select",new BHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"zoom","zoom",new zHe),e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"zoomw","zoomw",new UHe),j4.instance().getAllDescriptors().forEach(n=>{e.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,n.name,n.name,new FHe)})}sendStringToExecute(e){const n=Us.instance.lookupGlobalCmd(e);n?.execute(this.context)}setActiveLayout(){const e=this.curView;e.activeLayoutBtrId=this.curDocument.database.currentSpaceId,e.modelSpaceBtrId=this.curDocument.database.currentSpaceId}onBeforeOpenDocument(){this.curView.clear()}onAfterOpenDocument(e){if(e){const n=this.context.doc;this.events.documentActivated.dispatch({doc:n}),this.setActiveLayout();const i=n.database;i.extents.isEmpty()?this.curView.zoomToFitDrawing():this.curView.zoomTo(new ar(i.extmin,i.extmax))}}setOptions(e){return e==null?e={fontLoader:this._fontLoader}:e.fontLoader==null&&(e.fontLoader=this._fontLoader),e}updateProgress(e){if(e.stage==="CONVERSION"){if(e.subStage){const n="main.progress."+e.subStage.replace(/_/g,"").toLowerCase();this._progress.setMessage(sr.t(n))}}else e.stage==="FETCH_FILE"&&this._progress.setMessage(sr.t("main.message.fetchingDrawingFile"));e.percentage>=100?this._progress.hide():this._progress.show()}createCommandLine(){const e=new DFe(document.body);e.visible=wr.instance.isShowCommandLine,wr.instance.events.modified.addEventListener(()=>{e.visible=wr.instance.isShowCommandLine})}}function bWe(t,e){return Ly()?(Z2(t,e),!0):!1}const KC=new WeakMap,_We=(...t)=>{var e;const n=t[0],i=(e=xn())===null||e===void 0?void 0:e.proxy,s=i??Ly();if(s==null&&!bA())throw new Error("injectLocal must be called in setup");return s&&KC.has(s)&&n in KC.get(s)?KC.get(s)[n]:zt(...t)},fK=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const wWe=Object.prototype.toString,xWe=t=>wWe.call(t)==="[object Object]",SWe=()=>{};function pK(...t){if(t.length!==1)return Ei(...t);const e=t[0];return typeof e=="function"?Vc(iB(()=>({get:e,set:SWe}))):X(e)}function EWe(t,e){function n(...i){return new Promise((s,r)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(r)})}return n}const mK=t=>t();function CWe(t=mK,e={}){const{initialState:n="active"}=e,i=pK(n==="active");function s(){i.value=!1}function r(){i.value=!0}const o=(...a)=>{i.value&&t(...a)};return{isActive:Vc(i),pause:s,resume:r,eventFilter:o}}function HD(t){return t.endsWith("rem")?Number.parseFloat(t)*16:Number.parseFloat(t)}function qC(t){return Array.isArray(t)?t:[t]}function TWe(t){return xn()}function MWe(t,e,n={}){const{eventFilter:i=mK,...s}=n;return We(t,EWe(i,e),s)}function AWe(t,e,n={}){const{eventFilter:i,initialState:s="active",...r}=n,{eventFilter:o,pause:a,resume:l,isActive:c}=CWe(i,{initialState:s});return{stop:MWe(t,e,{...r,eventFilter:o}),pause:a,resume:l,isActive:c}}const kWe=AWe;function NP(t,e=!0,n){TWe()?mn(t,n):e?t():Nt(t)}function PWe(t=!1,e={}){const{truthyValue:n=!0,falsyValue:i=!1}=e,s=Li(t),r=wi(t);function o(a){if(arguments.length)return r.value=a,r.value;{const l=Rc(n);return r.value=r.value===l?Rc(i):l,r.value}}return s?o:[r,o]}function LWe(t,e,n){return We(t,e,{...n,immediate:!0})}const Pf=fK?window:void 0,IWe=fK?window.document:void 0;function H2(t){var e;const n=Rc(t);return(e=n?.$el)!==null&&e!==void 0?e:n}function Sy(...t){const e=(i,s,r,o)=>(i.addEventListener(s,r,o),()=>i.removeEventListener(s,r,o)),n=F(()=>{const i=qC(Rc(t[0])).filter(s=>s!=null);return i.every(s=>typeof s!="string")?i:void 0});return LWe(()=>{var i,s;return[(i=(s=n.value)===null||s===void 0?void 0:s.map(r=>H2(r)))!==null&&i!==void 0?i:[Pf].filter(r=>r!=null),qC(Rc(n.value?t[1]:t[0])),qC(v(n.value?t[2]:t[1])),Rc(n.value?t[3]:t[2])]},([i,s,r,o],a,l)=>{if(!i?.length||!s?.length||!r?.length)return;const c=xWe(o)?{...o}:o,u=i.flatMap(d=>s.flatMap(h=>r.map(f=>e(d,h,f,c))));l(()=>{u.forEach(d=>d())})},{flush:"post"})}function RWe(){const t=wi(!1),e=xn();return e&&mn(()=>{t.value=!0},e),t}function gK(t){const e=RWe();return F(()=>(e.value,!!t()))}const OWe=Symbol("vueuse-ssr-width");function DWe(){const t=bA()?_We(OWe,null):null;return typeof t=="number"?t:void 0}function vK(t,e={}){const{window:n=Pf,ssrWidth:i=DWe()}=e,s=gK(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function"),r=wi(typeof i=="number"),o=wi(),a=wi(!1),l=c=>{a.value=c.matches};return jo(()=>{if(r.value){r.value=!s.value,a.value=Rc(t).split(",").some(c=>{const u=c.includes("not all"),d=c.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),h=c.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/);let f=!!(d||h);return d&&f&&(f=i>=HD(d[1])),h&&f&&(f=i<=HD(h[1])),u?!f:f});return}s.value&&(o.value=n.matchMedia(Rc(t)),a.value=o.value.matches)}),Sy(o,"change",l,{passive:!0}),F(()=>a.value)}const C_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},T_="__vueuse_ssr_handlers__",NWe=BWe();function BWe(){return T_ in C_||(C_[T_]=C_[T_]||{}),C_[T_]}function yK(t,e){return NWe[t]||e}function FWe(t){return vK("(prefers-color-scheme: dark)",t)}function zWe(t){return t==null?"any":t instanceof Set?"set":t instanceof Map?"map":t instanceof Date?"date":typeof t=="boolean"?"boolean":typeof t=="string"?"string":typeof t=="object"?"object":Number.isNaN(t)?"any":"number"}const UWe={boolean:{read:t=>t==="true",write:t=>String(t)},object:{read:t=>JSON.parse(t),write:t=>JSON.stringify(t)},number:{read:t=>Number.parseFloat(t),write:t=>String(t)},any:{read:t=>t,write:t=>String(t)},string:{read:t=>t,write:t=>String(t)},map:{read:t=>new Map(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t.entries()))},set:{read:t=>new Set(JSON.parse(t)),write:t=>JSON.stringify(Array.from(t))},date:{read:t=>new Date(t),write:t=>t.toISOString()}},WD="vueuse-storage";function $We(t,e,n,i={}){var s;const{flush:r="pre",deep:o=!0,listenToStorageChanges:a=!0,writeDefaults:l=!0,mergeDefaults:c=!1,shallow:u,window:d=Pf,eventFilter:h,onError:f=q=>{console.error(q)},initOnMounted:p}=i,m=(u?wi:X)(typeof e=="function"?e():e),b=F(()=>Rc(t));if(!n)try{n=yK("getDefaultStorage",()=>Pf?.localStorage)()}catch(q){f(q)}if(!n)return m;const g=Rc(e),x=zWe(g),S=(s=i.serializer)!==null&&s!==void 0?s:UWe[x],{pause:_,resume:E}=kWe(m,q=>k(q),{flush:r,deep:o,eventFilter:h});We(b,()=>R(),{flush:r});let T=!1;const A=q=>{p&&!T||R(q)},I=q=>{p&&!T||H(q)};d&&a&&(n instanceof Storage?Sy(d,"storage",A,{passive:!0}):Sy(d,WD,I)),p?NP(()=>{T=!0,R()}):R();function P(q,oe){if(d){const Z={key:b.value,oldValue:q,newValue:oe,storageArea:n};d.dispatchEvent(n instanceof Storage?new StorageEvent("storage",Z):new CustomEvent(WD,{detail:Z}))}}function k(q){try{const oe=n.getItem(b.value);if(q==null)P(oe,null),n.removeItem(b.value);else{const Z=S.write(q);oe!==Z&&(n.setItem(b.value,Z),P(oe,Z))}}catch(oe){f(oe)}}function B(q){const oe=q?q.newValue:n.getItem(b.value);if(oe==null)return l&&g!=null&&n.setItem(b.value,S.write(g)),g;if(!q&&c){const Z=S.read(oe);return typeof c=="function"?c(Z,g):x==="object"&&!Array.isArray(Z)?{...g,...Z}:Z}else return typeof oe!="string"?oe:S.read(oe)}function R(q){if(!(q&&q.storageArea!==n)){if(q&&q.key==null){m.value=g;return}if(!(q&&q.key!==b.value)){_();try{const oe=S.write(m.value);(q===void 0||q?.newValue!==oe)&&(m.value=B(q))}catch(oe){f(oe)}finally{q?Nt(E):E()}}}}function H(q){R(q.detail)}return m}const VWe="*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}";function HWe(t={}){const{selector:e="html",attribute:n="class",initialValue:i="auto",window:s=Pf,storage:r,storageKey:o="vueuse-color-scheme",listenToStorageChanges:a=!0,storageRef:l,emitAuto:c,disableTransition:u=!0}=t,d={auto:"",light:"light",dark:"dark",...t.modes||{}},h=FWe({window:s}),f=F(()=>h.value?"dark":"light"),p=l||(o==null?pK(i):$We(o,i,r,{window:s,listenToStorageChanges:a})),m=F(()=>p.value==="auto"?f.value:p.value),b=yK("updateHTMLAttrs",(_,E,T)=>{const A=typeof _=="string"?s?.document.querySelector(_):H2(_);if(!A)return;const I=new Set,P=new Set;let k=null;if(E==="class"){const R=T.split(/\s/g);Object.values(d).flatMap(H=>(H||"").split(/\s/g)).filter(Boolean).forEach(H=>{R.includes(H)?I.add(H):P.add(H)})}else k={key:E,value:T};if(I.size===0&&P.size===0&&k===null)return;let B;u&&(B=s.document.createElement("style"),B.appendChild(document.createTextNode(VWe)),s.document.head.appendChild(B));for(const R of I)A.classList.add(R);for(const R of P)A.classList.remove(R);k&&A.setAttribute(k.key,k.value),u&&(s.getComputedStyle(B).opacity,document.head.removeChild(B))});function g(_){var E;b(e,n,(E=d[_])!==null&&E!==void 0?E:_)}function x(_){t.onChanged?t.onChanged(_,g):g(_)}We(m,x,{flush:"post",immediate:!0}),NP(()=>x(m.value));const S=F({get(){return c?p.value:m.value},set(_){p.value=_}});return Object.assign(S,{store:p,system:f,state:m})}function bK(t={}){const{valueDark:e="dark",valueLight:n=""}=t,i=HWe({...t,onChanged:(r,o)=>{var a;t.onChanged?(a=t.onChanged)===null||a===void 0||a.call(t,r==="dark",o,r):o(r)},modes:{dark:e,light:n}}),s=F(()=>i.system.value);return F({get(){return i.value==="dark"},set(r){const o=r?"dark":"light";s.value===o?i.value="auto":i.value=o}})}const GD=["fullscreenchange","webkitfullscreenchange","webkitendfullscreen","mozfullscreenchange","MSFullscreenChange"];function WWe(t,e={}){const{document:n=IWe,autoExit:i=!1}=e,s=F(()=>{var x;return(x=H2(t))!==null&&x!==void 0?x:n?.documentElement}),r=wi(!1),o=F(()=>["requestFullscreen","webkitRequestFullscreen","webkitEnterFullscreen","webkitEnterFullScreen","webkitRequestFullScreen","mozRequestFullScreen","msRequestFullscreen"].find(x=>n&&x in n||s.value&&x in s.value)),a=F(()=>["exitFullscreen","webkitExitFullscreen","webkitExitFullScreen","webkitCancelFullScreen","mozCancelFullScreen","msExitFullscreen"].find(x=>n&&x in n||s.value&&x in s.value)),l=F(()=>["fullScreen","webkitIsFullScreen","webkitDisplayingFullscreen","mozFullScreen","msFullscreenElement"].find(x=>n&&x in n||s.value&&x in s.value)),c=["fullscreenElement","webkitFullscreenElement","mozFullScreenElement","msFullscreenElement"].find(x=>n&&x in n),u=gK(()=>s.value&&n&&o.value!==void 0&&a.value!==void 0&&l.value!==void 0),d=()=>c?n?.[c]===s.value:!1,h=()=>{if(l.value){if(n&&n[l.value]!=null)return n[l.value];{const x=s.value;if(x?.[l.value]!=null)return!!x[l.value]}}return!1};async function f(){if(!(!u.value||!r.value)){if(a.value)if(n?.[a.value]!=null)await n[a.value]();else{const x=s.value;x?.[a.value]!=null&&await x[a.value]()}r.value=!1}}async function p(){if(!u.value||r.value)return;h()&&await f();const x=s.value;o.value&&x?.[o.value]!=null&&(await x[o.value](),r.value=!0)}async function m(){await(r.value?f():p())}const b=()=>{const x=h();(!x||x&&d())&&(r.value=x)},g={capture:!1,passive:!0};return Sy(n,GD,b,g),Sy(()=>H2(s),GD,b,g),NP(b,!1),i&&bWe(f),{isSupported:u,isFullscreen:r,enter:p,exit:f,toggle:m}}var GWe={name:"zh-cn",el:{breadcrumb:{label:"面包屑"},colorpicker:{confirm:"确定",clear:"清空",defaultLabel:"颜色选择器",description:"当前颜色 {color},按 Enter 键选择新颜色",alphaLabel:"选择透明度的值",alphaDescription:"透明度 {alpha}, 当前颜色 {color}",hueLabel:"选择色相值",hueDescription:"色相 {hue}, 当前颜色 {color}",svLabel:"选择饱和度与明度的值",svDescription:"饱和度 {saturation}, 明度 {brightness}, 当前颜色 {color}",predefineDescription:"选择 {value} 作为颜色"},datepicker:{now:"此刻",today:"今天",cancel:"取消",clear:"清空",confirm:"确定",dateTablePrompt:"使用方向键与 Enter 键可选择日期",monthTablePrompt:"使用方向键与 Enter 键可选择月份",yearTablePrompt:"使用方向键与 Enter 键可选择年份",selectedDate:"已选日期",selectDate:"选择日期",selectTime:"选择时间",startDate:"开始日期",startTime:"开始时间",endDate:"结束日期",endTime:"结束时间",prevYear:"前一年",nextYear:"后一年",prevMonth:"上个月",nextMonth:"下个月",year:"年",month1:"1 月",month2:"2 月",month3:"3 月",month4:"4 月",month5:"5 月",month6:"6 月",month7:"7 月",month8:"8 月",month9:"9 月",month10:"10 月",month11:"11 月",month12:"12 月",weeks:{sun:"日",mon:"一",tue:"二",wed:"三",thu:"四",fri:"五",sat:"六"},weeksFull:{sun:"星期日",mon:"星期一",tue:"星期二",wed:"星期三",thu:"星期四",fri:"星期五",sat:"星期六"},months:{jan:"一月",feb:"二月",mar:"三月",apr:"四月",may:"五月",jun:"六月",jul:"七月",aug:"八月",sep:"九月",oct:"十月",nov:"十一月",dec:"十二月"}},inputNumber:{decrease:"减少数值",increase:"增加数值"},select:{loading:"加载中",noMatch:"无匹配数据",noData:"无数据",placeholder:"请选择"},mention:{loading:"加载中"},dropdown:{toggleDropdown:"切换下拉选项"},cascader:{noMatch:"无匹配数据",loading:"加载中",placeholder:"请选择",noData:"暂无数据"},pagination:{goto:"前往",pagesize:"条/页",total:"共 {total} 条",pageClassifier:"页",page:"页",prev:"上一页",next:"下一页",currentPage:"第 {pager} 页",prevPages:"向前 {pager} 页",nextPages:"向后 {pager} 页",deprecationWarning:"你使用了一些已被废弃的用法,请参考 el-pagination 的官方文档"},dialog:{close:"关闭此对话框"},drawer:{close:"关闭此对话框"},messagebox:{title:"提示",confirm:"确定",cancel:"取消",error:"输入的数据不合法!",close:"关闭此对话框"},upload:{deleteTip:"按 Delete 键可删除",delete:"删除",preview:"查看图片",continue:"继续上传"},slider:{defaultLabel:"滑块介于 {min} 至 {max}",defaultRangeStartLabel:"选择起始值",defaultRangeEndLabel:"选择结束值"},table:{emptyText:"暂无数据",confirmFilter:"筛选",resetFilter:"重置",clearFilter:"全部",sumText:"合计",selectAllLabel:"选择所有行",selectRowLabel:"选择当前行",expandRowLabel:"展开当前行",collapseRowLabel:"收起当前行",sortLabel:"按 {column} 排序",filterLabel:"按 {column} 过滤"},tag:{close:"关闭此标签"},tour:{next:"下一步",previous:"上一步",finish:"结束导览",close:"关闭此对话框"},tree:{emptyText:"暂无数据"},transfer:{noMatch:"无匹配数据",noData:"无数据",titles:["列表 1","列表 2"],filterPlaceholder:"请输入搜索内容",noCheckedFormat:"共 {total} 项",hasCheckedFormat:"已选 {checked}/{total} 项"},image:{error:"加载失败"},pageHeader:{title:"返回"},popconfirm:{confirmButtonText:"确定",cancelButtonText:"取消"},carousel:{leftArrow:"上一张幻灯片",rightArrow:"下一张幻灯片",indicator:"幻灯片切换至索引 {index}"}}};function jWe(t,e){typeof console<"u"&&(console.warn("[intlify] "+t),e&&console.warn(e.stack))}const W2=typeof window<"u",Nh=(t,e=!1)=>e?Symbol.for(t):Symbol(t),KWe=(t,e,n)=>qWe({l:t,k:e,s:n}),qWe=t=>JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),dr=t=>typeof t=="number"&&isFinite(t),YWe=t=>BP(t)==="[object Date]",Pg=t=>BP(t)==="[object RegExp]",mS=t=>Gi(t)&&Object.keys(t).length===0,Ir=Object.assign,XWe=Object.create,As=(t=null)=>XWe(t);let jD;const Lf=()=>jD||(jD=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:As());function KD(t){return t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'").replace(/\//g,"/").replace(/=/g,"=")}function qD(t){return t.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function ZWe(t){return t=t.replace(/(\w+)\s*=\s*"([^"]*)"/g,(i,s,r)=>`${s}="${qD(r)}"`),t=t.replace(/(\w+)\s*=\s*'([^']*)'/g,(i,s,r)=>`${s}='${qD(r)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(t)&&(t=t.replace(/(\s+)(on)(\w+\s*=)/gi,"$1on$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(i=>{t=t.replace(i,"$1javascript:")}),t}const JWe=Object.prototype.hasOwnProperty;function Dl(t,e){return JWe.call(t,e)}const ir=Array.isArray,Vs=t=>typeof t=="function",Bn=t=>typeof t=="string",os=t=>typeof t=="boolean",ds=t=>t!==null&&typeof t=="object",QWe=t=>ds(t)&&Vs(t.then)&&Vs(t.catch),_K=Object.prototype.toString,BP=t=>_K.call(t),Gi=t=>BP(t)==="[object Object]",eGe=t=>t==null?"":ir(t)||Gi(t)&&t.toString===_K?JSON.stringify(t,null,2):String(t);function FP(t,e=""){return t.reduce((n,i,s)=>s===0?n+i:n+e+i,"")}const M_=t=>!ds(t)||ir(t);function Rw(t,e){if(M_(t)||M_(e))throw new Error("Invalid value");const n=[{src:t,des:e}];for(;n.length;){const{src:i,des:s}=n.pop();Object.keys(i).forEach(r=>{r!=="__proto__"&&(ds(i[r])&&!ds(s[r])&&(s[r]=Array.isArray(i[r])?[]:As()),M_(s[r])||M_(i[r])?s[r]=i[r]:n.push({src:i[r],des:s[r]}))})}}function tGe(t,e,n){return{line:t,column:e,offset:n}}function Z3(t,e,n){return{start:t,end:e}}const ys={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},nGe=17;function gS(t,e,n={}){const{domain:i,messages:s,args:r}=n,o=t,a=new SyntaxError(String(o));return a.code=t,e&&(a.location=e),a.domain=i,a}function iGe(t){throw t}const Tu=" ",sGe="\r",Fo=` `,rGe="\u2028",oGe="\u2029";function aGe(t){const e=t;let n=0,i=1,s=1,r=0;const o=A=>e[A]===sGe&&e[A+1]===Fo,a=A=>e[A]===Fo,l=A=>e[A]===oGe,c=A=>e[A]===rGe,u=A=>o(A)||a(A)||l(A)||c(A),d=()=>n,h=()=>i,f=()=>s,p=()=>r,m=A=>o(A)||l(A)||c(A)?Fo:e[A],b=()=>m(n),g=()=>m(n+r);function x(){return r=0,u(n)&&(i++,s=0),o(n)&&n++,n++,s++,e[n]}function S(){return o(n+r)&&r++,r++,e[n+r]}function _(){n=0,i=1,s=1,r=0}function E(A=0){r=A}function T(){const A=n+r;for(;A!==n;)x();r=0}return{index:d,line:h,column:f,peekOffset:p,charAt:m,currentChar:b,currentPeek:g,next:x,peek:S,reset:_,resetPeek:E,skipToPeek:T}}const zd=void 0,lGe=".",YD="'",cGe="tokenizer";function uGe(t,e={}){const n=e.location!==!1,i=aGe(t),s=()=>i.index(),r=()=>tGe(i.line(),i.column(),i.index()),o=r(),a=s(),l={currentType:13,offset:a,startLoc:o,endLoc:o,lastType:13,lastOffset:a,lastStartLoc:o,lastEndLoc:o,braceNest:0,inLinked:!1,text:""},c=()=>l,{onError:u}=e;function d(j,he,be,...re){const le=c();if(he.column+=be,he.offset+=be,u){const Ce=n?Z3(le.startLoc,he):null,Ee=gS(j,Ce,{domain:cGe,args:re});u(Ee)}}function h(j,he,be){j.endLoc=r(),j.currentType=he;const re={type:he};return n&&(re.loc=Z3(j.startLoc,j.endLoc)),be!=null&&(re.value=be),re}const f=j=>h(j,13);function p(j,he){return j.currentChar()===he?(j.next(),he):(d(ys.EXPECTED_TOKEN,r(),0,he),"")}function m(j){let he="";for(;j.currentPeek()===Tu||j.currentPeek()===Fo;)he+=j.currentPeek(),j.peek();return he}function b(j){const he=m(j);return j.skipToPeek(),he}function g(j){if(j===zd)return!1;const he=j.charCodeAt(0);return he>=97&&he<=122||he>=65&&he<=90||he===95}function x(j){if(j===zd)return!1;const he=j.charCodeAt(0);return he>=48&&he<=57}function S(j,he){const{currentType:be}=he;if(be!==2)return!1;m(j);const re=g(j.currentPeek());return j.resetPeek(),re}function _(j,he){const{currentType:be}=he;if(be!==2)return!1;m(j);const re=j.currentPeek()==="-"?j.peek():j.currentPeek(),le=x(re);return j.resetPeek(),le}function E(j,he){const{currentType:be}=he;if(be!==2)return!1;m(j);const re=j.currentPeek()===YD;return j.resetPeek(),re}function T(j,he){const{currentType:be}=he;if(be!==7)return!1;m(j);const re=j.currentPeek()===".";return j.resetPeek(),re}function A(j,he){const{currentType:be}=he;if(be!==8)return!1;m(j);const re=g(j.currentPeek());return j.resetPeek(),re}function I(j,he){const{currentType:be}=he;if(!(be===7||be===11))return!1;m(j);const re=j.currentPeek()===":";return j.resetPeek(),re}function P(j,he){const{currentType:be}=he;if(be!==9)return!1;const re=()=>{const Ce=j.currentPeek();return Ce==="{"?g(j.peek()):Ce==="@"||Ce==="|"||Ce===":"||Ce==="."||Ce===Tu||!Ce?!1:Ce===Fo?(j.peek(),re()):B(j,!1)},le=re();return j.resetPeek(),le}function k(j){m(j);const he=j.currentPeek()==="|";return j.resetPeek(),he}function B(j,he=!0){const be=(le=!1,Ce="")=>{const Ee=j.currentPeek();return Ee==="{"||Ee==="@"||!Ee?le:Ee==="|"?!(Ce===Tu||Ce===Fo):Ee===Tu?(j.peek(),be(!0,Tu)):Ee===Fo?(j.peek(),be(!0,Fo)):!0},re=be();return he&&j.resetPeek(),re}function R(j,he){const be=j.currentChar();return be===zd?zd:he(be)?(j.next(),be):null}function H(j){const he=j.charCodeAt(0);return he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95||he===36}function q(j){return R(j,H)}function oe(j){const he=j.charCodeAt(0);return he>=97&&he<=122||he>=65&&he<=90||he>=48&&he<=57||he===95||he===36||he===45}function Z(j){return R(j,oe)}function V(j){const he=j.charCodeAt(0);return he>=48&&he<=57}function D(j){return R(j,V)}function K(j){const he=j.charCodeAt(0);return he>=48&&he<=57||he>=65&&he<=70||he>=97&&he<=102}function W(j){return R(j,K)}function Q(j){let he="",be="";for(;he=D(j);)be+=he;return be}function ie(j){let he="";for(;;){const be=j.currentChar();if(be==="{"||be==="}"||be==="@"||be==="|"||!be)break;if(be===Tu||be===Fo)if(B(j))he+=be,j.next();else{if(k(j))break;he+=be,j.next()}else he+=be,j.next()}return he}function ne(j){b(j);let he="",be="";for(;he=Z(j);)be+=he;return j.currentChar()===zd&&d(ys.UNTERMINATED_CLOSING_BRACE,r(),0),be}function ce(j){b(j);let he="";return j.currentChar()==="-"?(j.next(),he+=`-${Q(j)}`):he+=Q(j),j.currentChar()===zd&&d(ys.UNTERMINATED_CLOSING_BRACE,r(),0),he}function ae(j){return j!==YD&&j!==Fo}function _e(j){b(j),p(j,"'");let he="",be="";for(;he=R(j,ae);)he==="\\"?be+=ke(j):be+=he;const re=j.currentChar();return re===Fo||re===zd?(d(ys.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,r(),0),re===Fo&&(j.next(),p(j,"'")),be):(p(j,"'"),be)}function ke(j){const he=j.currentChar();switch(he){case"\\":case"'":return j.next(),`\\${he}`;case"u":return Te(j,he,4);case"U":return Te(j,he,6);default:return d(ys.UNKNOWN_ESCAPE_SEQUENCE,r(),0,he),""}}function Te(j,he,be){p(j,he);let re="";for(let le=0;le{const re=j.currentChar();return re==="{"||re==="@"||re==="|"||re==="("||re===")"||!re||re===Tu?be:(be+=re,j.next(),he(be))};return he("")}function Me(j){b(j);const he=p(j,"|");return b(j),he}function ge(j,he){let be=null;switch(j.currentChar()){case"{":return he.braceNest>=1&&d(ys.NOT_ALLOW_NEST_PLACEHOLDER,r(),0),j.next(),be=h(he,2,"{"),b(j),he.braceNest++,be;case"}":return he.braceNest>0&&he.currentType===2&&d(ys.EMPTY_PLACEHOLDER,r(),0),j.next(),be=h(he,3,"}"),he.braceNest--,he.braceNest>0&&b(j),he.inLinked&&he.braceNest===0&&(he.inLinked=!1),be;case"@":return he.braceNest>0&&d(ys.UNTERMINATED_CLOSING_BRACE,r(),0),be=Qe(j,he)||f(he),he.braceNest=0,be;default:{let le=!0,Ce=!0,Ee=!0;if(k(j))return he.braceNest>0&&d(ys.UNTERMINATED_CLOSING_BRACE,r(),0),be=h(he,1,Me(j)),he.braceNest=0,he.inLinked=!1,be;if(he.braceNest>0&&(he.currentType===4||he.currentType===5||he.currentType===6))return d(ys.UNTERMINATED_CLOSING_BRACE,r(),0),he.braceNest=0,G(j,he);if(le=S(j,he))return be=h(he,4,ne(j)),b(j),be;if(Ce=_(j,he))return be=h(he,5,ce(j)),b(j),be;if(Ee=E(j,he))return be=h(he,6,_e(j)),b(j),be;if(!le&&!Ce&&!Ee)return be=h(he,12,Fe(j)),d(ys.INVALID_TOKEN_IN_PLACEHOLDER,r(),0,be.value),b(j),be;break}}return be}function Qe(j,he){const{currentType:be}=he;let re=null;const le=j.currentChar();switch((be===7||be===8||be===11||be===9)&&(le===Fo||le===Tu)&&d(ys.INVALID_LINKED_FORMAT,r(),0),le){case"@":return j.next(),re=h(he,7,"@"),he.inLinked=!0,re;case".":return b(j),j.next(),h(he,8,".");case":":return b(j),j.next(),h(he,9,":");default:return k(j)?(re=h(he,1,Me(j)),he.braceNest=0,he.inLinked=!1,re):T(j,he)||I(j,he)?(b(j),Qe(j,he)):A(j,he)?(b(j),h(he,11,ve(j))):P(j,he)?(b(j),le==="{"?ge(j,he)||re:h(he,10,fe(j))):(be===7&&d(ys.INVALID_LINKED_FORMAT,r(),0),he.braceNest=0,he.inLinked=!1,G(j,he))}}function G(j,he){let be={type:13};if(he.braceNest>0)return ge(j,he)||f(he);if(he.inLinked)return Qe(j,he)||f(he);switch(j.currentChar()){case"{":return ge(j,he)||f(he);case"}":return d(ys.UNBALANCED_CLOSING_BRACE,r(),0),j.next(),h(he,3,"}");case"@":return Qe(j,he)||f(he);default:{if(k(j))return be=h(he,1,Me(j)),he.braceNest=0,he.inLinked=!1,be;if(B(j))return h(he,0,ie(j));break}}return be}function ee(){const{currentType:j,offset:he,startLoc:be,endLoc:re}=l;return l.lastType=j,l.lastOffset=he,l.lastStartLoc=be,l.lastEndLoc=re,l.offset=s(),l.startLoc=r(),i.currentChar()===zd?h(l,13):G(i,l)}return{nextToken:ee,currentOffset:s,currentPosition:r,context:c}}const dGe="parser",hGe=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g;function fGe(t,e,n){switch(t){case"\\\\":return"\\";case"\\'":return"'";default:{const i=parseInt(e||n,16);return i<=55295||i>=57344?String.fromCodePoint(i):"�"}}}function pGe(t={}){const e=t.location!==!1,{onError:n}=t;function i(g,x,S,_,...E){const T=g.currentPosition();if(T.offset+=_,T.column+=_,n){const A=e?Z3(S,T):null,I=gS(x,A,{domain:dGe,args:E});n(I)}}function s(g,x,S){const _={type:g};return e&&(_.start=x,_.end=x,_.loc={start:S,end:S}),_}function r(g,x,S,_){e&&(g.end=x,g.loc&&(g.loc.end=S))}function o(g,x){const S=g.context(),_=s(3,S.offset,S.startLoc);return _.value=x,r(_,g.currentOffset(),g.currentPosition()),_}function a(g,x){const S=g.context(),{lastOffset:_,lastStartLoc:E}=S,T=s(5,_,E);return T.index=parseInt(x,10),g.nextToken(),r(T,g.currentOffset(),g.currentPosition()),T}function l(g,x){const S=g.context(),{lastOffset:_,lastStartLoc:E}=S,T=s(4,_,E);return T.key=x,g.nextToken(),r(T,g.currentOffset(),g.currentPosition()),T}function c(g,x){const S=g.context(),{lastOffset:_,lastStartLoc:E}=S,T=s(9,_,E);return T.value=x.replace(hGe,fGe),g.nextToken(),r(T,g.currentOffset(),g.currentPosition()),T}function u(g){const x=g.nextToken(),S=g.context(),{lastOffset:_,lastStartLoc:E}=S,T=s(8,_,E);return x.type!==11?(i(g,ys.UNEXPECTED_EMPTY_LINKED_MODIFIER,S.lastStartLoc,0),T.value="",r(T,_,E),{nextConsumeToken:x,node:T}):(x.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,bc(x)),T.value=x.value||"",r(T,g.currentOffset(),g.currentPosition()),{node:T})}function d(g,x){const S=g.context(),_=s(7,S.offset,S.startLoc);return _.value=x,r(_,g.currentOffset(),g.currentPosition()),_}function h(g){const x=g.context(),S=s(6,x.offset,x.startLoc);let _=g.nextToken();if(_.type===8){const E=u(g);S.modifier=E.node,_=E.nextConsumeToken||g.nextToken()}switch(_.type!==9&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(_)),_=g.nextToken(),_.type===2&&(_=g.nextToken()),_.type){case 10:_.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(_)),S.key=d(g,_.value||"");break;case 4:_.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(_)),S.key=l(g,_.value||"");break;case 5:_.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(_)),S.key=a(g,_.value||"");break;case 6:_.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(_)),S.key=c(g,_.value||"");break;default:{i(g,ys.UNEXPECTED_EMPTY_LINKED_KEY,x.lastStartLoc,0);const E=g.context(),T=s(7,E.offset,E.startLoc);return T.value="",r(T,E.offset,E.startLoc),S.key=T,r(S,E.offset,E.startLoc),{nextConsumeToken:_,node:S}}}return r(S,g.currentOffset(),g.currentPosition()),{node:S}}function f(g){const x=g.context(),S=x.currentType===1?g.currentOffset():x.offset,_=x.currentType===1?x.endLoc:x.startLoc,E=s(2,S,_);E.items=[];let T=null;do{const P=T||g.nextToken();switch(T=null,P.type){case 0:P.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(P)),E.items.push(o(g,P.value||""));break;case 5:P.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(P)),E.items.push(a(g,P.value||""));break;case 4:P.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(P)),E.items.push(l(g,P.value||""));break;case 6:P.value==null&&i(g,ys.UNEXPECTED_LEXICAL_ANALYSIS,x.lastStartLoc,0,bc(P)),E.items.push(c(g,P.value||""));break;case 7:{const k=h(g);E.items.push(k.node),T=k.nextConsumeToken||null;break}}}while(x.currentType!==13&&x.currentType!==1);const A=x.currentType===1?x.lastOffset:g.currentOffset(),I=x.currentType===1?x.lastEndLoc:g.currentPosition();return r(E,A,I),E}function p(g,x,S,_){const E=g.context();let T=_.items.length===0;const A=s(1,x,S);A.cases=[],A.cases.push(_);do{const I=f(g);T||(T=I.items.length===0),A.cases.push(I)}while(E.currentType!==13);return T&&i(g,ys.MUST_HAVE_MESSAGES_IN_PLURAL,S,0),r(A,g.currentOffset(),g.currentPosition()),A}function m(g){const x=g.context(),{offset:S,startLoc:_}=x,E=f(g);return x.currentType===13?E:p(g,S,_,E)}function b(g){const x=uGe(g,Ir({},t)),S=x.context(),_=s(0,S.offset,S.startLoc);return e&&_.loc&&(_.loc.source=g),_.body=m(x),t.onCacheKey&&(_.cacheKey=t.onCacheKey(g)),S.currentType!==13&&i(x,ys.UNEXPECTED_LEXICAL_ANALYSIS,S.lastStartLoc,0,g[S.offset]||""),r(_,x.currentOffset(),x.currentPosition()),_}return{parse:b}}function bc(t){if(t.type===13)return"EOF";const e=(t.value||"").replace(/\r?\n/gu,"\\n");return e.length>10?e.slice(0,9)+"…":e}function mGe(t,e={}){const n={ast:t,helpers:new Set};return{context:()=>n,helper:r=>(n.helpers.add(r),r)}}function XD(t,e){for(let n=0;nZD(n)),t}function ZD(t){if(t.items.length===1){const e=t.items[0];(e.type===3||e.type===9)&&(t.static=e.value,delete e.value)}else{const e=[];for(let n=0;no;function l(m,b){o.code+=m}function c(m,b=!0){const g=b?i:"";l(s?g+" ".repeat(m):g)}function u(m=!0){const b=++o.indentLevel;m&&c(b)}function d(m=!0){const b=--o.indentLevel;m&&c(b)}function h(){c(o.indentLevel)}return{context:a,push:l,indent:u,deindent:d,newline:h,helper:m=>`_${m}`,needIndent:()=>o.needIndent}}function bGe(t,e){const{helper:n}=t;t.push(`${n("linked")}(`),Lg(t,e.key),e.modifier?(t.push(", "),Lg(t,e.modifier),t.push(", _type")):t.push(", undefined, _type"),t.push(")")}function _Ge(t,e){const{helper:n,needIndent:i}=t;t.push(`${n("normalize")}([`),t.indent(i());const s=e.items.length;for(let r=0;r1){t.push(`${n("plural")}([`),t.indent(i());const s=e.cases.length;for(let r=0;r{const n=Bn(e.mode)?e.mode:"normal",i=Bn(e.filename)?e.filename:"message.intl";e.sourceMap;const s=e.breakLineCode!=null?e.breakLineCode:n==="arrow"?";":` `,r=e.needIndent?e.needIndent:n!=="arrow",o=t.helpers||[],a=yGe(t,{filename:i,breakLineCode:s,needIndent:r});a.push(n==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),a.indent(r),o.length>0&&(a.push(`const { ${FP(o.map(u=>`${u}: _${u}`),", ")} } = ctx`),a.newline()),a.push("return "),Lg(a,t),a.deindent(r),a.push("}"),delete t.helpers;const{code:l,map:c}=a.context();return{ast:t,code:l,map:c?c.toJSON():void 0}};function EGe(t,e={}){const n=Ir({},e),i=!!n.jit,s=!!n.minify,r=n.optimize==null?!0:n.optimize,a=pGe(n).parse(t);return i?(r&&vGe(a),s&&Pm(a),{ast:a,code:""}):(gGe(a,n),SGe(a,n))}function CGe(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Lf().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Lf().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function $c(t){return ds(t)&&UP(t)===0&&(Dl(t,"b")||Dl(t,"body"))}const wK=["b","body"];function TGe(t){return Bh(t,wK)}const xK=["c","cases"];function MGe(t){return Bh(t,xK,[])}const SK=["s","static"];function AGe(t){return Bh(t,SK)}const EK=["i","items"];function kGe(t){return Bh(t,EK,[])}const CK=["t","type"];function UP(t){return Bh(t,CK)}const TK=["v","value"];function A_(t,e){const n=Bh(t,TK);if(n!=null)return n;throw Ey(e)}const MK=["m","modifier"];function PGe(t){return Bh(t,MK)}const AK=["k","key"];function LGe(t){const e=Bh(t,AK);if(e)return e;throw Ey(6)}function Bh(t,e,n){for(let i=0;iIGe(n,t)}function IGe(t,e){const n=TGe(e);if(n==null)throw Ey(0);if(UP(n)===1){const r=MGe(n);return t.plural(r.reduce((o,a)=>[...o,JD(t,a)],[]))}else return JD(t,n)}function JD(t,e){const n=AGe(e);if(n!=null)return t.type==="text"?n:t.normalize([n]);{const i=kGe(e).reduce((s,r)=>[...s,J3(t,r)],[]);return t.normalize(i)}}function J3(t,e){const n=UP(e);switch(n){case 3:return A_(e,n);case 9:return A_(e,n);case 4:{const i=e;if(Dl(i,"k")&&i.k)return t.interpolate(t.named(i.k));if(Dl(i,"key")&&i.key)return t.interpolate(t.named(i.key));throw Ey(n)}case 5:{const i=e;if(Dl(i,"i")&&dr(i.i))return t.interpolate(t.list(i.i));if(Dl(i,"index")&&dr(i.index))return t.interpolate(t.list(i.index));throw Ey(n)}case 6:{const i=e,s=PGe(i),r=LGe(i);return t.linked(J3(t,r),s?J3(t,s):void 0,t.type)}case 7:return A_(e,n);case 8:return A_(e,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}const RGe=t=>t;let k_=As();function OGe(t,e={}){let n=!1;const i=e.onError||iGe;return e.onError=s=>{n=!0,i(s)},{...EGe(t,e),detectError:n}}function DGe(t,e){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Bn(t)){os(e.warnHtmlMessage)&&e.warnHtmlMessage;const i=(e.onCacheKey||RGe)(t),s=k_[i];if(s)return s;const{ast:r,detectError:o}=OGe(t,{...e,location:!1,jit:!0}),a=YC(r);return o?a:k_[i]=a}else{const n=t.cacheKey;if(n){const i=k_[n];return i||(k_[n]=YC(t))}else return YC(t)}}let Cy=null;function NGe(t){Cy=t}function BGe(t,e,n){Cy&&Cy.emit("i18n:init",{timestamp:Date.now(),i18n:t,version:e,meta:n})}const FGe=zGe("function:translate");function zGe(t){return e=>Cy&&Cy.emit(t,e)}const Vu={INVALID_ARGUMENT:nGe,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},UGe=24;function Hu(t){return gS(t,null,void 0)}function $P(t,e){return e.locale!=null?QD(e.locale):QD(t.locale)}let XC;function QD(t){if(Bn(t))return t;if(Vs(t)){if(t.resolvedOnce&&XC!=null)return XC;if(t.constructor.name==="Function"){const e=t();if(QWe(e))throw Hu(Vu.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return XC=e}else throw Hu(Vu.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw Hu(Vu.NOT_SUPPORT_LOCALE_TYPE)}function $Ge(t,e,n){return[...new Set([n,...ir(e)?e:ds(e)?Object.keys(e):Bn(e)?[e]:[n]])]}function PK(t,e,n){const i=Bn(n)?n:Ty,s=t;s.__localeChainCache||(s.__localeChainCache=new Map);let r=s.__localeChainCache.get(i);if(!r){r=[];let o=[n];for(;ir(o);)o=eN(r,o,e);const a=ir(e)||!Gi(e)?e:e.default?e.default:null;o=Bn(a)?[a]:a,ir(o)&&eN(r,o,!1),s.__localeChainCache.set(i,r)}return r}function eN(t,e,n){let i=!0;for(let s=0;s{o===void 0?o=a:o+=a},h[1]=()=>{o!==void 0&&(e.push(o),o=void 0)},h[2]=()=>{h[0](),s++},h[3]=()=>{if(s>0)s--,i=4,h[0]();else{if(s=0,o===void 0||(o=qGe(o),o===!1))return!1;h[1]()}};function f(){const p=t[n+1];if(i===5&&p==="'"||i===6&&p==='"')return n++,a="\\"+p,h[0](),!0}for(;i!==null;)if(n++,r=t[n],!(r==="\\"&&f())){if(l=KGe(r),d=Fh[i],c=d[l]||d.l||8,c===8||(i=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(a=r,u()===!1))))return;if(i===7)return e}}const tN=new Map;function XGe(t,e){return ds(t)?t[e]:null}function ZGe(t,e){if(!ds(t))return null;let n=tN.get(e);if(n||(n=YGe(e),n&&tN.set(e,n)),!n)return null;const i=n.length;let s=t,r=0;for(;r`${t.charAt(0).toLocaleUpperCase()}${t.substr(1)}`;function QGe(){return{upper:(t,e)=>e==="text"&&Bn(t)?t.toUpperCase():e==="vnode"&&ds(t)&&"__v_isVNode"in t?t.children.toUpperCase():t,lower:(t,e)=>e==="text"&&Bn(t)?t.toLowerCase():e==="vnode"&&ds(t)&&"__v_isVNode"in t?t.children.toLowerCase():t,capitalize:(t,e)=>e==="text"&&Bn(t)?iN(t):e==="vnode"&&ds(t)&&"__v_isVNode"in t?iN(t.children):t}}let LK;function eje(t){LK=t}let IK;function tje(t){IK=t}let RK;function nje(t){RK=t}let OK=null;const ije=t=>{OK=t},sje=()=>OK;let DK=null;const sN=t=>{DK=t},rje=()=>DK;let rN=0;function oje(t={}){const e=Vs(t.onWarn)?t.onWarn:jWe,n=Bn(t.version)?t.version:JGe,i=Bn(t.locale)||Vs(t.locale)?t.locale:Ty,s=Vs(i)?Ty:i,r=ir(t.fallbackLocale)||Gi(t.fallbackLocale)||Bn(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:s,o=Gi(t.messages)?t.messages:ZC(s),a=Gi(t.datetimeFormats)?t.datetimeFormats:ZC(s),l=Gi(t.numberFormats)?t.numberFormats:ZC(s),c=Ir(As(),t.modifiers,QGe()),u=t.pluralRules||As(),d=Vs(t.missing)?t.missing:null,h=os(t.missingWarn)||Pg(t.missingWarn)?t.missingWarn:!0,f=os(t.fallbackWarn)||Pg(t.fallbackWarn)?t.fallbackWarn:!0,p=!!t.fallbackFormat,m=!!t.unresolving,b=Vs(t.postTranslation)?t.postTranslation:null,g=Gi(t.processor)?t.processor:null,x=os(t.warnHtmlMessage)?t.warnHtmlMessage:!0,S=!!t.escapeParameter,_=Vs(t.messageCompiler)?t.messageCompiler:LK,E=Vs(t.messageResolver)?t.messageResolver:IK||XGe,T=Vs(t.localeFallbacker)?t.localeFallbacker:RK||$Ge,A=ds(t.fallbackContext)?t.fallbackContext:void 0,I=t,P=ds(I.__datetimeFormatters)?I.__datetimeFormatters:new Map,k=ds(I.__numberFormatters)?I.__numberFormatters:new Map,B=ds(I.__meta)?I.__meta:{};rN++;const R={version:n,cid:rN,locale:i,fallbackLocale:r,messages:o,modifiers:c,pluralRules:u,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:m,postTranslation:b,processor:g,warnHtmlMessage:x,escapeParameter:S,messageCompiler:_,messageResolver:E,localeFallbacker:T,fallbackContext:A,onWarn:e,__meta:B};return R.datetimeFormats=a,R.numberFormats=l,R.__datetimeFormatters=P,R.__numberFormatters=k,__INTLIFY_PROD_DEVTOOLS__&&BGe(R,n,B),R}const ZC=t=>({[t]:As()});function VP(t,e,n,i,s){const{missing:r,onWarn:o}=t;if(r!==null){const a=r(t,n,e,s);return Bn(a)?a:e}else return e}function Bv(t,e,n){const i=t;i.__localeChainCache=new Map,t.localeFallbacker(t,n,e)}function aje(t,e){return t===e?!1:t.split("-")[0]===e.split("-")[0]}function lje(t,e){const n=e.indexOf(t);if(n===-1)return!1;for(let i=n+1;i{NK.includes(l)?o[l]=n[l]:r[l]=n[l]}),Bn(i)?r.locale=i:Gi(i)&&(o=i),Gi(s)&&(o=s),[r.key||"",a,r,o]}function aN(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__datetimeFormatters.has(r)&&i.__datetimeFormatters.delete(r)}}function lN(t,...e){const{numberFormats:n,unresolving:i,fallbackLocale:s,onWarn:r,localeFallbacker:o}=t,{__numberFormatters:a}=t,[l,c,u,d]=eA(...e),h=os(u.missingWarn)?u.missingWarn:t.missingWarn;os(u.fallbackWarn)?u.fallbackWarn:t.fallbackWarn;const f=!!u.part,p=$P(t,u),m=o(t,s,p);if(!Bn(l)||l==="")return new Intl.NumberFormat(p,d).format(c);let b={},g,x=null;const S="number format";for(let T=0;T{BK.includes(l)?o[l]=n[l]:r[l]=n[l]}),Bn(i)?r.locale=i:Gi(i)&&(o=i),Gi(s)&&(o=s),[r.key||"",a,r,o]}function cN(t,e,n){const i=t;for(const s in n){const r=`${e}__${s}`;i.__numberFormatters.has(r)&&i.__numberFormatters.delete(r)}}const cje=t=>t,uje=t=>"",dje="text",hje=t=>t.length===0?"":FP(t),fje=eGe;function uN(t,e){return t=Math.abs(t),e===2?t?t>1?1:0:1:t?Math.min(t,2):0}function pje(t){const e=dr(t.pluralIndex)?t.pluralIndex:-1;return t.named&&(dr(t.named.count)||dr(t.named.n))?dr(t.named.count)?t.named.count:dr(t.named.n)?t.named.n:e:e}function mje(t,e){e.count||(e.count=t),e.n||(e.n=t)}function gje(t={}){const e=t.locale,n=pje(t),i=ds(t.pluralRules)&&Bn(e)&&Vs(t.pluralRules[e])?t.pluralRules[e]:uN,s=ds(t.pluralRules)&&Bn(e)&&Vs(t.pluralRules[e])?uN:void 0,r=g=>g[i(n,g.length,s)],o=t.list||[],a=g=>o[g],l=t.named||As();dr(t.pluralIndex)&&mje(n,l);const c=g=>l[g];function u(g,x){const S=Vs(t.messages)?t.messages(g,!!x):ds(t.messages)?t.messages[g]:!1;return S||(t.parent?t.parent.message(g):uje)}const d=g=>t.modifiers?t.modifiers[g]:cje,h=Gi(t.processor)&&Vs(t.processor.normalize)?t.processor.normalize:hje,f=Gi(t.processor)&&Vs(t.processor.interpolate)?t.processor.interpolate:fje,p=Gi(t.processor)&&Bn(t.processor.type)?t.processor.type:dje,b={list:a,named:c,plural:r,linked:(g,...x)=>{const[S,_]=x;let E="text",T="";x.length===1?ds(S)?(T=S.modifier||T,E=S.type||E):Bn(S)&&(T=S||T):x.length===2&&(Bn(S)&&(T=S||T),Bn(_)&&(E=_||E));const A=u(g,!0)(b),I=E==="vnode"&&ir(A)&&T?A[0]:A;return T?d(T)(I,E):I},message:u,type:p,interpolate:f,normalize:h,values:Ir(As(),o,l)};return b}const dN=()=>"",el=t=>Vs(t);function hN(t,...e){const{fallbackFormat:n,postTranslation:i,unresolving:s,messageCompiler:r,fallbackLocale:o,messages:a}=t,[l,c]=tA(...e),u=os(c.missingWarn)?c.missingWarn:t.missingWarn,d=os(c.fallbackWarn)?c.fallbackWarn:t.fallbackWarn,h=os(c.escapeParameter)?c.escapeParameter:t.escapeParameter,f=!!c.resolvedMessage,p=Bn(c.default)||os(c.default)?os(c.default)?r?l:()=>l:c.default:n?r?l:()=>l:null,m=n||p!=null&&(Bn(p)||Vs(p)),b=$P(t,c);h&&vje(c);let[g,x,S]=f?[l,b,a[b]||As()]:FK(t,l,b,o,d,u),_=g,E=l;if(!f&&!(Bn(_)||$c(_)||el(_))&&m&&(_=p,E=_),!f&&(!(Bn(_)||$c(_)||el(_))||!Bn(x)))return s?vS:l;let T=!1;const A=()=>{T=!0},I=el(_)?_:zK(t,l,x,_,E,A);if(T)return _;const P=_je(t,x,S,c),k=gje(P),B=yje(t,I,k);let R=i?i(B,l):B;if(h&&Bn(R)&&(R=ZWe(R)),__INTLIFY_PROD_DEVTOOLS__){const H={timestamp:Date.now(),key:Bn(l)?l:el(_)?_.key:"",locale:x||(el(_)?_.locale:""),format:Bn(_)?_:el(_)?_.source:"",message:R};H.meta=Ir({},t.__meta,sje()||{}),FGe(H)}return R}function vje(t){ir(t.list)?t.list=t.list.map(e=>Bn(e)?KD(e):e):ds(t.named)&&Object.keys(t.named).forEach(e=>{Bn(t.named[e])&&(t.named[e]=KD(t.named[e]))})}function FK(t,e,n,i,s,r){const{messages:o,onWarn:a,messageResolver:l,localeFallbacker:c}=t,u=c(t,i,n);let d=As(),h,f=null;const p="translate";for(let m=0;mi);return c.locale=n,c.key=e,c}const l=o(i,bje(t,n,s,i,a,r));return l.locale=n,l.key=e,l.source=i,l}function yje(t,e,n){return e(n)}function tA(...t){const[e,n,i]=t,s=As();if(!Bn(e)&&!dr(e)&&!el(e)&&!$c(e))throw Hu(Vu.INVALID_ARGUMENT);const r=dr(e)?String(e):(el(e),e);return dr(n)?s.plural=n:Bn(n)?s.default=n:Gi(n)&&!mS(n)?s.named=n:ir(n)&&(s.list=n),dr(i)?s.plural=i:Bn(i)?s.default=i:Gi(i)&&Ir(s,i),[r,s]}function bje(t,e,n,i,s,r){return{locale:e,key:n,warnHtmlMessage:s,onError:o=>{throw r&&r(o),o},onCacheKey:o=>KWe(e,n,o)}}function _je(t,e,n,i){const{modifiers:s,pluralRules:r,messageResolver:o,fallbackLocale:a,fallbackWarn:l,missingWarn:c,fallbackContext:u}=t,h={locale:e,modifiers:s,pluralRules:r,messages:(f,p)=>{let m=o(n,f);if(m==null&&(u||p)){const[,,b]=FK(u||t,f,e,a,l,c);m=o(b,f)}if(Bn(m)||$c(m)){let b=!1;const x=zK(t,f,e,m,f,()=>{b=!0});return b?dN:x}else return el(m)?m:dN}};return t.processor&&(h.processor=t.processor),i.list&&(h.list=i.list),i.named&&(h.named=i.named),dr(i.plural)&&(h.pluralIndex=i.plural),h}CGe();const wje="10.0.8";function xje(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(Lf().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(Lf().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(Lf().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(Lf().__INTLIFY_PROD_DEVTOOLS__=!1)}const Yo={UNEXPECTED_RETURN_TYPE:UGe,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function ya(t,...e){return gS(t,null,void 0)}const nA=Nh("__translateVNode"),iA=Nh("__datetimeParts"),sA=Nh("__numberParts"),UK=Nh("__setPluralRules"),$K=Nh("__injectWithOption"),rA=Nh("__dispose");function My(t){if(!ds(t)||$c(t))return t;for(const e in t)if(Dl(t,e))if(!e.includes("."))ds(t[e])&&My(t[e]);else{const n=e.split("."),i=n.length-1;let s=t,r=!1;for(let o=0;o{if("locale"in a&&"resource"in a){const{locale:l,resource:c}=a;l?(o[l]=o[l]||As(),Rw(c,o[l])):Rw(c,o)}else Bn(a)&&Rw(JSON.parse(a),o)}),s==null&&r)for(const a in o)Dl(o,a)&&My(o[a]);return o}function VK(t){return t.type}function HK(t,e,n){let i=ds(e.messages)?e.messages:As();"__i18nGlobal"in n&&(i=HP(t.locale.value,{messages:i,__i18n:n.__i18nGlobal}));const s=Object.keys(i);s.length&&s.forEach(r=>{t.mergeLocaleMessage(r,i[r])});{if(ds(e.datetimeFormats)){const r=Object.keys(e.datetimeFormats);r.length&&r.forEach(o=>{t.mergeDateTimeFormat(o,e.datetimeFormats[o])})}if(ds(e.numberFormats)){const r=Object.keys(e.numberFormats);r.length&&r.forEach(o=>{t.mergeNumberFormat(o,e.numberFormats[o])})}}}function fN(t){return de(ap,null,t,0)}const pN="__INTLIFY_META__",mN=()=>[],Sje=()=>!1;let gN=0;function vN(t){return((e,n,i,s)=>t(n,i,xn()||void 0,s))}const Eje=()=>{const t=xn();let e=null;return t&&(e=VK(t)[pN])?{[pN]:e}:null};function WP(t={}){const{__root:e,__injectWithOption:n}=t,i=e===void 0,s=t.flatJson,r=W2?X:wi;let o=os(t.inheritLocale)?t.inheritLocale:!0;const a=r(e&&o?e.locale.value:Bn(t.locale)?t.locale:Ty),l=r(e&&o?e.fallbackLocale.value:Bn(t.fallbackLocale)||ir(t.fallbackLocale)||Gi(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:a.value),c=r(HP(a.value,t)),u=r(Gi(t.datetimeFormats)?t.datetimeFormats:{[a.value]:{}}),d=r(Gi(t.numberFormats)?t.numberFormats:{[a.value]:{}});let h=e?e.missingWarn:os(t.missingWarn)||Pg(t.missingWarn)?t.missingWarn:!0,f=e?e.fallbackWarn:os(t.fallbackWarn)||Pg(t.fallbackWarn)?t.fallbackWarn:!0,p=e?e.fallbackRoot:os(t.fallbackRoot)?t.fallbackRoot:!0,m=!!t.fallbackFormat,b=Vs(t.missing)?t.missing:null,g=Vs(t.missing)?vN(t.missing):null,x=Vs(t.postTranslation)?t.postTranslation:null,S=e?e.warnHtmlMessage:os(t.warnHtmlMessage)?t.warnHtmlMessage:!0,_=!!t.escapeParameter;const E=e?e.modifiers:Gi(t.modifiers)?t.modifiers:{};let T=t.pluralRules||e&&e.pluralRules,A;A=(()=>{i&&sN(null);const Ee={version:wje,locale:a.value,fallbackLocale:l.value,messages:c.value,modifiers:E,pluralRules:T,missing:g===null?void 0:g,missingWarn:h,fallbackWarn:f,fallbackFormat:m,unresolving:!0,postTranslation:x===null?void 0:x,warnHtmlMessage:S,escapeParameter:_,messageResolver:t.messageResolver,messageCompiler:t.messageCompiler,__meta:{framework:"vue"}};Ee.datetimeFormats=u.value,Ee.numberFormats=d.value,Ee.__datetimeFormatters=Gi(A)?A.__datetimeFormatters:void 0,Ee.__numberFormatters=Gi(A)?A.__numberFormatters:void 0;const Oe=oje(Ee);return i&&sN(Oe),Oe})(),Bv(A,a.value,l.value);function P(){return[a.value,l.value,c.value,u.value,d.value]}const k=F({get:()=>a.value,set:Ee=>{a.value=Ee,A.locale=a.value}}),B=F({get:()=>l.value,set:Ee=>{l.value=Ee,A.fallbackLocale=l.value,Bv(A,a.value,Ee)}}),R=F(()=>c.value),H=F(()=>u.value),q=F(()=>d.value);function oe(){return Vs(x)?x:null}function Z(Ee){x=Ee,A.postTranslation=Ee}function V(){return b}function D(Ee){Ee!==null&&(g=vN(Ee)),b=Ee,A.missing=g}const K=(Ee,Oe,Ge,$e,ot,dt)=>{P();let Jt;try{__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=e?rje():void 0),Jt=Ee(A)}finally{__INTLIFY_PROD_DEVTOOLS__,i||(A.fallbackContext=void 0)}if(Ge!=="translate exists"&&dr(Jt)&&Jt===vS||Ge==="translate exists"&&!Jt){const[at,Mt]=Oe();return e&&p?$e(e):ot(at)}else{if(dt(Jt))return Jt;throw ya(Yo.UNEXPECTED_RETURN_TYPE)}};function W(...Ee){return K(Oe=>Reflect.apply(hN,null,[Oe,...Ee]),()=>tA(...Ee),"translate",Oe=>Reflect.apply(Oe.t,Oe,[...Ee]),Oe=>Oe,Oe=>Bn(Oe))}function Q(...Ee){const[Oe,Ge,$e]=Ee;if($e&&!ds($e))throw ya(Yo.INVALID_ARGUMENT);return W(Oe,Ge,Ir({resolvedMessage:!0},$e||{}))}function ie(...Ee){return K(Oe=>Reflect.apply(oN,null,[Oe,...Ee]),()=>Q3(...Ee),"datetime format",Oe=>Reflect.apply(Oe.d,Oe,[...Ee]),()=>nN,Oe=>Bn(Oe))}function ne(...Ee){return K(Oe=>Reflect.apply(lN,null,[Oe,...Ee]),()=>eA(...Ee),"number format",Oe=>Reflect.apply(Oe.n,Oe,[...Ee]),()=>nN,Oe=>Bn(Oe))}function ce(Ee){return Ee.map(Oe=>Bn(Oe)||dr(Oe)||os(Oe)?fN(String(Oe)):Oe)}const _e={normalize:ce,interpolate:Ee=>Ee,type:"vnode"};function ke(...Ee){return K(Oe=>{let Ge;const $e=Oe;try{$e.processor=_e,Ge=Reflect.apply(hN,null,[$e,...Ee])}finally{$e.processor=null}return Ge},()=>tA(...Ee),"translate",Oe=>Oe[nA](...Ee),Oe=>[fN(Oe)],Oe=>ir(Oe))}function Te(...Ee){return K(Oe=>Reflect.apply(lN,null,[Oe,...Ee]),()=>eA(...Ee),"number format",Oe=>Oe[sA](...Ee),mN,Oe=>Bn(Oe)||ir(Oe))}function Ke(...Ee){return K(Oe=>Reflect.apply(oN,null,[Oe,...Ee]),()=>Q3(...Ee),"datetime format",Oe=>Oe[iA](...Ee),mN,Oe=>Bn(Oe)||ir(Oe))}function Fe(Ee){T=Ee,A.pluralRules=T}function ve(Ee,Oe){return K(()=>{if(!Ee)return!1;const Ge=Bn(Oe)?Oe:a.value,$e=ge(Ge),ot=A.messageResolver($e,Ee);return $c(ot)||el(ot)||Bn(ot)},()=>[Ee],"translate exists",Ge=>Reflect.apply(Ge.te,Ge,[Ee,Oe]),Sje,Ge=>os(Ge))}function fe(Ee){let Oe=null;const Ge=PK(A,l.value,a.value);for(let $e=0;$e{o&&(a.value=Ee,A.locale=Ee,Bv(A,a.value,l.value))}),We(e.fallbackLocale,Ee=>{o&&(l.value=Ee,A.fallbackLocale=Ee,Bv(A,a.value,l.value))}));const Ce={id:gN,locale:k,fallbackLocale:B,get inheritLocale(){return o},set inheritLocale(Ee){o=Ee,Ee&&e&&(a.value=e.locale.value,l.value=e.fallbackLocale.value,Bv(A,a.value,l.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:R,get modifiers(){return E},get pluralRules(){return T||{}},get isGlobal(){return i},get missingWarn(){return h},set missingWarn(Ee){h=Ee,A.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(Ee){f=Ee,A.fallbackWarn=f},get fallbackRoot(){return p},set fallbackRoot(Ee){p=Ee},get fallbackFormat(){return m},set fallbackFormat(Ee){m=Ee,A.fallbackFormat=m},get warnHtmlMessage(){return S},set warnHtmlMessage(Ee){S=Ee,A.warnHtmlMessage=Ee},get escapeParameter(){return _},set escapeParameter(Ee){_=Ee,A.escapeParameter=Ee},t:W,getLocaleMessage:ge,setLocaleMessage:Qe,mergeLocaleMessage:G,getPostTranslationHandler:oe,setPostTranslationHandler:Z,getMissingHandler:V,setMissingHandler:D,[UK]:Fe};return Ce.datetimeFormats=H,Ce.numberFormats=q,Ce.rt=Q,Ce.te=ve,Ce.tm=Me,Ce.d=ie,Ce.n=ne,Ce.getDateTimeFormat=ee,Ce.setDateTimeFormat=j,Ce.mergeDateTimeFormat=he,Ce.getNumberFormat=be,Ce.setNumberFormat=re,Ce.mergeNumberFormat=le,Ce[$K]=n,Ce[nA]=ke,Ce[iA]=Ke,Ce[sA]=Te,Ce}function Cje(t){const e=Bn(t.locale)?t.locale:Ty,n=Bn(t.fallbackLocale)||ir(t.fallbackLocale)||Gi(t.fallbackLocale)||t.fallbackLocale===!1?t.fallbackLocale:e,i=Vs(t.missing)?t.missing:void 0,s=os(t.silentTranslationWarn)||Pg(t.silentTranslationWarn)?!t.silentTranslationWarn:!0,r=os(t.silentFallbackWarn)||Pg(t.silentFallbackWarn)?!t.silentFallbackWarn:!0,o=os(t.fallbackRoot)?t.fallbackRoot:!0,a=!!t.formatFallbackMessages,l=Gi(t.modifiers)?t.modifiers:{},c=t.pluralizationRules,u=Vs(t.postTranslation)?t.postTranslation:void 0,d=Bn(t.warnHtmlInMessage)?t.warnHtmlInMessage!=="off":!0,h=!!t.escapeParameterHtml,f=os(t.sync)?t.sync:!0;let p=t.messages;if(Gi(t.sharedMessages)){const E=t.sharedMessages;p=Object.keys(E).reduce((A,I)=>{const P=A[I]||(A[I]={});return Ir(P,E[I]),A},p||{})}const{__i18n:m,__root:b,__injectWithOption:g}=t,x=t.datetimeFormats,S=t.numberFormats,_=t.flatJson;return{locale:e,fallbackLocale:n,messages:p,flatJson:_,datetimeFormats:x,numberFormats:S,missing:i,missingWarn:s,fallbackWarn:r,fallbackRoot:o,fallbackFormat:a,modifiers:l,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:h,messageResolver:t.messageResolver,inheritLocale:f,__i18n:m,__root:b,__injectWithOption:g}}function oA(t={}){const e=WP(Cje(t)),{__extender:n}=t,i={id:e.id,get locale(){return e.locale.value},set locale(s){e.locale.value=s},get fallbackLocale(){return e.fallbackLocale.value},set fallbackLocale(s){e.fallbackLocale.value=s},get messages(){return e.messages.value},get datetimeFormats(){return e.datetimeFormats.value},get numberFormats(){return e.numberFormats.value},get availableLocales(){return e.availableLocales},get missing(){return e.getMissingHandler()},set missing(s){e.setMissingHandler(s)},get silentTranslationWarn(){return os(e.missingWarn)?!e.missingWarn:e.missingWarn},set silentTranslationWarn(s){e.missingWarn=os(s)?!s:s},get silentFallbackWarn(){return os(e.fallbackWarn)?!e.fallbackWarn:e.fallbackWarn},set silentFallbackWarn(s){e.fallbackWarn=os(s)?!s:s},get modifiers(){return e.modifiers},get formatFallbackMessages(){return e.fallbackFormat},set formatFallbackMessages(s){e.fallbackFormat=s},get postTranslation(){return e.getPostTranslationHandler()},set postTranslation(s){e.setPostTranslationHandler(s)},get sync(){return e.inheritLocale},set sync(s){e.inheritLocale=s},get warnHtmlInMessage(){return e.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(s){e.warnHtmlMessage=s!=="off"},get escapeParameterHtml(){return e.escapeParameter},set escapeParameterHtml(s){e.escapeParameter=s},get pluralizationRules(){return e.pluralRules||{}},__composer:e,t(...s){return Reflect.apply(e.t,e,[...s])},rt(...s){return Reflect.apply(e.rt,e,[...s])},tc(...s){const[r,o,a]=s,l={plural:1};let c=null,u=null;if(!Bn(r))throw ya(Yo.INVALID_ARGUMENT);const d=r;return Bn(o)?l.locale=o:dr(o)?l.plural=o:ir(o)?c=o:Gi(o)&&(u=o),Bn(a)?l.locale=a:ir(a)?c=a:Gi(a)&&(u=a),Reflect.apply(e.t,e,[d,c||u||{},l])},te(s,r){return e.te(s,r)},tm(s){return e.tm(s)},getLocaleMessage(s){return e.getLocaleMessage(s)},setLocaleMessage(s,r){e.setLocaleMessage(s,r)},mergeLocaleMessage(s,r){e.mergeLocaleMessage(s,r)},d(...s){return Reflect.apply(e.d,e,[...s])},getDateTimeFormat(s){return e.getDateTimeFormat(s)},setDateTimeFormat(s,r){e.setDateTimeFormat(s,r)},mergeDateTimeFormat(s,r){e.mergeDateTimeFormat(s,r)},n(...s){return Reflect.apply(e.n,e,[...s])},getNumberFormat(s){return e.getNumberFormat(s)},setNumberFormat(s,r){e.setNumberFormat(s,r)},mergeNumberFormat(s,r){e.mergeNumberFormat(s,r)}};return i.__extender=n,i}function Tje(t,e,n){return{beforeCreate(){const i=xn();if(!i)throw ya(Yo.UNEXPECTED_ERROR);const s=this.$options;if(s.i18n){const r=s.i18n;if(s.__i18n&&(r.__i18n=s.__i18n),r.__root=e,this===this.$root)this.$i18n=yN(t,r);else{r.__injectWithOption=!0,r.__extender=n.__vueI18nExtend,this.$i18n=oA(r);const o=this.$i18n;o.__extender&&(o.__disposer=o.__extender(this.$i18n))}}else if(s.__i18n)if(this===this.$root)this.$i18n=yN(t,s);else{this.$i18n=oA({__i18n:s.__i18n,__injectWithOption:!0,__extender:n.__vueI18nExtend,__root:e});const r=this.$i18n;r.__extender&&(r.__disposer=r.__extender(this.$i18n))}else this.$i18n=t;s.__i18nGlobal&&HK(e,s,s),this.$t=(...r)=>this.$i18n.t(...r),this.$rt=(...r)=>this.$i18n.rt(...r),this.$tc=(...r)=>this.$i18n.tc(...r),this.$te=(r,o)=>this.$i18n.te(r,o),this.$d=(...r)=>this.$i18n.d(...r),this.$n=(...r)=>this.$i18n.n(...r),this.$tm=r=>this.$i18n.tm(r),n.__setInstance(i,this.$i18n)},mounted(){},unmounted(){const i=xn();if(!i)throw ya(Yo.UNEXPECTED_ERROR);const s=this.$i18n;delete this.$t,delete this.$rt,delete this.$tc,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,s.__disposer&&(s.__disposer(),delete s.__disposer,delete s.__extender),n.__deleteInstance(i),delete this.$i18n}}}function yN(t,e){t.locale=e.locale||t.locale,t.fallbackLocale=e.fallbackLocale||t.fallbackLocale,t.missing=e.missing||t.missing,t.silentTranslationWarn=e.silentTranslationWarn||t.silentFallbackWarn,t.silentFallbackWarn=e.silentFallbackWarn||t.silentFallbackWarn,t.formatFallbackMessages=e.formatFallbackMessages||t.formatFallbackMessages,t.postTranslation=e.postTranslation||t.postTranslation,t.warnHtmlInMessage=e.warnHtmlInMessage||t.warnHtmlInMessage,t.escapeParameterHtml=e.escapeParameterHtml||t.escapeParameterHtml,t.sync=e.sync||t.sync,t.__composer[UK](e.pluralizationRules||t.pluralizationRules);const n=HP(t.locale,{messages:e.messages,__i18n:e.__i18n});return Object.keys(n).forEach(i=>t.mergeLocaleMessage(i,n[i])),e.datetimeFormats&&Object.keys(e.datetimeFormats).forEach(i=>t.mergeDateTimeFormat(i,e.datetimeFormats[i])),e.numberFormats&&Object.keys(e.numberFormats).forEach(i=>t.mergeNumberFormat(i,e.numberFormats[i])),t}const GP={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:t=>t==="parent"||t==="global",default:"parent"},i18n:{type:Object}};function Mje({slots:t},e){return e.length===1&&e[0]==="default"?(t.default?t.default():[]).reduce((i,s)=>[...i,...s.type===At?s.children:[s]],[]):e.reduce((n,i)=>{const s=t[i];return s&&(n[i]=s()),n},As())}function WK(){return At}const Aje=Be({name:"i18n-t",props:Ir({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:t=>dr(t)||!isNaN(t)}},GP),setup(t,e){const{slots:n,attrs:i}=e,s=t.i18n||qs({useScope:t.scope,__useComponent:!0});return()=>{const r=Object.keys(n).filter(d=>d!=="_"),o=As();t.locale&&(o.locale=t.locale),t.plural!==void 0&&(o.plural=Bn(t.plural)?+t.plural:t.plural);const a=Mje(e,r),l=s[nA](t.keypath,a,o),c=Ir(As(),i),u=Bn(t.tag)||ds(t.tag)?t.tag:WK();return tn(u,c,l)}}}),bN=Aje;function kje(t){return ir(t)&&!Bn(t[0])}function GK(t,e,n,i){const{slots:s,attrs:r}=e;return()=>{const o={part:!0};let a=As();t.locale&&(o.locale=t.locale),Bn(t.format)?o.key=t.format:ds(t.format)&&(Bn(t.format.key)&&(o.key=t.format.key),a=Object.keys(t.format).reduce((h,f)=>n.includes(f)?Ir(As(),h,{[f]:t.format[f]}):h,As()));const l=i(t.value,o,a);let c=[o.key];ir(l)?c=l.map((h,f)=>{const p=s[h.type],m=p?p({[h.type]:h.value,index:f,parts:l}):[h.value];return kje(m)&&(m[0].key=`${h.type}-${f}`),m}):Bn(l)&&(c=[l]);const u=Ir(As(),r),d=Bn(t.tag)||ds(t.tag)?t.tag:WK();return tn(d,u,c)}}const Pje=Be({name:"i18n-n",props:Ir({value:{type:Number,required:!0},format:{type:[String,Object]}},GP),setup(t,e){const n=t.i18n||qs({useScope:t.scope,__useComponent:!0});return GK(t,e,BK,(...i)=>n[sA](...i))}}),_N=Pje,Lje=Be({name:"i18n-d",props:Ir({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},GP),setup(t,e){const n=t.i18n||qs({useScope:t.scope,__useComponent:!0});return GK(t,e,NK,(...i)=>n[iA](...i))}}),wN=Lje;function Ije(t,e){const n=t;if(t.mode==="composition")return n.__getInstance(e)||t.global;{const i=n.__getInstance(e);return i!=null?i.__composer:t.global.__composer}}function Rje(t){const e=o=>{const{instance:a,value:l}=o;if(!a||!a.$)throw ya(Yo.UNEXPECTED_ERROR);const c=Ije(t,a.$),u=xN(l);return[Reflect.apply(c.t,c,[...SN(u)]),c]};return{created:(o,a)=>{const[l,c]=e(a);W2&&t.global===c&&(o.__i18nWatcher=We(c.locale,()=>{a.instance&&a.instance.$forceUpdate()})),o.__composer=c,o.textContent=l},unmounted:o=>{W2&&o.__i18nWatcher&&(o.__i18nWatcher(),o.__i18nWatcher=void 0,delete o.__i18nWatcher),o.__composer&&(o.__composer=void 0,delete o.__composer)},beforeUpdate:(o,{value:a})=>{if(o.__composer){const l=o.__composer,c=xN(a);o.textContent=Reflect.apply(l.t,l,[...SN(c)])}},getSSRProps:o=>{const[a]=e(o);return{textContent:a}}}}function xN(t){if(Bn(t))return{path:t};if(Gi(t)){if(!("path"in t))throw ya(Yo.REQUIRED_VALUE,"path");return t}else throw ya(Yo.INVALID_VALUE)}function SN(t){const{path:e,locale:n,args:i,choice:s,plural:r}=t,o={},a=i||{};return Bn(n)&&(o.locale=n),dr(s)&&(o.plural=s),dr(r)&&(o.plural=r),[e,a,o]}function Oje(t,e,...n){const i=Gi(n[0])?n[0]:{};(!os(i.globalInstall)||i.globalInstall)&&([bN.name,"I18nT"].forEach(r=>t.component(r,bN)),[_N.name,"I18nN"].forEach(r=>t.component(r,_N)),[wN.name,"I18nD"].forEach(r=>t.component(r,wN))),t.directive("t",Rje(e))}const Dje=Nh("global-vue-i18n");function Nje(t={},e){const n=__VUE_I18N_LEGACY_API__&&os(t.legacy)?t.legacy:__VUE_I18N_LEGACY_API__,i=os(t.globalInjection)?t.globalInjection:!0,s=new Map,[r,o]=Bje(t,n),a=Nh("");function l(h){return s.get(h)||null}function c(h,f){s.set(h,f)}function u(h){s.delete(h)}const d={get mode(){return __VUE_I18N_LEGACY_API__&&n?"legacy":"composition"},async install(h,...f){if(h.__VUE_I18N_SYMBOL__=a,h.provide(h.__VUE_I18N_SYMBOL__,d),Gi(f[0])){const b=f[0];d.__composerExtend=b.__composerExtend,d.__vueI18nExtend=b.__vueI18nExtend}let p=null;!n&&i&&(p=Gje(h,d.global)),__VUE_I18N_FULL_INSTALL__&&Oje(h,d,...f),__VUE_I18N_LEGACY_API__&&n&&h.mixin(Tje(o,o.__composer,d));const m=h.unmount;h.unmount=()=>{p&&p(),d.dispose(),m()}},get global(){return o},dispose(){r.stop()},__instances:s,__getInstance:l,__setInstance:c,__deleteInstance:u};return d}function qs(t={}){const e=xn();if(e==null)throw ya(Yo.MUST_BE_CALL_SETUP_TOP);if(!e.isCE&&e.appContext.app!=null&&!e.appContext.app.__VUE_I18N_SYMBOL__)throw ya(Yo.NOT_INSTALLED);const n=Fje(e),i=Uje(n),s=VK(e),r=zje(t,s);if(r==="global")return HK(i,t,s),i;if(r==="parent"){let l=$je(n,e,t.__useComponent);return l==null&&(l=i),l}const o=n;let a=o.__getInstance(e);if(a==null){const l=Ir({},t);"__i18n"in s&&(l.__i18n=s.__i18n),i&&(l.__root=i),a=WP(l),o.__composerExtend&&(a[rA]=o.__composerExtend(a)),Hje(o,e,a),o.__setInstance(e,a)}return a}function Bje(t,e,n){const i=X2(),s=__VUE_I18N_LEGACY_API__&&e?i.run(()=>oA(t)):i.run(()=>WP(t));if(s==null)throw ya(Yo.UNEXPECTED_ERROR);return[i,s]}function Fje(t){const e=zt(t.isCE?Dje:t.appContext.app.__VUE_I18N_SYMBOL__);if(!e)throw ya(t.isCE?Yo.NOT_INSTALLED_WITH_PROVIDE:Yo.UNEXPECTED_ERROR);return e}function zje(t,e){return mS(t)?"__i18n"in e?"local":"global":t.useScope?t.useScope:"local"}function Uje(t){return t.mode==="composition"?t.global:t.global.__composer}function $je(t,e,n=!1){let i=null;const s=e.root;let r=Vje(e,n);for(;r!=null;){const o=t;if(t.mode==="composition")i=o.__getInstance(r);else if(__VUE_I18N_LEGACY_API__){const a=o.__getInstance(r);a!=null&&(i=a.__composer,n&&i&&!i[$K]&&(i=null))}if(i!=null||s===r)break;r=r.parent}return i}function Vje(t,e=!1){return t==null?null:e&&t.vnode.ctx||t.parent}function Hje(t,e,n){mn(()=>{},e),eo(()=>{const i=n;t.__deleteInstance(e);const s=i[rA];s&&(s(),delete i[rA])},e)}const Wje=["locale","fallbackLocale","availableLocales"],EN=["t","rt","d","n","tm","te"];function Gje(t,e){const n=Object.create(null);return Wje.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r)throw ya(Yo.UNEXPECTED_ERROR);const o=Li(r.value)?{get(){return r.value.value},set(a){r.value.value=a}}:{get(){return r.get&&r.get()}};Object.defineProperty(n,s,o)}),t.config.globalProperties.$i18n=n,EN.forEach(s=>{const r=Object.getOwnPropertyDescriptor(e,s);if(!r||!r.value)throw ya(Yo.UNEXPECTED_ERROR);Object.defineProperty(t.config.globalProperties,`$${s}`,r)}),()=>{delete t.config.globalProperties.$i18n,EN.forEach(s=>{delete t.config.globalProperties[`$${s}`]})}}xje();eje(DGe);tje(ZGe);nje(PK);if(__INTLIFY_PROD_DEVTOOLS__){const t=Lf();t.__INTLIFY__=!0,NGe(t.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var jje=Be({name:"Bell",__name:"bell",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),U("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),U("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),aA=jje,Kje=Be({name:"Check",__name:"check",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),rf=Kje,qje=Be({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Yje=qje,Xje=Be({name:"Close",__name:"close",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),jP=Xje,Zje=Be({name:"Delete",__name:"delete",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),Jje=Zje,Qje=Be({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),CN=Qje,eKe=Be({name:"Menu",__name:"menu",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M160 448a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V160.064a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32V416a32 32 0 0 1-32 32zM160 896a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32zm448 0a32 32 0 0 1-32-32V608a32 32 0 0 1 32-32h255.936a32 32 0 0 1 32 32v256a32 32 0 0 1-32 32z"})]))}}),tKe=eKe,nKe=Be({name:"Moon",__name:"moon",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M240.448 240.448a384 384 0 1 0 559.424 525.696 448 448 0 0 1-542.016-542.08 390.592 390.592 0 0 0-17.408 16.384zm181.056 362.048a384 384 0 0 0 525.632 16.384A448 448 0 1 1 405.056 76.8a384 384 0 0 0 16.448 525.696"})]))}}),iKe=nKe,sKe=Be({name:"Operation",__name:"operation",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),rKe=sKe,oKe=Be({name:"Setting",__name:"setting",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384m0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256"})]))}}),aKe=oKe,lKe=Be({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),cKe=lKe,uKe=Be({name:"Sunny",__name:"sunny",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 704a192 192 0 1 0 0-384 192 192 0 0 0 0 384m0 64a256 256 0 1 1 0-512 256 256 0 0 1 0 512m0-704a32 32 0 0 1 32 32v64a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 768a32 32 0 0 1 32 32v64a32 32 0 1 1-64 0v-64a32 32 0 0 1 32-32M195.2 195.2a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 1 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm543.104 543.104a32 32 0 0 1 45.248 0l45.248 45.248a32 32 0 0 1-45.248 45.248l-45.248-45.248a32 32 0 0 1 0-45.248M64 512a32 32 0 0 1 32-32h64a32 32 0 0 1 0 64H96a32 32 0 0 1-32-32m768 0a32 32 0 0 1 32-32h64a32 32 0 1 1 0 64h-64a32 32 0 0 1-32-32M195.2 828.8a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248L240.448 828.8a32 32 0 0 1-45.248 0zm543.104-543.104a32 32 0 0 1 0-45.248l45.248-45.248a32 32 0 0 1 45.248 45.248l-45.248 45.248a32 32 0 0 1-45.248 0"})]))}}),dKe=uKe,hKe=Be({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("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"})]))}}),fKe=hKe,pKe=Be({name:"Warning",__name:"warning",setup(t){return(e,n)=>(z(),se("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),mKe=pKe;const gKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 15 15"};function vKe(t,e){return z(),se("svg",gKe,e[0]||(e[0]=[U("path",{fill:"currentColor",d:"M1.417 11.667h1.916v.833H0V9.167h.833v1.916l2.5-2.5.584.584zm9.666 0-2.5-2.5.584-.584 2.5 2.5V9.167h.833V12.5H9.167v-.833zM1.417.833l2.5 2.5-.584.584-2.5-2.5v1.916H0V0h3.333v.833zm9.666 0H9.167V0H12.5v3.333h-.833V1.417l-2.5 2.5-.584-.584z"},null,-1)]))}const TN={render:vKe},yKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 512 512"};function bKe(t,e){return z(),se("svg",yKe,e[0]||(e[0]=[U("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m434.8 137.65-149.36-68.1c-16.19-7.4-42.69-7.4-58.88 0L77.3 137.65c-17.6 8-17.6 21.09 0 29.09l148 67.5c16.89 7.7 44.69 7.7 61.58 0l148-67.5c17.52-8 17.52-21.1-.08-29.09M160 308.52l-82.7 37.11c-17.6 8-17.6 21.1 0 29.1l148 67.5c16.89 7.69 44.69 7.69 61.58 0l148-67.5c17.6-8 17.6-21.1 0-29.1l-79.94-38.47"},null,-1),U("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"32",d:"m160 204.48-82.8 37.16c-17.6 8-17.6 21.1 0 29.1l148 67.49c16.89 7.7 44.69 7.7 61.58 0l148-67.49c17.7-8 17.7-21.1.1-29.1L352 204.48"},null,-1)]))}const _Ke={render:bKe},wKe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function xKe(t,e){return z(),se("svg",wKe,e[0]||(e[0]=[U("path",{fill:"currentColor",d:"M737.216 357.952 704 349.824l-11.776-32a192.064 192.064 0 0 0-367.424 23.04l-8.96 39.04-39.04 8.96A192.064 192.064 0 0 0 320 768h368a207.81 207.81 0 0 0 207.808-208 208.32 208.32 0 0 0-158.592-202.048m15.168-62.208A272.32 272.32 0 0 1 959.744 560a271.81 271.81 0 0 1-271.552 272H320a256 256 0 0 1-57.536-505.536 256.128 256.128 0 0 1 489.92-30.72"},null,-1),U("text",{x:"512",y:"580",fill:"currentColor","dominant-baseline":"middle","font-family":"Arial","font-size":"300","font-weight":"bold","text-anchor":"middle"},"ML",-1)]))}const SKe={render:xKe},EKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function CKe(t,e){return z(),se("svg",EKe,e[0]||(e[0]=[U("path",{d:"m15.08 12.854.002-.002V5.59c0-.422-.652-.414-.652 0v3.466c0 .938-1.482.95-1.482 0v-4.83c0-.414-.638-.414-.638 0h-.014v4.83c.014.95-1.482.95-1.482 0V3.444c0-.42-.638-.414-.638 0v5.612c0 .95-1.494.95-1.494 0V4.232c0-.408-.64-.42-.64 0v6.756c0 .802-1.094 1.088-1.494.388q-.39-.669-.776-1.338c-.338-.482-1.1-.15-.794.38l.978 1.698.02.04q.829 1.418 1.658 2.834c.19.3.422.578.666.802h-.006c.672.61 1.528.964 2.418 1.052.888.06 1.792-.124 2.56-.612q.45-.285.816-.68a4 4 0 0 0 .734-1.204c.176-.482.258-.97.258-1.494m-.91-8.608-.004-.002c.958-.38 2.058.244 2.058 1.346v7.266c0 .652-.108 1.29-.332 1.894a4.8 4.8 0 0 1-.964 1.576 5.9 5.9 0 0 1-1.046.884c-.978.612-2.146.862-3.26.774a5.34 5.34 0 0 1-3.098-1.352 5.4 5.4 0 0 1-.87-1.034l-1.672-2.88-.012-.028-.978-1.706c-.59-1.018.068-2.186 1.156-2.336.536-.074 1.126.116 1.562.72.026.028.04.062.054.096q.061.11.122.218V4.234c0-1.176 1.244-1.788 2.202-1.278.42-1.278 2.378-1.264 2.792-.014.972-.51 2.222.102 2.222 1.284v.06z"},null,-1)]))}const TKe={render:CKe},MKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function AKe(t,e){return z(),se("svg",MKe,e[0]||(e[0]=[U("path",{fill:"currentColor",d:"M10.438 15.298h.002l4.86-4.86-9.722-4.86zM18 10l-3.434 3.434 3.2 3.2-1.132 1.132-3.2-3.2L10 18 2.4 2.4z"},null,-1)]))}const kKe={render:AKe},PKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function LKe(t,e){return z(),se("svg",PKe,e[0]||(e[0]=[U("path",{fill:"currentColor",d:"M15.083 14.808a7 7 0 0 0 1.909-4.825 7.001 7.001 0 1 0-2.167 5.083c.092-.083.175-.174.258-.258m1.259.592 2.575 2.575-.942.942-2.575-2.575a8.334 8.334 0 0 1-11.525-.692 8.326 8.326 0 0 1 .233-11.542C7.267.942 12.367.842 15.65 3.875s3.592 8.117.692 11.525m-3.55-2.608V7.208H7.208v5.584zM5.875 5.875h8.25v8.25h-8.25z"},null,-1)]))}const IKe={render:LKe},RKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function OKe(t,e){return z(),se("svg",RKe,e[0]||(e[0]=[U("path",{fill:"currentColor",d:"m9.333 14.125-3.458-3.458v3.458zm4.792-3.458-3.458 3.458h3.458zm-3.458-4.792 3.458 3.458V5.875zM5.875 9.333l3.458-3.458H5.875zm9.208 5.475a7 7 0 0 0 1.909-4.825 7.001 7.001 0 1 0-2.167 5.083c.092-.083.175-.174.258-.258m1.259.592 2.575 2.575-.942.942-2.575-2.575c-3.408 2.9-8.492 2.591-11.525-.692S.942 7.275 4.108 4.108C7.267.942 12.367.842 15.65 3.875s3.592 8.117.692 11.525"},null,-1)]))}const DKe={render:OKe},NKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function BKe(t,e){return z(),se("svg",NKe,e[0]||(e[0]=[U("path",{d:"M9.5 9.54h1v1h-1z"},null,-1)]))}const FKe={render:BKe},zKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function UKe(t,e){return z(),se("svg",zKe)}const $Ke={render:UKe},VKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function HKe(t,e){return z(),se("svg",VKe,e[0]||(e[0]=[U("path",{d:"M2 9.5h16v1H2z"},null,-1),U("path",{d:"M9.5 2h1v16h-1z"},null,-1)]))}const WKe={render:HKe},GKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function jKe(t,e){return z(),se("svg",GKe,e[0]||(e[0]=[U("path",{d:"m2.146 2.851.707-.707 14.998 14.998-.707.707z"},null,-1),U("path",{d:"M2.146 17.149 17.144 2.15l.707.707L2.853 17.856z"},null,-1)]))}const KKe={render:jKe},qKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function YKe(t,e){return z(),se("svg",qKe,e[0]||(e[0]=[U("path",{d:"M9.5 2.04h1v8h-1z"},null,-1)]))}const XKe={render:YKe},ZKe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function JKe(t,e){return z(),se("svg",ZKe,e[0]||(e[0]=[U("path",{d:"M9.5 9.54h1v1h-1z"},null,-1),U("path",{d:"M10 3a7 7 0 1 1-7 7 7 7 0 0 1 7-7m0-1a8 8 0 1 0 8 8 8 8 0 0 0-8-8"},null,-1)]))}const QKe={render:JKe},eqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function tqe(t,e){return z(),se("svg",eqe,e[0]||(e[0]=[U("path",{d:"M10 3a7 7 0 1 1-7 7 7 7 0 0 1 7-7m0-1a8 8 0 1 0 8 8 8 8 0 0 0-8-8"},null,-1)]))}const nqe={render:tqe},iqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function sqe(t,e){return z(),se("svg",iqe,e[0]||(e[0]=[U("path",{d:"M3 9.5h14v1H3z"},null,-1),U("path",{d:"M9.5 3h1v14h-1z"},null,-1),U("path",{d:"M10 3a7 7 0 1 1-7 7 7 7 0 0 1 7-7m0-1a8 8 0 1 0 8 8 8 8 0 0 0-8-8"},null,-1)]))}const rqe={render:sqe},oqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function aqe(t,e){return z(),se("svg",oqe,e[0]||(e[0]=[U("path",{d:"m2.146 2.851.707-.707 14.998 14.998-.707.707z"},null,-1),U("path",{d:"M2.146 17.149 17.144 2.15l.707.707L2.853 17.856z"},null,-1),U("path",{d:"M10 3a7 7 0 1 1-7 7 7 7 0 0 1 7-7m0-1a8 8 0 1 0 8 8 8 8 0 0 0-8-8"},null,-1)]))}const lqe={render:aqe},cqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function uqe(t,e){return z(),se("svg",cqe,e[0]||(e[0]=[U("path",{d:"M9.5 5.04h1v5h-1z"},null,-1),U("path",{d:"M10 3a7 7 0 1 1-7 7 7 7 0 0 1 7-7m0-1a8 8 0 1 0 8 8 8 8 0 0 0-8-8"},null,-1)]))}const dqe={render:uqe},hqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function fqe(t,e){return z(),se("svg",hqe,e[0]||(e[0]=[U("path",{d:"M9.5 9.54h1v1h-1z"},null,-1),U("path",{d:"M17 3v14H3V3zm1-1H2v16h16z"},null,-1)]))}const pqe={render:fqe},mqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function gqe(t,e){return z(),se("svg",mqe,e[0]||(e[0]=[U("path",{d:"M17 3v14H3V3zm1-1H2v16h16z"},null,-1)]))}const vqe={render:gqe},yqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function bqe(t,e){return z(),se("svg",yqe,e[0]||(e[0]=[U("path",{d:"M17 3.08v14H3v-14zm1-1H2v16h16z"},null,-1),U("path",{d:"M3 9.58h14v1H3z"},null,-1),U("path",{d:"M9.5 3.08h1v14h-1z"},null,-1)]))}const _qe={render:bqe},wqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function xqe(t,e){return z(),se("svg",wqe,e[0]||(e[0]=[U("path",{d:"M17 3.08v14H3v-14zm1-1H2v16h16z"},null,-1),U("path",{d:"m2.146 2.851.707-.707 14.998 14.998-.707.707z"},null,-1),U("path",{d:"M2.146 17.149 17.144 2.15l.707.707L2.853 17.856z"},null,-1)]))}const Sqe={render:xqe},Eqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Cqe(t,e){return z(),se("svg",Eqe,e[0]||(e[0]=[U("path",{d:"M17 3.08v14H3v-14zm1-1H2v16h16z"},null,-1),U("path",{d:"M9.5 6.04h1v5h-1z"},null,-1)]))}const Tqe={render:Cqe},Mqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Aqe(t,e){return z(),se("svg",Mqe,e[0]||(e[0]=[U("path",{d:"M17 3.08v14H3v-14zm1-1H2v16h16z"},null,-1),U("path",{d:"M9.5 9.54h1v1h-1z"},null,-1),U("path",{d:"M10 4a6 6 0 1 1-6 6 6 6 0 0 1 6-6m0-1a7 7 0 1 0 7 7 7 7 0 0 0-7-7"},null,-1)]))}const kqe={render:Aqe},Pqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Lqe(t,e){return z(),se("svg",Pqe,e[0]||(e[0]=[U("path",{d:"M17 3.08v14H3v-14zm1-1H2v16h16z"},null,-1),U("path",{d:"M10 4a6 6 0 1 1-6 6 6 6 0 0 1 6-6m0-1a7 7 0 1 0 7 7 7 7 0 0 0-7-7"},null,-1)]))}const Iqe={render:Lqe},Rqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Oqe(t,e){return z(),se("svg",Rqe,e[0]||(e[0]=[U("path",{d:"M17 3v14H3V3zm1-1H2v16h16z"},null,-1),U("path",{d:"M3.88 9.6h12.25v.88H3.88z"},null,-1),U("path",{d:"M9.56 3.91h.88v12.25h-.88z"},null,-1),U("path",{d:"M10 4a6 6 0 1 1-6 6 6 6 0 0 1 6-6m0-1a7 7 0 1 0 7 7 7 7 0 0 0-7-7"},null,-1)]))}const Dqe={render:Oqe},Nqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Bqe(t,e){return z(),se("svg",Nqe,e[0]||(e[0]=[U("path",{d:"m2.146 2.851.707-.707 14.998 14.998-.707.707z"},null,-1),U("path",{d:"M2.146 17.149 17.144 2.15l.707.707L2.853 17.856z"},null,-1),U("path",{d:"M17 3v14H3V3zm1-1H2v16h16z"},null,-1),U("path",{d:"M10 4a6 6 0 1 1-6 6 6 6 0 0 1 6-6m0-1a7 7 0 1 0 7 7 7 7 0 0 0-7-7"},null,-1)]))}const Fqe={render:Bqe},zqe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20"};function Uqe(t,e){return z(),se("svg",zqe,e[0]||(e[0]=[U("path",{d:"M17 3v14H3V3zm1-1H2v16h16z"},null,-1),U("path",{d:"M9.5 5.04h1v5h-1z"},null,-1),U("path",{d:"M10 4a6 6 0 1 1-6 6 6 6 0 0 1 6-6m0-1a7 7 0 1 0 7 7 7 7 0 0 0-7-7"},null,-1)]))}const $qe={render:Uqe},Vqe={key:0,class:"ml-base-dialog",role:"dialog","aria-modal":"true"},Hqe={class:"ml-base-dialog-header"},Wqe={class:"ml-base-dialog-title"},Gqe={key:0,class:"ml-base-dialog-icon-wrapper"},jqe={class:"ml-base-dialog-actions"},Kqe={class:"ml-base-dialog-body"},qqe={class:"ml-base-dialog-footer"},Yqe=Be({__name:"MlBaseDialog",props:{modelValue:{type:Boolean,required:!0},title:{type:String,required:!0},width:{type:[Number,String],default:400},icon:{type:Object,default:null}},emits:["update:modelValue","ok","cancel","open","opened"],setup(t,{emit:e}){const{t:n}=qs(),i=t,s=e,r=F(()=>i.icon??SKe),o=F(()=>typeof i.width=="number"?`${i.width}px`:i.width);We(()=>i.modelValue,async(c,u)=>{c&&!u&&(s("open"),await Nt(),s("opened"))});function a(){s("ok"),s("update:modelValue",!1)}function l(){s("cancel"),s("update:modelValue",!1)}return(c,u)=>{const d=Zt("el-icon"),h=Zt("el-button"),f=Zt("el-config-provider");return t.modelValue?(z(),se("div",Vqe,[U("div",{class:"ml-base-dialog-overlay",onClick:l}),de(f,{size:"small"},{default:xe(()=>[U("div",{class:"ml-base-dialog-container",style:Ht({width:o.value})},[U("div",Hqe,[U("div",Wqe,[r.value?(z(),se("span",Gqe,[(z(),De(Sn(r.value),{class:"ml-base-dialog-icon"}))])):Le("",!0),U("span",null,Xe(t.title),1)]),U("div",jqe,[de(h,{text:"",class:"ml-base-dialog-close",onClick:l},{default:xe(()=>[de(d,null,{default:xe(()=>[de(v(jP))]),_:1})]),_:1})])]),U("div",Kqe,[Ue(c.$slots,"default",{},void 0,!0)]),U("div",qqe,[de(h,{onClick:l},{default:xe(()=>[cn(Xe(v(n)("dialog.baseDialog.cancel")),1)]),_:1}),de(h,{type:"primary",onClick:a},{default:xe(()=>[cn(Xe(v(n)("dialog.baseDialog.ok")),1)]),_:1})])],4)]),_:3})])):Le("",!0)}}}),Kr=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},KP=Kr(Yqe,[["__scopeId","data-v-a16d1a97"]]),Xqe={ACAD:{la:"Layer properties manager",md:"Replaces missed fonts and images",pttype:"Specifies the display style and size of point objects"},USER:{}},Zqe={baseDialog:{ok:"OK",cancel:"Cancel"},replacementDlg:{title:"Replace Missed Data",fontTabName:"Font",imageTabName:"Image",file:"File",replace:"Replace",missedFont:"Missed Font",replacedFont:"Replaced Font",selectFont:"Select font to replace"},pointStyleDlg:{title:"Point Style",pointSize:"Point Size:"},colorPickerDlg:{title:"Select Color",aciTabTitle:"Color Index",rgbTabTitle:"True Color"}},Jqe={entityName:{"2dPolyline":"2D Polyline","3dPolyline":"3D Polyline","3PointAngularDimension":"Three Point Angular Dimension",AlignedDimension:"Aligned Dimension",Arc:"Arc",ArcDimension:"Arc Dimension",BlockReference:"Block Reference",Circle:"Circle",Dimension:"Dimension",DiametricDimension:"Diametric Dimension",Ellipse:"Ellipse",Face:"Face",Hatch:"Hatch",Leader:"Leader",Line:"Line",MText:"MText",OrdinateDimension:"Ordinate Dimension",Point:"Point",Polyline:"Polyline",RadialDimension:"Radial Dimension",RasterImage:"Raster Image",Ray:"Ray",Spline:"Spline",Table:"Table",Trace:"Trace",Text:"Text",Xline:"Xline"},color:{aliceblue:"Alice Blue",antiquewhite:"Antique White",aqua:"Aqua",aquamarine:"Aquamarine",azure:"Azure",beige:"Beige",bisque:"Bisque",black:"Black",blanchedalmond:"Blanched Almond",blue:"Blue",blueviolet:"Blue Violet",brown:"Brown",burlywood:"Burlywood",cadetblue:"Cadet Blue",chartreuse:"Chartreuse",chocolate:"Chocolate",coral:"Coral",cornflowerblue:"Cornflower Blue",cornsilk:"Corn Silk",crimson:"Crimson",cyan:"Cyan",darkblue:"Dark Blue",darkcyan:"Dark Cyan",darkgoldenrod:"Dark Goldenrod",darkgray:"Dark Gray",darkgreen:"Dark Green",darkkhaki:"Dark Khaki",darkmagenta:"Dark Magenta",darkolivegreen:"Dark Olive Green",darkorange:"Dark Orange",darkorchid:"Dark Orchid",darkred:"Dark Red",darksalmon:"Dark Salmon",darkseagreen:"Dark Sea Green",darkslateblue:"Dark Slate Blue",darkslategray:"Dark Slate Gray",darkturquoise:"Dark Turquoise",darkviolet:"Dark Violet",deeppink:"Deep Pink",deepskyblue:"Deep Sky Blue",dimgrey:"Dim Grey",dodgerblue:"Dodger Blue",firebrick:"Fire Brick",floralwhite:"Floral White",forestgreen:"Forest Green",fuchsia:"Fuchsia",gainsboro:"Gainsboro",ghostwhite:"Ghost White",gold:"Gold",goldenrod:"Goldenrod",gray:"Gray",green:"Green",greenyellow:"Green Yellow",grey:"Grey",honeydew:"Honeydew",hotpink:"Hot Pink",indianred:"Indian Red",indigo:"Indigo",ivory:"Ivory",khaki:"Khaki",lavender:"Lavender",lavenderblush:"Lavender Blush",lawngreen:"Lawn Green",lemonchiffon:"Lemon Chiffon",lightblue:"Light Blue",lightcoral:"Light Coral",lightcyan:"Light Cyan",lightgoldenrodyellow:"Light Goldenrod Yellow",lightgray:"Light Gray",lightgreen:"Light Green",lightgrey:"Light Grey",lightpink:"Light Pink",lightsalmon:"Light Salmon",lightseagreen:"Light Sea Green",lightskyblue:"Light Sky Blue",lightslategray:"Light Slate Gray",lightslategrey:"Light Slate Grey",lightsteelblue:"Light Steel Blue",lightyellow:"Light Yellow",lime:"Lime",limegreen:"Lime Green",linen:"Linen",magenta:"Magenta",maroon:"Maroon",mediumaquamarine:"Medium Aquamarine",mediumblue:"Medium Blue",mediumorchid:"Medium Orchid",mediumpurple:"Medium Purple",mediumseagreen:"Medium Sea Green",mediumslateblue:"Medium Slate Blue",mediumspringgreen:"Medium Spring Green",mediumturquoise:"Medium Turquoise",mediumvioletred:"Medium Violet Red",midnightblue:"Midnight Blue",mintcream:"Mint Cream",mistyrose:"Misty Rose",moccasin:"Moccasin",navajowhite:"Navajo White",navy:"Navy",oldlace:"Oldlace",olive:"Olive",olivedrab:"Olive Drab",orange:"Orange",orangered:"Orange Red",orchid:"Orchid",palegoldenrod:"Pale Goldenrod",palegreen:"Pale Green",paleturquoise:"Paletur Quoise",palevioletred:"Pale Violet Red",papayawhip:"Papaya Whip",peachpuff:"Peachpuff",peru:"Peru",pink:"Pink",plum:"Plum",powderblue:"Powder Blue",purple:"purple",rebeccapurple:"Rebeccapurple",red:"Red",rosybrown:"Rosy Brown",royalblue:"Royal Blue",saddlebrown:"Saddle Brown",salmon:"Salmon",sandybrown:"Sandy Brown",seagreen:"Sea Green",seashell:"Seashell",sienna:"Sienna",silver:"Silver",skyblue:"Skyblue",slateblue:"Slate Blue",slategrey:"Slate Grey",snow:"Snow",springgreen:"Spring Green",steelblue:"Steel Blue",tan:"Tan",teal:"Teal",thistle:"Thistle",tomato:"Tomato",turquoise:"Turquoise",violet:"Violet",wheat:"Wheat",white:"White",whitesmoke:"White Smoke",yellow:"Yellow",yellowgreen:"Yellow Green"},enum:{TopLeft:"Top Left",TopCenter:"Top Center",TopRight:"Top Right",MiddleLeft:"Middle Left",MiddleCenter:"Middle Center",MiddleRight:"Middle Right",BottomLeft:"Bottom Left",BottomCenter:"Bottom Center",BottomRight:"Bottom Right",LEFT_TO_RIGHT:"Left to Right",RIGHT_TO_LEFT:"Right to Left",TOP_TO_BOTTOM:"Top to Bottom",BOTTOM_TO_TOP:"Bottom to Top",BY_STYLE:"By Style",UserDefined:"User Defined",Predefined:"Predefined",Custom:"Custom"},property:{general:"General",geometry:"Geometry",pattern:"Pattern",table:"Table",patternType:"Type",patternName:"Name",patternAngle:"Angle",patternScale:"Scale",elevation:"Elevation",text:"Text",handle:"Handle",color:"Color",layer:"Layer",linetype:"Linetype",linetypeScale:"Linetype Scale",lineWeight:"Lineweight",thickness:"Thickness",transparency:"Transparency",startX:"Start X",startY:"Start Y",startZ:"Start Z",endX:"End X",endY:"End Y",endZ:"End Z",length:"Length",arcLength:"Arc Length",totalAngle:"Total Angle",centerX:"Center X",centerY:"Center Y",centerZ:"Center Z",radius:"Radius",diameter:"Diameter",normalX:"Normal X",normalY:"Normal Y",normalZ:"Normal Z",startAngle:"Start Angle",endAngle:"End Angle",perimeter:"Perimeter",area:"Area",majorAxisRadius:"Major Radius",minorAxisRadius:"Minor Radius",blockName:"Block Name",positionX:"Position X",positionY:"Position Y",positionZ:"Position Z",rotation:"Rotation",scaleFactorsX:"Scale X",scaleFactorsY:"Scale Y",scaleFactorsZ:"Scale Z",basePointX:"Base Point X",basePointY:"Base Point Y",basePointZ:"Base Point Z",unitDirX:"Unit Dir X",unitDirY:"Unit Dir Y",unitDirZ:"Unit Dir Z",contents:"Contents",styleName:"Style",attachmentPoint:"Attachment Point",drawingDirection:"Drawing Direction",textHeight:"Text Height",lineSpacingFactor:"Line Spacing Factor",definedWidth:"Defined Width",directionX:"Direction X",directionY:"Direction Y",directionZ:"Direction Z",locationX:"Location X",locationY:"Location Y",locationZ:"Location Z",x:"X",y:"Y",z:"Z",numRows:"Number of Rows",numColumns:"Number of Columns",tableWidth:"Table Width",tableHeight:"Table Height"}},Qqe={mainMenu:{new:"New Drawing",open:"Open Drawing",export:"Export to SVG"},verticalToolbar:{select:{text:"Select",description:"Selects entities"},pan:{text:"Pan",description:"Shifts the view without changing the viewing direction or magnification"},zoomToExtent:{text:"Zoom Extents",description:"Zooms to display the maximum extents of all entities"},zoomToBox:{text:"Zoom Window",description:"Zooms to display an area specified by a rectangular window"},layer:{text:"Layer",description:"Manages layers"}},statusBar:{setting:{tooltip:"Display Settings",commandLine:"Command Line",coordinate:"Coordinate",entityInfo:"Entity Info",languageSelector:"Language Selector",mainMenu:"Main Menu",toolbar:"Toolbar",stats:"Statistics"},pointStyle:{tooltip:"Modify point style"},fullScreen:{on:"Turn on full screen mode",off:"Turn off full screen mode"},theme:{dark:"Switch to dark theme",light:"Switch to light light"},warning:{font:"The following fonts are not found!"},notification:{tooltip:"Show notifications"}},toolPalette:{entityProperties:{tab:"Properties",title:"Entity Properties",propertyPanel:{noEntitySelected:"No entity selected!",multipleEntitySelected:"{count} entities selected",propValCopied:"Property value copied",failedToCopyPropVal:"Failed to copy property value!"}},layerManager:{tab:"Layers",title:"Layer Manager",layerList:{name:"Name",on:"On",color:"Color",zoomToLayer:'Zoomed to the clicked layer "{layer}"'}}},colorDropdown:{custom:"Custom"},colorIndexPicker:{color:"Color: ",colorIndex:"Color Index: ",inputPlaceholder:"0-256, BYLAYER, BYBLOCK",rgb:"RGB: "},entityInfo:{color:"Color",layer:"Layer",lineType:"Linetype"},message:{loadingFonts:"Loading fonts ...",loadingDwgConverter:"Loading DWG converter...",fontsNotFound:'Fonts "{fonts}" can not be found in font repository!',fontsNotLoaded:'Fonts "{fonts}" can not be loaded!',failedToGetAvaiableFonts:'Failed to get avaiable fonts from "{url}"!',failedToOpenFile:'Failed to open file "{fileName}"!',fetchingDrawingFile:"Fetching file ...",unknownEntities:"This drawing contains {count} unknown or unsupported entities! Those entities will not be shown."},notification:{center:{title:"Notifications",clearAll:"Clear All",noNotifications:"No notifications"},time:{justNow:"Just now",minutesAgo:"{count} minute ago | {count} minutes ago",hoursAgo:"{count} hour ago | {count} hours ago",daysAgo:"{count} day ago | {count} days ago"},title:{failedToOpenFile:"Failed to Open File",fontNotFound:"Font Not Found",fontNotLoaded:"Font Not Loaded",parsingWarning:"Issues on Parsing Drawing"}}},eYe={ACAD:{la:"图层属性管理器",md:"替换缺失的字体和图片",pttype:"设置点的显示样式和尺寸"},USER:{}},tYe={baseDialog:{ok:"确定",cancel:"取消"},replacementDlg:{title:"替换缺失数据",fontTabName:"字体",imageTabName:"图片",file:"文件",replace:"替换",missedFont:"缺失字体",replacedFont:"替换字体",selectFont:"选择要替换的字体"},pointStyleDlg:{title:"点样式",pointSize:"点大小:"},colorPickerDlg:{title:"选择颜色",aciTabTitle:"颜色索引",rgbTabTitle:"真彩色"}},nYe={entityName:{"2dPolyline":"二维多段线","3dPolyline":"三维多段线","3PointAngularDimension":"三点角度标注",AlignedDimension:"线性标注",Arc:"圆弧",ArcDimension:"弧长标注",BlockReference:"块引用",Circle:"圆",Dimension:"标注",DiametricDimension:"直径标注",Ellipse:"椭圆",Face:"面片",Hatch:"填充",Leader:"引线",Line:"线",MText:"多行文本",OrdinateDimension:"坐标标注",Point:"点",Polyline:"多段线",RadialDimension:"半径标注",RasterImage:"光栅图像",Ray:"射线",Spline:"拟合曲线",Table:"表格",Trace:"跟踪",Text:"文本",Xline:"构造线"},color:{aliceblue:"爱丽丝蓝",antiquewhite:"古董白",aqua:"水绿",aquamarine:"碧绿",azure:"蔚蓝",beige:"米色",bisque:"陶坯黃",black:"纯黑",blanchedalmond:"杏仁白",blue:"纯蓝",blueviolet:"蓝紫色",brown:"棕色",burlywood:"实木色",cadetblue:"军校蓝",chartreuse:"查特酒绿",chocolate:"巧克力色",coral:"珊瑚色",cornflowerblue:"矢车菊蓝",cornsilk:"玉米丝色",crimson:"猩红",cyan:"青色",darkblue:"深蓝",darkcyan:"深青",darkgoldenrod:"深金菊色",darkgray:" 深灰",darkgreen:"深绿",darkkhaki:"深卡其色",darkmagenta:"深洋红",darkolivegreen:"深橄榄绿",darkorange:"深橙色",darkorchid:"深兰花紫",darkred:"深红色",darksalmon:"深鲑红",darkseagreen:"深海洋绿",darkslateblue:"深石板蓝",darkslategray:"深石板灰",darkturquoise:"深绿松石色",darkviolet:"深紫色",deeppink:"深粉色",deepskyblue:"深天蓝",dimgrey:"昏灰",dodgerblue:"道奇蓝",firebrick:"火砖色",floralwhite:"花卉白",forestgreen:"森林绿",fuchsia:"紫红色",gainsboro:"Gainsboro",ghostwhite:"幽灵白",gold:"金色",goldenrod:"金菊色",gray:"灰色",green:"纯绿",greenyellow:"绿黄色",grey:"灰色",honeydew:"蜜瓜色",hotpink:"艳粉色",indianred:"印度红",indigo:"靛青色",ivory:"象牙白",khaki:"卡其色",lavender:"薰衣草色",lavenderblush:"浅紫红色",lawngreen:"草坪绿",lemonchiffon:" 柠檬绸色",lightblue:"淡蓝色",lightcoral:"淡珊瑚色",lightcyan:"淡青色",lightgoldenrodyellow:"淡金菊黄",lightgray:"浅灰色",lightgreen:"淡绿色",lightgrey:"浅灰色",lightpink:"淡粉红色",lightsalmon:"淡鲑红",lightseagreen:"淡海洋绿",lightskyblue:"淡天蓝色",lightslategray:"淡石板灰",lightslategrey:"淡石板灰",lightsteelblue:"淡钢蓝色",lightyellow:"淡黄色",lime:"酸橙色",limegreen:"酸橙绿",linen:"亚麻色",magenta:"洋红色",maroon:"栗色",mediumaquamarine:"中碧绿",mediumblue:"中蓝色",mediumorchid:"中兰花紫",mediumpurple:"中紫色",mediumseagreen:"中海洋绿",mediumslateblue:"中石板蓝",mediumspringgreen:"中春绿色",mediumturquoise:"中绿松石色",mediumvioletred:"中紫罗兰色",midnightblue:"午夜蓝",mintcream:"薄荷奶油色",mistyrose:"薄雾玫瑰色",moccasin:"鹿皮鞋色",navajowhite:"纳瓦白",navy:"海军蓝",oldlace:"旧蕾丝色",olive:"橄榄色",olivedrab:"橄榄军服绿",orange:"橙色",orangered:"橙红色",orchid:"兰花紫",palegoldenrod:"灰金菊色",palegreen:"灰绿色",paleturquoise:"灰绿松石色",palevioletred:"灰紫罗兰色",papayawhip:"番木色",peachpuff:"桃色",peru:"秘鲁色",pink:"粉红色",plum:"李子色",powderblue:"粉末蓝",purple:"紫色",rebeccapurple:"丽贝卡紫色",red:"红色",rosybrown:"玫瑰棕色",royalblue:"宝蓝色",saddlebrown:"鞍褐色",salmon:"鲑红色",sandybrown:"沙棕色",seagreen:"海洋绿",seashell:"海贝色",sienna:"赭黄色",silver:"银白色",skyblue:"天蓝色",slateblue:"石板蓝",slategrey:"石板灰",snow:"雪白色",springgreen:"春绿色",steelblue:"钢蓝色",tan:"黄褐色",teal:"水鸭色",thistle:"蓟色",tomato:"番茄色",turquoise:"绿松石色",violet:"紫罗兰色",wheat:"小麦色",white:"白色",whitesmoke:"白烟色",yellow:"黄色",yellowgreen:"黄绿色"},enum:{TopLeft:"左上",TopCenter:"中上",TopRight:"右上",MiddleLeft:"左中",MiddleCenter:"正中",MiddleRight:"右中",BottomLeft:"左下",BottomCenter:"中下",BottomRight:"右下",LEFT_TO_RIGHT:"水平左到右",RIGHT_TO_LEFT:"水平右到左",TOP_TO_BOTTOM:"垂直上到下",BOTTOM_TO_TOP:"垂直下到上",BY_STYLE:"随样式",UserDefined:"用户自定义",Predefined:"预定义",Custom:"自定义"},property:{general:"常规",geometry:"几何图形",pattern:"图案",table:"表格",patternType:"类型",patternName:"图案名",patternAngle:"角度",patternScale:"比例",elevation:"标高",text:"文字",handle:"句柄",color:"颜色",layer:"图层",linetype:"线型",linetypeScale:"线型比例",lineWeight:"线宽",thickness:"厚度",transparency:"透明度",startX:"起点 X",startY:"起点 Y",startZ:"起点 Z",endX:"终点 X",endY:"终点 Y",endZ:"终点 Z",length:"长度",arcLength:"弧长",totalAngle:"总角度",centerX:"圆心 X",centerY:"圆心 Y",centerZ:"圆心 Z",radius:"半径",diameter:"直径",normalX:"法向量 X",normalY:"法向量 Y",normalZ:"法向量 Z",startAngle:"起始角",endAngle:"终止角",perimeter:"周长",area:"面积",majorAxisRadius:"长轴半径",minorAxisRadius:"短轴半径",blockName:"块名",positionX:"位置 X",positionY:"位置 Y",positionZ:"位置 Z",rotation:"旋转",scaleFactorsX:"缩放比例 X",scaleFactorsY:"缩放比例 Y",scaleFactorsZ:"缩放比例 Z",basePointX:"基点 X",basePointY:"基点 Y",basePointZ:"基点 Z",unitDirX:"单位方向向量 X",unitDirY:"单位方向向量 Y",unitDirZ:"单位方向向量 Z",contents:"内容",styleName:"样式",attachmentPoint:"对正",drawingDirection:"书写方向",textHeight:"文字高度",lineSpacingFactor:"行距比例",definedWidth:"定义的宽度",directionX:"方向向量 X",directionY:"方向向量 Y",directionZ:"方向向量 Z",locationX:"位置 X",locationY:"位置 Y",locationZ:"位置 Z",x:"X",y:"Y",z:"Z",numRows:"行数",numColumns:"列数",tableWidth:"表格宽度",tableHeight:"表格高度"}},iYe={mainMenu:{new:"新建图纸",open:"打开图纸",export:"导出为SVG"},verticalToolbar:{select:{text:"选择",description:"选择图元"},pan:{text:"移动",description:"平移视图"},zoomToExtent:{text:"范围缩放",description:"缩放以显示所有对象"},zoomToBox:{text:"矩形缩放",description:"缩放以显示矩形窗口内的对象"},layer:{text:"图层",description:"管理图层"}},statusBar:{setting:{tooltip:"显示设置",commandLine:"命令行",coordinate:"坐标",entityInfo:"图元信息",languageSelector:"语言菜单",mainMenu:"主菜单",toolbar:"工具栏",stats:"性能面板"},pointStyle:{tooltip:"修改点样式"},fullScreen:{on:"切换到全屏模式",off:"退出全屏模式"},theme:{dark:"切换到暗黑主题",light:"切换到明亮主题"},warning:{font:"没有找到如下字体:"},notification:{tooltip:"显示通知"}},toolPalette:{entityProperties:{tab:"属性",title:"图元属性",propertyPanel:{noEntitySelected:"未选择任何图元!",multipleEntitySelected:"{count}个图元",propValCopied:"属性值已复制",failedToCopyPropVal:"复制属性值失败!"}},layerManager:{tab:"图层",title:"图层管理器",layerList:{name:"名称",on:"可见",color:"颜色",zoomToLayer:'已缩放到所点击的图层"{layer}"'}}},colorDropdown:{custom:"自定义"},colorIndexPicker:{color:"颜色:",colorIndex:"颜色索引:",inputPlaceholder:"0-256, BYLAYER, BYBLOCK",rgb:"RGB: "},entityInfo:{color:"颜色",layer:"图层",lineType:"线型"},message:{loadingFonts:"正在加载字体...",loadingDwgConverter:"正在加载DWG转换器...",fontsNotFound:"在字体库中找不到字体:{fonts}。",fontsNotLoaded:"无法加载字体:{fonts}。",failedToGetAvaiableFonts:'无法从"{url}"获取可用的字体信息!',failedToOpenFile:'无法打开文件"{fileName}"!',fetchingDrawingFile:"正在加载图纸文件...",unknownEntities:"这张图纸中包含了{count}个未知或不支持的实体,这些实体将无法显示!"},notification:{center:{title:"通知",clearAll:"清除全部",noNotifications:"暂无通知"},time:{justNow:"刚刚",minutesAgo:"{count} 分钟前",hoursAgo:"{count} 小时前",daysAgo:"{count} 天前"},title:{failedToOpenFile:"无法打开文件",fontNotFound:"找不到字体",fontNotLoaded:"无法加载字体",parsingWarning:"解析图纸问题"}}},sYe=()=>{const t=localStorage.getItem("preferred_lang");return t==="en"||t==="zh"?t:navigator.language.toLowerCase().substring(0,2)==="zh"?"zh":"en"},jK={en:{main:Qqe,command:Xqe,dialog:Zqe,entity:Jqe},zh:{main:iYe,command:eYe,dialog:tYe,entity:nYe}};sr.mergeLocaleMessage("en",jK.en);sr.mergeLocaleMessage("zh",jK.zh);const zh=Nje({legacy:!1,messages:sr.messages,locale:sYe(),fallbackLocale:"en",globalInjection:!0}),rYe=t=>{const e=zh.global.t,n="entity.entityName."+t.type;return e(n,t.type,{missingWarn:!1})},MN=t=>{const e=zh.global.t,n="entity.property."+t;return e(n,t,{missingWarn:!1})},AN=t=>{const e=zh.global.t,n="entity.enum."+t;return e(n,t,{missingWarn:!0})},KK=t=>{if(t=="ByLayer"||t=="ByBlock")return t;{const e=zh.global.t,n="entity.color."+t.toLowerCase();return e(n,t,{missingWarn:!1})}},oYe=t=>{const e=zh.global.t,n=`main.toolPalette.${t}.title`;return e(n,t,{missingWarn:!1})},aYe=t=>{const e=zh.global.t,n=`main.toolPalette.${t}.tab`;return e(n,t,{missingWarn:!1})},lYe={class:"ml-color-picker-dlg-panel-body"},cYe={class:"ml-color-picker-dlg-panel-body"},uYe=Be({__name:"MlColorPickerDlg",props:{modelValue:{type:Boolean},color:{},title:{}},emits:["update:modelValue","ok","cancel"],setup(t,{emit:e}){const{t:n}=qs(),i=t,s=e,r=F({get:()=>i.modelValue,set:h=>s("update:modelValue",h)}),o=X("aci"),a=X(void 0),l=X("#ffffff");function c(h){if(!h)return;const f=Er.fromString(h);f&&(o.value=f.isByColor?"rgb":"aci",f.isByLayer?a.value=256:f.isByBlock?a.value=0:f.isByACI?a.value=f.colorIndex:a.value=void 0,l.value=f.cssColor??"#ffffff")}c(i.color),We(()=>i.color,h=>{c(h)});function u(){const h=new Er;if(o.value==="aci")a.value===256?h.setByLayer():a.value===0?h.setByBlock():h.colorIndex=a.value;else if(o.value==="rgb"){const f=l.value.replace(/^#/,"");if(f.length===6){const p=parseInt(f.substring(0,2),16),m=parseInt(f.substring(2,4),16),b=parseInt(f.substring(4,6),16);h.setRGB(p,m,b)}}s("ok",h)}function d(){s("cancel",void 0)}return(h,f)=>{const p=Zt("el-tab-pane"),m=Zt("el-tabs");return z(),De(v(KP),{modelValue:r.value,"onUpdate:modelValue":f[3]||(f[3]=b=>r.value=b),title:h.title,width:500,onOk:u,onCancel:d},{default:xe(()=>[de(m,{modelValue:o.value,"onUpdate:modelValue":f[2]||(f[2]=b=>o.value=b)},{default:xe(()=>[de(p,{label:v(n)("dialog.colorPickerDlg.aciTabTitle"),name:"aci"},{default:xe(()=>[U("div",lYe,[de(v(YYe),{modelValue:a.value,"onUpdate:modelValue":f[0]||(f[0]=b=>a.value=b)},null,8,["modelValue"])])]),_:1},8,["label"]),de(p,{label:v(n)("dialog.colorPickerDlg.rgbTabTitle"),name:"rgb"},{default:xe(()=>[U("div",cYe,[de(v(Tk),{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=b=>l.value=b)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["modelValue","title"])}}}),qK=Kr(uYe,[["__scopeId","data-v-7a7eb144"]]);function kN(t,e="en-US"){const n=Math.abs(t);if(n!==0&&(n<.001||n>=1e6)){const[i,s]=t.toExponential(3).split("e");return`${new Intl.NumberFormat(e,{maximumFractionDigits:3}).format(Number(i))}e${s}`}else return new Intl.NumberFormat(e,{maximumFractionDigits:6}).format(t)}function dYe(t){const e=X(0),n=X(0);function i(r){e.value=r.x,n.value=r.y}mn(()=>t.events.mouseMove.addEventListener(i)),eo(()=>t.events.mouseMove.removeEventListener(i));const s=F(()=>`${kN(e.value)}, ${kN(n.value)}`);return{x:e,y:n,text:s}}bK();const Ay=ni([]);function hYe(t){Ay.find(e=>e.name===t.name)||Ay.push({...t,visible:!1})}function fYe(t,e){const n=Ay.find(i=>i.name===t);n&&(n.visible=e)}function pYe(t){return Ay.find(e=>e.name===t)}function yS(){return{dialogs:F(()=>Ay),registerDialog:hYe,toggleDialog:fYe,getDialogByName:pYe}}function mYe(){const t=X(new Set),e=T2.instance;for(const n of e.fileTypes)t.value.add(n);return e.events.registered.addEventListener(n=>{t.value.add(n.fileType)}),t}function gYe(){const t=X(!1),e=X(null),n=X(null),i=X({x:-1,y:-1}),s=o=>{const a=si.instance.curDocument.database.tables.blockTable.modelSpace.getIdAt(o.id);a?(e.value=a,n.value=o.id,t.value=!0,i.value={x:o.x,y:o.y}):(t.value=!1,e.value=null,n.value=null)},r=()=>{t.value=!1,e.value=null,n.value=null};return mn(()=>{const o=si.instance.curView.events;o.hover.addEventListener(s),o.unhover.addEventListener(r)}),eo(()=>{const o=si.instance.curView.events;o.hover.removeEventListener(s),o.unhover.removeEventListener(r)}),{hovered:t,entity:e,id:n,mouse:i}}function vYe(t){const e=ni([]),n=t.curDocument,i=s=>{const r=s.tables.layerTable.newIterator();for(const o of r)e.push({name:o.name,color:o.color.toString(),isLocked:o.isLocked,isHidden:o.isHidden,isInUse:o.isInUse,isOn:!o.isOff,isPlottable:o.isPlottable,transparency:o.transparency.toString(),linetype:o.linetype,lineWeight:o.lineWeight})};return i(n.database),n.database.events.layerModified.addEventListener(s=>{let r=e.find(o=>o.name==s.layer.name);if(r){r=r;const o=s.changes;o.color!=null&&(r.color=o.color.toString()),o.isLocoked!=null&&(r.isLocked=o.isLocked),o.isHidden!=null&&(r.isHidden=o.isHidden),o.isInUse!=null&&(r.isInUse=o.isInUse),o.isOff!=null&&(r.isOn=!o.isOff),o.isPlottable!=null&&(r.isPlottable=o.isPlottable),o.transparency!=null&&(r.transparency=o.transparency.toString()),o.linetype!=null&&(r.linetype=o.linetype),o.lineWeight!=null&&(r.lineWeight=o.lineWeight)}}),t.events.documentActivated.addEventListener(s=>{e.length=0,i(s.doc.database)}),e}function yYe(t){const e=ni([]),n=t.curDocument,i=s=>{const r=s.dictionaries.layouts.newIterator();e.length=0;for(const o of r)e.push({name:o.layoutName,tabOrder:o.tabOrder,blockTableRecordId:o.blockTableRecordId,isActive:o.blockTableRecordId==s.currentSpaceId});e.sort((o,a)=>o.tabOrder-a.tabOrder)};return i(n.database),t.events.documentActivated.addEventListener(s=>{e.length=0,i(s.doc.database)}),gp().layoutManager.events.layoutSwitched.addEventListener(s=>{const r=s.layout;e.forEach(o=>{o.name==r.layoutName?o.isActive=!0:o.isActive=!1})}),e}const JC="preferred_lang";function YK(t){const{locale:e}=qs(),n=X((()=>{const a=localStorage.getItem(JC);if(a==="en"||a==="zh")return a;const l=navigator.language.toLowerCase().substring(0,2)==="zh"?"zh":"en";return sr.setCurrentLocale(l),l})()),i=F(()=>n.value),s=a=>{zh.global.locale.value=a,n.value=a,(!t||t==="default")&&localStorage.setItem(JC,a),sr.setCurrentLocale(a)},r=()=>{localStorage.removeItem(JC)};t&&We(()=>t,a=>{a&&a!=="default"&&s(a)},{immediate:!0}),We(()=>e.value,a=>{(!t||t==="default")&&s(a==="zh"?"zh":"en")});const o=F(()=>i.value==="en"?$9:GWe);return{currentLocale:n,effectiveLocale:i,elementPlusLocale:o,setLocale:s,clearStoragePreference:r,isControlled:F(()=>!!(t&&t!=="default"))}}function XK(){const t=ni(new Map),e=ni(new Map),n=()=>{const i=si.instance.curView.missedData,s=wr.instance.fontMapping;t.clear(),Object.keys(i.fonts).forEach(r=>{const o=s[r];t.set(r,o||"")}),e.clear(),i.images.forEach((r,o)=>{const a=e.get(r);a?a.ids.add(o):e.set(r,{fileName:r,ids:new Set([o])})})};return si.instance.events.documentActivated.addEventListener(()=>{n()}),_o.on("font-not-found",i=>{n()}),{fonts:t,images:e}}class bYe{constructor(){this.notifications=X([]),this.nextId=1}get allNotifications(){return F(()=>this.notifications.value)}get unreadCount(){return F(()=>this.notifications.value.length)}get hasNotifications(){return F(()=>this.notifications.value.length>0)}add(e){const n={...e,id:`notification-${this.nextId++}`,timestamp:new Date};return this.notifications.value.unshift(n),n.id}remove(e){const n=this.notifications.value.findIndex(i=>i.id===e);n>-1&&this.notifications.value.splice(n,1)}clear(){this.notifications.value=[]}clearAll(){this.clear()}info(e,n,i){return this.add({type:"info",title:e,message:n,...i})}warning(e,n,i){return this.add({type:"warning",title:e,message:n,...i})}error(e,n,i){return this.add({type:"error",title:e,message:n,persistent:!0,...i})}success(e,n,i){return this.add({type:"success",title:e,message:n,...i})}}const kr=new bYe;function bS(){return{notifications:kr.allNotifications,unreadCount:kr.unreadCount,hasNotifications:kr.hasNotifications,add:kr.add.bind(kr),remove:kr.remove.bind(kr),clear:kr.clear.bind(kr),clearAll:kr.clearAll.bind(kr),info:kr.info.bind(kr),warning:kr.warning.bind(kr),error:kr.error.bind(kr),success:kr.success.bind(kr)}}function _Ye(){const t=X([]),e=X([]),n=X([]),i=r=>{e.value=r.ids,t.value=si.instance.curView.selectionSet.ids},s=r=>{n.value=r.ids,t.value=si.instance.curView.selectionSet.ids};return mn(()=>{const r=si.instance.curView.selectionSet.events;r.selectionAdded.addEventListener(i),r.selectionRemoved.addEventListener(s)}),eo(()=>{const r=si.instance.curView.selectionSet.events;r.selectionAdded.removeEventListener(i),r.selectionRemoved.removeEventListener(s)}),{selectionSet:t,added:e,removed:n}}function C1(){const t=ni(wr.instance.settings);return wr.instance.events.modified.addEventListener(e=>{t[e.key]=e.value}),t}function wYe(t){const e=ni({}),n=t.curDocument,i=s=>{e.pdmode=s.pdmode,e.pdmode=s.pdsize};return i(n.database),n.database.events.headerSysVarChanged.addEventListener(s=>{e[s.name]=s.database[s.name]}),t.events.documentActivated.addEventListener(s=>{i(s.doc.database)}),e}function xYe(){const t=vK("(max-width: 768px)"),e=X(!1),n=X(!1);return mn(()=>{var i;try{const s=window.navigator,r=s.maxTouchPoints??s.msMaxTouchPoints??0,o=((i=window.matchMedia)==null?void 0:i.call(window,"(pointer: coarse)").matches)??!1;e.value=r>0||o||"ontouchstart"in window;const a=s.userAgent||"";n.value=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}catch{e.value=!1,n.value=!1}}),{isMobile:F(()=>!!t.value&&(e.value||n.value))}}const SYe=Be({__name:"MlPointStyleDlg",setup(t){const{t:e}=qs(),n=wYe(si.instance),i=X(!0),s=X(0),r=[[{id:0,icon:FKe},{id:1,icon:$Ke},{id:2,icon:WKe},{id:3,icon:KKe},{id:4,icon:XKe}],[{id:32,icon:QKe},{id:33,icon:nqe},{id:34,icon:rqe},{id:35,icon:lqe},{id:36,icon:dqe}],[{id:64,icon:pqe},{id:65,icon:vqe},{id:66,icon:_qe},{id:67,icon:Sqe},{id:68,icon:Tqe}],[{id:96,icon:kqe},{id:97,icon:Iqe},{id:98,icon:Dqe},{id:99,icon:Fqe},{id:100,icon:$qe}]],o=()=>{n.pdmode&&(s.value=n.pdmode)};o();const a=(d,h)=>r[d][h].id==s.value?"primary":null,l=(d,h)=>{s.value=r[d][h].id},c=()=>{si.instance.curDocument.database.pdmode=s.value},u=()=>{o()};return(d,h)=>{const f=Zt("el-button"),p=Zt("el-col"),m=Zt("el-row");return z(),De(KP,{title:v(e)("dialog.pointStyleDlg.title"),width:400,modelValue:i.value,"onUpdate:modelValue":h[0]||(h[0]=b=>i.value=b),name:"PointStyleDlg",onOk:c,onCancel:u},{default:xe(()=>[(z(),se(At,null,yn(r,(b,g)=>de(m,{key:g,style:{"margin-top":"10px"},gutter:6,justify:"space-between"},{default:xe(()=>[(z(!0),se(At,null,yn(b,(x,S)=>(z(),De(p,{key:S,span:4},{default:xe(()=>[de(f,{icon:x.icon,type:a(g,S),onClick:_=>l(g,S),style:{"font-size":"25px"}},null,8,["icon","type","onClick"])]),_:2},1024))),128))]),_:2},1024)),64))]),_:1},8,["title","modelValue"])}}}),EYe=Be({__name:"MlReplacementDlg",setup(t){const{t:e}=qs(),{fonts:n,images:i}=XK(),s=X(!0),r=F(()=>n.size>0?"font":"image"),o=X(null),a=X([]),l=()=>{const f=si.instance.avaiableFonts;a.value=f.map(p=>p.name[0])},c=()=>{const f=si.instance.curDocument.database;i.forEach(m=>{m.file&&m.ids.forEach(b=>{const g=f.tables.blockTable.modelSpace.getIdAt(b);g.image=m.file,g.triggerModifiedEvent()})});const p=wr.instance;n.forEach((m,b)=>{b&&m&&p.setFontMapping(b,m)})},u=f=>{o.value&&(o.value.click(),o.value.onchange=()=>{d(f)})},d=f=>{var p,m;const b=(m=(p=o.value)==null?void 0:p.files)==null?void 0:m[0];b&&(f.file=b)},h=(f,p)=>{n.set(f,p)};return(f,p)=>{const m=Zt("el-col"),b=Zt("el-row"),g=Zt("el-option"),x=Zt("el-select"),S=Zt("el-tab-pane"),_=Zt("el-table-column"),E=Zt("el-button"),T=Zt("el-table"),A=Zt("el-tabs");return z(),De(KP,{title:v(e)("dialog.replacementDlg.title"),modelValue:s.value,"onUpdate:modelValue":p[1]||(p[1]=I=>s.value=I),name:"ReplacementDlg",onOk:c,onOpen:l},{default:xe(()=>[de(A,{size:"small",modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=I=>r.value=I)},{default:xe(()=>[v(n).size>0?(z(),De(S,{key:0,label:v(e)("dialog.replacementDlg.fontTabName"),name:"font"},{default:xe(()=>[U("div",null,[de(b,null,{default:xe(()=>[de(m,{span:12},{default:xe(()=>[U("span",null,Xe(v(e)("dialog.replacementDlg.missedFont")),1)]),_:1}),de(m,{span:12},{default:xe(()=>[U("span",null,Xe(v(e)("dialog.replacementDlg.replacedFont")),1)]),_:1})]),_:1}),(z(!0),se(At,null,yn(v(n),([I,P])=>(z(),De(b,{key:I,style:{"margin-top":"10px"}},{default:xe(()=>[de(m,{span:12},{default:xe(()=>[U("span",null,Xe(I),1)]),_:2},1024),de(m,{span:12},{default:xe(()=>[de(x,{"model-value":P,placeholder:v(e)("dialog.replacementDlg.selectFont"),"onUpdate:modelValue":k=>h(I,k),style:{width:"100%"}},{default:xe(()=>[(z(!0),se(At,null,yn(a.value,(k,B)=>(z(),De(g,{key:B,label:k,value:k},null,8,["label","value"]))),128))]),_:2},1032,["model-value","placeholder","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024))),128))])]),_:1},8,["label"])):Le("",!0),v(i).size>0?(z(),De(S,{key:1,label:v(e)("dialog.replacementDlg.imageTabName"),name:"image"},{default:xe(()=>[de(T,{data:Array.from(v(i).values()),style:{width:"100%"},"v-show":!1},{default:xe(()=>[de(_,{label:v(e)("dialog.replacementDlg.file"),prop:"fileName","min-width":0,flex:1},null,8,["label"]),de(_,{label:v(e)("dialog.replacementDlg.replace"),fixed:"right",width:"60"},{default:xe(({row:I})=>[de(E,{link:"",type:"primary",size:"small",onClick:P=>u(I)},{default:xe(()=>p[2]||(p[2]=[cn(" ... ",-1)])),_:2,__:[2]},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"]),U("input",{type:"file",ref_key:"fileInput",ref:o,accept:".png,.jpg,.jpeg",onChange:d,style:{display:"none"}},null,544)]),_:1},8,["label"])):Le("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title","modelValue"])}}}),CYe={class:"ml-color-dropdown-color-item"},TYe={class:"ml-color-dropdown-color-name"},MYe={class:"ml-color-dropdown-color-item"},AYe={class:"ml-color-dropdown-color-name"},kYe={class:"ml-color-dropdown-color-item"},PYe={class:"ml-color-dropdown-color-name"},LYe=Be({__name:"MlColorDropdown",props:{modelValue:{},disabled:{type:Boolean},onCustomColorSelected:{type:Function}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,i=e,{t:s}=qs(),r=X(!1),o=X(p(n.modelValue)),a=F(()=>{var x;return(x=n.modelValue)==null?void 0:x.toString()}),l=F(()=>b(o.value)),c=[{key:"bylayer",name:"ByLayer"},{key:"byblock",name:"ByBlock"},{key:"aci-1",name:"Red"},{key:"aci-2",name:"Yellow"},{key:"aci-3",name:"Green"},{key:"aci-4",name:"Cyan"},{key:"aci-5",name:"Blue"},{key:"aci-6",name:"Magenta"}],u=F(()=>c.map(x=>({...x,i18nName:KK(x.name)})));async function d(x){if(n.disabled){o.value=p(n.modelValue);return}if(x==="custom-trigger"){if(n.onCustomColorSelected){const _=await n.onCustomColorSelected(n.modelValue);_?(i("update:modelValue",_),o.value=p(_)):o.value=p(n.modelValue);return}r.value=!0;return}const S=m(x);i("update:modelValue",S)}function h(x){n.disabled||(i("update:modelValue",x),o.value=p(x))}function f(){o.value=p(n.modelValue)}function p(x){return x?x.isByLayer?"bylayer":x.isByBlock?"byblock":x.isByACI?`aci-${x.colorIndex}`:x.isByColor?`rgb-${x.red}-${x.green}-${x.blue}`:"":""}function m(x){const S=new Er;if(x==="bylayer")S.setByLayer();else if(x==="byblock")S.setByBlock();else if(x.startsWith("aci-"))S.colorIndex=Number(x.substring(4));else if(x.startsWith("rgb-")){const[_,E,T,A]=x.split("-");S.setRGB(Number(E),Number(T),Number(A))}return S}function b(x){if(!x)return"";if(x.startsWith("aci-"))return new Er(Fi.ByACI,Number(x.substring(4))).cssColor??"";if(x.startsWith("rgb-")){const[S,_,E,T]=x.split("-");return`rgb(${_}, ${E}, ${T})`}return"#FFFFFF"}function g(x){const S=u.value.find(_=>_.key===x);return S?S.i18nName:x.startsWith("rgb-")?s("main.colors.CustomColor"):""}return(x,S)=>{const _=Zt("el-option"),E=Zt("el-select");return z(),se("div",null,[de(E,{modelValue:o.value,"onUpdate:modelValue":S[0]||(S[0]=T=>o.value=T),onChange:d,disabled:n.disabled},{label:xe(()=>[U("div",CYe,[U("span",{class:"ml-color-dropdown-color-preview",style:Ht({backgroundColor:l.value})},null,4),U("span",TYe,Xe(g(o.value)),1)])]),default:xe(()=>[(z(!0),se(At,null,yn(u.value,T=>(z(),De(_,{key:T.key,label:T.i18nName,value:T.key},{default:xe(()=>[U("div",MYe,[U("span",{class:"ml-color-dropdown-color-preview",style:Ht({backgroundColor:b(T.key)})},null,4),U("span",AYe,Xe(T.i18nName),1)])]),_:2},1032,["label","value"]))),128)),de(_,{key:"custom-trigger",value:"custom-trigger",label:v(s)("main.colorDropdown.custom"),disabled:n.disabled},{default:xe(()=>[U("div",kYe,[S[2]||(S[2]=U("span",{class:"ml-color-dropdown-custom-icon"},"🎨",-1)),U("span",PYe,Xe(v(s)("main.colorDropdown.custom")),1)])]),_:1},8,["label","disabled"])]),_:1},8,["modelValue","disabled"]),de(v(qK),{modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=T=>r.value=T),title:v(s)("dialog.colorPickerDlg.title"),color:a.value,onOk:h,onCancel:f},null,8,["modelValue","title","color"])])}}}),PN=Kr(LYe,[["__scopeId","data-v-9fdf03ed"]]),IYe={class:"ml-aci-picker"},RYe={class:"ml-aci-palette ml-aci-palette-large"},OYe=["onMouseenter","onClick"],DYe={class:"ml-aci-small-row"},NYe={class:"ml-aci-palette ml-aci-palette-small"},BYe=["onMouseenter","onClick"],FYe={class:"ml-aci-small-actions"},zYe={class:"ml-aci-palette ml-aci-palette-gray"},UYe=["onMouseenter","onClick"],$Ye={class:"ml-aci-bottom-row"},VYe={class:"ml-aci-bottom-left"},HYe={class:"ml-aci-info-row"},WYe={class:"ml-aci-info-left"},GYe={class:"ml-aci-info-right"},jYe={class:"ml-aci-input-row"},KYe=["placeholder"],qYe=Be({__name:"MlColorIndexPicker",props:{modelValue:{type:Number,default:256}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,i=t,{t:s}=qs(),r=Array.from({length:9},(S,_)=>_+1),o=Array.from({length:240},(S,_)=>_+10),a=Array.from({length:6},(S,_)=>_+250),l=X(i.modelValue??null),c=X(i.modelValue!=null?String(i.modelValue):""),u=X(null),d=X({r:0,g:0,b:0}),h=S=>{const _=new Er;return _.colorIndex=S,_.cssColor||"#FFF"};function f(S){u.value=S;const _=new Er;_.colorIndex=S,d.value={r:_.red??0,g:_.green??0,b:_.blue??0}}function p(){u.value=null}function m(S){l.value=S,c.value=S.toString(),n("update:modelValue",S)}We(()=>i.modelValue,S=>{S==null?(l.value=null,c.value=""):(l.value=S,c.value=String(S))});function b(){const S=c.value.trim().toUpperCase();if(S==="BYLAYER")return m(256);if(S==="BYBLOCK")return m(0);const _=Number(S);if(!Number.isInteger(_)||_<0||_>256){c.value="";return}m(_)}const g=F(()=>l.value==null?"":l.value),x=F(()=>{if(l.value==null||l.value===0||l.value===256)return"";const S=new Er;return S.colorIndex=l.value,`${S.red}, ${S.green}, ${S.blue}`});return(S,_)=>(z(),se("div",IYe,[U("div",RYe,[(z(!0),se(At,null,yn(v(o),E=>(z(),se("div",{key:E,class:"ml-aci-color-cell",style:Ht({background:h(E)}),onMouseenter:T=>f(E),onMouseleave:p,onClick:T=>m(E)},null,44,OYe))),128))]),U("div",DYe,[U("div",NYe,[(z(!0),se(At,null,yn(v(r),E=>(z(),se("div",{key:E,class:"ml-aci-color-cell",style:Ht({background:h(E)}),onMouseenter:T=>f(E),onMouseleave:p,onClick:T=>m(E)},null,44,BYe))),128))]),U("div",FYe,[U("button",{type:"button",onClick:_[0]||(_[0]=E=>m(256))},"ByLayer"),U("button",{type:"button",onClick:_[1]||(_[1]=E=>m(0))},"ByBlock")])]),U("div",zYe,[(z(!0),se(At,null,yn(v(a),E=>(z(),se("div",{key:E,class:"ml-aci-color-cell",style:Ht({background:h(E)}),onMouseenter:T=>f(E),onMouseleave:p,onClick:T=>m(E)},null,44,UYe))),128))]),U("div",$Ye,[U("div",VYe,[U("div",HYe,[U("div",WYe,Xe(v(s)("main.colorIndexPicker.colorIndex"))+Xe(g.value),1),U("div",GYe,Xe(v(s)("main.colorIndexPicker.rgb"))+Xe(x.value),1)]),U("div",jYe,[U("span",null,Xe(v(s)("main.colorIndexPicker.color")),1),_n(U("input",{"onUpdate:modelValue":_[2]||(_[2]=E=>c.value=E),onKeydown:_s(b,["enter"]),placeholder:v(s)("main.colorIndexPicker.inputPlaceholder")},null,40,KYe),[[Mc,c.value]])])]),U("div",{class:"ml-aci-preview-box",style:Ht({background:l.value!==null?h(l.value):"#000"})},null,4)])]))}}),YYe=Kr(qYe,[["__scopeId","data-v-0c39bc11"]]),XYe=Be({__name:"MlDialogManager",setup(t,{expose:e}){const{dialogs:n,toggleDialog:i,registerDialog:s}=yS();return e({toggleDialog:i,registerDialog:s}),(r,o)=>(z(!0),se(At,null,yn(v(n),a=>(z(),se("div",{key:a.name},[(z(),De(Sn(a.component),Dn({modelValue:a.visible,"onUpdate:modelValue":l=>a.visible=l},{ref_for:!0},a.props),null,16,["modelValue","onUpdate:modelValue"]))]))),128))}}),ZYe=["accept"],JYe=Be({__name:"MlFileReader",emits:["file-read"],setup(t,{emit:e}){const n=e,i=X(null),s=mYe(),r=F(()=>{const a=Array.from(s.value);let l="";for(let c=0,u=a.length;c{_o.on("open-file",()=>{var a;(a=i.value)==null||a.click()})});const o=a=>{var l;const c=(l=a.target.files)==null?void 0:l[0];if(c&&c.name){const u=new FileReader;u.readAsArrayBuffer(c),u.onload=d=>{var h;const f=(h=d.target)==null?void 0:h.result;f&&n("file-read",c.name,f)},u.onerror=()=>{console.error("Failed to read the file.")}}};return(a,l)=>(z(),se("input",{type:"file",ref_key:"fileInput",ref:i,accept:r.value,style:{display:"none"},onChange:o},null,40,ZYe))}}),QYe=Be({__name:"MlToggleButton",props:tg({size:{default:30},data:{}},{modelValue:{default:!1},modelModifiers:{}}),emits:tg(["click"],["update:modelValue"]),setup(t,{emit:e}){nF(c=>({a97b120a:o.value}));const n=t,i=$w(t,"modelValue"),s=e,r=F(()=>i.value?n.data.onIcon:n.data.offIcon),o=F(()=>n.size+"px"),a=F(()=>i.value?n.data.onTooltip:n.data.offTooltip),l=()=>{s("click",i.value)};return(c,u)=>{const d=Zt("el-button"),h=Zt("el-tooltip");return z(),De(h,{content:a.value,"hide-after":0},{default:xe(()=>[de(d,{class:"ml-toggle-button",icon:r.value,onClick:l},null,8,["icon"])]),_:1},8,["content"])}}}),ZK=Kr(QYe,[["__scopeId","data-v-48d6b055"]]);(function(){try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".ml-dropdown-icon[data-v-3fc33b5d],.ml-dropdown-icon[data-v-3fc33b5d]:hover{outline:none;border:none}.ml-status-bar[data-v-d6a59cf0]{position:fixed;bottom:0;left:0;right:0;height:30px;display:flex;justify-content:space-between;align-items:center;background-color:var(--el-fill-color);box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-status-bar-left[data-v-d6a59cf0],.ml-status-bar-right[data-v-d6a59cf0]{display:flex;align-items:center}.ml-status-bar-left[data-v-d6a59cf0]>*{margin-right:10px}.ml-status-bar-right[data-v-d6a59cf0]>*{margin-left:10px}.ml-toggle-button[data-v-5adaeb5a]{border:none;padding:0;cursor:pointer;width:var(--021a85e9);height:var(--021a85e9)}.ml-vertical-toolbar-button-group[data-v-c6504e33]{display:flex;flex-direction:column;background-color:var(--el-fill-color)}.ml-horizontal-toolbar-button-group[data-v-c6504e33]{display:flex;flex-direction:row;background-color:var(--el-fill-color)}.ml-toolbar-button[data-v-c6504e33]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:5px}.ml-toolbar-button-text[data-v-c6504e33]{margin-left:0;margin-top:5px}.ml-tool-palette-dialog[data-v-cd1a3c67]{cursor:default;width:300px;min-width:var(--collapsed-width);position:fixed;box-sizing:border-box;border:1px solid var(--el-border-color)}.ml-tool-palette-disabled[data-v-cd1a3c67]{pointer-events:none;opacity:.6}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]{border-bottom:1px solid var(--el-border-color);cursor:default}.ml-tool-palette-dialog-icon[data-v-cd1a3c67]:hover{color:var(--el-color-primary)}.ml-tool-palette-dialog-layout[data-v-cd1a3c67]{display:flex;height:100%}.ml-tool-palette-title-bar[data-v-cd1a3c67]{width:var(--collapsed-width);display:flex;justify-content:left;align-items:center;cursor:move;writing-mode:vertical-rl;text-align:center;background-color:var(--el-fill-color)}.ml-tool-palette-title[data-v-cd1a3c67]{pointer-events:none;margin-top:10px;margin-bottom:10px;font-size:small;-webkit-user-select:none;user-select:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ml-tool-palette-content[data-v-cd1a3c67]{-webkit-user-select:none;user-select:none;flex-grow:1;display:flex;flex-direction:column;background-color:var(--el-fill-color);overflow:hidden}.ml-tool-palette-tabs[data-v-cd1a3c67]{display:flex;flex-direction:column;height:100%;flex:1}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs{display:flex;flex-direction:column;height:100%}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__header{margin:0;border-bottom:none;order:1;flex-shrink:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tabs__content{flex:1;overflow:auto;padding:0;order:2;min-height:0;position:relative}.ml-tool-palette-tabs[data-v-cd1a3c67] .el-tab-pane{height:100%;overflow:auto}.ml-tool-palette-default-content[data-v-cd1a3c67]{flex:1;overflow:auto;display:flex;flex-direction:column}.ml-tool-palette-dialog-layout.left .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:1}.ml-tool-palette-dialog-layout.left .ml-tool-palette-content[data-v-cd1a3c67],.ml-tool-palette-dialog-layout.right .ml-tool-palette-title-bar[data-v-cd1a3c67]{order:2}.ml-tool-palette-dialog-layout.right .ml-tool-palette-content[data-v-cd1a3c67]{order:1}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();const eXe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},tXe=U("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"},null,-1),nXe=[tXe];function iXe(t,e){return z(),se("svg",eXe,[...nXe])}const LN={render:iXe},sXe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},rXe=U("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"},null,-1),oXe=[rXe];function aXe(t,e){return z(),se("svg",sXe,[...oXe])}const IN={render:aXe},lXe=Be({__name:"MlCollapse",props:tg({size:{default:18},reverse:{type:Boolean,default:!1}},{modelValue:{default:!0},modelModifiers:{}}),emits:tg(["change"],["update:modelValue"]),setup(t,{emit:e}){const n=t,i=$w(t,"modelValue"),s=e,r=F(()=>n.reverse?i.value?LN:IN:i.value?IN:LN),o=F(()=>`${n.size}px`),a=()=>{s("change",i.value),i.value=!i.value};return(l,c)=>{const u=Ut;return z(),De(u,{size:o.value,onClick:a},{default:xe(()=>[(z(),De(Sn(r.value)))]),_:1},8,["size"])}}}),cXe=t=>(uB("data-v-3fc33b5d"),t=t(),dB(),t),uXe=cXe(()=>U("svg",{preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em","data-v-63d067da":""},[U("path",{fill:"currentColor",d:"m18.5 10l4.4 11h-2.155l-1.201-3h-4.09l-1.199 3h-2.154L16.5 10h2zM10 2v2h6v2h-1.968a18.222 18.222 0 0 1-3.62 6.301a14.864 14.864 0 0 0 2.336 1.707l-.751 1.878A17.015 17.015 0 0 1 9 13.725a16.676 16.676 0 0 1-6.201 3.548l-.536-1.929a14.7 14.7 0 0 0 5.327-3.042A18.078 18.078 0 0 1 4.767 8h2.24A16.032 16.032 0 0 0 9 10.877a16.165 16.165 0 0 0 2.91-4.876L2 6V4h6V2h2zm7.5 10.885L16.253 16h2.492L17.5 12.885z"})],-1)),dXe=Be({__name:"MlDropdown",props:{icon:{},items:{},current:{default:void 0}},emits:{click:null},setup(t,{emit:e}){const n=t,i=e,s=F(()=>n.items.filter(o=>o.name!==n.current)),r=o=>{i("click",o)};return(o,a)=>{const l=Ut,c=Jz,u=Qz,d=Zz;return z(),De(d,{onCommand:r},{dropdown:xe(()=>[de(u,null,{default:xe(()=>[(z(!0),se(At,null,yn(s.value,h=>(z(),De(c,{key:h.text,command:h.name},{default:xe(()=>[cn(Xe(h.text),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:xe(()=>[de(l,{size:"30",class:"ml-dropdown-icon"},{default:xe(()=>[uXe]),_:1})]),_:1})}}}),_S=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},hXe=_S(dXe,[["__scopeId","data-v-3fc33b5d"]]),fXe='',pXe=Be({__name:"MlLanguage",props:{languages:{},current:{}},emits:{click:null},setup(t,{emit:e}){const n=t,i=e,s=r=>{i("click",r)};return(r,o)=>(z(),De(hXe,{icon:fXe,items:n.languages,current:n.current,onClick:s},null,8,["items","current"]))}}),mXe={},gXe={class:"ml-status-bar"},vXe={class:"ml-status-bar-left"},yXe={class:"ml-status-bar-right"};function bXe(t,e){return z(),se("div",gXe,[U("div",vXe,[Ue(t.$slots,"left",{},void 0,!0)]),U("div",yXe,[Ue(t.$slots,"right",{},void 0,!0)])])}const _Xe=_S(mXe,[["render",bXe],["__scopeId","data-v-d6a59cf0"]]),wXe={key:0,class:"ml-toolbar-button-text"},xXe=Be({__name:"MlToolBar",props:{items:{},size:{default:"large"},direction:{}},emits:{click:null},setup(t,{emit:e}){const n=t,i=e,s=F(()=>n.direction==="vertical"?"ml-vertical-toolbar-button-group":"ml-horizontal-toolbar-button-group"),r=F(()=>n.size==="small"?20:30),o=F(()=>{switch(n.size){case"small":return 30;case"medium":return 50}return 70}),a=u=>u.description?u.description:u.text,l=F(()=>n.size==="large"),c=u=>{i("click",u)};return(u,d)=>{const h=Ut,f=Sr,p=Or,m=xk;return z(),De(m,{class:J(s.value)},{default:xe(()=>[(z(!0),se(At,null,yn(u.items,(b,g)=>(z(),De(p,{key:b.text,content:a(b),"hide-after":0},{default:xe(()=>[(z(),De(f,{class:"ml-toolbar-button",style:Ht({width:o.value+"px",height:o.value+"px"}),key:g,onClick:x=>c(b.command)},{default:xe(()=>[U("div",null,[de(h,{size:r.value},{default:xe(()=>[(z(),De(Sn(b.icon)))]),_:2},1032,["size"]),l.value?(z(),se("div",wXe,Xe(b.text),1)):Le("",!0)])]),_:2},1032,["style","onClick"]))]),_:2},1032,["content"]))),128))]),_:1},8,["class"])}}}),SXe=_S(xXe,[["__scopeId","data-v-c6504e33"]]),RN=20;function EXe(t,e,n){const i=X(!1),s=l=>{if(n.value&&t.value){const c=t.value.getBoundingClientRect(),u=l.clientXc.right||l.clientYc.bottom;i.value=!u}},r=()=>{n.value&&(i.value=!0)},o=()=>{e.value&&e.value.addEventListener("mousemove",r),t.value&&t.value.addEventListener("mousemove",r)},a=()=>{e.value&&e.value.removeEventListener("mousemove",r),t.value&&t.value.removeEventListener("mousemove",r)};return mn(()=>{window.addEventListener("mousemove",s)}),eo(()=>{window.removeEventListener("mousemove",s)}),We(n,l=>{l&&(i.value=!1)}),We(t,l=>{l?o():a()}),{autoOpened:i}}function CXe(t,e,n){const i=X(!1),s=X(null),r=X(null),o={x:0,y:0},a=F(()=>s.value==null||r.value==null?{x:0,y:0}:{x:s.value.x-r.value.x,y:s.value.y-r.value.y}),l=()=>{if(t.value){const p=t.value.getBoundingClientRect();r.value={x:p.left,y:p.top},s.value={x:p.left,y:p.top}}},c=()=>{t.value&&t.value.addEventListener("mousedown",d)},u=()=>{t.value&&t.value.removeEventListener("mousedown",d)},d=p=>{if(t.value!=null){if(e&&e.value){const m=e.value.getBoundingClientRect();if(p.clientXm.right||p.clientYm.bottom)return}i.value=!0,o.x=p.clientX,o.y=p.clientY,l(),document.addEventListener("mousemove",h),document.addEventListener("mouseup",f)}},h=p=>{if(i.value&&r.value&&s.value){const m=window.innerWidth,b=window.innerHeight,g=t.value,x=g.getBoundingClientRect(),S=x.width,_=x.height,E=r.value.x+(p.clientX-o.x),T=r.value.y+(p.clientY-o.y);s.value.x=Math.max(n?n.value.offset.value.left:0,E);const A=m-S;s.value.x=Math.min(n?A-n.value.offset.value.right:A,s.value.x),s.value.y=Math.max(n?n.value.offset.value.top:0,Math.min(T,b-_));const I=b-_;s.value.y=Math.min(n?I-n.value.offset.value.bottom:I,s.value.y),g.style.left=s.value.x+"px",g.style.top=s.value.y+"px"}},f=()=>{i.value=!1,document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",f)};return mn(()=>{t.value&&(l(),c())}),eo(()=>{t.value&&t.value.removeEventListener("mousedown",d)}),We(t,p=>{p?(l(),c()):u()}),{isDragging:i,movement:a,position:s}}function TXe(t,e,n){const i=X(!1),s=X("left"),{isDragging:r,movement:o,position:a}=CXe(t,e,n);return We(o,l=>{if(l&&t.value){const c=t.value.getBoundingClientRect();c.left<=n.value.offset.value.left?(s.value="left",i.value=!0):window.innerWidth-c.left-c.width<=n.value.offset.value.right?(s.value="right",i.value=!0):i.value=!1}}),{docked:i,orientation:s,isDragging:r,movement:o,position:a}}function MXe(t,e,n,i){const s=X(null),r=X(null),o=X(null),a=X(null);return We(t,(l,c)=>{s.value=c}),We(e,(l,c)=>{r.value=c}),We(n,(l,c)=>{o.value=c}),We(i,(l,c)=>{a.value=c}),{lastLeft:s,lastTop:r,lastWidth:o,lastHeight:a}}function AXe(t,e,n,i){const s=X(t.value.width),r=X(t.value.left),o=F(()=>t.value.width),a=F(()=>t.value.left),l=F(()=>n.value?n.value.x:null);return We([o,a],([c,u])=>{(s.value==null||r.value==null||e.value)&&(s.value=c,r.value=u)}),We(l,c=>{i.value&&n.value&&(r.value=c)}),{left:r,width:s}}function kXe(t,e=X({left:0,right:0,top:0,bottom:0})){const n=X({});let i=!1;const s=()=>{if(!i&&t.value){const r=t.value.getBoundingClientRect();n.value.left=Math.max(r.left,e.value.left),n.value.top=Math.max(r.top,e.value.top),n.value.width=r.width,n.value.height=r.height,i=!0}};return mn(()=>{t.value&&s()}),We(t,r=>{r&&s()}),{isIntialized:i,initialRect:n}}function PXe(t,e=X(!1),n=X(!1),i=X({left:0,right:0,top:0,bottom:0}),s={width:20,height:40}){const{initialRect:r}=kXe(t,i),o=X(!1);let a=0,l=0,c=0,u=0,d=0;const h=5,f=X(null),p=S=>{if(!(!t.value||e.value))if(o.value){const _=S.clientX-u,E=S.clientY-d;if(f.value==="left"||f.value==="left-bottom-corner"){const T=l-_;T>s.width&&(r.value.width=T,r.value.left=a+_,t.value.style.left=r.value.left+"px",t.value.style.width=r.value.width+"px")}if(f.value==="right"||f.value==="right-bottom-corner"){const T=l+_;T>s.width&&(r.value.width=T,t.value.style.width=r.value.width+"px")}if(f.value==="bottom"||f.value==="left-bottom-corner"||f.value==="right-bottom-corner"){const T=c+E;T>s.height&&(r.value.height=T,t.value.style.height=r.value.height+"px")}}else{const _=t.value.getBoundingClientRect(),E=S.clientX-_.left,T=S.clientY-_.top,A=Math.abs(E)<=h,I=Math.abs(_.width-E)<=h,P=Math.abs(_.height-T)<=h;A&&P&&n.value?(t.value.style.cursor="nesw-resize",f.value="left-bottom-corner"):I&&P&&!n.value?(t.value.style.cursor="nwse-resize",f.value="right-bottom-corner"):A&&n.value?(t.value.style.cursor="ew-resize",f.value="left"):I&&!n.value?(t.value.style.cursor="ew-resize",f.value="right"):P?(t.value.style.cursor="ns-resize",f.value="bottom"):(t.value.style.cursor="",f.value=null)}},m=S=>{if(!t.value||!f.value)return;const _=t.value.getBoundingClientRect();u=S.clientX,d=S.clientY,l=_.width,c=_.height,a=_.left,r.value.width=l,r.value.height=c,r.value.left=_.left,r.value.top=_.top,o.value=!0,document.addEventListener("mousemove",p),document.addEventListener("mouseup",b)},b=()=>{o.value=!1,f.value=null,t.value&&(t.value.style.cursor=""),document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",b)},g=()=>{t.value&&(t.value.removeEventListener("mousedown",m),t.value.removeEventListener("mousemove",p)),document.removeEventListener("mouseup",b)},x=()=>{t.value&&(t.value.addEventListener("mousedown",m),t.value.addEventListener("mousemove",p))};return mn(()=>{t.value&&x()}),gi(()=>{g()}),We(t,S=>{S?x():g()}),{rect:r,isResizing:o}}function LXe(t,e,n,i){const s=()=>{if(t.value){const l=t.value;e.value?l.style.transition="width 0.3s ease-out, left 0.3s ease-out":l.style.transition="width 0.3s ease"}},r=()=>{t.value&&(t.value.style.transition="")},o=()=>{t.value&&t.value.removeEventListener("transitionend",r)},a=()=>{t.value&&t.value.addEventListener("transitionend",r)};mn(()=>{t.value&&t.value.addEventListener("transitionend",r)}),gi(()=>{t.value&&t.value.removeEventListener("transitionend",r)}),We(t,l=>{l?a():o()}),We(n,()=>{s()}),We(i,()=>{s()})}function IXe(t,e,n,i){const s=X(window.innerWidth),r=X(window.innerHeight),{docked:o,orientation:a,movement:l,position:c,isDragging:u}=TXe(t,e,i),d=F(()=>a.value==="right"),{rect:h,isResizing:f}=PXe(t,n,d,i.value.offset),{width:p,left:m}=AXe(h,f,c,u),{lastTop:b,lastHeight:g}=MXe(F(()=>h.value.left),F(()=>h.value.top),F(()=>h.value.width),F(()=>h.value.height)),{autoOpened:x}=EXe(t,e,n);LXe(t,d,n,x);const S=A=>{if(t.value){const I=t.value.getBoundingClientRect(),P=I.left+A;if(d.value){h.value.left=P;const k=window.innerWidth-I.width-I.left;I.left<=0&&k>=0&&A<0&&(h.value.left=Math.max(0,P)),window.innerWidth-I.width<=0&&(h.value.left=window.innerWidth-I.width)}else I.left+I.width>=window.innerWidth&&A<0&&(h.value.left=Math.max(0,P))}},_=()=>{const A=window.innerWidth-s.value;s.value=window.innerWidth,r.value=window.innerHeight,S(A)};mn(()=>{window.addEventListener("resize",_)}),eo(()=>{window.removeEventListener("resize",_)});const E=A=>{A?(h.value.width=RN,d.value&&m.value&&p.value&&(h.value.left=m.value+p.value-RN)):(h.value.width=p.value,d.value&&m.value&&p.value&&(h.value.left=m.value))},T=()=>{o.value?(h.value.top=i.value.offset.value.top,h.value.height=window.innerHeight-i.value.offset.value.top-i.value.offset.value.bottom):(h.value.top=b.value,h.value.height=g.value)};return We(o,()=>{T()}),We(n,A=>{E(A)}),We(x,A=>{n.value&&!u.value&&E(!A)}),We(l,A=>{if(A&&t.value){const I=t.value.getBoundingClientRect();h.value.left=I.left,h.value.top=I.top}}),{rect:h,orientation:a,reversed:d}}const RXe=t=>(uB("data-v-cd1a3c67"),t=t(),dB(),t),OXe=RXe(()=>U("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 1024 1024"},[U("path",{fill:"currentColor",d:"M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.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"})],-1)),DXe={class:"ml-tool-palette-title"},NXe={class:"ml-tool-palette-content"},BXe={key:1,class:"ml-tool-palette-default-content"},FXe=Be({__name:"MlToolPalette",props:tg({title:{default:""},tabs:{default:void 0},leftOffset:{default:0},rightOffset:{default:0},topOffset:{default:0},bottomOffset:{default:0},disabled:{type:Boolean,default:!1}},{modelValue:{default:!0},modelModifiers:{},activeTab:{default:""},activeTabModifiers:{}}),emits:tg(["close","tab-change","tab-close"],["update:modelValue","update:activeTab"]),setup(t,{emit:e}){const n=t,i=$w(t,"modelValue"),s=$w(t,"activeTab"),r=e,o=F(()=>n.tabs&&n.tabs.length>0);mn(()=>{o.value&&!s.value&&n.tabs&&n.tabs.length>0&&(s.value=n.tabs[0].name)}),We(()=>n.tabs,_=>{_&&_.length>0&&!s.value&&(s.value=_[0].name)},{immediate:!0});const a=X(!1),l=X(null),c=X(null),u=F(()=>({offset:X({left:n.leftOffset,right:n.rightOffset,top:n.topOffset,bottom:n.bottomOffset})})),{rect:d,orientation:h,reversed:f}=IXe(c,l,a,u),p=F(()=>({left:`${d.value.left}px`,top:`${d.value.top}px`,width:`${d.value.width}px`,height:`${d.value.height}px`})),m=F(()=>f.value?{borderLeft:"1px solid var(--el-border-color)",borderRight:null}:{borderLeft:null,borderRight:"1px solid var(--el-border-color)"}),b=F(()=>{if(o.value&&s.value&&n.tabs){const _=n.tabs.find(E=>E.name===s.value);if(_!=null&&_.title)return _.title}return n.title}),g=()=>{i.value=!1;const _=c.value;r("close",{x:_?_.clientLeft:0,y:_?_.clientTop:0})},x=_=>{r("tab-change",_)},S=_=>{if(r("tab-close",_),s.value===_&&n.tabs){const E=n.tabs.findIndex(T=>T.name===_);if(E>=0){const T=n.tabs[E+1]||n.tabs[E-1];T&&(s.value=T.name)}}};return(_,E)=>{const T=Ut,A=p$,I=f$;return i.value?(z(),se("div",{key:0,ref_key:"toolPaletteElement",ref:c,style:Ht([p.value]),class:J(["ml-tool-palette-dialog",{"ml-tool-palette-disabled":_.disabled}])},[U("div",{class:J(["ml-tool-palette-dialog-layout",v(h)])},[U("div",{ref_key:"titleBarElement",ref:l,class:"ml-tool-palette-title-bar",style:Ht(m.value)},[de(T,{size:18,class:"ml-tool-palette-dialog-icon",onClick:E[0]||(E[0]=P=>!_.disabled&&g())},{default:xe(()=>[OXe]),_:1}),de(lXe,{class:"ml-tool-palette-dialog-icon",modelValue:a.value,"onUpdate:modelValue":E[1]||(E[1]=P=>a.value=P),reverse:v(f),disabled:_.disabled},null,8,["modelValue","reverse","disabled"]),U("span",DXe,Xe(b.value),1)],4),U("div",NXe,[o.value?(z(),De(I,{key:0,modelValue:s.value,"onUpdate:modelValue":E[2]||(E[2]=P=>s.value=P),type:"border-card",class:"ml-tool-palette-tabs",onTabRemove:E[3]||(E[3]=P=>!_.disabled&&S),onTabChange:E[4]||(E[4]=P=>!_.disabled&&x)},{default:xe(()=>[(z(!0),se(At,null,yn(n.tabs,P=>(z(),De(A,{key:P.name,name:P.name,label:P.label},{label:xe(()=>[U("span",null,Xe(P.label),1)]),default:xe(()=>[Ue(_.$slots,`tab-${P.name}`,{},void 0,!0)]),_:2},1032,["name","label"]))),128))]),_:3},8,["modelValue"])):(z(),se("div",BXe,[Ue(_.$slots,"default",{},void 0,!0)]))])],2)],6)):Le("",!0)}}}),zXe=_S(FXe,[["__scopeId","data-v-cd1a3c67"]]),UXe={class:"ml-entity-properties"},$Xe={key:0,class:"ml-entity-selector"},VXe={class:"ml-cell-container"},HXe={key:0},WXe={key:1},GXe={key:0,class:"ml-cell-value"},jXe=["title","onDblclick"],KXe={key:1},qXe={key:2,class:"ml-no-entity-selected"},YXe=Be({__name:"MlEntityProperties",props:{entityPropsList:{},editable:{type:Boolean}},emits:["update-property"],setup(t,{emit:e}){const{t:n}=qs(),i=t,s=e,r=X(-1);function o(f){var p;const m=f.accessor.get();switch(f.type){case"boolean":return m?"True":"False";case"enum":{const b=(p=f.options)==null?void 0:p.find(g=>g.value===m);return b&&b.label?AN(b.label):""}case"color":return m.toString();case"lineweight":return ep[m];case"transparency":return m.toString();default:return m!=null?String(m):""}}async function a(f){const p=o(f);try{await navigator.clipboard.writeText(p),Nu({message:n("main.toolPalette.entityProperties.propertyPanel.propValCopied"),grouping:!0,type:"success"})}catch(m){console.error(m),Nu({message:n("main.toolPalette.entityProperties.propertyPanel.failedToCopyPropVal"),grouping:!0,type:"error"})}}const l=F(()=>{const f=i.entityPropsList;if(!f||f.length===0)return[];if(f.length===1)return c(f[0]);if(r.value>=0){const p=f[r.value];return c(p)}else{const p=u(f);return c(p)}});function c(f){return f.groups.map((p,m)=>({id:`group-${m}`,name:p.groupName,isGroup:!0,children:p.properties.map((b,g)=>({...b,id:`group-${m}-prop-${g}`,isGroup:!1}))}))}function u(f){if(!f.length)return{type:"",groups:[]};const p=f[0],m=[];for(const b of p.groups){const g=[];for(const x of b.properties)f.every(S=>{const _=S.groups.find(T=>T.groupName===b.groupName),E=_?.properties.find(T=>T.name===x.name);return E&&E.accessor.get()===x.accessor.get()})&&g.push(x);g.length&&m.push({groupName:b.groupName,properties:g})}return{type:p.type,groups:m}}const d=({row:f,columnIndex:p})=>f.isGroup?p===0?[1,2]:[0,0]:[1,1];function h(f,p){var m;if(!i.editable||!((m=i.entityPropsList)!=null&&m.length))return;const b=(r.value>=0?i.entityPropsList[r.value]:i.entityPropsList[0]).groups.find(g=>g.properties.some(x=>x.name===f.name));b&&s("update-property",{groupName:b.groupName,propertyName:f.name,newValue:p})}return(f,p)=>{const m=Zt("el-option"),b=Zt("el-select"),g=Zt("el-table-column"),x=Zt("el-switch"),S=Zt("el-input-number"),_=Zt("el-input"),E=Zt("el-table");return z(),se("div",UXe,[f.entityPropsList&&f.entityPropsList.length>1?(z(),se("div",$Xe,[de(b,{modelValue:r.value,"onUpdate:modelValue":p[0]||(p[0]=T=>r.value=T),placeholder:"Select Entity",style:{width:"100%","margin-bottom":"0.5rem"}},{default:xe(()=>[de(m,{label:v(n)("main.toolPalette.entityProperties.propertyPanel.multipleEntitySelected",{count:f.entityPropsList.length}),value:-1},null,8,["label"]),(z(!0),se(At,null,yn(f.entityPropsList,(T,A)=>(z(),De(m,{key:A,label:T.type,value:A},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])])):Le("",!0),l.value.length?(z(),De(E,{key:1,data:l.value,"row-key":"id",border:"","default-expand-all":"","tree-props":{children:"children",hasChildren:"children"},"show-header":!1,"span-method":d,class:"ml-entity-properties-table"},{default:xe(()=>[de(g,{prop:"name","min-width":"auto"},{default:xe(({row:T})=>[U("div",VXe,[U("div",{class:J(["ml-cell-label",{"ml-group-row":T.isGroup}])},[T.isGroup?(z(),se("strong",HXe,Xe(v(MN)(T.name)),1)):(z(),se("span",WXe,Xe(v(MN)(T.name)),1))],2)])]),_:1}),de(g,null,{default:xe(({row:T})=>[T.isGroup?Le("",!0):(z(),se("div",GXe,[!f.editable||!T.editable?(z(),se(At,{key:0},[T.type==="color"?(z(),De(v(PN),{key:0,"model-value":T.accessor.get(),disabled:""},null,8,["model-value"])):(z(),se("span",{key:1,title:o(T),class:"ml-readonly-value",onDblclick:A=>a(T)},Xe(o(T)),41,jXe))],64)):(z(),se("div",KXe,[T.type==="enum"?(z(),De(b,{key:0,"model-value":T.accessor.get(),onChange:A=>h(T,A),style:{width:"100%"}},{default:xe(()=>[(z(!0),se(At,null,yn(T.options||[],A=>(z(),De(m,{key:A.value,label:v(AN)(A.label),value:A.value},null,8,["label","value"]))),128))]),_:2},1032,["model-value","onChange"])):T.type==="color"?(z(),De(v(PN),{key:1,"model-value":T.accessor.get(),onColorChange:A=>h(T,A)},null,8,["model-value","onColorChange"])):T.type==="boolean"?(z(),De(x,{key:2,"model-value":T.accessor.get(),onChange:A=>h(T,A)},null,8,["model-value","onChange"])):T.type==="int"?(z(),De(S,{key:3,"model-value":T.accessor.get(),step:1,precision:0,onChange:A=>h(T,A)},null,8,["model-value","onChange"])):T.type==="float"?(z(),De(S,{key:4,"model-value":T.accessor.get(),step:.1,precision:3,onChange:A=>h(T,A)},null,8,["model-value","onChange"])):(z(),De(_,{key:5,"model-value":T.accessor.get(),onInput:A=>h(T,A)},null,8,["model-value","onInput"]))]))]))]),_:1})]),_:1},8,["data"])):(z(),se("div",qXe,Xe(v(n)("main.toolPalette.entityProperties.propertyPanel.noEntitySelected")),1))])}}}),XXe=Kr(YXe,[["__scopeId","data-v-cf717cab"]]),ZXe={class:"ml-layer-list-cell"},JXe={class:"ml-layer-list-cell"},QXe=Be({__name:"MlLayerList",props:{editor:{}},setup(t){const{t:e}=qs(),n=t,i=vYe(n.editor),s=p=>F(()=>{const m=Er.fromString(p.color);return m?.cssColor||"#FFFFFF"}),r=p=>{n.editor.curView.zoomToFitLayer(p.name)&&Nu({message:e("main.toolPalette.layerManager.layerList.zoomToLayer",{layer:p.name}),grouping:!0,type:"success"})},o=p=>{const m=n.editor.curDocument.database.tables.layerTable.getAt(p.name);m&&(m.isOff=!p.isOn)},a=X(!1),l=X(null),c=X(void 0),u=p=>{l.value=p,c.value=p.color,a.value=!0},d=p=>{if(!l.value)return;const m=l.value;m.color=p.toString();const b=n.editor.curDocument.database.tables.layerTable.getAt(m.name);b&&(b.color=p)},h=p=>{d(p)},f=()=>{};return(p,m)=>{const b=Zt("el-table-column"),g=Zt("el-checkbox"),x=Zt("el-tag");return z(),se(At,null,[de(v(YU),{data:v(i),class:"ml-layer-list",onRowDblclick:r},{default:xe(()=>[de(b,{property:"name",label:v(e)("main.toolPalette.layerManager.layerList.name"),"min-width":"120",sortable:"","show-overflow-tooltip":""},null,8,["label"]),de(b,{property:"isOn",label:v(e)("main.toolPalette.layerManager.layerList.on"),width:"50"},{default:xe(S=>[U("div",ZXe,[de(g,{modelValue:S.row.isOn,"onUpdate:modelValue":_=>S.row.isOn=_,onChange:_=>o(S.row)},null,8,["modelValue","onUpdate:modelValue","onChange"])])]),_:1},8,["label"]),de(b,{property:"color",label:v(e)("main.toolPalette.layerManager.layerList.color"),width:"70"},{default:xe(S=>[U("div",JXe,[de(x,{color:s(S.row).value,class:"ml-layer-list-color",onClick:un(_=>u(S.row),["stop"])},null,8,["color","onClick"])])]),_:1},8,["label"])]),_:1},8,["data"]),de(v(qK),{modelValue:a.value,"onUpdate:modelValue":m[0]||(m[0]=S=>a.value=S),title:v(e)("dialog.colorPickerDlg.title"),color:c.value,onOk:h,onCancel:f},null,8,["modelValue","title","color"])],64)}}}),eZe={class:"ml-layer-list-wrapper"},tZe=Be({__name:"MlPaletteManager",props:{editor:{}},setup(t){const e=t,n=["layerManager","entityProperties"],i=X(n[0]),s=F(()=>n.map(a=>({name:a,label:aYe(a),title:oYe(a)}))),{selectionSet:r}=_Ye(),o=F(()=>{const a=[],l=si.instance.curDocument.database;return r.value.forEach(c=>{const u=l.tables.blockTable.modelSpace.getIdAt(c);u&&a.push(u.properties)}),a});return(a,l)=>{const c=Zt("el-config-provider");return z(),De(c,{size:"small"},{default:xe(()=>[de(v(zXe),{class:"ml-layer-manager",modelValue:v(If).dialogs.layerManager,"onUpdate:modelValue":l[0]||(l[0]=u=>v(If).dialogs.layerManager=u),"active-tab":i.value,"onUpdate:activeTab":l[1]||(l[1]=u=>i.value=u),tabs:s.value,"bottom-offset":30},{"tab-layerManager":xe(()=>[U("div",eZe,[de(QXe,{editor:e.editor},null,8,["editor"])])]),"tab-entityProperties":xe(()=>[de(XXe,{"entity-props-list":o.value},null,8,["entity-props-list"])]),_:1},8,["modelValue","active-tab","tabs"])]),_:1})}}}),nZe=Kr(tZe,[["__scopeId","data-v-18adcdd0"]]),P_=8,iZe=Be({__name:"MlEntityInfo",setup(t){nF(h=>({"3e47cda4":l.value,"0741074e":c.value}));const{t:e}=qs(),n=X(null),{hovered:i,entity:s,mouse:r}=gYe(),o=X(180),a=X(120),l=F(()=>`${Math.min(Math.max(r.value.x,P_),window.innerWidth-o.value-P_)}px`),c=F(()=>`${Math.min(Math.max(r.value.y,P_),window.innerHeight-a.value-P_)}px`),u=F(()=>{const h=s.value;return h?{type:rYe(h),color:KK(h.color.toString()),layer:h.layer,lineType:h.lineType}:{type:"",color:"",layer:"",lineType:""}}),d=F(()=>i.value&&u.value.type!==""&&wr.instance.isShowEntityInfo&&!si.instance.editor.isActive);return We(d,async h=>{var f;if(h){await Nt();const p=(f=n.value)==null?void 0:f.$el;p&&(o.value=p.offsetWidth,a.value=p.offsetHeight)}}),(h,f)=>{const p=Zt("el-text"),m=Zt("el-col"),b=Zt("el-row"),g=Zt("el-card");return d.value?(z(),De(g,{key:0,ref_key:"cardRef",ref:n,class:"ml-entity-info"},{default:xe(()=>[de(b,{class:"ml-entity-info-text"},{default:xe(()=>[de(m,{span:24},{default:xe(()=>[de(p,{size:"small",class:"ml-entity-info-title"},{default:xe(()=>[cn(Xe(u.value.type),1)]),_:1})]),_:1})]),_:1}),de(b,{class:"ml-entity-info-text"},{default:xe(()=>[de(m,{span:10},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(v(e)("main.entityInfo.color")),1)]),_:1})]),_:1}),de(m,{span:14},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(u.value.color),1)]),_:1})]),_:1})]),_:1}),de(b,{class:"ml-entity-info-text"},{default:xe(()=>[de(m,{span:10},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(v(e)("main.entityInfo.layer")),1)]),_:1})]),_:1}),de(m,{span:14},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(u.value.layer),1)]),_:1})]),_:1})]),_:1}),de(b,{class:"ml-entity-info-text"},{default:xe(()=>[de(m,{span:10},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(v(e)("main.entityInfo.lineType")),1)]),_:1})]),_:1}),de(m,{span:14},{default:xe(()=>[de(p,{size:"small"},{default:xe(()=>[cn(Xe(u.value.lineType),1)]),_:1})]),_:1})]),_:1})]),_:1},512)):Le("",!0)}}}),sZe=Kr(iZe,[["__scopeId","data-v-d0b7631d"]]),rZe=Be({__name:"MlLanguageSelector",props:{currentLocale:{default:void 0}},setup(t){const e=C1(),n=t,{effectiveLocale:i,setLocale:s}=YK(n.currentLocale),r=ni([{name:"en",text:"English"},{name:"zh",text:"简体中文"}]),o=a=>{(a==="en"||a==="zh")&&s(a)};return(a,l)=>v(e).isShowLanguageSelector?(z(),De(v(pXe),{key:0,class:"ml-language-selector",languages:r,current:v(i),onClick:o},null,8,["languages","current"])):Le("",!0)}}),oZe=Kr(rZe,[["__scopeId","data-v-22a7d15f"]]),aZe=Be({__name:"MlMainMenu",setup(t){const{t:e}=qs(),n=C1(),i=s=>{s==="Convert"?new lK().tirgger(si.instance.context):s==="QNew"?new uK().tirgger(si.instance.context):s==="Open"&&new cK().tirgger(si.instance.context)};return(s,r)=>{const o=Zt("el-icon"),a=Zt("el-dropdown-item"),l=Zt("el-dropdown-menu"),c=Zt("el-dropdown");return v(n).isShowMainMenu?(z(),De(c,{key:0,"aria-hidden":"false",class:"ml-main-menu-container",onCommand:i},{dropdown:xe(()=>[de(l,null,{default:xe(()=>[de(a,{command:"QNew"},{default:xe(()=>[cn(Xe(v(e)("main.mainMenu.new")),1)]),_:1}),de(a,{command:"Open"},{default:xe(()=>[cn(Xe(v(e)("main.mainMenu.open")),1)]),_:1})]),_:1})]),default:xe(()=>[de(o,{class:"ml-main-menu-icon",size:"30"},{default:xe(()=>[de(v(tKe))]),_:1})]),_:1})):Le("",!0)}}}),lZe=Kr(aZe,[["__scopeId","data-v-8caede15"]]),cZe={key:0,class:"ml-vertical-toolbar-container"},uZe=Be({__name:"MlToolBars",setup(t){const{t:e}=qs(),n=C1(),i=F(()=>[{icon:kKe,text:e("main.verticalToolbar.select.text"),command:"select",description:e("main.verticalToolbar.select.description")},{icon:TKe,text:e("main.verticalToolbar.pan.text"),command:"pan",description:e("main.verticalToolbar.pan.description")},{icon:DKe,text:e("main.verticalToolbar.zoomToExtent.text"),command:"zoom",description:e("main.verticalToolbar.zoomToExtent.description")},{icon:IKe,text:e("main.verticalToolbar.zoomToBox.text"),command:"zoomw",description:e("main.verticalToolbar.zoomToBox.description")},{icon:_Ke,text:e("main.verticalToolbar.layer.text"),command:"la",description:e("main.verticalToolbar.layer.description")}]),s=r=>{si.instance.sendStringToExecute(r)};return(r,o)=>v(n).isShowToolbar?(z(),se("div",cZe,[de(v(SXe),{items:i.value,size:"small",direction:"vertical",onClick:s},null,8,["items"])])):Le("",!0)}}),dZe={class:"ml-notification-item-icon"},hZe={class:"ml-notification-item-content"},fZe={class:"ml-notification-item-header"},pZe={class:"ml-notification-item-title"},mZe={class:"ml-notification-item-actions"},gZe={key:0,class:"ml-notification-item-message"},vZe={class:"ml-notification-item-footer"},yZe={class:"ml-notification-item-time"},bZe=Be({__name:"MlNotificationItem",props:{notification:{}},emits:["close","action"],setup(t){const e=t,{t:n}=qs(),i=F(()=>{switch(e.notification.type){case"info":return CN;case"warning":return fKe;case"error":return Yje;case"success":return cKe;default:return CN}}),s=o=>{o.action()},r=o=>{const a=new Date().getTime()-o.getTime(),l=Math.floor(a/6e4),c=Math.floor(a/36e5),u=Math.floor(a/864e5);return u>0?n("main.notification.time.daysAgo",{count:u}):c>0?n("main.notification.time.hoursAgo",{count:c}):l>0?n("main.notification.time.minutesAgo",{count:l}):n("main.notification.time.justNow")};return(o,a)=>{const l=Zt("el-icon"),c=Zt("el-button");return z(),se("div",{class:J(["ml-notification-item",`ml-notification-item--${o.notification.type}`])},[U("div",dZe,[de(l,null,{default:xe(()=>[(z(),De(Sn(i.value)))]),_:1})]),U("div",hZe,[U("div",fZe,[U("h4",pZe,Xe(o.notification.title),1),U("div",mZe,[o.notification.actions&&o.notification.actions.length>0?(z(!0),se(At,{key:0},yn(o.notification.actions,u=>(z(),De(c,{key:u.label,type:u.primary?"primary":"default",size:"small",onClick:d=>s(u)},{default:xe(()=>[cn(Xe(u.label),1)]),_:2},1032,["type","onClick"]))),128)):Le("",!0),de(c,{text:"",size:"small",onClick:a[0]||(a[0]=u=>o.$emit("close"))},{default:xe(()=>[de(l,null,{default:xe(()=>[de(v(jP))]),_:1})]),_:1})])]),o.notification.message?(z(),se("p",gZe,Xe(o.notification.message),1)):Le("",!0),U("div",vZe,[U("span",yZe,Xe(r(o.notification.timestamp)),1)])])],2)}}}),_Ze=Kr(bZe,[["__scopeId","data-v-e1dde915"]]),wZe={class:"ml-notification-center"},xZe={class:"ml-notification-center-header"},SZe={class:"ml-notification-center-title"},EZe={class:"ml-notification-center-actions"},CZe={class:"ml-notification-center-content"},TZe={key:0,class:"ml-notification-center-empty"},MZe={key:1,class:"ml-notification-list"},AZe=Be({__name:"MlNotificationCenter",props:{title:{}},emits:["close"],setup(t){const{t:e}=qs(),n=t,i=F(()=>n.title??e("main.notification.center.title")),{notifications:s,remove:r,clearAll:o}=bS(),a=l=>{l.action()};return(l,c)=>{const u=Zt("el-icon"),d=Zt("el-button"),h=Zt("el-tooltip");return z(),se("div",wZe,[U("div",xZe,[U("div",SZe,[de(u,{class:"ml-notification-center-icon"},{default:xe(()=>[de(v(aA))]),_:1}),U("span",null,Xe(i.value),1)]),U("div",EZe,[v(s).length>0?(z(),De(h,{key:0,content:v(e)("main.notification.center.clearAll"),"hide-after":0},{default:xe(()=>[de(d,{text:"",circle:"",size:"small",class:"ml-notification-center-clear",onClick:v(o)},{default:xe(()=>[de(u,null,{default:xe(()=>[de(v(Jje))]),_:1})]),_:1},8,["onClick"])]),_:1},8,["content"])):Le("",!0),de(d,{text:"",size:"small",class:"ml-notification-center-close",onClick:c[0]||(c[0]=f=>l.$emit("close"))},{default:xe(()=>[de(u,null,{default:xe(()=>[de(v(jP))]),_:1})]),_:1})])]),U("div",CZe,[v(s).length===0?(z(),se("div",TZe,[de(u,{class:"ml-notification-center-empty-icon"},{default:xe(()=>[de(v(aA))]),_:1}),U("p",null,Xe(v(e)("main.notification.center.noNotifications")),1)])):(z(),se("div",MZe,[(z(!0),se(At,null,yn(v(s),f=>(z(),De(_Ze,{key:f.id,notification:f,onClose:p=>v(r)(f.id),onAction:a},null,8,["notification","onClose"]))),128))]))])])}}}),kZe=Kr(AZe,[["__scopeId","data-v-bdd67bed"]]),PZe=Be({__name:"MlFullScreenButton",setup(t){const{t:e}=qs(),{isFullscreen:n,toggle:i}=WWe(),s=F(()=>({onIcon:TN,offIcon:TN,onTooltip:e("main.statusBar.fullScreen.on"),offTooltip:e("main.statusBar.fullScreen.off")})),r=F(()=>!n.value);return(o,a)=>(z(),De(v(ZK),{modelValue:r.value,"onUpdate:modelValue":a[0]||(a[0]=l=>r.value=l),data:s.value,onClick:v(i)},null,8,["modelValue","data","onClick"]))}}),LZe=Be({__name:"MlNotificationButton",emits:["click"],setup(t,{emit:e}){const{t:n}=qs(),{unreadCount:i}=bS(),s=e,r=()=>{s("click")};return(o,a)=>{const l=Zt("el-badge"),c=Zt("el-button"),u=Zt("el-tooltip");return z(),De(u,{content:v(n)("main.statusBar.notification.tooltip"),"hide-after":0},{default:xe(()=>[de(c,{class:"ml-notification-button",icon:v(aA),onClick:r},{default:xe(()=>[v(i)>0?(z(),De(l,{key:0,value:v(i),max:99,class:"ml-notification-badge"},null,8,["value"])):Le("",!0)]),_:1},8,["icon"])]),_:1},8,["content"])}}}),IZe=Kr(LZe,[["__scopeId","data-v-48c740b7"]]),RZe=Be({__name:"MlPointStyleButton",setup(t){const{t:e}=qs(),n=()=>{si.instance.sendStringToExecute("pttype")};return(i,s)=>{const r=Zt("el-button"),o=Zt("el-tooltip");return z(),De(o,{content:v(e)("main.statusBar.pointStyle.tooltip"),"hide-after":0},{default:xe(()=>[de(r,{class:"ml-point-style-button",icon:v(rKe),onClick:s[0]||(s[0]=a=>n())},null,8,["icon"])]),_:1},8,["content"])}}}),OZe=Kr(RZe,[["__scopeId","data-v-29692d7d"]]),DZe={key:0,class:"ml-progress"},NZe=Be({__name:"MlProgress",setup(t){const{t:e}=qs(),n=X(0),i=X(!1),{warning:s}=bS(),r=a=>{if(a.stage==="CONVERSION"&&a.subStage&&a.subStage==="PARSE"&&a.subStageStatus==="END"&&a.data){const l=a.data;l.unknownEntityCount>0&&s(e("main.notification.title.parsingWarning"),e("main.message.unknownEntities",{count:l.unknownEntityCount}))}n.value=a.percentage,n.value<100?i.value=!0:i.value=!1},o=a=>`${a.toFixed(0)}%`;return mn(()=>{_o.on("open-file-progress",r)}),eo(()=>{_o.off("open-file-progress",r)}),(a,l)=>i.value?(z(),se("div",DZe,[de(v(Yk),{"text-inside":!0,"stroke-width":20,percentage:n.value,format:o},null,8,["percentage"])])):Le("",!0)}}),BZe=Kr(NZe,[["__scopeId","data-v-7513492f"]]),FZe=Be({__name:"MlSettingButton",setup(t){const{t:e}=qs(),n=C1(),i=s=>{s=="isShowCoordinate"?(n.isShowCoordinate=!n.isShowCoordinate,wr.instance.isShowCoordinate=n.isShowCoordinate):s=="isShowCommandLine"?(n.isShowCommandLine=!n.isShowCommandLine,wr.instance.isShowCommandLine=n.isShowCommandLine):s=="isShowEntityInfo"?(n.isShowEntityInfo=!n.isShowEntityInfo,wr.instance.isShowEntityInfo=n.isShowEntityInfo):s=="isShowMainMenu"?(n.isShowMainMenu=!n.isShowMainMenu,wr.instance.isShowMainMenu=n.isShowMainMenu):s=="isShowLanguageSelector"?(n.isShowLanguageSelector=!n.isShowLanguageSelector,wr.instance.isShowLanguageSelector=n.isShowLanguageSelector):s=="isShowToolbar"?(n.isShowToolbar=!n.isShowToolbar,wr.instance.isShowToolbar=n.isShowToolbar):s=="isShowStats"&&(n.isShowStats=!n.isShowStats,wr.instance.isShowStats=n.isShowStats)};return(s,r)=>{const o=Zt("el-button"),a=Zt("el-dropdown-item"),l=Zt("el-dropdown-menu"),c=Zt("el-dropdown"),u=Zt("el-tooltip");return z(),De(u,{content:v(e)("main.statusBar.setting.tooltip"),"hide-after":0},{default:xe(()=>[de(c,{trigger:"click",onCommand:i},{dropdown:xe(()=>[de(l,null,{default:xe(()=>[de(a,{icon:v(n).isShowStats?v(rf):"",command:"isShowStats"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.stats")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowCommandLine?v(rf):"",command:"isShowCommandLine"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.commandLine")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowEntityInfo?v(rf):"",command:"isShowEntityInfo"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.entityInfo")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowMainMenu?v(rf):"",command:"isShowMainMenu"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.mainMenu")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowLanguageSelector?v(rf):"",command:"isShowLanguageSelector"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.languageSelector")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowCoordinate?v(rf):"",command:"isShowCoordinate"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.coordinate")),1)]),_:1},8,["icon"]),de(a,{icon:v(n).isShowToolbar?v(rf):"",command:"isShowToolbar"},{default:xe(()=>[cn(Xe(v(e)("main.statusBar.setting.toolbar")),1)]),_:1},8,["icon"])]),_:1})]),default:xe(()=>[de(o,{class:"ml-setting-button",icon:v(aKe)},null,8,["icon"])]),_:1})]),_:1},8,["content"])}}}),zZe=Kr(FZe,[["__scopeId","data-v-a8817740"]]),UZe=Be({__name:"MlThemeButton",props:{isDark:{type:Boolean},toggleDark:{type:Function}},setup(t){const{t:e}=qs(),n=F(()=>({onIcon:dKe,offIcon:iKe,onTooltip:e("main.statusBar.theme.light"),offTooltip:e("main.statusBar.theme.dark")}));return(i,s)=>(z(),De(v(ZK),{"model-value":i.isDark,data:n.value,onClick:s[0]||(s[0]=r=>i.toggleDark())},null,8,["model-value","data"]))}}),$Ze=Be({__name:"MlWarningButton",setup(t){const e=()=>{si.instance.sendStringToExecute("md")},{fonts:n,images:i}=XK(),s=F(()=>i.size>0||n.size>0);return(r,o)=>{const a=Zt("el-button");return s.value?(z(),De(a,{key:0,class:"ml-warning-button",type:"warning",icon:v(mKe),onClick:o[0]||(o[0]=l=>e())},null,8,["icon"])):Le("",!0)}}}),VZe=Kr($Ze,[["__scopeId","data-v-3411a3ec"]]),HZe=Be({__name:"MlStatusBar",props:{isDark:{type:Boolean},toggleDark:{type:Function}},emits:["toggleNotificationCenter"],setup(t,{emit:e}){const n=t,{text:i}=dYe(si.instance.curView),s=yYe(si.instance),r=C1(),{isMobile:o}=xYe(),a=u=>{gp().layoutManager.setCurrentLayoutBtrId(u.blockTableRecordId)},l=e,c=()=>{l("toggleNotificationCenter")};return(u,d)=>{const h=Zt("el-button"),f=Zt("el-button-group");return z(),De(v(_Xe),{class:"ml-status-bar"},{left:xe(()=>[de(f,{class:"ml-status-bar-left-button-group"},{default:xe(()=>[(z(!0),se(At,null,yn(v(s),p=>(z(),De(h,{class:"ml-status-bar-layout-button",key:p.name,type:p.isActive?"primary":"",onClick:m=>a(p)},{default:xe(()=>[cn(Xe(p.name),1)]),_:2},1032,["type","onClick"]))),128))]),_:1})]),right:xe(()=>[de(BZe),de(f,{class:"ml-status-bar-right-button-group"},{default:xe(()=>[v(r).isShowCoordinate&&!v(o)?(z(),De(h,{key:0,class:"ml-status-bar-current-pos"},{default:xe(()=>[cn(Xe(v(i)),1)]),_:1})):Le("",!0),de(VZe),de(IZe,{onClick:c}),de(UZe,{"is-dark":n.isDark,"toggle-dark":n.toggleDark},null,8,["is-dark","toggle-dark"]),de(PZe),de(OZe),de(zZe)]),_:1})]),_:1})}}}),WZe=Kr(HZe,[["__scopeId","data-v-78a01988"]]),GZe={class:"ml-file-name"},jZe=Be({__name:"MlCadViewer",props:{locale:{default:"default"},url:{default:void 0},localFile:{default:void 0},background:{default:void 0},baseUrl:{default:void 0},useMainThreadDraw:{type:Boolean,default:!1},theme:{default:"dark"}},setup(t){const e=t,{t:n}=qs(),{effectiveLocale:i,elementPlusLocale:s}=YK(e.locale),{info:r,warning:o,error:a,success:l}=bS(),c=X(),u=X(null),d=X(null),h=F(()=>d.value),f=X(!1),p=bK({selector:u,attribute:"class",valueDark:"ml-theme-dark",valueLight:"ml-theme-light"}),m=PWe(p),b=async(E,T)=>{const A={minimumChunkSize:1e3};await si.instance.openDocument(E,T,A),If.fileName=si.instance.curDocument.docTitle},g=async E=>{try{const T={minimumChunkSize:1e3};await si.instance.openUrl(E,T),If.fileName=si.instance.curDocument.docTitle}catch(T){console.error("Failed to open file from URL:",T),Nu({message:n("main.message.failedToOpenFile",{fileName:E}),grouping:!0,type:"error",showClose:!0})}},x=async E=>{try{const T=new FileReader;T.readAsArrayBuffer(E);const A=await new Promise((P,k)=>{T.onload=B=>{var R;const H=(R=B.target)==null?void 0:R.result;H?P(H):k(new Error("Failed to read file content"))},T.onerror=()=>k(new Error("Failed to read file"))}),I={minimumChunkSize:1e3};await si.instance.openDocument(E.name,A,I),If.fileName=si.instance.curDocument.docTitle}catch(T){console.error("Failed to open local file:",T),Nu({message:n("main.message.failedToOpenFile",{fileName:E.name}),grouping:!0,type:"error",showClose:!0})}};We(()=>e.url,async E=>{E&&g(E)}),We(()=>e.localFile,async E=>{E&&x(E)}),We(()=>e.background,E=>{E!=null&&(si.instance.curView.backgroundColor=E)}),We(()=>e.theme,E=>{p.value=E==="dark"}),mn(async()=>{c.value&&(YZe({canvas:c.value,baseUrl:e.baseUrl,useMainThreadDraw:e.useMainThreadDraw}),d.value=si.instance),e.url?g(e.url):e.localFile&&x(e.localFile),e.background!=null&&(si.instance.curView.backgroundColor=e.background),e.theme==="dark"?p.value=!0:p.value=!1}),_o.on("message",E=>{switch(Nu({message:E.message,grouping:!0,type:E.type,showClose:!0}),E.type){case"success":l("System Message",E.message);break;case"warning":o("System Warning",E.message);break;case"error":a("System Error",E.message);break;default:r("System Info",E.message);break}}),_o.on("fonts-not-loaded",E=>{const T=E.fonts.map(I=>I.fontName).join(", "),A=n("main.message.fontsNotLoaded",{fonts:T});a(n("main.notification.title.fontNotFound"),A)}),_o.on("fonts-not-found",E=>{const T=n("main.message.fontsNotFound",{fonts:E.fonts.join(", ")});o(n("main.notification.title.fontNotFound"),T)}),_o.on("failed-to-get-avaiable-fonts",E=>{Nu({message:n("main.message.failedToGetAvaiableFonts",{url:E.url}),grouping:!0,type:"error",showClose:!0})}),_o.on("failed-to-open-file",E=>{const T=n("main.message.failedToOpenFile",{fileName:E.fileName});Nu({message:T,grouping:!0,type:"error",showClose:!0}),a("File Opening Failed",T)});const S=()=>{f.value=!f.value},_=()=>{f.value=!1};return(E,T)=>{const A=Zt("el-config-provider");return z(),se(At,null,[U("canvas",{ref_key:"canvasRef",ref:c,class:"ml-cad-canvas"},null,512),d.value?(z(),se("div",{key:0,ref_key:"viewerRoot",ref:u,class:"ml-cad-viewer-container"},[de(A,{locale:v(s)},{default:xe(()=>[U("header",null,[de(v(lZe)),de(v(oZe),{"current-locale":v(i)},null,8,["current-locale"])]),U("main",null,[U("div",GZe,Xe(v(If).fileName),1),de(v(uZe)),de(v(nZe),{editor:h.value},null,8,["editor"]),de(v(XYe))]),U("footer",null,[de(v(WZe),{"is-dark":v(p),"toggle-dark":v(m),onToggleNotificationCenter:S},null,8,["is-dark","toggle-dark"])]),de(v(JYe),{onFileRead:b}),de(v(sZe)),f.value?(z(),De(v(kZe),{key:0,onClose:_})):Le("",!0)]),_:1},8,["locale"])],512)):Le("",!0)],64)}}}),KZe=()=>{Us.instance.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"la","la",new XZe),Us.instance.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"md","md",new ZZe),Us.instance.addCommand(Us.SYSTEMT_COMMAND_GROUP_NAME,"pttype","pttype",new JZe)},qZe=()=>{const{registerDialog:t}=yS();t({name:"ReplacementDlg",component:Da(EYe),props:{}}),t({name:"PointStyleDlg",component:Da(SYe),props:{}})},YZe=(t={})=>{si.createInstance(t),KZe(),qZe()},If=ni({fileName:"",dialogs:{layerManager:!1}});class XZe extends Mo{execute(e){If.dialogs.layerManager=!0}}class ZZe extends Mo{execute(e){const{toggleDialog:n}=yS();n("ReplacementDlg",!0)}}class JZe extends Mo{execute(e){const{toggleDialog:n}=yS();n("PointStyleDlg",!0)}}const QZe={showToolbar:!0,showCommandLine:!1,showCoordinate:!0,showStats:!1,locale:"en"};function eJe(t={}){const e={...QZe,...t},n=wr.instance;typeof e.showToolbar=="boolean"&&(n.isShowToolbar=e.showToolbar),typeof e.showCommandLine=="boolean"&&(n.isShowCommandLine=e.showCommandLine),typeof e.showCoordinate=="boolean"&&(n.isShowCoordinate=e.showCoordinate),typeof e.showStats=="boolean"&&(n.isShowStats=e.showStats),console.log("[MlCadModule] CAD Viewer configured:",e)}const tJe={install(t,e){t.use(nLe),t.use(zh),eJe(e),t.component("MlCadViewer",jZe),console.log("[MlCadModule] Plugin installed successfully")}},qP=aF(cse),nJe=UX();qP.use(nJe);qP.use(tJe,{showToolbar:!0,showCommandLine:!1,showCoordinate:!0,locale:"en"});qP.mount("#app");