function getImportPath(filename) {
            return `./${filename}`;
        }
            import{g as s3,R as de,a as pv,r as d,b as up,d as l3,e as Hl}from"./vendor-react-ByKzdfMq.js";import{j as Ce,M as c3,r as u3,a as d3,b as f3,c as h3}from"./vendor-markdown-B4Av9P7l.js";let fr=null;const vC=location.pathname.split("/").slice(0,-1).join("/");let Ta=null;async function i5e(){try{await Promise.all([import(vC+"/scripts/api.js").then(t=>{Ta=t?.api}),import(vC+"/scripts/app.js").then(t=>{fr=t?.app})])}catch(t){console.error("waitForApp error",t)}}var mR={exports:{}};/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/(function(t){(function(){var e={}.hasOwnProperty;function r(){for(var o="",a=0;a<arguments.length;a++){var s=arguments[a];s&&(o=i(o,n(s)))}return o}function n(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var a="";for(var s in o)e.call(o,s)&&o[s]&&(a=i(a,s));return a}function i(o,a){return a?o?o+" "+a:o+a:o}t.exports?(r.default=r,t.exports=r):window.classNames=r})()})(mR);var v3=mR.exports;const ae=s3(v3);function Re(){return Re=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)({}).hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},Re.apply(null,arguments)}function tt(t){"@babel/helpers - typeof";return tt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tt(t)}var p3=Symbol.for("react.element"),g3=Symbol.for("react.transitional.element"),m3=Symbol.for("react.fragment");function yR(t){return t&&tt(t)==="object"&&(t.$$typeof===p3||t.$$typeof===g3)&&t.type===m3}function Mi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[];return de.Children.forEach(t,function(n){n==null&&!e.keepEmpty||(Array.isArray(n)?r=r.concat(Mi(n)):yR(n)&&n.props?r=r.concat(Mi(n.props.children,e)):r.push(n))}),r}var Qb={},y3=function(e){};function b3(t,e){}function $3(t,e){}function w3(){Qb={}}function bR(t,e,r){!e&&!Qb[r]&&(t(!1,r),Qb[r]=!0)}function gr(t,e){bR(b3,t,e)}function S3(t,e){bR($3,t,e)}gr.preMessage=y3;gr.resetWarned=w3;gr.noteOnce=S3;function C3(t,e){if(tt(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e);if(tt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function $R(t){var e=C3(t,"string");return tt(e)=="symbol"?e:e+""}function A(t,e,r){return(e=$R(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function pC(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function L(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pC(Object(r),!0).forEach(function(n){A(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pC(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Au(t){return t instanceof HTMLElement||t instanceof SVGElement}function yd(t){return t&&tt(t)==="object"&&Au(t.nativeElement)?t.nativeElement:Au(t)?t:null}function Lh(t){var e=yd(t);if(e)return e;if(t instanceof de.Component){var r;return(r=pv.findDOMNode)===null||r===void 0?void 0:r.call(pv,t)}return null}var wR={exports:{}},rr={};/**
 * @license React
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var O$=Symbol.for("react.element"),I$=Symbol.for("react.portal"),dp=Symbol.for("react.fragment"),fp=Symbol.for("react.strict_mode"),hp=Symbol.for("react.profiler"),vp=Symbol.for("react.provider"),pp=Symbol.for("react.context"),x3=Symbol.for("react.server_context"),gp=Symbol.for("react.forward_ref"),mp=Symbol.for("react.suspense"),yp=Symbol.for("react.suspense_list"),bp=Symbol.for("react.memo"),$p=Symbol.for("react.lazy"),E3=Symbol.for("react.offscreen"),SR;SR=Symbol.for("react.module.reference");function Ai(t){if(typeof t=="object"&&t!==null){var e=t.$$typeof;switch(e){case O$:switch(t=t.type,t){case dp:case hp:case fp:case mp:case yp:return t;default:switch(t=t&&t.$$typeof,t){case x3:case pp:case gp:case $p:case bp:case vp:return t;default:return e}}case I$:return e}}}rr.ContextConsumer=pp;rr.ContextProvider=vp;rr.Element=O$;rr.ForwardRef=gp;rr.Fragment=dp;rr.Lazy=$p;rr.Memo=bp;rr.Portal=I$;rr.Profiler=hp;rr.StrictMode=fp;rr.Suspense=mp;rr.SuspenseList=yp;rr.isAsyncMode=function(){return!1};rr.isConcurrentMode=function(){return!1};rr.isContextConsumer=function(t){return Ai(t)===pp};rr.isContextProvider=function(t){return Ai(t)===vp};rr.isElement=function(t){return typeof t=="object"&&t!==null&&t.$$typeof===O$};rr.isForwardRef=function(t){return Ai(t)===gp};rr.isFragment=function(t){return Ai(t)===dp};rr.isLazy=function(t){return Ai(t)===$p};rr.isMemo=function(t){return Ai(t)===bp};rr.isPortal=function(t){return Ai(t)===I$};rr.isProfiler=function(t){return Ai(t)===hp};rr.isStrictMode=function(t){return Ai(t)===fp};rr.isSuspense=function(t){return Ai(t)===mp};rr.isSuspenseList=function(t){return Ai(t)===yp};rr.isValidElementType=function(t){return typeof t=="string"||typeof t=="function"||t===dp||t===hp||t===fp||t===mp||t===yp||t===E3||typeof t=="object"&&t!==null&&(t.$$typeof===$p||t.$$typeof===bp||t.$$typeof===vp||t.$$typeof===pp||t.$$typeof===gp||t.$$typeof===SR||t.getModuleId!==void 0)};rr.typeOf=Ai;wR.exports=rr;var Zg=wR.exports;function Rs(t,e,r){var n=d.useRef({});return(!("value"in n.current)||r(n.current.condition,e))&&(n.current.value=t(),n.current.condition=e),n.current.value}var O3=Number(d.version.split(".")[0]),ju=function(e,r){typeof e=="function"?e(r):tt(e)==="object"&&e&&"current"in e&&(e.current=r)},mi=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];var i=r.filter(Boolean);return i.length<=1?i[0]:function(o){r.forEach(function(a){ju(a,o)})}},Ns=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Rs(function(){return mi.apply(void 0,r)},r,function(i,o){return i.length!==o.length||i.every(function(a,s){return a!==o[s]})})},Yi=function(e){var r,n;if(!e)return!1;if(T$(e)&&O3>=19)return!0;var i=Zg.isMemo(e)?e.type.type:e.type;return!(typeof i=="function"&&!((r=i.prototype)!==null&&r!==void 0&&r.render)&&i.$$typeof!==Zg.ForwardRef||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render)&&e.$$typeof!==Zg.ForwardRef)};function T$(t){return d.isValidElement(t)&&!yR(t)}var I3=function(e){return T$(e)&&Yi(e)},ja=function(e){if(e&&T$(e)){var r=e;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null},e0=d.createContext(null);function T3(t){var e=t.children,r=t.onBatchResize,n=d.useRef(0),i=d.useRef([]),o=d.useContext(e0),a=d.useCallback(function(s,l,c){n.current+=1;var u=n.current;i.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===n.current&&(r?.(i.current),i.current=[])}),o?.(s,l,c)},[r,o]);return d.createElement(e0.Provider,{value:a},e)}var CR=function(){if(typeof Map<"u")return Map;function t(e,r){var n=-1;return e.some(function(i,o){return i[0]===r?(n=o,!0):!1}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(r){var n=t(this.__entries__,r),i=this.__entries__[n];return i&&i[1]},e.prototype.set=function(r,n){var i=t(this.__entries__,r);~i?this.__entries__[i][1]=n:this.__entries__.push([r,n])},e.prototype.delete=function(r){var n=this.__entries__,i=t(n,r);~i&&n.splice(i,1)},e.prototype.has=function(r){return!!~t(this.__entries__,r)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var i=0,o=this.__entries__;i<o.length;i++){var a=o[i];r.call(n,a[1],a[0])}},e}()}(),t0=typeof window<"u"&&typeof document<"u"&&window.document===document,gv=function(){return typeof global<"u"&&global.Math===Math?global:typeof self<"u"&&self.Math===Math?self:typeof window<"u"&&window.Math===Math?window:Function("return this")()}(),_3=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(gv):function(t){return setTimeout(function(){return t(Date.now())},1e3/60)}}(),P3=2;function R3(t,e){var r=!1,n=!1,i=0;function o(){r&&(r=!1,t()),n&&s()}function a(){_3(o)}function s(){var l=Date.now();if(r){if(l-i<P3)return;n=!0}else r=!0,n=!1,setTimeout(a,e);i=l}return s}var N3=20,M3=["top","right","bottom","left","width","height","size","weight"],D3=typeof MutationObserver<"u",A3=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=R3(this.refresh.bind(this),N3)}return t.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},t.prototype.removeObserver=function(e){var r=this.observers_,n=r.indexOf(e);~n&&r.splice(n,1),!r.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},t.prototype.updateObservers_=function(){var e=this.observers_.filter(function(r){return r.gatherActive(),r.hasActive()});return e.forEach(function(r){return r.broadcastActive()}),e.length>0},t.prototype.connect_=function(){!t0||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),D3?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){!t0||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(e){var r=e.propertyName,n=r===void 0?"":r,i=M3.some(function(o){return!!~n.indexOf(o)});i&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),xR=function(t,e){for(var r=0,n=Object.keys(e);r<n.length;r++){var i=n[r];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},Vl=function(t){var e=t&&t.ownerDocument&&t.ownerDocument.defaultView;return e||gv},ER=wp(0,0,0,0);function mv(t){return parseFloat(t)||0}function gC(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return e.reduce(function(n,i){var o=t["border-"+i+"-width"];return n+mv(o)},0)}function j3(t){for(var e=["top","right","bottom","left"],r={},n=0,i=e;n<i.length;n++){var o=i[n],a=t["padding-"+o];r[o]=mv(a)}return r}function k3(t){var e=t.getBBox();return wp(0,0,e.width,e.height)}function B3(t){var e=t.clientWidth,r=t.clientHeight;if(!e&&!r)return ER;var n=Vl(t).getComputedStyle(t),i=j3(n),o=i.left+i.right,a=i.top+i.bottom,s=mv(n.width),l=mv(n.height);if(n.boxSizing==="border-box"&&(Math.round(s+o)!==e&&(s-=gC(n,"left","right")+o),Math.round(l+a)!==r&&(l-=gC(n,"top","bottom")+a)),!L3(t)){var c=Math.round(s+o)-e,u=Math.round(l+a)-r;Math.abs(c)!==1&&(s-=c),Math.abs(u)!==1&&(l-=u)}return wp(i.left,i.top,s,l)}var F3=function(){return typeof SVGGraphicsElement<"u"?function(t){return t instanceof Vl(t).SVGGraphicsElement}:function(t){return t instanceof Vl(t).SVGElement&&typeof t.getBBox=="function"}}();function L3(t){return t===Vl(t).document.documentElement}function z3(t){return t0?F3(t)?k3(t):B3(t):ER}function H3(t){var e=t.x,r=t.y,n=t.width,i=t.height,o=typeof DOMRectReadOnly<"u"?DOMRectReadOnly:Object,a=Object.create(o.prototype);return xR(a,{x:e,y:r,width:n,height:i,top:r,right:e+n,bottom:i+r,left:e}),a}function wp(t,e,r,n){return{x:t,y:e,width:r,height:n}}var V3=function(){function t(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=wp(0,0,0,0),this.target=e}return t.prototype.isActive=function(){var e=z3(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},t}(),W3=function(){function t(e,r){var n=H3(r);xR(this,{target:e,contentRect:n})}return t}(),K3=function(){function t(e,r,n){if(this.activeObservations_=[],this.observations_=new CR,typeof e!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=r,this.callbackCtx_=n}return t.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Vl(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)||(r.set(e,new V3(e)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(e instanceof Vl(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(e)&&(r.delete(e),r.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&e.activeObservations_.push(r)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new W3(n.target,n.broadcastRect())});this.callback_.call(e,r,e),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),OR=typeof WeakMap<"u"?new WeakMap:new CR,IR=function(){function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=A3.getInstance(),n=new K3(e,r,this);OR.set(this,n)}return t}();["observe","unobserve","disconnect"].forEach(function(t){IR.prototype[t]=function(){var e;return(e=OR.get(this))[t].apply(e,arguments)}});var U3=function(){return typeof gv.ResizeObserver<"u"?gv.ResizeObserver:IR}(),fa=new Map;function q3(t){t.forEach(function(e){var r,n=e.target;(r=fa.get(n))===null||r===void 0||r.forEach(function(i){return i(n)})})}var TR=new U3(q3);function G3(t,e){fa.has(t)||(fa.set(t,new Set),TR.observe(t)),fa.get(t).add(e)}function X3(t,e){fa.has(t)&&(fa.get(t).delete(e),fa.get(t).size||(TR.unobserve(t),fa.delete(t)))}function kr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mC(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,$R(n.key),n)}}function Br(t,e,r){return e&&mC(t.prototype,e),r&&mC(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function ku(t,e){return ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},ku(t,e)}function xo(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ku(t,e)}function Bu(t){return Bu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Bu(t)}function _$(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(_$=function(){return!!t})()}function Ke(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Y3(t,e){if(e&&(tt(e)=="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Ke(t)}function Eo(t){var e=_$();return function(){var r,n=Bu(t);if(e){var i=Bu(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return Y3(this,r)}}var J3=function(t){xo(r,t);var e=Eo(r);function r(){return kr(this,r),e.apply(this,arguments)}return Br(r,[{key:"render",value:function(){return this.props.children}}]),r}(d.Component);function Z3(t,e){var r=t.children,n=t.disabled,i=d.useRef(null),o=d.useRef(null),a=d.useContext(e0),s=typeof r=="function",l=s?r(i):r,c=d.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),u=!s&&d.isValidElement(l)&&Yi(l),f=u?ja(l):null,h=Ns(f,i),v=function(){var y;return Lh(i.current)||(i.current&&tt(i.current)==="object"?Lh((y=i.current)===null||y===void 0?void 0:y.nativeElement):null)||Lh(o.current)};d.useImperativeHandle(e,function(){return v()});var g=d.useRef(t);g.current=t;var m=d.useCallback(function(p){var y=g.current,b=y.onResize,$=y.data,S=p.getBoundingClientRect(),w=S.width,C=S.height,E=p.offsetWidth,O=p.offsetHeight,x=Math.floor(w),I=Math.floor(C);if(c.current.width!==x||c.current.height!==I||c.current.offsetWidth!==E||c.current.offsetHeight!==O){var T={width:x,height:I,offsetWidth:E,offsetHeight:O};c.current=T;var N=E===Math.round(w)?w:E,P=O===Math.round(C)?C:O,_=L(L({},T),{},{offsetWidth:N,offsetHeight:P});a?.(_,p,$),b&&Promise.resolve().then(function(){b(_,p)})}},[]);return d.useEffect(function(){var p=v();return p&&!n&&G3(p,m),function(){return X3(p,m)}},[i.current,n]),d.createElement(J3,{ref:o},u?d.cloneElement(l,{ref:h}):l)}var Q3=d.forwardRef(Z3),e5="rc-observer-key";function t5(t,e){var r=t.children,n=typeof r=="function"?[r]:Mi(r);return n.map(function(i,o){var a=i?.key||"".concat(e5,"-").concat(o);return d.createElement(Q3,Re({},t,{key:a,ref:o===0?e:void 0}),i)})}var ro=d.forwardRef(t5);ro.Collection=T3;function r0(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function r5(t){if(Array.isArray(t))return r0(t)}function _R(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function P$(t,e){if(t){if(typeof t=="string")return r0(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?r0(t,e):void 0}}function n5(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oe(t){return r5(t)||_R(t)||P$(t)||n5()}var PR=function(e){return+setTimeout(e,16)},RR=function(e){return clearTimeout(e)};typeof window<"u"&&"requestAnimationFrame"in window&&(PR=function(e){return window.requestAnimationFrame(e)},RR=function(e){return window.cancelAnimationFrame(e)});var yC=0,R$=new Map;function NR(t){R$.delete(t)}var Ht=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;yC+=1;var n=yC;function i(o){if(o===0)NR(n),e();else{var a=PR(function(){i(o-1)});R$.set(n,a)}}return i(r),n};Ht.cancel=function(t){var e=R$.get(t);return NR(t),RR(e)};function MR(t){if(Array.isArray(t))return t}function i5(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}function DR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function le(t,e){return MR(t)||i5(t,e)||P$(t,e)||DR()}function Fu(t){for(var e=0,r,n=0,i=t.length;i>=4;++n,i-=4)r=t.charCodeAt(n)&255|(t.charCodeAt(++n)&255)<<8|(t.charCodeAt(++n)&255)<<16|(t.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,e=(r&65535)*1540483477+((r>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(i){case 3:e^=(t.charCodeAt(n+2)&255)<<16;case 2:e^=(t.charCodeAt(n+1)&255)<<8;case 1:e^=t.charCodeAt(n)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}function In(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function o5(t,e){if(!t)return!1;if(t.contains)return t.contains(e);for(var r=e;r;){if(r===t)return!0;r=r.parentNode}return!1}var bC="data-rc-order",$C="data-rc-priority",a5="rc-util-key",n0=new Map;function AR(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.mark;return e?e.startsWith("data-")?e:"data-".concat(e):a5}function Sp(t){if(t.attachTo)return t.attachTo;var e=document.querySelector("head");return e||document.body}function s5(t){return t==="queue"?"prependQueue":t?"prepend":"append"}function N$(t){return Array.from((n0.get(t)||t).children).filter(function(e){return e.tagName==="STYLE"})}function jR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!In())return null;var r=e.csp,n=e.prepend,i=e.priority,o=i===void 0?0:i,a=s5(n),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(bC,a),s&&o&&l.setAttribute($C,"".concat(o)),r!=null&&r.nonce&&(l.nonce=r?.nonce),l.innerHTML=t;var c=Sp(e),u=c.firstChild;if(n){if(s){var f=(e.styles||N$(c)).filter(function(h){if(!["prepend","prependQueue"].includes(h.getAttribute(bC)))return!1;var v=Number(h.getAttribute($C)||0);return o>=v});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function kR(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Sp(e);return(e.styles||N$(r)).find(function(n){return n.getAttribute(AR(e))===t})}function Lu(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=kR(t,e);if(r){var n=Sp(e);n.removeChild(r)}}function l5(t,e){var r=n0.get(t);if(!r||!o5(document,r)){var n=jR("",e),i=n.parentNode;n0.set(t,i),t.removeChild(n)}}function jo(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=Sp(r),i=N$(n),o=L(L({},r),{},{styles:i});l5(n,o);var a=kR(e,o);if(a){var s,l;if((s=o.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=o.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=o.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==t&&(a.innerHTML=t),a}var u=jR(t,o);return u.setAttribute(AR(o),e),u}function c5(t,e){if(t==null)return{};var r={};for(var n in t)if({}.hasOwnProperty.call(t,n)){if(e.indexOf(n)!==-1)continue;r[n]=t[n]}return r}function mt(t,e){if(t==null)return{};var r,n,i=c5(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)r=o[n],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function So(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function i(o,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=n.has(o);if(gr(!l,"Warning: There may be circular references"),l)return!1;if(o===a)return!0;if(r&&s>1)return!1;n.add(o);var c=s+1;if(Array.isArray(o)){if(!Array.isArray(a)||o.length!==a.length)return!1;for(var u=0;u<o.length;u++)if(!i(o[u],a[u],c))return!1;return!0}if(o&&a&&tt(o)==="object"&&tt(a)==="object"){var f=Object.keys(o);return f.length!==Object.keys(a).length?!1:f.every(function(h){return i(o[h],a[h],c)})}return!1}return i(t,e)}var u5="%";function i0(t){return t.join(u5)}var d5=function(){function t(e){kr(this,t),A(this,"instanceId",void 0),A(this,"cache",new Map),this.instanceId=e}return Br(t,[{key:"get",value:function(r){return this.opGet(i0(r))}},{key:"opGet",value:function(r){return this.cache.get(r)||null}},{key:"update",value:function(r,n){return this.opUpdate(i0(r),n)}},{key:"opUpdate",value:function(r,n){var i=this.cache.get(r),o=n(i);o===null?this.cache.delete(r):this.cache.set(r,o)}}]),t}(),Wl="data-token-hash",Gi="data-css-hash",ha="__cssinjs_instance__";function f5(){var t=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var e=document.body.querySelectorAll("style[".concat(Gi,"]"))||[],r=document.head.firstChild;Array.from(e).forEach(function(i){i[ha]=i[ha]||t,i[ha]===t&&document.head.insertBefore(i,r)});var n={};Array.from(document.querySelectorAll("style[".concat(Gi,"]"))).forEach(function(i){var o=i.getAttribute(Gi);if(n[o]){if(i[ha]===t){var a;(a=i.parentNode)===null||a===void 0||a.removeChild(i)}}else n[o]=!0})}return new d5(t)}var bd=d.createContext({hashPriority:"low",cache:f5(),defaultCache:!0});function h5(t,e){if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}var M$=function(){function t(){kr(this,t),A(this,"cache",void 0),A(this,"keys",void 0),A(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return Br(t,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(r){var n,i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return r.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(n=a)!==null&&n!==void 0&&n.value&&o&&(a.value[1]=this.cacheCallTimes++),(i=a)===null||i===void 0?void 0:i.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var i=this;if(!this.has(r)){if(this.size()+1>t.MAX_CACHE_SIZE+t.MAX_CACHE_OFFSET){var o=this.keys.reduce(function(c,u){var f=le(c,2),h=f[1];return i.internalGet(u)[1]<h?[u,i.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),a=le(o,1),s=a[0];this.delete(s)}this.keys.push(r)}var l=this.cache;r.forEach(function(c,u){if(u===r.length-1)l.set(c,{value:[n,i.cacheCallTimes++]});else{var f=l.get(c);f?f.map||(f.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(r,n){var i=r.get(n[0]);if(n.length===1){var o;return i.map?r.set(n[0],{map:i.map}):r.delete(n[0]),(o=i.value)===null||o===void 0?void 0:o[0]}var a=this.deleteByPath(i.map,n.slice(1));return(!i.map||i.map.size===0)&&!i.value&&r.delete(n[0]),a}},{key:"delete",value:function(r){if(this.has(r))return this.keys=this.keys.filter(function(n){return!h5(n,r)}),this.deleteByPath(this.cache,r)}}]),t}();A(M$,"MAX_CACHE_SIZE",20);A(M$,"MAX_CACHE_OFFSET",5);var wC=0,BR=function(){function t(e){kr(this,t),A(this,"derivatives",void 0),A(this,"id",void 0),this.derivatives=Array.isArray(e)?e:[e],this.id=wC,e.length===0&&(e.length>0,void 0),wC+=1}return Br(t,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,i){return i(r,n)},void 0)}}]),t}(),Qg=new M$;function o0(t){var e=Array.isArray(t)?t:[t];return Qg.has(e)||Qg.set(e,new BR(e)),Qg.get(e)}var v5=new WeakMap,em={};function p5(t,e){for(var r=v5,n=0;n<e.length;n+=1){var i=e[n];r.has(i)||r.set(i,new WeakMap),r=r.get(i)}return r.has(em)||r.set(em,t()),r.get(em)}var SC=new WeakMap;function yu(t){var e=SC.get(t)||"";return e||(Object.keys(t).forEach(function(r){var n=t[r];e+=r,n instanceof BR?e+=n.id:n&&tt(n)==="object"?e+=yu(n):e+=n}),e=Fu(e),SC.set(t,e)),e}function CC(t,e){return Fu("".concat(e,"_").concat(yu(t)))}var a0=In();function se(t){return typeof t=="number"?"".concat(t,"px"):t}function yv(t,e,r){var n,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(o)return t;var a=L(L({},i),{},(n={},A(n,Wl,e),A(n,Gi,r),n)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"<style ".concat(s,">").concat(t,"</style>")}var zh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},g5=function(e,r,n){return Object.keys(e).length?".".concat(r).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(e).map(function(i){var o=le(i,2),a=o[0],s=o[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},FR=function(e,r,n){var i={},o={};return Object.entries(e).forEach(function(a){var s,l,c=le(a,2),u=c[0],f=c[1];if(n!=null&&(s=n.preserve)!==null&&s!==void 0&&s[u])o[u]=f;else if((typeof f=="string"||typeof f=="number")&&!(n!=null&&(l=n.ignore)!==null&&l!==void 0&&l[u])){var h,v=zh(u,n?.prefix);i[v]=typeof f=="number"&&!(n!=null&&(h=n.unitless)!==null&&h!==void 0&&h[u])?"".concat(f,"px"):String(f),o[u]="var(".concat(v,")")}}),[o,g5(i,r,{scope:n?.scope})]},xC=In()?d.useLayoutEffect:d.useEffect,Lt=function(e,r){var n=d.useRef(!0);xC(function(){return e(n.current)},r),xC(function(){return n.current=!1,function(){n.current=!0}},[])},EC=function(e,r){Lt(function(n){if(!n)return e()},r)},m5=L({},up),OC=m5.useInsertionEffect,y5=function(e,r,n){d.useMemo(e,n),Lt(function(){return r(!0)},n)},b5=OC?function(t,e,r){return OC(function(){return t(),e()},r)}:y5,$5=L({},up),w5=$5.useInsertionEffect,S5=function(e){var r=[],n=!1;function i(o){n||r.push(o)}return d.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(o){return o()})}},e),i},C5=function(){return function(e){e()}},x5=typeof w5<"u"?S5:C5;function D$(t,e,r,n,i){var o=d.useContext(bd),a=o.cache,s=[t].concat(Oe(e)),l=i0(s),c=x5([l]),u=function(g){a.opUpdate(l,function(m){var p=m||[void 0,void 0],y=le(p,2),b=y[0],$=b===void 0?0:b,S=y[1],w=S,C=w||r(),E=[$,C];return g?g(E):E})};d.useMemo(function(){u()},[l]);var f=a.opGet(l),h=f[1];return b5(function(){i?.(h)},function(v){return u(function(g){var m=le(g,2),p=m[0],y=m[1];return v&&p===0&&i?.(h),[p+1,y]}),function(){a.opUpdate(l,function(g){var m=g||[],p=le(m,2),y=p[0],b=y===void 0?0:y,$=p[1],S=b-1;return S===0?(c(function(){(v||!a.opGet(l))&&n?.($,!1)}),null):[b-1,$]})}},[l]),h}var E5={},O5="css",ts=new Map;function I5(t){ts.set(t,(ts.get(t)||0)+1)}function T5(t,e){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Wl,'="').concat(t,'"]'));r.forEach(function(n){if(n[ha]===e){var i;(i=n.parentNode)===null||i===void 0||i.removeChild(n)}})}}var _5=0;function P5(t,e){ts.set(t,(ts.get(t)||0)-1);var r=Array.from(ts.keys()),n=r.filter(function(i){var o=ts.get(i)||0;return o<=0});r.length-n.length>_5&&n.forEach(function(i){T5(i,e),ts.delete(i)})}var R5=function(e,r,n,i){var o=n.getDerivativeToken(e),a=L(L({},o),r);return i&&(a=i(a)),a},LR="token";function N5(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=d.useContext(bd),i=n.cache.instanceId,o=n.container,a=r.salt,s=a===void 0?"":a,l=r.override,c=l===void 0?E5:l,u=r.formatToken,f=r.getComputedToken,h=r.cssVar,v=p5(function(){return Object.assign.apply(Object,[{}].concat(Oe(e)))},e),g=yu(v),m=yu(c),p=h?yu(h):"",y=D$(LR,[s,t.id,g,m,p],function(){var b,$=f?f(v,c,t):R5(v,c,t,u),S=L({},$),w="";if(h){var C=FR($,h.key,{prefix:h.prefix,ignore:h.ignore,unitless:h.unitless,preserve:h.preserve}),E=le(C,2);$=E[0],w=E[1]}var O=CC($,s);$._tokenKey=O,S._tokenKey=CC(S,s);var x=(b=h?.key)!==null&&b!==void 0?b:O;$._themeKey=x,I5(x);var I="".concat(O5,"-").concat(Fu(O));return $._hashId=I,[$,I,S,w,h?.key||""]},function(b){P5(b[0]._themeKey,i)},function(b){var $=le(b,4),S=$[0],w=$[3];if(h&&w){var C=jo(w,Fu("css-variables-".concat(S._themeKey)),{mark:Gi,prepend:"queue",attachTo:o,priority:-999});C[ha]=i,C.setAttribute(Wl,S._themeKey)}});return y}var M5=function(e,r,n){var i=le(e,5),o=i[2],a=i[3],s=i[4],l=n||{},c=l.plain;if(!a)return null;var u=o._tokenKey,f=-999,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},v=yv(a,s,u,h,c);return[f,u,v]},D5={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},zR="comm",HR="rule",VR="decl",A5="@import",j5="@namespace",k5="@keyframes",B5="@layer",WR=Math.abs,A$=String.fromCharCode;function KR(t){return t.trim()}function Hh(t,e,r){return t.replace(e,r)}function F5(t,e,r){return t.indexOf(e,r)}function Nl(t,e){return t.charCodeAt(e)|0}function Kl(t,e,r){return t.slice(e,r)}function fo(t){return t.length}function L5(t){return t.length}function Df(t,e){return e.push(t),t}var Cp=1,Ul=1,UR=0,Di=0,Wr=0,dc="";function j$(t,e,r,n,i,o,a,s){return{value:t,root:e,parent:r,type:n,props:i,children:o,line:Cp,column:Ul,length:a,return:"",siblings:s}}function z5(){return Wr}function H5(){return Wr=Di>0?Nl(dc,--Di):0,Ul--,Wr===10&&(Ul=1,Cp--),Wr}function Xi(){return Wr=Di<UR?Nl(dc,Di++):0,Ul++,Wr===10&&(Ul=1,Cp++),Wr}function va(){return Nl(dc,Di)}function Vh(){return Di}function xp(t,e){return Kl(dc,t,e)}function zu(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function V5(t){return Cp=Ul=1,UR=fo(dc=t),Di=0,[]}function W5(t){return dc="",t}function tm(t){return KR(xp(Di-1,s0(t===91?t+2:t===40?t+1:t)))}function K5(t){for(;(Wr=va())&&Wr<33;)Xi();return zu(t)>2||zu(Wr)>3?"":" "}function U5(t,e){for(;--e&&Xi()&&!(Wr<48||Wr>102||Wr>57&&Wr<65||Wr>70&&Wr<97););return xp(t,Vh()+(e<6&&va()==32&&Xi()==32))}function s0(t){for(;Xi();)switch(Wr){case t:return Di;case 34:case 39:t!==34&&t!==39&&s0(Wr);break;case 40:t===41&&s0(t);break;case 92:Xi();break}return Di}function q5(t,e){for(;Xi()&&t+Wr!==57;)if(t+Wr===84&&va()===47)break;return"/*"+xp(e,Di-1)+"*"+A$(t===47?t:Xi())}function G5(t){for(;!zu(va());)Xi();return xp(t,Di)}function X5(t){return W5(Wh("",null,null,null,[""],t=V5(t),0,[0],t))}function Wh(t,e,r,n,i,o,a,s,l){for(var c=0,u=0,f=a,h=0,v=0,g=0,m=1,p=1,y=1,b=0,$="",S=i,w=o,C=n,E=$;p;)switch(g=b,b=Xi()){case 40:if(g!=108&&Nl(E,f-1)==58){F5(E+=Hh(tm(b),"&","&\f"),"&\f",WR(c?s[c-1]:0))!=-1&&(y=-1);break}case 34:case 39:case 91:E+=tm(b);break;case 9:case 10:case 13:case 32:E+=K5(g);break;case 92:E+=U5(Vh()-1,7);continue;case 47:switch(va()){case 42:case 47:Df(Y5(q5(Xi(),Vh()),e,r,l),l),(zu(g||1)==5||zu(va()||1)==5)&&fo(E)&&Kl(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*m:s[c++]=fo(E)*y;case 125*m:case 59:case 0:switch(b){case 0:case 125:p=0;case 59+u:y==-1&&(E=Hh(E,/\f/g,"")),v>0&&(fo(E)-f||m===0&&g===47)&&Df(v>32?TC(E+";",n,r,f-1,l):TC(Hh(E," ","")+";",n,r,f-2,l),l);break;case 59:E+=";";default:if(Df(C=IC(E,e,r,c,u,i,s,$,S=[],w=[],f,o),o),b===123)if(u===0)Wh(E,e,C,C,S,o,f,s,w);else{switch(h){case 99:if(Nl(E,3)===110)break;case 108:if(Nl(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Wh(t,C,C,n&&Df(IC(t,C,C,0,0,i,s,$,i,S=[],f,w),w),i,w,f,s,n?S:w):Wh(E,C,C,C,[""],w,0,s,w)}}c=u=v=0,m=y=1,$=E="",f=a;break;case 58:f=1+fo(E),v=g;default:if(m<1){if(b==123)--m;else if(b==125&&m++==0&&H5()==125)continue}switch(E+=A$(b),b*m){case 38:y=u>0?1:(E+="\f",-1);break;case 44:s[c++]=(fo(E)-1)*y,y=1;break;case 64:va()===45&&(E+=tm(Xi())),h=va(),u=f=fo($=E+=G5(Vh())),b++;break;case 45:g===45&&fo(E)==2&&(m=0)}}return o}function IC(t,e,r,n,i,o,a,s,l,c,u,f){for(var h=i-1,v=i===0?o:[""],g=L5(v),m=0,p=0,y=0;m<n;++m)for(var b=0,$=Kl(t,h+1,h=WR(p=a[m])),S=t;b<g;++b)(S=KR(p>0?v[b]+" "+$:Hh($,/&\f/g,v[b])))&&(l[y++]=S);return j$(t,e,r,i===0?HR:s,l,c,u,f)}function Y5(t,e,r,n){return j$(t,e,r,zR,A$(z5()),Kl(t,2,-2),0,n)}function TC(t,e,r,n,i){return j$(t,e,r,VR,Kl(t,0,n),Kl(t,n+1,-1),n,i)}function l0(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function J5(t,e,r,n){switch(t.type){case B5:if(t.children.length)break;case A5:case j5:case VR:return t.return=t.return||t.value;case zR:return"";case k5:return t.return=t.value+"{"+l0(t.children,n)+"}";case HR:if(!fo(t.value=t.props.join(",")))return""}return fo(r=l0(t.children,n))?t.return=t.value+"{"+r+"}":""}var _C="data-ant-cssinjs-cache-path",qR="_FILE_STYLE__",as,GR=!0;function Z5(){if(!as&&(as={},In())){var t=document.createElement("div");t.className=_C,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);var e=getComputedStyle(t).content||"";e=e.replace(/^"/,"").replace(/"$/,""),e.split(";").forEach(function(i){var o=i.split(":"),a=le(o,2),s=a[0],l=a[1];as[s]=l});var r=document.querySelector("style[".concat(_C,"]"));if(r){var n;GR=!1,(n=r.parentNode)===null||n===void 0||n.removeChild(r)}document.body.removeChild(t)}}function Q5(t){return Z5(),!!as[t]}function e4(t){var e=as[t],r=null;if(e&&In())if(GR)r=qR;else{var n=document.querySelector("style[".concat(Gi,'="').concat(as[t],'"]'));n?r=n.innerHTML:delete as[t]}return[r,e]}var t4="_skip_check_",XR="_multi_value_";function Kh(t){var e=l0(X5(t),J5);return e.replace(/\{%%%\:[^;];}/g,";")}function r4(t){return tt(t)==="object"&&t&&(t4 in t||XR in t)}function PC(t,e,r){if(!e)return t;var n=".".concat(e),i=r==="low"?":where(".concat(n,")"):n,o=t.split(",").map(function(a){var s,l=a.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(i).concat(c.slice(u.length)),[c].concat(Oe(l.slice(1))).join(" ")});return o.join(",")}var n4=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},i=n.root,o=n.injectHash,a=n.parentSelectors,s=r.hashId,l=r.layer;r.path;var c=r.hashPriority,u=r.transformers,f=u===void 0?[]:u;r.linters;var h="",v={};function g(y){var b=y.getName(s);if(!v[b]){var $=t(y.style,r,{root:!1,parentSelectors:a}),S=le($,1),w=S[0];v[b]="@keyframes ".concat(y.getName(s)).concat(w)}}function m(y){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return y.forEach(function($){Array.isArray($)?m($,b):$&&b.push($)}),b}var p=m(Array.isArray(e)?e:[e]);return p.forEach(function(y){var b=typeof y=="string"&&!i?{}:y;if(typeof b=="string")h+="".concat(b,`
`);else if(b._keyframe)g(b);else{var $=f.reduce(function(S,w){var C;return(w==null||(C=w.visit)===null||C===void 0?void 0:C.call(w,S))||S},b);Object.keys($).forEach(function(S){var w=$[S];if(tt(w)==="object"&&w&&(S!=="animationName"||!w._keyframe)&&!r4(w)){var C=!1,E=S.trim(),O=!1;(i||o)&&s?E.startsWith("@")?C=!0:E==="&"?E=PC("",s,c):E=PC(S,s,c):i&&!s&&(E==="&"||E==="")&&(E="",O=!0);var x=t(w,r,{root:O,injectHash:C,parentSelectors:[].concat(Oe(a),[E])}),I=le(x,2),T=I[0],N=I[1];v=L(L({},v),N),h+="".concat(E).concat(T)}else{let R=function(M,D){var j=M.replace(/[A-Z]/g,function(V){return"-".concat(V.toLowerCase())}),k=D;!D5[M]&&typeof k=="number"&&k!==0&&(k="".concat(k,"px")),M==="animationName"&&D!==null&&D!==void 0&&D._keyframe&&(g(D),k=D.getName(s)),h+="".concat(j,":").concat(k,";")};var P,_=(P=w?.value)!==null&&P!==void 0?P:w;tt(w)==="object"&&w!==null&&w!==void 0&&w[XR]&&Array.isArray(_)?_.forEach(function(M){R(S,M)}):R(S,_)}})}}),i?l&&(h&&(h="@layer ".concat(l.name," {").concat(h,"}")),l.dependencies&&(v["@layer ".concat(l.name)]=l.dependencies.map(function(y){return"@layer ".concat(y,", ").concat(l.name,";")}).join(`
`))):h="{".concat(h,"}"),[h,v]};function YR(t,e){return Fu("".concat(t.join("%")).concat(e))}function i4(){return null}var JR="style";function c0(t,e){var r=t.token,n=t.path,i=t.hashId,o=t.layer,a=t.nonce,s=t.clientOnly,l=t.order,c=l===void 0?0:l,u=d.useContext(bd),f=u.autoClear;u.mock;var h=u.defaultCache,v=u.hashPriority,g=u.container,m=u.ssrInline,p=u.transformers,y=u.linters,b=u.cache,$=u.layer,S=r._tokenKey,w=[S];$&&w.push("layer"),w.push.apply(w,Oe(n));var C=a0,E=D$(JR,w,function(){var N=w.join("|");if(Q5(N)){var P=e4(N),_=le(P,2),R=_[0],M=_[1];if(R)return[R,S,M,{},s,c]}var D=e(),j=n4(D,{hashId:i,hashPriority:v,layer:$?o:void 0,path:n.join("-"),transformers:p,linters:y}),k=le(j,2),V=k[0],G=k[1],W=Kh(V),Y=YR(w,W);return[W,S,Y,G,s,c]},function(N,P){var _=le(N,3),R=_[2];(P||f)&&a0&&Lu(R,{mark:Gi})},function(N){var P=le(N,4),_=P[0];P[1];var R=P[2],M=P[3];if(C&&_!==qR){var D={mark:Gi,prepend:$?!1:"queue",attachTo:g,priority:c},j=typeof a=="function"?a():a;j&&(D.csp={nonce:j});var k=[],V=[];Object.keys(M).forEach(function(W){W.startsWith("@layer")?k.push(W):V.push(W)}),k.forEach(function(W){jo(Kh(M[W]),"_layer-".concat(W),L(L({},D),{},{prepend:!0}))});var G=jo(_,R,D);G[ha]=b.instanceId,G.setAttribute(Wl,S),V.forEach(function(W){jo(Kh(M[W]),"_effect-".concat(W),D)})}}),O=le(E,3),x=O[0],I=O[1],T=O[2];return function(N){var P;if(!m||C||!h)P=d.createElement(i4,null);else{var _;P=d.createElement("style",Re({},(_={},A(_,Wl,I),A(_,Gi,T),_),{dangerouslySetInnerHTML:{__html:x}}))}return d.createElement(d.Fragment,null,P,N)}}var o4=function(e,r,n){var i=le(e,6),o=i[0],a=i[1],s=i[2],l=i[3],c=i[4],u=i[5],f=n||{},h=f.plain;if(c)return null;var v=o,g={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return v=yv(o,a,s,g,h),l&&Object.keys(l).forEach(function(m){if(!r[m]){r[m]=!0;var p=Kh(l[m]),y=yv(p,a,"_effect-".concat(m),g,h);m.startsWith("@layer")?v=y+v:v+=y}}),[u,s,v]},ZR="cssVar",a4=function(e,r){var n=e.key,i=e.prefix,o=e.unitless,a=e.ignore,s=e.token,l=e.scope,c=l===void 0?"":l,u=d.useContext(bd),f=u.cache.instanceId,h=u.container,v=s._tokenKey,g=[].concat(Oe(e.path),[n,c,v]),m=D$(ZR,g,function(){var p=r(),y=FR(p,n,{prefix:i,unitless:o,ignore:a,scope:c}),b=le(y,2),$=b[0],S=b[1],w=YR(g,S);return[$,S,w,n]},function(p){var y=le(p,3),b=y[2];a0&&Lu(b,{mark:Gi})},function(p){var y=le(p,3),b=y[1],$=y[2];if(b){var S=jo(b,$,{mark:Gi,prepend:"queue",attachTo:h,priority:-999});S[ha]=f,S.setAttribute(Wl,n)}});return m},s4=function(e,r,n){var i=le(e,4),o=i[1],a=i[2],s=i[3],l=n||{},c=l.plain;if(!o)return null;var u=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},h=yv(o,s,a,f,c);return[u,a,h]},qc;qc={},A(qc,JR,o4),A(qc,LR,M5),A(qc,ZR,s4);var Yt=function(){function t(e,r){kr(this,t),A(this,"name",void 0),A(this,"style",void 0),A(this,"_keyframe",!0),this.name=e,this.style=r}return Br(t,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),t}();function Gs(t){return t.notSplit=!0,t}Gs(["borderTop","borderBottom"]),Gs(["borderTop"]),Gs(["borderBottom"]),Gs(["borderLeft","borderRight"]),Gs(["borderLeft"]),Gs(["borderRight"]);var k$=d.createContext({});function QR(t){return MR(t)||_R(t)||P$(t)||DR()}function kn(t,e){for(var r=t,n=0;n<e.length;n+=1){if(r==null)return;r=r[e[n]]}return r}function eN(t,e,r,n){if(!e.length)return r;var i=QR(e),o=i[0],a=i.slice(1),s;return!t&&typeof o=="number"?s=[]:Array.isArray(t)?s=Oe(t):s=L({},t),n&&r===void 0&&a.length===1?delete s[o][a[0]]:s[o]=eN(s[o],a,r,n),s}function Ii(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return e.length&&n&&r===void 0&&!kn(t,e.slice(0,-1))?t:eN(t,e,r,n)}function l4(t){return tt(t)==="object"&&t!==null&&Object.getPrototypeOf(t)===Object.prototype}function RC(t){return Array.isArray(t)?[]:{}}var c4=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function yl(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=RC(e[0]);return e.forEach(function(i){function o(a,s){var l=new Set(s),c=kn(i,a),u=Array.isArray(c);if(u||l4(c)){if(!l.has(c)){l.add(c);var f=kn(n,a);u?n=Ii(n,a,[]):(!f||tt(f)!=="object")&&(n=Ii(n,a,RC(c))),c4(c).forEach(function(h){o([].concat(Oe(a),[h]),l)})}}else n=Ii(n,a,c)}o([])}),n}function u4(){}const d4=d.createContext({}),Ms=()=>{const t=()=>{};return t.deprecated=u4,t},tN=d.createContext(void 0);var rN={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},f4={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0},h4=L(L({},f4),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"});const nN={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},NC={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},h4),timePickerLocale:Object.assign({},nN)},ui="${label} is not a valid ${type}",_a={locale:"en",Pagination:rN,DatePicker:NC,TimePicker:nN,Calendar:NC,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:ui,method:ui,array:ui,object:ui,number:ui,date:ui,boolean:ui,integer:ui,float:ui,regexp:ui,email:ui,url:ui,hex:ui},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}};Object.assign({},_a.Modal);let Uh=[];const MC=()=>Uh.reduce((t,e)=>Object.assign(Object.assign({},t),e),_a.Modal);function v4(t){if(t){const e=Object.assign({},t);return Uh.push(e),MC(),()=>{Uh=Uh.filter(r=>r!==e),MC()}}Object.assign({},_a.Modal)}const B$=d.createContext(void 0),$d=(t,e)=>{const r=d.useContext(B$),n=d.useMemo(()=>{var o;const a=e||_a[t],s=(o=r?.[t])!==null&&o!==void 0?o:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[t,e,r]),i=d.useMemo(()=>{const o=r?.locale;return r?.exist&&!o?_a.locale:o},[r]);return[n,i]},p4="internalMark",g4=t=>{const{locale:e={},children:r,_ANT_MARK__:n}=t;d.useEffect(()=>v4(e?.Modal),[e]);const i=d.useMemo(()=>Object.assign(Object.assign({},e),{exist:!0}),[e]);return d.createElement(B$.Provider,{value:i},r)},iN={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Hu=Object.assign(Object.assign({},iN),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),nn=Math.round;function rm(t,e){const r=t.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(i=>parseFloat(i));for(let i=0;i<3;i+=1)n[i]=e(n[i]||0,r[i]||"",i);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}const DC=(t,e,r)=>r===0?t:t/100;function Gc(t,e){const r=e||255;return t>r?r:t<0?0:t}class Ut{constructor(e){A(this,"isValid",!0),A(this,"r",0),A(this,"g",0),A(this,"b",0),A(this,"a",1),A(this,"_h",void 0),A(this,"_s",void 0),A(this,"_l",void 0),A(this,"_v",void 0),A(this,"_max",void 0),A(this,"_min",void 0),A(this,"_brightness",void 0);function r(n){return n[0]in e&&n[1]in e&&n[2]in e}if(e)if(typeof e=="string"){let i=function(o){return n.startsWith(o)};const n=e.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(e instanceof Ut)this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this._h=e._h,this._s=e._s,this._l=e._l,this._v=e._v;else if(r("rgb"))this.r=Gc(e.r),this.g=Gc(e.g),this.b=Gc(e.b),this.a=typeof e.a=="number"?Gc(e.a,1):1;else if(r("hsl"))this.fromHsl(e);else if(r("hsv"))this.fromHsv(e);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(e))}setR(e){return this._sc("r",e)}setG(e){return this._sc("g",e)}setB(e){return this._sc("b",e)}setA(e){return this._sc("a",e,1)}setHue(e){const r=this.toHsv();return r.h=e,this._c(r)}getLuminance(){function e(o){const a=o/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}const r=e(this.r),n=e(this.g),i=e(this.b);return .2126*r+.7152*n+.0722*i}getHue(){if(typeof this._h>"u"){const e=this.getMax()-this.getMin();e===0?this._h=0:this._h=nn(60*(this.r===this.getMax()?(this.g-this.b)/e+(this.g<this.b?6:0):this.g===this.getMax()?(this.b-this.r)/e+2:(this.r-this.g)/e+4))}return this._h}getSaturation(){if(typeof this._s>"u"){const e=this.getMax()-this.getMin();e===0?this._s=0:this._s=e/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(e=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()-e/100;return i<0&&(i=0),this._c({h:r,s:n,l:i,a:this.a})}lighten(e=10){const r=this.getHue(),n=this.getSaturation();let i=this.getLightness()+e/100;return i>1&&(i=1),this._c({h:r,s:n,l:i,a:this.a})}mix(e,r=50){const n=this._c(e),i=r/100,o=s=>(n[s]-this[s])*i+this[s],a={r:nn(o("r")),g:nn(o("g")),b:nn(o("b")),a:nn(o("a")*100)/100};return this._c(a)}tint(e=10){return this.mix({r:255,g:255,b:255,a:1},e)}shade(e=10){return this.mix({r:0,g:0,b:0,a:1},e)}onBackground(e){const r=this._c(e),n=this.a+r.a*(1-this.a),i=o=>nn((this[o]*this.a+r[o]*r.a*(1-this.a))/n);return this._c({r:i("r"),g:i("g"),b:i("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}clone(){return this._c(this)}toHexString(){let e="#";const r=(this.r||0).toString(16);e+=r.length===2?r:"0"+r;const n=(this.g||0).toString(16);e+=n.length===2?n:"0"+n;const i=(this.b||0).toString(16);if(e+=i.length===2?i:"0"+i,typeof this.a=="number"&&this.a>=0&&this.a<1){const o=nn(this.a*255).toString(16);e+=o.length===2?o:"0"+o}return e}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const e=this.getHue(),r=nn(this.getSaturation()*100),n=nn(this.getLightness()*100);return this.a!==1?`hsla(${e},${r}%,${n}%,${this.a})`:`hsl(${e},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(e,r,n){const i=this.clone();return i[e]=Gc(r,n),i}_c(e){return new this.constructor(e)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(e){const r=e.replace("#","");function n(i,o){return parseInt(r[i]+r[o||i],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:e,s:r,l:n,a:i}){if(this._h=e%360,this._s=r,this._l=n,this.a=typeof i=="number"?i:1,r<=0){const h=nn(n*255);this.r=h,this.g=h,this.b=h}let o=0,a=0,s=0;const l=e/60,c=(1-Math.abs(2*n-1))*r,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(o=c,a=u):l>=1&&l<2?(o=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(o=u,s=c):l>=5&&l<6&&(o=c,s=u);const f=n-c/2;this.r=nn((o+f)*255),this.g=nn((a+f)*255),this.b=nn((s+f)*255)}fromHsv({h:e,s:r,v:n,a:i}){this._h=e%360,this._s=r,this._v=n,this.a=typeof i=="number"?i:1;const o=nn(n*255);if(this.r=o,this.g=o,this.b=o,r<=0)return;const a=e/60,s=Math.floor(a),l=a-s,c=nn(n*(1-r)*255),u=nn(n*(1-r*l)*255),f=nn(n*(1-r*(1-l))*255);switch(s){case 0:this.g=f,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=f;break;case 3:this.r=c,this.g=u;break;case 4:this.r=f,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(e){const r=rm(e,DC);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(e){const r=rm(e,DC);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(e){const r=rm(e,(n,i)=>i.includes("%")?nn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}}var Af=2,AC=.16,m4=.05,y4=.05,b4=.15,oN=5,aN=4,$4=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function jC(t,e,r){var n;return Math.round(t.h)>=60&&Math.round(t.h)<=240?n=r?Math.round(t.h)-Af*e:Math.round(t.h)+Af*e:n=r?Math.round(t.h)+Af*e:Math.round(t.h)-Af*e,n<0?n+=360:n>=360&&(n-=360),n}function kC(t,e,r){if(t.h===0&&t.s===0)return t.s;var n;return r?n=t.s-AC*e:e===aN?n=t.s+AC:n=t.s+m4*e,n>1&&(n=1),r&&e===oN&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function BC(t,e,r){var n;return r?n=t.v+y4*e:n=t.v-b4*e,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Vu(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new Ut(t),i=n.toHsv(),o=oN;o>0;o-=1){var a=new Ut({h:jC(i,o,!0),s:kC(i,o,!0),v:BC(i,o,!0)});r.push(a)}r.push(n);for(var s=1;s<=aN;s+=1){var l=new Ut({h:jC(i,s),s:kC(i,s),v:BC(i,s)});r.push(l)}return e.theme==="dark"?$4.map(function(c){var u=c.index,f=c.amount;return new Ut(e.backgroundColor||"#141414").mix(r[u],f).toHexString()}):r.map(function(c){return c.toHexString()})}var nm={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},u0=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];u0.primary=u0[5];var d0=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];d0.primary=d0[5];var f0=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];f0.primary=f0[5];var h0=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];h0.primary=h0[5];var v0=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];v0.primary=v0[5];var p0=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];p0.primary=p0[5];var g0=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];g0.primary=g0[5];var m0=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];m0.primary=m0[5];var bv=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];bv.primary=bv[5];var y0=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];y0.primary=y0[5];var b0=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];b0.primary=b0[5];var $0=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];$0.primary=$0[5];var w0=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];w0.primary=w0[5];var im={red:u0,volcano:d0,orange:f0,gold:h0,yellow:v0,lime:p0,green:g0,cyan:m0,blue:bv,geekblue:y0,purple:b0,magenta:$0,grey:w0};function w4(t,{generateColorPalettes:e,generateNeutralColorPalettes:r}){const{colorSuccess:n,colorWarning:i,colorError:o,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=t,u=e(s),f=e(n),h=e(i),v=e(o),g=e(a),m=r(l,c),p=t.colorLink||t.colorInfo,y=e(p),b=new Ut(v[1]).mix(new Ut(v[3]),50).toHexString();return Object.assign(Object.assign({},m),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:v[1],colorErrorBgHover:v[2],colorErrorBgFilledHover:b,colorErrorBgActive:v[3],colorErrorBorder:v[3],colorErrorBorderHover:v[4],colorErrorHover:v[5],colorError:v[6],colorErrorActive:v[7],colorErrorTextHover:v[8],colorErrorText:v[9],colorErrorTextActive:v[10],colorWarningBg:h[1],colorWarningBgHover:h[2],colorWarningBorder:h[3],colorWarningBorderHover:h[4],colorWarningHover:h[4],colorWarning:h[6],colorWarningActive:h[7],colorWarningTextHover:h[8],colorWarningText:h[9],colorWarningTextActive:h[10],colorInfoBg:g[1],colorInfoBgHover:g[2],colorInfoBorder:g[3],colorInfoBorderHover:g[4],colorInfoHover:g[4],colorInfo:g[6],colorInfoActive:g[7],colorInfoTextHover:g[8],colorInfoText:g[9],colorInfoTextActive:g[10],colorLinkHover:y[4],colorLink:y[6],colorLinkActive:y[7],colorBgMask:new Ut("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}const S4=t=>{let e=t,r=t,n=t,i=t;return t<6&&t>=5?e=t+1:t<16&&t>=6?e=t+2:t>=16&&(e=16),t<7&&t>=5?r=4:t<8&&t>=7?r=5:t<14&&t>=8?r=6:t<16&&t>=14?r=7:t>=16&&(r=8),t<6&&t>=2?n=1:t>=6&&(n=2),t>4&&t<8?i=4:t>=8&&(i=6),{borderRadius:t,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:e,borderRadiusOuter:i}};function C4(t){const{motionUnit:e,motionBase:r,borderRadius:n,lineWidth:i}=t;return Object.assign({motionDurationFast:`${(r+e).toFixed(1)}s`,motionDurationMid:`${(r+e*2).toFixed(1)}s`,motionDurationSlow:`${(r+e*3).toFixed(1)}s`,lineWidthBold:i+1},S4(n))}const x4=t=>{const{controlHeight:e}=t;return{controlHeightSM:e*.75,controlHeightXS:e*.5,controlHeightLG:e*1.25}};function qh(t){return(t+8)/t}function E4(t){const e=Array.from({length:10}).map((r,n)=>{const i=n-1,o=t*Math.pow(Math.E,i/5),a=n>1?Math.floor(o):Math.ceil(o);return Math.floor(a/2)*2});return e[1]=t,e.map(r=>({size:r,lineHeight:qh(r)}))}const O4=t=>{const e=E4(t),r=e.map(u=>u.size),n=e.map(u=>u.lineHeight),i=r[1],o=r[0],a=r[2],s=n[1],l=n[0],c=n[2];return{fontSizeSM:o,fontSize:i,fontSizeLG:a,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*i),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*o),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}};function I4(t){const{sizeUnit:e,sizeStep:r}=t;return{sizeXXL:e*(r+8),sizeXL:e*(r+4),sizeLG:e*(r+2),sizeMD:e*(r+1),sizeMS:e*r,size:e*r,sizeSM:e*(r-1),sizeXS:e*(r-2),sizeXXS:e*(r-3)}}const Ci=(t,e)=>new Ut(t).setA(e).toRgbString(),Xc=(t,e)=>new Ut(t).darken(e).toHexString(),T4=t=>{const e=Vu(t);return{1:e[0],2:e[1],3:e[2],4:e[3],5:e[4],6:e[5],7:e[6],8:e[4],9:e[5],10:e[6]}},_4=(t,e)=>{const r=t||"#fff",n=e||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Ci(n,.88),colorTextSecondary:Ci(n,.65),colorTextTertiary:Ci(n,.45),colorTextQuaternary:Ci(n,.25),colorFill:Ci(n,.15),colorFillSecondary:Ci(n,.06),colorFillTertiary:Ci(n,.04),colorFillQuaternary:Ci(n,.02),colorBgSolid:Ci(n,1),colorBgSolidHover:Ci(n,.75),colorBgSolidActive:Ci(n,.95),colorBgLayout:Xc(r,4),colorBgContainer:Xc(r,0),colorBgElevated:Xc(r,0),colorBgSpotlight:Ci(n,.85),colorBgBlur:"transparent",colorBorder:Xc(r,15),colorBorderSecondary:Xc(r,6)}};function P4(t){nm.pink=nm.magenta,im.pink=im.magenta;const e=Object.keys(iN).map(r=>{const n=t[r]===nm[r]?im[r]:Vu(t[r]);return Array.from({length:10},()=>1).reduce((i,o,a)=>(i[`${r}-${a+1}`]=n[a],i[`${r}${a+1}`]=n[a],i),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),e),w4(t,{generateColorPalettes:T4,generateNeutralColorPalettes:_4})),O4(t.fontSize)),I4(t)),x4(t)),C4(t))}const sN=o0(P4),S0={token:Hu,override:{override:Hu},hashed:!0},lN=de.createContext(S0),Wu="ant",F$="anticon",R4=["outlined","borderless","filled","underlined"],N4=(t,e)=>e||(t?`${Wu}-${t}`:Wu),Dt=d.createContext({getPrefixCls:N4,iconPrefixCls:F$}),{Consumer:o5e}=Dt,FC={};function Oo(t){const e=d.useContext(Dt),{getPrefixCls:r,direction:n,getPopupContainer:i}=e,o=e[t];return Object.assign(Object.assign({classNames:FC,styles:FC},o),{getPrefixCls:r,direction:n,getPopupContainer:i})}const M4=`-ant-${Date.now()}-${Math.random()}`;function D4(t,e){const r={},n=(a,s)=>{let l=a.clone();return l=s?.(l)||l,l.toRgbString()},i=(a,s)=>{const l=new Ut(a),c=Vu(l.toRgbString());r[`${s}-color`]=n(l),r[`${s}-color-disabled`]=c[1],r[`${s}-color-hover`]=c[4],r[`${s}-color-active`]=c[6],r[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${s}-color-deprecated-bg`]=c[0],r[`${s}-color-deprecated-border`]=c[2]};if(e.primaryColor){i(e.primaryColor,"primary");const a=new Ut(e.primaryColor),s=Vu(a.toRgbString());s.forEach((c,u)=>{r[`primary-${u+1}`]=c}),r["primary-color-deprecated-l-35"]=n(a,c=>c.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,c=>c.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,c=>c.tint(20)),r["primary-color-deprecated-t-50"]=n(a,c=>c.tint(50)),r["primary-color-deprecated-f-12"]=n(a,c=>c.setA(c.a*.12));const l=new Ut(s[0]);r["primary-color-active-deprecated-f-30"]=n(l,c=>c.setA(c.a*.3)),r["primary-color-active-deprecated-d-02"]=n(l,c=>c.darken(2))}return e.successColor&&i(e.successColor,"success"),e.warningColor&&i(e.warningColor,"warning"),e.errorColor&&i(e.errorColor,"error"),e.infoColor&&i(e.infoColor,"info"),`
  :root {
    ${Object.keys(r).map(a=>`--${t}-${a}: ${r[a]};`).join(`
`)}
  }
  `.trim()}function A4(t,e){const r=D4(t,e);In()&&jo(r,`${M4}-dynamic-theme`)}const Ji=d.createContext(!1),cN=({children:t,disabled:e})=>{const r=d.useContext(Ji);return d.createElement(Ji.Provider,{value:e??r},t)},ms=d.createContext(void 0),j4=({children:t,size:e})=>{const r=d.useContext(ms);return d.createElement(ms.Provider,{value:e||r},t)};function k4(){const t=d.useContext(Ji),e=d.useContext(ms);return{componentDisabled:t,componentSize:e}}var uN=Br(function t(){kr(this,t)}),dN="CALC_UNIT",B4=new RegExp(dN,"g");function om(t){return typeof t=="number"?"".concat(t).concat(dN):t}var F4=function(t){xo(r,t);var e=Eo(r);function r(n,i){var o;kr(this,r),o=e.call(this),A(Ke(o),"result",""),A(Ke(o),"unitlessCssVar",void 0),A(Ke(o),"lowPriority",void 0);var a=tt(n);return o.unitlessCssVar=i,n instanceof r?o.result="(".concat(n.result,")"):a==="number"?o.result=om(n):a==="string"&&(o.result=n),o}return Br(r,[{key:"add",value:function(i){return i instanceof r?this.result="".concat(this.result," + ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," + ").concat(om(i))),this.lowPriority=!0,this}},{key:"sub",value:function(i){return i instanceof r?this.result="".concat(this.result," - ").concat(i.getResult()):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," - ").concat(om(i))),this.lowPriority=!0,this}},{key:"mul",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," * ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," * ").concat(i)),this.lowPriority=!1,this}},{key:"div",value:function(i){return this.lowPriority&&(this.result="(".concat(this.result,")")),i instanceof r?this.result="".concat(this.result," / ").concat(i.getResult(!0)):(typeof i=="number"||typeof i=="string")&&(this.result="".concat(this.result," / ").concat(i)),this.lowPriority=!1,this}},{key:"getResult",value:function(i){return this.lowPriority||i?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(i){var o=this,a=i||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return o.result.includes(c)})&&(l=!1),this.result=this.result.replace(B4,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r}(uN),L4=function(t){xo(r,t);var e=Eo(r);function r(n){var i;return kr(this,r),i=e.call(this),A(Ke(i),"result",0),n instanceof r?i.result=n.result:typeof n=="number"&&(i.result=n),i}return Br(r,[{key:"add",value:function(i){return i instanceof r?this.result+=i.result:typeof i=="number"&&(this.result+=i),this}},{key:"sub",value:function(i){return i instanceof r?this.result-=i.result:typeof i=="number"&&(this.result-=i),this}},{key:"mul",value:function(i){return i instanceof r?this.result*=i.result:typeof i=="number"&&(this.result*=i),this}},{key:"div",value:function(i){return i instanceof r?this.result/=i.result:typeof i=="number"&&(this.result/=i),this}},{key:"equal",value:function(){return this.result}}]),r}(uN),z4=function(e,r){var n=e==="css"?F4:L4;return function(i){return new n(i,r)}},LC=function(e,r){return"".concat([r,e.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))};function sr(t){var e=d.useRef();e.current=t;var r=d.useCallback(function(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(n=e.current)===null||n===void 0?void 0:n.call.apply(n,[e].concat(o))},[]);return r}function ql(t){var e=d.useRef(!1),r=d.useState(t),n=le(r,2),i=n[0],o=n[1];d.useEffect(function(){return e.current=!1,function(){e.current=!0}},[]);function a(s,l){l&&e.current||o(s)}return[i,a]}function am(t){return t!==void 0}function ln(t,e){var r=e||{},n=r.defaultValue,i=r.value,o=r.onChange,a=r.postState,s=ql(function(){return am(i)?i:am(n)?typeof n=="function"?n():n:typeof t=="function"?t():t}),l=le(s,2),c=l[0],u=l[1],f=i!==void 0?i:c,h=a?a(f):f,v=sr(o),g=ql([f]),m=le(g,2),p=m[0],y=m[1];EC(function(){var $=p[0];c!==$&&v(c,$)},[p]),EC(function(){am(i)||u(i)},[i]);var b=sr(function($,S){u($,S),y([f],S)});return[h,b]}function zC(t,e,r,n){var i=L({},e[t]);if(n!=null&&n.deprecatedTokens){var o=n.deprecatedTokens;o.forEach(function(s){var l=le(s,2),c=l[0],u=l[1];if(i!=null&&i[c]||i!=null&&i[u]){var f;(f=i[u])!==null&&f!==void 0||(i[u]=i?.[c])}})}var a=L(L({},r),i);return Object.keys(a).forEach(function(s){a[s]===e[s]&&delete a[s]}),a}var fN=typeof CSSINJS_STATISTIC<"u",C0=!0;function Xt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(!fN)return Object.assign.apply(Object,[{}].concat(e));C0=!1;var n={};return e.forEach(function(i){if(tt(i)==="object"){var o=Object.keys(i);o.forEach(function(a){Object.defineProperty(n,a,{configurable:!0,enumerable:!0,get:function(){return i[a]}})})}}),C0=!0,n}var HC={};function H4(){}var V4=function(e){var r,n=e,i=H4;return fN&&typeof Proxy<"u"&&(r=new Set,n=new Proxy(e,{get:function(a,s){if(C0){var l;(l=r)===null||l===void 0||l.add(s)}return a[s]}}),i=function(a,s){var l;HC[a]={global:Array.from(r),component:L(L({},(l=HC[a])===null||l===void 0?void 0:l.component),s)}}),{token:n,keys:r,flush:i}};function VC(t,e,r){if(typeof r=="function"){var n;return r(Xt(e,(n=e[t])!==null&&n!==void 0?n:{}))}return r??{}}function W4(t){return t==="js"?{max:Math.max,min:Math.min}:{max:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"max(".concat(n.map(function(o){return se(o)}).join(","),")")},min:function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return"min(".concat(n.map(function(o){return se(o)}).join(","),")")}}}var K4=1e3*60*10,U4=function(){function t(){kr(this,t),A(this,"map",new Map),A(this,"objectIDMap",new WeakMap),A(this,"nextID",0),A(this,"lastAccessBeat",new Map),A(this,"accessBeat",0)}return Br(t,[{key:"set",value:function(r,n){this.clear();var i=this.getCompositeKey(r);this.map.set(i,n),this.lastAccessBeat.set(i,Date.now())}},{key:"get",value:function(r){var n=this.getCompositeKey(r),i=this.map.get(n);return this.lastAccessBeat.set(n,Date.now()),this.accessBeat+=1,i}},{key:"getCompositeKey",value:function(r){var n=this,i=r.map(function(o){return o&&tt(o)==="object"?"obj_".concat(n.getObjectID(o)):"".concat(tt(o),"_").concat(o)});return i.join("|")}},{key:"getObjectID",value:function(r){if(this.objectIDMap.has(r))return this.objectIDMap.get(r);var n=this.nextID;return this.objectIDMap.set(r,n),this.nextID+=1,n}},{key:"clear",value:function(){var r=this;if(this.accessBeat>1e4){var n=Date.now();this.lastAccessBeat.forEach(function(i,o){n-i>K4&&(r.map.delete(o),r.lastAccessBeat.delete(o))}),this.accessBeat=0}}}]),t}(),WC=new U4;function q4(t,e){return de.useMemo(function(){var r=WC.get(e);if(r)return r;var n=t();return WC.set(e,n),n},e)}var G4=function(){return{}};function X4(t){var e=t.useCSP,r=e===void 0?G4:e,n=t.useToken,i=t.usePrefix,o=t.getResetStyles,a=t.getCommonStyle,s=t.getCompUnitless;function l(h,v,g,m){var p=Array.isArray(h)?h[0]:h;function y(O){return"".concat(String(p)).concat(O.slice(0,1).toUpperCase()).concat(O.slice(1))}var b=m?.unitless||{},$=typeof s=="function"?s(h):{},S=L(L({},$),{},A({},y("zIndexPopup"),!0));Object.keys(b).forEach(function(O){S[y(O)]=b[O]});var w=L(L({},m),{},{unitless:S,prefixToken:y}),C=u(h,v,g,w),E=c(p,g,w);return function(O){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:O,I=C(O,x),T=le(I,2),N=T[1],P=E(x),_=le(P,2),R=_[0],M=_[1];return[R,N,M]}}function c(h,v,g){var m=g.unitless,p=g.injectStyle,y=p===void 0?!0:p,b=g.prefixToken,$=g.ignore,S=function(E){var O=E.rootCls,x=E.cssVar,I=x===void 0?{}:x,T=n(),N=T.realToken;return a4({path:[h],prefix:I.prefix,key:I.key,unitless:m,ignore:$,token:N,scope:O},function(){var P=VC(h,N,v),_=zC(h,N,P,{deprecatedTokens:g?.deprecatedTokens});return Object.keys(P).forEach(function(R){_[b(R)]=_[R],delete _[R]}),_}),null},w=function(E){var O=n(),x=O.cssVar;return[function(I){return y&&x?de.createElement(de.Fragment,null,de.createElement(S,{rootCls:E,cssVar:x,component:h}),I):I},x?.key]};return w}function u(h,v,g){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=Array.isArray(h)?h:[h,h],y=le(p,1),b=y[0],$=p.join("-"),S=t.layer||{name:"antd"};return function(w){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w,E=n(),O=E.theme,x=E.realToken,I=E.hashId,T=E.token,N=E.cssVar,P=i(),_=P.rootPrefixCls,R=P.iconPrefixCls,M=r(),D=N?"css":"js",j=q4(function(){var q=new Set;return N&&Object.keys(m.unitless||{}).forEach(function(J){q.add(zh(J,N.prefix)),q.add(zh(J,LC(b,N.prefix)))}),z4(D,q)},[D,b,N?.prefix]),k=W4(D),V=k.max,G=k.min,W={theme:O,token:T,hashId:I,nonce:function(){return M.nonce},clientOnly:m.clientOnly,layer:S,order:m.order||-999};typeof o=="function"&&c0(L(L({},W),{},{clientOnly:!1,path:["Shared",_]}),function(){return o(T,{prefix:{rootPrefixCls:_,iconPrefixCls:R},csp:M})});var Y=c0(L(L({},W),{},{path:[$,w,R]}),function(){if(m.injectStyle===!1)return[];var q=V4(T),J=q.token,oe=q.flush,ie=VC(b,x,g),te=".".concat(w),z=zC(b,x,ie,{deprecatedTokens:m.deprecatedTokens});N&&ie&&tt(ie)==="object"&&Object.keys(ie).forEach(function(U){ie[U]="var(".concat(zh(U,LC(b,N.prefix)),")")});var K=Xt(J,{componentCls:te,prefixCls:w,iconCls:".".concat(R),antCls:".".concat(_),calc:j,max:V,min:G},N?ie:z),B=v(K,{hashId:I,prefixCls:w,rootPrefixCls:_,iconPrefixCls:R});oe(b,z);var F=typeof a=="function"?a(K,w,C,m.resetFont):null;return[m.resetStyle===!1?null:F,B]});return[Y,I]}}function f(h,v,g){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=u(h,v,g,L({resetStyle:!1,order:-998},m)),y=function($){var S=$.prefixCls,w=$.rootCls,C=w===void 0?S:w;return p(S,C),null};return y}return{genStyleHooks:l,genSubStyleComponent:f,genComponentStyleHook:u}}const ys=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"],Y4="5.26.3";function sm(t){return t>=0&&t<=255}function uu(t,e){const{r,g:n,b:i,a:o}=new Ut(t).toRgb();if(o<1)return t;const{r:a,g:s,b:l}=new Ut(e).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((r-a*(1-c))/c),f=Math.round((n-s*(1-c))/c),h=Math.round((i-l*(1-c))/c);if(sm(u)&&sm(f)&&sm(h))return new Ut({r:u,g:f,b:h,a:Math.round(c*100)/100}).toRgbString()}return new Ut({r,g:n,b:i,a:1}).toRgbString()}var J4=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function hN(t){const{override:e}=t,r=J4(t,["override"]),n=Object.assign({},e);Object.keys(Hu).forEach(h=>{delete n[h]});const i=Object.assign(Object.assign({},r),n),o=480,a=576,s=768,l=992,c=1200,u=1600;if(i.motion===!1){const h="0s";i.motionDurationFast=h,i.motionDurationMid=h,i.motionDurationSlow=h}return Object.assign(Object.assign(Object.assign({},i),{colorFillContent:i.colorFillSecondary,colorFillContentHover:i.colorFill,colorFillAlter:i.colorFillQuaternary,colorBgContainerDisabled:i.colorFillTertiary,colorBorderBg:i.colorBgContainer,colorSplit:uu(i.colorBorderSecondary,i.colorBgContainer),colorTextPlaceholder:i.colorTextQuaternary,colorTextDisabled:i.colorTextQuaternary,colorTextHeading:i.colorText,colorTextLabel:i.colorTextSecondary,colorTextDescription:i.colorTextTertiary,colorTextLightSolid:i.colorWhite,colorHighlight:i.colorError,colorBgTextHover:i.colorFillSecondary,colorBgTextActive:i.colorFill,colorIcon:i.colorTextTertiary,colorIconHover:i.colorText,colorErrorOutline:uu(i.colorErrorBg,i.colorBgContainer),colorWarningOutline:uu(i.colorWarningBg,i.colorBgContainer),fontSizeIcon:i.fontSizeSM,lineWidthFocus:i.lineWidth*3,lineWidth:i.lineWidth,controlOutlineWidth:i.lineWidth*2,controlInteractiveSize:i.controlHeight/2,controlItemBgHover:i.colorFillTertiary,controlItemBgActive:i.colorPrimaryBg,controlItemBgActiveHover:i.colorPrimaryBgHover,controlItemBgActiveDisabled:i.colorFill,controlTmpOutline:i.colorFillQuaternary,controlOutline:uu(i.colorPrimaryBg,i.colorBgContainer),lineType:i.lineType,borderRadius:i.borderRadius,borderRadiusXS:i.borderRadiusXS,borderRadiusSM:i.borderRadiusSM,borderRadiusLG:i.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:i.sizeXXS,paddingXS:i.sizeXS,paddingSM:i.sizeSM,padding:i.size,paddingMD:i.sizeMD,paddingLG:i.sizeLG,paddingXL:i.sizeXL,paddingContentHorizontalLG:i.sizeLG,paddingContentVerticalLG:i.sizeMS,paddingContentHorizontal:i.sizeMS,paddingContentVertical:i.sizeSM,paddingContentHorizontalSM:i.size,paddingContentVerticalSM:i.sizeXS,marginXXS:i.sizeXXS,marginXS:i.sizeXS,marginSM:i.sizeSM,margin:i.size,marginMD:i.sizeMD,marginLG:i.sizeLG,marginXL:i.sizeXL,marginXXL:i.sizeXXL,boxShadow:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowSecondary:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowTertiary:`
      0 1px 2px 0 rgba(0, 0, 0, 0.03),
      0 1px 6px -1px rgba(0, 0, 0, 0.02),
      0 2px 4px 0 rgba(0, 0, 0, 0.02)
    `,screenXS:o,screenXSMin:o,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:`
      0 1px 2px -2px ${new Ut("rgba(0, 0, 0, 0.16)").toRgbString()},
      0 3px 6px 0 ${new Ut("rgba(0, 0, 0, 0.12)").toRgbString()},
      0 5px 12px 4px ${new Ut("rgba(0, 0, 0, 0.09)").toRgbString()}
    `,boxShadowDrawerRight:`
      -6px 0 16px 0 rgba(0, 0, 0, 0.08),
      -3px 0 6px -4px rgba(0, 0, 0, 0.12),
      -9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerLeft:`
      6px 0 16px 0 rgba(0, 0, 0, 0.08),
      3px 0 6px -4px rgba(0, 0, 0, 0.12),
      9px 0 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerUp:`
      0 6px 16px 0 rgba(0, 0, 0, 0.08),
      0 3px 6px -4px rgba(0, 0, 0, 0.12),
      0 9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowDrawerDown:`
      0 -6px 16px 0 rgba(0, 0, 0, 0.08),
      0 -3px 6px -4px rgba(0, 0, 0, 0.12),
      0 -9px 28px 8px rgba(0, 0, 0, 0.05)
    `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var KC=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const vN={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Z4={size:!0,sizeSM:!0,sizeLG:!0,sizeMD:!0,sizeXS:!0,sizeXXS:!0,sizeMS:!0,sizeXL:!0,sizeXXL:!0,sizeUnit:!0,sizeStep:!0,motionBase:!0,motionUnit:!0},Q4={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},pN=(t,e,r)=>{const n=r.getDerivativeToken(t),{override:i}=e,o=KC(e,["override"]);let a=Object.assign(Object.assign({},n),{override:i});return a=hN(a),o&&Object.entries(o).forEach(([s,l])=>{const{theme:c}=l,u=KC(l,["theme"]);let f=u;c&&(f=pN(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=f}),a};function _n(){const{token:t,hashed:e,theme:r,override:n,cssVar:i}=de.useContext(lN),o=`${Y4}-${e||""}`,a=r||sN,[s,l,c]=N5(a,[Hu,t],{salt:o,override:n,getComputedToken:pN,formatToken:hN,cssVar:i&&{prefix:i.prefix,key:i.key,unitless:vN,ignore:Z4,preserve:Q4}});return[a,c,e?l:"",s,i]}const Ku={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Ar=(t,e=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight,listStyle:"none",fontFamily:e?"inherit":t.fontFamily}),wd=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),$v=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),e6=t=>({a:{color:t.colorLink,textDecoration:t.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${t.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive},"&:active, &:hover":{textDecoration:t.linkHoverDecoration,outline:0},"&:focus":{textDecoration:t.linkFocusDecoration,outline:0},"&[disabled]":{color:t.colorTextDisabled,cursor:"not-allowed"}}}),t6=(t,e,r,n)=>{const i=`[class^="${e}"], [class*=" ${e}"]`,o=r?`.${r}`:i,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let s={};return n!==!1&&(s={fontFamily:t.fontFamily,fontSize:t.fontSize}),{[o]:Object.assign(Object.assign(Object.assign({},s),a),{[i]:a})}},Pa=(t,e)=>({outline:`${se(t.lineWidthFocus)} solid ${t.colorPrimaryBorder}`,outlineOffset:e??1,transition:"outline-offset 0s, outline 0s"}),Uu=(t,e)=>({"&:focus-visible":Object.assign({},Pa(t,e))}),gN=t=>({[`.${t}`]:Object.assign(Object.assign({},wd()),{[`.${t} .${t}-icon`]:{display:"block"}})}),r6=t=>Object.assign(Object.assign({color:t.colorLink,textDecoration:t.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none"},Uu(t)),{"&:focus, &:hover":{color:t.colorLinkHover},"&:active":{color:t.colorLinkActive}}),{genStyleHooks:Gr,genComponentStyleHook:n6,genSubStyleComponent:L$}=X4({usePrefix:()=>{const{getPrefixCls:t,iconPrefixCls:e}=d.useContext(Dt);return{rootPrefixCls:t(),iconPrefixCls:e}},useToken:()=>{const[t,e,r,n,i]=_n();return{theme:t,realToken:e,hashId:r,token:n,cssVar:i}},useCSP:()=>{const{csp:t}=d.useContext(Dt);return t??{}},getResetStyles:(t,e)=>{var r;const n=e6(t);return[n,{"&":n},gN((r=e?.prefix.iconPrefixCls)!==null&&r!==void 0?r:F$)]},getCommonStyle:t6,getCompUnitless:()=>vN});function i6(t,e){return ys.reduce((r,n)=>{const i=t[`${n}1`],o=t[`${n}3`],a=t[`${n}6`],s=t[`${n}7`];return Object.assign(Object.assign({},r),e(n,{lightColor:i,lightBorderColor:o,darkColor:a,textColor:s}))},{})}const o6=(t,e)=>{const[r,n]=_n();return c0({token:n,hashId:"",path:["ant-design-icons",t],nonce:()=>e?.nonce,layer:{name:"antd"}},()=>[gN(t)])},a6=Object.assign({},up),{useId:UC}=a6,s6=()=>"",l6=typeof UC>"u"?s6:UC;function c6(t,e,r){var n;Ms();const i=t||{},o=i.inherit===!1||!e?Object.assign(Object.assign({},S0),{hashed:(n=e?.hashed)!==null&&n!==void 0?n:S0.hashed,cssVar:e?.cssVar}):e,a=l6();return Rs(()=>{var s,l;if(!t)return e;const c=Object.assign({},o.components);Object.keys(t.components||{}).forEach(h=>{c[h]=Object.assign(Object.assign({},c[h]),t.components[h])});const u=`css-var-${a.replace(/:/g,"")}`,f=((s=i.cssVar)!==null&&s!==void 0?s:o.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r?.prefixCls},typeof o.cssVar=="object"?o.cssVar:{}),typeof i.cssVar=="object"?i.cssVar:{}),{key:typeof i.cssVar=="object"&&((l=i.cssVar)===null||l===void 0?void 0:l.key)||u});return Object.assign(Object.assign(Object.assign({},o),i),{token:Object.assign(Object.assign({},o.token),i.token),components:c,cssVar:f})},[i,o],(s,l)=>s.some((c,u)=>{const f=l[u];return!So(c,f,!0)}))}var u6=["children"],mN=d.createContext({});function d6(t){var e=t.children,r=mt(t,u6);return d.createElement(mN.Provider,{value:r},e)}var f6=function(t){xo(r,t);var e=Eo(r);function r(){return kr(this,r),e.apply(this,arguments)}return Br(r,[{key:"render",value:function(){return this.props.children}}]),r}(d.Component);function h6(t){var e=d.useReducer(function(s){return s+1},0),r=le(e,2),n=r[1],i=d.useRef(t),o=sr(function(){return i.current}),a=sr(function(s){i.current=typeof s=="function"?s(i.current):s,n()});return[o,a]}var ia="none",jf="appear",kf="enter",Bf="leave",qC="none",Fi="prepare",bl="start",$l="active",z$="end",yN="prepared";function GC(t,e){var r={};return r[t.toLowerCase()]=e.toLowerCase(),r["Webkit".concat(t)]="webkit".concat(e),r["Moz".concat(t)]="moz".concat(e),r["ms".concat(t)]="MS".concat(e),r["O".concat(t)]="o".concat(e.toLowerCase()),r}function v6(t,e){var r={animationend:GC("Animation","AnimationEnd"),transitionend:GC("Transition","TransitionEnd")};return t&&("AnimationEvent"in e||delete r.animationend.animation,"TransitionEvent"in e||delete r.transitionend.transition),r}var p6=v6(In(),typeof window<"u"?window:{}),bN={};if(In()){var g6=document.createElement("div");bN=g6.style}var Ff={};function $N(t){if(Ff[t])return Ff[t];var e=p6[t];if(e)for(var r=Object.keys(e),n=r.length,i=0;i<n;i+=1){var o=r[i];if(Object.prototype.hasOwnProperty.call(e,o)&&o in bN)return Ff[t]=e[o],Ff[t]}return""}var wN=$N("animationend"),SN=$N("transitionend"),CN=!!(wN&&SN),XC=wN||"animationend",YC=SN||"transitionend";function JC(t,e){if(!t)return null;if(tt(t)==="object"){var r=e.replace(/-\w/g,function(n){return n[1].toUpperCase()});return t[r]}return"".concat(t,"-").concat(e)}const m6=function(t){var e=d.useRef();function r(i){i&&(i.removeEventListener(YC,t),i.removeEventListener(XC,t))}function n(i){e.current&&e.current!==i&&r(e.current),i&&i!==e.current&&(i.addEventListener(YC,t),i.addEventListener(XC,t),e.current=i)}return d.useEffect(function(){return function(){r(e.current)}},[]),[n,r]};var xN=In()?d.useLayoutEffect:d.useEffect;const y6=function(){var t=d.useRef(null);function e(){Ht.cancel(t.current)}function r(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;e();var o=Ht(function(){i<=1?n({isCanceled:function(){return o!==t.current}}):r(n,i-1)});t.current=o}return d.useEffect(function(){return function(){e()}},[]),[r,e]};var b6=[Fi,bl,$l,z$],$6=[Fi,yN],EN=!1,w6=!0;function ON(t){return t===$l||t===z$}const S6=function(t,e,r){var n=ql(qC),i=le(n,2),o=i[0],a=i[1],s=y6(),l=le(s,2),c=l[0],u=l[1];function f(){a(Fi,!0)}var h=e?$6:b6;return xN(function(){if(o!==qC&&o!==z$){var v=h.indexOf(o),g=h[v+1],m=r(o);m===EN?a(g,!0):g&&c(function(p){function y(){p.isCanceled()||a(g,!0)}m===!0?y():Promise.resolve(m).then(y)})}},[t,o]),d.useEffect(function(){return function(){u()}},[]),[f,o]};function C6(t,e,r,n){var i=n.motionEnter,o=i===void 0?!0:i,a=n.motionAppear,s=a===void 0?!0:a,l=n.motionLeave,c=l===void 0?!0:l,u=n.motionDeadline,f=n.motionLeaveImmediately,h=n.onAppearPrepare,v=n.onEnterPrepare,g=n.onLeavePrepare,m=n.onAppearStart,p=n.onEnterStart,y=n.onLeaveStart,b=n.onAppearActive,$=n.onEnterActive,S=n.onLeaveActive,w=n.onAppearEnd,C=n.onEnterEnd,E=n.onLeaveEnd,O=n.onVisibleChanged,x=ql(),I=le(x,2),T=I[0],N=I[1],P=h6(ia),_=le(P,2),R=_[0],M=_[1],D=ql(null),j=le(D,2),k=j[0],V=j[1],G=R(),W=d.useRef(!1),Y=d.useRef(null);function q(){return r()}var J=d.useRef(!1);function oe(){M(ia),V(null,!0)}var ie=sr(function(ve){var ye=R();if(ye!==ia){var xe=q();if(!(ve&&!ve.deadline&&ve.target!==xe)){var ge=J.current,ne;ye===jf&&ge?ne=w?.(xe,ve):ye===kf&&ge?ne=C?.(xe,ve):ye===Bf&&ge&&(ne=E?.(xe,ve)),ge&&ne!==!1&&oe()}}}),te=m6(ie),z=le(te,1),K=z[0],B=function(ye){switch(ye){case jf:return A(A(A({},Fi,h),bl,m),$l,b);case kf:return A(A(A({},Fi,v),bl,p),$l,$);case Bf:return A(A(A({},Fi,g),bl,y),$l,S);default:return{}}},F=d.useMemo(function(){return B(G)},[G]),U=S6(G,!t,function(ve){if(ve===Fi){var ye=F[Fi];return ye?ye(q()):EN}if(Q in F){var xe;V(((xe=F[Q])===null||xe===void 0?void 0:xe.call(F,q(),null))||null)}return Q===$l&&G!==ia&&(K(q()),u>0&&(clearTimeout(Y.current),Y.current=setTimeout(function(){ie({deadline:!0})},u))),Q===yN&&oe(),w6}),Z=le(U,2),ee=Z[0],Q=Z[1],ce=ON(Q);J.current=ce;var me=d.useRef(null);xN(function(){if(!(W.current&&me.current===e)){N(e);var ve=W.current;W.current=!0;var ye;!ve&&e&&s&&(ye=jf),ve&&e&&o&&(ye=kf),(ve&&!e&&c||!ve&&f&&!e&&c)&&(ye=Bf);var xe=B(ye);ye&&(t||xe[Fi])?(M(ye),ee()):M(ia),me.current=e}},[e]),d.useEffect(function(){(G===jf&&!s||G===kf&&!o||G===Bf&&!c)&&M(ia)},[s,o,c]),d.useEffect(function(){return function(){W.current=!1,clearTimeout(Y.current)}},[]);var Te=d.useRef(!1);d.useEffect(function(){T&&(Te.current=!0),T!==void 0&&G===ia&&((Te.current||T)&&O?.(T),Te.current=!0)},[T,G]);var _e=k;return F[Fi]&&Q===bl&&(_e=L({transition:"none"},_e)),[G,Q,_e,T??e]}function x6(t){var e=t;tt(t)==="object"&&(e=t.transitionSupport);function r(i,o){return!!(i.motionName&&e&&o!==!1)}var n=d.forwardRef(function(i,o){var a=i.visible,s=a===void 0?!0:a,l=i.removeOnLeave,c=l===void 0?!0:l,u=i.forceRender,f=i.children,h=i.motionName,v=i.leavedClassName,g=i.eventProps,m=d.useContext(mN),p=m.motion,y=r(i,p),b=d.useRef(),$=d.useRef();function S(){try{return b.current instanceof HTMLElement?b.current:Lh($.current)}catch{return null}}var w=C6(y,s,S,i),C=le(w,4),E=C[0],O=C[1],x=C[2],I=C[3],T=d.useRef(I);I&&(T.current=!0);var N=d.useCallback(function(j){b.current=j,ju(o,j)},[o]),P,_=L(L({},g),{},{visible:s});if(!f)P=null;else if(E===ia)I?P=f(L({},_),N):!c&&T.current&&v?P=f(L(L({},_),{},{className:v}),N):u||!c&&!v?P=f(L(L({},_),{},{style:{display:"none"}}),N):P=null;else{var R;O===Fi?R="prepare":ON(O)?R="active":O===bl&&(R="start");var M=JC(h,"".concat(E,"-").concat(R));P=f(L(L({},_),{},{className:ae(JC(h,E),A(A({},M,M&&R),h,typeof h=="string")),style:x}),N)}if(d.isValidElement(P)&&Yi(P)){var D=ja(P);D||(P=d.cloneElement(P,{ref:N}))}return d.createElement(f6,{ref:$},P)});return n.displayName="CSSMotion",n}const ka=x6(CN);var x0="add",E0="keep",O0="remove",lm="removed";function E6(t){var e;return t&&tt(t)==="object"&&"key"in t?e=t:e={key:t},L(L({},e),{},{key:String(e.key)})}function I0(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return t.map(E6)}function O6(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,i=e.length,o=I0(t),a=I0(e);o.forEach(function(c){for(var u=!1,f=n;f<i;f+=1){var h=a[f];if(h.key===c.key){n<f&&(r=r.concat(a.slice(n,f).map(function(v){return L(L({},v),{},{status:x0})})),n=f),r.push(L(L({},h),{},{status:E0})),n+=1,u=!0;break}}u||r.push(L(L({},c),{},{status:O0}))}),n<i&&(r=r.concat(a.slice(n).map(function(c){return L(L({},c),{},{status:x0})})));var s={};r.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){r=r.filter(function(u){var f=u.key,h=u.status;return f!==c||h!==O0}),r.forEach(function(u){u.key===c&&(u.status=E0)})}),r}var I6=["component","children","onVisibleChanged","onAllRemoved"],T6=["status"],_6=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function P6(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ka,r=function(n){xo(o,n);var i=Eo(o);function o(){var a;kr(this,o);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return a=i.call.apply(i,[this].concat(l)),A(Ke(a),"state",{keyEntities:[]}),A(Ke(a),"removeKey",function(u){a.setState(function(f){var h=f.keyEntities.map(function(v){return v.key!==u?v:L(L({},v),{},{status:lm})});return{keyEntities:h}},function(){var f=a.state.keyEntities,h=f.filter(function(v){var g=v.status;return g!==lm}).length;h===0&&a.props.onAllRemoved&&a.props.onAllRemoved()})}),a}return Br(o,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,f=c.children,h=c.onVisibleChanged;c.onAllRemoved;var v=mt(c,I6),g=u||d.Fragment,m={};return _6.forEach(function(p){m[p]=v[p],delete v[p]}),delete v.keys,d.createElement(g,v,l.map(function(p,y){var b=p.status,$=mt(p,T6),S=b===x0||b===E0;return d.createElement(e,Re({},m,{key:$.key,visible:S,eventProps:$,onVisibleChanged:function(C){h?.(C,{key:$.key}),C||s.removeKey($.key)}}),function(w,C){return f(L(L({},w),{},{index:y}),C)})}))}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,f=I0(c),h=O6(u,f);return{keyEntities:h.filter(function(v){var g=u.find(function(m){var p=m.key;return v.key===p});return!(g&&g.status===lm&&v.status===O0)})}}}]),o}(d.Component);return A(r,"defaultProps",{component:"div"}),r}const R6=P6(CN),ZC=d.createContext(!0);function N6(t){const e=d.useContext(ZC),{children:r}=t,[,n]=_n(),{motion:i}=n,o=d.useRef(!1);return o.current||(o.current=e!==i),o.current?d.createElement(ZC.Provider,{value:i},d.createElement(d6,{motion:i},r)):r}const M6=()=>null;var D6=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const A6=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let IN;function j6(){return IN||Wu}function k6(t){return Object.keys(t).some(e=>e.endsWith("Color"))}const B6=t=>{const{prefixCls:e,iconPrefixCls:r,theme:n,holderRender:i}=t;e!==void 0&&(IN=e),n&&k6(n)&&A4(j6(),n)},F6=t=>{const{children:e,csp:r,autoInsertSpaceInButton:n,alert:i,anchor:o,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:f,virtual:h,dropdownMatchSelectWidth:v,popupMatchSelectWidth:g,popupOverflow:m,legacyLocale:p,parentContext:y,iconPrefixCls:b,theme:$,componentDisabled:S,segmented:w,statistic:C,spin:E,calendar:O,carousel:x,cascader:I,collapse:T,typography:N,checkbox:P,descriptions:_,divider:R,drawer:M,skeleton:D,steps:j,image:k,layout:V,list:G,mentions:W,modal:Y,progress:q,result:J,slider:oe,breadcrumb:ie,menu:te,pagination:z,input:K,textArea:B,empty:F,badge:U,radio:Z,rate:ee,switch:Q,transfer:ce,avatar:me,message:Te,tag:_e,table:ve,card:ye,tabs:xe,timeline:ge,timePicker:ne,upload:X,notification:fe,tree:pe,colorPicker:$e,datePicker:Ee,rangePicker:be,flex:H,wave:re,dropdown:he,warning:ue,tour:we,tooltip:Ie,popover:Fe,popconfirm:qe,floatButtonGroup:st,variant:ft,inputNumber:et,treeSelect:St}=t,Et=d.useCallback((We,it)=>{const{prefixCls:Ue}=t;if(it)return it;const He=Ue||y.getPrefixCls("");return We?`${He}-${We}`:He},[y.getPrefixCls,t.prefixCls]),at=b||y.iconPrefixCls||F$,nt=r||y.csp;o6(at,nt);const Le=c6($,y.theme,{prefixCls:Et("")}),ze={csp:nt,autoInsertSpaceInButton:n,alert:i,anchor:o,locale:s||p,direction:c,space:u,splitter:f,virtual:h,popupMatchSelectWidth:g??v,popupOverflow:m,getPrefixCls:Et,iconPrefixCls:at,theme:Le,segmented:w,statistic:C,spin:E,calendar:O,carousel:x,cascader:I,collapse:T,typography:N,checkbox:P,descriptions:_,divider:R,drawer:M,skeleton:D,steps:j,image:k,input:K,textArea:B,layout:V,list:G,mentions:W,modal:Y,progress:q,result:J,slider:oe,breadcrumb:ie,menu:te,pagination:z,empty:F,badge:U,radio:Z,rate:ee,switch:Q,transfer:ce,avatar:me,message:Te,tag:_e,table:ve,card:ye,tabs:xe,timeline:ge,timePicker:ne,upload:X,notification:fe,tree:pe,colorPicker:$e,datePicker:Ee,rangePicker:be,flex:H,wave:re,dropdown:he,warning:ue,tour:we,tooltip:Ie,popover:Fe,popconfirm:qe,floatButtonGroup:st,variant:ft,inputNumber:et,treeSelect:St},Ne=Object.assign({},y);Object.keys(ze).forEach(We=>{ze[We]!==void 0&&(Ne[We]=ze[We])}),A6.forEach(We=>{const it=t[We];it&&(Ne[We]=it)}),typeof n<"u"&&(Ne.button=Object.assign({autoInsertSpace:n},Ne.button));const Ye=Rs(()=>Ne,Ne,(We,it)=>{const Ue=Object.keys(We),He=Object.keys(it);return Ue.length!==He.length||Ue.some(rt=>We[rt]!==it[rt])}),{layer:lt}=d.useContext(bd),De=d.useMemo(()=>({prefixCls:at,csp:nt,layer:lt?"antd":void 0}),[at,nt,lt]);let Me=d.createElement(d.Fragment,null,d.createElement(M6,{dropdownMatchSelectWidth:v}),e);const Qe=d.useMemo(()=>{var We,it,Ue,He;return yl(((We=_a.Form)===null||We===void 0?void 0:We.defaultValidateMessages)||{},((Ue=(it=Ye.locale)===null||it===void 0?void 0:it.Form)===null||Ue===void 0?void 0:Ue.defaultValidateMessages)||{},((He=Ye.form)===null||He===void 0?void 0:He.validateMessages)||{},a?.validateMessages||{})},[Ye,a?.validateMessages]);Object.keys(Qe).length>0&&(Me=d.createElement(tN.Provider,{value:Qe},Me)),s&&(Me=d.createElement(g4,{locale:s,_ANT_MARK__:p4},Me)),Me=d.createElement(k$.Provider,{value:De},Me),l&&(Me=d.createElement(j4,{size:l},Me)),Me=d.createElement(N6,null,Me);const Ge=d.useMemo(()=>{const We=Le||{},{algorithm:it,token:Ue,components:He,cssVar:rt}=We,ht=D6(We,["algorithm","token","components","cssVar"]),_t=it&&(!Array.isArray(it)||it.length>0)?o0(it):sN,Nt={};Object.entries(He||{}).forEach(([Bt,qt])=>{const Vt=Object.assign({},qt);"algorithm"in Vt&&(Vt.algorithm===!0?Vt.theme=_t:(Array.isArray(Vt.algorithm)||typeof Vt.algorithm=="function")&&(Vt.theme=o0(Vt.algorithm)),delete Vt.algorithm),Nt[Bt]=Vt});const kt=Object.assign(Object.assign({},Hu),Ue);return Object.assign(Object.assign({},ht),{theme:_t,token:kt,components:Nt,override:Object.assign({override:kt},Nt),cssVar:rt})},[Le]);return $&&(Me=d.createElement(lN.Provider,{value:Ge},Me)),Ye.warning&&(Me=d.createElement(d4.Provider,{value:Ye.warning},Me)),S!==void 0&&(Me=d.createElement(cN,{disabled:S},Me)),d.createElement(Dt.Provider,{value:Ye},Me)},Ds=t=>{const e=d.useContext(Dt),r=d.useContext(B$);return d.createElement(F6,Object.assign({parentContext:e,legacyLocale:r},t))};Ds.ConfigContext=Dt;Ds.SizeContext=ms;Ds.config=B6;Ds.useConfig=k4;Object.defineProperty(Ds,"SizeContext",{get:()=>ms});var L6={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};function TN(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}function z6(t){return TN(t)instanceof ShadowRoot}function wv(t){return z6(t)?TN(t):null}function H6(t){return t.replace(/-(.)/g,function(e,r){return r.toUpperCase()})}function V6(t,e){gr(t,"[@ant-design/icons] ".concat(e))}function QC(t){return tt(t)==="object"&&typeof t.name=="string"&&typeof t.theme=="string"&&(tt(t.icon)==="object"||typeof t.icon=="function")}function ex(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(e,r){var n=t[r];switch(r){case"class":e.className=n,delete e.class;break;default:delete e[r],e[H6(r)]=n}return e},{})}function T0(t,e,r){return r?de.createElement(t.tag,L(L({key:e},ex(t.attrs)),r),(t.children||[]).map(function(n,i){return T0(n,"".concat(e,"-").concat(t.tag,"-").concat(i))})):de.createElement(t.tag,L({key:e},ex(t.attrs)),(t.children||[]).map(function(n,i){return T0(n,"".concat(e,"-").concat(t.tag,"-").concat(i))}))}function _N(t){return Vu(t)[0]}function PN(t){return t?Array.isArray(t)?t:[t]:[]}var W6=`
.anticon {
  display: inline-flex;
  align-items: center;
  color: inherit;
  font-style: normal;
  line-height: 0;
  text-align: center;
  text-transform: none;
  vertical-align: -0.125em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.anticon > * {
  line-height: 1;
}

.anticon svg {
  display: inline-block;
}

.anticon::before {
  display: none;
}

.anticon .anticon-icon {
  display: block;
}

.anticon[tabindex] {
  cursor: pointer;
}

.anticon-spin::before,
.anticon-spin {
  display: inline-block;
  -webkit-animation: loadingCircle 1s infinite linear;
  animation: loadingCircle 1s infinite linear;
}

@-webkit-keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes loadingCircle {
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}
`,K6=function(e){var r=d.useContext(k$),n=r.csp,i=r.prefixCls,o=r.layer,a=W6;i&&(a=a.replace(/anticon/g,i)),o&&(a="@layer ".concat(o,` {
`).concat(a,`
}`)),d.useEffect(function(){var s=e.current,l=wv(s);jo(a,"@ant-design-icons",{prepend:!o,csp:n,attachTo:l})},[])},U6=["icon","className","onClick","style","primaryColor","secondaryColor"],bu={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function q6(t){var e=t.primaryColor,r=t.secondaryColor;bu.primaryColor=e,bu.secondaryColor=r||_N(e),bu.calculated=!!r}function G6(){return L({},bu)}var fc=function(e){var r=e.icon,n=e.className,i=e.onClick,o=e.style,a=e.primaryColor,s=e.secondaryColor,l=mt(e,U6),c=d.useRef(),u=bu;if(a&&(u={primaryColor:a,secondaryColor:s||_N(a)}),K6(c),V6(QC(r),"icon should be icon definiton, but got ".concat(r)),!QC(r))return null;var f=r;return f&&typeof f.icon=="function"&&(f=L(L({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),T0(f.icon,"svg-".concat(f.name),L(L({className:n,onClick:i,style:o,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};fc.displayName="IconReact";fc.getTwoToneColors=G6;fc.setTwoToneColors=q6;function RN(t){var e=PN(t),r=le(e,2),n=r[0],i=r[1];return fc.setTwoToneColors({primaryColor:n,secondaryColor:i})}function X6(){var t=fc.getTwoToneColors();return t.calculated?[t.primaryColor,t.secondaryColor]:t.primaryColor}var Y6=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];RN(bv.primary);var nr=d.forwardRef(function(t,e){var r=t.className,n=t.icon,i=t.spin,o=t.rotate,a=t.tabIndex,s=t.onClick,l=t.twoToneColor,c=mt(t,Y6),u=d.useContext(k$),f=u.prefixCls,h=f===void 0?"anticon":f,v=u.rootClassName,g=ae(v,h,A(A({},"".concat(h,"-").concat(n.name),!!n.name),"".concat(h,"-spin"),!!i||n.name==="loading"),r),m=a;m===void 0&&s&&(m=-1);var p=o?{msTransform:"rotate(".concat(o,"deg)"),transform:"rotate(".concat(o,"deg)")}:void 0,y=PN(l),b=le(y,2),$=b[0],S=b[1];return d.createElement("span",Re({role:"img","aria-label":n.name},c,{ref:e,tabIndex:m,onClick:s,className:g}),d.createElement(fc,{icon:n,primaryColor:$,secondaryColor:S,style:p}))});nr.displayName="AntdIcon";nr.getTwoToneColor=X6;nr.setTwoToneColor=RN;var J6=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:L6}))},Z6=d.forwardRef(J6),Q6={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},eH=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:Q6}))},H$=d.forwardRef(eH),tH={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},rH=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:tH}))},nH=d.forwardRef(rH),iH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},oH=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:iH}))},aH=d.forwardRef(oH),sH=`accept acceptCharset accessKey action allowFullScreen allowTransparency
    alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
    charSet checked classID className colSpan cols content contentEditable contextMenu
    controls coords crossOrigin data dateTime default defer dir disabled download draggable
    encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
    headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
    is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
    mediaGroup method min minLength multiple muted name noValidate nonce open
    optimum pattern placeholder poster preload radioGroup readOnly rel required
    reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
    shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
    summary tabIndex target title type useMap value width wmode wrap`,lH=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
    onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
    onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
    onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
    onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
    onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
    onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,cH="".concat(sH," ").concat(lH).split(/[\s\n]+/),uH="aria-",dH="data-";function tx(t,e){return t.indexOf(e)===0}function Zi(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;e===!1?r={aria:!0,data:!0,attr:!0}:e===!0?r={aria:!0}:r=L({},e);var n={};return Object.keys(t).forEach(function(i){(r.aria&&(i==="role"||tx(i,uH))||r.data&&tx(i,dH)||r.attr&&cH.includes(i))&&(n[i]=t[i])}),n}function NN(t){return t&&de.isValidElement(t)&&t.type===de.Fragment}const fH=(t,e,r)=>de.isValidElement(t)?de.cloneElement(t,typeof r=="function"?r(t.props||{}):r):e;function gi(t,e){return fH(t,t,e)}const rx=t=>typeof t=="object"&&t!=null&&t.nodeType===1,nx=(t,e)=>(!e||t!=="hidden")&&t!=="visible"&&t!=="clip",Lf=(t,e)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const r=getComputedStyle(t,null);return nx(r.overflowY,e)||nx(r.overflowX,e)||(n=>{const i=(o=>{if(!o.ownerDocument||!o.ownerDocument.defaultView)return null;try{return o.ownerDocument.defaultView.frameElement}catch{return null}})(n);return!!i&&(i.clientHeight<n.scrollHeight||i.clientWidth<n.scrollWidth)})(t)}return!1},zf=(t,e,r,n,i,o,a,s)=>o<t&&a>e||o>t&&a<e?0:o<=t&&s<=r||a>=e&&s>=r?o-t-n:a>e&&s<r||o<t&&s>r?a-e+i:0,hH=t=>{const e=t.parentElement;return e??(t.getRootNode().host||null)},ix=(t,e)=>{var r,n,i,o;if(typeof document>"u")return[];const{scrollMode:a,block:s,inline:l,boundary:c,skipOverflowHiddenElements:u}=e,f=typeof c=="function"?c:M=>M!==c;if(!rx(t))throw new TypeError("Invalid target");const h=document.scrollingElement||document.documentElement,v=[];let g=t;for(;rx(g)&&f(g);){if(g=hH(g),g===h){v.push(g);break}g!=null&&g===document.body&&Lf(g)&&!Lf(document.documentElement)||g!=null&&Lf(g,u)&&v.push(g)}const m=(n=(r=window.visualViewport)==null?void 0:r.width)!=null?n:innerWidth,p=(o=(i=window.visualViewport)==null?void 0:i.height)!=null?o:innerHeight,{scrollX:y,scrollY:b}=window,{height:$,width:S,top:w,right:C,bottom:E,left:O}=t.getBoundingClientRect(),{top:x,right:I,bottom:T,left:N}=(M=>{const D=window.getComputedStyle(M);return{top:parseFloat(D.scrollMarginTop)||0,right:parseFloat(D.scrollMarginRight)||0,bottom:parseFloat(D.scrollMarginBottom)||0,left:parseFloat(D.scrollMarginLeft)||0}})(t);let P=s==="start"||s==="nearest"?w-x:s==="end"?E+T:w+$/2-x+T,_=l==="center"?O+S/2-N+I:l==="end"?C+I:O-N;const R=[];for(let M=0;M<v.length;M++){const D=v[M],{height:j,width:k,top:V,right:G,bottom:W,left:Y}=D.getBoundingClientRect();if(a==="if-needed"&&w>=0&&O>=0&&E<=p&&C<=m&&(D===h&&!Lf(D)||w>=V&&E<=W&&O>=Y&&C<=G))return R;const q=getComputedStyle(D),J=parseInt(q.borderLeftWidth,10),oe=parseInt(q.borderTopWidth,10),ie=parseInt(q.borderRightWidth,10),te=parseInt(q.borderBottomWidth,10);let z=0,K=0;const B="offsetWidth"in D?D.offsetWidth-D.clientWidth-J-ie:0,F="offsetHeight"in D?D.offsetHeight-D.clientHeight-oe-te:0,U="offsetWidth"in D?D.offsetWidth===0?0:k/D.offsetWidth:0,Z="offsetHeight"in D?D.offsetHeight===0?0:j/D.offsetHeight:0;if(h===D)z=s==="start"?P:s==="end"?P-p:s==="nearest"?zf(b,b+p,p,oe,te,b+P,b+P+$,$):P-p/2,K=l==="start"?_:l==="center"?_-m/2:l==="end"?_-m:zf(y,y+m,m,J,ie,y+_,y+_+S,S),z=Math.max(0,z+b),K=Math.max(0,K+y);else{z=s==="start"?P-V-oe:s==="end"?P-W+te+F:s==="nearest"?zf(V,W,j,oe,te+F,P,P+$,$):P-(V+j/2)+F/2,K=l==="start"?_-Y-J:l==="center"?_-(Y+k/2)+B/2:l==="end"?_-G+ie+B:zf(Y,G,k,J,ie+B,_,_+S,S);const{scrollLeft:ee,scrollTop:Q}=D;z=Z===0?0:Math.max(0,Math.min(Q+z/Z,D.scrollHeight-j/Z+F)),K=U===0?0:Math.max(0,Math.min(ee+K/U,D.scrollWidth-k/U+B)),P+=Q-z,_+=ee-K}R.push({el:D,top:z,left:K})}return R},vH=t=>t===!1?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&Object.keys(e).length!==0)(t)?t:{block:"start",inline:"nearest"};function pH(t,e){if(!t.isConnected||!(i=>{let o=i;for(;o&&o.parentNode;){if(o.parentNode===document)return!0;o=o.parentNode instanceof ShadowRoot?o.parentNode.host:o.parentNode}return!1})(t))return;const r=(i=>{const o=window.getComputedStyle(i);return{top:parseFloat(o.scrollMarginTop)||0,right:parseFloat(o.scrollMarginRight)||0,bottom:parseFloat(o.scrollMarginBottom)||0,left:parseFloat(o.scrollMarginLeft)||0}})(t);if((i=>typeof i=="object"&&typeof i.behavior=="function")(e))return e.behavior(ix(t,e));const n=typeof e=="boolean"||e==null?void 0:e.behavior;for(const{el:i,top:o,left:a}of ix(t,vH(e))){const s=o-r.top+r.bottom,l=a-r.left+r.right;i.scroll({top:s,left:l,behavior:n})}}function _0(t){return t!=null&&t===t.window}const gH=t=>{var e,r;if(typeof window>"u")return 0;let n=0;return _0(t)?n=t.pageYOffset:t instanceof Document?n=t.documentElement.scrollTop:(t instanceof HTMLElement||t)&&(n=t.scrollTop),t&&!_0(t)&&typeof n!="number"&&(n=(r=((e=t.ownerDocument)!==null&&e!==void 0?e:t).documentElement)===null||r===void 0?void 0:r.scrollTop),n};function mH(t,e,r,n){const i=r-e;return t/=n/2,t<1?i/2*t*t*t+e:i/2*((t-=2)*t*t+2)+e}function yH(t,e={}){const{getContainer:r=()=>window,callback:n,duration:i=450}=e,o=r(),a=gH(o),s=Date.now(),l=()=>{const u=Date.now()-s,f=mH(u>i?i:u,a,t,i);_0(o)?o.scrollTo(window.pageXOffset,f):o instanceof Document||o.constructor.name==="HTMLDocument"?o.documentElement.scrollTop=f:o.scrollTop=f,u<i?Ht(l):typeof n=="function"&&n()};Ht(l)}const yi=t=>{const[,,,,e]=_n();return e?`${t}-css-var`:""};var Ze={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224},bH={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},$H=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:bH}))},Ep=d.forwardRef($H);const V$=de.createContext(void 0),qa=100,MN={Modal:qa,Drawer:qa,Popover:qa,Popconfirm:qa,Tooltip:qa,Tour:qa,FloatButton:qa},wH={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function SH(t){return t in MN}const Op=(t,e)=>{const[,r]=_n(),n=de.useContext(V$),i=SH(t);let o;if(e!==void 0)o=[e,e];else{let a=n??0;i?a+=(n?0:r.zIndexPopupBase)+MN[t]:a+=wH[t],o=[n===void 0?e:a,a]}return o};function DN(t,e){this.v=t,this.k=e}function En(t,e,r,n){var i=Object.defineProperty;try{i({},"",{})}catch{i=0}En=function(a,s,l,c){if(s)i?i(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l;else{var u=function(h,v){En(a,h,function(g){return this._invoke(h,v,g)})};u("next",0),u("throw",1),u("return",2)}},En(t,e,r,n)}function W$(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function o(v,g,m,p){var y=g&&g.prototype instanceof s?g:s,b=Object.create(y.prototype);return En(b,"_invoke",function($,S,w){var C,E,O,x=0,I=w||[],T=!1,N={p:0,n:0,v:t,a:P,f:P.bind(t,4),d:function(R,M){return C=R,E=0,O=t,N.n=M,a}};function P(_,R){for(E=_,O=R,e=0;!T&&x&&!M&&e<I.length;e++){var M,D=I[e],j=N.p,k=D[2];_>3?(M=k===R)&&(O=D[(E=D[4])?5:(E=3,3)],D[4]=D[5]=t):D[0]<=j&&((M=_<2&&j<D[1])?(E=0,N.v=R,N.n=D[1]):j<k&&(M=_<3||D[0]>R||R>k)&&(D[4]=_,D[5]=R,N.n=k,E=0))}if(M||_>1)return a;throw T=!0,R}return function(_,R,M){if(x>1)throw TypeError("Generator is already running");for(T&&R===1&&P(R,M),E=R,O=M;(e=E<2?t:O)||!T;){C||(E?E<3?(E>1&&(N.n=-1),P(E,O)):N.n=O:N.v=O);try{if(x=2,C){if(E||(_="next"),e=C[_]){if(!(e=e.call(C,O)))throw TypeError("iterator result is not an object");if(!e.done)return e;O=e.value,E<2&&(E=0)}else E===1&&(e=C.return)&&e.call(C),E<2&&(O=TypeError("The iterator does not provide a '"+_+"' method"),E=1);C=t}else if((e=(T=N.n<0)?O:$.call(S,N))!==a)break}catch(D){C=t,E=1,O=D}finally{x=1}}return{value:e,done:T}}}(v,m,p),!0),b}var a={};function s(){}function l(){}function c(){}e=Object.getPrototypeOf;var u=[][n]?e(e([][n]())):(En(e={},n,function(){return this}),e),f=c.prototype=s.prototype=Object.create(u);function h(v){return Object.setPrototypeOf?Object.setPrototypeOf(v,c):(v.__proto__=c,En(v,i,"GeneratorFunction")),v.prototype=Object.create(f),v}return l.prototype=c,En(f,"constructor",c),En(c,"constructor",l),l.displayName="GeneratorFunction",En(c,i,"GeneratorFunction"),En(f),En(f,i,"Generator"),En(f,n,function(){return this}),En(f,"toString",function(){return"[object Generator]"}),(W$=function(){return{w:o,m:h}})()}function Sv(t,e){function r(i,o,a,s){try{var l=t[i](o),c=l.value;return c instanceof DN?e.resolve(c.v).then(function(u){r("next",u,a,s)},function(u){r("throw",u,a,s)}):e.resolve(c).then(function(u){l.value=u,a(l)},function(u){return r("throw",u,a,s)})}catch(u){s(u)}}var n;this.next||(En(Sv.prototype),En(Sv.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),En(this,"_invoke",function(i,o,a){function s(){return new e(function(l,c){r(i,a,l,c)})}return n=n?n.then(s,s):s()},!0)}function AN(t,e,r,n,i){return new Sv(W$().w(t,e,r,n),i||Promise)}function CH(t,e,r,n,i){var o=AN(t,e,r,n,i);return o.next().then(function(a){return a.done?a.value:o.next()})}function xH(t){var e=Object(t),r=[];for(var n in e)r.unshift(n);return function i(){for(;r.length;)if((n=r.pop())in e)return i.value=n,i.done=!1,i;return i.done=!0,i}}function ox(t){if(t!=null){var e=t[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(e)return e.call(t);if(typeof t.next=="function")return t;if(!isNaN(t.length))return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}}}throw new TypeError(tt(t)+" is not iterable")}function Tn(){var t=W$(),e=t.m(Tn),r=(Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__).constructor;function n(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===r||(s.displayName||s.name)==="GeneratorFunction")}var i={throw:1,return:2,break:3,continue:3};function o(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(f,h){return l(c.a,i[f],h)},delegateYield:function(f,h,v){return s.resultName=h,l(c.d,ox(f),v)},finish:function(f){return l(c.f,f)}},l=function(f,h,v){c.p=s.prev,c.n=s.next;try{return f(h,v)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(Tn=function(){return{wrap:function(l,c,u,f){return t.w(o(l),c,u,f&&f.reverse())},isGeneratorFunction:n,mark:t.m,awrap:function(l,c){return new DN(l,c)},AsyncIterator:Sv,async:function(l,c,u,f,h){return(n(c)?AN:CH)(o(l),c,u,f,h)},keys:xH,values:ox}})()}function ax(t,e,r,n,i,o,a){try{var s=t[o](a),l=s.value}catch(c){return void r(c)}s.done?e(l):Promise.resolve(l).then(n,i)}function As(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var o=t.apply(e,r);function a(l){ax(o,n,i,a,s,"next",l)}function s(l){ax(o,n,i,a,s,"throw",l)}a(void 0)})}}var Sd=L({},l3),EH=Sd.version,cm=Sd.render,OH=Sd.unmountComponentAtNode,Ip;try{var IH=Number((EH||"").split(".")[0]);IH>=18&&(Ip=Sd.createRoot)}catch{}function sx(t){var e=Sd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;e&&tt(e)==="object"&&(e.usingClientEntryPoint=t)}var Cv="__rc_react_root__";function TH(t,e){sx(!0);var r=e[Cv]||Ip(e);sx(!1),r.render(t),e[Cv]=r}function _H(t,e){cm?.(t,e)}function PH(t,e){if(Ip){TH(t,e);return}_H(t,e)}function RH(t){return P0.apply(this,arguments)}function P0(){return P0=As(Tn().mark(function t(e){return Tn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var i;(i=e[Cv])===null||i===void 0||i.unmount(),delete e[Cv]}));case 1:case"end":return n.stop()}},t)})),P0.apply(this,arguments)}function NH(t){OH(t)}function MH(t){return R0.apply(this,arguments)}function R0(){return R0=As(Tn().mark(function t(e){return Tn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Ip===void 0){n.next=2;break}return n.abrupt("return",RH(e));case 2:NH(e);case 3:case"end":return n.stop()}},t)})),R0.apply(this,arguments)}const DH=(t,e)=>(PH(t,e),()=>MH(e));let AH=DH;function jH(t){return AH}const um=()=>({height:0,opacity:0}),lx=t=>{const{scrollHeight:e}=t;return{height:e,opacity:1}},kH=t=>({height:t?t.offsetHeight:0}),dm=(t,e)=>e?.deadline===!0||e.propertyName==="height",xv=(t=Wu)=>({motionName:`${t}-motion-collapse`,onAppearStart:um,onEnterStart:um,onAppearActive:lx,onEnterActive:lx,onLeaveStart:kH,onLeaveActive:um,onAppearEnd:dm,onEnterEnd:dm,onLeaveEnd:dm,motionDeadline:500}),jN=(t,e,r)=>r!==void 0?r:`${t}-${e}`;function yn(t,e){var r=Object.assign({},t);return Array.isArray(e)&&e.forEach(function(n){delete r[n]}),r}const Cd=function(t){if(!t)return!1;if(t instanceof Element){if(t.offsetParent)return!0;if(t.getBBox){var e=t.getBBox(),r=e.width,n=e.height;if(r||n)return!0}if(t.getBoundingClientRect){var i=t.getBoundingClientRect(),o=i.width,a=i.height;if(o||a)return!0}}return!1},BH=t=>{const{componentCls:e,colorPrimary:r}=t;return{[e]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${t.motionEaseOutCirc}`,`opacity 2s ${t.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${t.motionDurationSlow} ${t.motionEaseInOut}`,`opacity ${t.motionDurationSlow} ${t.motionEaseInOut}`].join(",")}}}}},FH=n6("Wave",t=>[BH(t)]),Tp=`${Wu}-wave-target`;function fm(t){return t&&t!=="#fff"&&t!=="#ffffff"&&t!=="rgb(255, 255, 255)"&&t!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(t)&&t!=="transparent"}function LH(t){const{borderTopColor:e,borderColor:r,backgroundColor:n}=getComputedStyle(t);return fm(e)?e:fm(r)?r:fm(n)?n:null}function hm(t){return Number.isNaN(t)?0:t}const zH=t=>{const{className:e,target:r,component:n,registerUnmount:i}=t,o=d.useRef(null),a=d.useRef(null);d.useEffect(()=>{a.current=i()},[]);const[s,l]=d.useState(null),[c,u]=d.useState([]),[f,h]=d.useState(0),[v,g]=d.useState(0),[m,p]=d.useState(0),[y,b]=d.useState(0),[$,S]=d.useState(!1),w={left:f,top:v,width:m,height:y,borderRadius:c.map(O=>`${O}px`).join(" ")};s&&(w["--wave-color"]=s);function C(){const O=getComputedStyle(r);l(LH(r));const x=O.position==="static",{borderLeftWidth:I,borderTopWidth:T}=O;h(x?r.offsetLeft:hm(-parseFloat(I))),g(x?r.offsetTop:hm(-parseFloat(T))),p(r.offsetWidth),b(r.offsetHeight);const{borderTopLeftRadius:N,borderTopRightRadius:P,borderBottomLeftRadius:_,borderBottomRightRadius:R}=O;u([N,P,R,_].map(M=>hm(parseFloat(M))))}if(d.useEffect(()=>{if(r){const O=Ht(()=>{C(),S(!0)});let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(C),x.observe(r)),()=>{Ht.cancel(O),x?.disconnect()}}},[]),!$)return null;const E=(n==="Checkbox"||n==="Radio")&&r?.classList.contains(Tp);return d.createElement(ka,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(O,x)=>{var I,T;if(x.deadline||x.propertyName==="opacity"){const N=(I=o.current)===null||I===void 0?void 0:I.parentElement;(T=a.current)===null||T===void 0||T.call(a).then(()=>{N?.remove()})}return!1}},({className:O},x)=>d.createElement("div",{ref:mi(o,x),className:ae(e,O,{"wave-quick":E}),style:w}))},HH=(t,e)=>{var r;const{component:n}=e;if(n==="Checkbox"&&!(!((r=t.querySelector("input"))===null||r===void 0)&&r.checked))return;const i=document.createElement("div");i.style.position="absolute",i.style.left="0px",i.style.top="0px",t?.insertBefore(i,t?.firstChild);const o=jH();let a=null;function s(){return a}a=o(d.createElement(zH,Object.assign({},e,{target:t,registerUnmount:s})),i)},VH=(t,e,r)=>{const{wave:n}=d.useContext(Dt),[,i,o]=_n(),a=sr(c=>{const u=t.current;if(n?.disabled||!u)return;const f=u.querySelector(`.${Tp}`)||u,{showEffect:h}=n||{};(h||HH)(f,{className:e,token:i,component:r,event:c,hashId:o})}),s=d.useRef(null);return c=>{Ht.cancel(s.current),s.current=Ht(()=>{a(c)})}},K$=t=>{const{children:e,disabled:r,component:n}=t,{getPrefixCls:i}=d.useContext(Dt),o=d.useRef(null),a=i("wave"),[,s]=FH(a),l=VH(o,ae(a,s),n);if(de.useEffect(()=>{const u=o.current;if(!u||u.nodeType!==1||r)return;const f=h=>{!Cd(h.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(h)};return u.addEventListener("click",f,!0),()=>{u.removeEventListener("click",f,!0)}},[r]),!de.isValidElement(e))return e??null;const c=Yi(e)?mi(ja(e),o):o;return gi(e,{ref:c})},no=t=>{const e=de.useContext(ms);return de.useMemo(()=>t?typeof t=="string"?t??e:typeof t=="function"?t(e):e:e,[t,e])},WH=t=>{const{componentCls:e}=t;return{[e]:{"&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"}}}},KH=t=>{const{componentCls:e,antCls:r}=t;return{[e]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${e}-item:empty`]:{display:"none"},[`${e}-item > ${r}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},UH=t=>{const{componentCls:e}=t;return{[e]:{"&-gap-row-small":{rowGap:t.spaceGapSmallSize},"&-gap-row-middle":{rowGap:t.spaceGapMiddleSize},"&-gap-row-large":{rowGap:t.spaceGapLargeSize},"&-gap-col-small":{columnGap:t.spaceGapSmallSize},"&-gap-col-middle":{columnGap:t.spaceGapMiddleSize},"&-gap-col-large":{columnGap:t.spaceGapLargeSize}}}},kN=Gr("Space",t=>{const e=Xt(t,{spaceGapSmallSize:t.paddingXS,spaceGapMiddleSize:t.padding,spaceGapLargeSize:t.paddingLG});return[KH(e),UH(e),WH(e)]},()=>({}),{resetStyle:!1});var BN=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const _p=d.createContext(null),hc=(t,e)=>{const r=d.useContext(_p),n=d.useMemo(()=>{if(!r)return"";const{compactDirection:i,isFirstItem:o,isLastItem:a}=r,s=i==="vertical"?"-vertical-":"-";return ae(`${t}-compact${s}item`,{[`${t}-compact${s}first-item`]:o,[`${t}-compact${s}last-item`]:a,[`${t}-compact${s}item-rtl`]:e==="rtl"})},[t,e,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},qH=t=>{const{children:e}=t;return d.createElement(_p.Provider,{value:null},e)},GH=t=>{const{children:e}=t,r=BN(t,["children"]);return d.createElement(_p.Provider,{value:d.useMemo(()=>r,[r])},e)},XH=t=>{const{getPrefixCls:e,direction:r}=d.useContext(Dt),{size:n,direction:i,block:o,prefixCls:a,className:s,rootClassName:l,children:c}=t,u=BN(t,["size","direction","block","prefixCls","className","rootClassName","children"]),f=no($=>n??$),h=e("space-compact",a),[v,g]=kN(h),m=ae(h,g,{[`${h}-rtl`]:r==="rtl",[`${h}-block`]:o,[`${h}-vertical`]:i==="vertical"},s,l),p=d.useContext(_p),y=Mi(c),b=d.useMemo(()=>y.map(($,S)=>{const w=$?.key||`${h}-item-${S}`;return d.createElement(GH,{key:w,compactSize:f,compactDirection:i,isFirstItem:S===0&&(!p||p?.isFirstItem),isLastItem:S===y.length-1&&(!p||p?.isLastItem)},$)}),[n,y,p]);return y.length===0?null:v(d.createElement("div",Object.assign({className:m},u),b))};var YH=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const FN=d.createContext(void 0),JH=t=>{const{getPrefixCls:e,direction:r}=d.useContext(Dt),{prefixCls:n,size:i,className:o}=t,a=YH(t,["prefixCls","size","className"]),s=e("btn-group",n),[,,l]=_n(),c=d.useMemo(()=>{switch(i){case"large":return"lg";case"small":return"sm";default:return""}},[i]),u=ae(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:r==="rtl"},o,l);return d.createElement(FN.Provider,{value:i},d.createElement("div",Object.assign({},a,{className:u})))},cx=/^[\u4E00-\u9FA5]{2}$/,N0=cx.test.bind(cx);function ux(t){return typeof t=="string"}function vm(t){return t==="text"||t==="link"}function ZH(t,e){if(t==null)return;const r=e?" ":"";return typeof t!="string"&&typeof t!="number"&&ux(t.type)&&N0(t.props.children)?gi(t,{children:t.props.children.split("").join(r)}):ux(t)?N0(t)?de.createElement("span",null,t.split("").join(r)):de.createElement("span",null,t):NN(t)?de.createElement("span",null,t):t}function QH(t,e){let r=!1;const n=[];return de.Children.forEach(t,i=>{const o=typeof i,a=o==="string"||o==="number";if(r&&a){const s=n.length-1,l=n[s];n[s]=`${l}${i}`}else n.push(i);r=a}),de.Children.map(n,i=>ZH(i,e))}["default","primary","danger"].concat(Oe(ys));const M0=d.forwardRef((t,e)=>{const{className:r,style:n,children:i,prefixCls:o}=t,a=ae(`${o}-icon`,r);return de.createElement("span",{ref:e,className:a,style:n},i)}),dx=d.forwardRef((t,e)=>{const{prefixCls:r,className:n,style:i,iconClassName:o}=t,a=ae(`${r}-loading-icon`,n);return de.createElement(M0,{prefixCls:r,className:a,style:i,ref:e},de.createElement(Ep,{className:o}))}),pm=()=>({width:0,opacity:0,transform:"scale(0)"}),gm=t=>({width:t.scrollWidth,opacity:1,transform:"scale(1)"}),e8=t=>{const{prefixCls:e,loading:r,existIcon:n,className:i,style:o,mount:a}=t,s=!!r;return n?de.createElement(dx,{prefixCls:e,className:i,style:o}):de.createElement(ka,{visible:s,motionName:`${e}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:pm,onAppearActive:gm,onEnterStart:pm,onEnterActive:gm,onLeaveStart:gm,onLeaveActive:pm},({className:l,style:c},u)=>{const f=Object.assign(Object.assign({},o),c);return de.createElement(dx,{prefixCls:e,className:ae(i,l),style:f,ref:u})})},fx=(t,e)=>({[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineEndColor:e}}},"&:not(:first-child)":{[`&, & > ${t}`]:{"&:not(:disabled)":{borderInlineStartColor:e}}}}}),t8=t=>{const{componentCls:e,fontSize:r,lineWidth:n,groupBorderColor:i,colorErrorHover:o}=t;return{[`${e}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:t.calc(n).mul(-1).equal(),[`&, & > ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[e]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${e}-icon-only`]:{fontSize:r}},fx(`${e}-primary`,i),fx(`${e}-danger`,o)]}};var r8=["b"],n8=["v"],mm=function(e){return Math.round(Number(e||0))},i8=function(e){if(e instanceof Ut)return e;if(e&&tt(e)==="object"&&"h"in e&&"b"in e){var r=e,n=r.b,i=mt(r,r8);return L(L({},i),{},{v:n})}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e},qu=function(t){xo(r,t);var e=Eo(r);function r(n){return kr(this,r),e.call(this,i8(n))}return Br(r,[{key:"toHsbString",value:function(){var i=this.toHsb(),o=mm(i.s*100),a=mm(i.b*100),s=mm(i.h),l=i.a,c="hsb(".concat(s,", ").concat(o,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(o,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var i=this.toHsv(),o=i.v,a=mt(i,n8);return L(L({},a),{},{b:o,a:this.a})}}]),r}(Ut),o8=function(e){return e instanceof qu?e:new qu(e)};o8("#1677ff");const a8=(t,e)=>t?.replace(/[^\w/]/g,"").slice(0,e?8:6)||"",s8=(t,e)=>t?a8(t,e):"";let l8=function(){function t(e){kr(this,t);var r;if(this.cleared=!1,e instanceof t){this.metaColor=e.metaColor.clone(),this.colors=(r=e.colors)===null||r===void 0?void 0:r.map(i=>({color:new t(i.color),percent:i.percent})),this.cleared=e.cleared;return}const n=Array.isArray(e);n&&e.length?(this.colors=e.map(({color:i,percent:o})=>({color:new t(i),percent:o})),this.metaColor=new qu(this.colors[0].color.metaColor)):this.metaColor=new qu(n?"":e),(!e||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return Br(t,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return s8(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(i=>`${i.color.toRgbString()} ${i.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((n,i)=>{const o=r.colors[i];return n.percent===o.percent&&n.color.equals(o.color)}):this.toHexString()===r.toHexString()}}])}();var c8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},u8=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:c8}))},D0=d.forwardRef(u8);const U$=t=>({[t.componentCls]:{[`${t.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}},[`${t.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${t.motionDurationMid} ${t.motionEaseInOut},
        opacity ${t.motionDurationMid} ${t.motionEaseInOut} !important`}}}),d8=t=>({animationDuration:t,animationFillMode:"both"}),f8=t=>({animationDuration:t,animationFillMode:"both"}),q$=(t,e,r,n,i=!1)=>{const o=i?"&":"";return{[`
      ${o}${t}-enter,
      ${o}${t}-appear
    `]:Object.assign(Object.assign({},d8(n)),{animationPlayState:"paused"}),[`${o}${t}-leave`]:Object.assign(Object.assign({},f8(n)),{animationPlayState:"paused"}),[`
      ${o}${t}-enter${t}-enter-active,
      ${o}${t}-appear${t}-appear-active
    `]:{animationName:e,animationPlayState:"running"},[`${o}${t}-leave${t}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}},h8=new Yt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),v8=new Yt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),p8=new Yt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),g8=new Yt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),m8=new Yt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),y8=new Yt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),b8=new Yt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$8=new Yt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),w8={"move-up":{inKeyframes:b8,outKeyframes:$8},"move-down":{inKeyframes:h8,outKeyframes:v8},"move-left":{inKeyframes:p8,outKeyframes:g8},"move-right":{inKeyframes:m8,outKeyframes:y8}},Ev=(t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:i,outKeyframes:o}=w8[e];return[q$(n,i,o,t.motionDurationMid),{[`
        ${n}-enter,
        ${n}-appear
      `]:{opacity:0,animationTimingFunction:t.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},G$=new Yt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),X$=new Yt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Y$=new Yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),J$=new Yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),S8=new Yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),C8=new Yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),x8=new Yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),E8=new Yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),O8={"slide-up":{inKeyframes:G$,outKeyframes:X$},"slide-down":{inKeyframes:Y$,outKeyframes:J$},"slide-left":{inKeyframes:S8,outKeyframes:C8},"slide-right":{inKeyframes:x8,outKeyframes:E8}},Gl=(t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:i,outKeyframes:o}=O8[e];return[q$(n,i,o,t.motionDurationMid),{[`
      ${n}-enter,
      ${n}-appear
    `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:t.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInQuint}}]},Z$=new Yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),I8=new Yt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),hx=new Yt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),vx=new Yt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),T8=new Yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),_8=new Yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),P8=new Yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),R8=new Yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),N8=new Yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),M8=new Yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),D8=new Yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),A8=new Yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),j8={zoom:{inKeyframes:Z$,outKeyframes:I8},"zoom-big":{inKeyframes:hx,outKeyframes:vx},"zoom-big-fast":{inKeyframes:hx,outKeyframes:vx},"zoom-left":{inKeyframes:P8,outKeyframes:R8},"zoom-right":{inKeyframes:N8,outKeyframes:M8},"zoom-up":{inKeyframes:T8,outKeyframes:_8},"zoom-down":{inKeyframes:D8,outKeyframes:A8}},Q$=(t,e)=>{const{antCls:r}=t,n=`${r}-${e}`,{inKeyframes:i,outKeyframes:o}=j8[e];return[q$(n,i,o,e==="zoom-big-fast"?t.motionDurationFast:t.motionDurationMid),{[`
        ${n}-enter,
        ${n}-appear
      `]:{transform:"scale(0)",opacity:0,animationTimingFunction:t.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:t.motionEaseInOutCirc}}]},k8=(t,e)=>{const{r,g:n,b:i,a:o}=t.toRgb(),a=new qu(t.toRgbString()).onBackground(e).toHsv();return o<=.5?a.v>.5:r*.299+n*.587+i*.114>192},LN=t=>{const{paddingInline:e,onlyIconSize:r}=t;return Xt(t,{buttonPaddingHorizontal:e,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},zN=t=>{var e,r,n,i,o,a;const s=(e=t.contentFontSize)!==null&&e!==void 0?e:t.fontSize,l=(r=t.contentFontSizeSM)!==null&&r!==void 0?r:t.fontSize,c=(n=t.contentFontSizeLG)!==null&&n!==void 0?n:t.fontSizeLG,u=(i=t.contentLineHeight)!==null&&i!==void 0?i:qh(s),f=(o=t.contentLineHeightSM)!==null&&o!==void 0?o:qh(l),h=(a=t.contentLineHeightLG)!==null&&a!==void 0?a:qh(c),v=k8(new l8(t.colorBgSolid),"#fff")?"#000":"#fff",g=ys.reduce((m,p)=>Object.assign(Object.assign({},m),{[`${p}ShadowColor`]:`0 ${se(t.controlOutlineWidth)} 0 ${uu(t[`${p}1`],t.colorBgContainer)}`}),{});return Object.assign(Object.assign({},g),{fontWeight:400,defaultShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlTmpOutline}`,primaryShadow:`0 ${t.controlOutlineWidth}px 0 ${t.controlOutline}`,dangerShadow:`0 ${t.controlOutlineWidth}px 0 ${t.colorErrorOutline}`,primaryColor:t.colorTextLightSolid,dangerColor:t.colorTextLightSolid,borderColorDisabled:t.colorBorder,defaultGhostColor:t.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:t.colorBgContainer,paddingInline:t.paddingContentHorizontal-t.lineWidth,paddingInlineLG:t.paddingContentHorizontal-t.lineWidth,paddingInlineSM:8-t.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:t.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:t.colorText,textTextHoverColor:t.colorText,textTextActiveColor:t.colorText,textHoverBg:t.colorFillTertiary,defaultColor:t.colorText,defaultBg:t.colorBgContainer,defaultBorderColor:t.colorBorder,defaultBorderColorDisabled:t.colorBorder,defaultHoverBg:t.colorBgContainer,defaultHoverColor:t.colorPrimaryHover,defaultHoverBorderColor:t.colorPrimaryHover,defaultActiveBg:t.colorBgContainer,defaultActiveColor:t.colorPrimaryActive,defaultActiveBorderColor:t.colorPrimaryActive,solidTextColor:v,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:f,contentLineHeightLG:h,paddingBlock:Math.max((t.controlHeight-s*u)/2-t.lineWidth,0),paddingBlockSM:Math.max((t.controlHeightSM-l*f)/2-t.lineWidth,0),paddingBlockLG:Math.max((t.controlHeightLG-c*h)/2-t.lineWidth,0)})},B8=t=>{const{componentCls:e,iconCls:r,fontWeight:n,opacityLoading:i,motionDurationSlow:o,motionEaseInOut:a,marginXS:s,calc:l}=t;return{[e]:{outline:"none",position:"relative",display:"inline-flex",gap:t.marginXS,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${se(t.lineWidth)} ${t.lineType} transparent`,cursor:"pointer",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:t.colorText,"&:disabled > *":{pointerEvents:"none"},[`${e}-icon > svg`]:wd(),"> a":{color:"currentColor"},"&:not(:disabled)":Uu(t),[`&${e}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${e}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${e}-icon-only`]:{paddingInline:0,[`&${e}-compact-item`]:{flex:"none"},[`&${e}-round`]:{width:"auto"}},[`&${e}-loading`]:{opacity:i,cursor:"default"},[`${e}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${o} ${a}`).join(",")},[`&:not(${e}-icon-end)`]:{[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${e}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},HN=(t,e,r)=>({[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":e,"&:active":r}}),F8=t=>({minWidth:t.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),L8=t=>({borderRadius:t.controlHeight,paddingInlineStart:t.calc(t.controlHeight).div(2).equal(),paddingInlineEnd:t.calc(t.controlHeight).div(2).equal()}),z8=t=>({cursor:"not-allowed",borderColor:t.borderColorDisabled,color:t.colorTextDisabled,background:t.colorBgContainerDisabled,boxShadow:"none"}),Pp=(t,e,r,n,i,o,a,s)=>({[`&${t}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:e,borderColor:n||void 0,boxShadow:"none"},HN(t,Object.assign({background:e},a),Object.assign({background:e},s))),{"&:disabled":{cursor:"not-allowed",color:i||void 0,borderColor:o||void 0}})}),H8=t=>({[`&:disabled, &${t.componentCls}-disabled`]:Object.assign({},z8(t))}),V8=t=>({[`&:disabled, &${t.componentCls}-disabled`]:{cursor:"not-allowed",color:t.colorTextDisabled}}),Rp=(t,e,r,n)=>{const o=n&&["link","text"].includes(n)?V8:H8;return Object.assign(Object.assign({},o(t)),HN(t.componentCls,e,r))},Np=(t,e,r,n,i)=>({[`&${t.componentCls}-variant-solid`]:Object.assign({color:e,background:r},Rp(t,n,i))}),Mp=(t,e,r,n,i)=>({[`&${t.componentCls}-variant-outlined, &${t.componentCls}-variant-dashed`]:Object.assign({borderColor:e,background:r},Rp(t,n,i))}),Dp=t=>({[`&${t.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Ap=(t,e,r,n)=>({[`&${t.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:e},Rp(t,r,n))}),Co=(t,e,r,n,i)=>({[`&${t.componentCls}-variant-${r}`]:Object.assign({color:e,boxShadow:"none"},Rp(t,n,i,r))}),W8=t=>{const{componentCls:e}=t;return ys.reduce((r,n)=>{const i=t[`${n}6`],o=t[`${n}1`],a=t[`${n}5`],s=t[`${n}2`],l=t[`${n}3`],c=t[`${n}7`];return Object.assign(Object.assign({},r),{[`&${e}-color-${n}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:i,boxShadow:t[`${n}ShadowColor`]},Np(t,t.colorTextLightSolid,i,{background:a},{background:c})),Mp(t,i,t.colorBgContainer,{color:a,borderColor:a,background:t.colorBgContainer},{color:c,borderColor:c,background:t.colorBgContainer})),Dp(t)),Ap(t,o,{background:s},{background:l})),Co(t,i,"link",{color:a},{color:c})),Co(t,i,"text",{color:a,background:o},{color:c,background:l}))})},{})},K8=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.defaultColor,boxShadow:t.defaultShadow},Np(t,t.solidTextColor,t.colorBgSolid,{color:t.solidTextColor,background:t.colorBgSolidHover},{color:t.solidTextColor,background:t.colorBgSolidActive})),Dp(t)),Ap(t,t.colorFillTertiary,{background:t.colorFillSecondary},{background:t.colorFill})),Pp(t.componentCls,t.ghostBg,t.defaultGhostColor,t.defaultGhostBorderColor,t.colorTextDisabled,t.colorBorder)),Co(t,t.textTextColor,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),U8=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorPrimary,boxShadow:t.primaryShadow},Mp(t,t.colorPrimary,t.colorBgContainer,{color:t.colorPrimaryTextHover,borderColor:t.colorPrimaryHover,background:t.colorBgContainer},{color:t.colorPrimaryTextActive,borderColor:t.colorPrimaryActive,background:t.colorBgContainer})),Dp(t)),Ap(t,t.colorPrimaryBg,{background:t.colorPrimaryBgHover},{background:t.colorPrimaryBorder})),Co(t,t.colorPrimaryText,"text",{color:t.colorPrimaryTextHover,background:t.colorPrimaryBg},{color:t.colorPrimaryTextActive,background:t.colorPrimaryBorder})),Co(t,t.colorPrimaryText,"link",{color:t.colorPrimaryTextHover,background:t.linkHoverBg},{color:t.colorPrimaryTextActive})),Pp(t.componentCls,t.ghostBg,t.colorPrimary,t.colorPrimary,t.colorTextDisabled,t.colorBorder,{color:t.colorPrimaryHover,borderColor:t.colorPrimaryHover},{color:t.colorPrimaryActive,borderColor:t.colorPrimaryActive})),q8=t=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.colorError,boxShadow:t.dangerShadow},Np(t,t.dangerColor,t.colorError,{background:t.colorErrorHover},{background:t.colorErrorActive})),Mp(t,t.colorError,t.colorBgContainer,{color:t.colorErrorHover,borderColor:t.colorErrorBorderHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),Dp(t)),Ap(t,t.colorErrorBg,{background:t.colorErrorBgFilledHover},{background:t.colorErrorBgActive})),Co(t,t.colorError,"text",{color:t.colorErrorHover,background:t.colorErrorBg},{color:t.colorErrorHover,background:t.colorErrorBgActive})),Co(t,t.colorError,"link",{color:t.colorErrorHover},{color:t.colorErrorActive})),Pp(t.componentCls,t.ghostBg,t.colorError,t.colorError,t.colorTextDisabled,t.colorBorder,{color:t.colorErrorHover,borderColor:t.colorErrorHover},{color:t.colorErrorActive,borderColor:t.colorErrorActive})),G8=t=>Object.assign(Object.assign({},Co(t,t.colorLink,"link",{color:t.colorLinkHover},{color:t.colorLinkActive})),Pp(t.componentCls,t.ghostBg,t.colorInfo,t.colorInfo,t.colorTextDisabled,t.colorBorder,{color:t.colorInfoHover,borderColor:t.colorInfoHover},{color:t.colorInfoActive,borderColor:t.colorInfoActive})),X8=t=>{const{componentCls:e}=t;return Object.assign({[`${e}-color-default`]:K8(t),[`${e}-color-primary`]:U8(t),[`${e}-color-dangerous`]:q8(t),[`${e}-color-link`]:G8(t)},W8(t))},Y8=t=>Object.assign(Object.assign(Object.assign(Object.assign({},Mp(t,t.defaultBorderColor,t.defaultBg,{color:t.defaultHoverColor,borderColor:t.defaultHoverBorderColor,background:t.defaultHoverBg},{color:t.defaultActiveColor,borderColor:t.defaultActiveBorderColor,background:t.defaultActiveBg})),Co(t,t.textTextColor,"text",{color:t.textTextHoverColor,background:t.textHoverBg},{color:t.textTextActiveColor,background:t.colorBgTextActive})),Np(t,t.primaryColor,t.colorPrimary,{background:t.colorPrimaryHover,color:t.primaryColor},{background:t.colorPrimaryActive,color:t.primaryColor})),Co(t,t.colorLink,"link",{color:t.colorLinkHover,background:t.linkHoverBg},{color:t.colorLinkActive})),ew=(t,e="")=>{const{componentCls:r,controlHeight:n,fontSize:i,borderRadius:o,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=t;return[{[e]:{fontSize:i,height:n,padding:`${se(l)} ${se(a)}`,borderRadius:o,[`&${r}-icon-only`]:{width:n,[s]:{fontSize:c}}}},{[`${r}${r}-circle${e}`]:F8(t)},{[`${r}${r}-round${e}`]:L8(t)}]},J8=t=>{const e=Xt(t,{fontSize:t.contentFontSize});return ew(e,t.componentCls)},Z8=t=>{const e=Xt(t,{controlHeight:t.controlHeightSM,fontSize:t.contentFontSizeSM,padding:t.paddingXS,buttonPaddingHorizontal:t.paddingInlineSM,buttonPaddingVertical:0,borderRadius:t.borderRadiusSM,buttonIconOnlyFontSize:t.onlyIconSizeSM});return ew(e,`${t.componentCls}-sm`)},Q8=t=>{const e=Xt(t,{controlHeight:t.controlHeightLG,fontSize:t.contentFontSizeLG,buttonPaddingHorizontal:t.paddingInlineLG,buttonPaddingVertical:0,borderRadius:t.borderRadiusLG,buttonIconOnlyFontSize:t.onlyIconSizeLG});return ew(e,`${t.componentCls}-lg`)},eV=t=>{const{componentCls:e}=t;return{[e]:{[`&${e}-block`]:{width:"100%"}}}},tV=Gr("Button",t=>{const e=LN(t);return[B8(e),J8(e),Z8(e),Q8(e),eV(e),X8(e),Y8(e),t8(e)]},zN,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function rV(t,e,r){const{focusElCls:n,focus:i,borderElCls:o}=r,a=o?"> *":"",s=["hover",i?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${e}-last-item)`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},n?{[`&${n}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function nV(t,e,r){const{borderElCls:n}=r,i=n?`> ${n}`:"";return{[`&-item:not(${e}-first-item):not(${e}-last-item) ${i}`]:{borderRadius:0},[`&-item:not(${e}-last-item)${e}-first-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${e}-first-item)${e}-last-item`]:{[`& ${i}, &${t}-sm ${i}, &${t}-lg ${i}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function tw(t,e={focus:!0}){const{componentCls:r}=t,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},rV(t,n,e)),nV(r,n,e))}}function iV(t,e){return{[`&-item:not(${e}-last-item)`]:{marginBottom:t.calc(t.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function oV(t,e){return{[`&-item:not(${e}-first-item):not(${e}-last-item)`]:{borderRadius:0},[`&-item${e}-first-item:not(${e}-last-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${e}-last-item:not(${e}-first-item)`]:{[`&, &${t}-sm, &${t}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function aV(t){const e=`${t.componentCls}-compact-vertical`;return{[e]:Object.assign(Object.assign({},iV(t,e)),oV(t.componentCls,e))}}const sV=t=>{const{componentCls:e,colorPrimaryHover:r,lineWidth:n,calc:i}=t,o=i(n).mul(-1).equal(),a=s=>{const l=`${e}-compact${s?"-vertical":""}-item${e}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?o:0,insetInlineStart:s?0:o,backgroundColor:r,content:'""',width:s?"100%":n,height:s?n:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},lV=L$(["Button","compact"],t=>{const e=LN(t);return[tw(e),aV(e),sV(e)]},zN);var cV=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function uV(t){if(typeof t=="object"&&t){let e=t?.delay;return e=!Number.isNaN(e)&&typeof e=="number"?e:0,{loading:e<=0,delay:e}}return{loading:!!t,delay:0}}const dV={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},fV=de.forwardRef((t,e)=>{var r,n;const{loading:i=!1,prefixCls:o,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:f,styles:h,disabled:v,className:g,rootClassName:m,children:p,icon:y,iconPosition:b="start",ghost:$=!1,block:S=!1,htmlType:w="button",classNames:C,style:E={},autoInsertSpace:O,autoFocus:x}=t,I=cV(t,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),T=l||"default",{button:N}=de.useContext(Dt),[P,_]=d.useMemo(()=>{if(a&&s)return[a,s];if(l||c){const we=dV[T]||[];return c?["danger",we[1]]:we}return N?.color&&N?.variant?[N.color,N.variant]:["default","outlined"]},[l,a,s,c,N?.variant,N?.color]),M=P==="danger"?"dangerous":P,{getPrefixCls:D,direction:j,autoInsertSpace:k,className:V,style:G,classNames:W,styles:Y}=Oo("button"),q=(r=O??k)!==null&&r!==void 0?r:!0,J=D("btn",o),[oe,ie,te]=tV(J),z=d.useContext(Ji),K=v??z,B=d.useContext(FN),F=d.useMemo(()=>uV(i),[i]),[U,Z]=d.useState(F.loading),[ee,Q]=d.useState(!1),ce=d.useRef(null),me=Ns(e,ce),Te=d.Children.count(p)===1&&!y&&!vm(_),_e=d.useRef(!0);de.useEffect(()=>(_e.current=!1,()=>{_e.current=!0}),[]),d.useLayoutEffect(()=>{let we=null;F.delay>0?we=setTimeout(()=>{we=null,Z(!0)},F.delay):Z(F.loading);function Ie(){we&&(clearTimeout(we),we=null)}return Ie},[F.delay,F.loading]),d.useEffect(()=>{if(!ce.current||!q)return;const we=ce.current.textContent||"";Te&&N0(we)?ee||Q(!0):ee&&Q(!1)}),d.useEffect(()=>{x&&ce.current&&ce.current.focus()},[]);const ve=de.useCallback(we=>{var Ie;if(U||K){we.preventDefault();return}(Ie=t.onClick)===null||Ie===void 0||Ie.call(t,("href"in t,we))},[t.onClick,U,K]),{compactSize:ye,compactItemClassnames:xe}=hc(J,j),ge={large:"lg",small:"sm",middle:void 0},ne=no(we=>{var Ie,Fe;return(Fe=(Ie=f??ye)!==null&&Ie!==void 0?Ie:B)!==null&&Fe!==void 0?Fe:we}),X=ne&&(n=ge[ne])!==null&&n!==void 0?n:"",fe=U?"loading":y,pe=yn(I,["navigate"]),$e=ae(J,ie,te,{[`${J}-${u}`]:u!=="default"&&u,[`${J}-${T}`]:T,[`${J}-dangerous`]:c,[`${J}-color-${M}`]:M,[`${J}-variant-${_}`]:_,[`${J}-${X}`]:X,[`${J}-icon-only`]:!p&&p!==0&&!!fe,[`${J}-background-ghost`]:$&&!vm(_),[`${J}-loading`]:U,[`${J}-two-chinese-chars`]:ee&&q&&!U,[`${J}-block`]:S,[`${J}-rtl`]:j==="rtl",[`${J}-icon-end`]:b==="end"},xe,g,m,V),Ee=Object.assign(Object.assign({},G),E),be=ae(C?.icon,W.icon),H=Object.assign(Object.assign({},h?.icon||{}),Y.icon||{}),re=y&&!U?de.createElement(M0,{prefixCls:J,className:be,style:H},y):i&&typeof i=="object"&&i.icon?de.createElement(M0,{prefixCls:J,className:be,style:H},i.icon):de.createElement(e8,{existIcon:!!y,prefixCls:J,loading:U,mount:_e.current}),he=p||p===0?QH(p,Te&&q):null;if(pe.href!==void 0)return oe(de.createElement("a",Object.assign({},pe,{className:ae($e,{[`${J}-disabled`]:K}),href:K?void 0:pe.href,style:Ee,onClick:ve,ref:me,tabIndex:K?-1:0}),re,he));let ue=de.createElement("button",Object.assign({},I,{type:w,className:$e,style:Ee,onClick:ve,disabled:K,ref:me}),re,he,xe&&de.createElement(lV,{prefixCls:J}));return vm(_)||(ue=de.createElement(K$,{component:"Button",disabled:U},ue)),oe(ue)}),bs=fV;bs.Group=JH;bs.__ANT_BUTTON=!0;var VN=d.createContext(null),px=[];function hV(t,e){var r=d.useState(function(){if(!In())return null;var g=document.createElement("div");return g}),n=le(r,1),i=n[0],o=d.useRef(!1),a=d.useContext(VN),s=d.useState(px),l=le(s,2),c=l[0],u=l[1],f=a||(o.current?void 0:function(g){u(function(m){var p=[g].concat(Oe(m));return p})});function h(){i.parentElement||document.body.appendChild(i),o.current=!0}function v(){var g;(g=i.parentElement)===null||g===void 0||g.removeChild(i),o.current=!1}return Lt(function(){return t?a?a(h):h():v(),v},[t]),Lt(function(){c.length&&(c.forEach(function(g){return g()}),u(px))},[c]),[i,f]}var ym;function WN(t){var e="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=e;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var i,o;if(t){var a=getComputedStyle(t);n.scrollbarColor=a.scrollbarColor,n.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(t,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",f=c?"height: ".concat(s.height,";"):"";jo(`
#`.concat(e,`::-webkit-scrollbar {
`).concat(u,`
`).concat(f,`
}`),e)}catch(g){console.error(g),i=l,o=c}}document.body.appendChild(r);var h=t&&i&&!isNaN(i)?i:r.offsetWidth-r.clientWidth,v=t&&o&&!isNaN(o)?o:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Lu(e),{width:h,height:v}}function gx(t){return typeof document>"u"?0:(ym===void 0&&(ym=WN()),ym.width)}function A0(t){return typeof document>"u"||!t||!(t instanceof Element)?{width:0,height:0}:WN(t)}function vV(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var pV="rc-util-locker-".concat(Date.now()),mx=0;function gV(t){var e=!!t,r=d.useState(function(){return mx+=1,"".concat(pV,"_").concat(mx)}),n=le(r,1),i=n[0];Lt(function(){if(e){var o=A0(document.body).width,a=vV();jo(`
html body {
  overflow-y: hidden;
  `.concat(a?"width: calc(100% - ".concat(o,"px);"):"",`
}`),i)}else Lu(i);return function(){Lu(i)}},[e,i])}var mV=!1;function yV(t){return mV}var yx=function(e){return e===!1?!1:!In()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e},KN=d.forwardRef(function(t,e){var r=t.open,n=t.autoLock,i=t.getContainer;t.debug;var o=t.autoDestroy,a=o===void 0?!0:o,s=t.children,l=d.useState(r),c=le(l,2),u=c[0],f=c[1],h=u||r;d.useEffect(function(){(a||r)&&f(r)},[r,a]);var v=d.useState(function(){return yx(i)}),g=le(v,2),m=g[0],p=g[1];d.useEffect(function(){var T=yx(i);p(T??null)});var y=hV(h&&!m),b=le(y,2),$=b[0],S=b[1],w=m??$;gV(n&&r&&In()&&(w===$||w===document.body));var C=null;if(s&&Yi(s)&&e){var E=s;C=E.ref}var O=Ns(C,e);if(!h||!In()||m===void 0)return null;var x=w===!1||yV(),I=s;return e&&(I=d.cloneElement(s,{ref:O})),d.createElement(VN.Provider,{value:S},x?I:Hl.createPortal(I,w))});function bV(){var t=L({},up);return t.useId}var bx=0,$x=bV();const rw=$x?function(e){var r=$x();return e||r}:function(e){var r=d.useState("ssr-id"),n=le(r,2),i=n[0],o=n[1];return d.useEffect(function(){var a=bx;bx+=1,o("rc_unique_".concat(a))},[]),e||i};var rs="RC_FORM_INTERNAL_HOOKS",ar=function(){gr(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},$s=d.createContext({getFieldValue:ar,getFieldsValue:ar,getFieldError:ar,getFieldWarning:ar,getFieldsError:ar,isFieldsTouched:ar,isFieldTouched:ar,isFieldValidating:ar,isFieldsValidating:ar,resetFields:ar,setFields:ar,setFieldValue:ar,setFieldsValue:ar,validateFields:ar,submit:ar,getInternalHooks:function(){return ar(),{dispatch:ar,initEntityValue:ar,registerField:ar,useSubscribe:ar,setInitialValues:ar,destroyForm:ar,setCallbacks:ar,registerWatch:ar,getFields:ar,setValidateMessages:ar,setPreserve:ar,getInitialValue:ar}}}),Gu=d.createContext(null);function j0(t){return t==null?[]:Array.isArray(t)?t:[t]}function $V(t){return t&&!!t._init}function k0(){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 B0=k0();function wV(t){try{return Function.toString.call(t).indexOf("[native code]")!==-1}catch{return typeof t=="function"}}function SV(t,e,r){if(_$())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var i=new(t.bind.apply(t,n));return r&&ku(i,r.prototype),i}function F0(t){var e=typeof Map=="function"?new Map:void 0;return F0=function(n){if(n===null||!wV(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(e!==void 0){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return SV(n,arguments,Bu(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ku(i,n)},F0(t)}var CV=/%[sdj%]/g,xV=function(){};function L0(t){if(!t||!t.length)return null;var e={};return t.forEach(function(r){var n=r.field;e[n]=e[n]||[],e[n].push(r)}),e}function vi(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var i=0,o=r.length;if(typeof t=="function")return t.apply(null,r);if(typeof t=="string"){var a=t.replace(CV,function(s){if(s==="%%")return"%";if(i>=o)return s;switch(s){case"%s":return String(r[i++]);case"%d":return Number(r[i++]);case"%j":try{return JSON.stringify(r[i++])}catch{return"[Circular]"}break;default:return s}});return a}return t}function EV(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function tn(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||EV(e)&&typeof t=="string"&&!t)}function OV(t,e,r){var n=[],i=0,o=t.length;function a(s){n.push.apply(n,Oe(s||[])),i++,i===o&&r(n)}t.forEach(function(s){e(s,a)})}function wx(t,e,r){var n=0,i=t.length;function o(a){if(a&&a.length){r(a);return}var s=n;n=n+1,s<i?e(t[s],o):r([])}o([])}function IV(t){var e=[];return Object.keys(t).forEach(function(r){e.push.apply(e,Oe(t[r]||[]))}),e}var Sx=function(t){xo(r,t);var e=Eo(r);function r(n,i){var o;return kr(this,r),o=e.call(this,"Async Validation Error"),A(Ke(o),"errors",void 0),A(Ke(o),"fields",void 0),o.errors=n,o.fields=i,o}return Br(r)}(F0(Error));function TV(t,e,r,n,i){if(e.first){var o=new Promise(function(h,v){var g=function(y){return n(y),y.length?v(new Sx(y,L0(y))):h(i)},m=IV(t);wx(m,r,g)});return o.catch(function(h){return h}),o}var a=e.firstFields===!0?Object.keys(t):e.firstFields||[],s=Object.keys(t),l=s.length,c=0,u=[],f=new Promise(function(h,v){var g=function(p){if(u.push.apply(u,p),c++,c===l)return n(u),u.length?v(new Sx(u,L0(u))):h(i)};s.length||(n(u),h(i)),s.forEach(function(m){var p=t[m];a.indexOf(m)!==-1?wx(p,r,g):OV(p,r,g)})});return f.catch(function(h){return h}),f}function _V(t){return!!(t&&t.message!==void 0)}function PV(t,e){for(var r=t,n=0;n<e.length;n++){if(r==null)return r;r=r[e[n]]}return r}function Cx(t,e){return function(r){var n;return t.fullFields?n=PV(e,t.fullFields):n=e[r.field||t.fullField],_V(r)?(r.field=r.field||t.fullField,r.fieldValue=n,r):{message:typeof r=="function"?r():r,fieldValue:n,field:r.field||t.fullField}}}function xx(t,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];tt(n)==="object"&&tt(t[r])==="object"?t[r]=L(L({},t[r]),n):t[r]=n}}return t}var Xs="enum",RV=function(e,r,n,i,o){e[Xs]=Array.isArray(e[Xs])?e[Xs]:[],e[Xs].indexOf(r)===-1&&i.push(vi(o.messages[Xs],e.fullField,e[Xs].join(", ")))},NV=function(e,r,n,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(r)||i.push(vi(o.messages.pattern.mismatch,e.fullField,r,e.pattern));else if(typeof e.pattern=="string"){var a=new RegExp(e.pattern);a.test(r)||i.push(vi(o.messages.pattern.mismatch,e.fullField,r,e.pattern))}}},MV=function(e,r,n,i,o){var a=typeof e.len=="number",s=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=r,f=null,h=typeof r=="number",v=typeof r=="string",g=Array.isArray(r);if(h?f="number":v?f="string":g&&(f="array"),!f)return!1;g&&(u=r.length),v&&(u=r.replace(c,"_").length),a?u!==e.len&&i.push(vi(o.messages[f].len,e.fullField,e.len)):s&&!l&&u<e.min?i.push(vi(o.messages[f].min,e.fullField,e.min)):l&&!s&&u>e.max?i.push(vi(o.messages[f].max,e.fullField,e.max)):s&&l&&(u<e.min||u>e.max)&&i.push(vi(o.messages[f].range,e.fullField,e.min,e.max))},UN=function(e,r,n,i,o,a){e.required&&(!n.hasOwnProperty(e.field)||tn(r,a||e.type))&&i.push(vi(o.messages.required,e.fullField))},Hf;const DV=function(){if(Hf)return Hf;var t="[a-fA-F\\d:]",e=function(C){return C&&C.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(t,")|(?<=").concat(t,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",i=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],o="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(i.join("|"),")").concat(o),s=new RegExp("(?:^".concat(r,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(r,"$")),c=new RegExp("^".concat(a,"$")),u=function(C){return C&&C.exact?s:new RegExp("(?:".concat(e(C)).concat(r).concat(e(C),")|(?:").concat(e(C)).concat(a).concat(e(C),")"),"g")};u.v4=function(w){return w&&w.exact?l:new RegExp("".concat(e(w)).concat(r).concat(e(w)),"g")},u.v6=function(w){return w&&w.exact?c:new RegExp("".concat(e(w)).concat(a).concat(e(w)),"g")};var f="(?:(?:[a-z]+:)?//)",h="(?:\\S+(?::\\S*)?@)?",v=u.v4().source,g=u.v6().source,m="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",y="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",b="(?::\\d{2,5})?",$='(?:[/?#][^\\s"]*)?',S="(?:".concat(f,"|www\\.)").concat(h,"(?:localhost|").concat(v,"|").concat(g,"|").concat(m).concat(p).concat(y,")").concat(b).concat($);return Hf=new RegExp("(?:^".concat(S,"$)"),"i"),Hf};var Ex={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},du={integer:function(e){return du.number(e)&&parseInt(e,10)===e},float:function(e){return du.number(e)&&!du.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 tt(e)==="object"&&!du.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Ex.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(DV())},hex:function(e){return typeof e=="string"&&!!e.match(Ex.hex)}},AV=function(e,r,n,i,o){if(e.required&&r===void 0){UN(e,r,n,i,o);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=e.type;a.indexOf(s)>-1?du[s](r)||i.push(vi(o.messages.types[s],e.fullField,e.type)):s&&tt(r)!==e.type&&i.push(vi(o.messages.types[s],e.fullField,e.type))},jV=function(e,r,n,i,o){(/^\s+$/.test(r)||r==="")&&i.push(vi(o.messages.whitespace,e.fullField))};const zt={required:UN,whitespace:jV,type:AV,range:MV,enum:RV,pattern:NV};var kV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o)}n(a)},BV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(r==null&&!e.required)return n();zt.required(e,r,i,a,o,"array"),r!=null&&(zt.type(e,r,i,a,o),zt.range(e,r,i,a,o))}n(a)},FV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&zt.type(e,r,i,a,o)}n(a)},LV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r,"date")&&!e.required)return n();if(zt.required(e,r,i,a,o),!tn(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),zt.type(e,l,i,a,o),l&&zt.range(e,l.getTime(),i,a,o)}}n(a)},zV="enum",HV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&zt[zV](e,r,i,a,o)}n(a)},VV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&(zt.type(e,r,i,a,o),zt.range(e,r,i,a,o))}n(a)},WV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&(zt.type(e,r,i,a,o),zt.range(e,r,i,a,o))}n(a)},KV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&zt.type(e,r,i,a,o)}n(a)},UV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(r===""&&(r=void 0),tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&(zt.type(e,r,i,a,o),zt.range(e,r,i,a,o))}n(a)},qV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),r!==void 0&&zt.type(e,r,i,a,o)}n(a)},GV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r,"string")&&!e.required)return n();zt.required(e,r,i,a,o),tn(r,"string")||zt.pattern(e,r,i,a,o)}n(a)},XV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r)&&!e.required)return n();zt.required(e,r,i,a,o),tn(r)||zt.type(e,r,i,a,o)}n(a)},YV=function(e,r,n,i,o){var a=[],s=Array.isArray(r)?"array":tt(r);zt.required(e,r,i,a,o,s),n(a)},JV=function(e,r,n,i,o){var a=[],s=e.required||!e.required&&i.hasOwnProperty(e.field);if(s){if(tn(r,"string")&&!e.required)return n();zt.required(e,r,i,a,o,"string"),tn(r,"string")||(zt.type(e,r,i,a,o),zt.range(e,r,i,a,o),zt.pattern(e,r,i,a,o),e.whitespace===!0&&zt.whitespace(e,r,i,a,o))}n(a)},bm=function(e,r,n,i,o){var a=e.type,s=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(tn(r,a)&&!e.required)return n();zt.required(e,r,i,s,o,a),tn(r,a)||zt.type(e,r,i,s,o)}n(s)};const $u={string:JV,method:KV,number:UV,boolean:FV,regexp:XV,integer:WV,float:VV,array:BV,object:qV,enum:HV,pattern:GV,date:LV,url:bm,hex:bm,email:bm,required:YV,any:kV};var xd=function(){function t(e){kr(this,t),A(this,"rules",null),A(this,"_messages",B0),this.define(e)}return Br(t,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(tt(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(i){var o=r[i];n.rules[i]=Array.isArray(o)?o:[o]})}},{key:"messages",value:function(r){return r&&(this._messages=xx(k0(),r)),this._messages}},{key:"validate",value:function(r){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=r,s=i,l=o;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(g){var m=[],p={};function y($){if(Array.isArray($)){var S;m=(S=m).concat.apply(S,Oe($))}else m.push($)}for(var b=0;b<g.length;b++)y(g[b]);m.length?(p=L0(m),l(m,p)):l(null,a)}if(s.messages){var u=this.messages();u===B0&&(u=k0()),xx(u,s.messages),s.messages=u}else s.messages=this.messages();var f={},h=s.keys||Object.keys(this.rules);h.forEach(function(g){var m=n.rules[g],p=a[g];m.forEach(function(y){var b=y;typeof b.transform=="function"&&(a===r&&(a=L({},a)),p=a[g]=b.transform(p),p!=null&&(b.type=b.type||(Array.isArray(p)?"array":tt(p)))),typeof b=="function"?b={validator:b}:b=L({},b),b.validator=n.getValidationMethod(b),b.validator&&(b.field=g,b.fullField=b.fullField||g,b.type=n.getType(b),f[g]=f[g]||[],f[g].push({rule:b,value:p,source:a,field:g}))})});var v={};return TV(f,s,function(g,m){var p=g.rule,y=(p.type==="object"||p.type==="array")&&(tt(p.fields)==="object"||tt(p.defaultField)==="object");y=y&&(p.required||!p.required&&g.value),p.field=g.field;function b(E,O){return L(L({},O),{},{fullField:"".concat(p.fullField,".").concat(E),fullFields:p.fullFields?[].concat(Oe(p.fullFields),[E]):[E]})}function $(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],O=Array.isArray(E)?E:[E];!s.suppressWarning&&O.length&&t.warning("async-validator:",O),O.length&&p.message!==void 0&&(O=[].concat(p.message));var x=O.map(Cx(p,a));if(s.first&&x.length)return v[p.field]=1,m(x);if(!y)m(x);else{if(p.required&&!g.value)return p.message!==void 0?x=[].concat(p.message).map(Cx(p,a)):s.error&&(x=[s.error(p,vi(s.messages.required,p.field))]),m(x);var I={};p.defaultField&&Object.keys(g.value).map(function(P){I[P]=p.defaultField}),I=L(L({},I),g.rule.fields);var T={};Object.keys(I).forEach(function(P){var _=I[P],R=Array.isArray(_)?_:[_];T[P]=R.map(b.bind(null,P))});var N=new t(T);N.messages(s.messages),g.rule.options&&(g.rule.options.messages=s.messages,g.rule.options.error=s.error),N.validate(g.value,g.rule.options||s,function(P){var _=[];x&&x.length&&_.push.apply(_,Oe(x)),P&&P.length&&_.push.apply(_,Oe(P)),m(_.length?_:null)})}}var S;if(p.asyncValidator)S=p.asyncValidator(p,g.value,$,g.source,s);else if(p.validator){try{S=p.validator(p,g.value,$,g.source,s)}catch(E){var w,C;(w=(C=console).error)===null||w===void 0||w.call(C,E),s.suppressValidatorError||setTimeout(function(){throw E},0),$(E.message)}S===!0?$():S===!1?$(typeof p.message=="function"?p.message(p.fullField||p.field):p.message||"".concat(p.fullField||p.field," fails")):S instanceof Array?$(S):S instanceof Error&&$(S.message)}S&&S.then&&S.then(function(){return $()},function(E){return $(E)})},function(g){c(g)},a)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!$u.hasOwnProperty(r.type))throw new Error(vi("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),i=n.indexOf("message");return i!==-1&&n.splice(i,1),n.length===1&&n[0]==="required"?$u.required:$u[this.getType(r)]||void 0}}]),t}();A(xd,"register",function(e,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");$u[e]=r});A(xd,"warning",xV);A(xd,"messages",B0);A(xd,"validators",$u);var di="'${name}' is not a valid ${type}",qN={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:di,method:di,array:di,object:di,number:di,date:di,boolean:di,integer:di,float:di,regexp:di,email:di,url:di,hex:di},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},Ox=xd;function ZV(t,e){return t.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var n=r.slice(2,-1);return e[n]})}var Ix="CODE_LOGIC_ERROR";function z0(t,e,r,n,i){return H0.apply(this,arguments)}function H0(){return H0=As(Tn().mark(function t(e,r,n,i,o){var a,s,l,c,u,f,h,v,g;return Tn().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return a=L({},n),delete a.ruleIndex,Ox.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(y){return console.error(y),Promise.reject(Ix)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new Ox(A({},e,[a])),u=yl(qN,i.validateMessages),c.messages(u),f=[],p.prev=10,p.next=13,Promise.resolve(c.validate(A({},e,r),L({},i)));case 13:p.next=18;break;case 15:p.prev=15,p.t0=p.catch(10),p.t0.errors&&(f=p.t0.errors.map(function(y,b){var $=y.message,S=$===Ix?u.default:$;return d.isValidElement(S)?d.cloneElement(S,{key:"error_".concat(b)}):S}));case 18:if(!(!f.length&&l)){p.next=23;break}return p.next=21,Promise.all(r.map(function(y,b){return z0("".concat(e,".").concat(b),y,l,i,o)}));case 21:return h=p.sent,p.abrupt("return",h.reduce(function(y,b){return[].concat(Oe(y),Oe(b))},[]));case 23:return v=L(L({},n),{},{name:e,enum:(n.enum||[]).join(", ")},o),g=f.map(function(y){return typeof y=="string"?ZV(y,v):y}),p.abrupt("return",g);case 26:case"end":return p.stop()}},t,null,[[10,15]])})),H0.apply(this,arguments)}function QV(t,e,r,n,i,o){var a=t.join("."),s=r.map(function(u,f){var h=u.validator,v=L(L({},u),{},{ruleIndex:f});return h&&(v.validator=function(g,m,p){var y=!1,b=function(){for(var w=arguments.length,C=new Array(w),E=0;E<w;E++)C[E]=arguments[E];Promise.resolve().then(function(){gr(!y,"Your validator function has already return a promise. `callback` will be ignored."),y||p.apply(void 0,C)})},$=h(g,m,b);y=$&&typeof $.then=="function"&&typeof $.catch=="function",gr(y,"`callback` is deprecated. Please return a promise instead."),y&&$.then(function(){p()}).catch(function(S){p(S||" ")})}),v}).sort(function(u,f){var h=u.warningOnly,v=u.ruleIndex,g=f.warningOnly,m=f.ruleIndex;return!!h==!!g?v-m:h?1:-1}),l;if(i===!0)l=new Promise(function(){var u=As(Tn().mark(function f(h,v){var g,m,p;return Tn().wrap(function(b){for(;;)switch(b.prev=b.next){case 0:g=0;case 1:if(!(g<s.length)){b.next=12;break}return m=s[g],b.next=5,z0(a,e,m,n,o);case 5:if(p=b.sent,!p.length){b.next=9;break}return v([{errors:p,rule:m}]),b.abrupt("return");case 9:g+=1,b.next=1;break;case 12:h([]);case 13:case"end":return b.stop()}},f)}));return function(f,h){return u.apply(this,arguments)}}());else{var c=s.map(function(u){return z0(a,e,u,n,o).then(function(f){return{errors:f,rule:u}})});l=(i?t7(c):e7(c)).then(function(u){return Promise.reject(u)})}return l.catch(function(u){return u}),l}function e7(t){return V0.apply(this,arguments)}function V0(){return V0=As(Tn().mark(function t(e){return Tn().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.all(e).then(function(i){var o,a=(o=[]).concat.apply(o,Oe(i));return a}));case 1:case"end":return n.stop()}},t)})),V0.apply(this,arguments)}function t7(t){return W0.apply(this,arguments)}function W0(){return W0=As(Tn().mark(function t(e){var r;return Tn().wrap(function(i){for(;;)switch(i.prev=i.next){case 0:return r=0,i.abrupt("return",new Promise(function(o){e.forEach(function(a){a.then(function(s){s.errors.length&&o([s]),r+=1,r===e.length&&o([])})})}));case 2:case"end":return i.stop()}},t)})),W0.apply(this,arguments)}function Dr(t){return j0(t)}function Tx(t,e){var r={};return e.forEach(function(n){var i=kn(t,n);r=Ii(r,n,i)}),r}function Ml(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return t&&t.some(function(n){return GN(e,n,r)})}function GN(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!t||!e||!r&&t.length!==e.length?!1:e.every(function(n,i){return t[i]===n})}function r7(t,e){if(t===e)return!0;if(!t&&e||t&&!e||!t||!e||tt(t)!=="object"||tt(e)!=="object")return!1;var r=Object.keys(t),n=Object.keys(e),i=new Set([].concat(r,n));return Oe(i).every(function(o){var a=t[o],s=e[o];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function n7(t){var e=arguments.length<=1?void 0:arguments[1];return e&&e.target&&tt(e.target)==="object"&&t in e.target?e.target[t]:e}function _x(t,e,r){var n=t.length;if(e<0||e>=n||r<0||r>=n)return t;var i=t[e],o=e-r;return o>0?[].concat(Oe(t.slice(0,r)),[i],Oe(t.slice(r,e)),Oe(t.slice(e+1,n))):o<0?[].concat(Oe(t.slice(0,e)),Oe(t.slice(e+1,r+1)),[i],Oe(t.slice(r+1,n))):t}var i7=["name"],xi=[];function $m(t,e,r,n,i,o){return typeof t=="function"?t(e,r,"source"in o?{source:o.source}:{}):n!==i}var nw=function(t){xo(r,t);var e=Eo(r);function r(n){var i;if(kr(this,r),i=e.call(this,n),A(Ke(i),"state",{resetCount:0}),A(Ke(i),"cancelRegisterFunc",null),A(Ke(i),"mounted",!1),A(Ke(i),"touched",!1),A(Ke(i),"dirty",!1),A(Ke(i),"validatePromise",void 0),A(Ke(i),"prevValidating",void 0),A(Ke(i),"errors",xi),A(Ke(i),"warnings",xi),A(Ke(i),"cancelRegister",function(){var l=i.props,c=l.preserve,u=l.isListField,f=l.name;i.cancelRegisterFunc&&i.cancelRegisterFunc(u,c,Dr(f)),i.cancelRegisterFunc=null}),A(Ke(i),"getNamePath",function(){var l=i.props,c=l.name,u=l.fieldContext,f=u.prefixName,h=f===void 0?[]:f;return c!==void 0?[].concat(Oe(h),Oe(c)):[]}),A(Ke(i),"getRules",function(){var l=i.props,c=l.rules,u=c===void 0?[]:c,f=l.fieldContext;return u.map(function(h){return typeof h=="function"?h(f):h})}),A(Ke(i),"refresh",function(){i.mounted&&i.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),A(Ke(i),"metaCache",null),A(Ke(i),"triggerMetaEvent",function(l){var c=i.props.onMetaChange;if(c){var u=L(L({},i.getMeta()),{},{destroy:l});So(i.metaCache,u)||c(u),i.metaCache=u}else i.metaCache=null}),A(Ke(i),"onStoreChange",function(l,c,u){var f=i.props,h=f.shouldUpdate,v=f.dependencies,g=v===void 0?[]:v,m=f.onReset,p=u.store,y=i.getNamePath(),b=i.getValue(l),$=i.getValue(p),S=c&&Ml(c,y);switch(u.type==="valueUpdate"&&u.source==="external"&&!So(b,$)&&(i.touched=!0,i.dirty=!0,i.validatePromise=null,i.errors=xi,i.warnings=xi,i.triggerMetaEvent()),u.type){case"reset":if(!c||S){i.touched=!1,i.dirty=!1,i.validatePromise=void 0,i.errors=xi,i.warnings=xi,i.triggerMetaEvent(),m?.(),i.refresh();return}break;case"remove":{if(h&&$m(h,l,p,b,$,u)){i.reRender();return}break}case"setField":{var w=u.data;if(S){"touched"in w&&(i.touched=w.touched),"validating"in w&&!("originRCField"in w)&&(i.validatePromise=w.validating?Promise.resolve([]):null),"errors"in w&&(i.errors=w.errors||xi),"warnings"in w&&(i.warnings=w.warnings||xi),i.dirty=!0,i.triggerMetaEvent(),i.reRender();return}else if("value"in w&&Ml(c,y,!0)){i.reRender();return}if(h&&!y.length&&$m(h,l,p,b,$,u)){i.reRender();return}break}case"dependenciesUpdate":{var C=g.map(Dr);if(C.some(function(E){return Ml(u.relatedFields,E)})){i.reRender();return}break}default:if(S||(!g.length||y.length||h)&&$m(h,l,p,b,$,u)){i.reRender();return}break}h===!0&&i.reRender()}),A(Ke(i),"validateRules",function(l){var c=i.getNamePath(),u=i.getValue(),f=l||{},h=f.triggerName,v=f.validateOnly,g=v===void 0?!1:v,m=Promise.resolve().then(As(Tn().mark(function p(){var y,b,$,S,w,C,E;return Tn().wrap(function(x){for(;;)switch(x.prev=x.next){case 0:if(i.mounted){x.next=2;break}return x.abrupt("return",[]);case 2:if(y=i.props,b=y.validateFirst,$=b===void 0?!1:b,S=y.messageVariables,w=y.validateDebounce,C=i.getRules(),h&&(C=C.filter(function(I){return I}).filter(function(I){var T=I.validateTrigger;if(!T)return!0;var N=j0(T);return N.includes(h)})),!(w&&h)){x.next=10;break}return x.next=8,new Promise(function(I){setTimeout(I,w)});case 8:if(i.validatePromise===m){x.next=10;break}return x.abrupt("return",[]);case 10:return E=QV(c,u,C,l,$,S),E.catch(function(I){return I}).then(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:xi;if(i.validatePromise===m){var T;i.validatePromise=null;var N=[],P=[];(T=I.forEach)===null||T===void 0||T.call(I,function(_){var R=_.rule.warningOnly,M=_.errors,D=M===void 0?xi:M;R?P.push.apply(P,Oe(D)):N.push.apply(N,Oe(D))}),i.errors=N,i.warnings=P,i.triggerMetaEvent(),i.reRender()}}),x.abrupt("return",E);case 13:case"end":return x.stop()}},p)})));return g||(i.validatePromise=m,i.dirty=!0,i.errors=xi,i.warnings=xi,i.triggerMetaEvent(),i.reRender()),m}),A(Ke(i),"isFieldValidating",function(){return!!i.validatePromise}),A(Ke(i),"isFieldTouched",function(){return i.touched}),A(Ke(i),"isFieldDirty",function(){if(i.dirty||i.props.initialValue!==void 0)return!0;var l=i.props.fieldContext,c=l.getInternalHooks(rs),u=c.getInitialValue;return u(i.getNamePath())!==void 0}),A(Ke(i),"getErrors",function(){return i.errors}),A(Ke(i),"getWarnings",function(){return i.warnings}),A(Ke(i),"isListField",function(){return i.props.isListField}),A(Ke(i),"isList",function(){return i.props.isList}),A(Ke(i),"isPreserve",function(){return i.props.preserve}),A(Ke(i),"getMeta",function(){i.prevValidating=i.isFieldValidating();var l={touched:i.isFieldTouched(),validating:i.prevValidating,errors:i.errors,warnings:i.warnings,name:i.getNamePath(),validated:i.validatePromise===null};return l}),A(Ke(i),"getOnlyChild",function(l){if(typeof l=="function"){var c=i.getMeta();return L(L({},i.getOnlyChild(l(i.getControlled(),c,i.props.fieldContext))),{},{isFunction:!0})}var u=Mi(l);return u.length!==1||!d.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),A(Ke(i),"getValue",function(l){var c=i.props.fieldContext.getFieldsValue,u=i.getNamePath();return kn(l||c(!0),u)}),A(Ke(i),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=i.props,u=c.name,f=c.trigger,h=c.validateTrigger,v=c.getValueFromEvent,g=c.normalize,m=c.valuePropName,p=c.getValueProps,y=c.fieldContext,b=h!==void 0?h:y.validateTrigger,$=i.getNamePath(),S=y.getInternalHooks,w=y.getFieldsValue,C=S(rs),E=C.dispatch,O=i.getValue(),x=p||function(_){return A({},m,_)},I=l[f],T=u!==void 0?x(O):{},N=L(L({},l),T);N[f]=function(){i.touched=!0,i.dirty=!0,i.triggerMetaEvent();for(var _,R=arguments.length,M=new Array(R),D=0;D<R;D++)M[D]=arguments[D];v?_=v.apply(void 0,M):_=n7.apply(void 0,[m].concat(M)),g&&(_=g(_,O,w(!0))),_!==O&&E({type:"updateValue",namePath:$,value:_}),I&&I.apply(void 0,M)};var P=j0(b||[]);return P.forEach(function(_){var R=N[_];N[_]=function(){R&&R.apply(void 0,arguments);var M=i.props.rules;M&&M.length&&E({type:"validateField",namePath:$,triggerName:_})}}),N}),n.fieldContext){var o=n.fieldContext.getInternalHooks,a=o(rs),s=a.initEntityValue;s(Ke(i))}return i}return Br(r,[{key:"componentDidMount",value:function(){var i=this.props,o=i.shouldUpdate,a=i.fieldContext;if(this.mounted=!0,a){var s=a.getInternalHooks,l=s(rs),c=l.registerField;this.cancelRegisterFunc=c(this)}o===!0&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var i=this.state.resetCount,o=this.props.children,a=this.getOnlyChild(o),s=a.child,l=a.isFunction,c;return l?c=s:d.isValidElement(s)?c=d.cloneElement(s,this.getControlled(s.props)):(gr(!s,"`children` of Field is not validate ReactElement."),c=s),d.createElement(d.Fragment,{key:i},c)}}]),r}(d.Component);A(nw,"contextType",$s);A(nw,"defaultProps",{trigger:"onChange",valuePropName:"value"});function iw(t){var e,r=t.name,n=mt(t,i7),i=d.useContext($s),o=d.useContext(Gu),a=r!==void 0?Dr(r):void 0,s=(e=n.isListField)!==null&&e!==void 0?e:!!o,l="keep";return s||(l="_".concat((a||[]).join("_"))),d.createElement(nw,Re({key:l,name:a,isListField:s},n,{fieldContext:i}))}function XN(t){var e=t.name,r=t.initialValue,n=t.children,i=t.rules,o=t.validateTrigger,a=t.isListField,s=d.useContext($s),l=d.useContext(Gu),c=d.useRef({keys:[],id:0}),u=c.current,f=d.useMemo(function(){var m=Dr(s.prefixName)||[];return[].concat(Oe(m),Oe(Dr(e)))},[s.prefixName,e]),h=d.useMemo(function(){return L(L({},s),{},{prefixName:f})},[s,f]),v=d.useMemo(function(){return{getKey:function(p){var y=f.length,b=p[y];return[u.keys[b],p.slice(y+1)]}}},[f]);if(typeof n!="function")return gr(!1,"Form.List only accepts function as children."),null;var g=function(p,y,b){var $=b.source;return $==="internal"?!1:p!==y};return d.createElement(Gu.Provider,{value:v},d.createElement($s.Provider,{value:h},d.createElement(iw,{name:[],shouldUpdate:g,rules:i,validateTrigger:o,initialValue:r,isList:!0,isListField:a??!!l},function(m,p){var y=m.value,b=y===void 0?[]:y,$=m.onChange,S=s.getFieldValue,w=function(){var x=S(f||[]);return x||[]},C={add:function(x,I){var T=w();I>=0&&I<=T.length?(u.keys=[].concat(Oe(u.keys.slice(0,I)),[u.id],Oe(u.keys.slice(I))),$([].concat(Oe(T.slice(0,I)),[x],Oe(T.slice(I))))):(u.keys=[].concat(Oe(u.keys),[u.id]),$([].concat(Oe(T),[x]))),u.id+=1},remove:function(x){var I=w(),T=new Set(Array.isArray(x)?x:[x]);T.size<=0||(u.keys=u.keys.filter(function(N,P){return!T.has(P)}),$(I.filter(function(N,P){return!T.has(P)})))},move:function(x,I){if(x!==I){var T=w();x<0||x>=T.length||I<0||I>=T.length||(u.keys=_x(u.keys,x,I),$(_x(T,x,I)))}}},E=b||[];return Array.isArray(E)||(E=[]),n(E.map(function(O,x){var I=u.keys[x];return I===void 0&&(u.keys[x]=u.id,I=u.keys[x],u.id+=1),{name:x,key:I,isListField:!0}}),C,p)})))}function o7(t){var e=!1,r=t.length,n=[];return t.length?new Promise(function(i,o){t.forEach(function(a,s){a.catch(function(l){return e=!0,l}).then(function(l){r-=1,n[s]=l,!(r>0)&&(e&&o(n),i(n))})})}):Promise.resolve([])}var YN="__@field_split__";function wm(t){return t.map(function(e){return"".concat(tt(e),":").concat(e)}).join(YN)}var Ys=function(){function t(){kr(this,t),A(this,"kvs",new Map)}return Br(t,[{key:"set",value:function(r,n){this.kvs.set(wm(r),n)}},{key:"get",value:function(r){return this.kvs.get(wm(r))}},{key:"update",value:function(r,n){var i=this.get(r),o=n(i);o?this.set(r,o):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(wm(r))}},{key:"map",value:function(r){return Oe(this.kvs.entries()).map(function(n){var i=le(n,2),o=i[0],a=i[1],s=o.split(YN);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=le(c,3),f=u[1],h=u[2];return f==="number"?Number(h):h}),value:a})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var i=n.key,o=n.value;return r[i.join(".")]=o,null}),r}}]),t}(),a7=["name"],s7=Br(function t(e){var r=this;kr(this,t),A(this,"formHooked",!1),A(this,"forceRootUpdate",void 0),A(this,"subscribable",!0),A(this,"store",{}),A(this,"fieldEntities",[]),A(this,"initialValues",{}),A(this,"callbacks",{}),A(this,"validateMessages",null),A(this,"preserve",null),A(this,"lastValidatePromise",null),A(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),A(this,"getInternalHooks",function(n){return n===rs?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(gr(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),A(this,"useSubscribe",function(n){r.subscribable=n}),A(this,"prevWithoutPreserves",null),A(this,"setInitialValues",function(n,i){if(r.initialValues=n||{},i){var o,a=yl(n,r.store);(o=r.prevWithoutPreserves)===null||o===void 0||o.map(function(s){var l=s.key;a=Ii(a,l,kn(n,l))}),r.prevWithoutPreserves=null,r.updateStore(a)}}),A(this,"destroyForm",function(n){if(n)r.updateStore({});else{var i=new Ys;r.getFieldEntities(!0).forEach(function(o){r.isMergedPreserve(o.isPreserve())||i.set(o.getNamePath(),!0)}),r.prevWithoutPreserves=i}}),A(this,"getInitialValue",function(n){var i=kn(r.initialValues,n);return n.length?yl(i):i}),A(this,"setCallbacks",function(n){r.callbacks=n}),A(this,"setValidateMessages",function(n){r.validateMessages=n}),A(this,"setPreserve",function(n){r.preserve=n}),A(this,"watchList",[]),A(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(i){return i!==n})}}),A(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var i=r.getFieldsValue(),o=r.getFieldsValue(!0);r.watchList.forEach(function(a){a(i,o,n)})}}),A(this,"timeoutId",null),A(this,"warningUnhooked",function(){}),A(this,"updateStore",function(n){r.store=n}),A(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(i){return i.getNamePath().length}):r.fieldEntities}),A(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=new Ys;return r.getFieldEntities(n).forEach(function(o){var a=o.getNamePath();i.set(a,o)}),i}),A(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var i=r.getFieldsMap(!0);return n.map(function(o){var a=Dr(o);return i.get(a)||{INVALIDATE_NAME_PATH:Dr(o)}})}),A(this,"getFieldsValue",function(n,i){r.warningUnhooked();var o,a,s;if(n===!0||Array.isArray(n)?(o=n,a=i):n&&tt(n)==="object"&&(s=n.strict,a=n.filter),o===!0&&!a)return r.store;var l=r.getFieldEntitiesForNamePathList(Array.isArray(o)?o:null),c=[];return l.forEach(function(u){var f,h,v="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var g,m;if((g=(m=u).isList)!==null&&g!==void 0&&g.call(m))return}else if(!o&&(f=(h=u).isListField)!==null&&f!==void 0&&f.call(h))return;if(!a)c.push(v);else{var p="getMeta"in u?u.getMeta():null;a(p)&&c.push(v)}}),Tx(r.store,c.map(Dr))}),A(this,"getFieldValue",function(n){r.warningUnhooked();var i=Dr(n);return kn(r.store,i)}),A(this,"getFieldsError",function(n){r.warningUnhooked();var i=r.getFieldEntitiesForNamePathList(n);return i.map(function(o,a){return o&&!("INVALIDATE_NAME_PATH"in o)?{name:o.getNamePath(),errors:o.getErrors(),warnings:o.getWarnings()}:{name:Dr(n[a]),errors:[],warnings:[]}})}),A(this,"getFieldError",function(n){r.warningUnhooked();var i=Dr(n),o=r.getFieldsError([i])[0];return o.errors}),A(this,"getFieldWarning",function(n){r.warningUnhooked();var i=Dr(n),o=r.getFieldsError([i])[0];return o.warnings}),A(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,i=new Array(n),o=0;o<n;o++)i[o]=arguments[o];var a=i[0],s=i[1],l,c=!1;i.length===0?l=null:i.length===1?Array.isArray(a)?(l=a.map(Dr),c=!1):(l=null,c=a):(l=a.map(Dr),c=s);var u=r.getFieldEntities(!0),f=function(p){return p.isFieldTouched()};if(!l)return c?u.every(function(m){return f(m)||m.isList()}):u.some(f);var h=new Ys;l.forEach(function(m){h.set(m,[])}),u.forEach(function(m){var p=m.getNamePath();l.forEach(function(y){y.every(function(b,$){return p[$]===b})&&h.update(y,function(b){return[].concat(Oe(b),[m])})})});var v=function(p){return p.some(f)},g=h.map(function(m){var p=m.value;return p});return c?g.every(v):g.some(v)}),A(this,"isFieldTouched",function(n){return r.warningUnhooked(),r.isFieldsTouched([n])}),A(this,"isFieldsValidating",function(n){r.warningUnhooked();var i=r.getFieldEntities();if(!n)return i.some(function(a){return a.isFieldValidating()});var o=n.map(Dr);return i.some(function(a){var s=a.getNamePath();return Ml(o,s)&&a.isFieldValidating()})}),A(this,"isFieldValidating",function(n){return r.warningUnhooked(),r.isFieldsValidating([n])}),A(this,"resetWithFieldInitialValue",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new Ys,o=r.getFieldEntities(!0);o.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var f=i.get(u)||new Set;f.add({entity:l,value:c}),i.set(u,f)}});var a=function(c){c.forEach(function(u){var f=u.props.initialValue;if(f!==void 0){var h=u.getNamePath(),v=r.getInitialValue(h);if(v!==void 0)gr(!1,"Form already set 'initialValues' with path '".concat(h.join("."),"'. Field can not overwrite it."));else{var g=i.get(h);if(g&&g.size>1)gr(!1,"Multiple Field with path '".concat(h.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(g){var m=r.getFieldValue(h),p=u.isListField();!p&&(!n.skipExist||m===void 0)&&r.updateStore(Ii(r.store,h,Oe(g)[0].value))}}}})},s;n.entities?s=n.entities:n.namePathList?(s=[],n.namePathList.forEach(function(l){var c=i.get(l);if(c){var u;(u=s).push.apply(u,Oe(Oe(c).map(function(f){return f.entity})))}})):s=o,a(s)}),A(this,"resetFields",function(n){r.warningUnhooked();var i=r.store;if(!n){r.updateStore(yl(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(i,null,{type:"reset"}),r.notifyWatch();return}var o=n.map(Dr);o.forEach(function(a){var s=r.getInitialValue(a);r.updateStore(Ii(r.store,a,s))}),r.resetWithFieldInitialValue({namePathList:o}),r.notifyObservers(i,o,{type:"reset"}),r.notifyWatch(o)}),A(this,"setFields",function(n){r.warningUnhooked();var i=r.store,o=[];n.forEach(function(a){var s=a.name,l=mt(a,a7),c=Dr(s);o.push(c),"value"in l&&r.updateStore(Ii(r.store,c,l.value)),r.notifyObservers(i,[c],{type:"setField",data:a})}),r.notifyWatch(o)}),A(this,"getFields",function(){var n=r.getFieldEntities(!0),i=n.map(function(o){var a=o.getNamePath(),s=o.getMeta(),l=L(L({},s),{},{name:a,value:r.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return i}),A(this,"initEntityValue",function(n){var i=n.props.initialValue;if(i!==void 0){var o=n.getNamePath(),a=kn(r.store,o);a===void 0&&r.updateStore(Ii(r.store,o,i))}}),A(this,"isMergedPreserve",function(n){var i=n!==void 0?n:r.preserve;return i??!0}),A(this,"registerField",function(n){r.fieldEntities.push(n);var i=n.getNamePath();if(r.notifyWatch([i]),n.props.initialValue!==void 0){var o=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(o,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(f){return f!==n}),!r.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:r.getInitialValue(i);if(i.length&&r.getFieldValue(i)!==c&&r.fieldEntities.every(function(f){return!GN(f.getNamePath(),i)})){var u=r.store;r.updateStore(Ii(u,i,c,!0)),r.notifyObservers(u,[i],{type:"remove"}),r.triggerDependenciesUpdate(u,i)}}r.notifyWatch([i])}}),A(this,"dispatch",function(n){switch(n.type){case"updateValue":{var i=n.namePath,o=n.value;r.updateValue(i,o);break}case"validateField":{var a=n.namePath,s=n.triggerName;r.validateFields([a],{triggerName:s});break}}}),A(this,"notifyObservers",function(n,i,o){if(r.subscribable){var a=L(L({},o),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(n,i,a)})}else r.forceRootUpdate()}),A(this,"triggerDependenciesUpdate",function(n,i){var o=r.getDependencyChildrenFields(i);return o.length&&r.validateFields(o),r.notifyObservers(n,o,{type:"dependenciesUpdate",relatedFields:[i].concat(Oe(o))}),o}),A(this,"updateValue",function(n,i){var o=Dr(n),a=r.store;r.updateStore(Ii(r.store,o,i)),r.notifyObservers(a,[o],{type:"valueUpdate",source:"internal"}),r.notifyWatch([o]);var s=r.triggerDependenciesUpdate(a,o),l=r.callbacks.onValuesChange;if(l){var c=Tx(r.store,[o]);l(c,r.getFieldsValue())}r.triggerOnFieldsChange([o].concat(Oe(s)))}),A(this,"setFieldsValue",function(n){r.warningUnhooked();var i=r.store;if(n){var o=yl(r.store,n);r.updateStore(o)}r.notifyObservers(i,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),A(this,"setFieldValue",function(n,i){r.setFields([{name:n,value:i,errors:[],warnings:[]}])}),A(this,"getDependencyChildrenFields",function(n){var i=new Set,o=[],a=new Ys;r.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var f=Dr(u);a.update(f,function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return h.add(l),h})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(f){if(!i.has(f)){i.add(f);var h=f.getNamePath();f.isFieldDirty()&&h.length&&(o.push(h),l(h))}})};return s(n),o}),A(this,"triggerOnFieldsChange",function(n,i){var o=r.callbacks.onFieldsChange;if(o){var a=r.getFields();if(i){var s=new Ys;i.forEach(function(c){var u=c.name,f=c.errors;s.set(u,f)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return Ml(n,u)});l.length&&o(l,a)}}),A(this,"validateFields",function(n,i){r.warningUnhooked();var o,a;Array.isArray(n)||typeof n=="string"||typeof i=="string"?(o=n,a=i):a=n;var s=!!o,l=s?o.map(Dr):[],c=[],u=String(Date.now()),f=new Set,h=a||{},v=h.recursive,g=h.dirty;r.getFieldEntities(!0).forEach(function(b){if(s||l.push(b.getNamePath()),!(!b.props.rules||!b.props.rules.length)&&!(g&&!b.isFieldDirty())){var $=b.getNamePath();if(f.add($.join(u)),!s||Ml(l,$,v)){var S=b.validateRules(L({validateMessages:L(L({},qN),r.validateMessages)},a));c.push(S.then(function(){return{name:$,errors:[],warnings:[]}}).catch(function(w){var C,E=[],O=[];return(C=w.forEach)===null||C===void 0||C.call(w,function(x){var I=x.rule.warningOnly,T=x.errors;I?O.push.apply(O,Oe(T)):E.push.apply(E,Oe(T))}),E.length?Promise.reject({name:$,errors:E,warnings:O}):{name:$,errors:E,warnings:O}}))}}});var m=o7(c);r.lastValidatePromise=m,m.catch(function(b){return b}).then(function(b){var $=b.map(function(S){var w=S.name;return w});r.notifyObservers(r.store,$,{type:"validateFinish"}),r.triggerOnFieldsChange($,b)});var p=m.then(function(){return r.lastValidatePromise===m?Promise.resolve(r.getFieldsValue(l)):Promise.reject([])}).catch(function(b){var $=b.filter(function(S){return S&&S.errors.length});return Promise.reject({values:r.getFieldsValue(l),errorFields:$,outOfDate:r.lastValidatePromise!==m})});p.catch(function(b){return b});var y=l.filter(function(b){return f.has(b.join(u))});return r.triggerOnFieldsChange(y),p}),A(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var i=r.callbacks.onFinish;if(i)try{i(n)}catch(o){console.error(o)}}).catch(function(n){var i=r.callbacks.onFinishFailed;i&&i(n)})}),this.forceRootUpdate=e});function ow(t){var e=d.useRef(),r=d.useState({}),n=le(r,2),i=n[1];if(!e.current)if(t)e.current=t;else{var o=function(){i({})},a=new s7(o);e.current=a.getForm()}return[e.current]}var K0=d.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),JN=function(e){var r=e.validateMessages,n=e.onFormChange,i=e.onFormFinish,o=e.children,a=d.useContext(K0),s=d.useRef({});return d.createElement(K0.Provider,{value:L(L({},a),{},{validateMessages:L(L({},a.validateMessages),r),triggerFormChange:function(c,u){n&&n(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){i&&i(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=L(L({},s.current),{},A({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=L({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},o)},l7=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],c7=function(e,r){var n=e.name,i=e.initialValues,o=e.fields,a=e.form,s=e.preserve,l=e.children,c=e.component,u=c===void 0?"form":c,f=e.validateMessages,h=e.validateTrigger,v=h===void 0?"onChange":h,g=e.onValuesChange,m=e.onFieldsChange,p=e.onFinish,y=e.onFinishFailed,b=e.clearOnDestroy,$=mt(e,l7),S=d.useRef(null),w=d.useContext(K0),C=ow(a),E=le(C,1),O=E[0],x=O.getInternalHooks(rs),I=x.useSubscribe,T=x.setInitialValues,N=x.setCallbacks,P=x.setValidateMessages,_=x.setPreserve,R=x.destroyForm;d.useImperativeHandle(r,function(){return L(L({},O),{},{nativeElement:S.current})}),d.useEffect(function(){return w.registerForm(n,O),function(){w.unregisterForm(n)}},[w,O,n]),P(L(L({},w.validateMessages),f)),N({onValuesChange:g,onFieldsChange:function(q){if(w.triggerFormChange(n,q),m){for(var J=arguments.length,oe=new Array(J>1?J-1:0),ie=1;ie<J;ie++)oe[ie-1]=arguments[ie];m.apply(void 0,[q].concat(oe))}},onFinish:function(q){w.triggerFormFinish(n,q),p&&p(q)},onFinishFailed:y}),_(s);var M=d.useRef(null);T(i,!M.current),M.current||(M.current=!0),d.useEffect(function(){return function(){return R(b)}},[]);var D,j=typeof l=="function";if(j){var k=O.getFieldsValue(!0);D=l(k,O)}else D=l;I(!j);var V=d.useRef();d.useEffect(function(){r7(V.current||[],o||[])||O.setFields(o||[]),V.current=o},[o,O]);var G=d.useMemo(function(){return L(L({},O),{},{validateTrigger:v})},[O,v]),W=d.createElement(Gu.Provider,{value:null},d.createElement($s.Provider,{value:G},D));return u===!1?W:d.createElement(u,Re({},$,{ref:S,onSubmit:function(q){q.preventDefault(),q.stopPropagation(),O.submit()},onReset:function(q){var J;q.preventDefault(),O.resetFields(),(J=$.onReset)===null||J===void 0||J.call($,q)}}),W)};function Px(t){try{return JSON.stringify(t)}catch{return Math.random()}}function ZN(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e[0],i=e[1],o=i===void 0?{}:i,a=$V(o)?{form:o}:o,s=a.form,l=d.useState(),c=le(l,2),u=c[0],f=c[1],h=d.useMemo(function(){return Px(u)},[u]),v=d.useRef(h);v.current=h;var g=d.useContext($s),m=s||g,p=m&&m._init,y=Dr(n),b=d.useRef(y);return b.current=y,d.useEffect(function(){if(p){var $=m.getFieldsValue,S=m.getInternalHooks,w=S(rs),C=w.registerWatch,E=function(T,N){var P=a.preserve?N:T;return typeof n=="function"?n(P):kn(P,b.current)},O=C(function(I,T){var N=E(I,T),P=Px(N);v.current!==P&&(v.current=P,f(N))}),x=E($(),$(!0));return u!==x&&f(x),O}},[p]),u}var u7=d.forwardRef(c7),vc=u7;vc.FormProvider=JN;vc.Field=iw;vc.List=XN;vc.useForm=ow;vc.useWatch=ZN;const Uo=d.createContext({labelAlign:"right",vertical:!1,itemRef:()=>{}}),QN=d.createContext(null),eM=t=>{const e=yn(t,["prefixCls"]);return d.createElement(JN,Object.assign({},e))},aw=d.createContext({prefixCls:""}),Bn=d.createContext({}),d7=({children:t,status:e,override:r})=>{const n=d.useContext(Bn),i=d.useMemo(()=>{const o=Object.assign({},n);return r&&delete o.isFormItemInput,e&&(delete o.status,delete o.hasFeedback,delete o.feedbackIcon),o},[e,r,n]);return d.createElement(Bn.Provider,{value:i},t)},tM=d.createContext(void 0),Ov=t=>{const{space:e,form:r,children:n}=t;if(n==null)return null;let i=n;return r&&(i=de.createElement(d7,{override:!0,status:!0},i)),e&&(i=de.createElement(qH,null,i)),i};function rM(...t){const e={};return t.forEach(r=>{r&&Object.keys(r).forEach(n=>{r[n]!==void 0&&(e[n]=r[n])})}),e}var nM=function(e){if(In()&&window.document.documentElement){var r=Array.isArray(e)?e:[e],n=window.document.documentElement;return r.some(function(i){return i in n.style})}return!1},f7=function(e,r){if(!nM(e))return!1;var n=document.createElement("div"),i=n.style[e];return n.style[e]=r,n.style[e]!==i};function h7(t,e){return!Array.isArray(t)&&e!==void 0?f7(t,e):nM(t)}const v7=t=>{const{componentCls:e}=t;return{[e]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},p7=t=>{const{componentCls:e}=t;return{[e]:{position:"relative",maxWidth:"100%",minHeight:1}}},g7=(t,e)=>{const{prefixCls:r,componentCls:n,gridColumns:i}=t,o={};for(let a=i;a>=0;a--)a===0?(o[`${n}${e}-${a}`]={display:"none"},o[`${n}-push-${a}`]={insetInlineStart:"auto"},o[`${n}-pull-${a}`]={insetInlineEnd:"auto"},o[`${n}${e}-push-${a}`]={insetInlineStart:"auto"},o[`${n}${e}-pull-${a}`]={insetInlineEnd:"auto"},o[`${n}${e}-offset-${a}`]={marginInlineStart:0},o[`${n}${e}-order-${a}`]={order:0}):(o[`${n}${e}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/i*100}%`,maxWidth:`${a/i*100}%`}],o[`${n}${e}-push-${a}`]={insetInlineStart:`${a/i*100}%`},o[`${n}${e}-pull-${a}`]={insetInlineEnd:`${a/i*100}%`},o[`${n}${e}-offset-${a}`]={marginInlineStart:`${a/i*100}%`},o[`${n}${e}-order-${a}`]={order:a});return o[`${n}${e}-flex`]={flex:`var(--${r}${e}-flex)`},o},U0=(t,e)=>g7(t,e),m7=(t,e,r)=>({[`@media (min-width: ${se(e)})`]:Object.assign({},U0(t,r))}),y7=()=>({}),b7=()=>({}),$7=Gr("Grid",v7,y7),w7=t=>({xs:t.screenXSMin,sm:t.screenSMMin,md:t.screenMDMin,lg:t.screenLGMin,xl:t.screenXLMin,xxl:t.screenXXLMin}),S7=Gr("Grid",t=>{const e=Xt(t,{gridColumns:24}),r=w7(e);return delete r.xs,[p7(e),U0(e,""),U0(e,"-xs"),Object.keys(r).map(n=>m7(e,r[n],`-${n}`)).reduce((n,i)=>Object.assign(Object.assign({},n),i),{})]},b7);function C7(t){return e=>d.createElement(Ds,{theme:{token:{motion:!1,zIndexPopupBase:0}}},d.createElement(t,Object.assign({},e)))}const iM=(t,e,r,n,i)=>C7(a=>{const{prefixCls:s,style:l}=a,c=d.useRef(null),[u,f]=d.useState(0),[h,v]=d.useState(0),[g,m]=ln(!1,{value:a.open}),{getPrefixCls:p}=d.useContext(Dt),y=p(n||"select",s);d.useEffect(()=>{if(m(!0),typeof ResizeObserver<"u"){const S=new ResizeObserver(C=>{const E=C[0].target;f(E.offsetHeight+8),v(E.offsetWidth)}),w=setInterval(()=>{var C;const E=i?`.${i(y)}`:`.${y}-dropdown`,O=(C=c.current)===null||C===void 0?void 0:C.querySelector(E);O&&(clearInterval(w),S.observe(O))},10);return()=>{clearInterval(w),S.disconnect()}}},[]);let b=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:g,visible:g,getPopupContainer:()=>c.current});e&&Object.assign(b,{[e]:{overflow:{adjustX:!1,adjustY:!1}}});const $={paddingBottom:u,position:"relative",minWidth:h};return d.createElement("div",{ref:c,style:$},d.createElement(t,Object.assign({},b)))}),oM=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var t=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(t?.substr(0,4))};var jp=function(e){var r=e.className,n=e.customizeIcon,i=e.customizeIconProps,o=e.children,a=e.onMouseDown,s=e.onClick,l=typeof n=="function"?n(i):n;return d.createElement("span",{className:r,onMouseDown:function(u){u.preventDefault(),a?.(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:d.createElement("span",{className:ae(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},o))},x7=function(e,r,n,i,o){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=de.useMemo(function(){if(tt(i)==="object")return i.clearIcon;if(o)return o},[i,o]),u=de.useMemo(function(){return!!(!a&&i&&(n.length||s)&&!(l==="combobox"&&s===""))},[i,a,n.length,s,l]);return{allowClear:u,clearIcon:de.createElement(jp,{className:"".concat(e,"-clear"),onMouseDown:r,customizeIcon:c},"×")}},aM=d.createContext(null);function E7(){return d.useContext(aM)}function O7(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,e=d.useState(!1),r=le(e,2),n=r[0],i=r[1],o=d.useRef(null),a=function(){window.clearTimeout(o.current)};d.useEffect(function(){return a},[]);var s=function(c,u){a(),o.current=window.setTimeout(function(){i(c),u&&u()},t)};return[n,s,a]}function sM(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,e=d.useRef(null),r=d.useRef(null);d.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(i){(i||e.current===null)&&(e.current=i),window.clearTimeout(r.current),r.current=window.setTimeout(function(){e.current=null},t)}return[function(){return e.current},n]}function I7(t,e,r,n){var i=d.useRef(null);i.current={open:e,triggerOpen:r,customizedTrigger:n},d.useEffect(function(){function o(a){var s;if(!((s=i.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),i.current.open&&t().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&i.current.triggerOpen(!1)}}return window.addEventListener("mousedown",o),function(){return window.removeEventListener("mousedown",o)}},[])}function T7(t){return t&&![Ze.ESC,Ze.SHIFT,Ze.BACKSPACE,Ze.TAB,Ze.WIN_KEY,Ze.ALT,Ze.META,Ze.WIN_KEY_RIGHT,Ze.CTRL,Ze.SEMICOLON,Ze.EQUALS,Ze.CAPS_LOCK,Ze.CONTEXT_MENU,Ze.F1,Ze.F2,Ze.F3,Ze.F4,Ze.F5,Ze.F6,Ze.F7,Ze.F8,Ze.F9,Ze.F10,Ze.F11,Ze.F12].includes(t)}var _7=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Js=void 0;function P7(t,e){var r=t.prefixCls,n=t.invalidate,i=t.item,o=t.renderItem,a=t.responsive,s=t.responsiveDisabled,l=t.registerSize,c=t.itemKey,u=t.className,f=t.style,h=t.children,v=t.display,g=t.order,m=t.component,p=m===void 0?"div":m,y=mt(t,_7),b=a&&!v;function $(O){l(c,O)}d.useEffect(function(){return function(){$(null)}},[]);var S=o&&i!==Js?o(i,{index:g}):h,w;n||(w={opacity:b?0:1,height:b?0:Js,overflowY:b?"hidden":Js,order:a?g:Js,pointerEvents:b?"none":Js,position:b?"absolute":Js});var C={};b&&(C["aria-hidden"]=!0);var E=d.createElement(p,Re({className:ae(!n&&r,u),style:L(L({},w),f)},C,y,{ref:e}),S);return a&&(E=d.createElement(ro,{onResize:function(x){var I=x.offsetWidth;$(I)},disabled:s},E)),E}var wu=d.forwardRef(P7);wu.displayName="Item";function R7(t){if(typeof MessageChannel>"u")Ht(t);else{var e=new MessageChannel;e.port1.onmessage=function(){return t()},e.port2.postMessage(void 0)}}function N7(){var t=d.useRef(null),e=function(n){t.current||(t.current=[],R7(function(){Hl.unstable_batchedUpdates(function(){t.current.forEach(function(i){i()}),t.current=null})})),t.current.push(n)};return e}function Yc(t,e){var r=d.useState(e),n=le(r,2),i=n[0],o=n[1],a=sr(function(s){t(function(){o(s)})});return[i,a]}var Iv=de.createContext(null),M7=["component"],D7=["className"],A7=["className"],j7=function(e,r){var n=d.useContext(Iv);if(!n){var i=e.component,o=i===void 0?"div":i,a=mt(e,M7);return d.createElement(o,Re({},a,{ref:r}))}var s=n.className,l=mt(n,D7),c=e.className,u=mt(e,A7);return d.createElement(Iv.Provider,{value:null},d.createElement(wu,Re({ref:r,className:ae(s,c)},l,u)))},lM=d.forwardRef(j7);lM.displayName="RawItem";var k7=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],cM="responsive",uM="invalidate";function B7(t){return"+ ".concat(t.length," ...")}function F7(t,e){var r=t.prefixCls,n=r===void 0?"rc-overflow":r,i=t.data,o=i===void 0?[]:i,a=t.renderItem,s=t.renderRawItem,l=t.itemKey,c=t.itemWidth,u=c===void 0?10:c,f=t.ssr,h=t.style,v=t.className,g=t.maxCount,m=t.renderRest,p=t.renderRawRest,y=t.suffix,b=t.component,$=b===void 0?"div":b,S=t.itemComponent,w=t.onVisibleChange,C=mt(t,k7),E=f==="full",O=N7(),x=Yc(O,null),I=le(x,2),T=I[0],N=I[1],P=T||0,_=Yc(O,new Map),R=le(_,2),M=R[0],D=R[1],j=Yc(O,0),k=le(j,2),V=k[0],G=k[1],W=Yc(O,0),Y=le(W,2),q=Y[0],J=Y[1],oe=Yc(O,0),ie=le(oe,2),te=ie[0],z=ie[1],K=d.useState(null),B=le(K,2),F=B[0],U=B[1],Z=d.useState(null),ee=le(Z,2),Q=ee[0],ce=ee[1],me=d.useMemo(function(){return Q===null&&E?Number.MAX_SAFE_INTEGER:Q||0},[Q,T]),Te=d.useState(!1),_e=le(Te,2),ve=_e[0],ye=_e[1],xe="".concat(n,"-item"),ge=Math.max(V,q),ne=g===cM,X=o.length&&ne,fe=g===uM,pe=X||typeof g=="number"&&o.length>g,$e=d.useMemo(function(){var Le=o;return X?T===null&&E?Le=o:Le=o.slice(0,Math.min(o.length,P/u)):typeof g=="number"&&(Le=o.slice(0,g)),Le},[o,u,T,g,X]),Ee=d.useMemo(function(){return X?o.slice(me+1):o.slice($e.length)},[o,$e,X,me]),be=d.useCallback(function(Le,ze){var Ne;return typeof l=="function"?l(Le):(Ne=l&&Le?.[l])!==null&&Ne!==void 0?Ne:ze},[l]),H=d.useCallback(a||function(Le){return Le},[a]);function re(Le,ze,Ne){Q===Le&&(ze===void 0||ze===F)||(ce(Le),Ne||(ye(Le<o.length-1),w?.(Le)),ze!==void 0&&U(ze))}function he(Le,ze){N(ze.clientWidth)}function ue(Le,ze){D(function(Ne){var Ye=new Map(Ne);return ze===null?Ye.delete(Le):Ye.set(Le,ze),Ye})}function we(Le,ze){J(ze),G(q)}function Ie(Le,ze){z(ze)}function Fe(Le){return M.get(be($e[Le],Le))}Lt(function(){if(P&&typeof ge=="number"&&$e){var Le=te,ze=$e.length,Ne=ze-1;if(!ze){re(0,null);return}for(var Ye=0;Ye<ze;Ye+=1){var lt=Fe(Ye);if(E&&(lt=lt||0),lt===void 0){re(Ye-1,void 0,!0);break}if(Le+=lt,Ne===0&&Le<=P||Ye===Ne-1&&Le+Fe(Ne)<=P){re(Ne,null);break}else if(Le+ge>P){re(Ye-1,Le-lt-te+q);break}}y&&Fe(0)+te>P&&U(null)}},[P,M,q,te,be,$e]);var qe=ve&&!!Ee.length,st={};F!==null&&X&&(st={position:"absolute",left:F,top:0});var ft={prefixCls:xe,responsive:X,component:S,invalidate:fe},et=s?function(Le,ze){var Ne=be(Le,ze);return d.createElement(Iv.Provider,{key:Ne,value:L(L({},ft),{},{order:ze,item:Le,itemKey:Ne,registerSize:ue,display:ze<=me})},s(Le,ze))}:function(Le,ze){var Ne=be(Le,ze);return d.createElement(wu,Re({},ft,{order:ze,key:Ne,item:Le,renderItem:H,itemKey:Ne,registerSize:ue,display:ze<=me}))},St={order:qe?me:Number.MAX_SAFE_INTEGER,className:"".concat(xe,"-rest"),registerSize:we,display:qe},Et=m||B7,at=p?d.createElement(Iv.Provider,{value:L(L({},ft),St)},p(Ee)):d.createElement(wu,Re({},ft,St),typeof Et=="function"?Et(Ee):Et),nt=d.createElement($,Re({className:ae(!fe&&n,v),style:h,ref:e},C),$e.map(et),pe?at:null,y&&d.createElement(wu,Re({},ft,{responsive:ne,responsiveDisabled:!X,order:me,className:"".concat(xe,"-suffix"),registerSize:Ie,display:!0,style:st}),y));return ne?d.createElement(ro,{onResize:he,disabled:!X},nt):nt}var mo=d.forwardRef(F7);mo.displayName="Overflow";mo.Item=lM;mo.RESPONSIVE=cM;mo.INVALIDATE=uM;function L7(t,e,r){var n=L(L({},t),e);return Object.keys(e).forEach(function(i){var o=e[i];typeof o=="function"&&(n[i]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return o.apply(void 0,l),(a=t[i])===null||a===void 0?void 0:a.call.apply(a,[t].concat(l))})}),n}var z7=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],H7=function(e,r){var n=e.prefixCls,i=e.id,o=e.inputElement,a=e.autoFocus,s=e.autoComplete,l=e.editable,c=e.activeDescendantId,u=e.value,f=e.open,h=e.attrs,v=mt(e,z7),g=o||d.createElement("input",null),m=g,p=m.ref,y=m.props;return"maxLength"in g.props,g=d.cloneElement(g,L(L(L({type:"search"},L7(v,y)),{},{id:i,ref:mi(r,p),autoComplete:s||"off",autoFocus:a,className:ae("".concat(n,"-selection-search-input"),y?.className),role:"combobox","aria-expanded":f||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":f?c:void 0},h),{},{value:l?u:"",readOnly:!l,unselectable:l?null:"on",style:L(L({},y.style),{},{opacity:l?null:0})})),g},dM=d.forwardRef(H7);function fM(t){return Array.isArray(t)?t:t!==void 0?[t]:[]}var V7=typeof window<"u"&&window.document&&window.document.documentElement,W7=V7;function K7(t){return t!=null}function U7(t){return!t&&t!==0}function Rx(t){return["string","number"].includes(tt(t))}function hM(t){var e=void 0;return t&&(Rx(t.title)?e=t.title.toString():Rx(t.label)&&(e=t.label.toString())),e}function q7(t,e){W7?d.useLayoutEffect(t,e):d.useEffect(t,e)}function G7(t){var e;return(e=t.key)!==null&&e!==void 0?e:t.value}var Nx=function(e){e.preventDefault(),e.stopPropagation()},X7=function(e){var r=e.id,n=e.prefixCls,i=e.values,o=e.open,a=e.searchValue,s=e.autoClearSearchValue,l=e.inputRef,c=e.placeholder,u=e.disabled,f=e.mode,h=e.showSearch,v=e.autoFocus,g=e.autoComplete,m=e.activeDescendantId,p=e.tabIndex,y=e.removeIcon,b=e.maxTagCount,$=e.maxTagTextLength,S=e.maxTagPlaceholder,w=S===void 0?function(Z){return"+ ".concat(Z.length," ...")}:S,C=e.tagRender,E=e.onToggleOpen,O=e.onRemove,x=e.onInputChange,I=e.onInputPaste,T=e.onInputKeyDown,N=e.onInputMouseDown,P=e.onInputCompositionStart,_=e.onInputCompositionEnd,R=e.onInputBlur,M=d.useRef(null),D=d.useState(0),j=le(D,2),k=j[0],V=j[1],G=d.useState(!1),W=le(G,2),Y=W[0],q=W[1],J="".concat(n,"-selection"),oe=o||f==="multiple"&&s===!1||f==="tags"?a:"",ie=f==="tags"||f==="multiple"&&s===!1||h&&(o||Y);q7(function(){V(M.current.scrollWidth)},[oe]);var te=function(ee,Q,ce,me,Te){return d.createElement("span",{title:hM(ee),className:ae("".concat(J,"-item"),A({},"".concat(J,"-item-disabled"),ce))},d.createElement("span",{className:"".concat(J,"-item-content")},Q),me&&d.createElement(jp,{className:"".concat(J,"-item-remove"),onMouseDown:Nx,onClick:Te,customizeIcon:y},"×"))},z=function(ee,Q,ce,me,Te,_e){var ve=function(xe){Nx(xe),E(!o)};return d.createElement("span",{onMouseDown:ve},C({label:Q,value:ee,disabled:ce,closable:me,onClose:Te,isMaxTag:!!_e}))},K=function(ee){var Q=ee.disabled,ce=ee.label,me=ee.value,Te=!u&&!Q,_e=ce;if(typeof $=="number"&&(typeof ce=="string"||typeof ce=="number")){var ve=String(_e);ve.length>$&&(_e="".concat(ve.slice(0,$),"..."))}var ye=function(ge){ge&&ge.stopPropagation(),O(ee)};return typeof C=="function"?z(me,_e,Q,Te,ye):te(ee,_e,Q,Te,ye)},B=function(ee){if(!i.length)return null;var Q=typeof w=="function"?w(ee):w;return typeof C=="function"?z(void 0,Q,!1,!1,void 0,!0):te({title:Q},Q,!1)},F=d.createElement("div",{className:"".concat(J,"-search"),style:{width:k},onFocus:function(){q(!0)},onBlur:function(){q(!1)}},d.createElement(dM,{ref:l,open:o,prefixCls:n,id:r,inputElement:null,disabled:u,autoFocus:v,autoComplete:g,editable:ie,activeDescendantId:m,value:oe,onKeyDown:T,onMouseDown:N,onChange:x,onPaste:I,onCompositionStart:P,onCompositionEnd:_,onBlur:R,tabIndex:p,attrs:Zi(e,!0)}),d.createElement("span",{ref:M,className:"".concat(J,"-search-mirror"),"aria-hidden":!0},oe," ")),U=d.createElement(mo,{prefixCls:"".concat(J,"-overflow"),data:i,renderItem:K,renderRest:B,suffix:F,itemKey:G7,maxCount:b});return d.createElement("span",{className:"".concat(J,"-wrap")},U,!i.length&&!oe&&d.createElement("span",{className:"".concat(J,"-placeholder")},c))},Y7=function(e){var r=e.inputElement,n=e.prefixCls,i=e.id,o=e.inputRef,a=e.disabled,s=e.autoFocus,l=e.autoComplete,c=e.activeDescendantId,u=e.mode,f=e.open,h=e.values,v=e.placeholder,g=e.tabIndex,m=e.showSearch,p=e.searchValue,y=e.activeValue,b=e.maxLength,$=e.onInputKeyDown,S=e.onInputMouseDown,w=e.onInputChange,C=e.onInputPaste,E=e.onInputCompositionStart,O=e.onInputCompositionEnd,x=e.onInputBlur,I=e.title,T=d.useState(!1),N=le(T,2),P=N[0],_=N[1],R=u==="combobox",M=R||m,D=h[0],j=p||"";R&&y&&!P&&(j=y),d.useEffect(function(){R&&_(!1)},[R,y]);var k=u!=="combobox"&&!f&&!m?!1:!!j,V=I===void 0?hM(D):I,G=d.useMemo(function(){return D?null:d.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:k?{visibility:"hidden"}:void 0},v)},[D,k,v,n]);return d.createElement("span",{className:"".concat(n,"-selection-wrap")},d.createElement("span",{className:"".concat(n,"-selection-search")},d.createElement(dM,{ref:o,prefixCls:n,id:i,open:f,inputElement:r,disabled:a,autoFocus:s,autoComplete:l,editable:M,activeDescendantId:c,value:j,onKeyDown:$,onMouseDown:S,onChange:function(Y){_(!0),w(Y)},onPaste:C,onCompositionStart:E,onCompositionEnd:O,onBlur:x,tabIndex:g,attrs:Zi(e,!0),maxLength:R?b:void 0})),!R&&D?d.createElement("span",{className:"".concat(n,"-selection-item"),title:V,style:k?{visibility:"hidden"}:void 0},D.label):null,G)},J7=function(e,r){var n=d.useRef(null),i=d.useRef(!1),o=e.prefixCls,a=e.open,s=e.mode,l=e.showSearch,c=e.tokenWithEnter,u=e.disabled,f=e.prefix,h=e.autoClearSearchValue,v=e.onSearch,g=e.onSearchSubmit,m=e.onToggleOpen,p=e.onInputKeyDown,y=e.onInputBlur,b=e.domRef;d.useImperativeHandle(r,function(){return{focus:function(V){n.current.focus(V)},blur:function(){n.current.blur()}}});var $=sM(0),S=le($,2),w=S[0],C=S[1],E=function(V){var G=V.which,W=n.current instanceof HTMLTextAreaElement;!W&&a&&(G===Ze.UP||G===Ze.DOWN)&&V.preventDefault(),p&&p(V),G===Ze.ENTER&&s==="tags"&&!i.current&&!a&&g?.(V.target.value),!(W&&!a&&~[Ze.UP,Ze.DOWN,Ze.LEFT,Ze.RIGHT].indexOf(G))&&T7(G)&&m(!0)},O=function(){C(!0)},x=d.useRef(null),I=function(V){v(V,!0,i.current)!==!1&&m(!0)},T=function(){i.current=!0},N=function(V){i.current=!1,s!=="combobox"&&I(V.target.value)},P=function(V){var G=V.target.value;if(c&&x.current&&/[\r\n]/.test(x.current)){var W=x.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");G=G.replace(W,x.current)}x.current=null,I(G)},_=function(V){var G=V.clipboardData,W=G?.getData("text");x.current=W||""},R=function(V){var G=V.target;if(G!==n.current){var W=document.body.style.msTouchAction!==void 0;W?setTimeout(function(){n.current.focus()}):n.current.focus()}},M=function(V){var G=w();V.target!==n.current&&!G&&!(s==="combobox"&&u)&&V.preventDefault(),(s!=="combobox"&&(!l||!G)||!a)&&(a&&h!==!1&&v("",!0,!1),m())},D={inputRef:n,onInputKeyDown:E,onInputMouseDown:O,onInputChange:P,onInputPaste:_,onInputCompositionStart:T,onInputCompositionEnd:N,onInputBlur:y},j=s==="multiple"||s==="tags"?d.createElement(X7,Re({},e,D)):d.createElement(Y7,Re({},e,D));return d.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:R,onMouseDown:M},f&&d.createElement("div",{className:"".concat(o,"-prefix")},f),j)},Z7=d.forwardRef(J7);function Q7(t){var e=t.prefixCls,r=t.align,n=t.arrow,i=t.arrowPos,o=n||{},a=o.className,s=o.content,l=i.x,c=l===void 0?0:l,u=i.y,f=u===void 0?0:u,h=d.useRef();if(!r||!r.points)return null;var v={position:"absolute"};if(r.autoArrow!==!1){var g=r.points[0],m=r.points[1],p=g[0],y=g[1],b=m[0],$=m[1];p===b||!["t","b"].includes(p)?v.top=f:p==="t"?v.top=0:v.bottom=0,y===$||!["l","r"].includes(y)?v.left=c:y==="l"?v.left=0:v.right=0}return d.createElement("div",{ref:h,className:ae("".concat(e,"-arrow"),a),style:v},s)}function eW(t){var e=t.prefixCls,r=t.open,n=t.zIndex,i=t.mask,o=t.motion;return i?d.createElement(ka,Re({},o,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var s=a.className;return d.createElement("div",{style:{zIndex:n},className:ae("".concat(e,"-mask"),s)})}):null}var tW=d.memo(function(t){var e=t.children;return e},function(t,e){return e.cache}),rW=d.forwardRef(function(t,e){var r=t.popup,n=t.className,i=t.prefixCls,o=t.style,a=t.target,s=t.onVisibleChanged,l=t.open,c=t.keepDom,u=t.fresh,f=t.onClick,h=t.mask,v=t.arrow,g=t.arrowPos,m=t.align,p=t.motion,y=t.maskMotion,b=t.forceRender,$=t.getPopupContainer,S=t.autoDestroy,w=t.portal,C=t.zIndex,E=t.onMouseEnter,O=t.onMouseLeave,x=t.onPointerEnter,I=t.onPointerDownCapture,T=t.ready,N=t.offsetX,P=t.offsetY,_=t.offsetR,R=t.offsetB,M=t.onAlign,D=t.onPrepare,j=t.stretch,k=t.targetWidth,V=t.targetHeight,G=typeof r=="function"?r():r,W=l||c,Y=$?.length>0,q=d.useState(!$||!Y),J=le(q,2),oe=J[0],ie=J[1];if(Lt(function(){!oe&&Y&&a&&ie(!0)},[oe,Y,a]),!oe)return null;var te="auto",z={left:"-1000vw",top:"-1000vh",right:te,bottom:te};if(T||!l){var K,B=m.points,F=m.dynamicInset||((K=m._experimental)===null||K===void 0?void 0:K.dynamicInset),U=F&&B[0][1]==="r",Z=F&&B[0][0]==="b";U?(z.right=_,z.left=te):(z.left=N,z.right=te),Z?(z.bottom=R,z.top=te):(z.top=P,z.bottom=te)}var ee={};return j&&(j.includes("height")&&V?ee.height=V:j.includes("minHeight")&&V&&(ee.minHeight=V),j.includes("width")&&k?ee.width=k:j.includes("minWidth")&&k&&(ee.minWidth=k)),l||(ee.pointerEvents="none"),d.createElement(w,{open:b||W,getContainer:$&&function(){return $(a)},autoDestroy:S},d.createElement(eW,{prefixCls:i,open:l,zIndex:C,mask:h,motion:y}),d.createElement(ro,{onResize:M,disabled:!l},function(Q){return d.createElement(ka,Re({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:b,leavedClassName:"".concat(i,"-hidden")},p,{onAppearPrepare:D,onEnterPrepare:D,visible:l,onVisibleChanged:function(me){var Te;p==null||(Te=p.onVisibleChanged)===null||Te===void 0||Te.call(p,me),s(me)}}),function(ce,me){var Te=ce.className,_e=ce.style,ve=ae(i,Te,n);return d.createElement("div",{ref:mi(Q,e,me),className:ve,style:L(L(L(L({"--arrow-x":"".concat(g.x||0,"px"),"--arrow-y":"".concat(g.y||0,"px")},z),ee),_e),{},{boxSizing:"border-box",zIndex:C},o),onMouseEnter:E,onMouseLeave:O,onPointerEnter:x,onClick:f,onPointerDownCapture:I},v&&d.createElement(Q7,{prefixCls:i,arrow:v,arrowPos:g,align:m}),d.createElement(tW,{cache:!l&&!u},G))})}))}),nW=d.forwardRef(function(t,e){var r=t.children,n=t.getTriggerDOMNode,i=Yi(r),o=d.useCallback(function(s){ju(e,n?n(s):s)},[n]),a=Ns(o,ja(r));return i?d.cloneElement(r,{ref:a}):r}),Mx=d.createContext(null);function Dx(t){return t?Array.isArray(t)?t:[t]:[]}function iW(t,e,r,n){return d.useMemo(function(){var i=Dx(r??e),o=Dx(n??e),a=new Set(i),s=new Set(o);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[t,e,r,n])}function oW(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function aW(t,e,r,n){for(var i=r.points,o=Object.keys(t),a=0;a<o.length;a+=1){var s,l=o[a];if(oW((s=t[l])===null||s===void 0?void 0:s.points,i,n))return"".concat(e,"-placement-").concat(l)}return""}function Ax(t,e,r,n){return e||(r?{motionName:"".concat(t,"-").concat(r)}:n?{motionName:n}:null)}function Ed(t){return t.ownerDocument.defaultView}function q0(t){for(var e=[],r=t?.parentElement,n=["hidden","scroll","clip","auto"];r;){var i=Ed(r).getComputedStyle(r),o=i.overflowX,a=i.overflowY,s=i.overflow;[o,a,s].some(function(l){return n.includes(l)})&&e.push(r),r=r.parentElement}return e}function Xu(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(t)?e:t}function Jc(t){return Xu(parseFloat(t),0)}function jx(t,e){var r=L({},t);return(e||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var i=Ed(n).getComputedStyle(n),o=i.overflow,a=i.overflowClipMargin,s=i.borderTopWidth,l=i.borderBottomWidth,c=i.borderLeftWidth,u=i.borderRightWidth,f=n.getBoundingClientRect(),h=n.offsetHeight,v=n.clientHeight,g=n.offsetWidth,m=n.clientWidth,p=Jc(s),y=Jc(l),b=Jc(c),$=Jc(u),S=Xu(Math.round(f.width/g*1e3)/1e3),w=Xu(Math.round(f.height/h*1e3)/1e3),C=(g-m-b-$)*S,E=(h-v-p-y)*w,O=p*w,x=y*w,I=b*S,T=$*S,N=0,P=0;if(o==="clip"){var _=Jc(a);N=_*S,P=_*w}var R=f.x+I-N,M=f.y+O-P,D=R+f.width+2*N-I-T-C,j=M+f.height+2*P-O-x-E;r.left=Math.max(r.left,R),r.top=Math.max(r.top,M),r.right=Math.min(r.right,D),r.bottom=Math.min(r.bottom,j)}}),r}function kx(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(e),n=r.match(/^(.*)\%$/);return n?t*(parseFloat(n[1])/100):parseFloat(r)}function Bx(t,e){var r=e||[],n=le(r,2),i=n[0],o=n[1];return[kx(t.width,i),kx(t.height,o)]}function Fx(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[t[0],t[1]]}function Zs(t,e){var r=e[0],n=e[1],i,o;return r==="t"?o=t.y:r==="b"?o=t.y+t.height:o=t.y+t.height/2,n==="l"?i=t.x:n==="r"?i=t.x+t.width:i=t.x+t.width/2,{x:i,y:o}}function ra(t,e){var r={t:"b",b:"t",l:"r",r:"l"};return t.map(function(n,i){return i===e?r[n]||"c":n}).join("")}function sW(t,e,r,n,i,o,a){var s=d.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:i[n]||{}}),l=le(s,2),c=l[0],u=l[1],f=d.useRef(0),h=d.useMemo(function(){return e?q0(e):[]},[e]),v=d.useRef({}),g=function(){v.current={}};t||g();var m=sr(function(){if(e&&r&&t){let er=function(li,vn){var ci=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ne,ta=W.x+li,Rf=W.y+vn,Xg=ta+Z,Yg=Rf+U,ot=Math.max(ta,ci.left),Ct=Math.max(Rf,ci.top),vr=Math.min(Xg,ci.right),Mr=Math.min(Yg,ci.bottom);return Math.max(0,(vr-ot)*(Mr-Ct))},si=function(){Nt=W.y+Ye,kt=Nt+U,Bt=W.x+Ne,qt=Bt+Z};var b,$,S,w,C=e,E=C.ownerDocument,O=Ed(C),x=O.getComputedStyle(C),I=x.position,T=C.style.left,N=C.style.top,P=C.style.right,_=C.style.bottom,R=C.style.overflow,M=L(L({},i[n]),o),D=E.createElement("div");(b=C.parentElement)===null||b===void 0||b.appendChild(D),D.style.left="".concat(C.offsetLeft,"px"),D.style.top="".concat(C.offsetTop,"px"),D.style.position=I,D.style.height="".concat(C.offsetHeight,"px"),D.style.width="".concat(C.offsetWidth,"px"),C.style.left="0",C.style.top="0",C.style.right="auto",C.style.bottom="auto",C.style.overflow="hidden";var j;if(Array.isArray(r))j={x:r[0],y:r[1],width:0,height:0};else{var k,V,G=r.getBoundingClientRect();G.x=(k=G.x)!==null&&k!==void 0?k:G.left,G.y=(V=G.y)!==null&&V!==void 0?V:G.top,j={x:G.x,y:G.y,width:G.width,height:G.height}}var W=C.getBoundingClientRect(),Y=O.getComputedStyle(C),q=Y.height,J=Y.width;W.x=($=W.x)!==null&&$!==void 0?$:W.left,W.y=(S=W.y)!==null&&S!==void 0?S:W.top;var oe=E.documentElement,ie=oe.clientWidth,te=oe.clientHeight,z=oe.scrollWidth,K=oe.scrollHeight,B=oe.scrollTop,F=oe.scrollLeft,U=W.height,Z=W.width,ee=j.height,Q=j.width,ce={left:0,top:0,right:ie,bottom:te},me={left:-F,top:-B,right:z-F,bottom:K-B},Te=M.htmlRegion,_e="visible",ve="visibleFirst";Te!=="scroll"&&Te!==ve&&(Te=_e);var ye=Te===ve,xe=jx(me,h),ge=jx(ce,h),ne=Te===_e?ge:xe,X=ye?ge:ne;C.style.left="auto",C.style.top="auto",C.style.right="0",C.style.bottom="0";var fe=C.getBoundingClientRect();C.style.left=T,C.style.top=N,C.style.right=P,C.style.bottom=_,C.style.overflow=R,(w=C.parentElement)===null||w===void 0||w.removeChild(D);var pe=Xu(Math.round(Z/parseFloat(J)*1e3)/1e3),$e=Xu(Math.round(U/parseFloat(q)*1e3)/1e3);if(pe===0||$e===0||Au(r)&&!Cd(r))return;var Ee=M.offset,be=M.targetOffset,H=Bx(W,Ee),re=le(H,2),he=re[0],ue=re[1],we=Bx(j,be),Ie=le(we,2),Fe=Ie[0],qe=Ie[1];j.x-=Fe,j.y-=qe;var st=M.points||[],ft=le(st,2),et=ft[0],St=ft[1],Et=Fx(St),at=Fx(et),nt=Zs(j,Et),Le=Zs(W,at),ze=L({},M),Ne=nt.x-Le.x+he,Ye=nt.y-Le.y+ue,lt=er(Ne,Ye),De=er(Ne,Ye,ge),Me=Zs(j,["t","l"]),Qe=Zs(W,["t","l"]),Ge=Zs(j,["b","r"]),We=Zs(W,["b","r"]),it=M.overflow||{},Ue=it.adjustX,He=it.adjustY,rt=it.shiftX,ht=it.shiftY,_t=function(vn){return typeof vn=="boolean"?vn:vn>=0},Nt,kt,Bt,qt;si();var Vt=_t(He),Be=at[0]===Et[0];if(Vt&&at[0]==="t"&&(kt>X.bottom||v.current.bt)){var Ve=Ye;Be?Ve-=U-ee:Ve=Me.y-We.y-ue;var vt=er(Ne,Ve),It=er(Ne,Ve,ge);vt>lt||vt===lt&&(!ye||It>=De)?(v.current.bt=!0,Ye=Ve,ue=-ue,ze.points=[ra(at,0),ra(Et,0)]):v.current.bt=!1}if(Vt&&at[0]==="b"&&(Nt<X.top||v.current.tb)){var Pt=Ye;Be?Pt+=U-ee:Pt=Ge.y-Qe.y-ue;var br=er(Ne,Pt),Sr=er(Ne,Pt,ge);br>lt||br===lt&&(!ye||Sr>=De)?(v.current.tb=!0,Ye=Pt,ue=-ue,ze.points=[ra(at,0),ra(Et,0)]):v.current.tb=!1}var Cn=_t(Ue),ut=at[1]===Et[1];if(Cn&&at[1]==="l"&&(qt>X.right||v.current.rl)){var pt=Ne;ut?pt-=Z-Q:pt=Me.x-We.x-he;var Tt=er(pt,Ye),Nr=er(pt,Ye,ge);Tt>lt||Tt===lt&&(!ye||Nr>=De)?(v.current.rl=!0,Ne=pt,he=-he,ze.points=[ra(at,1),ra(Et,1)]):v.current.rl=!1}if(Cn&&at[1]==="r"&&(Bt<X.left||v.current.lr)){var zr=Ne;ut?zr+=Z-Q:zr=Ge.x-Qe.x-he;var Si=er(zr,Ye),Wn=er(zr,Ye,ge);Si>lt||Si===lt&&(!ye||Wn>=De)?(v.current.lr=!0,Ne=zr,he=-he,ze.points=[ra(at,1),ra(Et,1)]):v.current.lr=!1}si();var dn=rt===!0?0:rt;typeof dn=="number"&&(Bt<ge.left&&(Ne-=Bt-ge.left-he,j.x+Q<ge.left+dn&&(Ne+=j.x-ge.left+Q-dn)),qt>ge.right&&(Ne-=qt-ge.right-he,j.x>ge.right-dn&&(Ne+=j.x-ge.right+dn)));var Kn=ht===!0?0:ht;typeof Kn=="number"&&(Nt<ge.top&&(Ye-=Nt-ge.top-ue,j.y+ee<ge.top+Kn&&(Ye+=j.y-ge.top+ee-Kn)),kt>ge.bottom&&(Ye-=kt-ge.bottom-ue,j.y>ge.bottom-Kn&&(Ye+=j.y-ge.bottom+Kn)));var Nn=W.x+Ne,fn=Nn+Z,Un=W.y+Ye,Kt=Un+U,Je=j.x,Xe=Je+Q,Ft=j.y,Wt=Ft+ee,Qt=Math.max(Nn,Je),or=Math.min(fn,Xe),Zr=(Qt+or)/2,Hr=Zr-Nn,Qr=Math.max(Un,Ft),en=Math.min(Kt,Wt),hn=(Qr+en)/2,$t=hn-Un;a?.(e,ze);var gt=fe.right-W.x-(Ne+W.width),$r=fe.bottom-W.y-(Ye+W.height);pe===1&&(Ne=Math.round(Ne),gt=Math.round(gt)),$e===1&&(Ye=Math.round(Ye),$r=Math.round($r));var xn={ready:!0,offsetX:Ne/pe,offsetY:Ye/$e,offsetR:gt/pe,offsetB:$r/$e,arrowX:Hr/pe,arrowY:$t/$e,scaleX:pe,scaleY:$e,align:ze};u(xn)}}),p=function(){f.current+=1;var $=f.current;Promise.resolve().then(function(){f.current===$&&m()})},y=function(){u(function($){return L(L({},$),{},{ready:!1})})};return Lt(y,[n]),Lt(function(){t||y()},[t]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,p]}function lW(t,e,r,n,i){Lt(function(){if(t&&e&&r){let f=function(){n(),i()};var o=e,a=r,s=q0(o),l=q0(a),c=Ed(a),u=new Set([c].concat(Oe(s),Oe(l)));return u.forEach(function(h){h.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),n(),function(){u.forEach(function(h){h.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[t,e,r])}function cW(t,e,r,n,i,o,a,s){var l=d.useRef(t);l.current=t;var c=d.useRef(!1);d.useEffect(function(){if(e&&n&&(!i||o)){var f=function(){c.current=!1},h=function(p){var y;l.current&&!a(((y=p.composedPath)===null||y===void 0||(y=y.call(p))===null||y===void 0?void 0:y[0])||p.target)&&!c.current&&s(!1)},v=Ed(n);v.addEventListener("pointerdown",f,!0),v.addEventListener("mousedown",h,!0),v.addEventListener("contextmenu",h,!0);var g=wv(r);return g&&(g.addEventListener("mousedown",h,!0),g.addEventListener("contextmenu",h,!0)),function(){v.removeEventListener("pointerdown",f,!0),v.removeEventListener("mousedown",h,!0),v.removeEventListener("contextmenu",h,!0),g&&(g.removeEventListener("mousedown",h,!0),g.removeEventListener("contextmenu",h,!0))}}},[e,r,n,i,o]);function u(){c.current=!0}return u}var uW=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function dW(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:KN,e=d.forwardRef(function(r,n){var i=r.prefixCls,o=i===void 0?"rc-trigger-popup":i,a=r.children,s=r.action,l=s===void 0?"hover":s,c=r.showAction,u=r.hideAction,f=r.popupVisible,h=r.defaultPopupVisible,v=r.onPopupVisibleChange,g=r.afterPopupVisibleChange,m=r.mouseEnterDelay,p=r.mouseLeaveDelay,y=p===void 0?.1:p,b=r.focusDelay,$=r.blurDelay,S=r.mask,w=r.maskClosable,C=w===void 0?!0:w,E=r.getPopupContainer,O=r.forceRender,x=r.autoDestroy,I=r.destroyPopupOnHide,T=r.popup,N=r.popupClassName,P=r.popupStyle,_=r.popupPlacement,R=r.builtinPlacements,M=R===void 0?{}:R,D=r.popupAlign,j=r.zIndex,k=r.stretch,V=r.getPopupClassNameFromAlign,G=r.fresh,W=r.alignPoint,Y=r.onPopupClick,q=r.onPopupAlign,J=r.arrow,oe=r.popupMotion,ie=r.maskMotion,te=r.popupTransitionName,z=r.popupAnimation,K=r.maskTransitionName,B=r.maskAnimation,F=r.className,U=r.getTriggerDOMNode,Z=mt(r,uW),ee=x||I||!1,Q=d.useState(!1),ce=le(Q,2),me=ce[0],Te=ce[1];Lt(function(){Te(oM())},[]);var _e=d.useRef({}),ve=d.useContext(Mx),ye=d.useMemo(function(){return{registerSubPopup:function(Ct,vr){_e.current[Ct]=vr,ve?.registerSubPopup(Ct,vr)}}},[ve]),xe=rw(),ge=d.useState(null),ne=le(ge,2),X=ne[0],fe=ne[1],pe=d.useRef(null),$e=sr(function(ot){pe.current=ot,Au(ot)&&X!==ot&&fe(ot),ve?.registerSubPopup(xe,ot)}),Ee=d.useState(null),be=le(Ee,2),H=be[0],re=be[1],he=d.useRef(null),ue=sr(function(ot){Au(ot)&&H!==ot&&(re(ot),he.current=ot)}),we=d.Children.only(a),Ie=we?.props||{},Fe={},qe=sr(function(ot){var Ct,vr,Mr=H;return Mr?.contains(ot)||((Ct=wv(Mr))===null||Ct===void 0?void 0:Ct.host)===ot||ot===Mr||X?.contains(ot)||((vr=wv(X))===null||vr===void 0?void 0:vr.host)===ot||ot===X||Object.values(_e.current).some(function(Cr){return Cr?.contains(ot)||ot===Cr})}),st=Ax(o,oe,z,te),ft=Ax(o,ie,B,K),et=d.useState(h||!1),St=le(et,2),Et=St[0],at=St[1],nt=f??Et,Le=sr(function(ot){f===void 0&&at(ot)});Lt(function(){at(f||!1)},[f]);var ze=d.useRef(nt);ze.current=nt;var Ne=d.useRef([]);Ne.current=[];var Ye=sr(function(ot){var Ct;Le(ot),((Ct=Ne.current[Ne.current.length-1])!==null&&Ct!==void 0?Ct:nt)!==ot&&(Ne.current.push(ot),v?.(ot))}),lt=d.useRef(),De=function(){clearTimeout(lt.current)},Me=function(Ct){var vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;De(),vr===0?Ye(Ct):lt.current=setTimeout(function(){Ye(Ct)},vr*1e3)};d.useEffect(function(){return De},[]);var Qe=d.useState(!1),Ge=le(Qe,2),We=Ge[0],it=Ge[1];Lt(function(ot){(!ot||nt)&&it(!0)},[nt]);var Ue=d.useState(null),He=le(Ue,2),rt=He[0],ht=He[1],_t=d.useState(null),Nt=le(_t,2),kt=Nt[0],Bt=Nt[1],qt=function(Ct){Bt([Ct.clientX,Ct.clientY])},Vt=sW(nt,X,W&&kt!==null?kt:H,_,M,D,q),Be=le(Vt,11),Ve=Be[0],vt=Be[1],It=Be[2],Pt=Be[3],br=Be[4],Sr=Be[5],Cn=Be[6],ut=Be[7],pt=Be[8],Tt=Be[9],Nr=Be[10],zr=iW(me,l,c,u),Si=le(zr,2),Wn=Si[0],dn=Si[1],Kn=Wn.has("click"),Nn=dn.has("click")||dn.has("contextMenu"),fn=sr(function(){We||Nr()}),Un=function(){ze.current&&W&&Nn&&Me(!1)};lW(nt,H,X,fn,Un),Lt(function(){fn()},[kt,_]),Lt(function(){nt&&!(M!=null&&M[_])&&fn()},[JSON.stringify(D)]);var Kt=d.useMemo(function(){var ot=aW(M,o,Tt,W);return ae(ot,V?.(Tt))},[Tt,V,M,o,W]);d.useImperativeHandle(n,function(){return{nativeElement:he.current,popupElement:pe.current,forceAlign:fn}});var Je=d.useState(0),Xe=le(Je,2),Ft=Xe[0],Wt=Xe[1],Qt=d.useState(0),or=le(Qt,2),Zr=or[0],Hr=or[1],Qr=function(){if(k&&H){var Ct=H.getBoundingClientRect();Wt(Ct.width),Hr(Ct.height)}},en=function(){Qr(),fn()},hn=function(Ct){it(!1),Nr(),g?.(Ct)},$t=function(){return new Promise(function(Ct){Qr(),ht(function(){return Ct})})};Lt(function(){rt&&(Nr(),rt(),ht(null))},[rt]);function gt(ot,Ct,vr,Mr){Fe[ot]=function(Cr){var Nf;Mr?.(Cr),Me(Ct,vr);for(var Jg=arguments.length,hC=new Array(Jg>1?Jg-1:0),Mf=1;Mf<Jg;Mf++)hC[Mf-1]=arguments[Mf];(Nf=Ie[ot])===null||Nf===void 0||Nf.call.apply(Nf,[Ie,Cr].concat(hC))}}(Kn||Nn)&&(Fe.onClick=function(ot){var Ct;ze.current&&Nn?Me(!1):!ze.current&&Kn&&(qt(ot),Me(!0));for(var vr=arguments.length,Mr=new Array(vr>1?vr-1:0),Cr=1;Cr<vr;Cr++)Mr[Cr-1]=arguments[Cr];(Ct=Ie.onClick)===null||Ct===void 0||Ct.call.apply(Ct,[Ie,ot].concat(Mr))});var $r=cW(nt,Nn,H,X,S,C,qe,Me),xn=Wn.has("hover"),er=dn.has("hover"),si,li;xn&&(gt("onMouseEnter",!0,m,function(ot){qt(ot)}),gt("onPointerEnter",!0,m,function(ot){qt(ot)}),si=function(Ct){(nt||We)&&X!==null&&X!==void 0&&X.contains(Ct.target)&&Me(!0,m)},W&&(Fe.onMouseMove=function(ot){var Ct;(Ct=Ie.onMouseMove)===null||Ct===void 0||Ct.call(Ie,ot)})),er&&(gt("onMouseLeave",!1,y),gt("onPointerLeave",!1,y),li=function(){Me(!1,y)}),Wn.has("focus")&&gt("onFocus",!0,b),dn.has("focus")&&gt("onBlur",!1,$),Wn.has("contextMenu")&&(Fe.onContextMenu=function(ot){var Ct;ze.current&&dn.has("contextMenu")?Me(!1):(qt(ot),Me(!0)),ot.preventDefault();for(var vr=arguments.length,Mr=new Array(vr>1?vr-1:0),Cr=1;Cr<vr;Cr++)Mr[Cr-1]=arguments[Cr];(Ct=Ie.onContextMenu)===null||Ct===void 0||Ct.call.apply(Ct,[Ie,ot].concat(Mr))}),F&&(Fe.className=ae(Ie.className,F));var vn=L(L({},Ie),Fe),ci={},ta=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];ta.forEach(function(ot){Z[ot]&&(ci[ot]=function(){for(var Ct,vr=arguments.length,Mr=new Array(vr),Cr=0;Cr<vr;Cr++)Mr[Cr]=arguments[Cr];(Ct=vn[ot])===null||Ct===void 0||Ct.call.apply(Ct,[vn].concat(Mr)),Z[ot].apply(Z,Mr)})});var Rf=d.cloneElement(we,L(L({},vn),ci)),Xg={x:Sr,y:Cn},Yg=J?L({},J!==!0?J:{}):null;return d.createElement(d.Fragment,null,d.createElement(ro,{disabled:!nt,ref:ue,onResize:en},d.createElement(nW,{getTriggerDOMNode:U},Rf)),d.createElement(Mx.Provider,{value:ye},d.createElement(rW,{portal:t,ref:$e,prefixCls:o,popup:T,className:ae(N,Kt),style:P,target:H,onMouseEnter:si,onMouseLeave:li,onPointerEnter:si,zIndex:j,open:nt,keepDom:We,fresh:G,onClick:Y,onPointerDownCapture:$r,mask:S,motion:st,maskMotion:ft,onVisibleChanged:hn,onPrepare:$t,forceRender:O,autoDestroy:ee,getPopupContainer:E,align:Tt,arrow:Yg,arrowPos:Xg,ready:Ve,offsetX:vt,offsetY:It,offsetR:Pt,offsetB:br,onAlign:fn,stretch:k,targetWidth:Ft/ut,targetHeight:Zr/pt})))});return e}const kp=dW(KN);var fW=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],hW=function(e){var r=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:r,adjustY:1},htmlRegion:"scroll"}}},vW=function(e,r){var n=e.prefixCls;e.disabled;var i=e.visible,o=e.children,a=e.popupElement,s=e.animation,l=e.transitionName,c=e.dropdownStyle,u=e.dropdownClassName,f=e.direction,h=f===void 0?"ltr":f,v=e.placement,g=e.builtinPlacements,m=e.dropdownMatchSelectWidth,p=e.dropdownRender,y=e.dropdownAlign,b=e.getPopupContainer,$=e.empty,S=e.getTriggerDOMNode,w=e.onPopupVisibleChange,C=e.onPopupMouseEnter,E=mt(e,fW),O="".concat(n,"-dropdown"),x=a;p&&(x=p(a));var I=d.useMemo(function(){return g||hW(m)},[g,m]),T=s?"".concat(O,"-").concat(s):l,N=typeof m=="number",P=d.useMemo(function(){return N?null:m===!1?"minWidth":"width"},[m,N]),_=c;N&&(_=L(L({},_),{},{width:m}));var R=d.useRef(null);return d.useImperativeHandle(r,function(){return{getPopupElement:function(){var D;return(D=R.current)===null||D===void 0?void 0:D.popupElement}}}),d.createElement(kp,Re({},E,{showAction:w?["click"]:[],hideAction:w?["click"]:[],popupPlacement:v||(h==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:I,prefixCls:O,popupTransitionName:T,popup:d.createElement("div",{onMouseEnter:C},x),ref:R,stretch:P,popupAlign:y,popupVisible:i,getPopupContainer:b,popupClassName:ae(u,A({},"".concat(O,"-empty"),$)),popupStyle:_,getTriggerDOMNode:S,onPopupVisibleChange:w}),o)},pW=d.forwardRef(vW);function Lx(t,e){var r=t.key,n;return"value"in t&&(n=t.value),r??(n!==void 0?n:"rc-index-key-".concat(e))}function G0(t){return typeof t<"u"&&!Number.isNaN(t)}function vM(t,e){var r=t||{},n=r.label,i=r.value,o=r.options,a=r.groupLabel,s=n||(e?"children":"label");return{label:s,value:i||"value",options:o||"options",groupLabel:a||s}}function gW(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.fieldNames,n=e.childrenAsData,i=[],o=vM(r,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(f,h){Array.isArray(f)&&f.forEach(function(v){if(h||!(l in v)){var g=v[s];i.push({key:Lx(v,i.length),groupOption:h,data:v,label:v[a],value:g})}else{var m=v[c];m===void 0&&n&&(m=v.label),i.push({key:Lx(v,i.length),group:!0,data:v,label:m}),u(v[l],!0)}})}return u(t,!1),i}function X0(t){var e=L({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return gr(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var mW=function(e,r,n){if(!r||!r.length)return null;var i=!1,o=function s(l,c){var u=QR(c),f=u[0],h=u.slice(1);if(!f)return[l];var v=l.split(f);return i=i||v.length>1,v.reduce(function(g,m){return[].concat(Oe(g),Oe(s(m,h)))},[]).filter(Boolean)},a=o(e,r);return i?typeof n<"u"?a.slice(0,n):a:null},sw=d.createContext(null);function yW(t){var e=t.visible,r=t.values;if(!e)return null;var n=50;return d.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,n).map(function(i){var o=i.label,a=i.value;return["number","string"].includes(tt(o))?o:a}).join(", ")),r.length>n?", ...":null)}var bW=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],$W=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Y0=function(e){return e==="tags"||e==="multiple"},wW=d.forwardRef(function(t,e){var r,n=t.id,i=t.prefixCls,o=t.className,a=t.showSearch,s=t.tagRender,l=t.direction,c=t.omitDomProps,u=t.displayValues,f=t.onDisplayValuesChange,h=t.emptyOptions,v=t.notFoundContent,g=v===void 0?"Not Found":v,m=t.onClear,p=t.mode,y=t.disabled,b=t.loading,$=t.getInputElement,S=t.getRawInputElement,w=t.open,C=t.defaultOpen,E=t.onDropdownVisibleChange,O=t.activeValue,x=t.onActiveValueChange,I=t.activeDescendantId,T=t.searchValue,N=t.autoClearSearchValue,P=t.onSearch,_=t.onSearchSplit,R=t.tokenSeparators,M=t.allowClear,D=t.prefix,j=t.suffixIcon,k=t.clearIcon,V=t.OptionList,G=t.animation,W=t.transitionName,Y=t.dropdownStyle,q=t.dropdownClassName,J=t.dropdownMatchSelectWidth,oe=t.dropdownRender,ie=t.dropdownAlign,te=t.placement,z=t.builtinPlacements,K=t.getPopupContainer,B=t.showAction,F=B===void 0?[]:B,U=t.onFocus,Z=t.onBlur,ee=t.onKeyUp,Q=t.onKeyDown,ce=t.onMouseDown,me=mt(t,bW),Te=Y0(p),_e=(a!==void 0?a:Te)||p==="combobox",ve=L({},me);$W.forEach(function(Je){delete ve[Je]}),c?.forEach(function(Je){delete ve[Je]});var ye=d.useState(!1),xe=le(ye,2),ge=xe[0],ne=xe[1];d.useEffect(function(){ne(oM())},[]);var X=d.useRef(null),fe=d.useRef(null),pe=d.useRef(null),$e=d.useRef(null),Ee=d.useRef(null),be=d.useRef(!1),H=O7(),re=le(H,3),he=re[0],ue=re[1],we=re[2];d.useImperativeHandle(e,function(){var Je,Xe;return{focus:(Je=$e.current)===null||Je===void 0?void 0:Je.focus,blur:(Xe=$e.current)===null||Xe===void 0?void 0:Xe.blur,scrollTo:function(Wt){var Qt;return(Qt=Ee.current)===null||Qt===void 0?void 0:Qt.scrollTo(Wt)},nativeElement:X.current||fe.current}});var Ie=d.useMemo(function(){var Je;if(p!=="combobox")return T;var Xe=(Je=u[0])===null||Je===void 0?void 0:Je.value;return typeof Xe=="string"||typeof Xe=="number"?String(Xe):""},[T,p,u]),Fe=p==="combobox"&&typeof $=="function"&&$()||null,qe=typeof S=="function"&&S(),st=Ns(fe,qe==null||(r=qe.props)===null||r===void 0?void 0:r.ref),ft=d.useState(!1),et=le(ft,2),St=et[0],Et=et[1];Lt(function(){Et(!0)},[]);var at=ln(!1,{defaultValue:C,value:w}),nt=le(at,2),Le=nt[0],ze=nt[1],Ne=St?Le:!1,Ye=!g&&h;(y||Ye&&Ne&&p==="combobox")&&(Ne=!1);var lt=Ye?!1:Ne,De=d.useCallback(function(Je){var Xe=Je!==void 0?Je:!Ne;y||(ze(Xe),Ne!==Xe&&E?.(Xe))},[y,Ne,ze,E]),Me=d.useMemo(function(){return(R||[]).some(function(Je){return[`
`,`\r
`].includes(Je)})},[R]),Qe=d.useContext(sw)||{},Ge=Qe.maxCount,We=Qe.rawValues,it=function(Xe,Ft,Wt){if(!(Te&&G0(Ge)&&We?.size>=Ge)){var Qt=!0,or=Xe;x?.(null);var Zr=mW(Xe,R,G0(Ge)?Ge-We.size:void 0),Hr=Wt?null:Zr;return p!=="combobox"&&Hr&&(or="",_?.(Hr),De(!1),Qt=!1),P&&Ie!==or&&P(or,{source:Ft?"typing":"effect"}),Qt}},Ue=function(Xe){!Xe||!Xe.trim()||P(Xe,{source:"submit"})};d.useEffect(function(){!Ne&&!Te&&p!=="combobox"&&it("",!1,!1)},[Ne]),d.useEffect(function(){Le&&y&&ze(!1),y&&!be.current&&ue(!1)},[y]);var He=sM(),rt=le(He,2),ht=rt[0],_t=rt[1],Nt=d.useRef(!1),kt=function(Xe){var Ft=ht(),Wt=Xe.key,Qt=Wt==="Enter";if(Qt&&(p!=="combobox"&&Xe.preventDefault(),Ne||De(!0)),_t(!!Ie),Wt==="Backspace"&&!Ft&&Te&&!Ie&&u.length){for(var or=Oe(u),Zr=null,Hr=or.length-1;Hr>=0;Hr-=1){var Qr=or[Hr];if(!Qr.disabled){or.splice(Hr,1),Zr=Qr;break}}Zr&&f(or,{type:"remove",values:[Zr]})}for(var en=arguments.length,hn=new Array(en>1?en-1:0),$t=1;$t<en;$t++)hn[$t-1]=arguments[$t];if(Ne&&(!Qt||!Nt.current)){var gt;Qt&&(Nt.current=!0),(gt=Ee.current)===null||gt===void 0||gt.onKeyDown.apply(gt,[Xe].concat(hn))}Q?.apply(void 0,[Xe].concat(hn))},Bt=function(Xe){for(var Ft=arguments.length,Wt=new Array(Ft>1?Ft-1:0),Qt=1;Qt<Ft;Qt++)Wt[Qt-1]=arguments[Qt];if(Ne){var or;(or=Ee.current)===null||or===void 0||or.onKeyUp.apply(or,[Xe].concat(Wt))}Xe.key==="Enter"&&(Nt.current=!1),ee?.apply(void 0,[Xe].concat(Wt))},qt=function(Xe){var Ft=u.filter(function(Wt){return Wt!==Xe});f(Ft,{type:"remove",values:[Xe]})},Vt=function(){Nt.current=!1},Be=d.useRef(!1),Ve=function(){ue(!0),y||(U&&!Be.current&&U.apply(void 0,arguments),F.includes("focus")&&De(!0)),Be.current=!0},vt=function(){be.current=!0,ue(!1,function(){Be.current=!1,be.current=!1,De(!1)}),!y&&(Ie&&(p==="tags"?P(Ie,{source:"submit"}):p==="multiple"&&P("",{source:"blur"})),Z&&Z.apply(void 0,arguments))},It=[];d.useEffect(function(){return function(){It.forEach(function(Je){return clearTimeout(Je)}),It.splice(0,It.length)}},[]);var Pt=function(Xe){var Ft,Wt=Xe.target,Qt=(Ft=pe.current)===null||Ft===void 0?void 0:Ft.getPopupElement();if(Qt&&Qt.contains(Wt)){var or=setTimeout(function(){var en=It.indexOf(or);if(en!==-1&&It.splice(en,1),we(),!ge&&!Qt.contains(document.activeElement)){var hn;(hn=$e.current)===null||hn===void 0||hn.focus()}});It.push(or)}for(var Zr=arguments.length,Hr=new Array(Zr>1?Zr-1:0),Qr=1;Qr<Zr;Qr++)Hr[Qr-1]=arguments[Qr];ce?.apply(void 0,[Xe].concat(Hr))},br=d.useState({}),Sr=le(br,2),Cn=Sr[1];function ut(){Cn({})}var pt;qe&&(pt=function(Xe){De(Xe)}),I7(function(){var Je;return[X.current,(Je=pe.current)===null||Je===void 0?void 0:Je.getPopupElement()]},lt,De,!!qe);var Tt=d.useMemo(function(){return L(L({},t),{},{notFoundContent:g,open:Ne,triggerOpen:lt,id:n,showSearch:_e,multiple:Te,toggleOpen:De})},[t,g,lt,Ne,n,_e,Te,De]),Nr=!!j||b,zr;Nr&&(zr=d.createElement(jp,{className:ae("".concat(i,"-arrow"),A({},"".concat(i,"-arrow-loading"),b)),customizeIcon:j,customizeIconProps:{loading:b,searchValue:Ie,open:Ne,focused:he,showSearch:_e}}));var Si=function(){var Xe;m?.(),(Xe=$e.current)===null||Xe===void 0||Xe.focus(),f([],{type:"clear",values:u}),it("",!1,!1)},Wn=x7(i,Si,u,M,k,y,Ie,p),dn=Wn.allowClear,Kn=Wn.clearIcon,Nn=d.createElement(V,{ref:Ee}),fn=ae(i,o,A(A(A(A(A(A(A(A(A(A({},"".concat(i,"-focused"),he),"".concat(i,"-multiple"),Te),"".concat(i,"-single"),!Te),"".concat(i,"-allow-clear"),M),"".concat(i,"-show-arrow"),Nr),"".concat(i,"-disabled"),y),"".concat(i,"-loading"),b),"".concat(i,"-open"),Ne),"".concat(i,"-customize-input"),Fe),"".concat(i,"-show-search"),_e)),Un=d.createElement(pW,{ref:pe,disabled:y,prefixCls:i,visible:lt,popupElement:Nn,animation:G,transitionName:W,dropdownStyle:Y,dropdownClassName:q,direction:l,dropdownMatchSelectWidth:J,dropdownRender:oe,dropdownAlign:ie,placement:te,builtinPlacements:z,getPopupContainer:K,empty:h,getTriggerDOMNode:function(Xe){return fe.current||Xe},onPopupVisibleChange:pt,onPopupMouseEnter:ut},qe?d.cloneElement(qe,{ref:st}):d.createElement(Z7,Re({},t,{domRef:fe,prefixCls:i,inputElement:Fe,ref:$e,id:n,prefix:D,showSearch:_e,autoClearSearchValue:N,mode:p,activeDescendantId:I,tagRender:s,values:u,open:Ne,onToggleOpen:De,activeValue:O,searchValue:Ie,onSearch:it,onSearchSubmit:Ue,onRemove:qt,tokenWithEnter:Me,onInputBlur:Vt}))),Kt;return qe?Kt=Un:Kt=d.createElement("div",Re({className:fn},ve,{ref:X,onMouseDown:Pt,onKeyDown:kt,onKeyUp:Bt,onFocus:Ve,onBlur:vt}),d.createElement(yW,{visible:he&&!Ne,values:u}),Un,zr,dn&&Kn),d.createElement(aM.Provider,{value:Tt},Kt)}),lw=function(){return null};lw.isSelectOptGroup=!0;var cw=function(){return null};cw.isSelectOption=!0;var pM=d.forwardRef(function(t,e){var r=t.height,n=t.offsetY,i=t.offsetX,o=t.children,a=t.prefixCls,s=t.onInnerResize,l=t.innerProps,c=t.rtl,u=t.extra,f={},h={display:"flex",flexDirection:"column"};return n!==void 0&&(f={height:r,position:"relative",overflow:"hidden"},h=L(L({},h),{},A(A(A(A(A({transform:"translateY(".concat(n,"px)")},c?"marginRight":"marginLeft",-i),"position","absolute"),"left",0),"right",0),"top",0))),d.createElement("div",{style:f},d.createElement(ro,{onResize:function(g){var m=g.offsetHeight;m&&s&&s()}},d.createElement("div",Re({style:h,className:ae(A({},"".concat(a,"-holder-inner"),a)),ref:e},l),o,u)))});pM.displayName="Filler";function SW(t){var e=t.children,r=t.setRef,n=d.useCallback(function(i){r(i)},[]);return d.cloneElement(e,{ref:n})}function CW(t,e,r,n,i,o,a,s){var l=s.getKey;return t.slice(e,r+1).map(function(c,u){var f=e+u,h=a(c,f,{style:{width:n},offsetX:i}),v=l(c);return d.createElement(SW,{key:v,setRef:function(m){return o(c,m)}},h)})}function xW(t,e,r){var n=t.length,i=e.length,o,a;if(n===0&&i===0)return null;n<i?(o=t,a=e):(o=e,a=t);var s={__EMPTY_ITEM__:!0};function l(g){return g!==void 0?r(g):s}for(var c=null,u=Math.abs(n-i)!==1,f=0;f<a.length;f+=1){var h=l(o[f]),v=l(a[f]);if(h!==v){c=f,u=u||h!==l(a[f+1]);break}}return c===null?null:{index:c,multiple:u}}function EW(t,e,r){var n=d.useState(t),i=le(n,2),o=i[0],a=i[1],s=d.useState(null),l=le(s,2),c=l[0],u=l[1];return d.useEffect(function(){var f=xW(o||[],t||[],e);f?.index!==void 0&&u(t[f.index]),a(t)},[t]),[c]}var zx=(typeof navigator>"u"?"undefined":tt(navigator))==="object"&&/Firefox/i.test(navigator.userAgent);const gM=function(t,e,r,n){var i=d.useRef(!1),o=d.useRef(null);function a(){clearTimeout(o.current),i.current=!0,o.current=setTimeout(function(){i.current=!1},50)}var s=d.useRef({top:t,bottom:e,left:r,right:n});return s.current.top=t,s.current.bottom=e,s.current.left=r,s.current.right=n,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&f?(clearTimeout(o.current),i.current=!1):(!f||i.current)&&a(),!i.current&&f}};function OW(t,e,r,n,i,o,a){var s=d.useRef(0),l=d.useRef(null),c=d.useRef(null),u=d.useRef(!1),f=gM(e,r,n,i);function h(b,$){if(Ht.cancel(l.current),!f(!1,$)){var S=b;if(!S._virtualHandled)S._virtualHandled=!0;else return;s.current+=$,c.current=$,zx||S.preventDefault(),l.current=Ht(function(){var w=u.current?10:1;a(s.current*w,!1),s.current=0})}}function v(b,$){a($,!0),zx||b.preventDefault()}var g=d.useRef(null),m=d.useRef(null);function p(b){if(t){Ht.cancel(m.current),m.current=Ht(function(){g.current=null},2);var $=b.deltaX,S=b.deltaY,w=b.shiftKey,C=$,E=S;(g.current==="sx"||!g.current&&w&&S&&!$)&&(C=S,E=0,g.current="sx");var O=Math.abs(C),x=Math.abs(E);g.current===null&&(g.current=o&&O>x?"x":"y"),g.current==="y"?h(b,E):v(b,C)}}function y(b){t&&(u.current=b.detail===c.current)}return[p,y]}function IW(t,e,r,n){var i=d.useMemo(function(){return[new Map,[]]},[t,r.id,n]),o=le(i,2),a=o[0],s=o[1],l=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,h=a.get(u),v=a.get(f);if(h===void 0||v===void 0)for(var g=t.length,m=s.length;m<g;m+=1){var p,y=t[m],b=e(y);a.set(b,m);var $=(p=r.get(b))!==null&&p!==void 0?p:n;if(s[m]=(s[m-1]||0)+$,b===u&&(h=m),b===f&&(v=m),h!==void 0&&v!==void 0)break}return{top:s[h-1]||0,bottom:s[v]}};return l}var TW=function(){function t(){kr(this,t),A(this,"maps",void 0),A(this,"id",0),A(this,"diffRecords",new Map),this.maps=Object.create(null)}return Br(t,[{key:"set",value:function(r,n){this.diffRecords.set(r,this.maps[r]),this.maps[r]=n,this.id+=1}},{key:"get",value:function(r){return this.maps[r]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function Hx(t){var e=parseFloat(t);return isNaN(e)?0:e}function _W(t,e,r){var n=d.useState(0),i=le(n,2),o=i[0],a=i[1],s=d.useRef(new Map),l=d.useRef(new TW),c=d.useRef(0);function u(){c.current+=1}function f(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;u();var g=function(){var y=!1;s.current.forEach(function(b,$){if(b&&b.offsetParent){var S=b.offsetHeight,w=getComputedStyle(b),C=w.marginTop,E=w.marginBottom,O=Hx(C),x=Hx(E),I=S+O+x;l.current.get($)!==I&&(l.current.set($,I),y=!0)}}),y&&a(function(b){return b+1})};if(v)g();else{c.current+=1;var m=c.current;Promise.resolve().then(function(){m===c.current&&g()})}}function h(v,g){var m=t(v);s.current.get(m),g?(s.current.set(m,g),f()):s.current.delete(m)}return d.useEffect(function(){return u},[]),[h,f,l.current,o]}var Vx=14/15;function PW(t,e,r){var n=d.useRef(!1),i=d.useRef(0),o=d.useRef(0),a=d.useRef(null),s=d.useRef(null),l,c=function(v){if(n.current){var g=Math.ceil(v.touches[0].pageX),m=Math.ceil(v.touches[0].pageY),p=i.current-g,y=o.current-m,b=Math.abs(p)>Math.abs(y);b?i.current=g:o.current=m;var $=r(b,b?p:y,!1,v);$&&v.preventDefault(),clearInterval(s.current),$&&(s.current=setInterval(function(){b?p*=Vx:y*=Vx;var S=Math.floor(b?p:y);(!r(b,S,!0)||Math.abs(S)<=.1)&&clearInterval(s.current)},16))}},u=function(){n.current=!1,l()},f=function(v){l(),v.touches.length===1&&!n.current&&(n.current=!0,i.current=Math.ceil(v.touches[0].pageX),o.current=Math.ceil(v.touches[0].pageY),a.current=v.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},Lt(function(){return t&&e.current.addEventListener("touchstart",f,{passive:!0}),function(){var h;(h=e.current)===null||h===void 0||h.removeEventListener("touchstart",f),l(),clearInterval(s.current)}},[t])}function Wx(t){return Math.floor(Math.pow(t,.5))}function J0(t,e){var r="touches"in t?t.touches[0]:t;return r[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}function RW(t,e,r){d.useEffect(function(){var n=e.current;if(t&&n){var i=!1,o,a,s=function(){Ht.cancel(o)},l=function h(){s(),o=Ht(function(){r(a),h()})},c=function(v){if(!(v.target.draggable||v.button!==0)){var g=v;g._virtualHandled||(g._virtualHandled=!0,i=!0)}},u=function(){i=!1,s()},f=function(v){if(i){var g=J0(v,!1),m=n.getBoundingClientRect(),p=m.top,y=m.bottom;if(g<=p){var b=p-g;a=-Wx(b),l()}else if(g>=y){var $=g-y;a=Wx($),l()}else s()}};return n.addEventListener("mousedown",c),n.ownerDocument.addEventListener("mouseup",u),n.ownerDocument.addEventListener("mousemove",f),function(){n.removeEventListener("mousedown",c),n.ownerDocument.removeEventListener("mouseup",u),n.ownerDocument.removeEventListener("mousemove",f),s()}}},[t])}var NW=10;function MW(t,e,r,n,i,o,a,s){var l=d.useRef(),c=d.useState(null),u=le(c,2),f=u[0],h=u[1];return Lt(function(){if(f&&f.times<NW){if(!t.current){h(function(k){return L({},k)});return}o();var v=f.targetAlign,g=f.originAlign,m=f.index,p=f.offset,y=t.current.clientHeight,b=!1,$=v,S=null;if(y){for(var w=v||g,C=0,E=0,O=0,x=Math.min(e.length-1,m),I=0;I<=x;I+=1){var T=i(e[I]);E=C;var N=r.get(T);O=E+(N===void 0?n:N),C=O}for(var P=w==="top"?p:y-p,_=x;_>=0;_-=1){var R=i(e[_]),M=r.get(R);if(M===void 0){b=!0;break}if(P-=M,P<=0)break}switch(w){case"top":S=E-p;break;case"bottom":S=O-y+p;break;default:{var D=t.current.scrollTop,j=D+y;E<D?$="top":O>j&&($="bottom")}}S!==null&&a(S),S!==f.lastTop&&(b=!0)}b&&h(L(L({},f),{},{times:f.times+1,targetAlign:$,lastTop:S}))}},[f,t.current]),function(v){if(v==null){s();return}if(Ht.cancel(l.current),typeof v=="number")a(v);else if(v&&tt(v)==="object"){var g,m=v.align;"index"in v?g=v.index:g=e.findIndex(function(b){return i(b)===v.key});var p=v.offset,y=p===void 0?0:p;h({times:0,index:g,offset:y,originAlign:m})}}}var Kx=d.forwardRef(function(t,e){var r=t.prefixCls,n=t.rtl,i=t.scrollOffset,o=t.scrollRange,a=t.onStartMove,s=t.onStopMove,l=t.onScroll,c=t.horizontal,u=t.spinSize,f=t.containerSize,h=t.style,v=t.thumbStyle,g=t.showScrollBar,m=d.useState(!1),p=le(m,2),y=p[0],b=p[1],$=d.useState(null),S=le($,2),w=S[0],C=S[1],E=d.useState(null),O=le(E,2),x=O[0],I=O[1],T=!n,N=d.useRef(),P=d.useRef(),_=d.useState(g),R=le(_,2),M=R[0],D=R[1],j=d.useRef(),k=function(){g===!0||g===!1||(clearTimeout(j.current),D(!0),j.current=setTimeout(function(){D(!1)},3e3))},V=o-f||0,G=f-u||0,W=d.useMemo(function(){if(i===0||V===0)return 0;var B=i/V;return B*G},[i,V,G]),Y=function(F){F.stopPropagation(),F.preventDefault()},q=d.useRef({top:W,dragging:y,pageY:w,startTop:x});q.current={top:W,dragging:y,pageY:w,startTop:x};var J=function(F){b(!0),C(J0(F,c)),I(q.current.top),a(),F.stopPropagation(),F.preventDefault()};d.useEffect(function(){var B=function(ee){ee.preventDefault()},F=N.current,U=P.current;return F.addEventListener("touchstart",B,{passive:!1}),U.addEventListener("touchstart",J,{passive:!1}),function(){F.removeEventListener("touchstart",B),U.removeEventListener("touchstart",J)}},[]);var oe=d.useRef();oe.current=V;var ie=d.useRef();ie.current=G,d.useEffect(function(){if(y){var B,F=function(ee){var Q=q.current,ce=Q.dragging,me=Q.pageY,Te=Q.startTop;Ht.cancel(B);var _e=N.current.getBoundingClientRect(),ve=f/(c?_e.width:_e.height);if(ce){var ye=(J0(ee,c)-me)*ve,xe=Te;!T&&c?xe-=ye:xe+=ye;var ge=oe.current,ne=ie.current,X=ne?xe/ne:0,fe=Math.ceil(X*ge);fe=Math.max(fe,0),fe=Math.min(fe,ge),B=Ht(function(){l(fe,c)})}},U=function(){b(!1),s()};return window.addEventListener("mousemove",F,{passive:!0}),window.addEventListener("touchmove",F,{passive:!0}),window.addEventListener("mouseup",U,{passive:!0}),window.addEventListener("touchend",U,{passive:!0}),function(){window.removeEventListener("mousemove",F),window.removeEventListener("touchmove",F),window.removeEventListener("mouseup",U),window.removeEventListener("touchend",U),Ht.cancel(B)}}},[y]),d.useEffect(function(){return k(),function(){clearTimeout(j.current)}},[i]),d.useImperativeHandle(e,function(){return{delayHidden:k}});var te="".concat(r,"-scrollbar"),z={position:"absolute",visibility:M?null:"hidden"},K={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(z,{height:8,left:0,right:0,bottom:0}),Object.assign(K,A({height:"100%",width:u},T?"left":"right",W))):(Object.assign(z,A({width:8,top:0,bottom:0},T?"right":"left",0)),Object.assign(K,{width:"100%",height:u,top:W})),d.createElement("div",{ref:N,className:ae(te,A(A(A({},"".concat(te,"-horizontal"),c),"".concat(te,"-vertical"),!c),"".concat(te,"-visible"),M)),style:L(L({},z),h),onMouseDown:Y,onMouseMove:k},d.createElement("div",{ref:P,className:ae("".concat(te,"-thumb"),A({},"".concat(te,"-thumb-moving"),y)),style:L(L({},K),v),onMouseDown:J}))}),DW=20;function Ux(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=t/e*t;return isNaN(r)&&(r=0),r=Math.max(r,DW),Math.floor(r)}var AW=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],jW=[],kW={overflowY:"auto",overflowAnchor:"none"};function BW(t,e){var r=t.prefixCls,n=r===void 0?"rc-virtual-list":r,i=t.className,o=t.height,a=t.itemHeight,s=t.fullHeight,l=s===void 0?!0:s,c=t.style,u=t.data,f=t.children,h=t.itemKey,v=t.virtual,g=t.direction,m=t.scrollWidth,p=t.component,y=p===void 0?"div":p,b=t.onScroll,$=t.onVirtualScroll,S=t.onVisibleChange,w=t.innerProps,C=t.extraRender,E=t.styles,O=t.showScrollBar,x=O===void 0?"optional":O,I=mt(t,AW),T=d.useCallback(function(Be){return typeof h=="function"?h(Be):Be?.[h]},[h]),N=_W(T),P=le(N,4),_=P[0],R=P[1],M=P[2],D=P[3],j=!!(v!==!1&&o&&a),k=d.useMemo(function(){return Object.values(M.maps).reduce(function(Be,Ve){return Be+Ve},0)},[M.id,M.maps]),V=j&&u&&(Math.max(a*u.length,k)>o||!!m),G=g==="rtl",W=ae(n,A({},"".concat(n,"-rtl"),G),i),Y=u||jW,q=d.useRef(),J=d.useRef(),oe=d.useRef(),ie=d.useState(0),te=le(ie,2),z=te[0],K=te[1],B=d.useState(0),F=le(B,2),U=F[0],Z=F[1],ee=d.useState(!1),Q=le(ee,2),ce=Q[0],me=Q[1],Te=function(){me(!0)},_e=function(){me(!1)},ve={getKey:T};function ye(Be){K(function(Ve){var vt;typeof Be=="function"?vt=Be(Ve):vt=Be;var It=Et(vt);return q.current.scrollTop=It,It})}var xe=d.useRef({start:0,end:Y.length}),ge=d.useRef(),ne=EW(Y,T),X=le(ne,1),fe=X[0];ge.current=fe;var pe=d.useMemo(function(){if(!j)return{scrollHeight:void 0,start:0,end:Y.length-1,offset:void 0};if(!V){var Be;return{scrollHeight:((Be=J.current)===null||Be===void 0?void 0:Be.offsetHeight)||0,start:0,end:Y.length-1,offset:void 0}}for(var Ve=0,vt,It,Pt,br=Y.length,Sr=0;Sr<br;Sr+=1){var Cn=Y[Sr],ut=T(Cn),pt=M.get(ut),Tt=Ve+(pt===void 0?a:pt);Tt>=z&&vt===void 0&&(vt=Sr,It=Ve),Tt>z+o&&Pt===void 0&&(Pt=Sr),Ve=Tt}return vt===void 0&&(vt=0,It=0,Pt=Math.ceil(o/a)),Pt===void 0&&(Pt=Y.length-1),Pt=Math.min(Pt+1,Y.length-1),{scrollHeight:Ve,start:vt,end:Pt,offset:It}},[V,j,z,Y,D,o]),$e=pe.scrollHeight,Ee=pe.start,be=pe.end,H=pe.offset;xe.current.start=Ee,xe.current.end=be,d.useLayoutEffect(function(){var Be=M.getRecord();if(Be.size===1){var Ve=Array.from(Be.keys())[0],vt=Be.get(Ve),It=Y[Ee];if(It&&vt===void 0){var Pt=T(It);if(Pt===Ve){var br=M.get(Ve),Sr=br-a;ye(function(Cn){return Cn+Sr})}}}M.resetRecord()},[$e]);var re=d.useState({width:0,height:o}),he=le(re,2),ue=he[0],we=he[1],Ie=function(Ve){we({width:Ve.offsetWidth,height:Ve.offsetHeight})},Fe=d.useRef(),qe=d.useRef(),st=d.useMemo(function(){return Ux(ue.width,m)},[ue.width,m]),ft=d.useMemo(function(){return Ux(ue.height,$e)},[ue.height,$e]),et=$e-o,St=d.useRef(et);St.current=et;function Et(Be){var Ve=Be;return Number.isNaN(St.current)||(Ve=Math.min(Ve,St.current)),Ve=Math.max(Ve,0),Ve}var at=z<=0,nt=z>=et,Le=U<=0,ze=U>=m,Ne=gM(at,nt,Le,ze),Ye=function(){return{x:G?-U:U,y:z}},lt=d.useRef(Ye()),De=sr(function(Be){if($){var Ve=L(L({},Ye()),Be);(lt.current.x!==Ve.x||lt.current.y!==Ve.y)&&($(Ve),lt.current=Ve)}});function Me(Be,Ve){var vt=Be;Ve?(Hl.flushSync(function(){Z(vt)}),De()):ye(vt)}function Qe(Be){var Ve=Be.currentTarget.scrollTop;Ve!==z&&ye(Ve),b?.(Be),De()}var Ge=function(Ve){var vt=Ve,It=m?m-ue.width:0;return vt=Math.max(vt,0),vt=Math.min(vt,It),vt},We=sr(function(Be,Ve){Ve?(Hl.flushSync(function(){Z(function(vt){var It=vt+(G?-Be:Be);return Ge(It)})}),De()):ye(function(vt){var It=vt+Be;return It})}),it=OW(j,at,nt,Le,ze,!!m,We),Ue=le(it,2),He=Ue[0],rt=Ue[1];PW(j,q,function(Be,Ve,vt,It){var Pt=It;return Ne(Be,Ve,vt)?!1:!Pt||!Pt._virtualHandled?(Pt&&(Pt._virtualHandled=!0),He({preventDefault:function(){},deltaX:Be?Ve:0,deltaY:Be?0:Ve}),!0):!1}),RW(V,q,function(Be){ye(function(Ve){return Ve+Be})}),Lt(function(){function Be(vt){var It=at&&vt.detail<0,Pt=nt&&vt.detail>0;j&&!It&&!Pt&&vt.preventDefault()}var Ve=q.current;return Ve.addEventListener("wheel",He,{passive:!1}),Ve.addEventListener("DOMMouseScroll",rt,{passive:!0}),Ve.addEventListener("MozMousePixelScroll",Be,{passive:!1}),function(){Ve.removeEventListener("wheel",He),Ve.removeEventListener("DOMMouseScroll",rt),Ve.removeEventListener("MozMousePixelScroll",Be)}},[j,at,nt]),Lt(function(){if(m){var Be=Ge(U);Z(Be),De({x:Be})}},[ue.width,m]);var ht=function(){var Ve,vt;(Ve=Fe.current)===null||Ve===void 0||Ve.delayHidden(),(vt=qe.current)===null||vt===void 0||vt.delayHidden()},_t=MW(q,Y,M,a,T,function(){return R(!0)},ye,ht);d.useImperativeHandle(e,function(){return{nativeElement:oe.current,getScrollInfo:Ye,scrollTo:function(Ve){function vt(It){return It&&tt(It)==="object"&&("left"in It||"top"in It)}vt(Ve)?(Ve.left!==void 0&&Z(Ge(Ve.left)),_t(Ve.top)):_t(Ve)}}}),Lt(function(){if(S){var Be=Y.slice(Ee,be+1);S(Be,Y)}},[Ee,be,Y]);var Nt=IW(Y,T,M,a),kt=C?.({start:Ee,end:be,virtual:V,offsetX:U,offsetY:H,rtl:G,getSize:Nt}),Bt=CW(Y,Ee,be,m,U,_,f,ve),qt=null;o&&(qt=L(A({},l?"height":"maxHeight",o),kW),j&&(qt.overflowY="hidden",m&&(qt.overflowX="hidden"),ce&&(qt.pointerEvents="none")));var Vt={};return G&&(Vt.dir="rtl"),d.createElement("div",Re({ref:oe,style:L(L({},c),{},{position:"relative"}),className:W},Vt,I),d.createElement(ro,{onResize:Ie},d.createElement(y,{className:"".concat(n,"-holder"),style:qt,ref:q,onScroll:Qe,onMouseEnter:ht},d.createElement(pM,{prefixCls:n,height:$e,offsetX:U,offsetY:H,scrollWidth:m,onInnerResize:R,ref:J,innerProps:w,rtl:G,extra:kt},Bt))),V&&$e>o&&d.createElement(Kx,{ref:Fe,prefixCls:n,scrollOffset:z,scrollRange:$e,rtl:G,onScroll:Me,onStartMove:Te,onStopMove:_e,spinSize:ft,containerSize:ue.height,style:E?.verticalScrollBar,thumbStyle:E?.verticalScrollBarThumb,showScrollBar:x}),V&&m>ue.width&&d.createElement(Kx,{ref:qe,prefixCls:n,scrollOffset:U,scrollRange:m,rtl:G,onScroll:Me,onStartMove:Te,onStopMove:_e,spinSize:st,containerSize:ue.width,horizontal:!0,style:E?.horizontalScrollBar,thumbStyle:E?.horizontalScrollBarThumb,showScrollBar:x}))}var Bp=d.forwardRef(BW);Bp.displayName="List";function FW(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var LW=["disabled","title","children","style","className"];function qx(t){return typeof t=="string"||typeof t=="number"}var zW=function(e,r){var n=E7(),i=n.prefixCls,o=n.id,a=n.open,s=n.multiple,l=n.mode,c=n.searchValue,u=n.toggleOpen,f=n.notFoundContent,h=n.onPopupScroll,v=d.useContext(sw),g=v.maxCount,m=v.flattenOptions,p=v.onActiveValue,y=v.defaultActiveFirstOption,b=v.onSelect,$=v.menuItemSelectedIcon,S=v.rawValues,w=v.fieldNames,C=v.virtual,E=v.direction,O=v.listHeight,x=v.listItemHeight,I=v.optionRender,T="".concat(i,"-item"),N=Rs(function(){return m},[a,m],function(B,F){return F[0]&&B[1]!==F[1]}),P=d.useRef(null),_=d.useMemo(function(){return s&&G0(g)&&S?.size>=g},[s,g,S?.size]),R=function(F){F.preventDefault()},M=function(F){var U;(U=P.current)===null||U===void 0||U.scrollTo(typeof F=="number"?{index:F}:F)},D=d.useCallback(function(B){return l==="combobox"?!1:S.has(B)},[l,Oe(S).toString(),S.size]),j=function(F){for(var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Z=N.length,ee=0;ee<Z;ee+=1){var Q=(F+ee*U+Z)%Z,ce=N[Q]||{},me=ce.group,Te=ce.data;if(!me&&!(Te!=null&&Te.disabled)&&(D(Te.value)||!_))return Q}return-1},k=d.useState(function(){return j(0)}),V=le(k,2),G=V[0],W=V[1],Y=function(F){var U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;W(F);var Z={source:U?"keyboard":"mouse"},ee=N[F];if(!ee){p(null,-1,Z);return}p(ee.value,F,Z)};d.useEffect(function(){Y(y!==!1?j(0):-1)},[N.length,c]);var q=d.useCallback(function(B){return l==="combobox"?String(B).toLowerCase()===c.toLowerCase():S.has(B)},[l,c,Oe(S).toString(),S.size]);d.useEffect(function(){var B=setTimeout(function(){if(!s&&a&&S.size===1){var U=Array.from(S)[0],Z=N.findIndex(function(ee){var Q=ee.data;return c?String(Q.value).startsWith(c):Q.value===U});Z!==-1&&(Y(Z),M(Z))}});if(a){var F;(F=P.current)===null||F===void 0||F.scrollTo(void 0)}return function(){return clearTimeout(B)}},[a,c]);var J=function(F){F!==void 0&&b(F,{selected:!S.has(F)}),s||u(!1)};if(d.useImperativeHandle(r,function(){return{onKeyDown:function(F){var U=F.which,Z=F.ctrlKey;switch(U){case Ze.N:case Ze.P:case Ze.UP:case Ze.DOWN:{var ee=0;if(U===Ze.UP?ee=-1:U===Ze.DOWN?ee=1:FW()&&Z&&(U===Ze.N?ee=1:U===Ze.P&&(ee=-1)),ee!==0){var Q=j(G+ee,ee);M(Q),Y(Q,!0)}break}case Ze.TAB:case Ze.ENTER:{var ce,me=N[G];me&&!(me!=null&&(ce=me.data)!==null&&ce!==void 0&&ce.disabled)&&!_?J(me.value):J(void 0),a&&F.preventDefault();break}case Ze.ESC:u(!1),a&&F.stopPropagation()}},onKeyUp:function(){},scrollTo:function(F){M(F)}}}),N.length===0)return d.createElement("div",{role:"listbox",id:"".concat(o,"_list"),className:"".concat(T,"-empty"),onMouseDown:R},f);var oe=Object.keys(w).map(function(B){return w[B]}),ie=function(F){return F.label};function te(B,F){var U=B.group;return{role:U?"presentation":"option",id:"".concat(o,"_list_").concat(F)}}var z=function(F){var U=N[F];if(!U)return null;var Z=U.data||{},ee=Z.value,Q=U.group,ce=Zi(Z,!0),me=ie(U);return U?d.createElement("div",Re({"aria-label":typeof me=="string"&&!Q?me:null},ce,{key:F},te(U,F),{"aria-selected":q(ee)}),ee):null},K={role:"listbox",id:"".concat(o,"_list")};return d.createElement(d.Fragment,null,C&&d.createElement("div",Re({},K,{style:{height:0,width:0,overflow:"hidden"}}),z(G-1),z(G),z(G+1)),d.createElement(Bp,{itemKey:"key",ref:P,data:N,height:O,itemHeight:x,fullHeight:!1,onMouseDown:R,onScroll:h,virtual:C,direction:E,innerProps:C?null:K},function(B,F){var U=B.group,Z=B.groupOption,ee=B.data,Q=B.label,ce=B.value,me=ee.key;if(U){var Te,_e=(Te=ee.title)!==null&&Te!==void 0?Te:qx(Q)?Q.toString():void 0;return d.createElement("div",{className:ae(T,"".concat(T,"-group"),ee.className),title:_e},Q!==void 0?Q:me)}var ve=ee.disabled,ye=ee.title;ee.children;var xe=ee.style,ge=ee.className,ne=mt(ee,LW),X=yn(ne,oe),fe=D(ce),pe=ve||!fe&&_,$e="".concat(T,"-option"),Ee=ae(T,$e,ge,A(A(A(A({},"".concat($e,"-grouped"),Z),"".concat($e,"-active"),G===F&&!pe),"".concat($e,"-disabled"),pe),"".concat($e,"-selected"),fe)),be=ie(B),H=!$||typeof $=="function"||fe,re=typeof be=="number"?be:be||ce,he=qx(re)?re.toString():void 0;return ye!==void 0&&(he=ye),d.createElement("div",Re({},Zi(X),C?{}:te(B,F),{"aria-selected":q(ce),className:Ee,title:he,onMouseMove:function(){G===F||pe||Y(F)},onClick:function(){pe||J(ce)},style:xe}),d.createElement("div",{className:"".concat($e,"-content")},typeof I=="function"?I(B,{index:F}):re),d.isValidElement($)||fe,H&&d.createElement(jp,{className:"".concat(T,"-option-state"),customizeIcon:$,customizeIconProps:{value:ce,disabled:pe,isSelected:fe}},fe?"✓":null))}))},HW=d.forwardRef(zW);const VW=function(t,e){var r=d.useRef({values:new Map,options:new Map}),n=d.useMemo(function(){var o=r.current,a=o.values,s=o.options,l=t.map(function(f){if(f.label===void 0){var h;return L(L({},f),{},{label:(h=a.get(f.value))===null||h===void 0?void 0:h.label})}return f}),c=new Map,u=new Map;return l.forEach(function(f){c.set(f.value,f),u.set(f.value,e.get(f.value)||s.get(f.value))}),r.current.values=c,r.current.options=u,l},[t,e]),i=d.useCallback(function(o){return e.get(o)||r.current.options.get(o)},[e]);return[n,i]};function Sm(t,e){return fM(t).join("").toUpperCase().includes(e)}const WW=function(t,e,r,n,i){return d.useMemo(function(){if(!r||n===!1)return t;var o=e.options,a=e.label,s=e.value,l=[],c=typeof n=="function",u=r.toUpperCase(),f=c?n:function(v,g){return i?Sm(g[i],u):g[o]?Sm(g[a!=="children"?a:"label"],u):Sm(g[s],u)},h=c?function(v){return X0(v)}:function(v){return v};return t.forEach(function(v){if(v[o]){var g=f(r,h(v));if(g)l.push(v);else{var m=v[o].filter(function(p){return f(r,h(p))});m.length&&l.push(L(L({},v),{},A({},o,m)))}return}f(r,h(v))&&l.push(v)}),l},[t,n,i,r,e])};var Gx=0,KW=In();function UW(){var t;return KW?(t=Gx,Gx+=1):t="TEST_OR_SSR",t}function qW(t){var e=d.useState(),r=le(e,2),n=r[0],i=r[1];return d.useEffect(function(){i("rc_select_".concat(UW()))},[]),t||n}var GW=["children","value"],XW=["children"];function YW(t){var e=t,r=e.key,n=e.props,i=n.children,o=n.value,a=mt(n,GW);return L({key:r,value:o!==void 0?o:r,children:i},a)}function mM(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Mi(t).map(function(r,n){if(!d.isValidElement(r)||!r.type)return null;var i=r,o=i.type.isSelectOptGroup,a=i.key,s=i.props,l=s.children,c=mt(s,XW);return e||!o?YW(r):L(L({key:"__RC_SELECT_GRP__".concat(a===null?n:a,"__"),label:a},c),{},{options:mM(l)})}).filter(function(r){return r})}var JW=function(e,r,n,i,o){return d.useMemo(function(){var a=e,s=!e;s&&(a=mM(r));var l=new Map,c=new Map,u=function(v,g,m){m&&typeof m=="string"&&v.set(g[m],g)},f=function h(v){for(var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,m=0;m<v.length;m+=1){var p=v[m];!p[n.options]||g?(l.set(p[n.value],p),u(c,p,n.label),u(c,p,i),u(c,p,o)):h(p[n.options],!0)}};return f(a),{options:a,valueOptions:l,labelOptions:c}},[e,r,n,i,o])};function Xx(t){var e=d.useRef();e.current=t;var r=d.useCallback(function(){return e.current.apply(e,arguments)},[]);return r}var ZW=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],QW=["inputValue"];function e9(t){return!t||tt(t)!=="object"}var t9=d.forwardRef(function(t,e){var r=t.id,n=t.mode,i=t.prefixCls,o=i===void 0?"rc-select":i,a=t.backfill,s=t.fieldNames,l=t.inputValue,c=t.searchValue,u=t.onSearch,f=t.autoClearSearchValue,h=f===void 0?!0:f,v=t.onSelect,g=t.onDeselect,m=t.dropdownMatchSelectWidth,p=m===void 0?!0:m,y=t.filterOption,b=t.filterSort,$=t.optionFilterProp,S=t.optionLabelProp,w=t.options,C=t.optionRender,E=t.children,O=t.defaultActiveFirstOption,x=t.menuItemSelectedIcon,I=t.virtual,T=t.direction,N=t.listHeight,P=N===void 0?200:N,_=t.listItemHeight,R=_===void 0?20:_,M=t.labelRender,D=t.value,j=t.defaultValue,k=t.labelInValue,V=t.onChange,G=t.maxCount,W=mt(t,ZW),Y=qW(r),q=Y0(n),J=!!(!w&&E),oe=d.useMemo(function(){return y===void 0&&n==="combobox"?!1:y},[y,n]),ie=d.useMemo(function(){return vM(s,J)},[JSON.stringify(s),J]),te=ln("",{value:c!==void 0?c:l,postState:function(Me){return Me||""}}),z=le(te,2),K=z[0],B=z[1],F=JW(w,E,ie,$,S),U=F.valueOptions,Z=F.labelOptions,ee=F.options,Q=d.useCallback(function(De){var Me=fM(De);return Me.map(function(Qe){var Ge,We,it,Ue,He;if(e9(Qe))Ge=Qe;else{var rt;it=Qe.key,We=Qe.label,Ge=(rt=Qe.value)!==null&&rt!==void 0?rt:it}var ht=U.get(Ge);if(ht){var _t;We===void 0&&(We=ht?.[S||ie.label]),it===void 0&&(it=(_t=ht?.key)!==null&&_t!==void 0?_t:Ge),Ue=ht?.disabled,He=ht?.title}return{label:We,value:Ge,key:it,disabled:Ue,title:He}})},[ie,S,U]),ce=ln(j,{value:D}),me=le(ce,2),Te=me[0],_e=me[1],ve=d.useMemo(function(){var De,Me=q&&Te===null?[]:Te,Qe=Q(Me);return n==="combobox"&&U7((De=Qe[0])===null||De===void 0?void 0:De.value)?[]:Qe},[Te,Q,n,q]),ye=VW(ve,U),xe=le(ye,2),ge=xe[0],ne=xe[1],X=d.useMemo(function(){if(!n&&ge.length===1){var De=ge[0];if(De.value===null&&(De.label===null||De.label===void 0))return[]}return ge.map(function(Me){var Qe;return L(L({},Me),{},{label:(Qe=typeof M=="function"?M(Me):Me.label)!==null&&Qe!==void 0?Qe:Me.value})})},[n,ge,M]),fe=d.useMemo(function(){return new Set(ge.map(function(De){return De.value}))},[ge]);d.useEffect(function(){if(n==="combobox"){var De,Me=(De=ge[0])===null||De===void 0?void 0:De.value;B(K7(Me)?String(Me):"")}},[ge]);var pe=Xx(function(De,Me){var Qe=Me??De;return A(A({},ie.value,De),ie.label,Qe)}),$e=d.useMemo(function(){if(n!=="tags")return ee;var De=Oe(ee),Me=function(Ge){return U.has(Ge)};return Oe(ge).sort(function(Qe,Ge){return Qe.value<Ge.value?-1:1}).forEach(function(Qe){var Ge=Qe.value;Me(Ge)||De.push(pe(Ge,Qe.label))}),De},[pe,ee,U,ge,n]),Ee=WW($e,ie,K,oe,$),be=d.useMemo(function(){return n!=="tags"||!K||Ee.some(function(De){return De[$||"value"]===K})||Ee.some(function(De){return De[ie.value]===K})?Ee:[pe(K)].concat(Oe(Ee))},[pe,$,n,Ee,K,ie]),H=function De(Me){var Qe=Oe(Me).sort(function(Ge,We){return b(Ge,We,{searchValue:K})});return Qe.map(function(Ge){return Array.isArray(Ge.options)?L(L({},Ge),{},{options:Ge.options.length>0?De(Ge.options):Ge.options}):Ge})},re=d.useMemo(function(){return b?H(be):be},[be,b,K]),he=d.useMemo(function(){return gW(re,{fieldNames:ie,childrenAsData:J})},[re,ie,J]),ue=function(Me){var Qe=Q(Me);if(_e(Qe),V&&(Qe.length!==ge.length||Qe.some(function(it,Ue){var He;return((He=ge[Ue])===null||He===void 0?void 0:He.value)!==it?.value}))){var Ge=k?Qe:Qe.map(function(it){return it.value}),We=Qe.map(function(it){return X0(ne(it.value))});V(q?Ge:Ge[0],q?We:We[0])}},we=d.useState(null),Ie=le(we,2),Fe=Ie[0],qe=Ie[1],st=d.useState(0),ft=le(st,2),et=ft[0],St=ft[1],Et=O!==void 0?O:n!=="combobox",at=d.useCallback(function(De,Me){var Qe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Ge=Qe.source,We=Ge===void 0?"keyboard":Ge;St(Me),a&&n==="combobox"&&De!==null&&We==="keyboard"&&qe(String(De))},[a,n]),nt=function(Me,Qe,Ge){var We=function(){var qt,Vt=ne(Me);return[k?{label:Vt?.[ie.label],value:Me,key:(qt=Vt?.key)!==null&&qt!==void 0?qt:Me}:Me,X0(Vt)]};if(Qe&&v){var it=We(),Ue=le(it,2),He=Ue[0],rt=Ue[1];v(He,rt)}else if(!Qe&&g&&Ge!=="clear"){var ht=We(),_t=le(ht,2),Nt=_t[0],kt=_t[1];g(Nt,kt)}},Le=Xx(function(De,Me){var Qe,Ge=q?Me.selected:!0;Ge?Qe=q?[].concat(Oe(ge),[De]):[De]:Qe=ge.filter(function(We){return We.value!==De}),ue(Qe),nt(De,Ge),n==="combobox"?qe(""):(!Y0||h)&&(B(""),qe(""))}),ze=function(Me,Qe){ue(Me);var Ge=Qe.type,We=Qe.values;(Ge==="remove"||Ge==="clear")&&We.forEach(function(it){nt(it.value,!1,Ge)})},Ne=function(Me,Qe){if(B(Me),qe(null),Qe.source==="submit"){var Ge=(Me||"").trim();if(Ge){var We=Array.from(new Set([].concat(Oe(fe),[Ge])));ue(We),nt(Ge,!0),B("")}return}Qe.source!=="blur"&&(n==="combobox"&&ue(Me),u?.(Me))},Ye=function(Me){var Qe=Me;n!=="tags"&&(Qe=Me.map(function(We){var it=Z.get(We);return it?.value}).filter(function(We){return We!==void 0}));var Ge=Array.from(new Set([].concat(Oe(fe),Oe(Qe))));ue(Ge),Ge.forEach(function(We){nt(We,!0)})},lt=d.useMemo(function(){var De=I!==!1&&p!==!1;return L(L({},F),{},{flattenOptions:he,onActiveValue:at,defaultActiveFirstOption:Et,onSelect:Le,menuItemSelectedIcon:x,rawValues:fe,fieldNames:ie,virtual:De,direction:T,listHeight:P,listItemHeight:R,childrenAsData:J,maxCount:G,optionRender:C})},[G,F,he,at,Et,Le,x,fe,ie,I,p,T,P,R,J,C]);return d.createElement(sw.Provider,{value:lt},d.createElement(wW,Re({},W,{id:Y,prefixCls:o,ref:e,omitDomProps:QW,mode:n,displayValues:X,onDisplayValuesChange:ze,direction:T,searchValue:K,onSearch:Ne,autoClearSearchValue:h,onSearchSplit:Ye,dropdownMatchSelectWidth:p,OptionList:HW,emptyOptions:!he.length,activeValue:Fe,activeDescendantId:"".concat(Y,"_list_").concat(et)})))}),uw=t9;uw.Option=cw;uw.OptGroup=lw;function Tv(t,e,r){return ae({[`${t}-status-success`]:e==="success",[`${t}-status-warning`]:e==="warning",[`${t}-status-error`]:e==="error",[`${t}-status-validating`]:e==="validating",[`${t}-has-feedback`]:r})}const Fp=(t,e)=>e||t,r9=()=>{const[,t]=_n(),[e]=$d("Empty"),n=new Ut(t.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return d.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,e?.description||"Empty"),d.createElement("g",{fill:"none",fillRule:"evenodd"},d.createElement("g",{transform:"translate(24 31.67)"},d.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),d.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),d.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),d.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),d.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),d.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),d.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},d.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),d.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},n9=()=>{const[,t]=_n(),[e]=$d("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:i,colorBgContainer:o}=t,{borderColor:a,shadowColor:s,contentColor:l}=d.useMemo(()=>({borderColor:new Ut(r).onBackground(o).toHexString(),shadowColor:new Ut(n).onBackground(o).toHexString(),contentColor:new Ut(i).onBackground(o).toHexString()}),[r,n,i,o]);return d.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},d.createElement("title",null,e?.description||"Empty"),d.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},d.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),d.createElement("g",{fillRule:"nonzero",stroke:a},d.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),d.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},i9=t=>{const{componentCls:e,margin:r,marginXS:n,marginXL:i,fontSize:o,lineHeight:a}=t;return{[e]:{marginInline:n,fontSize:o,lineHeight:a,textAlign:"center",[`${e}-image`]:{height:t.emptyImgHeight,marginBottom:n,opacity:t.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${e}-description`]:{color:t.colorTextDescription},[`${e}-footer`]:{marginTop:r},"&-normal":{marginBlock:i,color:t.colorTextDescription,[`${e}-description`]:{color:t.colorTextDescription},[`${e}-image`]:{height:t.emptyImgHeightMD}},"&-small":{marginBlock:n,color:t.colorTextDescription,[`${e}-image`]:{height:t.emptyImgHeightSM}}}}},o9=Gr("Empty",t=>{const{componentCls:e,controlHeightLG:r,calc:n}=t,i=Xt(t,{emptyImgCls:`${e}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return[i9(i)]});var a9=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const yM=d.createElement(r9,null),bM=d.createElement(n9,null),Do=t=>{const{className:e,rootClassName:r,prefixCls:n,image:i=yM,description:o,children:a,imageStyle:s,style:l,classNames:c,styles:u}=t,f=a9(t,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:h,direction:v,className:g,style:m,classNames:p,styles:y}=Oo("empty"),b=h("empty",n),[$,S,w]=o9(b),[C]=$d("Empty"),E=typeof o<"u"?o:C?.description,O=typeof E=="string"?E:"empty";let x=null;return typeof i=="string"?x=d.createElement("img",{alt:O,src:i}):x=i,$(d.createElement("div",Object.assign({className:ae(S,w,b,g,{[`${b}-normal`]:i===bM,[`${b}-rtl`]:v==="rtl"},e,r,p.root,c?.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},y.root),m),u?.root),l)},f),d.createElement("div",{className:ae(`${b}-image`,p.image,c?.image),style:Object.assign(Object.assign(Object.assign({},s),y.image),u?.image)},x),E&&d.createElement("div",{className:ae(`${b}-description`,p.description,c?.description),style:Object.assign(Object.assign({},y.description),u?.description)},E),a&&d.createElement("div",{className:ae(`${b}-footer`,p.footer,c?.footer),style:Object.assign(Object.assign({},y.footer),u?.footer)},a)))};Do.PRESENTED_IMAGE_DEFAULT=yM;Do.PRESENTED_IMAGE_SIMPLE=bM;const $M=t=>{const{componentName:e}=t,{getPrefixCls:r}=d.useContext(Dt),n=r("empty");switch(e){case"Table":case"List":return de.createElement(Do,{image:Do.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return de.createElement(Do,{image:Do.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return de.createElement(Do,null)}},dw=(t,e,r=void 0)=>{var n,i;const{variant:o,[t]:a}=d.useContext(Dt),s=d.useContext(tM),l=a?.variant;let c;typeof e<"u"?c=e:r===!1?c="borderless":c=(i=(n=s??l)!==null&&n!==void 0?n:o)!==null&&i!==void 0?i:"outlined";const u=R4.includes(c);return[c,u]},s9=t=>{const r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:t==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},r),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},r),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},r),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},r),{points:["br","tr"],offset:[0,-4]})}};function l9(t,e){return t||s9(e)}const Yx=t=>{const{optionHeight:e,optionFontSize:r,optionLineHeight:n,optionPadding:i}=t;return{position:"relative",display:"block",minHeight:e,padding:i,color:t.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},c9=t=>{const{antCls:e,componentCls:r}=t,n=`${r}-item`,i=`&${e}-slide-up-enter${e}-slide-up-enter-active`,o=`&${e}-slide-up-appear${e}-slide-up-appear-active`,a=`&${e}-slide-up-leave${e}-slide-up-leave-active`,s=`${r}-dropdown-placement-`,l=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Ar(t)),{position:"absolute",top:-9999,zIndex:t.zIndexPopup,boxSizing:"border-box",padding:t.paddingXXS,overflow:"hidden",fontSize:t.fontSize,fontVariant:"initial",backgroundColor:t.colorBgElevated,borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary,[`
          ${i}${s}bottomLeft,
          ${o}${s}bottomLeft
        `]:{animationName:G$},[`
          ${i}${s}topLeft,
          ${o}${s}topLeft,
          ${i}${s}topRight,
          ${o}${s}topRight
        `]:{animationName:Y$},[`${a}${s}bottomLeft`]:{animationName:X$},[`
          ${a}${s}topLeft,
          ${a}${s}topRight
        `]:{animationName:J$},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},Yx(t)),{cursor:"pointer",transition:`background ${t.motionDurationSlow} ease`,borderRadius:t.borderRadiusSM,"&-group":{color:t.colorTextDescription,fontSize:t.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Ku),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:t.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:t.optionSelectedColor,fontWeight:t.optionSelectedFontWeight,backgroundColor:t.optionSelectedBg,[`${n}-option-state`]:{color:t.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:t.colorBgContainerDisabled},color:t.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:t.calc(t.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},Yx(t)),{color:t.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Gl(t,"slide-up"),Gl(t,"slide-down"),Ev(t,"move-up"),Ev(t,"move-down")]},u9=t=>{const{multipleSelectItemHeight:e,paddingXXS:r,lineWidth:n,INTERNAL_FIXED_ITEM_MARGIN:i}=t,o=t.max(t.calc(r).sub(n).equal(),0),a=t.max(t.calc(o).sub(i).equal(),0);return{basePadding:o,containerPadding:a,itemHeight:se(e),itemLineHeight:se(t.calc(e).sub(t.calc(t.lineWidth).mul(2)).equal())}},d9=t=>{const{multipleSelectItemHeight:e,selectHeight:r,lineWidth:n}=t;return t.calc(r).sub(e).div(2).sub(n).equal()},f9=t=>{const{componentCls:e,iconCls:r,borderRadiusSM:n,motionDurationSlow:i,paddingXS:o,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=t;return{[`${e}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"calc(100% - 4px)",display:"inline-flex"},[`${e}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:n,cursor:"default",transition:`font-size ${i}, line-height ${i}, height ${i}`,marginInlineEnd:t.calc(u).mul(2).equal(),paddingInlineStart:o,paddingInlineEnd:t.calc(o).div(2).equal(),[`${e}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:t.calc(o).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},wd()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},h9=(t,e)=>{const{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=t,i=`${r}-selection-overflow`,o=t.multipleSelectItemHeight,a=d9(t),s=e?`${r}-${e}`:"",l=u9(t);return{[`${r}-multiple${s}`]:Object.assign(Object.assign({},f9(t)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:t.borderRadius,[`${r}-disabled&`]:{background:t.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${se(n)} 0`,lineHeight:se(o),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:l.itemHeight,lineHeight:se(l.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:se(o),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${i}-item + ${i}-item,
        ${r}-prefix + ${r}-selection-wrap
      `]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${i}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:n},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(a).equal(),"\n          &-input,\n          &-mirror\n        ":{height:o,fontFamily:t.fontFamily,lineHeight:se(o),transition:`all ${t.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${r}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:t.calc(t.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:t.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${t.motionDurationSlow}`}})}};function Cm(t,e){const{componentCls:r}=t,n=e?`${r}-${e}`:"",i={[`${r}-multiple${n}`]:{fontSize:t.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[`
        &${r}-show-arrow ${r}-selector,
        &${r}-allow-clear ${r}-selector
      `]:{paddingInlineEnd:t.calc(t.fontSizeIcon).add(t.controlPaddingHorizontal).equal()}}};return[h9(t,e),i]}const v9=t=>{const{componentCls:e}=t,r=Xt(t,{selectHeight:t.controlHeightSM,multipleSelectItemHeight:t.multipleItemHeightSM,borderRadius:t.borderRadiusSM,borderRadiusSM:t.borderRadiusXS}),n=Xt(t,{fontSize:t.fontSizeLG,selectHeight:t.controlHeightLG,multipleSelectItemHeight:t.multipleItemHeightLG,borderRadius:t.borderRadiusLG,borderRadiusSM:t.borderRadius});return[Cm(t),Cm(r,"sm"),{[`${e}-multiple${e}-sm`]:{[`${e}-selection-placeholder`]:{insetInline:t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal()},[`${e}-selection-search`]:{marginInlineStart:2}}},Cm(n,"lg")]};function xm(t,e){const{componentCls:r,inputPaddingHorizontalBase:n,borderRadius:i}=t,o=t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),a=e?`${r}-${e}`:"";return{[`${r}-single${a}`]:{fontSize:t.fontSize,height:t.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},Ar(t,!0)),{display:"flex",borderRadius:i,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:se(o)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[`
          ${r}-selection-item,
          ${r}-selection-placeholder
        `]:{display:"block",padding:0,lineHeight:se(o),transition:`all ${t.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${r}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${r}-selection-item:empty:after`,`${r}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[`
        &${r}-show-arrow ${r}-selection-item,
        &${r}-show-arrow ${r}-selection-search,
        &${r}-show-arrow ${r}-selection-placeholder
      `]:{paddingInlineEnd:t.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:t.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${se(n)}`,[`${r}-selection-search-input`]:{height:o,fontSize:t.fontSize},"&:after":{lineHeight:se(o)}}},[`&${r}-customize-input`]:{[`${r}-selector`]:{"&:after":{display:"none"},[`${r}-selection-search`]:{position:"static",width:"100%"},[`${r}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${se(n)}`,"&:after":{display:"none"}}}}}}}function p9(t){const{componentCls:e}=t,r=t.calc(t.controlPaddingHorizontalSM).sub(t.lineWidth).equal();return[xm(t),xm(Xt(t,{controlHeight:t.controlHeightSM,borderRadius:t.borderRadiusSM}),"sm"),{[`${e}-single${e}-sm`]:{[`&:not(${e}-customize-input)`]:{[`${e}-selector`]:{padding:`0 ${se(r)}`},[`&${e}-show-arrow ${e}-selection-search`]:{insetInlineEnd:t.calc(r).add(t.calc(t.fontSize).mul(1.5)).equal()},[`
            &${e}-show-arrow ${e}-selection-item,
            &${e}-show-arrow ${e}-selection-placeholder
          `]:{paddingInlineEnd:t.calc(t.fontSize).mul(1.5).equal()}}}},xm(Xt(t,{controlHeight:t.singleItemHeightLG,fontSize:t.fontSizeLG,borderRadius:t.borderRadiusLG}),"lg")]}const g9=t=>{const{fontSize:e,lineHeight:r,lineWidth:n,controlHeight:i,controlHeightSM:o,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:f,controlItemBgActive:h,controlItemBgHover:v,colorBgContainer:g,colorFillSecondary:m,colorBgContainerDisabled:p,colorTextDisabled:y,colorPrimaryHover:b,colorPrimary:$,controlOutline:S}=t,w=s*2,C=n*2,E=Math.min(i-w,i-C),O=Math.min(o-w,o-C),x=Math.min(a-w,a-C);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:f,optionSelectedBg:h,optionActiveBg:v,optionPadding:`${(i-e*r)/2}px ${l}px`,optionFontSize:e,optionLineHeight:r,optionHeight:i,selectorBg:g,clearBg:g,singleItemHeightLG:a,multipleItemBg:m,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:O,multipleItemHeightLG:x,multipleSelectorBgDisabled:p,multipleItemColorDisabled:y,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(t.fontSize*1.25),hoverBorderColor:b,activeBorderColor:$,activeOutlineColor:S,selectAffixPadding:s}},wM=(t,e)=>{const{componentCls:r,antCls:n,controlOutlineWidth:i}=t;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${se(t.lineWidth)} ${t.lineType} ${e.borderColor}`,background:t.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:e.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:e.activeBorderColor,boxShadow:`0 0 0 ${se(i)} ${e.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:e.color}}}},Jx=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},wM(t,e))}),m9=t=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},wM(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Jx(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Jx(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),SM=(t,e)=>{const{componentCls:r,antCls:n}=t;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:e.bg,border:`${se(t.lineWidth)} ${t.lineType} transparent`,color:e.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:e.hoverBg},[`${r}-focused& ${r}-selector`]:{background:t.selectorBg,borderColor:e.activeBorderColor,outline:0}}}},Zx=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},SM(t,e))}),y9=t=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},SM(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor,color:t.colorText})),Zx(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,color:t.colorError})),Zx(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{borderColor:t.colorBorder,background:t.colorBgContainerDisabled,color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.colorBgContainer,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorSplit}`}})}),b9=t=>({"&-borderless":{[`${t.componentCls}-selector`]:{background:"transparent",border:`${se(t.lineWidth)} ${t.lineType} transparent`},[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`},[`&${t.componentCls}-status-error`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorError}},[`&${t.componentCls}-status-warning`]:{[`${t.componentCls}-prefix, ${t.componentCls}-selection-item`]:{color:t.colorWarning}}}}),CM=(t,e)=>{const{componentCls:r,antCls:n}=t;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${se(t.lineWidth)} 0`,borderStyle:`none none ${t.lineType} none`,borderColor:e.borderColor,background:t.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:e.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:e.activeBorderColor,outline:0},[`${r}-prefix`]:{color:e.color}}}},Qx=(t,e)=>({[`&${t.componentCls}-status-${e.status}`]:Object.assign({},CM(t,e))}),$9=t=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},CM(t,{borderColor:t.colorBorder,hoverBorderHover:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeOutlineColor:t.activeOutlineColor,color:t.colorText})),Qx(t,{status:"error",borderColor:t.colorError,hoverBorderHover:t.colorErrorHover,activeBorderColor:t.colorError,activeOutlineColor:t.colorErrorOutline,color:t.colorError})),Qx(t,{status:"warning",borderColor:t.colorWarning,hoverBorderHover:t.colorWarningHover,activeBorderColor:t.colorWarning,activeOutlineColor:t.colorWarningOutline,color:t.colorWarning})),{[`&${t.componentCls}-disabled`]:{[`&:not(${t.componentCls}-customize-input) ${t.componentCls}-selector`]:{color:t.colorTextDisabled}},[`&${t.componentCls}-multiple ${t.componentCls}-selection-item`]:{background:t.multipleItemBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.multipleItemBorderColor}`}})}),w9=t=>({[t.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},m9(t)),y9(t)),b9(t)),$9(t))}),S9=t=>{const{componentCls:e}=t;return{position:"relative",transition:`all ${t.motionDurationMid} ${t.motionEaseInOut}`,input:{cursor:"pointer"},[`${e}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${e}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},C9=t=>{const{componentCls:e}=t;return{[`${e}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},x9=t=>{const{antCls:e,componentCls:r,inputPaddingHorizontalBase:n,iconCls:i}=t,o={[`${r}-clear`]:{opacity:1,background:t.colorBgBase,borderRadius:"50%"}};return{[r]:Object.assign(Object.assign({},Ar(t)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},S9(t)),C9(t)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ku),{[`> ${e}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},Ku),{flex:1,color:t.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},wd()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${t.motionDurationSlow} ease`,[i]:{verticalAlign:"top",transition:`transform ${t.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${r}-suffix)`]:{pointerEvents:"auto"}},[`${r}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${r}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:t.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:t.fontSizeIcon,height:t.fontSizeIcon,marginTop:t.calc(t.fontSizeIcon).mul(-1).div(2).equal(),color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${t.motionDurationMid} ease, opacity ${t.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:t.colorIcon}},"@media(hover:none)":o,"&:hover":o}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:t.calc(n).add(t.fontSize).add(t.paddingXS).equal()}}}}}},E9=t=>{const{componentCls:e}=t;return[{[e]:{[`&${e}-in-form-item`]:{width:"100%"}}},x9(t),p9(t),v9(t),c9(t),{[`${e}-rtl`]:{direction:"rtl"}},tw(t,{borderElCls:`${e}-selector`,focusElCls:`${e}-focused`})]},O9=Gr("Select",(t,{rootPrefixCls:e})=>{const r=Xt(t,{rootPrefixCls:e,inputPaddingHorizontalBase:t.calc(t.paddingSM).sub(1).equal(),multipleSelectItemHeight:t.multipleItemHeight,selectHeight:t.controlHeight});return[E9(r),w9(r)]},g9,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var I9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},T9=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:I9}))},_9=d.forwardRef(T9),P9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},R9=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:P9}))},xM=d.forwardRef(R9),N9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},M9=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:N9}))},fw=d.forwardRef(M9);function D9({suffixIcon:t,clearIcon:e,menuItemSelectedIcon:r,removeIcon:n,loading:i,multiple:o,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:f}){const h=e??d.createElement(H$,null),v=y=>t===null&&!a&&!u?null:d.createElement(d.Fragment,null,l!==!1&&y,a&&c);let g=null;if(t!==void 0)g=v(t);else if(i)g=v(d.createElement(Ep,{spin:!0}));else{const y=`${s}-suffix`;g=({open:b,showSearch:$})=>v(b&&$?d.createElement(fw,{className:y}):d.createElement(xM,{className:y}))}let m=null;r!==void 0?m=r:o?m=d.createElement(_9,null):m=null;let p=null;return n!==void 0?p=n:p=d.createElement(nH,null),{clearIcon:h,suffixIcon:g,itemIcon:m,removeIcon:p}}function A9(t,e){return e!==void 0?e:t!==null}var j9=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const EM="SECRET_COMBOBOX_MODE_DO_NOT_USE",k9=(t,e)=>{var r,n,i,o,a;const{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:f,popupClassName:h,dropdownClassName:v,listHeight:g=256,placement:m,listItemHeight:p,size:y,disabled:b,notFoundContent:$,status:S,builtinPlacements:w,dropdownMatchSelectWidth:C,popupMatchSelectWidth:E,direction:O,style:x,allowClear:I,variant:T,dropdownStyle:N,transitionName:P,tagRender:_,maxCount:R,prefix:M,dropdownRender:D,popupRender:j,onDropdownVisibleChange:k,onOpenChange:V,styles:G,classNames:W}=t,Y=j9(t,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:q,getPrefixCls:J,renderEmpty:oe,direction:ie,virtual:te,popupMatchSelectWidth:z,popupOverflow:K}=d.useContext(Dt),{showSearch:B,style:F,styles:U,className:Z,classNames:ee}=Oo("select"),[,Q]=_n(),ce=p??Q?.controlHeight,me=J("select",s),Te=J(),_e=O??ie,{compactSize:ve,compactItemClassnames:ye}=hc(me,_e),[xe,ge]=dw("select",T,l),ne=yi(me),[X,fe,pe]=O9(me,ne),$e=d.useMemo(()=>{const{mode:Ge}=t;if(Ge!=="combobox")return Ge===EM?"combobox":Ge},[t.mode]),Ee=$e==="multiple"||$e==="tags",be=A9(t.suffixIcon,t.showArrow),H=(r=E??C)!==null&&r!==void 0?r:z,re=((n=G?.popup)===null||n===void 0?void 0:n.root)||((i=U.popup)===null||i===void 0?void 0:i.root)||N,he=j||D,ue=V||k,{status:we,hasFeedback:Ie,isFormItemInput:Fe,feedbackIcon:qe}=d.useContext(Bn),st=Fp(we,S);let ft;$!==void 0?ft=$:$e==="combobox"?ft=null:ft=oe?.("Select")||d.createElement($M,{componentName:"Select"});const{suffixIcon:et,itemIcon:St,removeIcon:Et,clearIcon:at}=D9(Object.assign(Object.assign({},Y),{multiple:Ee,hasFeedback:Ie,feedbackIcon:qe,showSuffixIcon:be,prefixCls:me,componentName:"Select"})),nt=I===!0?{clearIcon:at}:I,Le=yn(Y,["suffixIcon","itemIcon"]),ze=ae(((o=W?.popup)===null||o===void 0?void 0:o.root)||((a=ee?.popup)===null||a===void 0?void 0:a.root)||h||v,{[`${me}-dropdown-${_e}`]:_e==="rtl"},u,ee.root,W?.root,pe,ne,fe),Ne=no(Ge=>{var We;return(We=y??ve)!==null&&We!==void 0?We:Ge}),Ye=d.useContext(Ji),lt=b??Ye,De=ae({[`${me}-lg`]:Ne==="large",[`${me}-sm`]:Ne==="small",[`${me}-rtl`]:_e==="rtl",[`${me}-${xe}`]:ge,[`${me}-in-form-item`]:Fe},Tv(me,st,Ie),ye,Z,c,ee.root,W?.root,u,pe,ne,fe),Me=d.useMemo(()=>m!==void 0?m:_e==="rtl"?"bottomRight":"bottomLeft",[m,_e]),[Qe]=Op("SelectLike",re?.zIndex);return X(d.createElement(uw,Object.assign({ref:e,virtual:te,showSearch:B},Le,{style:Object.assign(Object.assign(Object.assign(Object.assign({},U.root),G?.root),F),x),dropdownMatchSelectWidth:H,transitionName:jN(Te,"slide-up",P),builtinPlacements:l9(w,K),listHeight:g,listItemHeight:ce,mode:$e,prefixCls:me,placement:Me,direction:_e,prefix:M,suffixIcon:et,menuItemSelectedIcon:St,removeIcon:Et,allowClear:nt,notFoundContent:ft,className:De,getPopupContainer:f||q,dropdownClassName:ze,disabled:lt,dropdownStyle:Object.assign(Object.assign({},re),{zIndex:Qe}),maxCount:Ee?R:void 0,tagRender:Ee?_:void 0,dropdownRender:he,onDropdownVisibleChange:ue})))},pc=d.forwardRef(k9),B9=iM(pc,"dropdownAlign");pc.SECRET_COMBOBOX_MODE_DO_NOT_USE=EM;pc.Option=cw;pc.OptGroup=lw;pc._InternalPanelDoNotUseOrYouWillBeFired=B9;const F9=(t,e)=>{typeof t?.addEventListener<"u"?t.addEventListener("change",e):typeof t?.addListener<"u"&&t.addListener(e)},L9=(t,e)=>{typeof t?.removeEventListener<"u"?t.removeEventListener("change",e):typeof t?.removeListener<"u"&&t.removeListener(e)},Yu=["xxl","xl","lg","md","sm","xs"],z9=t=>({xs:`(max-width: ${t.screenXSMax}px)`,sm:`(min-width: ${t.screenSM}px)`,md:`(min-width: ${t.screenMD}px)`,lg:`(min-width: ${t.screenLG}px)`,xl:`(min-width: ${t.screenXL}px)`,xxl:`(min-width: ${t.screenXXL}px)`}),H9=t=>{const e=t,r=[].concat(Yu).reverse();return r.forEach((n,i)=>{const o=n.toUpperCase(),a=`screen${o}Min`,s=`screen${o}`;if(!(e[a]<=e[s]))throw new Error(`${a}<=${s} fails : !(${e[a]}<=${e[s]})`);if(i<r.length-1){const l=`screen${o}Max`;if(!(e[s]<=e[l]))throw new Error(`${s}<=${l} fails : !(${e[s]}<=${e[l]})`);const u=`screen${r[i+1].toUpperCase()}Min`;if(!(e[l]<=e[u]))throw new Error(`${l}<=${u} fails : !(${e[l]}<=${e[u]})`)}}),t},V9=()=>{const[,t]=_n(),e=z9(H9(t));return de.useMemo(()=>{const r=new Map;let n=-1,i={};return{responsiveMap:e,matchHandlers:{},dispatch(o){return i=o,r.forEach(a=>a(i)),r.size>=1},subscribe(o){return r.size||this.register(),n+=1,r.set(n,o),o(i),n},unsubscribe(o){r.delete(o),r.size||this.unregister()},register(){Object.entries(e).forEach(([o,a])=>{const s=({matches:c})=>{this.dispatch(Object.assign(Object.assign({},i),{[o]:c}))},l=window.matchMedia(a);F9(l,s),this.matchHandlers[a]={mql:l,listener:s},s(l)})},unregister(){Object.values(e).forEach(o=>{const a=this.matchHandlers[o];L9(a?.mql,a?.listener)}),r.clear()}}},[t])};function OM(){const[,t]=d.useReducer(e=>e+1,0);return t}function hw(t=!0,e={}){const r=d.useRef(e),n=OM(),i=V9();return Lt(()=>{const o=i.subscribe(a=>{r.current=a,t&&n()});return()=>i.unsubscribe(o)},[]),r.current}function IM(t){var e=t.children,r=t.prefixCls,n=t.id,i=t.overlayInnerStyle,o=t.bodyClassName,a=t.className,s=t.style;return d.createElement("div",{className:ae("".concat(r,"-content"),a),style:s},d.createElement("div",{className:ae("".concat(r,"-inner"),o),id:n,role:"tooltip",style:i},typeof e=="function"?e():e))}var Qs={shiftX:64,adjustY:1},el={adjustX:1,shiftY:!0},Ei=[0,0],W9={left:{points:["cr","cl"],overflow:el,offset:[-4,0],targetOffset:Ei},right:{points:["cl","cr"],overflow:el,offset:[4,0],targetOffset:Ei},top:{points:["bc","tc"],overflow:Qs,offset:[0,-4],targetOffset:Ei},bottom:{points:["tc","bc"],overflow:Qs,offset:[0,4],targetOffset:Ei},topLeft:{points:["bl","tl"],overflow:Qs,offset:[0,-4],targetOffset:Ei},leftTop:{points:["tr","tl"],overflow:el,offset:[-4,0],targetOffset:Ei},topRight:{points:["br","tr"],overflow:Qs,offset:[0,-4],targetOffset:Ei},rightTop:{points:["tl","tr"],overflow:el,offset:[4,0],targetOffset:Ei},bottomRight:{points:["tr","br"],overflow:Qs,offset:[0,4],targetOffset:Ei},rightBottom:{points:["bl","br"],overflow:el,offset:[4,0],targetOffset:Ei},bottomLeft:{points:["tl","bl"],overflow:Qs,offset:[0,4],targetOffset:Ei},leftBottom:{points:["br","bl"],overflow:el,offset:[-4,0],targetOffset:Ei}},K9=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],U9=function(e,r){var n=e.overlayClassName,i=e.trigger,o=i===void 0?["hover"]:i,a=e.mouseEnterDelay,s=a===void 0?0:a,l=e.mouseLeaveDelay,c=l===void 0?.1:l,u=e.overlayStyle,f=e.prefixCls,h=f===void 0?"rc-tooltip":f,v=e.children,g=e.onVisibleChange,m=e.afterVisibleChange,p=e.transitionName,y=e.animation,b=e.motion,$=e.placement,S=$===void 0?"right":$,w=e.align,C=w===void 0?{}:w,E=e.destroyTooltipOnHide,O=E===void 0?!1:E,x=e.defaultVisible,I=e.getTooltipContainer,T=e.overlayInnerStyle;e.arrowContent;var N=e.overlay,P=e.id,_=e.showArrow,R=_===void 0?!0:_,M=e.classNames,D=e.styles,j=mt(e,K9),k=rw(P),V=d.useRef(null);d.useImperativeHandle(r,function(){return V.current});var G=L({},j);"visible"in e&&(G.popupVisible=e.visible);var W=function(){return d.createElement(IM,{key:"content",prefixCls:h,id:k,bodyClassName:M?.body,overlayInnerStyle:L(L({},T),D?.body)},N)},Y=function(){var J=d.Children.only(v),oe=J?.props||{},ie=L(L({},oe),{},{"aria-describedby":N?k:null});return d.cloneElement(v,ie)};return d.createElement(kp,Re({popupClassName:ae(n,M?.root),prefixCls:h,popup:W,action:o,builtinPlacements:W9,popupPlacement:S,ref:V,popupAlign:C,getPopupContainer:I,onPopupVisibleChange:g,afterPopupVisibleChange:m,popupTransitionName:p,popupAnimation:y,popupMotion:b,defaultPopupVisible:x,autoDestroy:O,mouseLeaveDelay:c,popupStyle:L(L({},u),D?.root),mouseEnterDelay:s,arrow:R},G),Y())};const q9=d.forwardRef(U9);function TM(t){const{sizePopupArrow:e,borderRadiusXS:r,borderRadiusOuter:n}=t,i=e/2,o=0,a=i,s=n*1/Math.sqrt(2),l=i-n*(1-1/Math.sqrt(2)),c=i-r*(1/Math.sqrt(2)),u=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*i-c,h=u,v=2*i-s,g=l,m=2*i-o,p=a,y=i*Math.sqrt(2)+n*(Math.sqrt(2)-2),b=n*(Math.sqrt(2)-1),$=`polygon(${b}px 100%, 50% ${b}px, ${2*i-b}px 100%, ${b}px 100%)`,S=`path('M ${o} ${a} A ${n} ${n} 0 0 0 ${s} ${l} L ${c} ${u} A ${r} ${r} 0 0 1 ${f} ${h} L ${v} ${g} A ${n} ${n} 0 0 0 ${m} ${p} Z')`;return{arrowShadowWidth:y,arrowPath:S,arrowPolygon:$}}const G9=(t,e,r)=>{const{sizePopupArrow:n,arrowPolygon:i,arrowPath:o,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=t;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:l(n).div(2).equal(),background:e,clipPath:{_multi_value_:!0,value:[i,o]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${se(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}},_M=8;function vw(t){const{contentRadius:e,limitVerticalRadius:r}=t,n=e>12?e+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?_M:n}}function Vf(t,e){return t?e:{}}function PM(t,e,r){const{componentCls:n,boxShadowPopoverArrow:i,arrowOffsetVertical:o,arrowOffsetHorizontal:a}=t,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},G9(t,e,i)),{"&:before":{background:e}})]},Vf(!!l.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${se(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Vf(!!l.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${se(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Vf(!!l.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:o},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:o}})),Vf(!!l.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:o},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:o}}))}}function X9(t,e,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};const i=n&&typeof n=="object"?n:{},o={};switch(t){case"top":case"bottom":o.shiftX=e.arrowOffsetHorizontal*2+r,o.shiftY=!0,o.adjustY=!0;break;case"left":case"right":o.shiftY=e.arrowOffsetVertical*2+r,o.shiftX=!0,o.adjustX=!0;break}const a=Object.assign(Object.assign({},o),i);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}const eE={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},Y9={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},J9=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function RM(t){const{arrowWidth:e,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:i,borderRadius:o,visibleFirst:a}=t,s=e/2,l={};return Object.keys(eE).forEach(c=>{const u=n&&Y9[c]||eE[c],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=f,J9.has(c)&&(f.autoArrow=!1),c){case"top":case"topLeft":case"topRight":f.offset[1]=-s-i;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+i;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-i;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+i;break}const h=vw({contentRadius:o,limitVerticalRadius:!0});if(n)switch(c){case"topLeft":case"bottomLeft":f.offset[0]=-h.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=h.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-h.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=h.arrowOffsetHorizontal*2-s;break}f.overflow=X9(c,h,e,r),a&&(f.htmlRegion="visibleFirst")}),l}const Z9=t=>{const{calc:e,componentCls:r,tooltipMaxWidth:n,tooltipColor:i,tooltipBg:o,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:f,arrowOffsetHorizontal:h,sizePopupArrow:v}=t,g=e(a).add(v).add(h).equal(),m=e(a).mul(2).add(v).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Ar(t)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":o,[`${r}-inner`]:{minWidth:m,minHeight:l,padding:`${se(t.calc(u).div(2).equal())} ${se(f)}`,color:i,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:o,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:g},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:t.min(a,_M)}},[`${r}-content`]:{position:"relative"}}),i6(t,(p,{darkColor:y})=>({[`&${r}-${p}`]:{[`${r}-inner`]:{backgroundColor:y},[`${r}-arrow`]:{"--antd-arrow-background-color":y}}}))),{"&-rtl":{direction:"rtl"}})},PM(t,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:t.sizePopupArrow}}]},Q9=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+70},vw({contentRadius:t.borderRadius,limitVerticalRadius:!0})),TM(Xt(t,{borderRadiusOuter:Math.min(t.borderRadiusOuter,4)}))),NM=(t,e=!0)=>Gr("Tooltip",n=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a}=n,s=Xt(n,{tooltipMaxWidth:250,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[Z9(s),Q$(n,"zoom-big-fast")]},Q9,{resetStyle:!1,injectStyle:e})(t),eK=ys.map(t=>`${t}-inverse`);function tK(t,e=!0){return e?[].concat(Oe(eK),Oe(ys)).includes(t):ys.includes(t)}function MM(t,e){const r=tK(e),n=ae({[`${t}-${e}`]:e&&r}),i={},o={};return e&&!r&&(i.background=e,o["--antd-arrow-background-color"]=e),{className:n,overlayStyle:i,arrowStyle:o}}const rK=t=>{const{prefixCls:e,className:r,placement:n="top",title:i,color:o,overlayInnerStyle:a}=t,{getPrefixCls:s}=d.useContext(Dt),l=s("tooltip",e),[c,u,f]=NM(l),h=MM(l,o),v=h.arrowStyle,g=Object.assign(Object.assign({},a),h.overlayStyle),m=ae(u,f,l,`${l}-pure`,`${l}-placement-${n}`,r,h.className);return c(d.createElement("div",{className:m,style:v},d.createElement("div",{className:`${l}-arrow`}),d.createElement(IM,Object.assign({},t,{className:u,prefixCls:l,overlayInnerStyle:g}),i)))};var nK=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const iK=d.forwardRef((t,e)=>{var r,n;const{prefixCls:i,openClassName:o,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:f,destroyTooltipOnHide:h,destroyOnHidden:v,arrow:g=!0,title:m,overlay:p,builtinPlacements:y,arrowPointAtCenter:b=!1,autoAdjustOverflow:$=!0,motion:S,getPopupContainer:w,placement:C="top",mouseEnterDelay:E=.1,mouseLeaveDelay:O=.1,overlayStyle:x,rootClassName:I,overlayClassName:T,styles:N,classNames:P}=t,_=nK(t,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),R=!!g,[,M]=_n(),{getPopupContainer:D,getPrefixCls:j,direction:k,className:V,style:G,classNames:W,styles:Y}=Oo("tooltip"),q=Ms(),J=d.useRef(null),oe=()=>{var be;(be=J.current)===null||be===void 0||be.forceAlign()};d.useImperativeHandle(e,()=>{var be,H;return{forceAlign:oe,forcePopupAlign:()=>{q.deprecated(!1,"forcePopupAlign","forceAlign"),oe()},nativeElement:(be=J.current)===null||be===void 0?void 0:be.nativeElement,popupElement:(H=J.current)===null||H===void 0?void 0:H.popupElement}});const[ie,te]=ln(!1,{value:(r=t.open)!==null&&r!==void 0?r:t.visible,defaultValue:(n=t.defaultOpen)!==null&&n!==void 0?n:t.defaultVisible}),z=!m&&!p&&m!==0,K=be=>{var H,re;te(z?!1:be),z||((H=t.onOpenChange)===null||H===void 0||H.call(t,be),(re=t.onVisibleChange)===null||re===void 0||re.call(t,be))},B=d.useMemo(()=>{var be,H;let re=b;return typeof g=="object"&&(re=(H=(be=g.pointAtCenter)!==null&&be!==void 0?be:g.arrowPointAtCenter)!==null&&H!==void 0?H:b),y||RM({arrowPointAtCenter:re,autoAdjustOverflow:$,arrowWidth:R?M.sizePopupArrow:0,borderRadius:M.borderRadius,offset:M.marginXXS,visibleFirst:!0})},[b,g,y,M]),F=d.useMemo(()=>m===0?m:p||m||"",[p,m]),U=d.createElement(Ov,{space:!0},typeof F=="function"?F():F),Z=j("tooltip",i),ee=j(),Q=t["data-popover-inject"];let ce=ie;!("open"in t)&&!("visible"in t)&&z&&(ce=!1);const me=d.isValidElement(c)&&!NN(c)?c:d.createElement("span",null,c),Te=me.props,_e=!Te.className||typeof Te.className=="string"?ae(Te.className,o||`${Z}-open`):Te.className,[ve,ye,xe]=NM(Z,!Q),ge=MM(Z,s),ne=ge.arrowStyle,X=ae(T,{[`${Z}-rtl`]:k==="rtl"},ge.className,I,ye,xe,V,W.root,P?.root),fe=ae(W.body,P?.body),[pe,$e]=Op("Tooltip",_.zIndex),Ee=d.createElement(q9,Object.assign({},_,{zIndex:pe,showArrow:R,placement:C,mouseEnterDelay:E,mouseLeaveDelay:O,prefixCls:Z,classNames:{root:X,body:fe},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ne),Y.root),G),x),N?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},Y.body),l),N?.body),ge.overlayStyle)},getTooltipContainer:w||a||D,ref:J,builtinPlacements:B,overlay:U,visible:ce,onVisibleChange:K,afterVisibleChange:u??f,arrowContent:d.createElement("span",{className:`${Z}-arrow-content`}),motion:{motionName:jN(ee,"zoom-big-fast",t.transitionName),motionDeadline:1e3},destroyTooltipOnHide:v??!!h}),ce?gi(me,{className:_e}):me);return ve(d.createElement(V$.Provider,{value:$e},Ee))}),Ju=iK;Ju._InternalPanelDoNotUseOrYouWillBeFired=rK;var oK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},aK=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:oK}))},Z0=d.forwardRef(aK),sK=Ze.ESC,lK=Ze.TAB;function cK(t){var e=t.visible,r=t.triggerRef,n=t.onVisibleChange,i=t.autoFocus,o=t.overlayRef,a=d.useRef(!1),s=function(){if(e){var f,h;(f=r.current)===null||f===void 0||(h=f.focus)===null||h===void 0||h.call(f),n?.(!1)}},l=function(){var f;return(f=o.current)!==null&&f!==void 0&&f.focus?(o.current.focus(),a.current=!0,!0):!1},c=function(f){switch(f.keyCode){case sK:s();break;case lK:{var h=!1;a.current||(h=l()),h?f.preventDefault():s();break}}};d.useEffect(function(){return e?(window.addEventListener("keydown",c),i&&Ht(l,3),function(){window.removeEventListener("keydown",c),a.current=!1}):function(){a.current=!1}},[e])}var uK=d.forwardRef(function(t,e){var r=t.overlay,n=t.arrow,i=t.prefixCls,o=d.useMemo(function(){var s;return typeof r=="function"?s=r():s=r,s},[r]),a=mi(e,ja(o));return de.createElement(de.Fragment,null,n&&de.createElement("div",{className:"".concat(i,"-arrow")}),de.cloneElement(o,{ref:Yi(o)?a:void 0}))}),tl={adjustX:1,adjustY:1},rl=[0,0],dK={topLeft:{points:["bl","tl"],overflow:tl,offset:[0,-4],targetOffset:rl},top:{points:["bc","tc"],overflow:tl,offset:[0,-4],targetOffset:rl},topRight:{points:["br","tr"],overflow:tl,offset:[0,-4],targetOffset:rl},bottomLeft:{points:["tl","bl"],overflow:tl,offset:[0,4],targetOffset:rl},bottom:{points:["tc","bc"],overflow:tl,offset:[0,4],targetOffset:rl},bottomRight:{points:["tr","br"],overflow:tl,offset:[0,4],targetOffset:rl}},fK=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function hK(t,e){var r,n=t.arrow,i=n===void 0?!1:n,o=t.prefixCls,a=o===void 0?"rc-dropdown":o,s=t.transitionName,l=t.animation,c=t.align,u=t.placement,f=u===void 0?"bottomLeft":u,h=t.placements,v=h===void 0?dK:h,g=t.getPopupContainer,m=t.showAction,p=t.hideAction,y=t.overlayClassName,b=t.overlayStyle,$=t.visible,S=t.trigger,w=S===void 0?["hover"]:S,C=t.autoFocus,E=t.overlay,O=t.children,x=t.onVisibleChange,I=mt(t,fK),T=de.useState(),N=le(T,2),P=N[0],_=N[1],R="visible"in t?$:P,M=de.useRef(null),D=de.useRef(null),j=de.useRef(null);de.useImperativeHandle(e,function(){return M.current});var k=function(te){_(te),x?.(te)};cK({visible:R,triggerRef:j,onVisibleChange:k,autoFocus:C,overlayRef:D});var V=function(te){var z=t.onOverlayClick;_(!1),z&&z(te)},G=function(){return de.createElement(uK,{ref:D,overlay:E,prefixCls:a,arrow:i})},W=function(){return typeof E=="function"?G:G()},Y=function(){var te=t.minOverlayWidthMatchTrigger,z=t.alignPoint;return"minOverlayWidthMatchTrigger"in t?te:!z},q=function(){var te=t.openClassName;return te!==void 0?te:"".concat(a,"-open")},J=de.cloneElement(O,{className:ae((r=O.props)===null||r===void 0?void 0:r.className,R&&q()),ref:Yi(O)?mi(j,ja(O)):void 0}),oe=p;return!oe&&w.indexOf("contextMenu")!==-1&&(oe=["click"]),de.createElement(kp,Re({builtinPlacements:v},I,{prefixCls:a,ref:M,popupClassName:ae(y,A({},"".concat(a,"-show-arrow"),i)),popupStyle:b,action:w,showAction:m,hideAction:oe,popupPlacement:f,popupAlign:c,popupTransitionName:s,popupAnimation:l,popupVisible:R,stretch:Y()?"minWidth":"",popup:W(),onPopupVisibleChange:k,onPopupClick:V,getPopupContainer:g}),J)}const vK=de.forwardRef(hK),pK=t=>typeof t!="object"&&typeof t!="function"||t===null;var DM=d.createContext(null);function AM(t,e){return t===void 0?null:"".concat(t,"-").concat(e)}function jM(t){var e=d.useContext(DM);return AM(e,t)}var gK=["children","locked"],Qi=d.createContext(null);function mK(t,e){var r=L({},t);return Object.keys(e).forEach(function(n){var i=e[n];i!==void 0&&(r[n]=i)}),r}function Zu(t){var e=t.children,r=t.locked,n=mt(t,gK),i=d.useContext(Qi),o=Rs(function(){return mK(i,n)},[i,n],function(a,s){return!r&&(a[0]!==s[0]||!So(a[1],s[1],!0))});return d.createElement(Qi.Provider,{value:o},e)}var yK=[],kM=d.createContext(null);function Lp(){return d.useContext(kM)}var BM=d.createContext(yK);function gc(t){var e=d.useContext(BM);return d.useMemo(function(){return t!==void 0?[].concat(Oe(e),[t]):e},[e,t])}var FM=d.createContext(null),pw=d.createContext({});function tE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(Cd(t)){var r=t.nodeName.toLowerCase(),n=["input","select","textarea","button"].includes(r)||t.isContentEditable||r==="a"&&!!t.getAttribute("href"),i=t.getAttribute("tabindex"),o=Number(i),a=null;return i&&!Number.isNaN(o)?a=o:n&&a===null&&(a=0),n&&t.disabled&&(a=null),a!==null&&(a>=0||e&&a<0)}return!1}function bK(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=Oe(t.querySelectorAll("*")).filter(function(n){return tE(n,e)});return tE(t,e)&&r.unshift(t),r}var Q0=Ze.LEFT,e1=Ze.RIGHT,t1=Ze.UP,Gh=Ze.DOWN,Xh=Ze.ENTER,LM=Ze.ESC,Zc=Ze.HOME,Qc=Ze.END,rE=[t1,Gh,Q0,e1];function $K(t,e,r,n){var i,o="prev",a="next",s="children",l="parent";if(t==="inline"&&n===Xh)return{inlineTrigger:!0};var c=A(A({},t1,o),Gh,a),u=A(A(A(A({},Q0,r?a:o),e1,r?o:a),Gh,s),Xh,s),f=A(A(A(A(A(A({},t1,o),Gh,a),Xh,s),LM,l),Q0,r?s:l),e1,r?l:s),h={inline:c,horizontal:u,vertical:f,inlineSub:c,horizontalSub:f,verticalSub:f},v=(i=h["".concat(t).concat(e?"":"Sub")])===null||i===void 0?void 0:i[n];switch(v){case o:return{offset:-1,sibling:!0};case a:return{offset:1,sibling:!0};case l:return{offset:-1,sibling:!1};case s:return{offset:1,sibling:!1};default:return null}}function wK(t){for(var e=t;e;){if(e.getAttribute("data-menu-list"))return e;e=e.parentElement}return null}function SK(t,e){for(var r=t||document.activeElement;r;){if(e.has(r))return r;r=r.parentElement}return null}function gw(t,e){var r=bK(t,!0);return r.filter(function(n){return e.has(n)})}function nE(t,e,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!t)return null;var i=gw(t,e),o=i.length,a=i.findIndex(function(s){return r===s});return n<0?a===-1?a=o-1:a-=1:n>0&&(a+=1),a=(a+o)%o,i[a]}var r1=function(e,r){var n=new Set,i=new Map,o=new Map;return e.forEach(function(a){var s=document.querySelector("[data-menu-id='".concat(AM(r,a),"']"));s&&(n.add(s),o.set(s,a),i.set(a,s))}),{elements:n,key2element:i,element2key:o}};function CK(t,e,r,n,i,o,a,s,l,c){var u=d.useRef(),f=d.useRef();f.current=e;var h=function(){Ht.cancel(u.current)};return d.useEffect(function(){return function(){h()}},[]),function(v){var g=v.which;if([].concat(rE,[Xh,LM,Zc,Qc]).includes(g)){var m=o(),p=r1(m,n),y=p,b=y.elements,$=y.key2element,S=y.element2key,w=$.get(e),C=SK(w,b),E=S.get(C),O=$K(t,a(E,!0).length===1,r,g);if(!O&&g!==Zc&&g!==Qc)return;(rE.includes(g)||[Zc,Qc].includes(g))&&v.preventDefault();var x=function(D){if(D){var j=D,k=D.querySelector("a");k!=null&&k.getAttribute("href")&&(j=k);var V=S.get(D);s(V),h(),u.current=Ht(function(){f.current===V&&j.focus()})}};if([Zc,Qc].includes(g)||O.sibling||!C){var I;!C||t==="inline"?I=i.current:I=wK(C);var T,N=gw(I,b);g===Zc?T=N[0]:g===Qc?T=N[N.length-1]:T=nE(I,b,C,O.offset),x(T)}else if(O.inlineTrigger)l(E);else if(O.offset>0)l(E,!0),h(),u.current=Ht(function(){p=r1(m,n);var M=C.getAttribute("aria-controls"),D=document.getElementById(M),j=nE(D,p.elements);x(j)},5);else if(O.offset<0){var P=a(E,!0),_=P[P.length-2],R=$.get(_);l(_,!1),x(R)}}c?.(v)}}function xK(t){Promise.resolve().then(t)}var mw="__RC_UTIL_PATH_SPLIT__",iE=function(e){return e.join(mw)},EK=function(e){return e.split(mw)},n1="rc-menu-more";function OK(){var t=d.useState({}),e=le(t,2),r=e[1],n=d.useRef(new Map),i=d.useRef(new Map),o=d.useState([]),a=le(o,2),s=a[0],l=a[1],c=d.useRef(0),u=d.useRef(!1),f=function(){u.current||r({})},h=d.useCallback(function($,S){var w=iE(S);i.current.set(w,$),n.current.set($,w),c.current+=1;var C=c.current;xK(function(){C===c.current&&f()})},[]),v=d.useCallback(function($,S){var w=iE(S);i.current.delete(w),n.current.delete($)},[]),g=d.useCallback(function($){l($)},[]),m=d.useCallback(function($,S){var w=n.current.get($)||"",C=EK(w);return S&&s.includes(C[0])&&C.unshift(n1),C},[s]),p=d.useCallback(function($,S){return $.filter(function(w){return w!==void 0}).some(function(w){var C=m(w,!0);return C.includes(S)})},[m]),y=function(){var S=Oe(n.current.keys());return s.length&&S.push(n1),S},b=d.useCallback(function($){var S="".concat(n.current.get($)).concat(mw),w=new Set;return Oe(i.current.keys()).forEach(function(C){C.startsWith(S)&&w.add(i.current.get(C))}),w},[]);return d.useEffect(function(){return function(){u.current=!0}},[]),{registerPath:h,unregisterPath:v,refreshOverflowKeys:g,isSubPathKey:p,getKeyPath:m,getKeys:y,getSubPathKeys:b}}function fu(t){var e=d.useRef(t);e.current=t;var r=d.useCallback(function(){for(var n,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return(n=e.current)===null||n===void 0?void 0:n.call.apply(n,[e].concat(o))},[]);return t?r:void 0}var IK=Math.random().toFixed(5).toString().slice(2),oE=0;function TK(t){var e=ln(t,{value:t}),r=le(e,2),n=r[0],i=r[1];return d.useEffect(function(){oE+=1;var o="".concat(IK,"-").concat(oE);i("rc-menu-uuid-".concat(o))},[]),n}function zM(t,e,r,n){var i=d.useContext(Qi),o=i.activeKey,a=i.onActive,s=i.onInactive,l={active:o===t};return e||(l.onMouseEnter=function(c){r?.({key:t,domEvent:c}),a(t)},l.onMouseLeave=function(c){n?.({key:t,domEvent:c}),s(t)}),l}function HM(t){var e=d.useContext(Qi),r=e.mode,n=e.rtl,i=e.inlineIndent;if(r!=="inline")return null;var o=t;return n?{paddingRight:o*i}:{paddingLeft:o*i}}function VM(t){var e=t.icon,r=t.props,n=t.children,i;return e===null||e===!1?null:(typeof e=="function"?i=d.createElement(e,L({},r)):typeof e!="boolean"&&(i=e),i||n||null)}var _K=["item"];function _v(t){var e=t.item,r=mt(t,_K);return Object.defineProperty(r,"item",{get:function(){return gr(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e}}),r}var PK=["title","attribute","elementRef"],RK=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],NK=["active"],MK=function(t){xo(r,t);var e=Eo(r);function r(){return kr(this,r),e.apply(this,arguments)}return Br(r,[{key:"render",value:function(){var i=this.props,o=i.title,a=i.attribute,s=i.elementRef,l=mt(i,PK),c=yn(l,["eventKey","popupClassName","popupOffset","onTitleClick"]);return gr(!a,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),d.createElement(mo.Item,Re({},a,{title:typeof o=="string"?o:void 0},c,{ref:s}))}}]),r}(d.Component),DK=d.forwardRef(function(t,e){var r=t.style,n=t.className,i=t.eventKey;t.warnKey;var o=t.disabled,a=t.itemIcon,s=t.children,l=t.role,c=t.onMouseEnter,u=t.onMouseLeave,f=t.onClick,h=t.onKeyDown,v=t.onFocus,g=mt(t,RK),m=jM(i),p=d.useContext(Qi),y=p.prefixCls,b=p.onItemClick,$=p.disabled,S=p.overflowDisabled,w=p.itemIcon,C=p.selectedKeys,E=p.onActive,O=d.useContext(pw),x=O._internalRenderMenuItem,I="".concat(y,"-item"),T=d.useRef(),N=d.useRef(),P=$||o,_=Ns(e,N),R=gc(i),M=function(z){return{key:i,keyPath:Oe(R).reverse(),item:T.current,domEvent:z}},D=a||w,j=zM(i,P,c,u),k=j.active,V=mt(j,NK),G=C.includes(i),W=HM(R.length),Y=function(z){if(!P){var K=M(z);f?.(_v(K)),b(K)}},q=function(z){if(h?.(z),z.which===Ze.ENTER){var K=M(z);f?.(_v(K)),b(K)}},J=function(z){E(i),v?.(z)},oe={};t.role==="option"&&(oe["aria-selected"]=G);var ie=d.createElement(MK,Re({ref:T,elementRef:_,role:l===null?"none":l||"menuitem",tabIndex:o?null:-1,"data-menu-id":S&&m?null:m},yn(g,["extra"]),V,oe,{component:"li","aria-disabled":o,style:L(L({},W),r),className:ae(I,A(A(A({},"".concat(I,"-active"),k),"".concat(I,"-selected"),G),"".concat(I,"-disabled"),P),n),onClick:Y,onKeyDown:q,onFocus:J}),s,d.createElement(VM,{props:L(L({},t),{},{isSelected:G}),icon:D}));return x&&(ie=x(ie,t,{selected:G})),ie});function AK(t,e){var r=t.eventKey,n=Lp(),i=gc(r);return d.useEffect(function(){if(n)return n.registerPath(r,i),function(){n.unregisterPath(r,i)}},[i]),n?null:d.createElement(DK,Re({},t,{ref:e}))}const zp=d.forwardRef(AK);var jK=["className","children"],kK=function(e,r){var n=e.className,i=e.children,o=mt(e,jK),a=d.useContext(Qi),s=a.prefixCls,l=a.mode,c=a.rtl;return d.createElement("ul",Re({className:ae(s,c&&"".concat(s,"-rtl"),"".concat(s,"-sub"),"".concat(s,"-").concat(l==="inline"?"inline":"vertical"),n),role:"menu"},o,{"data-menu-list":!0,ref:r}),i)},yw=d.forwardRef(kK);yw.displayName="SubMenuList";function bw(t,e){return Mi(t).map(function(r,n){if(d.isValidElement(r)){var i,o,a=r.key,s=(i=(o=r.props)===null||o===void 0?void 0:o.eventKey)!==null&&i!==void 0?i:a,l=s==null;l&&(s="tmp_key-".concat([].concat(Oe(e),[n]).join("-")));var c={key:s,eventKey:s};return d.cloneElement(r,c)}return r})}var On={adjustX:1,adjustY:1},BK={topLeft:{points:["bl","tl"],overflow:On},topRight:{points:["br","tr"],overflow:On},bottomLeft:{points:["tl","bl"],overflow:On},bottomRight:{points:["tr","br"],overflow:On},leftTop:{points:["tr","tl"],overflow:On},leftBottom:{points:["br","bl"],overflow:On},rightTop:{points:["tl","tr"],overflow:On},rightBottom:{points:["bl","br"],overflow:On}},FK={topLeft:{points:["bl","tl"],overflow:On},topRight:{points:["br","tr"],overflow:On},bottomLeft:{points:["tl","bl"],overflow:On},bottomRight:{points:["tr","br"],overflow:On},rightTop:{points:["tr","tl"],overflow:On},rightBottom:{points:["br","bl"],overflow:On},leftTop:{points:["tl","tr"],overflow:On},leftBottom:{points:["bl","br"],overflow:On}};function WM(t,e,r){if(e)return e;if(r)return r[t]||r.other}var LK={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function zK(t){var e=t.prefixCls,r=t.visible,n=t.children,i=t.popup,o=t.popupStyle,a=t.popupClassName,s=t.popupOffset,l=t.disabled,c=t.mode,u=t.onVisibleChange,f=d.useContext(Qi),h=f.getPopupContainer,v=f.rtl,g=f.subMenuOpenDelay,m=f.subMenuCloseDelay,p=f.builtinPlacements,y=f.triggerSubMenuAction,b=f.forceSubMenuRender,$=f.rootClassName,S=f.motion,w=f.defaultMotions,C=d.useState(!1),E=le(C,2),O=E[0],x=E[1],I=L(v?L({},FK):L({},BK),p),T=LK[c],N=WM(c,S,w),P=d.useRef(N);c!=="inline"&&(P.current=N);var _=L(L({},P.current),{},{leavedClassName:"".concat(e,"-hidden"),removeOnLeave:!1,motionAppear:!0}),R=d.useRef();return d.useEffect(function(){return R.current=Ht(function(){x(r)}),function(){Ht.cancel(R.current)}},[r]),d.createElement(kp,{prefixCls:e,popupClassName:ae("".concat(e,"-popup"),A({},"".concat(e,"-rtl"),v),a,$),stretch:c==="horizontal"?"minWidth":null,getPopupContainer:h,builtinPlacements:I,popupPlacement:T,popupVisible:O,popup:i,popupStyle:o,popupAlign:s&&{offset:s},action:l?[]:[y],mouseEnterDelay:g,mouseLeaveDelay:m,onPopupVisibleChange:u,forceRender:b,popupMotion:_,fresh:!0},n)}function HK(t){var e=t.id,r=t.open,n=t.keyPath,i=t.children,o="inline",a=d.useContext(Qi),s=a.prefixCls,l=a.forceSubMenuRender,c=a.motion,u=a.defaultMotions,f=a.mode,h=d.useRef(!1);h.current=f===o;var v=d.useState(!h.current),g=le(v,2),m=g[0],p=g[1],y=h.current?r:!1;d.useEffect(function(){h.current&&p(!1)},[f]);var b=L({},WM(o,c,u));n.length>1&&(b.motionAppear=!1);var $=b.onVisibleChanged;return b.onVisibleChanged=function(S){return!h.current&&!S&&p(!0),$?.(S)},m?null:d.createElement(Zu,{mode:o,locked:!h.current},d.createElement(ka,Re({visible:y},b,{forceRender:l,removeOnLeave:!1,leavedClassName:"".concat(s,"-hidden")}),function(S){var w=S.className,C=S.style;return d.createElement(yw,{id:e,className:w,style:C},i)}))}var VK=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],WK=["active"],KK=d.forwardRef(function(t,e){var r=t.style,n=t.className,i=t.title,o=t.eventKey;t.warnKey;var a=t.disabled,s=t.internalPopupClose,l=t.children,c=t.itemIcon,u=t.expandIcon,f=t.popupClassName,h=t.popupOffset,v=t.popupStyle,g=t.onClick,m=t.onMouseEnter,p=t.onMouseLeave,y=t.onTitleClick,b=t.onTitleMouseEnter,$=t.onTitleMouseLeave,S=mt(t,VK),w=jM(o),C=d.useContext(Qi),E=C.prefixCls,O=C.mode,x=C.openKeys,I=C.disabled,T=C.overflowDisabled,N=C.activeKey,P=C.selectedKeys,_=C.itemIcon,R=C.expandIcon,M=C.onItemClick,D=C.onOpenChange,j=C.onActive,k=d.useContext(pw),V=k._internalRenderSubMenuItem,G=d.useContext(FM),W=G.isSubPathKey,Y=gc(),q="".concat(E,"-submenu"),J=I||a,oe=d.useRef(),ie=d.useRef(),te=c??_,z=u??R,K=x.includes(o),B=!T&&K,F=W(P,o),U=zM(o,J,b,$),Z=U.active,ee=mt(U,WK),Q=d.useState(!1),ce=le(Q,2),me=ce[0],Te=ce[1],_e=function(we){J||Te(we)},ve=function(we){_e(!0),m?.({key:o,domEvent:we})},ye=function(we){_e(!1),p?.({key:o,domEvent:we})},xe=d.useMemo(function(){return Z||(O!=="inline"?me||W([N],o):!1)},[O,Z,N,me,o,W]),ge=HM(Y.length),ne=function(we){J||(y?.({key:o,domEvent:we}),O==="inline"&&D(o,!K))},X=fu(function(ue){g?.(_v(ue)),M(ue)}),fe=function(we){O!=="inline"&&D(o,we)},pe=function(){j(o)},$e=w&&"".concat(w,"-popup"),Ee=d.useMemo(function(){return d.createElement(VM,{icon:O!=="horizontal"?z:void 0,props:L(L({},t),{},{isOpen:B,isSubMenu:!0})},d.createElement("i",{className:"".concat(q,"-arrow")}))},[O,z,t,B,q]),be=d.createElement("div",Re({role:"menuitem",style:ge,className:"".concat(q,"-title"),tabIndex:J?null:-1,ref:oe,title:typeof i=="string"?i:null,"data-menu-id":T&&w?null:w,"aria-expanded":B,"aria-haspopup":!0,"aria-controls":$e,"aria-disabled":J,onClick:ne,onFocus:pe},ee),i,Ee),H=d.useRef(O);if(O!=="inline"&&Y.length>1?H.current="vertical":H.current=O,!T){var re=H.current;be=d.createElement(zK,{mode:re,prefixCls:q,visible:!s&&B&&O!=="inline",popupClassName:f,popupOffset:h,popupStyle:v,popup:d.createElement(Zu,{mode:re==="horizontal"?"vertical":re},d.createElement(yw,{id:$e,ref:ie},l)),disabled:J,onVisibleChange:fe},be)}var he=d.createElement(mo.Item,Re({ref:e,role:"none"},S,{component:"li",style:r,className:ae(q,"".concat(q,"-").concat(O),n,A(A(A(A({},"".concat(q,"-open"),B),"".concat(q,"-active"),xe),"".concat(q,"-selected"),F),"".concat(q,"-disabled"),J)),onMouseEnter:ve,onMouseLeave:ye}),be,!T&&d.createElement(HK,{id:$e,open:B,keyPath:Y},l));return V&&(he=V(he,t,{selected:F,active:xe,open:B,disabled:J})),d.createElement(Zu,{onItemClick:X,mode:O==="horizontal"?"vertical":O,itemIcon:te,expandIcon:z},he)}),Hp=d.forwardRef(function(t,e){var r=t.eventKey,n=t.children,i=gc(r),o=bw(n,i),a=Lp();d.useEffect(function(){if(a)return a.registerPath(r,i),function(){a.unregisterPath(r,i)}},[i]);var s;return a?s=o:s=d.createElement(KK,Re({ref:e},t),o),d.createElement(BM.Provider,{value:i},s)});function $w(t){var e=t.className,r=t.style,n=d.useContext(Qi),i=n.prefixCls,o=Lp();return o?null:d.createElement("li",{role:"separator",className:ae("".concat(i,"-item-divider"),e),style:r})}var UK=["className","title","eventKey","children"],qK=d.forwardRef(function(t,e){var r=t.className,n=t.title;t.eventKey;var i=t.children,o=mt(t,UK),a=d.useContext(Qi),s=a.prefixCls,l="".concat(s,"-item-group");return d.createElement("li",Re({ref:e,role:"presentation"},o,{onClick:function(u){return u.stopPropagation()},className:ae(l,r)}),d.createElement("div",{role:"presentation",className:"".concat(l,"-title"),title:typeof n=="string"?n:void 0},n),d.createElement("ul",{role:"group",className:"".concat(l,"-list")},i))}),ww=d.forwardRef(function(t,e){var r=t.eventKey,n=t.children,i=gc(r),o=bw(n,i),a=Lp();return a?o:d.createElement(qK,Re({ref:e},yn(t,["warnKey"])),o)}),GK=["label","children","key","type","extra"];function i1(t,e,r){var n=e.item,i=e.group,o=e.submenu,a=e.divider;return(t||[]).map(function(s,l){if(s&&tt(s)==="object"){var c=s,u=c.label,f=c.children,h=c.key,v=c.type,g=c.extra,m=mt(c,GK),p=h??"tmp-".concat(l);return f||v==="group"?v==="group"?d.createElement(i,Re({key:p},m,{title:u}),i1(f,e,r)):d.createElement(o,Re({key:p},m,{title:u}),i1(f,e,r)):v==="divider"?d.createElement(a,Re({key:p},m)):d.createElement(n,Re({key:p},m,{extra:g}),u,(!!g||g===0)&&d.createElement("span",{className:"".concat(r,"-item-extra")},g))}return null}).filter(function(s){return s})}function aE(t,e,r,n,i){var o=t,a=L({divider:$w,item:zp,group:ww,submenu:Hp},n);return e&&(o=i1(e,a,i)),bw(o,r)}var XK=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Ga=[],YK=d.forwardRef(function(t,e){var r,n=t,i=n.prefixCls,o=i===void 0?"rc-menu":i,a=n.rootClassName,s=n.style,l=n.className,c=n.tabIndex,u=c===void 0?0:c,f=n.items,h=n.children,v=n.direction,g=n.id,m=n.mode,p=m===void 0?"vertical":m,y=n.inlineCollapsed,b=n.disabled,$=n.disabledOverflow,S=n.subMenuOpenDelay,w=S===void 0?.1:S,C=n.subMenuCloseDelay,E=C===void 0?.1:C,O=n.forceSubMenuRender,x=n.defaultOpenKeys,I=n.openKeys,T=n.activeKey,N=n.defaultActiveFirst,P=n.selectable,_=P===void 0?!0:P,R=n.multiple,M=R===void 0?!1:R,D=n.defaultSelectedKeys,j=n.selectedKeys,k=n.onSelect,V=n.onDeselect,G=n.inlineIndent,W=G===void 0?24:G,Y=n.motion,q=n.defaultMotions,J=n.triggerSubMenuAction,oe=J===void 0?"hover":J,ie=n.builtinPlacements,te=n.itemIcon,z=n.expandIcon,K=n.overflowedIndicator,B=K===void 0?"...":K,F=n.overflowedIndicatorPopupClassName,U=n.getPopupContainer,Z=n.onClick,ee=n.onOpenChange,Q=n.onKeyDown;n.openAnimation,n.openTransitionName;var ce=n._internalRenderMenuItem,me=n._internalRenderSubMenuItem,Te=n._internalComponents,_e=mt(n,XK),ve=d.useMemo(function(){return[aE(h,f,Ga,Te,o),aE(h,f,Ga,{},o)]},[h,f,Te]),ye=le(ve,2),xe=ye[0],ge=ye[1],ne=d.useState(!1),X=le(ne,2),fe=X[0],pe=X[1],$e=d.useRef(),Ee=TK(g),be=v==="rtl",H=ln(x,{value:I,postState:function(Je){return Je||Ga}}),re=le(H,2),he=re[0],ue=re[1],we=function(Je){var Xe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Ft(){ue(Je),ee?.(Je)}Xe?Hl.flushSync(Ft):Ft()},Ie=d.useState(he),Fe=le(Ie,2),qe=Fe[0],st=Fe[1],ft=d.useRef(!1),et=d.useMemo(function(){return(p==="inline"||p==="vertical")&&y?["vertical",y]:[p,!1]},[p,y]),St=le(et,2),Et=St[0],at=St[1],nt=Et==="inline",Le=d.useState(Et),ze=le(Le,2),Ne=ze[0],Ye=ze[1],lt=d.useState(at),De=le(lt,2),Me=De[0],Qe=De[1];d.useEffect(function(){Ye(Et),Qe(at),ft.current&&(nt?ue(qe):we(Ga))},[Et,at]);var Ge=d.useState(0),We=le(Ge,2),it=We[0],Ue=We[1],He=it>=xe.length-1||Ne!=="horizontal"||$;d.useEffect(function(){nt&&st(he)},[he]),d.useEffect(function(){return ft.current=!0,function(){ft.current=!1}},[]);var rt=OK(),ht=rt.registerPath,_t=rt.unregisterPath,Nt=rt.refreshOverflowKeys,kt=rt.isSubPathKey,Bt=rt.getKeyPath,qt=rt.getKeys,Vt=rt.getSubPathKeys,Be=d.useMemo(function(){return{registerPath:ht,unregisterPath:_t}},[ht,_t]),Ve=d.useMemo(function(){return{isSubPathKey:kt}},[kt]);d.useEffect(function(){Nt(He?Ga:xe.slice(it+1).map(function(Kt){return Kt.key}))},[it,He]);var vt=ln(T||N&&((r=xe[0])===null||r===void 0?void 0:r.key),{value:T}),It=le(vt,2),Pt=It[0],br=It[1],Sr=fu(function(Kt){br(Kt)}),Cn=fu(function(){br(void 0)});d.useImperativeHandle(e,function(){return{list:$e.current,focus:function(Je){var Xe,Ft=qt(),Wt=r1(Ft,Ee),Qt=Wt.elements,or=Wt.key2element,Zr=Wt.element2key,Hr=gw($e.current,Qt),Qr=Pt??(Hr[0]?Zr.get(Hr[0]):(Xe=xe.find(function($t){return!$t.props.disabled}))===null||Xe===void 0?void 0:Xe.key),en=or.get(Qr);if(Qr&&en){var hn;en==null||(hn=en.focus)===null||hn===void 0||hn.call(en,Je)}}}});var ut=ln(D||[],{value:j,postState:function(Je){return Array.isArray(Je)?Je:Je==null?Ga:[Je]}}),pt=le(ut,2),Tt=pt[0],Nr=pt[1],zr=function(Je){if(_){var Xe=Je.key,Ft=Tt.includes(Xe),Wt;M?Ft?Wt=Tt.filter(function(or){return or!==Xe}):Wt=[].concat(Oe(Tt),[Xe]):Wt=[Xe],Nr(Wt);var Qt=L(L({},Je),{},{selectedKeys:Wt});Ft?V?.(Qt):k?.(Qt)}!M&&he.length&&Ne!=="inline"&&we(Ga)},Si=fu(function(Kt){Z?.(_v(Kt)),zr(Kt)}),Wn=fu(function(Kt,Je){var Xe=he.filter(function(Wt){return Wt!==Kt});if(Je)Xe.push(Kt);else if(Ne!=="inline"){var Ft=Vt(Kt);Xe=Xe.filter(function(Wt){return!Ft.has(Wt)})}So(he,Xe,!0)||we(Xe,!0)}),dn=function(Je,Xe){var Ft=Xe??!he.includes(Je);Wn(Je,Ft)},Kn=CK(Ne,Pt,be,Ee,$e,qt,Bt,br,dn,Q);d.useEffect(function(){pe(!0)},[]);var Nn=d.useMemo(function(){return{_internalRenderMenuItem:ce,_internalRenderSubMenuItem:me}},[ce,me]),fn=Ne!=="horizontal"||$?xe:xe.map(function(Kt,Je){return d.createElement(Zu,{key:Kt.key,overflowDisabled:Je>it},Kt)}),Un=d.createElement(mo,Re({id:g,ref:$e,prefixCls:"".concat(o,"-overflow"),component:"ul",itemComponent:zp,className:ae(o,"".concat(o,"-root"),"".concat(o,"-").concat(Ne),l,A(A({},"".concat(o,"-inline-collapsed"),Me),"".concat(o,"-rtl"),be),a),dir:v,style:s,role:"menu",tabIndex:u,data:fn,renderRawItem:function(Je){return Je},renderRawRest:function(Je){var Xe=Je.length,Ft=Xe?xe.slice(-Xe):null;return d.createElement(Hp,{eventKey:n1,title:B,disabled:He,internalPopupClose:Xe===0,popupClassName:F},Ft)},maxCount:Ne!=="horizontal"||$?mo.INVALIDATE:mo.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Je){Ue(Je)},onKeyDown:Kn},_e));return d.createElement(pw.Provider,{value:Nn},d.createElement(DM.Provider,{value:Ee},d.createElement(Zu,{prefixCls:o,rootClassName:a,mode:Ne,openKeys:he,rtl:be,disabled:b,motion:fe?Y:null,defaultMotions:fe?q:null,activeKey:Pt,onActive:Sr,onInactive:Cn,selectedKeys:Tt,inlineIndent:W,subMenuOpenDelay:w,subMenuCloseDelay:E,forceSubMenuRender:O,builtinPlacements:ie,triggerSubMenuAction:oe,getPopupContainer:U,itemIcon:te,expandIcon:z,onItemClick:Si,onOpenChange:Wn},d.createElement(FM.Provider,{value:Ve},Un),d.createElement("div",{style:{display:"none"},"aria-hidden":!0},d.createElement(kM.Provider,{value:Be},ge)))))}),Od=YK;Od.Item=zp;Od.SubMenu=Hp;Od.ItemGroup=ww;Od.Divider=$w;const KM=d.createContext({});var JK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},ZK=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:JK}))},UM=d.forwardRef(ZK);const Pv=d.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1});var QK=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const qM=t=>{const{prefixCls:e,className:r,dashed:n}=t,i=QK(t,["prefixCls","className","dashed"]),{getPrefixCls:o}=d.useContext(Dt),a=o("menu",e),s=ae({[`${a}-item-divider-dashed`]:!!n},r);return d.createElement($w,Object.assign({className:s},i))},GM=t=>{var e;const{className:r,children:n,icon:i,title:o,danger:a,extra:s}=t,{prefixCls:l,firstLevel:c,direction:u,disableMenuItemTitleTooltip:f,inlineCollapsed:h}=d.useContext(Pv),v=$=>{const S=n?.[0],w=d.createElement("span",{className:ae(`${l}-title-content`,{[`${l}-title-content-with-extra`]:!!s||s===0})},n);return(!i||d.isValidElement(n)&&n.type==="span")&&n&&$&&c&&typeof S=="string"?d.createElement("div",{className:`${l}-inline-collapsed-noicon`},S.charAt(0)):w},{siderCollapsed:g}=d.useContext(KM);let m=o;typeof o>"u"?m=c?n:"":o===!1&&(m="");const p={title:m};!g&&!h&&(p.title=null,p.open=!1);const y=Mi(n).length;let b=d.createElement(zp,Object.assign({},yn(t,["title","icon","danger"]),{className:ae({[`${l}-item-danger`]:a,[`${l}-item-only-child`]:(i?y+1:y)===1},r),title:typeof o=="string"?o:void 0}),gi(i,{className:ae(d.isValidElement(i)?(e=i.props)===null||e===void 0?void 0:e.className:void 0,`${l}-item-icon`)}),v(h));return f||(b=d.createElement(Ju,Object.assign({},p,{placement:u==="rtl"?"left":"right",classNames:{root:`${l}-inline-collapsed-tooltip`}}),b)),b};var eU=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const Rv=d.createContext(null),XM=d.forwardRef((t,e)=>{const{children:r}=t,n=eU(t,["children"]),i=d.useContext(Rv),o=d.useMemo(()=>Object.assign(Object.assign({},i),n),[i,n.prefixCls,n.mode,n.selectable,n.rootClassName]),a=I3(r),s=Ns(e,a?ja(r):null);return d.createElement(Rv.Provider,{value:o},d.createElement(Ov,{space:!0},a?d.cloneElement(r,{ref:s}):r))}),tU=t=>{const{componentCls:e,motionDurationSlow:r,horizontalLineHeight:n,colorSplit:i,lineWidth:o,lineType:a,itemPaddingInline:s}=t;return{[`${e}-horizontal`]:{lineHeight:n,border:0,borderBottom:`${se(o)} ${a} ${i}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${e}-item, ${e}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:s},[`> ${e}-item:hover,
        > ${e}-item-active,
        > ${e}-submenu ${e}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${e}-item, ${e}-submenu-title`]:{transition:[`border-color ${r}`,`background ${r}`].join(",")},[`${e}-submenu-arrow`]:{display:"none"}}}},rU=({componentCls:t,menuArrowOffset:e,calc:r})=>({[`${t}-rtl`]:{direction:"rtl"},[`${t}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${t}-rtl${t}-vertical,
    ${t}-submenu-rtl ${t}-vertical`]:{[`${t}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${se(r(e).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${se(e)})`}}}}),sE=t=>Object.assign({},Pa(t)),lE=(t,e)=>{const{componentCls:r,itemColor:n,itemSelectedColor:i,subMenuItemSelectedColor:o,groupTitleColor:a,itemBg:s,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:f,activeBarBorderWidth:h,motionDurationSlow:v,motionEaseInOut:g,motionEaseOut:m,itemPaddingInline:p,motionDurationMid:y,itemHoverColor:b,lineType:$,colorSplit:S,itemDisabledColor:w,dangerItemColor:C,dangerItemHoverColor:E,dangerItemSelectedColor:O,dangerItemActiveBg:x,dangerItemSelectedBg:I,popupBg:T,itemHoverBg:N,itemActiveBg:P,menuSubMenuBg:_,horizontalItemSelectedColor:R,horizontalItemSelectedBg:M,horizontalItemBorderRadius:D,horizontalItemHoverBg:j}=t;return{[`${r}-${e}, ${r}-${e} > ${r}`]:{color:n,background:s,[`&${r}-root:focus-visible`]:Object.assign({},sE(t)),[`${r}-item`]:{"&-group-title, &-extra":{color:a}},[`${r}-submenu-selected > ${r}-submenu-title`]:{color:o},[`${r}-item, ${r}-submenu-title`]:{color:n,[`&:not(${r}-item-disabled):focus-visible`]:Object.assign({},sE(t))},[`${r}-item-disabled, ${r}-submenu-disabled`]:{color:`${w} !important`},[`${r}-item:not(${r}-item-selected):not(${r}-submenu-selected)`]:{[`&:hover, > ${r}-submenu-title:hover`]:{color:b}},[`&:not(${r}-horizontal)`]:{[`${r}-item:not(${r}-item-selected)`]:{"&:hover":{backgroundColor:N},"&:active":{backgroundColor:P}},[`${r}-submenu-title`]:{"&:hover":{backgroundColor:N},"&:active":{backgroundColor:P}}},[`${r}-item-danger`]:{color:C,[`&${r}-item:hover`]:{[`&:not(${r}-item-selected):not(${r}-submenu-selected)`]:{color:E}},[`&${r}-item:active`]:{background:x}},[`${r}-item a`]:{"&, &:hover":{color:"inherit"}},[`${r}-item-selected`]:{color:i,[`&${r}-item-danger`]:{color:O},"a, a:hover":{color:"inherit"}},[`& ${r}-item-selected`]:{backgroundColor:c,[`&${r}-item-danger`]:{backgroundColor:I}},[`&${r}-submenu > ${r}`]:{backgroundColor:_},[`&${r}-popup > ${r}`]:{backgroundColor:T},[`&${r}-submenu-popup > ${r}`]:{backgroundColor:T},[`&${r}-horizontal`]:Object.assign(Object.assign({},e==="dark"?{borderBottom:0}:{}),{[`> ${r}-item, > ${r}-submenu`]:{top:h,marginTop:t.calc(h).mul(-1).equal(),marginBottom:0,borderRadius:D,"&::after":{position:"absolute",insetInline:p,bottom:0,borderBottom:`${se(u)} solid transparent`,transition:`border-color ${v} ${g}`,content:'""'},"&:hover, &-active, &-open":{background:j,"&::after":{borderBottomWidth:u,borderBottomColor:R}},"&-selected":{color:R,backgroundColor:M,"&:hover":{backgroundColor:M},"&::after":{borderBottomWidth:u,borderBottomColor:R}}}}),[`&${r}-root`]:{[`&${r}-inline, &${r}-vertical`]:{borderInlineEnd:`${se(h)} ${$} ${S}`}},[`&${r}-inline`]:{[`${r}-sub${r}-inline`]:{background:l},[`${r}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${se(f)} solid ${i}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${y} ${m}`,`opacity ${y} ${m}`].join(","),content:'""'},[`&${r}-item-danger`]:{"&::after":{borderInlineEndColor:O}}},[`${r}-selected, ${r}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${y} ${g}`,`opacity ${y} ${g}`].join(",")}}}}}},cE=t=>{const{componentCls:e,itemHeight:r,itemMarginInline:n,padding:i,menuArrowSize:o,marginXS:a,itemMarginBlock:s,itemWidth:l,itemPaddingInline:c}=t,u=t.calc(o).add(i).add(a).equal();return{[`${e}-item`]:{position:"relative",overflow:"hidden"},[`${e}-item, ${e}-submenu-title`]:{height:r,lineHeight:se(r),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:n,marginBlock:s,width:l},[`> ${e}-item,
            > ${e}-submenu > ${e}-submenu-title`]:{height:r,lineHeight:se(r)},[`${e}-item-group-list ${e}-submenu-title,
            ${e}-submenu-title`]:{paddingInlineEnd:u}}},nU=t=>{const{componentCls:e,iconCls:r,itemHeight:n,colorTextLightSolid:i,dropdownWidth:o,controlHeightLG:a,motionEaseOut:s,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:f,motionDurationSlow:h,paddingXS:v,boxShadowSecondary:g,collapsedWidth:m,collapsedIconSize:p}=t,y={height:n,lineHeight:se(n),listStylePosition:"inside",listStyleType:"disc"};return[{[e]:{"&-inline, &-vertical":Object.assign({[`&${e}-root`]:{boxShadow:"none"}},cE(t))},[`${e}-submenu-popup`]:{[`${e}-vertical`]:Object.assign(Object.assign({},cE(t)),{boxShadow:g})}},{[`${e}-submenu-popup ${e}-vertical${e}-sub`]:{minWidth:o,maxHeight:`calc(100vh - ${se(t.calc(a).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${e}-inline`]:{width:"100%",[`&${e}-root`]:{[`${e}-item, ${e}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${h}`,`background ${h}`,`padding ${f} ${s}`].join(","),[`> ${e}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${e}-sub${e}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${e}-submenu > ${e}-submenu-title`]:y,[`& ${e}-item-group-title`]:{paddingInlineStart:l}},[`${e}-item`]:y}},{[`${e}-inline-collapsed`]:{width:m,[`&${e}-root`]:{[`${e}-item, ${e}-submenu ${e}-submenu-title`]:{[`> ${e}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-item,
          > ${e}-item-group > ${e}-item-group-list > ${e}-submenu > ${e}-submenu-title,
          > ${e}-submenu > ${e}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${se(t.calc(p).div(2).equal())} - ${se(c)})`,textOverflow:"clip",[`
            ${e}-submenu-arrow,
            ${e}-submenu-expand-icon
          `]:{opacity:0},[`${e}-item-icon, ${r}`]:{margin:0,fontSize:p,lineHeight:se(n),"+ span":{display:"inline-block",opacity:0}}},[`${e}-item-icon, ${r}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${e}-item-icon, ${r}`]:{display:"none"},"a, a:hover":{color:i}},[`${e}-item-group-title`]:Object.assign(Object.assign({},Ku),{paddingInline:v})}}]},uE=t=>{const{componentCls:e,motionDurationSlow:r,motionDurationMid:n,motionEaseInOut:i,motionEaseOut:o,iconCls:a,iconSize:s,iconMarginInlineEnd:l}=t;return{[`${e}-item, ${e}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${r}`,`background ${r}`,`padding calc(${r} + 0.1s) ${i}`].join(","),[`${e}-item-icon, ${a}`]:{minWidth:s,fontSize:s,transition:[`font-size ${n} ${o}`,`margin ${r} ${i}`,`color ${r}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${r} ${i}`,`margin ${r}`,`color ${r}`].join(",")}},[`${e}-item-icon`]:Object.assign({},wd()),[`&${e}-item-only-child`]:{[`> ${a}, > ${e}-item-icon`]:{marginInlineEnd:0}}},[`${e}-item-disabled, ${e}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${e}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},dE=t=>{const{componentCls:e,motionDurationSlow:r,motionEaseInOut:n,borderRadius:i,menuArrowSize:o,menuArrowOffset:a}=t;return{[`${e}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:t.margin,width:o,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${r} ${n}, opacity ${r}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:t.calc(o).mul(.6).equal(),height:t.calc(o).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:i,transition:[`background ${r} ${n}`,`transform ${r} ${n}`,`top ${r} ${n}`,`color ${r} ${n}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${se(t.calc(a).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${se(a)})`}}}}},iU=t=>{const{antCls:e,componentCls:r,fontSize:n,motionDurationSlow:i,motionDurationMid:o,motionEaseInOut:a,paddingXS:s,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:f,borderRadiusLG:h,subMenuItemBorderRadius:v,menuArrowSize:g,menuArrowOffset:m,lineType:p,groupTitleLineHeight:y,groupTitleFontSize:b}=t;return[{"":{[r]:Object.assign(Object.assign({},$v()),{"&-hidden":{display:"none"}})},[`${r}-submenu-hidden`]:{display:"none"}},{[r]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ar(t)),$v()),{marginBottom:0,paddingInlineStart:0,fontSize:n,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${i} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${r}-item`]:{flex:"none"}},[`${r}-item, ${r}-submenu, ${r}-submenu-title`]:{borderRadius:t.itemBorderRadius},[`${r}-item-group-title`]:{padding:`${se(s)} ${se(l)}`,fontSize:b,lineHeight:y,transition:`all ${i}`},[`&-horizontal ${r}-submenu`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`].join(",")},[`${r}-submenu, ${r}-submenu-inline`]:{transition:[`border-color ${i} ${a}`,`background ${i} ${a}`,`padding ${o} ${a}`].join(",")},[`${r}-submenu ${r}-sub`]:{cursor:"initial",transition:[`background ${i} ${a}`,`padding ${i} ${a}`].join(",")},[`${r}-title-content`]:{transition:`color ${i}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${e}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${r}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:t.padding}},[`${r}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${r}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:p,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}}}),uE(t)),{[`${r}-item-group`]:{[`${r}-item-group-list`]:{margin:0,padding:0,[`${r}-item, ${r}-submenu-title`]:{paddingInline:`${se(t.calc(n).mul(2).equal())} ${se(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:f,borderRadius:h,boxShadow:"none",transformOrigin:"0 0",[`&${r}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${r}`]:Object.assign(Object.assign(Object.assign({borderRadius:h},uE(t)),dE(t)),{[`${r}-item, ${r}-submenu > ${r}-submenu-title`]:{borderRadius:v},[`${r}-submenu-title::after`]:{transition:`transform ${i} ${a}`}})},"\n          &-placement-leftTop,\n          &-placement-bottomRight,\n          ":{transformOrigin:"100% 0"},"\n          &-placement-leftBottom,\n          &-placement-topRight,\n          ":{transformOrigin:"100% 100%"},"\n          &-placement-rightBottom,\n          &-placement-topLeft,\n          ":{transformOrigin:"0 100%"},"\n          &-placement-bottomLeft,\n          &-placement-rightTop,\n          ":{transformOrigin:"0 0"},"\n          &-placement-leftTop,\n          &-placement-leftBottom\n          ":{paddingInlineEnd:t.paddingXS},"\n          &-placement-rightTop,\n          &-placement-rightBottom\n          ":{paddingInlineStart:t.paddingXS},"\n          &-placement-topRight,\n          &-placement-topLeft\n          ":{paddingBottom:t.paddingXS},"\n          &-placement-bottomRight,\n          &-placement-bottomLeft\n          ":{paddingTop:t.paddingXS}}}),dE(t)),{[`&-inline-collapsed ${r}-submenu-arrow,
        &-inline ${r}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${se(m)})`},"&::after":{transform:`rotate(45deg) translateX(${se(t.calc(m).mul(-1).equal())})`}},[`${r}-submenu-open${r}-submenu-inline > ${r}-submenu-title > ${r}-submenu-arrow`]:{transform:`translateY(${se(t.calc(g).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${se(t.calc(m).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${se(m)})`}}})},{[`${e}-layout-header`]:{[r]:{lineHeight:"inherit"}}}]},oU=t=>{var e,r,n;const{colorPrimary:i,colorError:o,colorTextDisabled:a,colorErrorBg:s,colorText:l,colorTextDescription:c,colorBgContainer:u,colorFillAlter:f,colorFillContent:h,lineWidth:v,lineWidthBold:g,controlItemBgActive:m,colorBgTextHover:p,controlHeightLG:y,lineHeight:b,colorBgElevated:$,marginXXS:S,padding:w,fontSize:C,controlHeightSM:E,fontSizeLG:O,colorTextLightSolid:x,colorErrorHover:I}=t,T=(e=t.activeBarWidth)!==null&&e!==void 0?e:0,N=(r=t.activeBarBorderWidth)!==null&&r!==void 0?r:v,P=(n=t.itemMarginInline)!==null&&n!==void 0?n:t.marginXXS,_=new Ut(x).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:t.zIndexPopupBase+50,radiusItem:t.borderRadiusLG,itemBorderRadius:t.borderRadiusLG,radiusSubMenuItem:t.borderRadiusSM,subMenuItemBorderRadius:t.borderRadiusSM,colorItemText:l,itemColor:l,colorItemTextHover:l,itemHoverColor:l,colorItemTextHoverHorizontal:i,horizontalItemHoverColor:i,colorGroupTitle:c,groupTitleColor:c,colorItemTextSelected:i,itemSelectedColor:i,subMenuItemSelectedColor:i,colorItemTextSelectedHorizontal:i,horizontalItemSelectedColor:i,colorItemBg:u,itemBg:u,colorItemBgHover:p,itemHoverBg:p,colorItemBgActive:h,itemActiveBg:m,colorSubItemBg:f,subMenuItemBg:f,colorItemBgSelected:m,itemSelectedBg:m,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:T,colorActiveBarHeight:g,activeBarHeight:g,colorActiveBarBorderSize:v,activeBarBorderWidth:N,colorItemTextDisabled:a,itemDisabledColor:a,colorDangerItemText:o,dangerItemColor:o,colorDangerItemTextHover:o,dangerItemHoverColor:o,colorDangerItemTextSelected:o,dangerItemSelectedColor:o,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:P,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:y,groupTitleLineHeight:b,collapsedWidth:y*2,popupBg:$,itemMarginBlock:S,itemPaddingInline:w,horizontalLineHeight:`${y*1.15}px`,iconSize:C,iconMarginInlineEnd:E-C,collapsedIconSize:O,groupTitleFontSize:C,darkItemDisabledColor:new Ut(x).setA(.25).toRgbString(),darkItemColor:_,darkDangerItemColor:o,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:x,darkItemSelectedBg:i,darkDangerItemSelectedBg:o,darkItemHoverBg:"transparent",darkGroupTitleColor:_,darkItemHoverColor:x,darkDangerItemHoverColor:I,darkDangerItemSelectedColor:x,darkDangerItemActiveBg:o,itemWidth:T?`calc(100% + ${N}px)`:`calc(100% - ${P*2}px)`}},aU=(t,e=t,r=!0)=>Gr("Menu",i=>{const{colorBgElevated:o,controlHeightLG:a,fontSize:s,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:f,darkItemSelectedColor:h,darkItemSelectedBg:v,darkDangerItemSelectedBg:g,darkItemHoverBg:m,darkGroupTitleColor:p,darkItemHoverColor:y,darkItemDisabledColor:b,darkDangerItemHoverColor:$,darkDangerItemSelectedColor:S,darkDangerItemActiveBg:w,popupBg:C,darkPopupBg:E}=i,O=i.calc(s).div(7).mul(5).equal(),x=Xt(i,{menuArrowSize:O,menuHorizontalHeight:i.calc(a).mul(1.15).equal(),menuArrowOffset:i.calc(O).mul(.25).equal(),menuSubMenuBg:o,calc:i.calc,popupBg:C}),I=Xt(x,{itemColor:l,itemHoverColor:y,groupTitleColor:p,itemSelectedColor:h,subMenuItemSelectedColor:h,itemBg:u,popupBg:E,subMenuItemBg:f,itemActiveBg:"transparent",itemSelectedBg:v,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:m,itemDisabledColor:b,dangerItemColor:c,dangerItemHoverColor:$,dangerItemSelectedColor:S,dangerItemActiveBg:w,dangerItemSelectedBg:g,menuSubMenuBg:f,horizontalItemSelectedColor:h,horizontalItemSelectedBg:v});return[iU(x),tU(x),nU(x),lE(x,"light"),lE(I,"dark"),rU(x),U$(x),Gl(x,"slide-up"),Gl(x,"slide-down"),Q$(x,"zoom-big")]},oU,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:r,unitless:{groupTitleLineHeight:!0}})(t,e),YM=t=>{var e;const{popupClassName:r,icon:n,title:i,theme:o}=t,a=d.useContext(Pv),{prefixCls:s,inlineCollapsed:l,theme:c}=a,u=gc();let f;if(!n)f=l&&!u.length&&i&&typeof i=="string"?d.createElement("div",{className:`${s}-inline-collapsed-noicon`},i.charAt(0)):d.createElement("span",{className:`${s}-title-content`},i);else{const g=d.isValidElement(i)&&i.type==="span";f=d.createElement(d.Fragment,null,gi(n,{className:ae(d.isValidElement(n)?(e=n.props)===null||e===void 0?void 0:e.className:void 0,`${s}-item-icon`)}),g?i:d.createElement("span",{className:`${s}-title-content`},i))}const h=d.useMemo(()=>Object.assign(Object.assign({},a),{firstLevel:!1}),[a]),[v]=Op("Menu");return d.createElement(Pv.Provider,{value:h},d.createElement(Hp,Object.assign({},yn(t,["icon"]),{title:f,popupClassName:ae(s,r,`${s}-${o||c}`),popupStyle:Object.assign({zIndex:v},t.popupStyle)})))};var sU=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function Em(t){return t===null||t===!1}const lU={item:GM,submenu:YM,divider:qM},cU=d.forwardRef((t,e)=>{var r;const n=d.useContext(Rv),i=n||{},{getPrefixCls:o,getPopupContainer:a,direction:s,menu:l}=d.useContext(Dt),c=o(),{prefixCls:u,className:f,style:h,theme:v="light",expandIcon:g,_internalDisableMenuItemTitleTooltip:m,inlineCollapsed:p,siderCollapsed:y,rootClassName:b,mode:$,selectable:S,onClick:w,overflowedIndicatorPopupClassName:C}=t,E=sU(t,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),O=yn(E,["collapsedWidth"]);(r=i.validator)===null||r===void 0||r.call(i,{mode:$});const x=sr((...W)=>{var Y;w?.apply(void 0,W),(Y=i.onClick)===null||Y===void 0||Y.call(i)}),I=i.mode||$,T=S??i.selectable,N=p??y,P={horizontal:{motionName:`${c}-slide-up`},inline:xv(c),other:{motionName:`${c}-zoom-big`}},_=o("menu",u||i.prefixCls),R=yi(_),[M,D,j]=aU(_,R,!n),k=ae(`${_}-${v}`,l?.className,f),V=d.useMemo(()=>{var W,Y;if(typeof g=="function"||Em(g))return g||null;if(typeof i.expandIcon=="function"||Em(i.expandIcon))return i.expandIcon||null;if(typeof l?.expandIcon=="function"||Em(l?.expandIcon))return l?.expandIcon||null;const q=(W=g??i?.expandIcon)!==null&&W!==void 0?W:l?.expandIcon;return gi(q,{className:ae(`${_}-submenu-expand-icon`,d.isValidElement(q)?(Y=q.props)===null||Y===void 0?void 0:Y.className:void 0)})},[g,i?.expandIcon,l?.expandIcon,_]),G=d.useMemo(()=>({prefixCls:_,inlineCollapsed:N||!1,direction:s,firstLevel:!0,theme:v,mode:I,disableMenuItemTitleTooltip:m}),[_,N,s,m,v]);return M(d.createElement(Rv.Provider,{value:null},d.createElement(Pv.Provider,{value:G},d.createElement(Od,Object.assign({getPopupContainer:a,overflowedIndicator:d.createElement(UM,null),overflowedIndicatorPopupClassName:ae(_,`${_}-${v}`,C),mode:I,selectable:T,onClick:x},O,{inlineCollapsed:N,style:Object.assign(Object.assign({},l?.style),h),className:k,prefixCls:_,direction:s,defaultMotions:P,expandIcon:V,ref:e,rootClassName:ae(b,D,i.rootClassName,j,R),_internalComponents:lU})))))}),mc=d.forwardRef((t,e)=>{const r=d.useRef(null),n=d.useContext(KM);return d.useImperativeHandle(e,()=>({menu:r.current,focus:i=>{var o;(o=r.current)===null||o===void 0||o.focus(i)}})),d.createElement(cU,Object.assign({ref:r},t,n))});mc.Item=GM;mc.SubMenu=YM;mc.Divider=qM;mc.ItemGroup=ww;const uU=t=>{const{componentCls:e,menuCls:r,colorError:n,colorTextLightSolid:i}=t,o=`${r}-item`;return{[`${e}, ${e}-menu-submenu`]:{[`${r} ${o}`]:{[`&${o}-danger:not(${o}-disabled)`]:{color:n,"&:hover":{color:i,backgroundColor:n}}}}}},dU=t=>{const{componentCls:e,menuCls:r,zIndexPopup:n,dropdownArrowDistance:i,sizePopupArrow:o,antCls:a,iconCls:s,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:f,colorTextDisabled:h,fontSizeIcon:v,controlPaddingHorizontal:g,colorBgElevated:m}=t;return[{[e]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:n,display:"block","&::before":{position:"absolute",insetBlock:t.calc(o).div(2).sub(i).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${a}-btn`]:{[`& > ${s}-down, & > ${a}-btn-icon > ${s}-down`]:{fontSize:v}},[`${e}-wrap`]:{position:"relative",[`${a}-btn > ${s}-down`]:{fontSize:v},[`${s}-down::before`]:{transition:`transform ${l}`}},[`${e}-wrap-open`]:{[`${s}-down::before`]:{transform:"rotate(180deg)"}},"\n        &-hidden,\n        &-menu-hidden,\n        &-menu-submenu-hidden\n      ":{display:"none"},[`&${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomLeft,
          &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomLeft,
          &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottom,
          &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottom,
          &${a}-slide-down-enter${a}-slide-down-enter-active${e}-placement-bottomRight,
          &${a}-slide-down-appear${a}-slide-down-appear-active${e}-placement-bottomRight`]:{animationName:G$},[`&${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topLeft,
          &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topLeft,
          &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-top,
          &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-top,
          &${a}-slide-up-enter${a}-slide-up-enter-active${e}-placement-topRight,
          &${a}-slide-up-appear${a}-slide-up-appear-active${e}-placement-topRight`]:{animationName:Y$},[`&${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomLeft,
          &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottom,
          &${a}-slide-down-leave${a}-slide-down-leave-active${e}-placement-bottomRight`]:{animationName:X$},[`&${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topLeft,
          &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-top,
          &${a}-slide-up-leave${a}-slide-up-leave-active${e}-placement-topRight`]:{animationName:J$}}},PM(t,m,{arrowPlacement:{top:!0,bottom:!0}}),{[`${e} ${r}`]:{position:"relative",margin:0},[`${r}-submenu-popup`]:{position:"absolute",zIndex:n,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${e}, ${e}-menu-submenu`]:Object.assign(Object.assign({},Ar(t)),{[r]:Object.assign(Object.assign({padding:f,listStyleType:"none",backgroundColor:m,backgroundClip:"padding-box",borderRadius:t.borderRadiusLG,outline:"none",boxShadow:t.boxShadowSecondary},Uu(t)),{"&:empty":{padding:0,boxShadow:"none"},[`${r}-item-group-title`]:{padding:`${se(c)} ${se(g)}`,color:t.colorTextDescription,transition:`all ${l}`},[`${r}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${r}-item-icon`]:{minWidth:u,marginInlineEnd:t.marginXS,fontSize:t.fontSizeSM},[`${r}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${r}-item-extra`]:{paddingInlineStart:t.padding,marginInlineStart:"auto",fontSize:t.fontSizeSM,color:t.colorTextDescription}},[`${r}-item, ${r}-submenu-title`]:Object.assign(Object.assign({display:"flex",margin:0,padding:`${se(c)} ${se(g)}`,color:t.colorText,fontWeight:"normal",fontSize:u,lineHeight:t.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:t.borderRadiusSM,"&:hover, &-active":{backgroundColor:t.controlItemBgHover}},Uu(t)),{"&-selected":{color:t.colorPrimary,backgroundColor:t.controlItemBgActive,"&:hover, &-active":{backgroundColor:t.controlItemBgActiveHover}},"&-disabled":{color:h,cursor:"not-allowed","&:hover":{color:h,backgroundColor:m,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${se(t.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:t.colorSplit},[`${e}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:t.paddingXS,[`${e}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:t.colorIcon,fontSize:v,fontStyle:"normal"}}}),[`${r}-item-group-list`]:{margin:`0 ${se(t.marginXS)}`,padding:0,listStyle:"none"},[`${r}-submenu-title`]:{paddingInlineEnd:t.calc(g).add(t.fontSizeSM).equal()},[`${r}-submenu-vertical`]:{position:"relative"},[`${r}-submenu${r}-submenu-disabled ${e}-menu-submenu-title`]:{[`&, ${e}-menu-submenu-arrow-icon`]:{color:h,backgroundColor:m,cursor:"not-allowed"}},[`${r}-submenu-selected ${e}-menu-submenu-title`]:{color:t.colorPrimary}})})},[Gl(t,"slide-up"),Gl(t,"slide-down"),Ev(t,"move-up"),Ev(t,"move-down"),Q$(t,"zoom-big")]]},fU=t=>Object.assign(Object.assign({zIndexPopup:t.zIndexPopupBase+50,paddingBlock:(t.controlHeight-t.fontSize*t.lineHeight)/2},vw({contentRadius:t.borderRadiusLG,limitVerticalRadius:!0})),TM(t)),hU=Gr("Dropdown",t=>{const{marginXXS:e,sizePopupArrow:r,paddingXXS:n,componentCls:i}=t,o=Xt(t,{menuCls:`${i}-menu`,dropdownArrowDistance:t.calc(r).div(2).add(e).equal(),dropdownEdgeChildPadding:n});return[dU(o),uU(o)]},fU,{resetStyle:!1}),Vp=t=>{var e;const{menu:r,arrow:n,prefixCls:i,children:o,trigger:a,disabled:s,dropdownRender:l,popupRender:c,getPopupContainer:u,overlayClassName:f,rootClassName:h,overlayStyle:v,open:g,onOpenChange:m,visible:p,onVisibleChange:y,mouseEnterDelay:b=.15,mouseLeaveDelay:$=.1,autoAdjustOverflow:S=!0,placement:w="",overlay:C,transitionName:E,destroyOnHidden:O,destroyPopupOnHide:x}=t,{getPopupContainer:I,getPrefixCls:T,direction:N,dropdown:P}=d.useContext(Dt),_=c||l;Ms();const R=d.useMemo(()=>{const ce=T();return E!==void 0?E:w.includes("top")?`${ce}-slide-down`:`${ce}-slide-up`},[T,w,E]),M=d.useMemo(()=>w?w.includes("Center")?w.slice(0,w.indexOf("Center")):w:N==="rtl"?"bottomRight":"bottomLeft",[w,N]),D=T("dropdown",i),j=yi(D),[k,V,G]=hU(D,j),[,W]=_n(),Y=d.Children.only(pK(o)?d.createElement("span",null,o):o),q=gi(Y,{className:ae(`${D}-trigger`,{[`${D}-rtl`]:N==="rtl"},Y.props.className),disabled:(e=Y.props.disabled)!==null&&e!==void 0?e:s}),J=s?[]:a,oe=!!J?.includes("contextMenu"),[ie,te]=ln(!1,{value:g??p}),z=sr(ce=>{m?.(ce,{source:"trigger"}),y?.(ce),te(ce)}),K=ae(f,h,V,G,j,P?.className,{[`${D}-rtl`]:N==="rtl"}),B=RM({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:S,offset:W.marginXXS,arrowWidth:n?W.sizePopupArrow:0,borderRadius:W.borderRadius}),F=d.useCallback(()=>{r?.selectable&&r?.multiple||(m?.(!1,{source:"menu"}),te(!1))},[r?.selectable,r?.multiple]),U=()=>{let ce;return r?.items?ce=d.createElement(mc,Object.assign({},r)):typeof C=="function"?ce=C():ce=C,_&&(ce=_(ce)),ce=d.Children.only(typeof ce=="string"?d.createElement("span",null,ce):ce),d.createElement(XM,{prefixCls:`${D}-menu`,rootClassName:ae(G,j),expandIcon:d.createElement("span",{className:`${D}-menu-submenu-arrow`},N==="rtl"?d.createElement(Z0,{className:`${D}-menu-submenu-arrow-icon`}):d.createElement(D0,{className:`${D}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:F,validator:({mode:me})=>{}},ce)},[Z,ee]=Op("Dropdown",v?.zIndex);let Q=d.createElement(vK,Object.assign({alignPoint:oe},yn(t,["rootClassName"]),{mouseEnterDelay:b,mouseLeaveDelay:$,visible:ie,builtinPlacements:B,arrow:!!n,overlayClassName:K,prefixCls:D,getPopupContainer:u||I,transitionName:R,trigger:J,overlay:U,placement:M,onVisibleChange:z,overlayStyle:Object.assign(Object.assign(Object.assign({},P?.style),v),{zIndex:Z}),autoDestroy:O??x}),q);return Z&&(Q=d.createElement(V$.Provider,{value:ee},Q)),k(Q)},vU=iM(Vp,"align",void 0,"dropdown",t=>t),pU=t=>d.createElement(vU,Object.assign({},t),d.createElement("span",null));Vp._InternalPanelDoNotUseOrYouWillBeFired=pU;const JM=d.createContext(null),gU=JM.Provider,ZM=d.createContext(null),mU=ZM.Provider;var yU=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],QM=d.forwardRef(function(t,e){var r=t.prefixCls,n=r===void 0?"rc-checkbox":r,i=t.className,o=t.style,a=t.checked,s=t.disabled,l=t.defaultChecked,c=l===void 0?!1:l,u=t.type,f=u===void 0?"checkbox":u,h=t.title,v=t.onChange,g=mt(t,yU),m=d.useRef(null),p=d.useRef(null),y=ln(c,{value:a}),b=le(y,2),$=b[0],S=b[1];d.useImperativeHandle(e,function(){return{focus:function(O){var x;(x=m.current)===null||x===void 0||x.focus(O)},blur:function(){var O;(O=m.current)===null||O===void 0||O.blur()},input:m.current,nativeElement:p.current}});var w=ae(n,i,A(A({},"".concat(n,"-checked"),$),"".concat(n,"-disabled"),s)),C=function(O){s||("checked"in t||S(O.target.checked),v?.({target:L(L({},t),{},{type:f,checked:O.target.checked}),stopPropagation:function(){O.stopPropagation()},preventDefault:function(){O.preventDefault()},nativeEvent:O.nativeEvent}))};return d.createElement("span",{className:w,title:h,style:o,ref:p},d.createElement("input",Re({},g,{className:"".concat(n,"-input"),ref:m,onChange:C,disabled:s,checked:!!$,type:f})),d.createElement("span",{className:"".concat(n,"-inner")}))});function eD(t){const e=de.useRef(null),r=()=>{Ht.cancel(e.current),e.current=null};return[()=>{r(),e.current=Ht(()=>{e.current=null})},o=>{e.current&&(o.stopPropagation(),r()),t?.(o)}]}const bU=t=>{const{componentCls:e,antCls:r}=t,n=`${e}-group`;return{[n]:Object.assign(Object.assign({},Ar(t)),{display:"inline-block",fontSize:0,[`&${n}-rtl`]:{direction:"rtl"},[`&${n}-block`]:{display:"flex"},[`${r}-badge ${r}-badge-count`]:{zIndex:1},[`> ${r}-badge:not(:first-child) > ${r}-button-wrapper`]:{borderInlineStart:"none"}})}},$U=t=>{const{componentCls:e,wrapperMarginInlineEnd:r,colorPrimary:n,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:s,colorBgContainer:l,colorBorder:c,lineWidth:u,colorBgContainerDisabled:f,colorTextDisabled:h,paddingXS:v,dotColorDisabled:g,lineType:m,radioColor:p,radioBgColor:y,calc:b}=t,$=`${e}-inner`,w=b(i).sub(b(4).mul(2)),C=b(1).mul(i).equal({unit:!0});return{[`${e}-wrapper`]:Object.assign(Object.assign({},Ar(t)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:r,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${e}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:t.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[`${e}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${se(u)} ${m} ${n}`,borderRadius:"50%",visibility:"hidden",opacity:0,content:'""'},[e]:Object.assign(Object.assign({},Ar(t)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${e}-wrapper:hover &,
        &:hover ${$}`]:{borderColor:n},[`${e}-input:focus-visible + ${$}`]:Object.assign({},Pa(t)),[`${e}:hover::after, ${e}-wrapper:hover &::after`]:{visibility:"visible"},[`${e}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:C,height:C,marginBlockStart:b(1).mul(i).div(-2).equal({unit:!0}),marginInlineStart:b(1).mul(i).div(-2).equal({unit:!0}),backgroundColor:p,borderBlockStart:0,borderInlineStart:0,borderRadius:C,transform:"scale(0)",opacity:0,transition:`all ${o} ${s}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:C,height:C,backgroundColor:l,borderColor:c,borderStyle:"solid",borderWidth:u,borderRadius:"50%",transition:`all ${a}`},[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${e}-checked`]:{[$]:{borderColor:n,backgroundColor:y,"&::after":{transform:`scale(${t.calc(t.dotSize).div(i).equal()})`,opacity:1,transition:`all ${o} ${s}`}}},[`${e}-disabled`]:{cursor:"not-allowed",[$]:{backgroundColor:f,borderColor:c,cursor:"not-allowed","&::after":{backgroundColor:g}},[`${e}-input`]:{cursor:"not-allowed"},[`${e}-disabled + span`]:{color:h,cursor:"not-allowed"},[`&${e}-checked`]:{[$]:{"&::after":{transform:`scale(${b(w).div(i).equal()})`}}}},[`span${e} + *`]:{paddingInlineStart:v,paddingInlineEnd:v}})}},wU=t=>{const{buttonColor:e,controlHeight:r,componentCls:n,lineWidth:i,lineType:o,colorBorder:a,motionDurationSlow:s,motionDurationMid:l,buttonPaddingInline:c,fontSize:u,buttonBg:f,fontSizeLG:h,controlHeightLG:v,controlHeightSM:g,paddingXS:m,borderRadius:p,borderRadiusSM:y,borderRadiusLG:b,buttonCheckedBg:$,buttonSolidCheckedColor:S,colorTextDisabled:w,colorBgContainerDisabled:C,buttonCheckedBgDisabled:E,buttonCheckedColorDisabled:O,colorPrimary:x,colorPrimaryHover:I,colorPrimaryActive:T,buttonSolidCheckedBg:N,buttonSolidCheckedHoverBg:P,buttonSolidCheckedActiveBg:_,calc:R}=t;return{[`${n}-button-wrapper`]:{position:"relative",display:"inline-block",height:r,margin:0,paddingInline:c,paddingBlock:0,color:e,fontSize:u,lineHeight:se(R(r).sub(R(i).mul(2)).equal()),background:f,border:`${se(i)} ${o} ${a}`,borderBlockStartWidth:R(i).add(.02).equal(),borderInlineStartWidth:0,borderInlineEndWidth:i,cursor:"pointer",transition:[`color ${l}`,`background ${l}`,`box-shadow ${l}`].join(","),a:{color:e},[`> ${n}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:R(i).mul(-1).equal(),insetInlineStart:R(i).mul(-1).equal(),display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:i,paddingInline:0,backgroundColor:a,transition:`background-color ${s}`,content:'""'}},"&:first-child":{borderInlineStart:`${se(i)} ${o} ${a}`,borderStartStartRadius:p,borderEndStartRadius:p},"&:last-child":{borderStartEndRadius:p,borderEndEndRadius:p},"&:first-child:last-child":{borderRadius:p},[`${n}-group-large &`]:{height:v,fontSize:h,lineHeight:se(R(v).sub(R(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},[`${n}-group-small &`]:{height:g,paddingInline:R(m).sub(i).equal(),paddingBlock:0,lineHeight:se(R(g).sub(R(i).mul(2)).equal()),"&:first-child":{borderStartStartRadius:y,borderEndStartRadius:y},"&:last-child":{borderStartEndRadius:y,borderEndEndRadius:y}},"&:hover":{position:"relative",color:x},"&:has(:focus-visible)":Object.assign({},Pa(t)),[`${n}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${n}-button-wrapper-disabled)`]:{zIndex:1,color:x,background:$,borderColor:x,"&::before":{backgroundColor:x},"&:first-child":{borderColor:x},"&:hover":{color:I,borderColor:I,"&::before":{backgroundColor:I}},"&:active":{color:T,borderColor:T,"&::before":{backgroundColor:T}}},[`${n}-group-solid &-checked:not(${n}-button-wrapper-disabled)`]:{color:S,background:N,borderColor:N,"&:hover":{color:S,background:P,borderColor:P},"&:active":{color:S,background:_,borderColor:_}},"&-disabled":{color:w,backgroundColor:C,borderColor:a,cursor:"not-allowed","&:first-child, &:hover":{color:w,backgroundColor:C,borderColor:a}},[`&-disabled${n}-button-wrapper-checked`]:{color:O,backgroundColor:E,borderColor:a,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},SU=t=>{const{wireframe:e,padding:r,marginXS:n,lineWidth:i,fontSizeLG:o,colorText:a,colorBgContainer:s,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:f,colorPrimaryHover:h,colorPrimaryActive:v,colorWhite:g}=t,m=4,p=o,y=e?p-m*2:p-(m+i)*2;return{radioSize:p,dotSize:y,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:f,buttonSolidCheckedHoverBg:h,buttonSolidCheckedActiveBg:v,buttonBg:s,buttonCheckedBg:s,buttonColor:a,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:r-i,wrapperMarginInlineEnd:n,radioColor:e?f:g,radioBgColor:e?s:f}},tD=Gr("Radio",t=>{const{controlOutline:e,controlOutlineWidth:r}=t,n=`0 0 0 ${se(r)} ${e}`,o=Xt(t,{radioFocusShadow:n,radioButtonFocusShadow:n});return[bU(o),$U(o),wU(o)]},SU,{unitless:{radioSize:!0,dotSize:!0}});var CU=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const xU=(t,e)=>{var r,n;const i=d.useContext(JM),o=d.useContext(ZM),{getPrefixCls:a,direction:s,radio:l}=d.useContext(Dt),c=d.useRef(null),u=mi(e,c),{isFormItemInput:f}=d.useContext(Bn),h=M=>{var D,j;(D=t.onChange)===null||D===void 0||D.call(t,M),(j=i?.onChange)===null||j===void 0||j.call(i,M)},{prefixCls:v,className:g,rootClassName:m,children:p,style:y,title:b}=t,$=CU(t,["prefixCls","className","rootClassName","children","style","title"]),S=a("radio",v),w=(i?.optionType||o)==="button",C=w?`${S}-button`:S,E=yi(S),[O,x,I]=tD(S,E),T=Object.assign({},$),N=d.useContext(Ji);i&&(T.name=i.name,T.onChange=h,T.checked=t.value===i.value,T.disabled=(r=T.disabled)!==null&&r!==void 0?r:i.disabled),T.disabled=(n=T.disabled)!==null&&n!==void 0?n:N;const P=ae(`${C}-wrapper`,{[`${C}-wrapper-checked`]:T.checked,[`${C}-wrapper-disabled`]:T.disabled,[`${C}-wrapper-rtl`]:s==="rtl",[`${C}-wrapper-in-form-item`]:f,[`${C}-wrapper-block`]:!!i?.block},l?.className,g,m,x,I,E),[_,R]=eD(T.onClick);return O(d.createElement(K$,{component:"Radio",disabled:T.disabled},d.createElement("label",{className:P,style:Object.assign(Object.assign({},l?.style),y),onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,title:b,onClick:_},d.createElement(QM,Object.assign({},T,{className:ae(T.className,{[Tp]:!w}),type:"radio",prefixCls:C,ref:u,onClick:R})),p!==void 0?d.createElement("span",{className:`${C}-label`},p):null)))},Nv=d.forwardRef(xU),EU=d.forwardRef((t,e)=>{const{getPrefixCls:r,direction:n}=d.useContext(Dt),i=rw(),{prefixCls:o,className:a,rootClassName:s,options:l,buttonStyle:c="outline",disabled:u,children:f,size:h,style:v,id:g,optionType:m,name:p=i,defaultValue:y,value:b,block:$=!1,onChange:S,onMouseEnter:w,onMouseLeave:C,onFocus:E,onBlur:O}=t,[x,I]=ln(y,{value:b}),T=d.useCallback(W=>{const Y=x,q=W.target.value;"value"in t||I(q),q!==Y&&S?.(W)},[x,I,S]),N=r("radio",o),P=`${N}-group`,_=yi(N),[R,M,D]=tD(N,_);let j=f;l&&l.length>0&&(j=l.map(W=>typeof W=="string"||typeof W=="number"?d.createElement(Nv,{key:W.toString(),prefixCls:N,disabled:u,value:W,checked:x===W},W):d.createElement(Nv,{key:`radio-group-value-options-${W.value}`,prefixCls:N,disabled:W.disabled||u,value:W.value,checked:x===W.value,title:W.title,style:W.style,className:W.className,id:W.id,required:W.required},W.label)));const k=no(h),V=ae(P,`${P}-${c}`,{[`${P}-${k}`]:k,[`${P}-rtl`]:n==="rtl",[`${P}-block`]:$},a,s,M,D,_),G=d.useMemo(()=>({onChange:T,value:x,disabled:u,name:p,optionType:m,block:$}),[T,x,u,p,m,$]);return R(d.createElement("div",Object.assign({},Zi(t,{aria:!0,data:!0}),{className:V,style:v,onMouseEnter:w,onMouseLeave:C,onFocus:E,onBlur:O,id:g,ref:e}),d.createElement(gU,{value:G},j)))}),OU=d.memo(EU);var IU=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const TU=(t,e)=>{const{getPrefixCls:r}=d.useContext(Dt),{prefixCls:n}=t,i=IU(t,["prefixCls"]),o=r("radio",n);return d.createElement(mU,{value:"button"},d.createElement(Nv,Object.assign({prefixCls:o},i,{type:"radio",ref:e})))},_U=d.forwardRef(TU),Id=Nv;Id.Button=_U;Id.Group=OU;Id.__ANT_RADIO=!0;function Td(t){return Xt(t,{inputAffixPadding:t.paddingXXS})}const _d=t=>{const{controlHeight:e,fontSize:r,lineHeight:n,lineWidth:i,controlHeightSM:o,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:f,colorFillAlter:h,colorPrimaryHover:v,colorPrimary:g,controlOutlineWidth:m,controlOutline:p,colorErrorOutline:y,colorWarningOutline:b,colorBgContainer:$,inputFontSize:S,inputFontSizeLG:w,inputFontSizeSM:C}=t,E=S||r,O=C||E,x=w||s,I=Math.round((e-E*n)/2*10)/10-i,T=Math.round((o-O*n)/2*10)/10-i,N=Math.ceil((a-x*l)/2*10)/10-i;return{paddingBlock:Math.max(I,0),paddingBlockSM:Math.max(T,0),paddingBlockLG:Math.max(N,0),paddingInline:c-i,paddingInlineSM:u-i,paddingInlineLG:f-i,addonBg:h,activeBorderColor:g,hoverBorderColor:v,activeShadow:`0 0 0 ${m}px ${p}`,errorActiveShadow:`0 0 0 ${m}px ${y}`,warningActiveShadow:`0 0 0 ${m}px ${b}`,hoverBg:$,activeBg:$,inputFontSize:E,inputFontSizeLG:x,inputFontSizeSM:O}},PU=t=>({borderColor:t.hoverBorderColor,backgroundColor:t.hoverBg}),Wp=t=>({color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},PU(Xt(t,{hoverBorderColor:t.colorBorder,hoverBg:t.colorBgContainerDisabled})))}),Sw=(t,e)=>({background:t.colorBgContainer,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:e.borderColor,"&:hover":{borderColor:e.hoverBorderColor,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:e.activeBorderColor,boxShadow:e.activeShadow,outline:0,backgroundColor:t.activeBg}}),fE=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},Sw(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:e.borderColor}}),RU=(t,e)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Sw(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Wp(t))}),fE(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),fE(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),hE=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{borderColor:e.addonBorderColor,color:e.addonColor}}}),NU=t=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group`]:{"&-addon":{background:t.addonBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},hE(t,{status:"error",addonBorderColor:t.colorError,addonColor:t.colorErrorText})),hE(t,{status:"warning",addonBorderColor:t.colorWarning,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group-addon`]:Object.assign({},Wp(t))}})}),MU=(t,e)=>{const{componentCls:r}=t;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:t.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:t.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:t.colorWarning}}},e)}},rD=(t,e)=>{var r;return{background:e.bg,borderWidth:t.lineWidth,borderStyle:t.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=e?.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:e.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:e.activeBorderColor,backgroundColor:t.activeBg}}},vE=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},rD(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}})}),DU=(t,e)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},rD(t,{bg:t.colorFillTertiary,hoverBg:t.colorFillSecondary,activeBorderColor:t.activeBorderColor})),{[`&${t.componentCls}-disabled, &[disabled]`]:Object.assign({},Wp(t))}),vE(t,{status:"error",bg:t.colorErrorBg,hoverBg:t.colorErrorBgHover,activeBorderColor:t.colorError,inputColor:t.colorErrorText,affixColor:t.colorError})),vE(t,{status:"warning",bg:t.colorWarningBg,hoverBg:t.colorWarningBgHover,activeBorderColor:t.colorWarning,inputColor:t.colorWarningText,affixColor:t.colorWarning})),e)}),pE=(t,e)=>({[`&${t.componentCls}-group-wrapper-status-${e.status}`]:{[`${t.componentCls}-group-addon`]:{background:e.addonBg,color:e.addonColor}}}),AU=t=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${t.componentCls}-group-addon`]:{background:t.colorFillTertiary,"&:last-child":{position:"static"}}},pE(t,{status:"error",addonBg:t.colorErrorBg,addonColor:t.colorErrorText})),pE(t,{status:"warning",addonBg:t.colorWarningBg,addonColor:t.colorWarningText})),{[`&${t.componentCls}-group-wrapper-disabled`]:{[`${t.componentCls}-group`]:{"&-addon":{background:t.colorFillTertiary,color:t.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderTop:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderBottom:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`}}}})}),nD=(t,e)=>({background:t.colorBgContainer,borderWidth:`${se(t.lineWidth)} 0`,borderStyle:`${t.lineType} none`,borderColor:`transparent transparent ${e.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${e.borderColor} transparent`,backgroundColor:t.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${e.borderColor} transparent`,outline:0,backgroundColor:t.activeBg}}),gE=(t,e)=>({[`&${t.componentCls}-status-${e.status}:not(${t.componentCls}-disabled)`]:Object.assign(Object.assign({},nD(t,e)),{[`${t.componentCls}-prefix, ${t.componentCls}-suffix`]:{color:e.affixColor}}),[`&${t.componentCls}-status-${e.status}${t.componentCls}-disabled`]:{borderColor:`transparent transparent ${e.borderColor} transparent`}}),jU=(t,e)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},nD(t,{borderColor:t.colorBorder,hoverBorderColor:t.hoverBorderColor,activeBorderColor:t.activeBorderColor,activeShadow:t.activeShadow})),{[`&${t.componentCls}-disabled, &[disabled]`]:{color:t.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${t.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),gE(t,{status:"error",borderColor:t.colorError,hoverBorderColor:t.colorErrorBorderHover,activeBorderColor:t.colorError,activeShadow:t.errorActiveShadow,affixColor:t.colorError})),gE(t,{status:"warning",borderColor:t.colorWarning,hoverBorderColor:t.colorWarningBorderHover,activeBorderColor:t.colorWarning,activeShadow:t.warningActiveShadow,affixColor:t.colorWarning})),e)}),kU=t=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:t,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),iD=t=>{const{paddingBlockLG:e,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:i}=t;return{padding:`${se(e)} ${se(i)}`,fontSize:t.inputFontSizeLG,lineHeight:r,borderRadius:n}},Cw=t=>({padding:`${se(t.paddingBlockSM)} ${se(t.paddingInlineSM)}`,fontSize:t.inputFontSizeSM,borderRadius:t.borderRadiusSM}),xw=t=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${se(t.paddingBlock)} ${se(t.paddingInline)}`,color:t.colorText,fontSize:t.inputFontSize,lineHeight:t.lineHeight,borderRadius:t.borderRadius,transition:`all ${t.motionDurationMid}`},kU(t.colorTextPlaceholder)),{"&-lg":Object.assign({},iD(t)),"&-sm":Object.assign({},Cw(t)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),BU=t=>{const{componentCls:e,antCls:r}=t;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:t.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${e}, &-lg > ${e}-group-addon`]:Object.assign({},iD(t)),[`&-sm ${e}, &-sm > ${e}-group-addon`]:Object.assign({},Cw(t)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:t.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:t.controlHeightSM},[`> ${e}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${e}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${se(t.paddingInline)}`,color:t.colorText,fontWeight:"normal",fontSize:t.inputFontSize,textAlign:"center",borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${se(t.calc(t.paddingBlock).add(1).mul(-1).equal())} ${se(t.calc(t.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${se(t.lineWidth)} ${t.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${se(t.calc(t.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[e]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${e}-search-with-button &`]:{zIndex:0}}},[`> ${e}:first-child, ${e}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}-affix-wrapper`]:{[`&:not(:first-child) ${e}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${e}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${e}:last-child, ${e}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${e}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${e}-search &`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius}},[`&:not(:first-child), ${e}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${e}-group-compact`]:Object.assign(Object.assign({display:"block"},$v()),{[`${e}-group-addon, ${e}-group-wrap, > ${e}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:t.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[`
        & > ${e}-affix-wrapper,
        & > ${e}-number-affix-wrapper,
        & > ${r}-picker-range
      `]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderInlineEndWidth:t.lineWidth},[e]:{float:"none"},[`& > ${r}-select > ${r}-select-selector,
      & > ${r}-select-auto-complete ${e},
      & > ${r}-cascader-picker ${e},
      & > ${e}-group-wrapper ${e}`]:{borderInlineEndWidth:t.lineWidth,borderRadius:0,"&:hover, &:focus":{zIndex:1}},[`& > ${r}-select-focused`]:{zIndex:1},[`& > ${r}-select > ${r}-select-arrow`]:{zIndex:1},[`& > *:first-child,
      & > ${r}-select:first-child > ${r}-select-selector,
      & > ${r}-select-auto-complete:first-child ${e},
      & > ${r}-cascader-picker:first-child ${e}`]:{borderStartStartRadius:t.borderRadius,borderEndStartRadius:t.borderRadius},[`& > *:last-child,
      & > ${r}-select:last-child > ${r}-select-selector,
      & > ${r}-cascader-picker:last-child ${e},
      & > ${r}-cascader-picker-focused:last-child ${e}`]:{borderInlineEndWidth:t.lineWidth,borderStartEndRadius:t.borderRadius,borderEndEndRadius:t.borderRadius},[`& > ${r}-select-auto-complete ${e}`]:{verticalAlign:"top"},[`${e}-group-wrapper + ${e}-group-wrapper`]:{marginInlineStart:t.calc(t.lineWidth).mul(-1).equal(),[`${e}-affix-wrapper`]:{borderRadius:0}},[`${e}-group-wrapper:not(:last-child)`]:{[`&${e}-search > ${e}-group`]:{[`& > ${e}-group-addon > ${e}-search-button`]:{borderRadius:0},[`& > ${e}`]:{borderStartStartRadius:t.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:t.borderRadius}}}})}},FU=t=>{const{componentCls:e,controlHeightSM:r,lineWidth:n,calc:i}=t,a=i(r).sub(i(n).mul(2)).sub(16).div(2).equal();return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ar(t)),xw(t)),RU(t)),DU(t)),MU(t)),jU(t)),{'&[type="color"]':{height:t.controlHeight,[`&${e}-lg`]:{height:t.controlHeightLG},[`&${e}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},LU=t=>{const{componentCls:e}=t;return{[`${e}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:t.colorTextQuaternary,fontSize:t.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${t.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:t.colorIcon},"&:active":{color:t.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${se(t.inputAffixPadding)}`}}}},zU=t=>{const{componentCls:e,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:i,colorIcon:o,colorIconHover:a,iconCls:s}=t,l=`${e}-affix-wrapper`,c=`${e}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},xw(t)),{display:"inline-flex",[`&:not(${e}-disabled):hover`]:{zIndex:1,[`${e}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${e}`]:{padding:0},[`> input${e}, > textarea${e}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[e]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:t.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:t.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),LU(t)),{[`${s}${e}-password-icon`]:{color:o,cursor:"pointer",transition:`all ${i}`,"&:hover":{color:a}}}),[`${e}-underlined`]:{borderRadius:0},[c]:{[`${s}${e}-password-icon`]:{color:o,cursor:"not-allowed","&:hover":{color:o}}}}},HU=t=>{const{componentCls:e,borderRadiusLG:r,borderRadiusSM:n}=t;return{[`${e}-group`]:Object.assign(Object.assign(Object.assign({},Ar(t)),BU(t)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${e}-group-addon`]:{borderRadius:r,fontSize:t.inputFontSizeLG}},"&-sm":{[`${e}-group-addon`]:{borderRadius:n}}},NU(t)),AU(t)),{[`&:not(${e}-compact-first-item):not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}, ${e}-group-addon`]:{borderRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-first-item`]:{[`${e}, ${e}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-last-item`]:{[`${e}, ${e}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${e}-compact-last-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${e}-compact-first-item)${e}-compact-item`]:{[`${e}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},VU=t=>{const{componentCls:e,antCls:r}=t,n=`${e}-search`;return{[n]:{[e]:{"&:hover, &:focus":{[`+ ${e}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:t.colorPrimaryHover}}},[`${e}-affix-wrapper`]:{height:t.controlHeight,borderRadius:0},[`${e}-lg`]:{lineHeight:t.calc(t.lineHeightLG).sub(2e-4).equal()},[`> ${e}-group`]:{[`> ${e}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${n}-button:not(${r}-btn-color-primary)`]:{color:t.colorTextDescription,"&:hover":{color:t.colorPrimaryHover},"&:active":{color:t.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:t.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${e}-affix-wrapper, ${n}-button`]:{height:t.controlHeightLG}},"&-small":{[`${e}-affix-wrapper, ${n}-button`]:{height:t.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${e}-compact-item`]:{[`&:not(${e}-compact-last-item)`]:{[`${e}-group-addon`]:{[`${e}-search-button`]:{marginInlineEnd:t.calc(t.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${e}-compact-first-item)`]:{[`${e},${e}-affix-wrapper`]:{borderRadius:0}},[`> ${e}-group-addon ${e}-search-button,
        > ${e},
        ${e}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${e}-affix-wrapper-focused`]:{zIndex:2}}}}},WU=t=>{const{componentCls:e}=t;return{[`${e}-out-of-range`]:{[`&, & input, & textarea, ${e}-show-count-suffix, ${e}-data-count`]:{color:t.colorError}}}},oD=Gr(["Input","Shared"],t=>{const e=Xt(t,Td(t));return[FU(e),zU(e)]},_d,{resetFont:!1}),aD=Gr(["Input","Component"],t=>{const e=Xt(t,Td(t));return[HU(e),VU(e),WU(e),tw(e)]},_d,{resetFont:!1});function KU(t,e,r){var n=r||{},i=n.noTrailing,o=i===void 0?!1:i,a=n.noLeading,s=a===void 0?!1:a,l=n.debounceMode,c=l===void 0?void 0:l,u,f=!1,h=0;function v(){u&&clearTimeout(u)}function g(p){var y=p||{},b=y.upcomingOnly,$=b===void 0?!1:b;v(),f=!$}function m(){for(var p=arguments.length,y=new Array(p),b=0;b<p;b++)y[b]=arguments[b];var $=this,S=Date.now()-h;if(f)return;function w(){h=Date.now(),e.apply($,y)}function C(){u=void 0}!s&&c&&!u&&w(),v(),c===void 0&&S>t?s?(h=Date.now(),o||(u=setTimeout(c?C:w,t))):w():o!==!0&&(u=setTimeout(c?C:w,c===void 0?t-S:t))}return m.cancel=g,m}function UU(t,e,r){var n={},i=n.atBegin,o=i===void 0?!1:i;return KU(t,e,{debounceMode:o!==!1})}function Jn(t,e){return t[e]}var qU=["children"];function sD(t,e){return"".concat(t,"-").concat(e)}function GU(t){return t&&t.type&&t.type.isTreeNode}function Pd(t,e){return t??e}function Xl(t){var e=t||{},r=e.title,n=e._title,i=e.key,o=e.children,a=r||"title";return{title:a,_title:n||[a],key:i||"key",children:o||"children"}}function lD(t){function e(r){var n=Mi(r);return n.map(function(i){if(!GU(i))return gr(!i,"Tree/TreeNode can only accept TreeNode as children."),null;var o=i.key,a=i.props,s=a.children,l=mt(a,qU),c=L({key:o},l),u=e(s);return u.length&&(c.children=u),c}).filter(function(i){return i})}return e(t)}function Om(t,e,r){var n=Xl(r),i=n._title,o=n.key,a=n.children,s=new Set(e===!0?[]:e),l=[];function c(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return u.map(function(h,v){for(var g=sD(f?f.pos:"0",v),m=Pd(h[o],g),p,y=0;y<i.length;y+=1){var b=i[y];if(h[b]!==void 0){p=h[b];break}}var $=Object.assign(yn(h,[].concat(Oe(i),[o,a])),{title:p,key:m,parent:f,pos:g,children:null,data:h,isStart:[].concat(Oe(f?f.isStart:[]),[v===0]),isEnd:[].concat(Oe(f?f.isEnd:[]),[v===u.length-1])});return l.push($),e===!0||s.has(m)?$.children=c(h[a]||[],$):$.children=[],$})}return c(t),l}function XU(t,e,r){var n={};tt(r)==="object"?n=r:n={externalGetKey:r},n=n||{};var i=n,o=i.childrenPropName,a=i.externalGetKey,s=i.fieldNames,l=Xl(s),c=l.key,u=l.children,f=o||u,h;a?typeof a=="string"?h=function(m){return m[a]}:typeof a=="function"&&(h=function(m){return a(m)}):h=function(m,p){return Pd(m[c],p)};function v(g,m,p,y){var b=g?g[f]:t,$=g?sD(p.pos,m):"0",S=g?[].concat(Oe(y),[g]):[];if(g){var w=h(g,$),C={node:g,index:m,pos:$,key:w,parentPos:p.node?p.pos:null,level:p.level+1,nodes:S};e(C)}b&&b.forEach(function(E,O){v(E,O,{node:g,pos:$,level:p?p.level+1:-1},S)})}v(null)}function Ew(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.initWrapper,n=e.processEntity,i=e.onProcessFinished,o=e.externalGetKey,a=e.childrenPropName,s=e.fieldNames,l=arguments.length>2?arguments[2]:void 0,c=o||l,u={},f={},h={posEntities:u,keyEntities:f};return r&&(h=r(h)||h),XU(t,function(v){var g=v.node,m=v.index,p=v.pos,y=v.key,b=v.parentPos,$=v.level,S=v.nodes,w={node:g,nodes:S,index:m,key:y,pos:p,level:$},C=Pd(y,p);u[p]=w,f[C]=w,w.parent=u[b],w.parent&&(w.parent.children=w.parent.children||[],w.parent.children.push(w)),n&&n(w,h)},{externalGetKey:c,childrenPropName:a,fieldNames:s}),i&&i(h),h}function Su(t,e){var r=e.expandedKeys,n=e.selectedKeys,i=e.loadedKeys,o=e.loadingKeys,a=e.checkedKeys,s=e.halfCheckedKeys,l=e.dragOverNodeKey,c=e.dropPosition,u=e.keyEntities,f=Jn(u,t),h={eventKey:t,expanded:r.indexOf(t)!==-1,selected:n.indexOf(t)!==-1,loaded:i.indexOf(t)!==-1,loading:o.indexOf(t)!==-1,checked:a.indexOf(t)!==-1,halfChecked:s.indexOf(t)!==-1,pos:String(f?f.pos:""),dragOver:l===t&&c===0,dragOverGapTop:l===t&&c===-1,dragOverGapBottom:l===t&&c===1};return h}function Vr(t){var e=t.data,r=t.expanded,n=t.selected,i=t.checked,o=t.loaded,a=t.loading,s=t.halfChecked,l=t.dragOver,c=t.dragOverGapTop,u=t.dragOverGapBottom,f=t.pos,h=t.active,v=t.eventKey,g=L(L({},e),{},{expanded:r,selected:n,checked:i,loaded:o,loading:a,halfChecked:s,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:f,active:h,key:v});return"props"in g||Object.defineProperty(g,"props",{get:function(){return gr(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),t}}),g}function cD(t,e){var r=new Set;return t.forEach(function(n){e.has(n)||r.add(n)}),r}function YU(t){var e=t||{},r=e.disabled,n=e.disableCheckbox,i=e.checkable;return!!(r||n)||i===!1}function JU(t,e,r,n){for(var i=new Set(t),o=new Set,a=0;a<=r;a+=1){var s=e.get(a)||new Set;s.forEach(function(f){var h=f.key,v=f.node,g=f.children,m=g===void 0?[]:g;i.has(h)&&!n(v)&&m.filter(function(p){return!n(p.node)}).forEach(function(p){i.add(p.key)})})}for(var l=new Set,c=r;c>=0;c-=1){var u=e.get(c)||new Set;u.forEach(function(f){var h=f.parent,v=f.node;if(!(n(v)||!f.parent||l.has(f.parent.key))){if(n(f.parent.node)){l.add(h.key);return}var g=!0,m=!1;(h.children||[]).filter(function(p){return!n(p.node)}).forEach(function(p){var y=p.key,b=i.has(y);g&&!b&&(g=!1),!m&&(b||o.has(y))&&(m=!0)}),g&&i.add(h.key),m&&o.add(h.key),l.add(h.key)}})}return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(cD(o,i))}}function ZU(t,e,r,n,i){for(var o=new Set(t),a=new Set(e),s=0;s<=n;s+=1){var l=r.get(s)||new Set;l.forEach(function(h){var v=h.key,g=h.node,m=h.children,p=m===void 0?[]:m;!o.has(v)&&!a.has(v)&&!i(g)&&p.filter(function(y){return!i(y.node)}).forEach(function(y){o.delete(y.key)})})}a=new Set;for(var c=new Set,u=n;u>=0;u-=1){var f=r.get(u)||new Set;f.forEach(function(h){var v=h.parent,g=h.node;if(!(i(g)||!h.parent||c.has(h.parent.key))){if(i(h.parent.node)){c.add(v.key);return}var m=!0,p=!1;(v.children||[]).filter(function(y){return!i(y.node)}).forEach(function(y){var b=y.key,$=o.has(b);m&&!$&&(m=!1),!p&&($||a.has(b))&&(p=!0)}),m||o.delete(v.key),p&&a.add(v.key),c.add(v.key)}})}return{checkedKeys:Array.from(o),halfCheckedKeys:Array.from(cD(a,o))}}function Dl(t,e,r,n){var i=[],o;n?o=n:o=YU;var a=new Set(t.filter(function(u){var f=!!Jn(r,u);return f||i.push(u),f})),s=new Map,l=0;Object.keys(r).forEach(function(u){var f=r[u],h=f.level,v=s.get(h);v||(v=new Set,s.set(h,v)),v.add(f),l=Math.max(l,h)}),gr(!i.length,"Tree missing follow keys: ".concat(i.slice(0,100).map(function(u){return"'".concat(u,"'")}).join(", ")));var c;return e===!0?c=JU(a,s,l,o):c=ZU(a,e.halfCheckedKeys,s,l,o),c}const QU=t=>{const{checkboxCls:e}=t,r=`${e}-wrapper`;return[{[`${e}-group`]:Object.assign(Object.assign({},Ar(t)),{display:"inline-flex",flexWrap:"wrap",columnGap:t.marginXS,[`> ${t.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Ar(t)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[e]:Object.assign(Object.assign({},Ar(t)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:t.borderRadiusSM,alignSelf:"center",[`${e}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${e}-inner`]:Object.assign({},Pa(t))},[`${e}-inner`]:{boxSizing:"border-box",display:"block",width:t.checkboxSize,height:t.checkboxSize,direction:"ltr",backgroundColor:t.colorBgContainer,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadiusSM,borderCollapse:"separate",transition:`all ${t.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:t.calc(t.checkboxSize).div(14).mul(5).equal(),height:t.calc(t.checkboxSize).div(14).mul(8).equal(),border:`${se(t.lineWidthBold)} solid ${t.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${t.motionDurationFast} ${t.motionEaseInBack}, opacity ${t.motionDurationFast}`}},"& + span":{paddingInlineStart:t.paddingXS,paddingInlineEnd:t.paddingXS}})},{[`
        ${r}:not(${r}-disabled),
        ${e}:not(${e}-disabled)
      `]:{[`&:hover ${e}-inner`]:{borderColor:t.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${e}-checked:not(${e}-disabled) ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${e}-checked:not(${e}-disabled):after`]:{borderColor:t.colorPrimaryHover}}},{[`${e}-checked`]:{[`${e}-inner`]:{backgroundColor:t.colorPrimary,borderColor:t.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${t.motionDurationMid} ${t.motionEaseOutBack} ${t.motionDurationFast}`}}},[`
        ${r}-checked:not(${r}-disabled),
        ${e}-checked:not(${e}-disabled)
      `]:{[`&:hover ${e}-inner`]:{backgroundColor:t.colorPrimaryHover,borderColor:"transparent"}}},{[e]:{"&-indeterminate":{"&":{[`${e}-inner`]:{backgroundColor:`${t.colorBgContainer}`,borderColor:`${t.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:t.calc(t.fontSizeLG).div(2).equal(),height:t.calc(t.fontSizeLG).div(2).equal(),backgroundColor:t.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${e}-inner`]:{backgroundColor:`${t.colorBgContainer}`,borderColor:`${t.colorPrimary}`}}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${e}-disabled`]:{[`&, ${e}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${e}-inner`]:{background:t.colorBgContainerDisabled,borderColor:t.colorBorder,"&:after":{borderColor:t.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:t.colorTextDisabled},[`&${e}-indeterminate ${e}-inner::after`]:{background:t.colorTextDisabled}}}]};function uD(t,e){const r=Xt(e,{checkboxCls:`.${t}`,checkboxSize:e.controlInteractiveSize});return[QU(r)]}const dD=Gr("Checkbox",(t,{prefixCls:e})=>[uD(e,t)]),fD=de.createContext(null);var eq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const tq=(t,e)=>{var r;const{prefixCls:n,className:i,rootClassName:o,children:a,indeterminate:s=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:f=!1,disabled:h}=t,v=eq(t,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:g,direction:m,checkbox:p}=d.useContext(Dt),y=d.useContext(fD),{isFormItemInput:b}=d.useContext(Bn),$=d.useContext(Ji),S=(r=y?.disabled||h)!==null&&r!==void 0?r:$,w=d.useRef(v.value),C=d.useRef(null),E=mi(e,C);d.useEffect(()=>{y?.registerValue(v.value)},[]),d.useEffect(()=>{if(!f)return v.value!==w.current&&(y?.cancelValue(w.current),y?.registerValue(v.value),w.current=v.value),()=>y?.cancelValue(v.value)},[v.value]),d.useEffect(()=>{var j;!((j=C.current)===null||j===void 0)&&j.input&&(C.current.input.indeterminate=s)},[s]);const O=g("checkbox",n),x=yi(O),[I,T,N]=dD(O,x),P=Object.assign({},v);y&&!f&&(P.onChange=(...j)=>{v.onChange&&v.onChange.apply(v,j),y.toggleOption&&y.toggleOption({label:a,value:v.value})},P.name=y.name,P.checked=y.value.includes(v.value));const _=ae(`${O}-wrapper`,{[`${O}-rtl`]:m==="rtl",[`${O}-wrapper-checked`]:P.checked,[`${O}-wrapper-disabled`]:S,[`${O}-wrapper-in-form-item`]:b},p?.className,i,o,N,x,T),R=ae({[`${O}-indeterminate`]:s},Tp,T),[M,D]=eD(P.onClick);return I(d.createElement(K$,{component:"Checkbox",disabled:S},d.createElement("label",{className:_,style:Object.assign(Object.assign({},p?.style),l),onMouseEnter:c,onMouseLeave:u,onClick:M},d.createElement(QM,Object.assign({},P,{onClick:D,prefixCls:O,className:R,disabled:S,ref:E})),a!=null&&d.createElement("span",{className:`${O}-label`},a))))},hD=d.forwardRef(tq);var rq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const nq=d.forwardRef((t,e)=>{const{defaultValue:r,children:n,options:i=[],prefixCls:o,className:a,rootClassName:s,style:l,onChange:c}=t,u=rq(t,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:h}=d.useContext(Dt),[v,g]=d.useState(u.value||r||[]),[m,p]=d.useState([]);d.useEffect(()=>{"value"in u&&g(u.value||[])},[u.value]);const y=d.useMemo(()=>i.map(R=>typeof R=="string"||typeof R=="number"?{label:R,value:R}:R),[i]),b=R=>{p(M=>M.filter(D=>D!==R))},$=R=>{p(M=>[].concat(Oe(M),[R]))},S=R=>{const M=v.indexOf(R.value),D=Oe(v);M===-1?D.push(R.value):D.splice(M,1),"value"in u||g(D),c?.(D.filter(j=>m.includes(j)).sort((j,k)=>{const V=y.findIndex(W=>W.value===j),G=y.findIndex(W=>W.value===k);return V-G}))},w=f("checkbox",o),C=`${w}-group`,E=yi(w),[O,x,I]=dD(w,E),T=yn(u,["value","disabled"]),N=i.length?y.map(R=>d.createElement(hD,{prefixCls:w,key:R.value.toString(),disabled:"disabled"in R?R.disabled:u.disabled,value:R.value,checked:v.includes(R.value),onChange:R.onChange,className:ae(`${C}-item`,R.className),style:R.style,title:R.title,id:R.id,required:R.required},R.label)):n,P=d.useMemo(()=>({toggleOption:S,value:v,disabled:u.disabled,name:u.name,registerValue:$,cancelValue:b}),[S,v,u.disabled,u.name,$,b]),_=ae(C,{[`${C}-rtl`]:h==="rtl"},a,s,I,E,x);return O(d.createElement("div",Object.assign({className:_,style:l},T,{ref:e}),d.createElement(fD.Provider,{value:P},N)))}),Yl=hD;Yl.Group=nq;Yl.__ANT_CHECKBOX=!0;const vD=d.createContext({});var iq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function mE(t){return typeof t=="number"?`${t} ${t} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(t)?`0 0 ${t}`:t}const oq=["xs","sm","md","lg","xl","xxl"],pD=d.forwardRef((t,e)=>{const{getPrefixCls:r,direction:n}=d.useContext(Dt),{gutter:i,wrap:o}=d.useContext(vD),{prefixCls:a,span:s,order:l,offset:c,push:u,pull:f,className:h,children:v,flex:g,style:m}=t,p=iq(t,["prefixCls","span","order","offset","push","pull","className","children","flex","style"]),y=r("col",a),[b,$,S]=S7(y),w={};let C={};oq.forEach(x=>{let I={};const T=t[x];typeof T=="number"?I.span=T:typeof T=="object"&&(I=T||{}),delete p[x],C=Object.assign(Object.assign({},C),{[`${y}-${x}-${I.span}`]:I.span!==void 0,[`${y}-${x}-order-${I.order}`]:I.order||I.order===0,[`${y}-${x}-offset-${I.offset}`]:I.offset||I.offset===0,[`${y}-${x}-push-${I.push}`]:I.push||I.push===0,[`${y}-${x}-pull-${I.pull}`]:I.pull||I.pull===0,[`${y}-rtl`]:n==="rtl"}),I.flex&&(C[`${y}-${x}-flex`]=!0,w[`--${y}-${x}-flex`]=mE(I.flex))});const E=ae(y,{[`${y}-${s}`]:s!==void 0,[`${y}-order-${l}`]:l,[`${y}-offset-${c}`]:c,[`${y}-push-${u}`]:u,[`${y}-pull-${f}`]:f},h,C,$,S),O={};if(i&&i[0]>0){const x=i[0]/2;O.paddingLeft=x,O.paddingRight=x}return g&&(O.flex=mE(g),o===!1&&!O.minWidth&&(O.minWidth=0)),b(d.createElement("div",Object.assign({},p,{style:Object.assign(Object.assign(Object.assign({},O),m),w),className:E,ref:e}),v))});function aq(t,e){const r=[void 0,void 0],n=Array.isArray(t)?t:[t,void 0],i=e||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0};return n.forEach((o,a)=>{if(typeof o=="object"&&o!==null)for(let s=0;s<Yu.length;s++){const l=Yu[s];if(i[l]&&o[l]!==void 0){r[a]=o[l];break}}else r[a]=o}),r}var sq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function yE(t,e){const[r,n]=d.useState(typeof t=="string"?t:""),i=()=>{if(typeof t=="string"&&n(t),typeof t=="object")for(let o=0;o<Yu.length;o++){const a=Yu[o];if(!e||!e[a])continue;const s=t[a];if(s!==void 0){n(s);return}}};return d.useEffect(()=>{i()},[JSON.stringify(t),e]),r}const lq=d.forwardRef((t,e)=>{const{prefixCls:r,justify:n,align:i,className:o,style:a,children:s,gutter:l=0,wrap:c}=t,u=sq(t,["prefixCls","justify","align","className","style","children","gutter","wrap"]),{getPrefixCls:f,direction:h}=d.useContext(Dt),v=hw(!0,null),g=yE(i,v),m=yE(n,v),p=f("row",r),[y,b,$]=$7(p),S=aq(l,v),w=ae(p,{[`${p}-no-wrap`]:c===!1,[`${p}-${m}`]:m,[`${p}-${g}`]:g,[`${p}-rtl`]:h==="rtl"},o,b,$),C={},E=S[0]!=null&&S[0]>0?S[0]/-2:void 0;E&&(C.marginLeft=E,C.marginRight=E);const[O,x]=S;C.rowGap=x;const I=d.useMemo(()=>({gutter:[O,x],wrap:c}),[O,x,c]);return y(d.createElement(vD.Provider,{value:I},d.createElement("div",Object.assign({},u,{className:w,style:Object.assign(Object.assign({},C),a),ref:e}),s)))});function cq(t){return!!(t.addonBefore||t.addonAfter)}function uq(t){return!!(t.prefix||t.suffix||t.allowClear)}function bE(t,e,r){var n=e.cloneNode(!0),i=Object.create(t,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof e.selectionStart=="number"&&typeof e.selectionEnd=="number"&&(n.selectionStart=e.selectionStart,n.selectionEnd=e.selectionEnd),n.setSelectionRange=function(){e.setSelectionRange.apply(e,arguments)},i}function Mv(t,e,r,n){if(r){var i=e;if(e.type==="click"){i=bE(e,t,""),r(i);return}if(t.type!=="file"&&n!==void 0){i=bE(e,t,n),r(i);return}r(i)}}function gD(t,e){if(t){t.focus(e);var r=e||{},n=r.cursor;if(n){var i=t.value.length;switch(n){case"start":t.setSelectionRange(0,0);break;case"end":t.setSelectionRange(i,i);break;default:t.setSelectionRange(0,i)}}}}var mD=de.forwardRef(function(t,e){var r,n,i,o=t.inputElement,a=t.children,s=t.prefixCls,l=t.prefix,c=t.suffix,u=t.addonBefore,f=t.addonAfter,h=t.className,v=t.style,g=t.disabled,m=t.readOnly,p=t.focused,y=t.triggerFocus,b=t.allowClear,$=t.value,S=t.handleReset,w=t.hidden,C=t.classes,E=t.classNames,O=t.dataAttrs,x=t.styles,I=t.components,T=t.onClear,N=a??o,P=I?.affixWrapper||"span",_=I?.groupWrapper||"span",R=I?.wrapper||"span",M=I?.groupAddon||"span",D=d.useRef(null),j=function(ee){var Q;(Q=D.current)!==null&&Q!==void 0&&Q.contains(ee.target)&&y?.()},k=uq(t),V=d.cloneElement(N,{value:$,className:ae((r=N.props)===null||r===void 0?void 0:r.className,!k&&E?.variant)||null}),G=d.useRef(null);if(de.useImperativeHandle(e,function(){return{nativeElement:G.current||D.current}}),k){var W=null;if(b){var Y=!g&&!m&&$,q="".concat(s,"-clear-icon"),J=tt(b)==="object"&&b!==null&&b!==void 0&&b.clearIcon?b.clearIcon:"✖";W=de.createElement("button",{type:"button",tabIndex:-1,onClick:function(ee){S?.(ee),T?.()},onMouseDown:function(ee){return ee.preventDefault()},className:ae(q,A(A({},"".concat(q,"-hidden"),!Y),"".concat(q,"-has-suffix"),!!c))},J)}var oe="".concat(s,"-affix-wrapper"),ie=ae(oe,A(A(A(A(A({},"".concat(s,"-disabled"),g),"".concat(oe,"-disabled"),g),"".concat(oe,"-focused"),p),"".concat(oe,"-readonly"),m),"".concat(oe,"-input-with-clear-btn"),c&&b&&$),C?.affixWrapper,E?.affixWrapper,E?.variant),te=(c||b)&&de.createElement("span",{className:ae("".concat(s,"-suffix"),E?.suffix),style:x?.suffix},W,c);V=de.createElement(P,Re({className:ie,style:x?.affixWrapper,onClick:j},O?.affixWrapper,{ref:D}),l&&de.createElement("span",{className:ae("".concat(s,"-prefix"),E?.prefix),style:x?.prefix},l),V,te)}if(cq(t)){var z="".concat(s,"-group"),K="".concat(z,"-addon"),B="".concat(z,"-wrapper"),F=ae("".concat(s,"-wrapper"),z,C?.wrapper,E?.wrapper),U=ae(B,A({},"".concat(B,"-disabled"),g),C?.group,E?.groupWrapper);V=de.createElement(_,{className:U,ref:G},de.createElement(R,{className:F},u&&de.createElement(M,{className:K},u),V,f&&de.createElement(M,{className:K},f)))}return de.cloneElement(V,{className:ae((n=V.props)===null||n===void 0?void 0:n.className,h)||null,style:L(L({},(i=V.props)===null||i===void 0?void 0:i.style),v),hidden:w})}),dq=["show"];function yD(t,e){return d.useMemo(function(){var r={};e&&(r.show=tt(e)==="object"&&e.formatter?e.formatter:!!e),r=L(L({},r),t);var n=r,i=n.show,o=mt(n,dq);return L(L({},o),{},{show:!!i,showFormatter:typeof i=="function"?i:void 0,strategy:o.strategy||function(a){return a.length}})},[t,e])}var fq=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],hq=d.forwardRef(function(t,e){var r=t.autoComplete,n=t.onChange,i=t.onFocus,o=t.onBlur,a=t.onPressEnter,s=t.onKeyDown,l=t.onKeyUp,c=t.prefixCls,u=c===void 0?"rc-input":c,f=t.disabled,h=t.htmlSize,v=t.className,g=t.maxLength,m=t.suffix,p=t.showCount,y=t.count,b=t.type,$=b===void 0?"text":b,S=t.classes,w=t.classNames,C=t.styles,E=t.onCompositionStart,O=t.onCompositionEnd,x=mt(t,fq),I=d.useState(!1),T=le(I,2),N=T[0],P=T[1],_=d.useRef(!1),R=d.useRef(!1),M=d.useRef(null),D=d.useRef(null),j=function(ge){M.current&&gD(M.current,ge)},k=ln(t.defaultValue,{value:t.value}),V=le(k,2),G=V[0],W=V[1],Y=G==null?"":String(G),q=d.useState(null),J=le(q,2),oe=J[0],ie=J[1],te=yD(y,p),z=te.max||g,K=te.strategy(Y),B=!!z&&K>z;d.useImperativeHandle(e,function(){var xe;return{focus:j,blur:function(){var ne;(ne=M.current)===null||ne===void 0||ne.blur()},setSelectionRange:function(ne,X,fe){var pe;(pe=M.current)===null||pe===void 0||pe.setSelectionRange(ne,X,fe)},select:function(){var ne;(ne=M.current)===null||ne===void 0||ne.select()},input:M.current,nativeElement:((xe=D.current)===null||xe===void 0?void 0:xe.nativeElement)||M.current}}),d.useEffect(function(){R.current&&(R.current=!1),P(function(xe){return xe&&f?!1:xe})},[f]);var F=function(ge,ne,X){var fe=ne;if(!_.current&&te.exceedFormatter&&te.max&&te.strategy(ne)>te.max){if(fe=te.exceedFormatter(ne,{max:te.max}),ne!==fe){var pe,$e;ie([((pe=M.current)===null||pe===void 0?void 0:pe.selectionStart)||0,(($e=M.current)===null||$e===void 0?void 0:$e.selectionEnd)||0])}}else if(X.source==="compositionEnd")return;W(fe),M.current&&Mv(M.current,ge,n,fe)};d.useEffect(function(){if(oe){var xe;(xe=M.current)===null||xe===void 0||xe.setSelectionRange.apply(xe,Oe(oe))}},[oe]);var U=function(ge){F(ge,ge.target.value,{source:"change"})},Z=function(ge){_.current=!1,F(ge,ge.currentTarget.value,{source:"compositionEnd"}),O?.(ge)},ee=function(ge){a&&ge.key==="Enter"&&!R.current&&(R.current=!0,a(ge)),s?.(ge)},Q=function(ge){ge.key==="Enter"&&(R.current=!1),l?.(ge)},ce=function(ge){P(!0),i?.(ge)},me=function(ge){R.current&&(R.current=!1),P(!1),o?.(ge)},Te=function(ge){W(""),j(),M.current&&Mv(M.current,ge,n)},_e=B&&"".concat(u,"-out-of-range"),ve=function(){var ge=yn(t,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return de.createElement("input",Re({autoComplete:r},ge,{onChange:U,onFocus:ce,onBlur:me,onKeyDown:ee,onKeyUp:Q,className:ae(u,A({},"".concat(u,"-disabled"),f),w?.input),style:C?.input,ref:M,size:h,type:$,onCompositionStart:function(X){_.current=!0,E?.(X)},onCompositionEnd:Z}))},ye=function(){var ge=Number(z)>0;if(m||te.show){var ne=te.showFormatter?te.showFormatter({value:Y,count:K,maxLength:z}):"".concat(K).concat(ge?" / ".concat(z):"");return de.createElement(de.Fragment,null,te.show&&de.createElement("span",{className:ae("".concat(u,"-show-count-suffix"),A({},"".concat(u,"-show-count-has-suffix"),!!m),w?.count),style:L({},C?.count)},ne),m)}return null};return de.createElement(mD,Re({},x,{prefixCls:u,className:ae(v,_e),handleReset:Te,value:Y,focused:N,triggerFocus:j,suffix:ye(),disabled:f,classes:S,classNames:w,styles:C,ref:D}),ve())});const bD=t=>{let e;return typeof t=="object"&&t?.clearIcon?e=t:t&&(e={clearIcon:de.createElement(H$,null)}),e};function $D(t,e){const r=d.useRef([]),n=()=>{r.current.push(setTimeout(()=>{var i,o,a,s;!((i=t.current)===null||i===void 0)&&i.input&&((o=t.current)===null||o===void 0?void 0:o.input.getAttribute("type"))==="password"&&(!((a=t.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=t.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return d.useEffect(()=>(e&&n(),()=>r.current.forEach(i=>{i&&clearTimeout(i)})),[]),n}function vq(t){return!!(t.prefix||t.suffix||t.allowClear||t.showCount)}var pq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const Rd=d.forwardRef((t,e)=>{const{prefixCls:r,bordered:n=!0,status:i,size:o,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:f,addonBefore:h,className:v,style:g,styles:m,rootClassName:p,onChange:y,classNames:b,variant:$}=t,S=pq(t,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:w,direction:C,allowClear:E,autoComplete:O,className:x,style:I,classNames:T,styles:N}=Oo("input"),P=w("input",r),_=d.useRef(null),R=yi(P),[M,D,j]=oD(P,p),[k]=aD(P,R),{compactSize:V,compactItemClassnames:G}=hc(P,C),W=no(me=>{var Te;return(Te=o??V)!==null&&Te!==void 0?Te:me}),Y=de.useContext(Ji),q=a??Y,{status:J,hasFeedback:oe,feedbackIcon:ie}=d.useContext(Bn),te=Fp(J,i),z=vq(t)||!!oe;d.useRef(z);const K=$D(_,!0),B=me=>{K(),s?.(me)},F=me=>{K(),l?.(me)},U=me=>{K(),y?.(me)},Z=(oe||c)&&de.createElement(de.Fragment,null,c,oe&&ie),ee=bD(u??E),[Q,ce]=dw("input",$,n);return M(k(de.createElement(hq,Object.assign({ref:mi(e,_),prefixCls:P,autoComplete:O},S,{disabled:q,onBlur:B,onFocus:F,style:Object.assign(Object.assign({},I),g),styles:Object.assign(Object.assign({},N),m),suffix:Z,allowClear:ee,className:ae(v,p,j,R,G,x),onChange:U,addonBefore:h&&de.createElement(Ov,{form:!0,space:!0},h),addonAfter:f&&de.createElement(Ov,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},b),T),{input:ae({[`${P}-sm`]:W==="small",[`${P}-lg`]:W==="large",[`${P}-rtl`]:C==="rtl"},b?.input,T.input,D),variant:ae({[`${P}-${Q}`]:ce},Tv(P,te)),affixWrapper:ae({[`${P}-affix-wrapper-sm`]:W==="small",[`${P}-affix-wrapper-lg`]:W==="large",[`${P}-affix-wrapper-rtl`]:C==="rtl"},D),wrapper:ae({[`${P}-group-rtl`]:C==="rtl"},D),groupWrapper:ae({[`${P}-group-wrapper-sm`]:W==="small",[`${P}-group-wrapper-lg`]:W==="large",[`${P}-group-wrapper-rtl`]:C==="rtl",[`${P}-group-wrapper-${Q}`]:ce},Tv(`${P}-group-wrapper`,te,oe),D)})}))))});function $E(t){return["small","middle","large"].includes(t)}function wE(t){return t?typeof t=="number"&&!Number.isNaN(t):!1}const wD=de.createContext({latestIndex:0}),gq=wD.Provider,mq=({className:t,index:e,children:r,split:n,style:i})=>{const{latestIndex:o}=d.useContext(wD);return r==null?null:d.createElement(d.Fragment,null,d.createElement("div",{className:t,style:i},r),e<o&&n&&d.createElement("span",{className:`${t}-split`},n))};var yq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const bq=d.forwardRef((t,e)=>{var r;const{getPrefixCls:n,direction:i,size:o,className:a,style:s,classNames:l,styles:c}=Oo("space"),{size:u=o??"small",align:f,className:h,rootClassName:v,children:g,direction:m="horizontal",prefixCls:p,split:y,style:b,wrap:$=!1,classNames:S,styles:w}=t,C=yq(t,["size","align","className","rootClassName","children","direction","prefixCls","split","style","wrap","classNames","styles"]),[E,O]=Array.isArray(u)?u:[u,u],x=$E(O),I=$E(E),T=wE(O),N=wE(E),P=Mi(g,{keepEmpty:!0}),_=f===void 0&&m==="horizontal"?"center":f,R=n("space",p),[M,D,j]=kN(R),k=ae(R,a,D,`${R}-${m}`,{[`${R}-rtl`]:i==="rtl",[`${R}-align-${_}`]:_,[`${R}-gap-row-${O}`]:x,[`${R}-gap-col-${E}`]:I},h,v,j),V=ae(`${R}-item`,(r=S?.item)!==null&&r!==void 0?r:l.item);let G=0;const W=P.map((J,oe)=>{var ie;J!=null&&(G=oe);const te=J?.key||`${V}-${oe}`;return d.createElement(mq,{className:V,key:te,index:oe,split:y,style:(ie=w?.item)!==null&&ie!==void 0?ie:c.item},J)}),Y=d.useMemo(()=>({latestIndex:G}),[G]);if(P.length===0)return null;const q={};return $&&(q.flexWrap="wrap"),!I&&N&&(q.columnGap=E),!x&&T&&(q.rowGap=O),M(d.createElement("div",Object.assign({ref:e,className:k,style:Object.assign(Object.assign(Object.assign({},q),s),b)},C),d.createElement(gq,{value:Y},W)))}),SD=bq;SD.Compact=XH;var $q=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const CD=t=>{const{getPopupContainer:e,getPrefixCls:r,direction:n}=d.useContext(Dt),{prefixCls:i,type:o="default",danger:a,disabled:s,loading:l,onClick:c,htmlType:u,children:f,className:h,menu:v,arrow:g,autoFocus:m,overlay:p,trigger:y,align:b,open:$,onOpenChange:S,placement:w,getPopupContainer:C,href:E,icon:O=d.createElement(UM,null),title:x,buttonsRender:I=B=>B,mouseEnterDelay:T,mouseLeaveDelay:N,overlayClassName:P,overlayStyle:_,destroyOnHidden:R,destroyPopupOnHide:M,dropdownRender:D,popupRender:j}=t,k=$q(t,["prefixCls","type","danger","disabled","loading","onClick","htmlType","children","className","menu","arrow","autoFocus","overlay","trigger","align","open","onOpenChange","placement","getPopupContainer","href","icon","title","buttonsRender","mouseEnterDelay","mouseLeaveDelay","overlayClassName","overlayStyle","destroyOnHidden","destroyPopupOnHide","dropdownRender","popupRender"]),V=r("dropdown",i),G=`${V}-button`,Y={menu:v,arrow:g,autoFocus:m,align:b,disabled:s,trigger:s?[]:y,onOpenChange:S,getPopupContainer:C||e,mouseEnterDelay:T,mouseLeaveDelay:N,overlayClassName:P,overlayStyle:_,destroyOnHidden:R,popupRender:j||D},{compactSize:q,compactItemClassnames:J}=hc(V,n),oe=ae(G,J,h);"destroyPopupOnHide"in t&&(Y.destroyPopupOnHide=M),"overlay"in t&&(Y.overlay=p),"open"in t&&(Y.open=$),"placement"in t?Y.placement=w:Y.placement=n==="rtl"?"bottomLeft":"bottomRight";const ie=d.createElement(bs,{type:o,danger:a,disabled:s,loading:l,onClick:c,htmlType:u,href:E,title:x},f),te=d.createElement(bs,{type:o,danger:a,icon:O}),[z,K]=I([ie,te]);return d.createElement(SD.Compact,Object.assign({className:oe,size:q,block:!0},k),z,d.createElement(Vp,Object.assign({},Y),K))};CD.__ANT_BUTTON=!0;const Ow=Vp;Ow.Button=CD;function wq(t){return t==null?null:typeof t=="object"&&!d.isValidElement(t)?t:{title:t}}function Dv(t){const[e,r]=d.useState(t);return d.useEffect(()=>{const n=setTimeout(()=>{r(t)},t.length?0:10);return()=>{clearTimeout(n)}},[t]),e}const Sq=t=>{const{componentCls:e}=t,r=`${e}-show-help`,n=`${e}-show-help-item`;return{[r]:{transition:`opacity ${t.motionDurationFast} ${t.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[n]:{overflow:"hidden",transition:`height ${t.motionDurationFast} ${t.motionEaseInOut},
                     opacity ${t.motionDurationFast} ${t.motionEaseInOut},
                     transform ${t.motionDurationFast} ${t.motionEaseInOut} !important`,[`&${n}-appear, &${n}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${n}-leave-active`]:{transform:"translateY(-5px)"}}}}},Cq=t=>({legend:{display:"block",width:"100%",marginBottom:t.marginLG,padding:0,color:t.colorTextDescription,fontSize:t.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n  input[type='radio']:focus,\n  input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${se(t.controlOutlineWidth)} ${t.controlOutline}`},output:{display:"block",paddingTop:15,color:t.colorText,fontSize:t.fontSize,lineHeight:t.lineHeight}}),SE=(t,e)=>{const{formItemCls:r}=t;return{[r]:{[`${r}-label > label`]:{height:e},[`${r}-control-input`]:{minHeight:e}}}},xq=t=>{const{componentCls:e}=t;return{[t.componentCls]:Object.assign(Object.assign(Object.assign({},Ar(t)),Cq(t)),{[`${e}-text`]:{display:"inline-block",paddingInlineEnd:t.paddingSM},"&-small":Object.assign({},SE(t,t.controlHeightSM)),"&-large":Object.assign({},SE(t,t.controlHeightLG))})}},Eq=t=>{const{formItemCls:e,iconCls:r,rootPrefixCls:n,antCls:i,labelRequiredMarkColor:o,labelColor:a,labelFontSize:s,labelHeight:l,labelColonMarginInlineStart:c,labelColonMarginInlineEnd:u,itemMarginBottom:f}=t;return{[e]:Object.assign(Object.assign({},Ar(t)),{marginBottom:f,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
        &-hidden${i}-row`]:{display:"none"},"&-has-warning":{[`${e}-split`]:{color:t.colorError}},"&-has-error":{[`${e}-split`]:{color:t.colorWarning}},[`${e}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:t.lineHeight,whiteSpace:"unset","> label":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:l,color:a,fontSize:s,[`> ${r}`]:{fontSize:t.fontSize,verticalAlign:"top"},[`&${e}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:t.marginXXS,color:o,fontSize:t.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${e}-required-mark-hidden, &${e}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${e}-optional`]:{display:"inline-block",marginInlineStart:t.marginXXS,color:t.colorTextDescription,[`&${e}-required-mark-hidden`]:{display:"none"}},[`${e}-tooltip`]:{color:t.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:t.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:c,marginInlineEnd:u},[`&${e}-no-colon::after`]:{content:'"\\a0"'}}},[`${e}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${n}-col-'"]):not([class*="' ${n}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:t.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${i}-switch:only-child, > ${i}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[e]:{"&-additional":{display:"flex",flexDirection:"column"},"&-explain, &-extra":{clear:"both",color:t.colorTextDescription,fontSize:t.fontSize,lineHeight:t.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:t.controlHeightSM,transition:`color ${t.motionDurationMid} ${t.motionEaseOut}`},"&-explain":{"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning}}},[`&-with-help ${e}-explain`]:{height:"auto",opacity:1},[`${e}-feedback-icon`]:{fontSize:t.fontSize,textAlign:"center",visibility:"visible",animationName:Z$,animationDuration:t.motionDurationMid,animationTimingFunction:t.motionEaseOutBack,pointerEvents:"none","&-success":{color:t.colorSuccess},"&-error":{color:t.colorError},"&-warning":{color:t.colorWarning},"&-validating":{color:t.colorPrimary}}})}},CE=(t,e)=>{const{formItemCls:r}=t;return{[`${e}-horizontal`]:{[`${r}-label`]:{flexGrow:0},[`${r}-control`]:{flex:"1 1 0",minWidth:0},[`${r}-label[class$='-24'], ${r}-label[class*='-24 ']`]:{[`& + ${r}-control`]:{minWidth:"unset"}}}}},Oq=t=>{const{componentCls:e,formItemCls:r,inlineItemMarginBottom:n}=t;return{[`${e}-inline`]:{display:"flex",flexWrap:"wrap",[r]:{flex:"none",marginInlineEnd:t.margin,marginBottom:n,"&-row":{flexWrap:"nowrap"},[`> ${r}-label,
        > ${r}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${r}-label`]:{flex:"none"},[`${e}-text`]:{display:"inline-block"},[`${r}-has-feedback`]:{display:"inline-block"}}}}},Ki=t=>({padding:t.verticalLabelPadding,margin:t.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),xD=t=>{const{componentCls:e,formItemCls:r,rootPrefixCls:n}=t;return{[`${r} ${r}-label`]:Ki(t),[`${e}:not(${e}-inline)`]:{[r]:{flexWrap:"wrap",[`${r}-label, ${r}-control`]:{[`&:not([class*=" ${n}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Iq=t=>{const{componentCls:e,formItemCls:r,antCls:n}=t;return{[`${e}-vertical`]:{[`${r}:not(${r}-horizontal)`]:{[`${r}-row`]:{flexDirection:"column"},[`${r}-label > label`]:{height:"auto"},[`${r}-control`]:{width:"100%"},[`${r}-label,
        ${n}-col-24${r}-label,
        ${n}-col-xl-24${r}-label`]:Ki(t)}},[`@media (max-width: ${se(t.screenXSMax)})`]:[xD(t),{[e]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-xs-24${r}-label`]:Ki(t)}}}],[`@media (max-width: ${se(t.screenSMMax)})`]:{[e]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-sm-24${r}-label`]:Ki(t)}}},[`@media (max-width: ${se(t.screenMDMax)})`]:{[e]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-md-24${r}-label`]:Ki(t)}}},[`@media (max-width: ${se(t.screenLGMax)})`]:{[e]:{[`${r}:not(${r}-horizontal)`]:{[`${n}-col-lg-24${r}-label`]:Ki(t)}}}}},Tq=t=>{const{formItemCls:e,antCls:r}=t;return{[`${e}-vertical`]:{[`${e}-row`]:{flexDirection:"column"},[`${e}-label > label`]:{height:"auto"},[`${e}-control`]:{width:"100%"}},[`${e}-vertical ${e}-label,
      ${r}-col-24${e}-label,
      ${r}-col-xl-24${e}-label`]:Ki(t),[`@media (max-width: ${se(t.screenXSMax)})`]:[xD(t),{[e]:{[`${r}-col-xs-24${e}-label`]:Ki(t)}}],[`@media (max-width: ${se(t.screenSMMax)})`]:{[e]:{[`${r}-col-sm-24${e}-label`]:Ki(t)}},[`@media (max-width: ${se(t.screenMDMax)})`]:{[e]:{[`${r}-col-md-24${e}-label`]:Ki(t)}},[`@media (max-width: ${se(t.screenLGMax)})`]:{[e]:{[`${r}-col-lg-24${e}-label`]:Ki(t)}}}},_q=t=>({labelRequiredMarkColor:t.colorError,labelColor:t.colorTextHeading,labelFontSize:t.fontSize,labelHeight:t.controlHeight,labelColonMarginInlineStart:t.marginXXS/2,labelColonMarginInlineEnd:t.marginXS,itemMarginBottom:t.marginLG,verticalLabelPadding:`0 0 ${t.paddingXS}px`,verticalLabelMargin:0,inlineItemMarginBottom:0}),ED=(t,e)=>Xt(t,{formItemCls:`${t.componentCls}-item`,rootPrefixCls:e}),Iw=Gr("Form",(t,{rootPrefixCls:e})=>{const r=ED(t,e);return[xq(r),Eq(r),Sq(r),CE(r,r.componentCls),CE(r,r.formItemCls),Oq(r),Iq(r),Tq(r),U$(r),Z$]},_q,{order:-1e3}),xE=[];function Im(t,e,r,n=0){return{key:typeof t=="string"?t:`${e}-${n}`,error:t,errorStatus:r}}const OD=({help:t,helpStatus:e,errors:r=xE,warnings:n=xE,className:i,fieldId:o,onVisibleChanged:a})=>{const{prefixCls:s}=d.useContext(aw),l=`${s}-item-explain`,c=yi(s),[u,f,h]=Iw(s,c),v=d.useMemo(()=>xv(s),[s]),g=Dv(r),m=Dv(n),p=d.useMemo(()=>t!=null?[Im(t,"help",e)]:[].concat(Oe(g.map(($,S)=>Im($,"error","error",S))),Oe(m.map(($,S)=>Im($,"warning","warning",S)))),[t,e,g,m]),y=d.useMemo(()=>{const $={};return p.forEach(({key:S})=>{$[S]=($[S]||0)+1}),p.map((S,w)=>Object.assign(Object.assign({},S),{key:$[S.key]>1?`${S.key}-fallback-${w}`:S.key}))},[p]),b={};return o&&(b.id=`${o}_help`),u(d.createElement(ka,{motionDeadline:v.motionDeadline,motionName:`${s}-show-help`,visible:!!y.length,onVisibleChanged:a},$=>{const{className:S,style:w}=$;return d.createElement("div",Object.assign({},b,{className:ae(l,S,h,c,i,f),style:w}),d.createElement(R6,Object.assign({keys:y},xv(s),{motionName:`${s}-show-help-item`,component:!1}),C=>{const{key:E,error:O,errorStatus:x,className:I,style:T}=C;return d.createElement("div",{key:E,className:ae(I,{[`${l}-${x}`]:x}),style:T},O)}))}))},Pq=["parentNode"],Rq="form_item";function Cu(t){return t===void 0||t===!1?[]:Array.isArray(t)?t:[t]}function ID(t,e){if(!t.length)return;const r=t.join("_");return e?`${e}_${r}`:Pq.includes(r)?`${Rq}_${r}`:r}function TD(t,e,r,n,i,o){let a=n;return o!==void 0?a=o:r.validating?a="validating":t.length?a="error":e.length?a="warning":(r.touched||i&&r.validated)&&(a="success"),a}var Nq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function EE(t){return Cu(t).join("_")}function OE(t,e){const r=e.getFieldInstance(t),n=yd(r);if(n)return n;const i=ID(Cu(t),e.__INTERNAL__.name);if(i)return document.getElementById(i)}function _D(t){const[e]=ow(),r=d.useRef({}),n=d.useMemo(()=>t??Object.assign(Object.assign({},e),{__INTERNAL__:{itemRef:i=>o=>{const a=EE(i);o?r.current[a]=o:delete r.current[a]}},scrollToField:(i,o={})=>{const{focus:a}=o,s=Nq(o,["focus"]),l=OE(i,n);l&&(pH(l,Object.assign({scrollMode:"if-needed",block:"nearest"},s)),a&&n.focusField(i))},focusField:i=>{var o,a;const s=n.getFieldInstance(i);typeof s?.focus=="function"?s.focus():(a=(o=OE(i,n))===null||o===void 0?void 0:o.focus)===null||a===void 0||a.call(o)},getFieldInstance:i=>{const o=EE(i);return r.current[o]}}),[t,e]);return[n]}var Mq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const Dq=(t,e)=>{const r=d.useContext(Ji),{getPrefixCls:n,direction:i,requiredMark:o,colon:a,scrollToFirstError:s,className:l,style:c}=Oo("form"),{prefixCls:u,className:f,rootClassName:h,size:v,disabled:g=r,form:m,colon:p,labelAlign:y,labelWrap:b,labelCol:$,wrapperCol:S,hideRequiredMark:w,layout:C="horizontal",scrollToFirstError:E,requiredMark:O,onFinishFailed:x,name:I,style:T,feedbackIcons:N,variant:P}=t,_=Mq(t,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),R=no(v),M=d.useContext(tN),D=d.useMemo(()=>O!==void 0?O:w?!1:o!==void 0?o:!0,[w,O,o]),j=p??a,k=n("form",u),V=yi(k),[G,W,Y]=Iw(k,V),q=ae(k,`${k}-${C}`,{[`${k}-hide-required-mark`]:D===!1,[`${k}-rtl`]:i==="rtl",[`${k}-${R}`]:R},Y,V,W,l,f,h),[J]=_D(m),{__INTERNAL__:oe}=J;oe.name=I;const ie=d.useMemo(()=>({name:I,labelAlign:y,labelCol:$,labelWrap:b,wrapperCol:S,vertical:C==="vertical",colon:j,requiredMark:D,itemRef:oe.itemRef,form:J,feedbackIcons:N}),[I,y,$,S,C,j,D,J,N]),te=d.useRef(null);d.useImperativeHandle(e,()=>{var B;return Object.assign(Object.assign({},J),{nativeElement:(B=te.current)===null||B===void 0?void 0:B.nativeElement})});const z=(B,F)=>{if(B){let U={block:"nearest"};typeof B=="object"&&(U=Object.assign(Object.assign({},U),B)),J.scrollToField(F,U)}},K=B=>{if(x?.(B),B.errorFields.length){const F=B.errorFields[0].name;if(E!==void 0){z(E,F);return}s!==void 0&&z(s,F)}};return G(d.createElement(tM.Provider,{value:P},d.createElement(cN,{disabled:g},d.createElement(ms.Provider,{value:R},d.createElement(eM,{validateMessages:M},d.createElement(Uo.Provider,{value:ie},d.createElement(vc,Object.assign({id:I},_,{name:I,onFinishFailed:K,form:J,ref:te,style:Object.assign(Object.assign({},c),T),className:q}))))))))},Aq=d.forwardRef(Dq);function jq(t){if(typeof t=="function")return t;const e=Mi(t);return e.length<=1?e[0]:e}const PD=()=>{const{status:t,errors:e=[],warnings:r=[]}=d.useContext(Bn);return{status:t,errors:e,warnings:r}};PD.Context=Bn;function kq(t){const[e,r]=d.useState(t),n=d.useRef(null),i=d.useRef([]),o=d.useRef(!1);d.useEffect(()=>(o.current=!1,()=>{o.current=!0,Ht.cancel(n.current),n.current=null}),[]);function a(s){o.current||(n.current===null&&(i.current=[],n.current=Ht(()=>{n.current=null,r(l=>{let c=l;return i.current.forEach(u=>{c=u(c)}),c})})),i.current.push(s))}return[e,a]}function Bq(){const{itemRef:t}=d.useContext(Uo),e=d.useRef({});function r(n,i){const o=i&&typeof i=="object"&&ja(i),a=n.join("_");return(e.current.name!==a||e.current.originRef!==o)&&(e.current.name=a,e.current.originRef=o,e.current.ref=mi(t(n),o)),e.current.ref}return r}const Fq=t=>{const{formItemCls:e}=t;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${e}-control`]:{display:"flex"}}}},Lq=L$(["Form","item-item"],(t,{rootPrefixCls:e})=>{const r=ED(t,e);return[Fq(r)]});var zq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const Hq=24,Vq=t=>{const{prefixCls:e,status:r,labelCol:n,wrapperCol:i,children:o,errors:a,warnings:s,_internalItemRender:l,extra:c,help:u,fieldId:f,marginBottom:h,onErrorVisibleChanged:v,label:g}=t,m=`${e}-item`,p=d.useContext(Uo),y=d.useMemo(()=>{let _=Object.assign({},i||p.wrapperCol||{});return g===null&&!n&&!i&&p.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(M=>{const D=M?[M]:[],j=kn(p.labelCol,D),k=typeof j=="object"?j:{},V=kn(_,D),G=typeof V=="object"?V:{};"span"in k&&!("offset"in G)&&k.span<Hq&&(_=Ii(_,[].concat(D,["offset"]),k.span))}),_},[i,p]),b=ae(`${m}-control`,y.className),$=d.useMemo(()=>{const{labelCol:_,wrapperCol:R}=p;return zq(p,["labelCol","wrapperCol"])},[p]),S=d.useRef(null),[w,C]=d.useState(0);Lt(()=>{c&&S.current?C(S.current.clientHeight):C(0)},[c]);const E=d.createElement("div",{className:`${m}-control-input`},d.createElement("div",{className:`${m}-control-input-content`},o)),O=d.useMemo(()=>({prefixCls:e,status:r}),[e,r]),x=h!==null||a.length||s.length?d.createElement(aw.Provider,{value:O},d.createElement(OD,{fieldId:f,errors:a,warnings:s,help:u,helpStatus:r,className:`${m}-explain-connected`,onVisibleChanged:v})):null,I={};f&&(I.id=`${f}_extra`);const T=c?d.createElement("div",Object.assign({},I,{className:`${m}-extra`,ref:S}),c):null,N=x||T?d.createElement("div",{className:`${m}-additional`,style:h?{minHeight:h+w}:{}},x,T):null,P=l&&l.mark==="pro_table_render"&&l.render?l.render(t,{input:E,errorList:x,extra:T}):d.createElement(d.Fragment,null,E,N);return d.createElement(Uo.Provider,{value:$},d.createElement(pD,Object.assign({},y,{className:b}),P),d.createElement(Lq,{prefixCls:e}))};var Wq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},Kq=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:Wq}))},Uq=d.forwardRef(Kq),qq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const Gq=({prefixCls:t,label:e,htmlFor:r,labelCol:n,labelAlign:i,colon:o,required:a,requiredMark:s,tooltip:l,vertical:c})=>{var u;const[f]=$d("Form"),{labelAlign:h,labelCol:v,labelWrap:g,colon:m}=d.useContext(Uo);if(!e)return null;const p=n||v||{},y=i||h,b=`${t}-item-label`,$=ae(b,y==="left"&&`${b}-left`,p.className,{[`${b}-wrap`]:!!g});let S=e;const w=o===!0||m!==!1&&o!==!1;w&&!c&&typeof e=="string"&&e.trim()&&(S=e.replace(/[:|：]\s*$/,""));const E=wq(l);if(E){const{icon:P=d.createElement(Uq,null)}=E,_=qq(E,["icon"]),R=d.createElement(Ju,Object.assign({},_),d.cloneElement(P,{className:`${t}-item-tooltip`,title:"",onClick:M=>{M.preventDefault()},tabIndex:null}));S=d.createElement(d.Fragment,null,S,R)}const O=s==="optional",x=typeof s=="function",I=s===!1;x?S=s(S,{required:!!a}):O&&!a&&(S=d.createElement(d.Fragment,null,S,d.createElement("span",{className:`${t}-item-optional`,title:""},f?.optional||((u=_a.Form)===null||u===void 0?void 0:u.optional))));let T;I?T="hidden":(O||x)&&(T="optional");const N=ae({[`${t}-item-required`]:a,[`${t}-item-required-mark-${T}`]:T,[`${t}-item-no-colon`]:!w});return d.createElement(pD,Object.assign({},p,{className:$}),d.createElement("label",{htmlFor:r,className:N,title:typeof e=="string"?e:""},S))},Xq={success:Z6,warning:aH,error:H$,validating:Ep};function RD({children:t,errors:e,warnings:r,hasFeedback:n,validateStatus:i,prefixCls:o,meta:a,noStyle:s}){const l=`${o}-item`,{feedbackIcons:c}=d.useContext(Uo),u=TD(e,r,a,null,!!n,i),{isFormItemInput:f,status:h,hasFeedback:v,feedbackIcon:g}=d.useContext(Bn),m=d.useMemo(()=>{var p;let y;if(n){const $=n!==!0&&n.icons||c,S=u&&((p=$?.({status:u,errors:e,warnings:r}))===null||p===void 0?void 0:p[u]),w=u&&Xq[u];y=S!==!1&&w?d.createElement("span",{className:ae(`${l}-feedback-icon`,`${l}-feedback-icon-${u}`)},S||d.createElement(w,null)):null}const b={status:u||"",errors:e,warnings:r,hasFeedback:!!n,feedbackIcon:y,isFormItemInput:!0};return s&&(b.status=(u??h)||"",b.isFormItemInput=f,b.hasFeedback=!!(n??v),b.feedbackIcon=n!==void 0?b.feedbackIcon:g),b},[u,n,s,f,h]);return d.createElement(Bn.Provider,{value:m},t)}var Yq=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function Jq(t){const{prefixCls:e,className:r,rootClassName:n,style:i,help:o,errors:a,warnings:s,validateStatus:l,meta:c,hasFeedback:u,hidden:f,children:h,fieldId:v,required:g,isRequired:m,onSubItemMetaChange:p,layout:y}=t,b=Yq(t,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout"]),$=`${e}-item`,{requiredMark:S,vertical:w}=d.useContext(Uo),C=w||y==="vertical",E=d.useRef(null),O=Dv(a),x=Dv(s),I=o!=null,T=!!(I||a.length||s.length),N=!!E.current&&Cd(E.current),[P,_]=d.useState(null);Lt(()=>{if(T&&E.current){const k=getComputedStyle(E.current);_(parseInt(k.marginBottom,10))}},[T,N]);const R=k=>{k||_(null)},D=((k=!1)=>{const V=k?O:c.errors,G=k?x:c.warnings;return TD(V,G,c,"",!!u,l)})(),j=ae($,r,n,{[`${$}-with-help`]:I||O.length||x.length,[`${$}-has-feedback`]:D&&u,[`${$}-has-success`]:D==="success",[`${$}-has-warning`]:D==="warning",[`${$}-has-error`]:D==="error",[`${$}-is-validating`]:D==="validating",[`${$}-hidden`]:f,[`${$}-${y}`]:y});return d.createElement("div",{className:j,style:i,ref:E},d.createElement(lq,Object.assign({className:`${$}-row`},yn(b,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),d.createElement(Gq,Object.assign({htmlFor:v},t,{requiredMark:S,required:g??m,prefixCls:e,vertical:C})),d.createElement(Vq,Object.assign({},t,c,{errors:O,warnings:x,prefixCls:e,status:D,help:o,marginBottom:P,onErrorVisibleChanged:R}),d.createElement(QN.Provider,{value:p},d.createElement(RD,{prefixCls:e,meta:c,errors:c.errors,warnings:c.warnings,hasFeedback:u,validateStatus:D},h)))),!!P&&d.createElement("div",{className:`${$}-margin-offset`,style:{marginBottom:-P}}))}const Zq="__SPLIT__";function Qq(t,e){const r=Object.keys(t),n=Object.keys(e);return r.length===n.length&&r.every(i=>{const o=t[i],a=e[i];return o===a||typeof o=="function"||typeof a=="function"})}const eG=d.memo(({children:t})=>t,(t,e)=>Qq(t.control,e.control)&&t.update===e.update&&t.childProps.length===e.childProps.length&&t.childProps.every((r,n)=>r===e.childProps[n]));function IE(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function tG(t){const{name:e,noStyle:r,className:n,dependencies:i,prefixCls:o,shouldUpdate:a,rules:s,children:l,required:c,label:u,messageVariables:f,trigger:h="onChange",validateTrigger:v,hidden:g,help:m,layout:p}=t,{getPrefixCls:y}=d.useContext(Dt),{name:b}=d.useContext(Uo),$=jq(l),S=typeof $=="function",w=d.useContext(QN),{validateTrigger:C}=d.useContext($s),E=v!==void 0?v:C,O=e!=null,x=y("form",o),I=yi(x),[T,N,P]=Iw(x,I);Ms();const _=d.useContext(Gu),R=d.useRef(null),[M,D]=kq({}),[j,k]=ql(()=>IE()),V=ie=>{const te=_?.getKey(ie.name);if(k(ie.destroy?IE():ie,!0),r&&m!==!1&&w){let z=ie.name;if(ie.destroy)z=R.current||z;else if(te!==void 0){const[K,B]=te;z=[K].concat(Oe(B)),R.current=z}w(ie,z)}},G=(ie,te)=>{D(z=>{const K=Object.assign({},z),F=[].concat(Oe(ie.name.slice(0,-1)),Oe(te)).join(Zq);return ie.destroy?delete K[F]:K[F]=ie,K})},[W,Y]=d.useMemo(()=>{const ie=Oe(j.errors),te=Oe(j.warnings);return Object.values(M).forEach(z=>{ie.push.apply(ie,Oe(z.errors||[])),te.push.apply(te,Oe(z.warnings||[]))}),[ie,te]},[M,j.errors,j.warnings]),q=Bq();function J(ie,te,z){return r&&!g?d.createElement(RD,{prefixCls:x,hasFeedback:t.hasFeedback,validateStatus:t.validateStatus,meta:j,errors:W,warnings:Y,noStyle:!0},ie):d.createElement(Jq,Object.assign({key:"row"},t,{className:ae(n,P,I,N),prefixCls:x,fieldId:te,isRequired:z,errors:W,warnings:Y,meta:j,onSubItemMetaChange:G,layout:p}),ie)}if(!O&&!S&&!i)return T(J($));let oe={};return typeof u=="string"?oe.label=u:e&&(oe.label=String(e)),f&&(oe=Object.assign(Object.assign({},oe),f)),T(d.createElement(iw,Object.assign({},t,{messageVariables:oe,trigger:h,validateTrigger:E,onMetaChange:V}),(ie,te,z)=>{const K=Cu(e).length&&te?te.name:[],B=ID(K,b),F=c!==void 0?c:!!s?.some(ee=>{if(ee&&typeof ee=="object"&&ee.required&&!ee.warningOnly)return!0;if(typeof ee=="function"){const Q=ee(z);return Q?.required&&!Q?.warningOnly}return!1}),U=Object.assign({},ie);let Z=null;if(Array.isArray($)&&O)Z=$;else if(!(S&&(!(a||i)||O))){if(!(i&&!S&&!O))if(d.isValidElement($)){const ee=Object.assign(Object.assign({},$.props),U);if(ee.id||(ee.id=B),m||W.length>0||Y.length>0||t.extra){const me=[];(m||W.length>0)&&me.push(`${B}_help`),t.extra&&me.push(`${B}_extra`),ee["aria-describedby"]=me.join(" ")}W.length>0&&(ee["aria-invalid"]="true"),F&&(ee["aria-required"]="true"),Yi($)&&(ee.ref=q(K,$)),new Set([].concat(Oe(Cu(h)),Oe(Cu(E)))).forEach(me=>{ee[me]=(...Te)=>{var _e,ve,ye,xe,ge;(ye=U[me])===null||ye===void 0||(_e=ye).call.apply(_e,[U].concat(Te)),(ge=(xe=$.props)[me])===null||ge===void 0||(ve=ge).call.apply(ve,[xe].concat(Te))}});const ce=[ee["aria-required"],ee["aria-invalid"],ee["aria-describedby"]];Z=d.createElement(eG,{control:U,update:$,childProps:ce},gi($,ee))}else S&&(a||i)&&!O?Z=$(z):Z=$}return J(Z,B,F)}))}const ND=tG;ND.useStatus=PD;var rG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const nG=t=>{var{prefixCls:e,children:r}=t,n=rG(t,["prefixCls","children"]);const{getPrefixCls:i}=d.useContext(Dt),o=i("form",e),a=d.useMemo(()=>({prefixCls:o,status:"error"}),[o]);return d.createElement(XN,Object.assign({},n),(s,l,c)=>d.createElement(aw.Provider,{value:a},r(s.map(u=>Object.assign(Object.assign({},u),{fieldKey:u.key})),l,{errors:c.errors,warnings:c.warnings})))};function iG(){const{form:t}=d.useContext(Uo);return t}const Ba=Aq;Ba.Item=ND;Ba.List=nG;Ba.ErrorList=OD;Ba.useForm=_D;Ba.useFormInstance=iG;Ba.useWatch=ZN;Ba.Provider=eM;Ba.create=()=>{};var oG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},aG=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:oG}))},sG=d.forwardRef(aG);function TE(t,e,r,n){var i=pv.unstable_batchedUpdates?function(a){pv.unstable_batchedUpdates(r,a)}:r;return t!=null&&t.addEventListener&&t.addEventListener(e,i,n),{remove:function(){t!=null&&t.removeEventListener&&t.removeEventListener(e,i,n)}}}const lG=t=>{const{getPrefixCls:e,direction:r}=d.useContext(Dt),{prefixCls:n,className:i}=t,o=e("input-group",n),a=e("input"),[s,l,c]=aD(a),u=ae(o,c,{[`${o}-lg`]:t.size==="large",[`${o}-sm`]:t.size==="small",[`${o}-compact`]:t.compact,[`${o}-rtl`]:r==="rtl"},l,i),f=d.useContext(Bn),h=d.useMemo(()=>Object.assign(Object.assign({},f),{isFormItemInput:!1}),[f]);return s(d.createElement("span",{className:u,style:t.style,onMouseEnter:t.onMouseEnter,onMouseLeave:t.onMouseLeave,onFocus:t.onFocus,onBlur:t.onBlur},d.createElement(Bn.Provider,{value:h},t.children)))},cG=t=>{const{componentCls:e,paddingXS:r}=t;return{[e]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${e}-input-wrapper`]:{position:"relative",[`${e}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${e}-mask-input`]:{color:"transparent",caretColor:"var(--ant-color-text)"},[`${e}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${e}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${e}-input`]:{textAlign:"center",paddingInline:t.paddingXXS},[`&${e}-sm ${e}-input`]:{paddingInline:t.calc(t.paddingXXS).div(2).equal()},[`&${e}-lg ${e}-input`]:{paddingInline:t.paddingXS}}}},uG=Gr(["Input","OTP"],t=>{const e=Xt(t,Td(t));return[cG(e)]},_d);var dG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const fG=d.forwardRef((t,e)=>{const{className:r,value:n,onChange:i,onActiveChange:o,index:a,mask:s}=t,l=dG(t,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=d.useContext(Dt),u=c("otp"),f=typeof s=="string"?s:n,h=d.useRef(null);d.useImperativeHandle(e,()=>h.current);const v=y=>{i(a,y.target.value)},g=()=>{Ht(()=>{var y;const b=(y=h.current)===null||y===void 0?void 0:y.input;document.activeElement===b&&b&&b.select()})},m=y=>{const{key:b,ctrlKey:$,metaKey:S}=y;b==="ArrowLeft"?o(a-1):b==="ArrowRight"?o(a+1):b==="z"&&($||S)&&y.preventDefault(),g()},p=y=>{y.key==="Backspace"&&!n&&o(a-1),g()};return d.createElement("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&n!==""&&n!==void 0&&d.createElement("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},f),d.createElement(Rd,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:h,value:n,onInput:v,onFocus:g,onKeyDown:m,onKeyUp:p,onMouseDown:g,onMouseUp:g,className:ae(r,{[`${u}-mask-input`]:s})})))});var hG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function Wf(t){return(t||"").split("")}const vG=t=>{const{index:e,prefixCls:r,separator:n}=t,i=typeof n=="function"?n(e):n;return i?d.createElement("span",{className:`${r}-separator`},i):null},pG=d.forwardRef((t,e)=>{const{prefixCls:r,length:n=6,size:i,defaultValue:o,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:f,status:h,autoFocus:v,mask:g,type:m,onInput:p,inputMode:y}=t,b=hG(t,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:$,direction:S}=d.useContext(Dt),w=$("otp",r),C=Zi(b,{aria:!0,data:!0,attr:!0}),[E,O,x]=uG(w),I=no(q=>i??q),T=d.useContext(Bn),N=Fp(T.status,h),P=d.useMemo(()=>Object.assign(Object.assign({},T),{status:N,hasFeedback:!1,feedbackIcon:null}),[T,N]),_=d.useRef(null),R=d.useRef({});d.useImperativeHandle(e,()=>({focus:()=>{var q;(q=R.current[0])===null||q===void 0||q.focus()},blur:()=>{var q;for(let J=0;J<n;J+=1)(q=R.current[J])===null||q===void 0||q.blur()},nativeElement:_.current}));const M=q=>l?l(q):q,[D,j]=d.useState(()=>Wf(M(o||"")));d.useEffect(()=>{a!==void 0&&j(Wf(a))},[a]);const k=sr(q=>{j(q),p&&p(q),s&&q.length===n&&q.every(J=>J)&&q.some((J,oe)=>D[oe]!==J)&&s(q.join(""))}),V=sr((q,J)=>{let oe=Oe(D);for(let te=0;te<q;te+=1)oe[te]||(oe[te]="");J.length<=1?oe[q]=J:oe=oe.slice(0,q).concat(Wf(J)),oe=oe.slice(0,n);for(let te=oe.length-1;te>=0&&!oe[te];te-=1)oe.pop();const ie=M(oe.map(te=>te||" ").join(""));return oe=Wf(ie).map((te,z)=>te===" "&&!oe[z]?oe[z]:te),oe}),G=(q,J)=>{var oe;const ie=V(q,J),te=Math.min(q+J.length,n-1);te!==q&&ie[q]!==void 0&&((oe=R.current[te])===null||oe===void 0||oe.focus()),k(ie)},W=q=>{var J;(J=R.current[q])===null||J===void 0||J.focus()},Y={variant:u,disabled:f,status:N,mask:g,type:m,inputMode:y};return E(d.createElement("div",Object.assign({},C,{ref:_,className:ae(w,{[`${w}-sm`]:I==="small",[`${w}-lg`]:I==="large",[`${w}-rtl`]:S==="rtl"},x,O),role:"group"}),d.createElement(Bn.Provider,{value:P},Array.from({length:n}).map((q,J)=>{const oe=`otp-${J}`,ie=D[J]||"";return d.createElement(d.Fragment,{key:oe},d.createElement(fG,Object.assign({ref:te=>{R.current[J]=te},index:J,size:I,htmlSize:1,className:`${w}-input`,onChange:G,value:ie,onActiveChange:W,autoFocus:J===0&&v},Y)),J<n-1&&d.createElement(vG,{separator:c,index:J,prefixCls:w}))}))))});var gG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},mG=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:gG}))},yG=d.forwardRef(mG),bG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const $G=t=>t?d.createElement(sG,null):d.createElement(yG,null),wG={click:"onClick",hover:"onMouseOver"},SG=d.forwardRef((t,e)=>{const{disabled:r,action:n="click",visibilityToggle:i=!0,iconRender:o=$G}=t,a=d.useContext(Ji),s=r??a,l=typeof i=="object"&&i.visible!==void 0,[c,u]=d.useState(()=>l?i.visible:!1),f=d.useRef(null);d.useEffect(()=>{l&&u(i.visible)},[l,i]);const h=$D(f),v=()=>{var I;if(s)return;c&&h();const T=!c;u(T),typeof i=="object"&&((I=i.onVisibleChange)===null||I===void 0||I.call(i,T))},g=I=>{const T=wG[n]||"",N=o(c),P={[T]:v,className:`${I}-icon`,key:"passwordIcon",onMouseDown:_=>{_.preventDefault()},onMouseUp:_=>{_.preventDefault()}};return d.cloneElement(d.isValidElement(N)?N:d.createElement("span",null,N),P)},{className:m,prefixCls:p,inputPrefixCls:y,size:b}=t,$=bG(t,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:S}=d.useContext(Dt),w=S("input",y),C=S("input-password",p),E=i&&g(C),O=ae(C,m,{[`${C}-${b}`]:!!b}),x=Object.assign(Object.assign({},yn($,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:O,prefixCls:w,suffix:E});return b&&(x.size=b),d.createElement(Rd,Object.assign({ref:mi(e,f)},x))});var CG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const xG=d.forwardRef((t,e)=>{const{prefixCls:r,inputPrefixCls:n,className:i,size:o,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:f,onChange:h,onCompositionStart:v,onCompositionEnd:g,variant:m,onPressEnter:p}=t,y=CG(t,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:b,direction:$}=d.useContext(Dt),S=d.useRef(!1),w=b("input-search",r),C=b("input",n),{compactSize:E}=hc(w,$),O=no(Y=>{var q;return(q=o??E)!==null&&q!==void 0?q:Y}),x=d.useRef(null),I=Y=>{Y?.target&&Y.type==="click"&&f&&f(Y.target.value,Y,{source:"clear"}),h?.(Y)},T=Y=>{var q;document.activeElement===((q=x.current)===null||q===void 0?void 0:q.input)&&Y.preventDefault()},N=Y=>{var q,J;f&&f((J=(q=x.current)===null||q===void 0?void 0:q.input)===null||J===void 0?void 0:J.value,Y,{source:"input"})},P=Y=>{S.current||c||(p?.(Y),N(Y))},_=typeof s=="boolean"?d.createElement(fw,null):null,R=`${w}-button`;let M;const D=s||{},j=D.type&&D.type.__ANT_BUTTON===!0;j||D.type==="button"?M=gi(D,Object.assign({onMouseDown:T,onClick:Y=>{var q,J;(J=(q=D?.props)===null||q===void 0?void 0:q.onClick)===null||J===void 0||J.call(q,Y),N(Y)},key:"enterButton"},j?{className:R,size:O}:{})):M=d.createElement(bs,{className:R,color:s?"primary":"default",size:O,disabled:u,key:"enterButton",onMouseDown:T,onClick:N,loading:c,icon:_,variant:m==="borderless"||m==="filled"||m==="underlined"?"text":s?"solid":void 0},s),l&&(M=[M,gi(l,{key:"addonAfter"})]);const k=ae(w,{[`${w}-rtl`]:$==="rtl",[`${w}-${O}`]:!!O,[`${w}-with-button`]:!!s},i),V=Y=>{S.current=!0,v?.(Y)},G=Y=>{S.current=!1,g?.(Y)},W=Object.assign(Object.assign({},y),{className:k,prefixCls:C,type:"search",size:O,variant:m,onPressEnter:P,onCompositionStart:V,onCompositionEnd:G,addonAfter:M,suffix:a,onChange:I,disabled:u});return d.createElement(Rd,Object.assign({ref:mi(x,e)},W))});var EG=`
  min-height:0 !important;
  max-height:none !important;
  height:0 !important;
  visibility:hidden !important;
  overflow:hidden !important;
  position:absolute !important;
  z-index:-1000 !important;
  top:0 !important;
  right:0 !important;
  pointer-events: none !important;
`,OG=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],Tm={},fi;function IG(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&Tm[r])return Tm[r];var n=window.getComputedStyle(t),i=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),o=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),a=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),s=OG.map(function(c){return"".concat(c,":").concat(n.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:i};return e&&r&&(Tm[r]=l),l}function TG(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;fi||(fi=document.createElement("textarea"),fi.setAttribute("tab-index","-1"),fi.setAttribute("aria-hidden","true"),fi.setAttribute("name","hiddenTextarea"),document.body.appendChild(fi)),t.getAttribute("wrap")?fi.setAttribute("wrap",t.getAttribute("wrap")):fi.removeAttribute("wrap");var i=IG(t,e),o=i.paddingSize,a=i.borderSize,s=i.boxSizing,l=i.sizingStyle;fi.setAttribute("style","".concat(l,";").concat(EG)),fi.value=t.value||t.placeholder||"";var c=void 0,u=void 0,f,h=fi.scrollHeight;if(s==="border-box"?h+=a:s==="content-box"&&(h-=o),r!==null||n!==null){fi.value=" ";var v=fi.scrollHeight-o;r!==null&&(c=v*r,s==="border-box"&&(c=c+o+a),h=Math.max(c,h)),n!==null&&(u=v*n,s==="border-box"&&(u=u+o+a),f=h>u?"":"hidden",h=Math.min(u,h))}var g={height:h,overflowY:f,resize:"none"};return c&&(g.minHeight=c),u&&(g.maxHeight=u),g}var _G=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],_m=0,Pm=1,Rm=2,PG=d.forwardRef(function(t,e){var r=t,n=r.prefixCls,i=r.defaultValue,o=r.value,a=r.autoSize,s=r.onResize,l=r.className,c=r.style,u=r.disabled,f=r.onChange;r.onInternalAutoSize;var h=mt(r,_G),v=ln(i,{value:o,postState:function(q){return q??""}}),g=le(v,2),m=g[0],p=g[1],y=function(q){p(q.target.value),f?.(q)},b=d.useRef();d.useImperativeHandle(e,function(){return{textArea:b.current}});var $=d.useMemo(function(){return a&&tt(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=le($,2),w=S[0],C=S[1],E=!!a,O=function(){try{if(document.activeElement===b.current){var q=b.current,J=q.selectionStart,oe=q.selectionEnd,ie=q.scrollTop;b.current.setSelectionRange(J,oe),b.current.scrollTop=ie}}catch{}},x=d.useState(Rm),I=le(x,2),T=I[0],N=I[1],P=d.useState(),_=le(P,2),R=_[0],M=_[1],D=function(){N(_m)};Lt(function(){E&&D()},[o,w,C,E]),Lt(function(){if(T===_m)N(Pm);else if(T===Pm){var Y=TG(b.current,!1,w,C);N(Rm),M(Y)}else O()},[T]);var j=d.useRef(),k=function(){Ht.cancel(j.current)},V=function(q){T===Rm&&(s?.(q),a&&(k(),j.current=Ht(function(){D()})))};d.useEffect(function(){return k},[]);var G=E?R:null,W=L(L({},c),G);return(T===_m||T===Pm)&&(W.overflowY="hidden",W.overflowX="hidden"),d.createElement(ro,{onResize:V,disabled:!(a||s)},d.createElement("textarea",Re({},h,{ref:b,style:W,className:ae(n,l,A({},"".concat(n,"-disabled"),u)),disabled:u,value:m,onChange:y})))}),RG=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],NG=de.forwardRef(function(t,e){var r,n=t.defaultValue,i=t.value,o=t.onFocus,a=t.onBlur,s=t.onChange,l=t.allowClear,c=t.maxLength,u=t.onCompositionStart,f=t.onCompositionEnd,h=t.suffix,v=t.prefixCls,g=v===void 0?"rc-textarea":v,m=t.showCount,p=t.count,y=t.className,b=t.style,$=t.disabled,S=t.hidden,w=t.classNames,C=t.styles,E=t.onResize,O=t.onClear,x=t.onPressEnter,I=t.readOnly,T=t.autoSize,N=t.onKeyDown,P=mt(t,RG),_=ln(n,{value:i,defaultValue:n}),R=le(_,2),M=R[0],D=R[1],j=M==null?"":String(M),k=de.useState(!1),V=le(k,2),G=V[0],W=V[1],Y=de.useRef(!1),q=de.useState(null),J=le(q,2),oe=J[0],ie=J[1],te=d.useRef(null),z=d.useRef(null),K=function(){var he;return(he=z.current)===null||he===void 0?void 0:he.textArea},B=function(){K().focus()};d.useImperativeHandle(e,function(){var re;return{resizableTextArea:z.current,focus:B,blur:function(){K().blur()},nativeElement:((re=te.current)===null||re===void 0?void 0:re.nativeElement)||K()}}),d.useEffect(function(){W(function(re){return!$&&re})},[$]);var F=de.useState(null),U=le(F,2),Z=U[0],ee=U[1];de.useEffect(function(){if(Z){var re;(re=K()).setSelectionRange.apply(re,Oe(Z))}},[Z]);var Q=yD(p,m),ce=(r=Q.max)!==null&&r!==void 0?r:c,me=Number(ce)>0,Te=Q.strategy(j),_e=!!ce&&Te>ce,ve=function(he,ue){var we=ue;!Y.current&&Q.exceedFormatter&&Q.max&&Q.strategy(ue)>Q.max&&(we=Q.exceedFormatter(ue,{max:Q.max}),ue!==we&&ee([K().selectionStart||0,K().selectionEnd||0])),D(we),Mv(he.currentTarget,he,s,we)},ye=function(he){Y.current=!0,u?.(he)},xe=function(he){Y.current=!1,ve(he,he.currentTarget.value),f?.(he)},ge=function(he){ve(he,he.target.value)},ne=function(he){he.key==="Enter"&&x&&x(he),N?.(he)},X=function(he){W(!0),o?.(he)},fe=function(he){W(!1),a?.(he)},pe=function(he){D(""),B(),Mv(K(),he,s)},$e=h,Ee;Q.show&&(Q.showFormatter?Ee=Q.showFormatter({value:j,count:Te,maxLength:ce}):Ee="".concat(Te).concat(me?" / ".concat(ce):""),$e=de.createElement(de.Fragment,null,$e,de.createElement("span",{className:ae("".concat(g,"-data-count"),w?.count),style:C?.count},Ee)));var be=function(he){var ue;E?.(he),(ue=K())!==null&&ue!==void 0&&ue.style.height&&ie(!0)},H=!T&&!m&&!l;return de.createElement(mD,{ref:te,value:j,allowClear:l,handleReset:pe,suffix:$e,prefixCls:g,classNames:L(L({},w),{},{affixWrapper:ae(w?.affixWrapper,A(A({},"".concat(g,"-show-count"),m),"".concat(g,"-textarea-allow-clear"),l))}),disabled:$,focused:G,className:ae(y,_e&&"".concat(g,"-out-of-range")),style:L(L({},b),oe&&!H?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ee=="string"?Ee:void 0}},hidden:S,readOnly:I,onClear:O},de.createElement(PG,Re({},P,{autoSize:T,maxLength:c,onKeyDown:ne,onChange:ge,onFocus:X,onBlur:fe,onCompositionStart:ye,onCompositionEnd:xe,className:ae(w?.textarea),style:L(L({},C?.textarea),{},{resize:b?.resize}),disabled:$,prefixCls:g,onResize:be,ref:z,readOnly:I})))});const MG=t=>{const{componentCls:e,paddingLG:r}=t,n=`${e}-textarea`;return{[`textarea${e}`]:{maxWidth:"100%",height:"auto",minHeight:t.controlHeight,lineHeight:t.lineHeight,verticalAlign:"bottom",transition:`all ${t.motionDurationSlow}`,resize:"vertical",[`&${e}-mouse-active`]:{transition:`all ${t.motionDurationSlow}, height 0s, width 0s`}},[`${e}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${e}-data-count`]:{position:"absolute",bottom:t.calc(t.fontSize).mul(t.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:t.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
        &-allow-clear > ${e},
        &-affix-wrapper${n}-has-feedback ${e}
      `]:{paddingInlineEnd:r},[`&-affix-wrapper${e}-affix-wrapper`]:{padding:0,[`> textarea${e}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:t.calc(t.controlHeight).sub(t.calc(t.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${e}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${e}-clear-icon`]:{position:"absolute",insetInlineEnd:t.paddingInline,insetBlockStart:t.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:t.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${e}-affix-wrapper-rtl`]:{[`${e}-suffix`]:{[`${e}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${e}-affix-wrapper-sm`]:{[`${e}-suffix`]:{[`${e}-clear-icon`]:{insetInlineEnd:t.paddingInlineSM}}}}}},DG=Gr(["Input","TextArea"],t=>{const e=Xt(t,Td(t));return[MG(e)]},_d,{resetFont:!1});var AG=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const jG=d.forwardRef((t,e)=>{var r;const{prefixCls:n,bordered:i=!0,size:o,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:f,style:h,styles:v,variant:g,showCount:m,onMouseDown:p,onResize:y}=t,b=AG(t,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:$,direction:S,allowClear:w,autoComplete:C,className:E,style:O,classNames:x,styles:I}=Oo("textArea"),T=d.useContext(Ji),N=a??T,{status:P,hasFeedback:_,feedbackIcon:R}=d.useContext(Bn),M=Fp(P,s),D=d.useRef(null);d.useImperativeHandle(e,()=>{var Q;return{resizableTextArea:(Q=D.current)===null||Q===void 0?void 0:Q.resizableTextArea,focus:ce=>{var me,Te;gD((Te=(me=D.current)===null||me===void 0?void 0:me.resizableTextArea)===null||Te===void 0?void 0:Te.textArea,ce)},blur:()=>{var ce;return(ce=D.current)===null||ce===void 0?void 0:ce.blur()}}});const j=$("input",n),k=yi(j),[V,G,W]=oD(j,u),[Y]=DG(j,k),{compactSize:q,compactItemClassnames:J}=hc(j,S),oe=no(Q=>{var ce;return(ce=o??q)!==null&&ce!==void 0?ce:Q}),[ie,te]=dw("textArea",g,i),z=bD(l??w),[K,B]=d.useState(!1),[F,U]=d.useState(!1),Z=Q=>{B(!0),p?.(Q);const ce=()=>{B(!1),document.removeEventListener("mouseup",ce)};document.addEventListener("mouseup",ce)},ee=Q=>{var ce,me;if(y?.(Q),K&&typeof getComputedStyle=="function"){const Te=(me=(ce=D.current)===null||ce===void 0?void 0:ce.nativeElement)===null||me===void 0?void 0:me.querySelector("textarea");Te&&getComputedStyle(Te).resize==="both"&&U(!0)}};return V(Y(d.createElement(NG,Object.assign({autoComplete:C},b,{style:Object.assign(Object.assign({},O),h),styles:Object.assign(Object.assign({},I),v),disabled:N,allowClear:z,className:ae(W,k,f,u,J,E,F&&`${j}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),x),{textarea:ae({[`${j}-sm`]:oe==="small",[`${j}-lg`]:oe==="large"},G,c?.textarea,x.textarea,K&&`${j}-mouse-active`),variant:ae({[`${j}-${ie}`]:te},Tv(j,M)),affixWrapper:ae(`${j}-textarea-affix-wrapper`,{[`${j}-affix-wrapper-rtl`]:S==="rtl",[`${j}-affix-wrapper-sm`]:oe==="small",[`${j}-affix-wrapper-lg`]:oe==="large",[`${j}-textarea-show-count`]:m||((r=t.count)===null||r===void 0?void 0:r.show)},G)}),prefixCls:j,suffix:_&&d.createElement("span",{className:`${j}-textarea-suffix`},R),showCount:m,ref:D,onResize:ee,onMouseDown:Z}))))}),Nd=Rd;Nd.Group=lG;Nd.Search=xG;Nd.TextArea=jG;Nd.Password=SG;Nd.OTP=pG;var kG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"},BG=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:kG}))},_E=d.forwardRef(BG),FG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},LG=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:FG}))},PE=d.forwardRef(LG),zG={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},HG=[10,20,50,100],VG=function(e){var r=e.pageSizeOptions,n=r===void 0?HG:r,i=e.locale,o=e.changeSize,a=e.pageSize,s=e.goButton,l=e.quickGo,c=e.rootPrefixCls,u=e.disabled,f=e.buildOptionText,h=e.showSizeChanger,v=e.sizeChangerRender,g=de.useState(""),m=le(g,2),p=m[0],y=m[1],b=function(){return!p||Number.isNaN(p)?void 0:Number(p)},$=typeof f=="function"?f:function(N){return"".concat(N," ").concat(i.items_per_page)},S=function(P){y(P.target.value)},w=function(P){s||p===""||(y(""),!(P.relatedTarget&&(P.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||P.relatedTarget.className.indexOf("".concat(c,"-item"))>=0))&&l?.(b()))},C=function(P){p!==""&&(P.keyCode===Ze.ENTER||P.type==="click")&&(y(""),l?.(b()))},E=function(){return n.some(function(P){return P.toString()===a.toString()})?n:n.concat([a]).sort(function(P,_){var R=Number.isNaN(Number(P))?0:Number(P),M=Number.isNaN(Number(_))?0:Number(_);return R-M})},O="".concat(c,"-options");if(!h&&!l)return null;var x=null,I=null,T=null;return h&&v&&(x=v({disabled:u,size:a,onSizeChange:function(P){o?.(Number(P))},"aria-label":i.page_size,className:"".concat(O,"-size-changer"),options:E().map(function(N){return{label:$(N),value:N}})})),l&&(s&&(T=typeof s=="boolean"?de.createElement("button",{type:"button",onClick:C,onKeyUp:C,disabled:u,className:"".concat(O,"-quick-jumper-button")},i.jump_to_confirm):de.createElement("span",{onClick:C,onKeyUp:C},s)),I=de.createElement("div",{className:"".concat(O,"-quick-jumper")},i.jump_to,de.createElement("input",{disabled:u,type:"text",value:p,onChange:S,onKeyUp:C,onBlur:w,"aria-label":i.page}),i.page,T)),de.createElement("li",{className:O},x,I)},eu=function(e){var r=e.rootPrefixCls,n=e.page,i=e.active,o=e.className,a=e.showTitle,s=e.onClick,l=e.onKeyPress,c=e.itemRender,u="".concat(r,"-item"),f=ae(u,"".concat(u,"-").concat(n),A(A({},"".concat(u,"-active"),i),"".concat(u,"-disabled"),!n),o),h=function(){s(n)},v=function(p){l(p,s,n)},g=c(n,"page",de.createElement("a",{rel:"nofollow"},n));return g?de.createElement("li",{title:a?String(n):null,className:f,onClick:h,onKeyDown:v,tabIndex:0},g):null},WG=function(e,r,n){return n};function RE(){}function NE(t){var e=Number(t);return typeof e=="number"&&!Number.isNaN(e)&&isFinite(e)&&Math.floor(e)===e}function Xa(t,e,r){var n=typeof t>"u"?e:t;return Math.floor((r-1)/n)+1}var KG=function(e){var r=e.prefixCls,n=r===void 0?"rc-pagination":r,i=e.selectPrefixCls,o=i===void 0?"rc-select":i,a=e.className,s=e.current,l=e.defaultCurrent,c=l===void 0?1:l,u=e.total,f=u===void 0?0:u,h=e.pageSize,v=e.defaultPageSize,g=v===void 0?10:v,m=e.onChange,p=m===void 0?RE:m,y=e.hideOnSinglePage,b=e.align,$=e.showPrevNextJumpers,S=$===void 0?!0:$,w=e.showQuickJumper,C=e.showLessItems,E=e.showTitle,O=E===void 0?!0:E,x=e.onShowSizeChange,I=x===void 0?RE:x,T=e.locale,N=T===void 0?zG:T,P=e.style,_=e.totalBoundaryShowSizeChanger,R=_===void 0?50:_,M=e.disabled,D=e.simple,j=e.showTotal,k=e.showSizeChanger,V=k===void 0?f>R:k,G=e.sizeChangerRender,W=e.pageSizeOptions,Y=e.itemRender,q=Y===void 0?WG:Y,J=e.jumpPrevIcon,oe=e.jumpNextIcon,ie=e.prevIcon,te=e.nextIcon,z=de.useRef(null),K=ln(10,{value:h,defaultValue:g}),B=le(K,2),F=B[0],U=B[1],Z=ln(1,{value:s,defaultValue:c,postState:function(pt){return Math.max(1,Math.min(pt,Xa(void 0,F,f)))}}),ee=le(Z,2),Q=ee[0],ce=ee[1],me=de.useState(Q),Te=le(me,2),_e=Te[0],ve=Te[1];d.useEffect(function(){ve(Q)},[Q]);var ye=Math.max(1,Q-(C?3:5)),xe=Math.min(Xa(void 0,F,f),Q+(C?3:5));function ge(ut,pt){var Tt=ut||de.createElement("button",{type:"button","aria-label":pt,className:"".concat(n,"-item-link")});return typeof ut=="function"&&(Tt=de.createElement(ut,L({},e))),Tt}function ne(ut){var pt=ut.target.value,Tt=Xa(void 0,F,f),Nr;return pt===""?Nr=pt:Number.isNaN(Number(pt))?Nr=_e:pt>=Tt?Nr=Tt:Nr=Number(pt),Nr}function X(ut){return NE(ut)&&ut!==Q&&NE(f)&&f>0}var fe=f>F?w:!1;function pe(ut){(ut.keyCode===Ze.UP||ut.keyCode===Ze.DOWN)&&ut.preventDefault()}function $e(ut){var pt=ne(ut);switch(pt!==_e&&ve(pt),ut.keyCode){case Ze.ENTER:H(pt);break;case Ze.UP:H(pt-1);break;case Ze.DOWN:H(pt+1);break}}function Ee(ut){H(ne(ut))}function be(ut){var pt=Xa(ut,F,f),Tt=Q>pt&&pt!==0?pt:Q;U(ut),ve(Tt),I?.(Q,ut),ce(Tt),p?.(Tt,ut)}function H(ut){if(X(ut)&&!M){var pt=Xa(void 0,F,f),Tt=ut;return ut>pt?Tt=pt:ut<1&&(Tt=1),Tt!==_e&&ve(Tt),ce(Tt),p?.(Tt,F),Tt}return Q}var re=Q>1,he=Q<Xa(void 0,F,f);function ue(){re&&H(Q-1)}function we(){he&&H(Q+1)}function Ie(){H(ye)}function Fe(){H(xe)}function qe(ut,pt){if(ut.key==="Enter"||ut.charCode===Ze.ENTER||ut.keyCode===Ze.ENTER){for(var Tt=arguments.length,Nr=new Array(Tt>2?Tt-2:0),zr=2;zr<Tt;zr++)Nr[zr-2]=arguments[zr];pt.apply(void 0,Nr)}}function st(ut){qe(ut,ue)}function ft(ut){qe(ut,we)}function et(ut){qe(ut,Ie)}function St(ut){qe(ut,Fe)}function Et(ut){var pt=q(ut,"prev",ge(ie,"prev page"));return de.isValidElement(pt)?de.cloneElement(pt,{disabled:!re}):pt}function at(ut){var pt=q(ut,"next",ge(te,"next page"));return de.isValidElement(pt)?de.cloneElement(pt,{disabled:!he}):pt}function nt(ut){(ut.type==="click"||ut.keyCode===Ze.ENTER)&&H(_e)}var Le=null,ze=Zi(e,{aria:!0,data:!0}),Ne=j&&de.createElement("li",{className:"".concat(n,"-total-text")},j(f,[f===0?0:(Q-1)*F+1,Q*F>f?f:Q*F])),Ye=null,lt=Xa(void 0,F,f);if(y&&f<=F)return null;var De=[],Me={rootPrefixCls:n,onClick:H,onKeyPress:qe,showTitle:O,itemRender:q,page:-1},Qe=Q-1>0?Q-1:0,Ge=Q+1<lt?Q+1:lt,We=w&&w.goButton,it=tt(D)==="object"?D.readOnly:!D,Ue=We,He=null;D&&(We&&(typeof We=="boolean"?Ue=de.createElement("button",{type:"button",onClick:nt,onKeyUp:nt},N.jump_to_confirm):Ue=de.createElement("span",{onClick:nt,onKeyUp:nt},We),Ue=de.createElement("li",{title:O?"".concat(N.jump_to).concat(Q,"/").concat(lt):null,className:"".concat(n,"-simple-pager")},Ue)),He=de.createElement("li",{title:O?"".concat(Q,"/").concat(lt):null,className:"".concat(n,"-simple-pager")},it?_e:de.createElement("input",{type:"text","aria-label":N.jump_to,value:_e,disabled:M,onKeyDown:pe,onKeyUp:$e,onChange:$e,onBlur:Ee,size:3}),de.createElement("span",{className:"".concat(n,"-slash")},"/"),lt));var rt=C?1:2;if(lt<=3+rt*2){lt||De.push(de.createElement(eu,Re({},Me,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var ht=1;ht<=lt;ht+=1)De.push(de.createElement(eu,Re({},Me,{key:ht,page:ht,active:Q===ht})))}else{var _t=C?N.prev_3:N.prev_5,Nt=C?N.next_3:N.next_5,kt=q(ye,"jump-prev",ge(J,"prev page")),Bt=q(xe,"jump-next",ge(oe,"next page"));S&&(Le=kt?de.createElement("li",{title:O?_t:null,key:"prev",onClick:Ie,tabIndex:0,onKeyDown:et,className:ae("".concat(n,"-jump-prev"),A({},"".concat(n,"-jump-prev-custom-icon"),!!J))},kt):null,Ye=Bt?de.createElement("li",{title:O?Nt:null,key:"next",onClick:Fe,tabIndex:0,onKeyDown:St,className:ae("".concat(n,"-jump-next"),A({},"".concat(n,"-jump-next-custom-icon"),!!oe))},Bt):null);var qt=Math.max(1,Q-rt),Vt=Math.min(Q+rt,lt);Q-1<=rt&&(Vt=1+rt*2),lt-Q<=rt&&(qt=lt-rt*2);for(var Be=qt;Be<=Vt;Be+=1)De.push(de.createElement(eu,Re({},Me,{key:Be,page:Be,active:Q===Be})));if(Q-1>=rt*2&&Q!==3&&(De[0]=de.cloneElement(De[0],{className:ae("".concat(n,"-item-after-jump-prev"),De[0].props.className)}),De.unshift(Le)),lt-Q>=rt*2&&Q!==lt-2){var Ve=De[De.length-1];De[De.length-1]=de.cloneElement(Ve,{className:ae("".concat(n,"-item-before-jump-next"),Ve.props.className)}),De.push(Ye)}qt!==1&&De.unshift(de.createElement(eu,Re({},Me,{key:1,page:1}))),Vt!==lt&&De.push(de.createElement(eu,Re({},Me,{key:lt,page:lt})))}var vt=Et(Qe);if(vt){var It=!re||!lt;vt=de.createElement("li",{title:O?N.prev_page:null,onClick:ue,tabIndex:It?null:0,onKeyDown:st,className:ae("".concat(n,"-prev"),A({},"".concat(n,"-disabled"),It)),"aria-disabled":It},vt)}var Pt=at(Ge);if(Pt){var br,Sr;D?(br=!he,Sr=re?0:null):(br=!he||!lt,Sr=br?null:0),Pt=de.createElement("li",{title:O?N.next_page:null,onClick:we,tabIndex:Sr,onKeyDown:ft,className:ae("".concat(n,"-next"),A({},"".concat(n,"-disabled"),br)),"aria-disabled":br},Pt)}var Cn=ae(n,a,A(A(A(A(A({},"".concat(n,"-start"),b==="start"),"".concat(n,"-center"),b==="center"),"".concat(n,"-end"),b==="end"),"".concat(n,"-simple"),D),"".concat(n,"-disabled"),M));return de.createElement("ul",Re({className:Cn,style:P,ref:z},ze),Ne,vt,D?He:De,Pt,de.createElement(VG,{locale:N,rootPrefixCls:n,disabled:M,selectPrefixCls:o,changeSize:be,pageSize:F,pageSizeOptions:W,quickGo:fe?H:null,goButton:Ue,showSizeChanger:V,sizeChangerRender:G}))};const UG=t=>{const{componentCls:e}=t;return{[`${e}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed"}}},[`&${e}-disabled`]:{cursor:"not-allowed",[`${e}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:t.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:t.colorBorder,backgroundColor:t.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:t.itemActiveBgDisabled},a:{color:t.itemActiveColorDisabled}}},[`${e}-item-link`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${e}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${e}-simple-pager`]:{color:t.colorTextDisabled},[`${e}-jump-prev, ${e}-jump-next`]:{[`${e}-item-link-icon`]:{opacity:0},[`${e}-item-ellipsis`]:{opacity:1}}},[`&${e}-simple`]:{[`${e}-prev, ${e}-next`]:{[`&${e}-disabled ${e}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}}}},qG=t=>{const{componentCls:e}=t;return{[`&${e}-mini ${e}-total-text, &${e}-mini ${e}-simple-pager`]:{height:t.itemSizeSM,lineHeight:se(t.itemSizeSM)},[`&${e}-mini ${e}-item`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:se(t.calc(t.itemSizeSM).sub(2).equal())},[`&${e}-mini ${e}-prev, &${e}-mini ${e}-next`]:{minWidth:t.itemSizeSM,height:t.itemSizeSM,margin:0,lineHeight:se(t.itemSizeSM)},[`&${e}-mini:not(${e}-disabled)`]:{[`${e}-prev, ${e}-next`]:{[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover ${e}-item-link`]:{backgroundColor:"transparent"}}},[`
    &${e}-mini ${e}-prev ${e}-item-link,
    &${e}-mini ${e}-next ${e}-item-link
    `]:{backgroundColor:"transparent",borderColor:"transparent","&::after":{height:t.itemSizeSM,lineHeight:se(t.itemSizeSM)}},[`&${e}-mini ${e}-jump-prev, &${e}-mini ${e}-jump-next`]:{height:t.itemSizeSM,marginInlineEnd:0,lineHeight:se(t.itemSizeSM)},[`&${e}-mini ${e}-options`]:{marginInlineStart:t.paginationMiniOptionsMarginInlineStart,"&-size-changer":{top:t.miniOptionsSizeChangerTop},"&-quick-jumper":{height:t.itemSizeSM,lineHeight:se(t.itemSizeSM),input:Object.assign(Object.assign({},Cw(t)),{width:t.paginationMiniQuickJumperInputWidth,height:t.controlHeightSM})}}}},GG=t=>{const{componentCls:e}=t;return{[`
    &${e}-simple ${e}-prev,
    &${e}-simple ${e}-next
    `]:{height:t.itemSizeSM,lineHeight:se(t.itemSizeSM),verticalAlign:"top",[`${e}-item-link`]:{height:t.itemSizeSM,backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive},"&::after":{height:t.itemSizeSM,lineHeight:se(t.itemSizeSM)}}},[`&${e}-simple ${e}-simple-pager`]:{display:"inline-block",height:t.itemSizeSM,marginInlineEnd:t.marginXS,input:{boxSizing:"border-box",height:"100%",padding:`0 ${se(t.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:t.itemInputBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,borderRadius:t.borderRadius,outline:"none",transition:`border-color ${t.motionDurationMid}`,color:"inherit","&:hover":{borderColor:t.colorPrimary},"&:focus":{borderColor:t.colorPrimaryHover,boxShadow:`${se(t.inputOutlineOffset)} 0 ${se(t.controlOutlineWidth)} ${t.controlOutline}`},"&[disabled]":{color:t.colorTextDisabled,backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,cursor:"not-allowed"}}}}},XG=t=>{const{componentCls:e}=t;return{[`${e}-jump-prev, ${e}-jump-next`]:{outline:0,[`${e}-item-container`]:{position:"relative",[`${e}-item-link-icon`]:{color:t.colorPrimary,fontSize:t.fontSizeSM,opacity:0,transition:`all ${t.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${e}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:t.colorTextDisabled,letterSpacing:t.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:t.paginationEllipsisTextIndent,opacity:1,transition:`all ${t.motionDurationMid}`}},"&:hover":{[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}}},[`
    ${e}-prev,
    ${e}-jump-prev,
    ${e}-jump-next
    `]:{marginInlineEnd:t.marginXS},[`
    ${e}-prev,
    ${e}-next,
    ${e}-jump-prev,
    ${e}-jump-next
    `]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,color:t.colorText,fontFamily:t.fontFamily,lineHeight:se(t.itemSize),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}`},[`${e}-prev, ${e}-next`]:{outline:0,button:{color:t.colorText,cursor:"pointer",userSelect:"none"},[`${e}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:t.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${se(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:"none",transition:`all ${t.motionDurationMid}`},[`&:hover ${e}-item-link`]:{backgroundColor:t.colorBgTextHover},[`&:active ${e}-item-link`]:{backgroundColor:t.colorBgTextActive},[`&${e}-disabled:hover`]:{[`${e}-item-link`]:{backgroundColor:"transparent"}}},[`${e}-slash`]:{marginInlineEnd:t.paginationSlashMarginInlineEnd,marginInlineStart:t.paginationSlashMarginInlineStart},[`${e}-options`]:{display:"inline-block",marginInlineStart:t.margin,verticalAlign:"middle","&-size-changer":{display:"inline-block",width:"auto"},"&-quick-jumper":{display:"inline-block",height:t.controlHeight,marginInlineStart:t.marginXS,lineHeight:se(t.controlHeight),verticalAlign:"top",input:Object.assign(Object.assign(Object.assign({},xw(t)),Sw(t,{borderColor:t.colorBorder,hoverBorderColor:t.colorPrimaryHover,activeBorderColor:t.colorPrimary,activeShadow:t.activeShadow})),{"&[disabled]":Object.assign({},Wp(t)),width:t.calc(t.controlHeightLG).mul(1.25).equal(),height:t.controlHeight,boxSizing:"border-box",margin:0,marginInlineStart:t.marginXS,marginInlineEnd:t.marginXS})}}}},YG=t=>{const{componentCls:e}=t;return{[`${e}-item`]:{display:"inline-block",minWidth:t.itemSize,height:t.itemSize,marginInlineEnd:t.marginXS,fontFamily:t.fontFamily,lineHeight:se(t.calc(t.itemSize).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:t.itemBg,border:`${se(t.lineWidth)} ${t.lineType} transparent`,borderRadius:t.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${se(t.paginationItemPaddingInline)}`,color:t.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${e}-item-active)`]:{"&:hover":{transition:`all ${t.motionDurationMid}`,backgroundColor:t.colorBgTextHover},"&:active":{backgroundColor:t.colorBgTextActive}},"&-active":{fontWeight:t.fontWeightStrong,backgroundColor:t.itemActiveBg,borderColor:t.colorPrimary,a:{color:t.colorPrimary},"&:hover":{borderColor:t.colorPrimaryHover},"&:hover a":{color:t.colorPrimaryHover}}}}},JG=t=>{const{componentCls:e}=t;return{[e]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Ar(t)),{display:"flex","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${e}-total-text`]:{display:"inline-block",height:t.itemSize,marginInlineEnd:t.marginXS,lineHeight:se(t.calc(t.itemSize).sub(2).equal()),verticalAlign:"middle"}}),YG(t)),XG(t)),GG(t)),qG(t)),UG(t)),{[`@media only screen and (max-width: ${t.screenLG}px)`]:{[`${e}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${t.screenSM}px)`]:{[`${e}-options`]:{display:"none"}}}),[`&${t.componentCls}-rtl`]:{direction:"rtl"}}},ZG=t=>{const{componentCls:e}=t;return{[`${e}:not(${e}-disabled)`]:{[`${e}-item`]:Object.assign({},Uu(t)),[`${e}-jump-prev, ${e}-jump-next`]:{"&:focus-visible":Object.assign({[`${e}-item-link-icon`]:{opacity:1},[`${e}-item-ellipsis`]:{opacity:0}},Pa(t))},[`${e}-prev, ${e}-next`]:{[`&:focus-visible ${e}-item-link`]:Object.assign({},Pa(t))}}}},MD=t=>Object.assign({itemBg:t.colorBgContainer,itemSize:t.controlHeight,itemSizeSM:t.controlHeightSM,itemActiveBg:t.colorBgContainer,itemLinkBg:t.colorBgContainer,itemActiveColorDisabled:t.colorTextDisabled,itemActiveBgDisabled:t.controlItemBgActiveDisabled,itemInputBg:t.colorBgContainer,miniOptionsSizeChangerTop:0},_d(t)),DD=t=>Xt(t,{inputOutlineOffset:0,paginationMiniOptionsMarginInlineStart:t.calc(t.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:t.calc(t.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:t.calc(t.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:t.calc(t.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:t.marginSM,paginationSlashMarginInlineEnd:t.marginSM,paginationEllipsisTextIndent:"0.13em"},Td(t)),QG=Gr("Pagination",t=>{const e=DD(t);return[JG(e),ZG(e)]},MD),eX=t=>{const{componentCls:e}=t;return{[`${e}${e}-bordered${e}-disabled:not(${e}-mini)`]:{"&, &:hover":{[`${e}-item-link`]:{borderColor:t.colorBorder}},"&:focus-visible":{[`${e}-item-link`]:{borderColor:t.colorBorder}},[`${e}-item, ${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,[`&:hover:not(${e}-item-active)`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,a:{color:t.colorTextDisabled}},[`&${e}-item-active`]:{backgroundColor:t.itemActiveBgDisabled}},[`${e}-prev, ${e}-next`]:{"&:hover button":{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder,color:t.colorTextDisabled},[`${e}-item-link`]:{backgroundColor:t.colorBgContainerDisabled,borderColor:t.colorBorder}}},[`${e}${e}-bordered:not(${e}-mini)`]:{[`${e}-prev, ${e}-next`]:{"&:hover button":{borderColor:t.colorPrimaryHover,backgroundColor:t.itemBg},[`${e}-item-link`]:{backgroundColor:t.itemLinkBg,borderColor:t.colorBorder},[`&:hover ${e}-item-link`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,color:t.colorPrimary},[`&${e}-disabled`]:{[`${e}-item-link`]:{borderColor:t.colorBorder,color:t.colorTextDisabled}}},[`${e}-item`]:{backgroundColor:t.itemBg,border:`${se(t.lineWidth)} ${t.lineType} ${t.colorBorder}`,[`&:hover:not(${e}-item-active)`]:{borderColor:t.colorPrimary,backgroundColor:t.itemBg,a:{color:t.colorPrimary}},"&-active":{borderColor:t.colorPrimary}}}}},tX=L$(["Pagination","bordered"],t=>{const e=DD(t);return[eX(e)]},MD);function ME(t){return d.useMemo(()=>typeof t=="boolean"?[t,{}]:t&&typeof t=="object"?[!0,t]:[void 0,void 0],[t])}var rX=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const nX=t=>{const{align:e,prefixCls:r,selectPrefixCls:n,className:i,rootClassName:o,style:a,size:s,locale:l,responsive:c,showSizeChanger:u,selectComponentClass:f,pageSizeOptions:h}=t,v=rX(t,["align","prefixCls","selectPrefixCls","className","rootClassName","style","size","locale","responsive","showSizeChanger","selectComponentClass","pageSizeOptions"]),{xs:g}=hw(c),[,m]=_n(),{getPrefixCls:p,direction:y,showSizeChanger:b,className:$,style:S}=Oo("pagination"),w=p("pagination",r),[C,E,O]=QG(w),x=no(s),I=x==="small"||!!(g&&!x&&c),[T]=$d("Pagination",rN),N=Object.assign(Object.assign({},T),l),[P,_]=ME(u),[R,M]=ME(b),D=P??R,j=_??M,k=f||pc,V=d.useMemo(()=>h?h.map(oe=>Number(oe)):void 0,[h]),G=oe=>{var ie;const{disabled:te,size:z,onSizeChange:K,"aria-label":B,className:F,options:U}=oe,{className:Z,onChange:ee}=j||{},Q=(ie=U.find(ce=>String(ce.value)===String(z)))===null||ie===void 0?void 0:ie.value;return d.createElement(k,Object.assign({disabled:te,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:ce=>ce.parentNode,"aria-label":B,options:U},j,{value:Q,onChange:(ce,me)=>{K?.(ce),ee?.(ce,me)},size:I?"small":"middle",className:ae(F,Z)}))},W=d.useMemo(()=>{const oe=d.createElement("span",{className:`${w}-item-ellipsis`},"•••"),ie=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},y==="rtl"?d.createElement(D0,null):d.createElement(Z0,null)),te=d.createElement("button",{className:`${w}-item-link`,type:"button",tabIndex:-1},y==="rtl"?d.createElement(Z0,null):d.createElement(D0,null)),z=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},y==="rtl"?d.createElement(PE,{className:`${w}-item-link-icon`}):d.createElement(_E,{className:`${w}-item-link-icon`}),oe)),K=d.createElement("a",{className:`${w}-item-link`},d.createElement("div",{className:`${w}-item-container`},y==="rtl"?d.createElement(_E,{className:`${w}-item-link-icon`}):d.createElement(PE,{className:`${w}-item-link-icon`}),oe));return{prevIcon:ie,nextIcon:te,jumpPrevIcon:z,jumpNextIcon:K}},[y,w]),Y=p("select",n),q=ae({[`${w}-${e}`]:!!e,[`${w}-mini`]:I,[`${w}-rtl`]:y==="rtl",[`${w}-bordered`]:m.wireframe},$,i,o,E,O),J=Object.assign(Object.assign({},S),a);return C(d.createElement(d.Fragment,null,m.wireframe&&d.createElement(tX,{prefixCls:w}),d.createElement(KG,Object.assign({},W,v,{style:J,prefixCls:w,selectPrefixCls:Y,className:q,locale:N,pageSizeOptions:V,showSizeChanger:D,sizeChangerRender:G}))))},Av=100,AD=Av/5,jD=Av/2-AD/2,Nm=jD*2*Math.PI,DE=50,AE=t=>{const{dotClassName:e,style:r,hasCircleCls:n}=t;return d.createElement("circle",{className:ae(`${e}-circle`,{[`${e}-circle-bg`]:n}),r:jD,cx:DE,cy:DE,strokeWidth:AD,style:r})},iX=({percent:t,prefixCls:e})=>{const r=`${e}-dot`,n=`${r}-holder`,i=`${n}-hidden`,[o,a]=d.useState(!1);Lt(()=>{t!==0&&a(!0)},[t!==0]);const s=Math.max(Math.min(t,100),0);if(!o)return null;const l={strokeDashoffset:`${Nm/4}`,strokeDasharray:`${Nm*s/100} ${Nm*(100-s)/100}`};return d.createElement("span",{className:ae(n,`${r}-progress`,s<=0&&i)},d.createElement("svg",{viewBox:`0 0 ${Av} ${Av}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":s},d.createElement(AE,{dotClassName:r,hasCircleCls:!0}),d.createElement(AE,{dotClassName:r,style:l})))};function oX(t){const{prefixCls:e,percent:r=0}=t,n=`${e}-dot`,i=`${n}-holder`,o=`${i}-hidden`;return d.createElement(d.Fragment,null,d.createElement("span",{className:ae(i,r>0&&o)},d.createElement("span",{className:ae(n,`${e}-dot-spin`)},[1,2,3,4].map(a=>d.createElement("i",{className:`${e}-dot-item`,key:a})))),d.createElement(iX,{prefixCls:e,percent:r}))}function aX(t){var e;const{prefixCls:r,indicator:n,percent:i}=t,o=`${r}-dot`;return n&&d.isValidElement(n)?gi(n,{className:ae((e=n.props)===null||e===void 0?void 0:e.className,o),percent:i}):d.createElement(oX,{prefixCls:r,percent:i})}const sX=new Yt("antSpinMove",{to:{opacity:1}}),lX=new Yt("antRotate",{to:{transform:"rotate(405deg)"}}),cX=t=>{const{componentCls:e,calc:r}=t;return{[e]:Object.assign(Object.assign({},Ar(t)),{position:"absolute",display:"none",color:t.colorPrimary,fontSize:0,textAlign:"center",verticalAlign:"middle",opacity:0,transition:`transform ${t.motionDurationSlow} ${t.motionEaseInOutCirc}`,"&-spinning":{position:"relative",display:"inline-block",opacity:1},[`${e}-text`]:{fontSize:t.fontSize,paddingTop:r(r(t.dotSize).sub(t.fontSize)).div(2).add(2).equal()},"&-fullscreen":{position:"fixed",width:"100vw",height:"100vh",backgroundColor:t.colorBgMask,zIndex:t.zIndexPopupBase,inset:0,display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",opacity:0,visibility:"hidden",transition:`all ${t.motionDurationMid}`,"&-show":{opacity:1,visibility:"visible"},[e]:{[`${e}-dot-holder`]:{color:t.colorWhite},[`${e}-text`]:{color:t.colorTextLightSolid}}},"&-nested-loading":{position:"relative",[`> div > ${e}`]:{position:"absolute",top:0,insetInlineStart:0,zIndex:4,display:"block",width:"100%",height:"100%",maxHeight:t.contentHeight,[`${e}-dot`]:{position:"absolute",top:"50%",insetInlineStart:"50%",margin:r(t.dotSize).mul(-1).div(2).equal()},[`${e}-text`]:{position:"absolute",top:"50%",width:"100%",textShadow:`0 1px 2px ${t.colorBgContainer}`},[`&${e}-show-text ${e}-dot`]:{marginTop:r(t.dotSize).div(2).mul(-1).sub(10).equal()},"&-sm":{[`${e}-dot`]:{margin:r(t.dotSizeSM).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:r(r(t.dotSizeSM).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:r(t.dotSizeSM).div(2).mul(-1).sub(10).equal()}},"&-lg":{[`${e}-dot`]:{margin:r(t.dotSizeLG).mul(-1).div(2).equal()},[`${e}-text`]:{paddingTop:r(r(t.dotSizeLG).sub(t.fontSize)).div(2).add(2).equal()},[`&${e}-show-text ${e}-dot`]:{marginTop:r(t.dotSizeLG).div(2).mul(-1).sub(10).equal()}}},[`${e}-container`]:{position:"relative",transition:`opacity ${t.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:t.colorBgContainer,opacity:0,transition:`all ${t.motionDurationSlow}`,content:'""',pointerEvents:"none"}},[`${e}-blur`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-tip":{color:t.spinDotDefault},[`${e}-dot-holder`]:{width:"1em",height:"1em",fontSize:t.dotSize,display:"inline-block",transition:`transform ${t.motionDurationSlow} ease, opacity ${t.motionDurationSlow} ease`,transformOrigin:"50% 50%",lineHeight:1,color:t.colorPrimary,"&-hidden":{transform:"scale(0.3)",opacity:0}},[`${e}-dot-progress`]:{position:"absolute",inset:0},[`${e}-dot`]:{position:"relative",display:"inline-block",fontSize:t.dotSize,width:"1em",height:"1em","&-item":{position:"absolute",display:"block",width:r(t.dotSize).sub(r(t.marginXXS).div(2)).div(2).equal(),height:r(t.dotSize).sub(r(t.marginXXS).div(2)).div(2).equal(),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:sX,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-spin":{transform:"rotate(45deg)",animationName:lX,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(n=>`${n} ${t.motionDurationSlow} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:t.colorFillSecondary}},[`&-sm ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeSM}},[`&-sm ${e}-dot-holder`]:{i:{width:r(r(t.dotSizeSM).sub(r(t.marginXXS).div(2))).div(2).equal(),height:r(r(t.dotSizeSM).sub(r(t.marginXXS).div(2))).div(2).equal()}},[`&-lg ${e}-dot`]:{"&, &-holder":{fontSize:t.dotSizeLG}},[`&-lg ${e}-dot-holder`]:{i:{width:r(r(t.dotSizeLG).sub(t.marginXXS)).div(2).equal(),height:r(r(t.dotSizeLG).sub(t.marginXXS)).div(2).equal()}},[`&${e}-show-text ${e}-text`]:{display:"block"}})}},uX=t=>{const{controlHeightLG:e,controlHeight:r}=t;return{contentHeight:400,dotSize:e/2,dotSizeSM:e*.35,dotSizeLG:r}},dX=Gr("Spin",t=>{const e=Xt(t,{spinDotDefault:t.colorTextDescription});return[cX(e)]},uX),fX=200,jE=[[30,.05],[70,.03],[96,.01]];function hX(t,e){const[r,n]=d.useState(0),i=d.useRef(null),o=e==="auto";return d.useEffect(()=>(o&&t&&(n(0),i.current=setInterval(()=>{n(a=>{const s=100-a;for(let l=0;l<jE.length;l+=1){const[c,u]=jE[l];if(a<=c)return a+s*u}return a})},fX)),()=>{clearInterval(i.current)}),[o,t]),o?r:e}var vX=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};let kD;function pX(t,e){return!!t&&!!e&&!Number.isNaN(Number(e))}const BD=t=>{var e;const{prefixCls:r,spinning:n=!0,delay:i=0,className:o,rootClassName:a,size:s="default",tip:l,wrapperClassName:c,style:u,children:f,fullscreen:h=!1,indicator:v,percent:g}=t,m=vX(t,["prefixCls","spinning","delay","className","rootClassName","size","tip","wrapperClassName","style","children","fullscreen","indicator","percent"]),{getPrefixCls:p,direction:y,className:b,style:$,indicator:S}=Oo("spin"),w=p("spin",r),[C,E,O]=dX(w),[x,I]=d.useState(()=>n&&!pX(n,i)),T=hX(x,g);d.useEffect(()=>{if(n){const j=UU(i,()=>{I(!0)});return j(),()=>{var k;(k=j?.cancel)===null||k===void 0||k.call(j)}}I(!1)},[i,n]);const N=d.useMemo(()=>typeof f<"u"&&!h,[f,h]),P=ae(w,b,{[`${w}-sm`]:s==="small",[`${w}-lg`]:s==="large",[`${w}-spinning`]:x,[`${w}-show-text`]:!!l,[`${w}-rtl`]:y==="rtl"},o,!h&&a,E,O),_=ae(`${w}-container`,{[`${w}-blur`]:x}),R=(e=v??S)!==null&&e!==void 0?e:kD,M=Object.assign(Object.assign({},$),u),D=d.createElement("div",Object.assign({},m,{style:M,className:P,"aria-live":"polite","aria-busy":x}),d.createElement(aX,{prefixCls:w,indicator:R,percent:T}),l&&(N||h)?d.createElement("div",{className:`${w}-text`},l):null);return C(N?d.createElement("div",Object.assign({},m,{className:ae(`${w}-nested-loading`,c,E,O)}),x&&d.createElement("div",{key:"loading"},D),d.createElement("div",{className:_,key:"container"},f)):h?d.createElement("div",{className:ae(`${w}-fullscreen`,{[`${w}-fullscreen-show`]:x},a,E,O)},D):D)};BD.setDefaultIndicator=t=>{kD=t};var gX={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},mX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:gX}))},yX=d.forwardRef(mX),bX={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"},$X=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:bX}))},wX=d.forwardRef($X),SX={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"},CX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:SX}))},xX=d.forwardRef(CX),EX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},OX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:EX}))},FD=d.forwardRef(OX),IX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"},TX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:IX}))},_X=d.forwardRef(TX),PX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},RX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:PX}))},NX=d.forwardRef(RX),MX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},DX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:MX}))},AX=d.forwardRef(DX),jX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},kX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:jX}))},BX=d.forwardRef(kX),FX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},LX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:FX}))},zX=d.forwardRef(LX),HX={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},VX=function(e,r){return d.createElement(nr,Re({},e,{ref:r,icon:HX}))},WX=d.forwardRef(VX),No={},Md="rc-table-internal-hook";function Tw(t){var e=d.createContext(void 0),r=function(i){var o=i.value,a=i.children,s=d.useRef(o);s.current=o;var l=d.useState(function(){return{getValue:function(){return s.current},listeners:new Set}}),c=le(l,1),u=c[0];return Lt(function(){Hl.unstable_batchedUpdates(function(){u.listeners.forEach(function(f){f(o)})})},[o]),d.createElement(e.Provider,{value:u},a)};return{Context:e,Provider:r,defaultValue:t}}function mn(t,e){var r=sr(typeof e=="function"?e:function(f){if(e===void 0)return f;if(!Array.isArray(e))return f[e];var h={};return e.forEach(function(v){h[v]=f[v]}),h}),n=d.useContext(t?.Context),i=n||{},o=i.listeners,a=i.getValue,s=d.useRef();s.current=r(n?a():t?.defaultValue);var l=d.useState({}),c=le(l,2),u=c[1];return Lt(function(){if(!n)return;function f(h){var v=r(h);So(s.current,v,!0)||u({})}return o.add(f),function(){o.delete(f)}},[n]),s.current}function KX(){var t=d.createContext(null);function e(){return d.useContext(t)}function r(i,o){var a=Yi(i),s=function(c,u){var f=a?{ref:u}:{},h=d.useRef(0),v=d.useRef(c),g=e();return g!==null?d.createElement(i,Re({},c,f)):((!o||o(v.current,c))&&(h.current+=1),v.current=c,d.createElement(t.Provider,{value:h.current},d.createElement(i,Re({},c,f))))};return a?d.forwardRef(s):s}function n(i,o){var a=Yi(i),s=function(c,u){var f=a?{ref:u}:{};return e(),d.createElement(i,Re({},c,f))};return a?d.memo(d.forwardRef(s),o):d.memo(s,o)}return{makeImmutable:r,responseImmutable:n,useImmutableMark:e}}var _w=KX(),LD=_w.makeImmutable,yc=_w.responseImmutable,UX=_w.useImmutableMark,zn=Tw(),zD=d.createContext({renderWithProps:!1}),qX="RC_TABLE_KEY";function GX(t){return t==null?[]:Array.isArray(t)?t:[t]}function Kp(t){var e=[],r={};return t.forEach(function(n){for(var i=n||{},o=i.key,a=i.dataIndex,s=o||GX(a).join("-")||qX;r[s];)s="".concat(s,"_next");r[s]=!0,e.push(s)}),e}function o1(t){return t!=null}function XX(t){return typeof t=="number"&&!Number.isNaN(t)}function YX(t){return t&&tt(t)==="object"&&!Array.isArray(t)&&!d.isValidElement(t)}function JX(t,e,r,n,i,o){var a=d.useContext(zD),s=UX(),l=Rs(function(){if(o1(n))return[n];var c=e==null||e===""?[]:Array.isArray(e)?e:[e],u=kn(t,c),f=u,h=void 0;if(i){var v=i(u,t,r);YX(v)?(f=v.children,h=v.props,a.renderWithProps=!0):f=v}return[f,h]},[s,t,n,e,i,r],function(c,u){if(o){var f=le(c,2),h=f[1],v=le(u,2),g=v[1];return o(g,h)}return a.renderWithProps?!0:!So(c,u,!0)});return l}function ZX(t,e,r,n){var i=t+e-1;return t<=n&&i>=r}function QX(t,e){return mn(zn,function(r){var n=ZX(t,e||1,r.hoverStartRow,r.hoverEndRow);return[n,r.onHover]})}var eY=function(e){var r=e.ellipsis,n=e.rowType,i=e.children,o,a=r===!0?{showTitle:!0}:r;return a&&(a.showTitle||n==="header")&&(typeof i=="string"||typeof i=="number"?o=i.toString():d.isValidElement(i)&&typeof i.props.children=="string"&&(o=i.props.children)),o};function tY(t){var e,r,n,i,o,a,s,l,c=t.component,u=t.children,f=t.ellipsis,h=t.scope,v=t.prefixCls,g=t.className,m=t.align,p=t.record,y=t.render,b=t.dataIndex,$=t.renderIndex,S=t.shouldCellUpdate,w=t.index,C=t.rowType,E=t.colSpan,O=t.rowSpan,x=t.fixLeft,I=t.fixRight,T=t.firstFixLeft,N=t.lastFixLeft,P=t.firstFixRight,_=t.lastFixRight,R=t.appendNode,M=t.additionalProps,D=M===void 0?{}:M,j=t.isSticky,k="".concat(v,"-cell"),V=mn(zn,["supportSticky","allColumnsFixedLeft","rowHoverable"]),G=V.supportSticky,W=V.allColumnsFixedLeft,Y=V.rowHoverable,q=JX(p,b,$,u,y,S),J=le(q,2),oe=J[0],ie=J[1],te={},z=typeof x=="number"&&G,K=typeof I=="number"&&G;z&&(te.position="sticky",te.left=x),K&&(te.position="sticky",te.right=I);var B=(e=(r=(n=ie?.colSpan)!==null&&n!==void 0?n:D.colSpan)!==null&&r!==void 0?r:E)!==null&&e!==void 0?e:1,F=(i=(o=(a=ie?.rowSpan)!==null&&a!==void 0?a:D.rowSpan)!==null&&o!==void 0?o:O)!==null&&i!==void 0?i:1,U=QX(w,F),Z=le(U,2),ee=Z[0],Q=Z[1],ce=sr(function(ge){var ne;p&&Q(w,w+F-1),D==null||(ne=D.onMouseEnter)===null||ne===void 0||ne.call(D,ge)}),me=sr(function(ge){var ne;p&&Q(-1,-1),D==null||(ne=D.onMouseLeave)===null||ne===void 0||ne.call(D,ge)});if(B===0||F===0)return null;var Te=(s=D.title)!==null&&s!==void 0?s:eY({rowType:C,ellipsis:f,children:oe}),_e=ae(k,g,(l={},A(A(A(A(A(A(A(A(A(A(l,"".concat(k,"-fix-left"),z&&G),"".concat(k,"-fix-left-first"),T&&G),"".concat(k,"-fix-left-last"),N&&G),"".concat(k,"-fix-left-all"),N&&W&&G),"".concat(k,"-fix-right"),K&&G),"".concat(k,"-fix-right-first"),P&&G),"".concat(k,"-fix-right-last"),_&&G),"".concat(k,"-ellipsis"),f),"".concat(k,"-with-append"),R),"".concat(k,"-fix-sticky"),(z||K)&&j&&G),A(l,"".concat(k,"-row-hover"),!ie&&ee)),D.className,ie?.className),ve={};m&&(ve.textAlign=m);var ye=L(L(L(L({},ie?.style),te),ve),D.style),xe=oe;return tt(xe)==="object"&&!Array.isArray(xe)&&!d.isValidElement(xe)&&(xe=null),f&&(N||P)&&(xe=d.createElement("span",{className:"".concat(k,"-content")},xe)),d.createElement(c,Re({},ie,D,{className:_e,style:ye,title:Te,scope:h,onMouseEnter:Y?ce:void 0,onMouseLeave:Y?me:void 0,colSpan:B!==1?B:null,rowSpan:F!==1?F:null}),R,xe)}const bc=d.memo(tY);function Pw(t,e,r,n,i){var o=r[t]||{},a=r[e]||{},s,l;o.fixed==="left"?s=n.left[i==="rtl"?e:t]:a.fixed==="right"&&(l=n.right[i==="rtl"?t:e]);var c=!1,u=!1,f=!1,h=!1,v=r[e+1],g=r[t-1],m=v&&!v.fixed||g&&!g.fixed||r.every(function(S){return S.fixed==="left"});if(i==="rtl"){if(s!==void 0){var p=g&&g.fixed==="left";h=!p&&m}else if(l!==void 0){var y=v&&v.fixed==="right";f=!y&&m}}else if(s!==void 0){var b=v&&v.fixed==="left";c=!b&&m}else if(l!==void 0){var $=g&&g.fixed==="right";u=!$&&m}return{fixLeft:s,fixRight:l,lastFixLeft:c,firstFixRight:u,lastFixRight:f,firstFixLeft:h,isSticky:n.isSticky}}var HD=d.createContext({});function rY(t){var e=t.className,r=t.index,n=t.children,i=t.colSpan,o=i===void 0?1:i,a=t.rowSpan,s=t.align,l=mn(zn,["prefixCls","direction"]),c=l.prefixCls,u=l.direction,f=d.useContext(HD),h=f.scrollColumnIndex,v=f.stickyOffsets,g=f.flattenColumns,m=r+o-1,p=m+1===h?o+1:o,y=Pw(r,r+p-1,g,v,u);return d.createElement(bc,Re({className:e,index:r,component:"td",prefixCls:c,record:null,dataIndex:null,align:s,colSpan:p,rowSpan:a,render:function(){return n}},y))}var nY=["children"];function iY(t){var e=t.children,r=mt(t,nY);return d.createElement("tr",r,e)}function Up(t){var e=t.children;return e}Up.Row=iY;Up.Cell=rY;function oY(t){var e=t.children,r=t.stickyOffsets,n=t.flattenColumns,i=mn(zn,"prefixCls"),o=n.length-1,a=n[o],s=d.useMemo(function(){return{stickyOffsets:r,flattenColumns:n,scrollColumnIndex:a!=null&&a.scrollbar?o:null}},[a,n,o,r]);return d.createElement(HD.Provider,{value:s},d.createElement("tfoot",{className:"".concat(i,"-summary")},e))}const Kf=yc(oY);var VD=Up;function aY(t){return null}function sY(t){return null}function WD(t,e,r,n,i,o,a){var s=o(e,a);t.push({record:e,indent:r,index:a,rowKey:s});var l=i?.has(s);if(e&&Array.isArray(e[n])&&l)for(var c=0;c<e[n].length;c+=1)WD(t,e[n][c],r+1,n,i,o,c)}function KD(t,e,r,n){var i=d.useMemo(function(){if(r!=null&&r.size){for(var o=[],a=0;a<t?.length;a+=1){var s=t[a];WD(o,s,0,e,r,n,a)}return o}return t?.map(function(l,c){return{record:l,indent:0,index:c,rowKey:n(l,c)}})},[t,e,r,n]);return i}function UD(t,e,r,n){var i=mn(zn,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),o=i.flattenColumns,a=i.expandableType,s=i.expandedKeys,l=i.childrenColumnName,c=i.onTriggerExpand,u=i.rowExpandable,f=i.onRow,h=i.expandRowByClick,v=i.rowClassName,g=a==="nest",m=a==="row"&&(!u||u(t)),p=m||g,y=s&&s.has(e),b=l&&t&&t[l],$=sr(c),S=f?.(t,r),w=S?.onClick,C=function(I){h&&p&&c(t,I);for(var T=arguments.length,N=new Array(T>1?T-1:0),P=1;P<T;P++)N[P-1]=arguments[P];w?.apply(void 0,[I].concat(N))},E;typeof v=="string"?E=v:typeof v=="function"&&(E=v(t,r,n));var O=Kp(o);return L(L({},i),{},{columnsKey:O,nestExpandable:g,expanded:y,hasNestChildren:b,record:t,onTriggerExpand:$,rowSupportExpand:m,expandable:p,rowProps:L(L({},S),{},{className:ae(E,S?.className),onClick:C})})}function qD(t){var e=t.prefixCls,r=t.children,n=t.component,i=t.cellComponent,o=t.className,a=t.expanded,s=t.colSpan,l=t.isEmpty,c=t.stickyOffset,u=c===void 0?0:c,f=mn(zn,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),h=f.scrollbarSize,v=f.fixHeader,g=f.fixColumn,m=f.componentWidth,p=f.horizonScroll,y=r;return(l?p&&m:g)&&(y=d.createElement("div",{style:{width:m-u-(v&&!l?h:0),position:"sticky",left:u,overflow:"hidden"},className:"".concat(e,"-expanded-row-fixed")},y)),d.createElement(n,{className:o,style:{display:a?null:"none"}},d.createElement(bc,{component:i,prefixCls:e,colSpan:s},y))}function lY(t){var e=t.prefixCls,r=t.record,n=t.onExpand,i=t.expanded,o=t.expandable,a="".concat(e,"-row-expand-icon");if(!o)return d.createElement("span",{className:ae(a,"".concat(e,"-row-spaced"))});var s=function(c){n(r,c),c.stopPropagation()};return d.createElement("span",{className:ae(a,A(A({},"".concat(e,"-row-expanded"),i),"".concat(e,"-row-collapsed"),!i)),onClick:s})}function cY(t,e,r){var n=[];function i(o){(o||[]).forEach(function(a,s){n.push(e(a,s)),i(a[r])})}return i(t),n}function GD(t,e,r,n){return typeof t=="string"?t:typeof t=="function"?t(e,r,n):""}function XD(t,e,r,n,i){var o,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0,l=t.record,c=t.prefixCls,u=t.columnsKey,f=t.fixedInfoList,h=t.expandIconColumnIndex,v=t.nestExpandable,g=t.indentSize,m=t.expandIcon,p=t.expanded,y=t.hasNestChildren,b=t.onTriggerExpand,$=t.expandable,S=t.expandedKeys,w=u[r],C=f[r],E;r===(h||0)&&v&&(E=d.createElement(d.Fragment,null,d.createElement("span",{style:{paddingLeft:"".concat(g*n,"px")},className:"".concat(c,"-row-indent indent-level-").concat(n)}),m({prefixCls:c,expanded:p,expandable:y,record:l,onExpand:b})));var O=((o=e.onCell)===null||o===void 0?void 0:o.call(e,l,i))||{};if(s){var x=O.rowSpan,I=x===void 0?1:x;if($&&I&&r<s){for(var T=I,N=i;N<i+I;N+=1){var P=a[N];S.has(P)&&(T+=1)}O.rowSpan=T}}return{key:w,fixedInfo:C,appendCellNode:E,additionalCellProps:O}}function uY(t){var e=t.className,r=t.style,n=t.record,i=t.index,o=t.renderIndex,a=t.rowKey,s=t.rowKeys,l=t.indent,c=l===void 0?0:l,u=t.rowComponent,f=t.cellComponent,h=t.scopeCellComponent,v=t.expandedRowInfo,g=UD(n,a,i,c),m=g.prefixCls,p=g.flattenColumns,y=g.expandedRowClassName,b=g.expandedRowRender,$=g.rowProps,S=g.expanded,w=g.rowSupportExpand,C=d.useRef(!1);C.current||(C.current=S);var E=GD(y,n,i,c),O=d.createElement(u,Re({},$,{"data-row-key":a,className:ae(e,"".concat(m,"-row"),"".concat(m,"-row-level-").concat(c),$?.className,A({},E,c>=1)),style:L(L({},r),$?.style)}),p.map(function(T,N){var P=T.render,_=T.dataIndex,R=T.className,M=XD(g,T,N,c,i,s,v?.offset),D=M.key,j=M.fixedInfo,k=M.appendCellNode,V=M.additionalCellProps;return d.createElement(bc,Re({className:R,ellipsis:T.ellipsis,align:T.align,scope:T.rowScope,component:T.rowScope?h:f,prefixCls:m,key:D,record:n,index:i,renderIndex:o,dataIndex:_,render:P,shouldCellUpdate:T.shouldCellUpdate},j,{appendNode:k,additionalProps:V}))})),x;if(w&&(C.current||S)){var I=b(n,i,c+1,S);x=d.createElement(qD,{expanded:S,className:ae("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(c+1),E),prefixCls:m,component:u,cellComponent:f,colSpan:v?v.colSpan:p.length,stickyOffset:v?.sticky,isEmpty:!1},I)}return d.createElement(d.Fragment,null,O,x)}const dY=yc(uY);function fY(t){var e=t.columnKey,r=t.onColumnResize,n=d.useRef();return Lt(function(){n.current&&r(e,n.current.offsetWidth)},[]),d.createElement(ro,{data:e},d.createElement("td",{ref:n,style:{padding:0,border:0,height:0}},d.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}function hY(t){var e=t.prefixCls,r=t.columnsKey,n=t.onColumnResize,i=d.useRef(null);return d.createElement("tr",{"aria-hidden":"true",className:"".concat(e,"-measure-row"),style:{height:0,fontSize:0},ref:i},d.createElement(ro.Collection,{onBatchResize:function(a){Cd(i.current)&&a.forEach(function(s){var l=s.data,c=s.size;n(l,c.offsetWidth)})}},r.map(function(o){return d.createElement(fY,{key:o,columnKey:o,onColumnResize:n})})))}function vY(t){var e=t.data,r=t.measureColumnWidth,n=mn(zn,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","expandedRowOffset","fixedInfoList","colWidths"]),i=n.prefixCls,o=n.getComponent,a=n.onColumnResize,s=n.flattenColumns,l=n.getRowKey,c=n.expandedKeys,u=n.childrenColumnName,f=n.emptyNode,h=n.expandedRowOffset,v=h===void 0?0:h,g=n.colWidths,m=KD(e,u,c,l),p=d.useMemo(function(){return m.map(function(x){return x.rowKey})},[m]),y=d.useRef({renderWithProps:!1}),b=d.useMemo(function(){for(var x=s.length-v,I=0,T=0;T<v;T+=1)I+=g[T]||0;return{offset:v,colSpan:x,sticky:I}},[s.length,v,g]),$=o(["body","wrapper"],"tbody"),S=o(["body","row"],"tr"),w=o(["body","cell"],"td"),C=o(["body","cell"],"th"),E;e.length?E=m.map(function(x,I){var T=x.record,N=x.indent,P=x.index,_=x.rowKey;return d.createElement(dY,{key:_,rowKey:_,rowKeys:p,record:T,index:I,renderIndex:P,rowComponent:S,cellComponent:w,scopeCellComponent:C,indent:N,expandedRowInfo:b})}):E=d.createElement(qD,{expanded:!0,className:"".concat(i,"-placeholder"),prefixCls:i,component:S,cellComponent:w,colSpan:s.length,isEmpty:!0},f);var O=Kp(s);return d.createElement(zD.Provider,{value:y.current},d.createElement($,{className:"".concat(i,"-tbody")},r&&d.createElement(hY,{prefixCls:i,columnsKey:O,onColumnResize:a}),E))}const pY=yc(vY);var gY=["expandable"],xu="RC_TABLE_INTERNAL_COL_DEFINE";function mY(t){var e=t.expandable,r=mt(t,gY),n;return"expandable"in t?n=L(L({},r),e):n=r,n.showExpandColumn===!1&&(n.expandIconColumnIndex=-1),n}var yY=["columnType"];function YD(t){for(var e=t.colWidths,r=t.columns,n=t.columCount,i=mn(zn,["tableLayout"]),o=i.tableLayout,a=[],s=n||r.length,l=!1,c=s-1;c>=0;c-=1){var u=e[c],f=r&&r[c],h=void 0,v=void 0;if(f&&(h=f[xu],o==="auto"&&(v=f.minWidth)),u||v||h||l){var g=h||{};g.columnType;var m=mt(g,yY);a.unshift(d.createElement("col",Re({key:c,style:{width:u,minWidth:v}},m))),l=!0}}return d.createElement("colgroup",null,a)}var bY=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function $Y(t,e){return d.useMemo(function(){for(var r=[],n=0;n<e;n+=1){var i=t[n];if(i!==void 0)r[n]=i;else return null}return r},[t.join("_"),e])}var wY=d.forwardRef(function(t,e){var r=t.className,n=t.noData,i=t.columns,o=t.flattenColumns,a=t.colWidths,s=t.columCount,l=t.stickyOffsets,c=t.direction,u=t.fixHeader,f=t.stickyTopOffset,h=t.stickyBottomOffset,v=t.stickyClassName,g=t.onScroll,m=t.maxContentScroll,p=t.children,y=mt(t,bY),b=mn(zn,["prefixCls","scrollbarSize","isSticky","getComponent"]),$=b.prefixCls,S=b.scrollbarSize,w=b.isSticky,C=b.getComponent,E=C(["header","table"],"table"),O=w&&!u?0:S,x=d.useRef(null),I=d.useCallback(function(j){ju(e,j),ju(x,j)},[]);d.useEffect(function(){function j(V){var G=V,W=G.currentTarget,Y=G.deltaX;Y&&(g({currentTarget:W,scrollLeft:W.scrollLeft+Y}),V.preventDefault())}var k=x.current;return k?.addEventListener("wheel",j,{passive:!1}),function(){k?.removeEventListener("wheel",j)}},[]);var T=d.useMemo(function(){return o.every(function(j){return j.width})},[o]),N=o[o.length-1],P={fixed:N?N.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat($,"-cell-scrollbar")}}},_=d.useMemo(function(){return O?[].concat(Oe(i),[P]):i},[O,i]),R=d.useMemo(function(){return O?[].concat(Oe(o),[P]):o},[O,o]),M=d.useMemo(function(){var j=l.right,k=l.left;return L(L({},l),{},{left:c==="rtl"?[].concat(Oe(k.map(function(V){return V+O})),[0]):k,right:c==="rtl"?j:[].concat(Oe(j.map(function(V){return V+O})),[0]),isSticky:w})},[O,l,w]),D=$Y(a,s);return d.createElement("div",{style:L({overflow:"hidden"},w?{top:f,bottom:h}:{}),ref:I,className:ae(r,A({},v,!!v))},d.createElement(E,{style:{tableLayout:"fixed",visibility:n||D?null:"hidden"}},(!n||!m||T)&&d.createElement(YD,{colWidths:D?[].concat(Oe(D),[O]):[],columCount:s+1,columns:R}),p(L(L({},y),{},{stickyOffsets:M,columns:_,flattenColumns:R}))))});const kE=d.memo(wY);var SY=function(e){var r=e.cells,n=e.stickyOffsets,i=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,s=e.onHeaderRow,l=e.index,c=mn(zn,["prefixCls","direction"]),u=c.prefixCls,f=c.direction,h;s&&(h=s(r.map(function(g){return g.column}),l));var v=Kp(r.map(function(g){return g.column}));return d.createElement(o,h,r.map(function(g,m){var p=g.column,y=Pw(g.colStart,g.colEnd,i,n,f),b;return p&&p.onHeaderCell&&(b=g.column.onHeaderCell(p)),d.createElement(bc,Re({},g,{scope:p.title?g.colSpan>1?"colgroup":"col":null,ellipsis:p.ellipsis,align:p.align,component:a,prefixCls:u,key:v[m]},y,{additionalProps:b,rowType:"header"}))}))};function CY(t){var e=[];function r(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;e[l]=e[l]||[];var c=s,u=a.filter(Boolean).map(function(f){var h={key:f.key,className:f.className||"",children:f.title,column:f,colStart:c},v=1,g=f.children;return g&&g.length>0&&(v=r(g,c,l+1).reduce(function(m,p){return m+p},0),h.hasSubColumns=!0),"colSpan"in f&&(v=f.colSpan),"rowSpan"in f&&(h.rowSpan=f.rowSpan),h.colSpan=v,h.colEnd=h.colStart+v-1,e[l].push(h),c+=v,v});return u}r(t,0);for(var n=e.length,i=function(s){e[s].forEach(function(l){!("rowSpan"in l)&&!l.hasSubColumns&&(l.rowSpan=n-s)})},o=0;o<n;o+=1)i(o);return e}var xY=function(e){var r=e.stickyOffsets,n=e.columns,i=e.flattenColumns,o=e.onHeaderRow,a=mn(zn,["prefixCls","getComponent"]),s=a.prefixCls,l=a.getComponent,c=d.useMemo(function(){return CY(n)},[n]),u=l(["header","wrapper"],"thead"),f=l(["header","row"],"tr"),h=l(["header","cell"],"th");return d.createElement(u,{className:"".concat(s,"-thead")},c.map(function(v,g){var m=d.createElement(SY,{key:g,flattenColumns:i,cells:v,stickyOffsets:r,rowComponent:f,cellComponent:h,onHeaderRow:o,index:g});return m}))};const BE=yc(xY);function FE(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof e=="number"?e:e.endsWith("%")?t*parseFloat(e)/100:null}function EY(t,e,r){return d.useMemo(function(){if(e&&e>0){var n=0,i=0;t.forEach(function(h){var v=FE(e,h.width);v?n+=v:i+=1});var o=Math.max(e,r),a=Math.max(o-n,i),s=i,l=a/i,c=0,u=t.map(function(h){var v=L({},h),g=FE(e,v.width);if(g)v.width=g;else{var m=Math.floor(l);v.width=s===1?a:m,a-=m,s-=1}return c+=v.width,v});if(c<o){var f=o/c;a=o,u.forEach(function(h,v){var g=Math.floor(h.width*f);h.width=v===u.length-1?a:g,a-=g})}return[u,Math.max(c,o)]}return[t,e]},[t,e,r])}var OY=["children"],IY=["fixed"];function Rw(t){return Mi(t).filter(function(e){return d.isValidElement(e)}).map(function(e){var r=e.key,n=e.props,i=n.children,o=mt(n,OY),a=L({key:r},o);return i&&(a.children=Rw(i)),a})}function JD(t){return t.filter(function(e){return e&&tt(e)==="object"&&!e.hidden}).map(function(e){var r=e.children;return r&&r.length>0?L(L({},e),{},{children:JD(r)}):e})}function a1(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return t.filter(function(r){return r&&tt(r)==="object"}).reduce(function(r,n,i){var o=n.fixed,a=o===!0?"left":o,s="".concat(e,"-").concat(i),l=n.children;return l&&l.length>0?[].concat(Oe(r),Oe(a1(l,s).map(function(c){return L({fixed:a},c)}))):[].concat(Oe(r),[L(L({key:s},n),{},{fixed:a})])},[])}function TY(t){return t.map(function(e){var r=e.fixed,n=mt(e,IY),i=r;return r==="left"?i="right":r==="right"&&(i="left"),L({fixed:i},n)})}function _Y(t,e){var r=t.prefixCls,n=t.columns,i=t.children,o=t.expandable,a=t.expandedKeys,s=t.columnTitle,l=t.getRowKey,c=t.onTriggerExpand,u=t.expandIcon,f=t.rowExpandable,h=t.expandIconColumnIndex,v=t.expandedRowOffset,g=v===void 0?0:v,m=t.direction,p=t.expandRowByClick,y=t.columnWidth,b=t.fixed,$=t.scrollWidth,S=t.clientWidth,w=d.useMemo(function(){var _=n||Rw(i)||[];return JD(_.slice())},[n,i]),C=d.useMemo(function(){if(o){var _=w.slice();if(!_.includes(No)){var R=h||0;R>=0&&(R||b==="left"||!b)&&_.splice(R,0,No),b==="right"&&_.splice(w.length,0,No)}var M=_.indexOf(No);_=_.filter(function(V,G){return V!==No||G===M});var D=w[M],j;b?j=b:j=D?D.fixed:null;var k=A(A(A(A(A(A({},xu,{className:"".concat(r,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",s),"fixed",j),"className","".concat(r,"-row-expand-icon-cell")),"width",y),"render",function(G,W,Y){var q=l(W,Y),J=a.has(q),oe=f?f(W):!0,ie=u({prefixCls:r,expanded:J,expandable:oe,record:W,onExpand:c});return p?d.createElement("span",{onClick:function(z){return z.stopPropagation()}},ie):ie});return _.map(function(V,G){var W=V===No?k:V;return G<g?L(L({},W),{},{fixed:W.fixed||"left"}):W})}return w.filter(function(V){return V!==No})},[o,w,l,a,u,m,g]),E=d.useMemo(function(){var _=C;return e&&(_=e(_)),_.length||(_=[{render:function(){return null}}]),_},[e,C,m]),O=d.useMemo(function(){return m==="rtl"?TY(a1(E)):a1(E)},[E,m,$]),x=d.useMemo(function(){for(var _=-1,R=O.length-1;R>=0;R-=1){var M=O[R].fixed;if(M==="left"||M===!0){_=R;break}}if(_>=0)for(var D=0;D<=_;D+=1){var j=O[D].fixed;if(j!=="left"&&j!==!0)return!0}var k=O.findIndex(function(W){var Y=W.fixed;return Y==="right"});if(k>=0)for(var V=k;V<O.length;V+=1){var G=O[V].fixed;if(G!=="right")return!0}return!1},[O]),I=EY(O,$,S),T=le(I,2),N=T[0],P=T[1];return[E,N,P,x]}function PY(t,e,r){var n=mY(t),i=n.expandIcon,o=n.expandedRowKeys,a=n.defaultExpandedRowKeys,s=n.defaultExpandAllRows,l=n.expandedRowRender,c=n.onExpand,u=n.onExpandedRowsChange,f=n.childrenColumnName,h=i||lY,v=f||"children",g=d.useMemo(function(){return l?"row":t.expandable&&t.internalHooks===Md&&t.expandable.__PARENT_RENDER_ICON__||e.some(function(w){return w&&tt(w)==="object"&&w[v]})?"nest":!1},[!!l,e]),m=d.useState(function(){return a||(s?cY(e,r,v):[])}),p=le(m,2),y=p[0],b=p[1],$=d.useMemo(function(){return new Set(o||y||[])},[o,y]),S=d.useCallback(function(w){var C=r(w,e.indexOf(w)),E,O=$.has(C);O?($.delete(C),E=Oe($)):E=[].concat(Oe($),[C]),b(E),c&&c(!O,w),u&&u(E)},[r,$,e,c,u]);return[n,g,$,h,v,S]}function RY(t,e,r){var n=t.map(function(i,o){return Pw(o,o,t,e,r)});return Rs(function(){return n},[n],function(i,o){return!So(i,o)})}function NY(t){var e=d.useRef(t),r=d.useState({}),n=le(r,2),i=n[1],o=d.useRef(null),a=d.useRef([]);function s(l){a.current.push(l);var c=Promise.resolve();o.current=c,c.then(function(){if(o.current===c){var u=a.current,f=e.current;a.current=[],u.forEach(function(h){e.current=h(e.current)}),o.current=null,f!==e.current&&i({})}})}return d.useEffect(function(){return function(){o.current=null}},[]),[e.current,s]}function MY(t){var e=d.useRef(null),r=d.useRef();function n(){window.clearTimeout(r.current)}function i(a){e.current=a,n(),r.current=window.setTimeout(function(){e.current=null,r.current=void 0},100)}function o(){return e.current}return d.useEffect(function(){return n},[]),[i,o]}function DY(){var t=d.useState(-1),e=le(t,2),r=e[0],n=e[1],i=d.useState(-1),o=le(i,2),a=o[0],s=o[1],l=d.useCallback(function(c,u){n(c),s(u)},[]);return[r,a,l]}var LE=In()?window:null;function AY(t,e){var r=tt(t)==="object"?t:{},n=r.offsetHeader,i=n===void 0?0:n,o=r.offsetSummary,a=o===void 0?0:o,s=r.offsetScroll,l=s===void 0?0:s,c=r.getContainer,u=c===void 0?function(){return LE}:c,f=u()||LE,h=!!t;return d.useMemo(function(){return{isSticky:h,stickyClassName:h?"".concat(e,"-sticky-holder"):"",offsetHeader:i,offsetSummary:a,offsetScroll:l,container:f}},[h,l,i,a,e,f])}function jY(t,e,r){var n=d.useMemo(function(){var i=e.length,o=function(c,u,f){for(var h=[],v=0,g=c;g!==u;g+=f)h.push(v),e[g].fixed&&(v+=t[g]||0);return h},a=o(0,i,1),s=o(i-1,-1,-1).reverse();return r==="rtl"?{left:s,right:a}:{left:a,right:s}},[t,e,r]);return n}function zE(t){var e=t.className,r=t.children;return d.createElement("div",{className:e},r)}function HE(t){var e=yd(t),r=e.getBoundingClientRect(),n=document.documentElement;return{left:r.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:r.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var kY=function(e,r){var n,i,o=e.scrollBodyRef,a=e.onScroll,s=e.offsetScroll,l=e.container,c=e.direction,u=mn(zn,"prefixCls"),f=((n=o.current)===null||n===void 0?void 0:n.scrollWidth)||0,h=((i=o.current)===null||i===void 0?void 0:i.clientWidth)||0,v=f&&h*(h/f),g=d.useRef(),m=NY({scrollLeft:0,isHiddenScrollBar:!0}),p=le(m,2),y=p[0],b=p[1],$=d.useRef({delta:0,x:0}),S=d.useState(!1),w=le(S,2),C=w[0],E=w[1],O=d.useRef(null);d.useEffect(function(){return function(){Ht.cancel(O.current)}},[]);var x=function(){E(!1)},I=function(R){R.persist(),$.current.delta=R.pageX-y.scrollLeft,$.current.x=0,E(!0),R.preventDefault()},T=function(R){var M,D=R||((M=window)===null||M===void 0?void 0:M.event),j=D.buttons;if(!C||j===0){C&&E(!1);return}var k=$.current.x+R.pageX-$.current.x-$.current.delta,V=c==="rtl";k=Math.max(V?v-h:0,Math.min(V?0:h-v,k));var G=!V||Math.abs(k)+Math.abs(v)<h;G&&(a({scrollLeft:k/h*(f+2)}),$.current.x=R.pageX)},N=function(){Ht.cancel(O.current),O.current=Ht(function(){if(o.current){var R=HE(o.current).top,M=R+o.current.offsetHeight,D=l===window?document.documentElement.scrollTop+window.innerHeight:HE(l).top+l.clientHeight;M-gx()<=D||R>=D-s?b(function(j){return L(L({},j),{},{isHiddenScrollBar:!0})}):b(function(j){return L(L({},j),{},{isHiddenScrollBar:!1})})}})},P=function(R){b(function(M){return L(L({},M),{},{scrollLeft:R/f*h||0})})};return d.useImperativeHandle(r,function(){return{setScrollLeft:P,checkScrollBarVisible:N}}),d.useEffect(function(){var _=TE(document.body,"mouseup",x,!1),R=TE(document.body,"mousemove",T,!1);return N(),function(){_.remove(),R.remove()}},[v,C]),d.useEffect(function(){if(o.current){for(var _=[],R=yd(o.current);R;)_.push(R),R=R.parentElement;return _.forEach(function(M){return M.addEventListener("scroll",N,!1)}),window.addEventListener("resize",N,!1),window.addEventListener("scroll",N,!1),l.addEventListener("scroll",N,!1),function(){_.forEach(function(M){return M.removeEventListener("scroll",N)}),window.removeEventListener("resize",N),window.removeEventListener("scroll",N),l.removeEventListener("scroll",N)}}},[l]),d.useEffect(function(){y.isHiddenScrollBar||b(function(_){var R=o.current;return R?L(L({},_),{},{scrollLeft:R.scrollLeft/R.scrollWidth*R.clientWidth}):_})},[y.isHiddenScrollBar]),f<=h||!v||y.isHiddenScrollBar?null:d.createElement("div",{style:{height:gx(),width:h,bottom:s},className:"".concat(u,"-sticky-scroll")},d.createElement("div",{onMouseDown:I,ref:g,className:ae("".concat(u,"-sticky-scroll-bar"),A({},"".concat(u,"-sticky-scroll-bar-active"),C)),style:{width:"".concat(v,"px"),transform:"translate3d(".concat(y.scrollLeft,"px, 0, 0)")}}))};const BY=d.forwardRef(kY);var ZD="rc-table",FY=[],LY={};function zY(){return"No Data"}function HY(t,e){var r=L({rowKey:"key",prefixCls:ZD,emptyText:zY},t),n=r.prefixCls,i=r.className,o=r.rowClassName,a=r.style,s=r.data,l=r.rowKey,c=r.scroll,u=r.tableLayout,f=r.direction,h=r.title,v=r.footer,g=r.summary,m=r.caption,p=r.id,y=r.showHeader,b=r.components,$=r.emptyText,S=r.onRow,w=r.onHeaderRow,C=r.onScroll,E=r.internalHooks,O=r.transformColumns,x=r.internalRefs,I=r.tailor,T=r.getContainerWidth,N=r.sticky,P=r.rowHoverable,_=P===void 0?!0:P,R=s||FY,M=!!R.length,D=E===Md,j=d.useCallback(function($t,gt){return kn(b,$t)||gt},[b]),k=d.useMemo(function(){return typeof l=="function"?l:function($t){var gt=$t&&$t[l];return gt}},[l]),V=j(["body"]),G=DY(),W=le(G,3),Y=W[0],q=W[1],J=W[2],oe=PY(r,R,k),ie=le(oe,6),te=ie[0],z=ie[1],K=ie[2],B=ie[3],F=ie[4],U=ie[5],Z=c?.x,ee=d.useState(0),Q=le(ee,2),ce=Q[0],me=Q[1],Te=_Y(L(L(L({},r),te),{},{expandable:!!te.expandedRowRender,columnTitle:te.columnTitle,expandedKeys:K,getRowKey:k,onTriggerExpand:U,expandIcon:B,expandIconColumnIndex:te.expandIconColumnIndex,direction:f,scrollWidth:D&&I&&typeof Z=="number"?Z:null,clientWidth:ce}),D?O:null),_e=le(Te,4),ve=_e[0],ye=_e[1],xe=_e[2],ge=_e[3],ne=xe??Z,X=d.useMemo(function(){return{columns:ve,flattenColumns:ye}},[ve,ye]),fe=d.useRef(),pe=d.useRef(),$e=d.useRef(),Ee=d.useRef();d.useImperativeHandle(e,function(){return{nativeElement:fe.current,scrollTo:function(gt){var $r;if($e.current instanceof HTMLElement){var xn=gt.index,er=gt.top,si=gt.key;if(XX(er)){var li;(li=$e.current)===null||li===void 0||li.scrollTo({top:er})}else{var vn,ci=si??k(R[xn]);(vn=$e.current.querySelector('[data-row-key="'.concat(ci,'"]')))===null||vn===void 0||vn.scrollIntoView()}}else($r=$e.current)!==null&&$r!==void 0&&$r.scrollTo&&$e.current.scrollTo(gt)}}});var be=d.useRef(),H=d.useState(!1),re=le(H,2),he=re[0],ue=re[1],we=d.useState(!1),Ie=le(we,2),Fe=Ie[0],qe=Ie[1],st=d.useState(new Map),ft=le(st,2),et=ft[0],St=ft[1],Et=Kp(ye),at=Et.map(function($t){return et.get($t)}),nt=d.useMemo(function(){return at},[at.join("_")]),Le=jY(nt,ye,f),ze=c&&o1(c.y),Ne=c&&o1(ne)||!!te.fixed,Ye=Ne&&ye.some(function($t){var gt=$t.fixed;return gt}),lt=d.useRef(),De=AY(N,n),Me=De.isSticky,Qe=De.offsetHeader,Ge=De.offsetSummary,We=De.offsetScroll,it=De.stickyClassName,Ue=De.container,He=d.useMemo(function(){return g?.(R)},[g,R]),rt=(ze||Me)&&d.isValidElement(He)&&He.type===Up&&He.props.fixed,ht,_t,Nt;ze&&(_t={overflowY:M?"scroll":"auto",maxHeight:c.y}),Ne&&(ht={overflowX:"auto"},ze||(_t={overflowY:"hidden"}),Nt={width:ne===!0?"auto":ne,minWidth:"100%"});var kt=d.useCallback(function($t,gt){St(function($r){if($r.get($t)!==gt){var xn=new Map($r);return xn.set($t,gt),xn}return $r})},[]),Bt=MY(),qt=le(Bt,2),Vt=qt[0],Be=qt[1];function Ve($t,gt){gt&&(typeof gt=="function"?gt($t):gt.scrollLeft!==$t&&(gt.scrollLeft=$t,gt.scrollLeft!==$t&&setTimeout(function(){gt.scrollLeft=$t},0)))}var vt=sr(function($t){var gt=$t.currentTarget,$r=$t.scrollLeft,xn=f==="rtl",er=typeof $r=="number"?$r:gt.scrollLeft,si=gt||LY;if(!Be()||Be()===si){var li;Vt(si),Ve(er,pe.current),Ve(er,$e.current),Ve(er,be.current),Ve(er,(li=lt.current)===null||li===void 0?void 0:li.setScrollLeft)}var vn=gt||pe.current;if(vn){var ci=D&&I&&typeof ne=="number"?ne:vn.scrollWidth,ta=vn.clientWidth;if(ci===ta){ue(!1),qe(!1);return}xn?(ue(-er<ci-ta),qe(-er>0)):(ue(er>0),qe(er<ci-ta))}}),It=sr(function($t){vt($t),C?.($t)}),Pt=function(){if(Ne&&$e.current){var gt;vt({currentTarget:yd($e.current),scrollLeft:(gt=$e.current)===null||gt===void 0?void 0:gt.scrollLeft})}else ue(!1),qe(!1)},br=function(gt){var $r,xn=gt.width;($r=lt.current)===null||$r===void 0||$r.checkScrollBarVisible();var er=fe.current?fe.current.offsetWidth:xn;D&&T&&fe.current&&(er=T(fe.current,er)||er),er!==ce&&(Pt(),me(er))},Sr=d.useRef(!1);d.useEffect(function(){Sr.current&&Pt()},[Ne,s,ve.length]),d.useEffect(function(){Sr.current=!0},[]);var Cn=d.useState(0),ut=le(Cn,2),pt=ut[0],Tt=ut[1],Nr=d.useState(!0),zr=le(Nr,2),Si=zr[0],Wn=zr[1];Lt(function(){(!I||!D)&&($e.current instanceof Element?Tt(A0($e.current).width):Tt(A0(Ee.current).width)),Wn(h7("position","sticky"))},[]),d.useEffect(function(){D&&x&&(x.body.current=$e.current)});var dn=d.useCallback(function($t){return d.createElement(d.Fragment,null,d.createElement(BE,$t),rt==="top"&&d.createElement(Kf,$t,He))},[rt,He]),Kn=d.useCallback(function($t){return d.createElement(Kf,$t,He)},[He]),Nn=j(["table"],"table"),fn=d.useMemo(function(){return u||(Ye?ne==="max-content"?"auto":"fixed":ze||Me||ye.some(function($t){var gt=$t.ellipsis;return gt})?"fixed":"auto")},[ze,Ye,ye,u,Me]),Un,Kt={colWidths:nt,columCount:ye.length,stickyOffsets:Le,onHeaderRow:w,fixHeader:ze,scroll:c},Je=d.useMemo(function(){return M?null:typeof $=="function"?$():$},[M,$]),Xe=d.createElement(pY,{data:R,measureColumnWidth:ze||Ne||Me}),Ft=d.createElement(YD,{colWidths:ye.map(function($t){var gt=$t.width;return gt}),columns:ye}),Wt=m!=null?d.createElement("caption",{className:"".concat(n,"-caption")},m):void 0,Qt=Zi(r,{data:!0}),or=Zi(r,{aria:!0});if(ze||Me){var Zr;typeof V=="function"?(Zr=V(R,{scrollbarSize:pt,ref:$e,onScroll:vt}),Kt.colWidths=ye.map(function($t,gt){var $r=$t.width,xn=gt===ye.length-1?$r-pt:$r;return typeof xn=="number"&&!Number.isNaN(xn)?xn:0})):Zr=d.createElement("div",{style:L(L({},ht),_t),onScroll:It,ref:$e,className:ae("".concat(n,"-body"))},d.createElement(Nn,Re({style:L(L({},Nt),{},{tableLayout:fn})},or),Wt,Ft,Xe,!rt&&He&&d.createElement(Kf,{stickyOffsets:Le,flattenColumns:ye},He)));var Hr=L(L(L({noData:!R.length,maxContentScroll:Ne&&ne==="max-content"},Kt),X),{},{direction:f,stickyClassName:it,onScroll:vt});Un=d.createElement(d.Fragment,null,y!==!1&&d.createElement(kE,Re({},Hr,{stickyTopOffset:Qe,className:"".concat(n,"-header"),ref:pe}),dn),Zr,rt&&rt!=="top"&&d.createElement(kE,Re({},Hr,{stickyBottomOffset:Ge,className:"".concat(n,"-summary"),ref:be}),Kn),Me&&$e.current&&$e.current instanceof Element&&d.createElement(BY,{ref:lt,offsetScroll:We,scrollBodyRef:$e,onScroll:vt,container:Ue,direction:f}))}else Un=d.createElement("div",{style:L(L({},ht),_t),className:ae("".concat(n,"-content")),onScroll:vt,ref:$e},d.createElement(Nn,Re({style:L(L({},Nt),{},{tableLayout:fn})},or),Wt,Ft,y!==!1&&d.createElement(BE,Re({},Kt,X)),Xe,He&&d.createElement(Kf,{stickyOffsets:Le,flattenColumns:ye},He)));var Qr=d.createElement("div",Re({className:ae(n,i,A(A(A(A(A(A(A(A(A(A({},"".concat(n,"-rtl"),f==="rtl"),"".concat(n,"-ping-left"),he),"".concat(n,"-ping-right"),Fe),"".concat(n,"-layout-fixed"),u==="fixed"),"".concat(n,"-fixed-header"),ze),"".concat(n,"-fixed-column"),Ye),"".concat(n,"-fixed-column-gapped"),Ye&&ge),"".concat(n,"-scroll-horizontal"),Ne),"".concat(n,"-has-fix-left"),ye[0]&&ye[0].fixed),"".concat(n,"-has-fix-right"),ye[ye.length-1]&&ye[ye.length-1].fixed==="right")),style:a,id:p,ref:fe},Qt),h&&d.createElement(zE,{className:"".concat(n,"-title")},h(R)),d.createElement("div",{ref:Ee,className:"".concat(n,"-container")},Un),v&&d.createElement(zE,{className:"".concat(n,"-footer")},v(R)));Ne&&(Qr=d.createElement(ro,{onResize:br},Qr));var en=RY(ye,Le,f),hn=d.useMemo(function(){return{scrollX:ne,prefixCls:n,getComponent:j,scrollbarSize:pt,direction:f,fixedInfoList:en,isSticky:Me,supportSticky:Si,componentWidth:ce,fixHeader:ze,fixColumn:Ye,horizonScroll:Ne,tableLayout:fn,rowClassName:o,expandedRowClassName:te.expandedRowClassName,expandIcon:B,expandableType:z,expandRowByClick:te.expandRowByClick,expandedRowRender:te.expandedRowRender,expandedRowOffset:te.expandedRowOffset,onTriggerExpand:U,expandIconColumnIndex:te.expandIconColumnIndex,indentSize:te.indentSize,allColumnsFixedLeft:ye.every(function($t){return $t.fixed==="left"}),emptyNode:Je,columns:ve,flattenColumns:ye,onColumnResize:kt,colWidths:nt,hoverStartRow:Y,hoverEndRow:q,onHover:J,rowExpandable:te.rowExpandable,onRow:S,getRowKey:k,expandedKeys:K,childrenColumnName:F,rowHoverable:_}},[ne,n,j,pt,f,en,Me,Si,ce,ze,Ye,Ne,fn,o,te.expandedRowClassName,B,z,te.expandRowByClick,te.expandedRowRender,te.expandedRowOffset,U,te.expandIconColumnIndex,te.indentSize,Je,ve,ye,kt,nt,Y,q,J,te.rowExpandable,S,k,K,F,_]);return d.createElement(zn.Provider,{value:hn},Qr)}var VY=d.forwardRef(HY);function QD(t){return LD(VY,t)}var $c=QD();$c.EXPAND_COLUMN=No;$c.INTERNAL_HOOKS=Md;$c.Column=aY;$c.ColumnGroup=sY;$c.Summary=VD;var Nw=Tw(null),eA=Tw(null);function WY(t,e,r){var n=e||1;return r[t+n]-(r[t]||0)}function KY(t){var e=t.rowInfo,r=t.column,n=t.colIndex,i=t.indent,o=t.index,a=t.component,s=t.renderIndex,l=t.record,c=t.style,u=t.className,f=t.inverse,h=t.getHeight,v=r.render,g=r.dataIndex,m=r.className,p=r.width,y=mn(eA,["columnsOffset"]),b=y.columnsOffset,$=XD(e,r,n,i,o),S=$.key,w=$.fixedInfo,C=$.appendCellNode,E=$.additionalCellProps,O=E.style,x=E.colSpan,I=x===void 0?1:x,T=E.rowSpan,N=T===void 0?1:T,P=n-1,_=WY(P,I,b),R=I>1?p-_:0,M=L(L(L({},O),c),{},{flex:"0 0 ".concat(_,"px"),width:"".concat(_,"px"),marginRight:R,pointerEvents:"auto"}),D=d.useMemo(function(){return f?N<=1:I===0||N===0||N>1},[N,I,f]);D?M.visibility="hidden":f&&(M.height=h?.(N));var j=D?function(){return null}:v,k={};return(N===0||I===0)&&(k.rowSpan=1,k.colSpan=1),d.createElement(bc,Re({className:ae(m,u),ellipsis:r.ellipsis,align:r.align,scope:r.rowScope,component:a,prefixCls:e.prefixCls,key:S,record:l,index:o,renderIndex:s,dataIndex:g,render:j,shouldCellUpdate:r.shouldCellUpdate},w,{appendNode:C,additionalProps:L(L({},E),{},{style:M},k)}))}var UY=["data","index","className","rowKey","style","extra","getHeight"],qY=d.forwardRef(function(t,e){var r=t.data,n=t.index,i=t.className,o=t.rowKey,a=t.style,s=t.extra,l=t.getHeight,c=mt(t,UY),u=r.record,f=r.indent,h=r.index,v=mn(zn,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),g=v.scrollX,m=v.flattenColumns,p=v.prefixCls,y=v.fixColumn,b=v.componentWidth,$=mn(Nw,["getComponent"]),S=$.getComponent,w=UD(u,o,n,f),C=S(["body","row"],"div"),E=S(["body","cell"],"div"),O=w.rowSupportExpand,x=w.expanded,I=w.rowProps,T=w.expandedRowRender,N=w.expandedRowClassName,P;if(O&&x){var _=T(u,n,f+1,x),R=GD(N,u,n,f),M={};y&&(M={style:A({},"--virtual-width","".concat(b,"px"))});var D="".concat(p,"-expanded-row-cell");P=d.createElement(C,{className:ae("".concat(p,"-expanded-row"),"".concat(p,"-expanded-row-level-").concat(f+1),R)},d.createElement(bc,{component:E,prefixCls:p,className:ae(D,A({},"".concat(D,"-fixed"),y)),additionalProps:M},_))}var j=L(L({},a),{},{width:g});s&&(j.position="absolute",j.pointerEvents="none");var k=d.createElement(C,Re({},I,c,{"data-row-key":o,ref:O?null:e,className:ae(i,"".concat(p,"-row"),I?.className,A({},"".concat(p,"-row-extra"),s)),style:L(L({},j),I?.style)}),m.map(function(V,G){return d.createElement(KY,{key:G,component:E,rowInfo:w,column:V,colIndex:G,indent:f,index:n,renderIndex:h,record:u,inverse:s,getHeight:l})}));return O?d.createElement("div",{ref:e},k,P):k}),VE=yc(qY),GY=d.forwardRef(function(t,e){var r=t.data,n=t.onScroll,i=mn(zn,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),o=i.flattenColumns,a=i.onColumnResize,s=i.getRowKey,l=i.expandedKeys,c=i.prefixCls,u=i.childrenColumnName,f=i.scrollX,h=i.direction,v=mn(Nw),g=v.sticky,m=v.scrollY,p=v.listItemHeight,y=v.getComponent,b=v.onScroll,$=d.useRef(),S=KD(r,u,l,s),w=d.useMemo(function(){var P=0;return o.map(function(_){var R=_.width,M=_.key;return P+=R,[M,R,P]})},[o]),C=d.useMemo(function(){return w.map(function(P){return P[2]})},[w]);d.useEffect(function(){w.forEach(function(P){var _=le(P,2),R=_[0],M=_[1];a(R,M)})},[w]),d.useImperativeHandle(e,function(){var P,_={scrollTo:function(M){var D;(D=$.current)===null||D===void 0||D.scrollTo(M)},nativeElement:(P=$.current)===null||P===void 0?void 0:P.nativeElement};return Object.defineProperty(_,"scrollLeft",{get:function(){var M;return((M=$.current)===null||M===void 0?void 0:M.getScrollInfo().x)||0},set:function(M){var D;(D=$.current)===null||D===void 0||D.scrollTo({left:M})}}),_});var E=function(_,R){var M,D=(M=S[R])===null||M===void 0?void 0:M.record,j=_.onCell;if(j){var k,V=j(D,R);return(k=V?.rowSpan)!==null&&k!==void 0?k:1}return 1},O=function(_){var R=_.start,M=_.end,D=_.getSize,j=_.offsetY;if(M<0)return null;for(var k=o.filter(function(B){return E(B,R)===0}),V=R,G=function(F){if(k=k.filter(function(U){return E(U,F)===0}),!k.length)return V=F,1},W=R;W>=0&&!G(W);W-=1);for(var Y=o.filter(function(B){return E(B,M)!==1}),q=M,J=function(F){if(Y=Y.filter(function(U){return E(U,F)!==1}),!Y.length)return q=Math.max(F-1,M),1},oe=M;oe<S.length&&!J(oe);oe+=1);for(var ie=[],te=function(F){var U=S[F];if(!U)return 1;o.some(function(Z){return E(Z,F)>1})&&ie.push(F)},z=V;z<=q;z+=1)te(z);var K=ie.map(function(B){var F=S[B],U=s(F.record,B),Z=function(ce){var me=B+ce-1,Te=s(S[me].record,me),_e=D(U,Te);return _e.bottom-_e.top},ee=D(U);return d.createElement(VE,{key:B,data:F,rowKey:U,index:B,style:{top:-j+ee.top},extra:!0,getHeight:Z})});return K},x=d.useMemo(function(){return{columnsOffset:C}},[C]),I="".concat(c,"-tbody"),T=y(["body","wrapper"]),N={};return g&&(N.position="sticky",N.bottom=0,tt(g)==="object"&&g.offsetScroll&&(N.bottom=g.offsetScroll)),d.createElement(eA.Provider,{value:x},d.createElement(Bp,{fullHeight:!1,ref:$,prefixCls:"".concat(I,"-virtual"),styles:{horizontalScrollBar:N},className:I,height:m,itemHeight:p||24,data:S,itemKey:function(_){return s(_.record)},component:T,scrollWidth:f,direction:h,onVirtualScroll:function(_){var R,M=_.x;n({currentTarget:(R=$.current)===null||R===void 0?void 0:R.nativeElement,scrollLeft:M})},onScroll:b,extraRender:O},function(P,_,R){var M=s(P.record,_);return d.createElement(VE,{data:P,rowKey:M,index:_,style:R.style})}))}),XY=yc(GY),YY=function(e,r){var n=r.ref,i=r.onScroll;return d.createElement(XY,{ref:n,data:e,onScroll:i})};function JY(t,e){var r=t.data,n=t.columns,i=t.scroll,o=t.sticky,a=t.prefixCls,s=a===void 0?ZD:a,l=t.className,c=t.listItemHeight,u=t.components,f=t.onScroll,h=i||{},v=h.x,g=h.y;typeof v!="number"&&(v=1),typeof g!="number"&&(g=500);var m=sr(function(b,$){return kn(u,b)||$}),p=sr(f),y=d.useMemo(function(){return{sticky:o,scrollY:g,listItemHeight:c,getComponent:m,onScroll:p}},[o,g,c,m,p]);return d.createElement(Nw.Provider,{value:y},d.createElement($c,Re({},t,{className:ae(l,"".concat(s,"-virtual")),scroll:L(L({},i),{},{x:v}),components:L(L({},u),{},{body:r!=null&&r.length?YY:void 0}),columns:n,internalHooks:Md,tailor:!0,ref:e})))}var ZY=d.forwardRef(JY);function tA(t){return LD(ZY,t)}tA();const QY=t=>null,eJ=t=>null;var Mw=d.createContext(null),tJ=d.createContext({}),rJ=function(e){for(var r=e.prefixCls,n=e.level,i=e.isStart,o=e.isEnd,a="".concat(r,"-indent-unit"),s=[],l=0;l<n;l+=1)s.push(d.createElement("span",{key:l,className:ae(a,A(A({},"".concat(a,"-start"),i[l]),"".concat(a,"-end"),o[l]))}));return d.createElement("span",{"aria-hidden":"true",className:"".concat(r,"-indent")},s)};const nJ=d.memo(rJ);var iJ=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],WE="open",KE="close",oJ="---",Qu=function(e){var r,n,i,o=e.eventKey,a=e.className,s=e.style,l=e.dragOver,c=e.dragOverGapTop,u=e.dragOverGapBottom,f=e.isLeaf,h=e.isStart,v=e.isEnd,g=e.expanded,m=e.selected,p=e.checked,y=e.halfChecked,b=e.loading,$=e.domRef,S=e.active,w=e.data,C=e.onMouseMove,E=e.selectable,O=mt(e,iJ),x=de.useContext(Mw),I=de.useContext(tJ),T=de.useRef(null),N=de.useState(!1),P=le(N,2),_=P[0],R=P[1],M=!!(x.disabled||e.disabled||(r=I.nodeDisabled)!==null&&r!==void 0&&r.call(I,w)),D=de.useMemo(function(){return!x.checkable||e.checkable===!1?!1:x.checkable},[x.checkable,e.checkable]),j=function(H){M||x.onNodeSelect(H,Vr(e))},k=function(H){M||!D||e.disableCheckbox||x.onNodeCheck(H,Vr(e),!p)},V=de.useMemo(function(){return typeof E=="boolean"?E:x.selectable},[E,x.selectable]),G=function(H){x.onNodeClick(H,Vr(e)),V?j(H):k(H)},W=function(H){x.onNodeDoubleClick(H,Vr(e))},Y=function(H){x.onNodeMouseEnter(H,Vr(e))},q=function(H){x.onNodeMouseLeave(H,Vr(e))},J=function(H){x.onNodeContextMenu(H,Vr(e))},oe=de.useMemo(function(){return!!(x.draggable&&(!x.draggable.nodeDraggable||x.draggable.nodeDraggable(w)))},[x.draggable,w]),ie=function(H){H.stopPropagation(),R(!0),x.onNodeDragStart(H,e);try{H.dataTransfer.setData("text/plain","")}catch{}},te=function(H){H.preventDefault(),H.stopPropagation(),x.onNodeDragEnter(H,e)},z=function(H){H.preventDefault(),H.stopPropagation(),x.onNodeDragOver(H,e)},K=function(H){H.stopPropagation(),x.onNodeDragLeave(H,e)},B=function(H){H.stopPropagation(),R(!1),x.onNodeDragEnd(H,e)},F=function(H){H.preventDefault(),H.stopPropagation(),R(!1),x.onNodeDrop(H,e)},U=function(H){b||x.onNodeExpand(H,Vr(e))},Z=de.useMemo(function(){var be=Jn(x.keyEntities,o)||{},H=be.children;return!!(H||[]).length},[x.keyEntities,o]),ee=de.useMemo(function(){return f===!1?!1:f||!x.loadData&&!Z||x.loadData&&e.loaded&&!Z},[f,x.loadData,Z,e.loaded]);de.useEffect(function(){b||typeof x.loadData=="function"&&g&&!ee&&!e.loaded&&x.onNodeLoad(Vr(e))},[b,x.loadData,x.onNodeLoad,g,ee,e]);var Q=de.useMemo(function(){var be;return(be=x.draggable)!==null&&be!==void 0&&be.icon?de.createElement("span",{className:"".concat(x.prefixCls,"-draggable-icon")},x.draggable.icon):null},[x.draggable]),ce=function(H){var re=e.switcherIcon||x.switcherIcon;return typeof re=="function"?re(L(L({},e),{},{isLeaf:H})):re},me=function(){if(ee){var H=ce(!0);return H!==!1?de.createElement("span",{className:ae("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher-noop"))},H):null}var re=ce(!1);return re!==!1?de.createElement("span",{onClick:U,className:ae("".concat(x.prefixCls,"-switcher"),"".concat(x.prefixCls,"-switcher_").concat(g?WE:KE))},re):null},Te=de.useMemo(function(){if(!D)return null;var be=typeof D!="boolean"?D:null;return de.createElement("span",{className:ae("".concat(x.prefixCls,"-checkbox"),A(A(A({},"".concat(x.prefixCls,"-checkbox-checked"),p),"".concat(x.prefixCls,"-checkbox-indeterminate"),!p&&y),"".concat(x.prefixCls,"-checkbox-disabled"),M||e.disableCheckbox)),onClick:k,role:"checkbox","aria-checked":y?"mixed":p,"aria-disabled":M||e.disableCheckbox,"aria-label":"Select ".concat(typeof e.title=="string"?e.title:"tree node")},be)},[D,p,y,M,e.disableCheckbox,e.title]),_e=de.useMemo(function(){return ee?null:g?WE:KE},[ee,g]),ve=de.useMemo(function(){return de.createElement("span",{className:ae("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__").concat(_e||"docu"),A({},"".concat(x.prefixCls,"-icon_loading"),b))})},[x.prefixCls,_e,b]),ye=de.useMemo(function(){var be=!!x.draggable,H=!e.disabled&&be&&x.dragOverNodeKey===o;return H?x.dropIndicatorRender({dropPosition:x.dropPosition,dropLevelOffset:x.dropLevelOffset,indent:x.indent,prefixCls:x.prefixCls,direction:x.direction}):null},[x.dropPosition,x.dropLevelOffset,x.indent,x.prefixCls,x.direction,x.draggable,x.dragOverNodeKey,x.dropIndicatorRender]),xe=de.useMemo(function(){var be=e.title,H=be===void 0?oJ:be,re="".concat(x.prefixCls,"-node-content-wrapper"),he;if(x.showIcon){var ue=e.icon||x.icon;he=ue?de.createElement("span",{className:ae("".concat(x.prefixCls,"-iconEle"),"".concat(x.prefixCls,"-icon__customize"))},typeof ue=="function"?ue(e):ue):ve}else x.loadData&&b&&(he=ve);var we;return typeof H=="function"?we=H(w):x.titleRender?we=x.titleRender(w):we=H,de.createElement("span",{ref:T,title:typeof H=="string"?H:"",className:ae(re,"".concat(re,"-").concat(_e||"normal"),A({},"".concat(x.prefixCls,"-node-selected"),!M&&(m||_))),onMouseEnter:Y,onMouseLeave:q,onContextMenu:J,onClick:G,onDoubleClick:W},he,de.createElement("span",{className:"".concat(x.prefixCls,"-title")},we),ye)},[x.prefixCls,x.showIcon,e,x.icon,ve,x.titleRender,w,_e,Y,q,J,G,W]),ge=Zi(O,{aria:!0,data:!0}),ne=Jn(x.keyEntities,o)||{},X=ne.level,fe=v[v.length-1],pe=!M&&oe,$e=x.draggingNodeKey===o,Ee=E!==void 0?{"aria-selected":!!E}:void 0;return de.createElement("div",Re({ref:$,role:"treeitem","aria-expanded":f?void 0:g,className:ae(a,"".concat(x.prefixCls,"-treenode"),(i={},A(A(A(A(A(A(A(A(A(A(i,"".concat(x.prefixCls,"-treenode-disabled"),M),"".concat(x.prefixCls,"-treenode-switcher-").concat(g?"open":"close"),!f),"".concat(x.prefixCls,"-treenode-checkbox-checked"),p),"".concat(x.prefixCls,"-treenode-checkbox-indeterminate"),y),"".concat(x.prefixCls,"-treenode-selected"),m),"".concat(x.prefixCls,"-treenode-loading"),b),"".concat(x.prefixCls,"-treenode-active"),S),"".concat(x.prefixCls,"-treenode-leaf-last"),fe),"".concat(x.prefixCls,"-treenode-draggable"),oe),"dragging",$e),A(A(A(A(A(A(A(i,"drop-target",x.dropTargetKey===o),"drop-container",x.dropContainerKey===o),"drag-over",!M&&l),"drag-over-gap-top",!M&&c),"drag-over-gap-bottom",!M&&u),"filter-node",(n=x.filterTreeNode)===null||n===void 0?void 0:n.call(x,Vr(e))),"".concat(x.prefixCls,"-treenode-leaf"),ee))),style:s,draggable:pe,onDragStart:pe?ie:void 0,onDragEnter:oe?te:void 0,onDragOver:oe?z:void 0,onDragLeave:oe?K:void 0,onDrop:oe?F:void 0,onDragEnd:oe?B:void 0,onMouseMove:C},Ee,ge),de.createElement(nJ,{prefixCls:x.prefixCls,level:X,isStart:h,isEnd:v}),Q,me(),Te,xe)};Qu.isTreeNode=1;function uo(t,e){if(!t)return[];var r=t.slice(),n=r.indexOf(e);return n>=0&&r.splice(n,1),r}function Ro(t,e){var r=(t||[]).slice();return r.indexOf(e)===-1&&r.push(e),r}function Dw(t){return t.split("-")}function aJ(t,e){var r=[],n=Jn(e,t);function i(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];o.forEach(function(a){var s=a.key,l=a.children;r.push(s),i(l)})}return i(n.children),r}function sJ(t){if(t.parent){var e=Dw(t.pos);return Number(e[e.length-1])===t.parent.children.length-1}return!1}function lJ(t){var e=Dw(t.pos);return Number(e[e.length-1])===0}function UE(t,e,r,n,i,o,a,s,l,c){var u,f=t.clientX,h=t.clientY,v=t.target.getBoundingClientRect(),g=v.top,m=v.height,p=(c==="rtl"?-1:1)*((i?.x||0)-f),y=(p-12)/n,b=l.filter(function(M){var D;return(D=s[M])===null||D===void 0||(D=D.children)===null||D===void 0?void 0:D.length}),$=Jn(s,r.eventKey);if(h<g+m/2){var S=a.findIndex(function(M){return M.key===$.key}),w=S<=0?0:S-1,C=a[w].key;$=Jn(s,C)}var E=$.key,O=$,x=$.key,I=0,T=0;if(!b.includes(E))for(var N=0;N<y&&sJ($);N+=1)$=$.parent,T+=1;var P=e.data,_=$.node,R=!0;return lJ($)&&$.level===0&&h<g+m/2&&o({dragNode:P,dropNode:_,dropPosition:-1})&&$.key===r.eventKey?I=-1:(O.children||[]).length&&b.includes(x)?o({dragNode:P,dropNode:_,dropPosition:0})?I=0:R=!1:T===0?y>-1.5?o({dragNode:P,dropNode:_,dropPosition:1})?I=1:R=!1:o({dragNode:P,dropNode:_,dropPosition:0})?I=0:o({dragNode:P,dropNode:_,dropPosition:1})?I=1:R=!1:o({dragNode:P,dropNode:_,dropPosition:1})?I=1:R=!1,{dropPosition:I,dropLevelOffset:T,dropTargetKey:$.key,dropTargetPos:$.pos,dragOverNodeKey:x,dropContainerKey:I===0?null:((u=$.parent)===null||u===void 0?void 0:u.key)||null,dropAllowed:R}}function qE(t,e){if(t){var r=e.multiple;return r?t.slice():t.length?[t[0]]:t}}function Mm(t){if(!t)return null;var e;if(Array.isArray(t))e={checkedKeys:t,halfCheckedKeys:void 0};else if(tt(t)==="object")e={checkedKeys:t.checked||void 0,halfCheckedKeys:t.halfChecked||void 0};else return gr(!1,"`checkedKeys` is not an array or an object"),null;return e}function s1(t,e){var r=new Set;function n(i){if(!r.has(i)){var o=Jn(e,i);if(o){r.add(i);var a=o.parent,s=o.node;s.disabled||a&&n(a.key)}}}return(t||[]).forEach(function(i){n(i)}),Oe(r)}function cJ(t){const[e,r]=d.useState(null);return[d.useCallback((o,a,s)=>{const l=e??o,c=Math.min(l||0,o),u=Math.max(l||0,o),f=a.slice(c,u+1).map(g=>t(g)),h=f.some(g=>!s.has(g)),v=[];return f.forEach(g=>{h?(s.has(g)||v.push(g),s.add(g)):(s.delete(g),v.push(g))}),r(h?u:null),v},[e]),o=>{r(o)}]}const oa={},l1="SELECT_ALL",c1="SELECT_INVERT",u1="SELECT_NONE",GE=[],rA=(t,e)=>{let r=[];return(e||[]).forEach(n=>{r.push(n),n&&typeof n=="object"&&t in n&&(r=[].concat(Oe(r),Oe(rA(t,n[t]))))}),r},uJ=(t,e)=>{const{preserveSelectedRowKeys:r,selectedRowKeys:n,defaultSelectedRowKeys:i,getCheckboxProps:o,onChange:a,onSelect:s,onSelectAll:l,onSelectInvert:c,onSelectNone:u,onSelectMultiple:f,columnWidth:h,type:v,selections:g,fixed:m,renderCell:p,hideSelectAll:y,checkStrictly:b=!0}=e||{},{prefixCls:$,data:S,pageData:w,getRecordByKey:C,getRowKey:E,expandType:O,childrenColumnName:x,locale:I,getPopupContainer:T}=t,N=Ms(),[P,_]=cJ(B=>B),[R,M]=ln(n||i||GE,{value:n}),D=d.useRef(new Map),j=d.useCallback(B=>{if(r){const F=new Map;B.forEach(U=>{let Z=C(U);!Z&&D.current.has(U)&&(Z=D.current.get(U)),F.set(U,Z)}),D.current=F}},[C,r]);d.useEffect(()=>{j(R)},[R]);const k=d.useMemo(()=>rA(x,w),[x,w]),{keyEntities:V}=d.useMemo(()=>{if(b)return{keyEntities:null};let B=S;if(r){const F=new Set(k.map((Z,ee)=>E(Z,ee))),U=Array.from(D.current).reduce((Z,[ee,Q])=>F.has(ee)?Z:Z.concat(Q),[]);B=[].concat(Oe(B),Oe(U))}return Ew(B,{externalGetKey:E,childrenPropName:x})},[S,E,b,x,r,k]),G=d.useMemo(()=>{const B=new Map;return k.forEach((F,U)=>{const Z=E(F,U),ee=(o?o(F):null)||{};B.set(Z,ee)}),B},[k,E,o]),W=d.useCallback(B=>{const F=E(B);let U;return G.has(F)?U=G.get(E(B)):U=o?o(B):void 0,!!U?.disabled},[G,E]),[Y,q]=d.useMemo(()=>{if(b)return[R||[],[]];const{checkedKeys:B,halfCheckedKeys:F}=Dl(R,!0,V,W);return[B||[],F]},[R,b,V,W]),J=d.useMemo(()=>{const B=v==="radio"?Y.slice(0,1):Y;return new Set(B)},[Y,v]),oe=d.useMemo(()=>v==="radio"?new Set:new Set(q),[q,v]);d.useEffect(()=>{e||M(GE)},[!!e]);const ie=d.useCallback((B,F)=>{let U,Z;j(B),r?(U=B,Z=B.map(ee=>D.current.get(ee))):(U=[],Z=[],B.forEach(ee=>{const Q=C(ee);Q!==void 0&&(U.push(ee),Z.push(Q))})),M(U),a?.(U,Z,{type:F})},[M,C,a,r]),te=d.useCallback((B,F,U,Z)=>{if(s){const ee=U.map(Q=>C(Q));s(C(B),F,ee,Z)}ie(U,"single")},[s,C,ie]),z=d.useMemo(()=>!g||y?null:(g===!0?[l1,c1,u1]:g).map(F=>F===l1?{key:"all",text:I.selectionAll,onSelect(){ie(S.map((U,Z)=>E(U,Z)).filter(U=>{const Z=G.get(U);return!Z?.disabled||J.has(U)}),"all")}}:F===c1?{key:"invert",text:I.selectInvert,onSelect(){const U=new Set(J);w.forEach((ee,Q)=>{const ce=E(ee,Q),me=G.get(ce);me?.disabled||(U.has(ce)?U.delete(ce):U.add(ce))});const Z=Array.from(U);c&&(N.deprecated(!1,"onSelectInvert","onChange"),c(Z)),ie(Z,"invert")}}:F===u1?{key:"none",text:I.selectNone,onSelect(){u?.(),ie(Array.from(J).filter(U=>{const Z=G.get(U);return Z?.disabled}),"none")}}:F).map(F=>Object.assign(Object.assign({},F),{onSelect:(...U)=>{var Z,ee;(ee=F.onSelect)===null||ee===void 0||(Z=ee).call.apply(Z,[F].concat(U)),_(null)}})),[g,J,w,E,c,ie]);return[d.useCallback(B=>{var F;if(!e)return B.filter(Ee=>Ee!==oa);let U=Oe(B);const Z=new Set(J),ee=k.map(E).filter(Ee=>!G.get(Ee).disabled),Q=ee.every(Ee=>Z.has(Ee)),ce=ee.some(Ee=>Z.has(Ee)),me=()=>{const Ee=[];Q?ee.forEach(H=>{Z.delete(H),Ee.push(H)}):ee.forEach(H=>{Z.has(H)||(Z.add(H),Ee.push(H))});const be=Array.from(Z);l?.(!Q,be.map(H=>C(H)),Ee.map(H=>C(H))),ie(be,"all"),_(null)};let Te,_e;if(v!=="radio"){let Ee;if(z){const ue={getPopupContainer:T,items:z.map((we,Ie)=>{const{key:Fe,text:qe,onSelect:st}=we;return{key:Fe??Ie,onClick:()=>{st?.(ee)},label:qe}})};Ee=d.createElement("div",{className:`${$}-selection-extra`},d.createElement(Ow,{menu:ue,getPopupContainer:T},d.createElement("span",null,d.createElement(xM,null))))}const be=k.map((ue,we)=>{const Ie=E(ue,we),Fe=G.get(Ie)||{};return Object.assign({checked:Z.has(Ie)},Fe)}).filter(({disabled:ue})=>ue),H=!!be.length&&be.length===k.length,re=H&&be.every(({checked:ue})=>ue),he=H&&be.some(({checked:ue})=>ue);_e=d.createElement(Yl,{checked:H?re:!!k.length&&Q,indeterminate:H?!re&&he:!Q&&ce,onChange:me,disabled:k.length===0||H,"aria-label":Ee?"Custom selection":"Select all",skipGroup:!0}),Te=!y&&d.createElement("div",{className:`${$}-selection`},_e,Ee)}let ve;v==="radio"?ve=(Ee,be,H)=>{const re=E(be,H),he=Z.has(re),ue=G.get(re);return{node:d.createElement(Id,Object.assign({},ue,{checked:he,onClick:we=>{var Ie;we.stopPropagation(),(Ie=ue?.onClick)===null||Ie===void 0||Ie.call(ue,we)},onChange:we=>{var Ie;Z.has(re)||te(re,!0,[re],we.nativeEvent),(Ie=ue?.onChange)===null||Ie===void 0||Ie.call(ue,we)}})),checked:he}}:ve=(Ee,be,H)=>{var re;const he=E(be,H),ue=Z.has(he),we=oe.has(he),Ie=G.get(he);let Fe;return O==="nest"?Fe=we:Fe=(re=Ie?.indeterminate)!==null&&re!==void 0?re:we,{node:d.createElement(Yl,Object.assign({},Ie,{indeterminate:Fe,checked:ue,skipGroup:!0,onClick:qe=>{var st;qe.stopPropagation(),(st=Ie?.onClick)===null||st===void 0||st.call(Ie,qe)},onChange:qe=>{var st;const{nativeEvent:ft}=qe,{shiftKey:et}=ft,St=ee.findIndex(at=>at===he),Et=Y.some(at=>ee.includes(at));if(et&&b&&Et){const at=P(St,ee,Z),nt=Array.from(Z);f?.(!ue,nt.map(Le=>C(Le)),at.map(Le=>C(Le))),ie(nt,"multiple")}else{const at=Y;if(b){const nt=ue?uo(at,he):Ro(at,he);te(he,!ue,nt,ft)}else{const nt=Dl([].concat(Oe(at),[he]),!0,V,W),{checkedKeys:Le,halfCheckedKeys:ze}=nt;let Ne=Le;if(ue){const Ye=new Set(Le);Ye.delete(he),Ne=Dl(Array.from(Ye),{halfCheckedKeys:ze},V,W).checkedKeys}te(he,!ue,Ne,ft)}}_(ue?null:St),(st=Ie?.onChange)===null||st===void 0||st.call(Ie,qe)}})),checked:ue}};const ye=(Ee,be,H)=>{const{node:re,checked:he}=ve(Ee,be,H);return p?p(he,be,H,re):re};if(!U.includes(oa))if(U.findIndex(Ee=>{var be;return((be=Ee[xu])===null||be===void 0?void 0:be.columnType)==="EXPAND_COLUMN"})===0){const[Ee,...be]=U;U=[Ee,oa].concat(Oe(be))}else U=[oa].concat(Oe(U));const xe=U.indexOf(oa);U=U.filter((Ee,be)=>Ee!==oa||be===xe);const ge=U[xe-1],ne=U[xe+1];let X=m;X===void 0&&(ne?.fixed!==void 0?X=ne.fixed:ge?.fixed!==void 0&&(X=ge.fixed)),X&&ge&&((F=ge[xu])===null||F===void 0?void 0:F.columnType)==="EXPAND_COLUMN"&&ge.fixed===void 0&&(ge.fixed=X);const fe=ae(`${$}-selection-col`,{[`${$}-selection-col-with-dropdown`]:g&&v==="checkbox"}),pe=()=>e?.columnTitle?typeof e.columnTitle=="function"?e.columnTitle(_e):e.columnTitle:Te,$e={fixed:X,width:h,className:`${$}-selection-column`,title:pe(),render:ye,onCell:e.onCell,align:e.align,[xu]:{className:fe}};return U.map(Ee=>Ee===oa?$e:Ee)},[E,k,e,Y,J,oe,h,z,O,G,f,te,W]),J]};function dJ(t,e){return t._antProxy=t._antProxy||{},Object.keys(e).forEach(r=>{if(!(r in t._antProxy)){const n=t[r];t._antProxy[r]=n,t[r]=e[r]}}),t}function fJ(t,e){return d.useImperativeHandle(t,()=>{const r=e(),{nativeElement:n}=r;return typeof Proxy<"u"?new Proxy(n,{get(i,o){return r[o]?r[o]:Reflect.get(i,o)}}):dJ(n,r)})}function hJ(t){return e=>{const{prefixCls:r,onExpand:n,record:i,expanded:o,expandable:a}=e,s=`${r}-row-expand-icon`;return d.createElement("button",{type:"button",onClick:l=>{n(i,l),l.stopPropagation()},className:ae(s,{[`${s}-spaced`]:!a,[`${s}-expanded`]:a&&o,[`${s}-collapsed`]:a&&!o}),"aria-label":o?t.collapse:t.expand,"aria-expanded":o})}}function vJ(t){return(r,n)=>{const i=r.querySelector(`.${t}-container`);let o=n;if(i){const a=getComputedStyle(i),s=parseInt(a.borderLeftWidth,10),l=parseInt(a.borderRightWidth,10);o=n-s-l}return o}}const Ra=(t,e)=>"key"in t&&t.key!==void 0&&t.key!==null?t.key:t.dataIndex?Array.isArray(t.dataIndex)?t.dataIndex.join("."):t.dataIndex:e;function wc(t,e){return e?`${e}-${t}`:`${t}`}const qp=(t,e)=>typeof t=="function"?t(e):t,pJ=(t,e)=>{const r=qp(t,e);return Object.prototype.toString.call(r)==="[object Object]"?"":r};function gJ(t){const e=d.useRef(t),r=OM();return[()=>e.current,n=>{e.current=n,r()}]}var mJ=function(e){var r=e.dropPosition,n=e.dropLevelOffset,i=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(r){case-1:o.top=0,o.left=-n*i;break;case 1:o.bottom=0,o.left=-n*i;break;case 0:o.bottom=0,o.left=i;break}return de.createElement("div",{style:o})};function nA(t){if(t==null)throw new TypeError("Cannot destructure "+t)}function yJ(t,e){var r=d.useState(!1),n=le(r,2),i=n[0],o=n[1];Lt(function(){if(i)return t(),function(){e()}},[i]),Lt(function(){return o(!0),function(){o(!1)}},[])}var bJ=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],$J=d.forwardRef(function(t,e){var r=t.className,n=t.style,i=t.motion,o=t.motionNodes,a=t.motionType,s=t.onMotionStart,l=t.onMotionEnd,c=t.active,u=t.treeNodeRequiredProps,f=mt(t,bJ),h=d.useState(!0),v=le(h,2),g=v[0],m=v[1],p=d.useContext(Mw),y=p.prefixCls,b=o&&a!=="hide";Lt(function(){o&&b!==g&&m(b)},[o]);var $=function(){o&&s()},S=d.useRef(!1),w=function(){o&&!S.current&&(S.current=!0,l())};yJ($,w);var C=function(O){b===O&&w()};return o?d.createElement(ka,Re({ref:e,visible:g},i,{motionAppear:a==="show",onVisibleChanged:C}),function(E,O){var x=E.className,I=E.style;return d.createElement("div",{ref:O,className:ae("".concat(y,"-treenode-motion"),x),style:I},o.map(function(T){var N=Object.assign({},(nA(T.data),T.data)),P=T.title,_=T.key,R=T.isStart,M=T.isEnd;delete N.children;var D=Su(_,u);return d.createElement(Qu,Re({},N,D,{title:P,active:c,data:T.data,key:_,isStart:R,isEnd:M}))}))}):d.createElement(Qu,Re({domRef:e,className:r,style:n},f,{active:c}))});function wJ(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t.length,n=e.length;if(Math.abs(r-n)!==1)return{add:!1,key:null};function i(o,a){var s=new Map;o.forEach(function(c){s.set(c,!0)});var l=a.filter(function(c){return!s.has(c)});return l.length===1?l[0]:null}return r<n?{add:!0,key:i(t,e)}:{add:!1,key:i(e,t)}}function XE(t,e,r){var n=t.findIndex(function(s){return s.key===r}),i=t[n+1],o=e.findIndex(function(s){return s.key===r});if(i){var a=e.findIndex(function(s){return s.key===i.key});return e.slice(o+1,a)}return e.slice(o+1)}var SJ=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],YE={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},CJ=function(){},ws="RC_TREE_MOTION_".concat(Math.random()),d1={key:ws},iA={key:ws,level:0,index:0,pos:"0",node:d1,nodes:[d1]},JE={parent:null,children:[],pos:iA.pos,data:d1,title:null,key:ws,isStart:[],isEnd:[]};function ZE(t,e,r,n){return e===!1||!r?t:t.slice(0,Math.ceil(r/n)+1)}function QE(t){var e=t.key,r=t.pos;return Pd(e,r)}function xJ(t){for(var e=String(t.data.key),r=t;r.parent;)r=r.parent,e="".concat(r.data.key," > ").concat(e);return e}var EJ=d.forwardRef(function(t,e){var r=t.prefixCls,n=t.data;t.selectable,t.checkable;var i=t.expandedKeys,o=t.selectedKeys,a=t.checkedKeys,s=t.loadedKeys,l=t.loadingKeys,c=t.halfCheckedKeys,u=t.keyEntities,f=t.disabled,h=t.dragging,v=t.dragOverNodeKey,g=t.dropPosition,m=t.motion,p=t.height,y=t.itemHeight,b=t.virtual,$=t.scrollWidth,S=t.focusable,w=t.activeItem,C=t.focused,E=t.tabIndex,O=t.onKeyDown,x=t.onFocus,I=t.onBlur,T=t.onActiveChange,N=t.onListChangeStart,P=t.onListChangeEnd,_=mt(t,SJ),R=d.useRef(null),M=d.useRef(null);d.useImperativeHandle(e,function(){return{scrollTo:function(ye){R.current.scrollTo(ye)},getIndentWidth:function(){return M.current.offsetWidth}}});var D=d.useState(i),j=le(D,2),k=j[0],V=j[1],G=d.useState(n),W=le(G,2),Y=W[0],q=W[1],J=d.useState(n),oe=le(J,2),ie=oe[0],te=oe[1],z=d.useState([]),K=le(z,2),B=K[0],F=K[1],U=d.useState(null),Z=le(U,2),ee=Z[0],Q=Z[1],ce=d.useRef(n);ce.current=n;function me(){var ve=ce.current;q(ve),te(ve),F([]),Q(null),P()}Lt(function(){V(i);var ve=wJ(k,i);if(ve.key!==null)if(ve.add){var ye=Y.findIndex(function(pe){var $e=pe.key;return $e===ve.key}),xe=ZE(XE(Y,n,ve.key),b,p,y),ge=Y.slice();ge.splice(ye+1,0,JE),te(ge),F(xe),Q("show")}else{var ne=n.findIndex(function(pe){var $e=pe.key;return $e===ve.key}),X=ZE(XE(n,Y,ve.key),b,p,y),fe=n.slice();fe.splice(ne+1,0,JE),te(fe),F(X),Q("hide")}else Y!==n&&(q(n),te(n))},[i,n]),d.useEffect(function(){h||me()},[h]);var Te=m?ie:n,_e={expandedKeys:i,selectedKeys:o,loadedKeys:s,loadingKeys:l,checkedKeys:a,halfCheckedKeys:c,dragOverNodeKey:v,dropPosition:g,keyEntities:u};return d.createElement(d.Fragment,null,C&&w&&d.createElement("span",{style:YE,"aria-live":"assertive"},xJ(w)),d.createElement("div",null,d.createElement("input",{style:YE,disabled:S===!1||f,tabIndex:S!==!1?E:null,onKeyDown:O,onFocus:x,onBlur:I,value:"",onChange:CJ,"aria-label":"for screen reader"})),d.createElement("div",{className:"".concat(r,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},d.createElement("div",{className:"".concat(r,"-indent")},d.createElement("div",{ref:M,className:"".concat(r,"-indent-unit")}))),d.createElement(Bp,Re({},_,{data:Te,itemKey:QE,height:p,fullHeight:!1,virtual:b,itemHeight:y,scrollWidth:$,prefixCls:"".concat(r,"-list"),ref:R,role:"tree",onVisibleChange:function(ye){ye.every(function(xe){return QE(xe)!==ws})&&me()}}),function(ve){var ye=ve.pos,xe=Object.assign({},(nA(ve.data),ve.data)),ge=ve.title,ne=ve.key,X=ve.isStart,fe=ve.isEnd,pe=Pd(ne,ye);delete xe.key,delete xe.children;var $e=Su(pe,_e);return d.createElement($J,Re({},xe,$e,{title:ge,active:!!w&&ne===w.key,pos:ye,data:ve.data,isStart:X,isEnd:fe,motion:m,motionNodes:ne===ws?B:null,motionType:ee,onMotionStart:N,onMotionEnd:me,treeNodeRequiredProps:_e,onMouseMove:function(){T(null)}}))}))}),OJ=10,Aw=function(t){xo(r,t);var e=Eo(r);function r(){var n;kr(this,r);for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return n=e.call.apply(e,[this].concat(o)),A(Ke(n),"destroyed",!1),A(Ke(n),"delayedDragEnterLogic",void 0),A(Ke(n),"loadingRetryTimes",{}),A(Ke(n),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:Xl()}),A(Ke(n),"dragStartMousePosition",null),A(Ke(n),"dragNodeProps",null),A(Ke(n),"currentMouseOverDroppableNodeKey",null),A(Ke(n),"listRef",d.createRef()),A(Ke(n),"onNodeDragStart",function(s,l){var c=n.state,u=c.expandedKeys,f=c.keyEntities,h=n.props.onDragStart,v=l.eventKey;n.dragNodeProps=l,n.dragStartMousePosition={x:s.clientX,y:s.clientY};var g=uo(u,v);n.setState({draggingNodeKey:v,dragChildrenKeys:aJ(v,f),indent:n.listRef.current.getIndentWidth()}),n.setExpandedKeys(g),window.addEventListener("dragend",n.onWindowDragEnd),h?.({event:s,node:Vr(l)})}),A(Ke(n),"onNodeDragEnter",function(s,l){var c=n.state,u=c.expandedKeys,f=c.keyEntities,h=c.dragChildrenKeys,v=c.flattenNodes,g=c.indent,m=n.props,p=m.onDragEnter,y=m.onExpand,b=m.allowDrop,$=m.direction,S=l.pos,w=l.eventKey;if(n.currentMouseOverDroppableNodeKey!==w&&(n.currentMouseOverDroppableNodeKey=w),!n.dragNodeProps){n.resetDragState();return}var C=UE(s,n.dragNodeProps,l,g,n.dragStartMousePosition,b,v,f,u,$),E=C.dropPosition,O=C.dropLevelOffset,x=C.dropTargetKey,I=C.dropContainerKey,T=C.dropTargetPos,N=C.dropAllowed,P=C.dragOverNodeKey;if(h.includes(x)||!N){n.resetDragState();return}if(n.delayedDragEnterLogic||(n.delayedDragEnterLogic={}),Object.keys(n.delayedDragEnterLogic).forEach(function(_){clearTimeout(n.delayedDragEnterLogic[_])}),n.dragNodeProps.eventKey!==l.eventKey&&(s.persist(),n.delayedDragEnterLogic[S]=window.setTimeout(function(){if(n.state.draggingNodeKey!==null){var _=Oe(u),R=Jn(f,l.eventKey);R&&(R.children||[]).length&&(_=Ro(u,l.eventKey)),n.props.hasOwnProperty("expandedKeys")||n.setExpandedKeys(_),y?.(_,{node:Vr(l),expanded:!0,nativeEvent:s.nativeEvent})}},800)),n.dragNodeProps.eventKey===x&&O===0){n.resetDragState();return}n.setState({dragOverNodeKey:P,dropPosition:E,dropLevelOffset:O,dropTargetKey:x,dropContainerKey:I,dropTargetPos:T,dropAllowed:N}),p?.({event:s,node:Vr(l),expandedKeys:u})}),A(Ke(n),"onNodeDragOver",function(s,l){var c=n.state,u=c.dragChildrenKeys,f=c.flattenNodes,h=c.keyEntities,v=c.expandedKeys,g=c.indent,m=n.props,p=m.onDragOver,y=m.allowDrop,b=m.direction;if(n.dragNodeProps){var $=UE(s,n.dragNodeProps,l,g,n.dragStartMousePosition,y,f,h,v,b),S=$.dropPosition,w=$.dropLevelOffset,C=$.dropTargetKey,E=$.dropContainerKey,O=$.dropTargetPos,x=$.dropAllowed,I=$.dragOverNodeKey;u.includes(C)||!x||(n.dragNodeProps.eventKey===C&&w===0?n.state.dropPosition===null&&n.state.dropLevelOffset===null&&n.state.dropTargetKey===null&&n.state.dropContainerKey===null&&n.state.dropTargetPos===null&&n.state.dropAllowed===!1&&n.state.dragOverNodeKey===null||n.resetDragState():S===n.state.dropPosition&&w===n.state.dropLevelOffset&&C===n.state.dropTargetKey&&E===n.state.dropContainerKey&&O===n.state.dropTargetPos&&x===n.state.dropAllowed&&I===n.state.dragOverNodeKey||n.setState({dropPosition:S,dropLevelOffset:w,dropTargetKey:C,dropContainerKey:E,dropTargetPos:O,dropAllowed:x,dragOverNodeKey:I}),p?.({event:s,node:Vr(l)}))}}),A(Ke(n),"onNodeDragLeave",function(s,l){n.currentMouseOverDroppableNodeKey===l.eventKey&&!s.currentTarget.contains(s.relatedTarget)&&(n.resetDragState(),n.currentMouseOverDroppableNodeKey=null);var c=n.props.onDragLeave;c?.({event:s,node:Vr(l)})}),A(Ke(n),"onWindowDragEnd",function(s){n.onNodeDragEnd(s,null,!0),window.removeEventListener("dragend",n.onWindowDragEnd)}),A(Ke(n),"onNodeDragEnd",function(s,l){var c=n.props.onDragEnd;n.setState({dragOverNodeKey:null}),n.cleanDragState(),c?.({event:s,node:Vr(l)}),n.dragNodeProps=null,window.removeEventListener("dragend",n.onWindowDragEnd)}),A(Ke(n),"onNodeDrop",function(s,l){var c,u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=n.state,h=f.dragChildrenKeys,v=f.dropPosition,g=f.dropTargetKey,m=f.dropTargetPos,p=f.dropAllowed;if(p){var y=n.props.onDrop;if(n.setState({dragOverNodeKey:null}),n.cleanDragState(),g!==null){var b=L(L({},Su(g,n.getTreeNodeRequiredProps())),{},{active:((c=n.getActiveItem())===null||c===void 0?void 0:c.key)===g,data:Jn(n.state.keyEntities,g).node}),$=h.includes(g);gr(!$,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var S=Dw(m),w={event:s,node:Vr(b),dragNode:n.dragNodeProps?Vr(n.dragNodeProps):null,dragNodesKeys:[n.dragNodeProps.eventKey].concat(h),dropToGap:v!==0,dropPosition:v+Number(S[S.length-1])};u||y?.(w),n.dragNodeProps=null}}}),A(Ke(n),"cleanDragState",function(){var s=n.state.draggingNodeKey;s!==null&&n.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),n.dragStartMousePosition=null,n.currentMouseOverDroppableNodeKey=null}),A(Ke(n),"triggerExpandActionExpand",function(s,l){var c=n.state,u=c.expandedKeys,f=c.flattenNodes,h=l.expanded,v=l.key,g=l.isLeaf;if(!(g||s.shiftKey||s.metaKey||s.ctrlKey)){var m=f.filter(function(y){return y.key===v})[0],p=Vr(L(L({},Su(v,n.getTreeNodeRequiredProps())),{},{data:m.data}));n.setExpandedKeys(h?uo(u,v):Ro(u,v)),n.onNodeExpand(s,p)}}),A(Ke(n),"onNodeClick",function(s,l){var c=n.props,u=c.onClick,f=c.expandAction;f==="click"&&n.triggerExpandActionExpand(s,l),u?.(s,l)}),A(Ke(n),"onNodeDoubleClick",function(s,l){var c=n.props,u=c.onDoubleClick,f=c.expandAction;f==="doubleClick"&&n.triggerExpandActionExpand(s,l),u?.(s,l)}),A(Ke(n),"onNodeSelect",function(s,l){var c=n.state.selectedKeys,u=n.state,f=u.keyEntities,h=u.fieldNames,v=n.props,g=v.onSelect,m=v.multiple,p=l.selected,y=l[h.key],b=!p;b?m?c=Ro(c,y):c=[y]:c=uo(c,y);var $=c.map(function(S){var w=Jn(f,S);return w?w.node:null}).filter(Boolean);n.setUncontrolledState({selectedKeys:c}),g?.(c,{event:"select",selected:b,node:l,selectedNodes:$,nativeEvent:s.nativeEvent})}),A(Ke(n),"onNodeCheck",function(s,l,c){var u=n.state,f=u.keyEntities,h=u.checkedKeys,v=u.halfCheckedKeys,g=n.props,m=g.checkStrictly,p=g.onCheck,y=l.key,b,$={event:"check",node:l,checked:c,nativeEvent:s.nativeEvent};if(m){var S=c?Ro(h,y):uo(h,y),w=uo(v,y);b={checked:S,halfChecked:w},$.checkedNodes=S.map(function(T){return Jn(f,T)}).filter(Boolean).map(function(T){return T.node}),n.setUncontrolledState({checkedKeys:S})}else{var C=Dl([].concat(Oe(h),[y]),!0,f),E=C.checkedKeys,O=C.halfCheckedKeys;if(!c){var x=new Set(E);x.delete(y);var I=Dl(Array.from(x),{halfCheckedKeys:O},f);E=I.checkedKeys,O=I.halfCheckedKeys}b=E,$.checkedNodes=[],$.checkedNodesPositions=[],$.halfCheckedKeys=O,E.forEach(function(T){var N=Jn(f,T);if(N){var P=N.node,_=N.pos;$.checkedNodes.push(P),$.checkedNodesPositions.push({node:P,pos:_})}}),n.setUncontrolledState({checkedKeys:E},!1,{halfCheckedKeys:O})}p?.(b,$)}),A(Ke(n),"onNodeLoad",function(s){var l,c=s.key,u=n.state.keyEntities,f=Jn(u,c);if(!(f!=null&&(l=f.children)!==null&&l!==void 0&&l.length)){var h=new Promise(function(v,g){n.setState(function(m){var p=m.loadedKeys,y=p===void 0?[]:p,b=m.loadingKeys,$=b===void 0?[]:b,S=n.props,w=S.loadData,C=S.onLoad;if(!w||y.includes(c)||$.includes(c))return null;var E=w(s);return E.then(function(){var O=n.state.loadedKeys,x=Ro(O,c);C?.(x,{event:"load",node:s}),n.setUncontrolledState({loadedKeys:x}),n.setState(function(I){return{loadingKeys:uo(I.loadingKeys,c)}}),v()}).catch(function(O){if(n.setState(function(I){return{loadingKeys:uo(I.loadingKeys,c)}}),n.loadingRetryTimes[c]=(n.loadingRetryTimes[c]||0)+1,n.loadingRetryTimes[c]>=OJ){var x=n.state.loadedKeys;gr(!1,"Retry for `loadData` many times but still failed. No more retry."),n.setUncontrolledState({loadedKeys:Ro(x,c)}),v()}g(O)}),{loadingKeys:Ro($,c)}})});return h.catch(function(){}),h}}),A(Ke(n),"onNodeMouseEnter",function(s,l){var c=n.props.onMouseEnter;c?.({event:s,node:l})}),A(Ke(n),"onNodeMouseLeave",function(s,l){var c=n.props.onMouseLeave;c?.({event:s,node:l})}),A(Ke(n),"onNodeContextMenu",function(s,l){var c=n.props.onRightClick;c&&(s.preventDefault(),c({event:s,node:l}))}),A(Ke(n),"onFocus",function(){var s=n.props.onFocus;n.setState({focused:!0});for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];s?.apply(void 0,c)}),A(Ke(n),"onBlur",function(){var s=n.props.onBlur;n.setState({focused:!1}),n.onActiveChange(null);for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];s?.apply(void 0,c)}),A(Ke(n),"getTreeNodeRequiredProps",function(){var s=n.state,l=s.expandedKeys,c=s.selectedKeys,u=s.loadedKeys,f=s.loadingKeys,h=s.checkedKeys,v=s.halfCheckedKeys,g=s.dragOverNodeKey,m=s.dropPosition,p=s.keyEntities;return{expandedKeys:l||[],selectedKeys:c||[],loadedKeys:u||[],loadingKeys:f||[],checkedKeys:h||[],halfCheckedKeys:v||[],dragOverNodeKey:g,dropPosition:m,keyEntities:p}}),A(Ke(n),"setExpandedKeys",function(s){var l=n.state,c=l.treeData,u=l.fieldNames,f=Om(c,s,u);n.setUncontrolledState({expandedKeys:s,flattenNodes:f},!0)}),A(Ke(n),"onNodeExpand",function(s,l){var c=n.state.expandedKeys,u=n.state,f=u.listChanging,h=u.fieldNames,v=n.props,g=v.onExpand,m=v.loadData,p=l.expanded,y=l[h.key];if(!f){var b=c.includes(y),$=!p;if(gr(p&&b||!p&&!b,"Expand state not sync with index check"),c=$?Ro(c,y):uo(c,y),n.setExpandedKeys(c),g?.(c,{node:l,expanded:$,nativeEvent:s.nativeEvent}),$&&m){var S=n.onNodeLoad(l);S&&S.then(function(){var w=Om(n.state.treeData,c,h);n.setUncontrolledState({flattenNodes:w})}).catch(function(){var w=n.state.expandedKeys,C=uo(w,y);n.setExpandedKeys(C)})}}}),A(Ke(n),"onListChangeStart",function(){n.setUncontrolledState({listChanging:!0})}),A(Ke(n),"onListChangeEnd",function(){setTimeout(function(){n.setUncontrolledState({listChanging:!1})})}),A(Ke(n),"onActiveChange",function(s){var l=n.state.activeKey,c=n.props,u=c.onActiveChange,f=c.itemScrollOffset,h=f===void 0?0:f;l!==s&&(n.setState({activeKey:s}),s!==null&&n.scrollTo({key:s,offset:h}),u?.(s))}),A(Ke(n),"getActiveItem",function(){var s=n.state,l=s.activeKey,c=s.flattenNodes;return l===null?null:c.find(function(u){var f=u.key;return f===l})||null}),A(Ke(n),"offsetActiveKey",function(s){var l=n.state,c=l.flattenNodes,u=l.activeKey,f=c.findIndex(function(g){var m=g.key;return m===u});f===-1&&s<0&&(f=c.length),f=(f+s+c.length)%c.length;var h=c[f];if(h){var v=h.key;n.onActiveChange(v)}else n.onActiveChange(null)}),A(Ke(n),"onKeyDown",function(s){var l=n.state,c=l.activeKey,u=l.expandedKeys,f=l.checkedKeys,h=l.fieldNames,v=n.props,g=v.onKeyDown,m=v.checkable,p=v.selectable;switch(s.which){case Ze.UP:{n.offsetActiveKey(-1),s.preventDefault();break}case Ze.DOWN:{n.offsetActiveKey(1),s.preventDefault();break}}var y=n.getActiveItem();if(y&&y.data){var b=n.getTreeNodeRequiredProps(),$=y.data.isLeaf===!1||!!(y.data[h.children]||[]).length,S=Vr(L(L({},Su(c,b)),{},{data:y.data,active:!0}));switch(s.which){case Ze.LEFT:{$&&u.includes(c)?n.onNodeExpand({},S):y.parent&&n.onActiveChange(y.parent.key),s.preventDefault();break}case Ze.RIGHT:{$&&!u.includes(c)?n.onNodeExpand({},S):y.children&&y.children.length&&n.onActiveChange(y.children[0].key),s.preventDefault();break}case Ze.ENTER:case Ze.SPACE:{m&&!S.disabled&&S.checkable!==!1&&!S.disableCheckbox?n.onNodeCheck({},S,!f.includes(c)):!m&&p&&!S.disabled&&S.selectable!==!1&&n.onNodeSelect({},S);break}}}g?.(s)}),A(Ke(n),"setUncontrolledState",function(s){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!n.destroyed){var u=!1,f=!0,h={};Object.keys(s).forEach(function(v){if(n.props.hasOwnProperty(v)){f=!1;return}u=!0,h[v]=s[v]}),u&&(!l||f)&&n.setState(L(L({},h),c))}}),A(Ke(n),"scrollTo",function(s){n.listRef.current.scrollTo(s)}),n}return Br(r,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var i=this.props,o=i.activeKey,a=i.itemScrollOffset,s=a===void 0?0:a;o!==void 0&&o!==this.state.activeKey&&(this.setState({activeKey:o}),o!==null&&this.scrollTo({key:o,offset:s}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var i=this.state,o=i.focused,a=i.flattenNodes,s=i.keyEntities,l=i.draggingNodeKey,c=i.activeKey,u=i.dropLevelOffset,f=i.dropContainerKey,h=i.dropTargetKey,v=i.dropPosition,g=i.dragOverNodeKey,m=i.indent,p=this.props,y=p.prefixCls,b=p.className,$=p.style,S=p.showLine,w=p.focusable,C=p.tabIndex,E=C===void 0?0:C,O=p.selectable,x=p.showIcon,I=p.icon,T=p.switcherIcon,N=p.draggable,P=p.checkable,_=p.checkStrictly,R=p.disabled,M=p.motion,D=p.loadData,j=p.filterTreeNode,k=p.height,V=p.itemHeight,G=p.scrollWidth,W=p.virtual,Y=p.titleRender,q=p.dropIndicatorRender,J=p.onContextMenu,oe=p.onScroll,ie=p.direction,te=p.rootClassName,z=p.rootStyle,K=Zi(this.props,{aria:!0,data:!0}),B;N&&(tt(N)==="object"?B=N:typeof N=="function"?B={nodeDraggable:N}:B={});var F={prefixCls:y,selectable:O,showIcon:x,icon:I,switcherIcon:T,draggable:B,draggingNodeKey:l,checkable:P,checkStrictly:_,disabled:R,keyEntities:s,dropLevelOffset:u,dropContainerKey:f,dropTargetKey:h,dropPosition:v,dragOverNodeKey:g,indent:m,direction:ie,dropIndicatorRender:q,loadData:D,filterTreeNode:j,titleRender:Y,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return d.createElement(Mw.Provider,{value:F},d.createElement("div",{className:ae(y,b,te,A(A(A({},"".concat(y,"-show-line"),S),"".concat(y,"-focused"),o),"".concat(y,"-active-focused"),c!==null)),style:z},d.createElement(EJ,Re({ref:this.listRef,prefixCls:y,style:$,data:a,disabled:R,selectable:O,checkable:!!P,motion:M,dragging:l!==null,height:k,itemHeight:V,virtual:W,focusable:w,focused:o,tabIndex:E,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:J,onScroll:oe,scrollWidth:G},this.getTreeNodeRequiredProps(),K))))}}],[{key:"getDerivedStateFromProps",value:function(i,o){var a=o.prevProps,s={prevProps:i};function l(E){return!a&&i.hasOwnProperty(E)||a&&a[E]!==i[E]}var c,u=o.fieldNames;if(l("fieldNames")&&(u=Xl(i.fieldNames),s.fieldNames=u),l("treeData")?c=i.treeData:l("children")&&(gr(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),c=lD(i.children)),c){s.treeData=c;var f=Ew(c,{fieldNames:u});s.keyEntities=L(A({},ws,iA),f.keyEntities)}var h=s.keyEntities||o.keyEntities;if(l("expandedKeys")||a&&l("autoExpandParent"))s.expandedKeys=i.autoExpandParent||!a&&i.defaultExpandParent?s1(i.expandedKeys,h):i.expandedKeys;else if(!a&&i.defaultExpandAll){var v=L({},h);delete v[ws];var g=[];Object.keys(v).forEach(function(E){var O=v[E];O.children&&O.children.length&&g.push(O.key)}),s.expandedKeys=g}else!a&&i.defaultExpandedKeys&&(s.expandedKeys=i.autoExpandParent||i.defaultExpandParent?s1(i.defaultExpandedKeys,h):i.defaultExpandedKeys);if(s.expandedKeys||delete s.expandedKeys,c||s.expandedKeys){var m=Om(c||o.treeData,s.expandedKeys||o.expandedKeys,u);s.flattenNodes=m}if(i.selectable&&(l("selectedKeys")?s.selectedKeys=qE(i.selectedKeys,i):!a&&i.defaultSelectedKeys&&(s.selectedKeys=qE(i.defaultSelectedKeys,i))),i.checkable){var p;if(l("checkedKeys")?p=Mm(i.checkedKeys)||{}:!a&&i.defaultCheckedKeys?p=Mm(i.defaultCheckedKeys)||{}:c&&(p=Mm(i.checkedKeys)||{checkedKeys:o.checkedKeys,halfCheckedKeys:o.halfCheckedKeys}),p){var y=p,b=y.checkedKeys,$=b===void 0?[]:b,S=y.halfCheckedKeys,w=S===void 0?[]:S;if(!i.checkStrictly){var C=Dl($,!0,h);$=C.checkedKeys,w=C.halfCheckedKeys}s.checkedKeys=$,s.halfCheckedKeys=w}}return l("loadedKeys")&&(s.loadedKeys=i.loadedKeys),s}}]),r}(d.Component);A(Aw,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:mJ,allowDrop:function(){return!0},expandAction:!1});A(Aw,"TreeNode",Qu);const IJ=({treeCls:t,treeNodeCls:e,directoryNodeSelectedBg:r,directoryNodeSelectedColor:n,motionDurationMid:i,borderRadius:o,controlItemBgHover:a})=>({[`${t}${t}-directory ${e}`]:{[`${t}-node-content-wrapper`]:{position:"static",[`&:has(${t}-drop-indicator)`]:{position:"relative"},[`> *:not(${t}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${i}`,content:'""',borderRadius:o},"&:hover:before":{background:a}},[`${t}-switcher, ${t}-checkbox, ${t}-draggable-icon`]:{zIndex:1},"&-selected":{background:r,borderRadius:o,[`${t}-switcher, ${t}-draggable-icon`]:{color:n},[`${t}-node-content-wrapper`]:{color:n,background:"transparent","&:before, &:hover:before":{background:r}}}}}),TJ=new Yt("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),_J=(t,e)=>({[`.${t}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${e.motionDurationSlow}`}}}),PJ=(t,e)=>({[`.${t}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:e.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${se(e.lineWidthBold)} solid ${e.colorPrimary}`,borderRadius:"50%",content:'""'}}}),RJ=(t,e)=>{const{treeCls:r,treeNodeCls:n,treeNodePadding:i,titleHeight:o,indentSize:a,nodeSelectedBg:s,nodeHoverBg:l,colorTextQuaternary:c,controlItemBgActiveDisabled:u}=e;return{[r]:Object.assign(Object.assign({},Ar(e)),{"--rc-virtual-list-scrollbar-bg":e.colorSplit,background:e.colorBgContainer,borderRadius:e.borderRadius,transition:`background-color ${e.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${r}-rtl ${r}-switcher_close ${r}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`&-focused:not(:hover):not(${r}-active-focused)`]:Object.assign({},Pa(e)),[`${r}-list-holder-inner`]:{alignItems:"flex-start"},[`&${r}-block-node`]:{[`${r}-list-holder-inner`]:{alignItems:"stretch",[`${r}-node-content-wrapper`]:{flex:"auto"},[`${n}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${e.colorPrimary}`,opacity:0,animationName:TJ,animationDuration:e.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:e.borderRadius}}},[n]:{display:"flex",alignItems:"flex-start",marginBottom:i,lineHeight:se(o),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:i},[`&-disabled ${r}-node-content-wrapper`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${r}-checkbox-disabled + ${r}-node-selected,&${n}-disabled${n}-selected ${r}-node-content-wrapper`]:{backgroundColor:u},[`${r}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${n}-disabled)`]:{[`${r}-node-content-wrapper`]:{"&:hover":{color:e.nodeHoverColor}}},[`&-active ${r}-node-content-wrapper`]:{background:e.controlItemBgHover},[`&:not(${n}-disabled).filter-node ${r}-title`]:{color:e.colorPrimary,fontWeight:e.fontWeightStrong},"&-draggable":{cursor:"grab",[`${r}-draggable-icon`]:{flexShrink:0,width:o,textAlign:"center",visibility:"visible",color:c},[`&${n}-disabled ${r}-draggable-icon`]:{visibility:"hidden"}}},[`${r}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:a}},[`${r}-draggable-icon`]:{visibility:"hidden"},[`${r}-switcher, ${r}-checkbox`]:{marginInlineEnd:e.calc(e.calc(o).sub(e.controlInteractiveSize)).div(2).equal()},[`${r}-switcher`]:Object.assign(Object.assign({},_J(t,e)),{position:"relative",flex:"none",alignSelf:"stretch",width:o,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${e.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:o,height:o,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`},[`&:not(${r}-switcher-noop):hover:before`]:{backgroundColor:e.colorBgTextHover},[`&_close ${r}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:e.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(o).div(2).equal(),bottom:e.calc(i).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:e.calc(e.calc(o).div(2).equal()).mul(.8).equal(),height:e.calc(o).div(2).equal(),borderBottom:`1px solid ${e.colorBorder}`,content:'""'}}}),[`${r}-node-content-wrapper`]:Object.assign(Object.assign({position:"relative",minHeight:o,paddingBlock:0,paddingInline:e.paddingXS,background:"transparent",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`},PJ(t,e)),{"&:hover":{backgroundColor:l},[`&${r}-node-selected`]:{color:e.nodeSelectedColor,backgroundColor:s},[`${r}-iconEle`]:{display:"inline-block",width:o,height:o,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}}),[`${r}-unselectable ${r}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${e.colorPrimary}`},"&-show-line":{[`${r}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:e.calc(o).div(2).equal(),bottom:e.calc(i).mul(-1).equal(),borderInlineEnd:`1px solid ${e.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${r}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${n}-leaf-last ${r}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${se(e.calc(o).div(2).equal())} !important`}})}},NJ=(t,e,r=!0)=>{const n=`.${t}`,i=`${n}-treenode`,o=e.calc(e.paddingXS).div(2).equal(),a=Xt(e,{treeCls:n,treeNodeCls:i,treeNodePadding:o});return[RJ(t,a),r&&IJ(a)].filter(Boolean)},MJ=t=>{const{controlHeightSM:e,controlItemBgHover:r,controlItemBgActive:n}=t,i=e;return{titleHeight:i,indentSize:i,nodeHoverBg:r,nodeHoverColor:t.colorText,nodeSelectedBg:n,nodeSelectedColor:t.colorText}},DJ=t=>{const{colorTextLightSolid:e,colorPrimary:r}=t;return Object.assign(Object.assign({},MJ(t)),{directoryNodeSelectedColor:e,directoryNodeSelectedBg:r})},AJ=Gr("Tree",(t,{prefixCls:e})=>[{[t.componentCls]:uD(`${e}-checkbox`,t)},NJ(e,t),U$(t)],DJ),eO=4;function jJ(t){const{dropPosition:e,dropLevelOffset:r,prefixCls:n,indent:i,direction:o="ltr"}=t,a=o==="ltr"?"left":"right",s=o==="ltr"?"right":"left",l={[a]:-r*i+eO,[s]:0};switch(e){case-1:l.top=-3;break;case 1:l.bottom=-3;break;default:l.bottom=-3,l[a]=i+eO;break}return de.createElement("div",{style:l,className:`${n}-drop-indicator`})}const kJ=t=>{var e,r;const{prefixCls:n,switcherIcon:i,treeNodeProps:o,showLine:a,switcherLoadingIcon:s}=t,{isLeaf:l,expanded:c,loading:u}=o;if(u)return d.isValidElement(s)?s:d.createElement(Ep,{className:`${n}-switcher-loading-icon`});let f;if(a&&typeof a=="object"&&(f=a.showLeafIcon),l){if(!a)return null;if(typeof f!="boolean"&&f){const g=typeof f=="function"?f(o):f,m=`${n}-switcher-line-custom-icon`;return d.isValidElement(g)?gi(g,{className:ae((e=g.props)===null||e===void 0?void 0:e.className,m)}):g}return f?d.createElement(FD,{className:`${n}-switcher-line-icon`}):d.createElement("span",{className:`${n}-switcher-leaf-line`})}const h=`${n}-switcher-icon`,v=typeof i=="function"?i(o):i;return d.isValidElement(v)?gi(v,{className:ae((r=v.props)===null||r===void 0?void 0:r.className,h)}):v!==void 0?v:a?c?d.createElement(zX,{className:`${n}-switcher-line-icon`}):d.createElement(WX,{className:`${n}-switcher-line-icon`}):d.createElement(yX,{className:h})},oA=de.forwardRef((t,e)=>{var r;const{getPrefixCls:n,direction:i,virtual:o,tree:a}=de.useContext(Dt),{prefixCls:s,className:l,showIcon:c=!1,showLine:u,switcherIcon:f,switcherLoadingIcon:h,blockNode:v=!1,children:g,checkable:m=!1,selectable:p=!0,draggable:y,motion:b,style:$}=t,S=n("tree",s),w=n(),C=b??Object.assign(Object.assign({},xv(w)),{motionAppear:!1}),E=Object.assign(Object.assign({},t),{checkable:m,selectable:p,showIcon:c,motion:C,blockNode:v,showLine:!!u,dropIndicatorRender:jJ}),[O,x,I]=AJ(S),[,T]=_n(),N=T.paddingXS/2+(((r=T.Tree)===null||r===void 0?void 0:r.titleHeight)||T.controlHeightSM),P=de.useMemo(()=>{if(!y)return!1;let R={};switch(typeof y){case"function":R.nodeDraggable=y;break;case"object":R=Object.assign({},y);break}return R.icon!==!1&&(R.icon=R.icon||de.createElement(BX,null)),R},[y]),_=R=>de.createElement(kJ,{prefixCls:S,switcherIcon:f,switcherLoadingIcon:h,treeNodeProps:R,showLine:u});return O(de.createElement(Aw,Object.assign({itemHeight:N,ref:e,virtual:o},E,{style:Object.assign(Object.assign({},a?.style),$),prefixCls:S,className:ae({[`${S}-icon-hide`]:!c,[`${S}-block-node`]:v,[`${S}-unselectable`]:!p,[`${S}-rtl`]:i==="rtl"},a?.className,l,x,I),direction:i,checkable:m&&de.createElement("span",{className:`${S}-checkbox-inner`}),selectable:p,switcherIcon:_,draggable:P}),g))}),tO=0,Dm=1,rO=2;function jw(t,e,r){const{key:n,children:i}=r;function o(a){const s=a[n],l=a[i];e(s,a)!==!1&&jw(l||[],e,r)}t.forEach(o)}function BJ({treeData:t,expandedKeys:e,startKey:r,endKey:n,fieldNames:i}){const o=[];let a=tO;if(r&&r===n)return[r];if(!r||!n)return[];function s(l){return l===r||l===n}return jw(t,l=>{if(a===rO)return!1;if(s(l)){if(o.push(l),a===tO)a=Dm;else if(a===Dm)return a=rO,!1}else a===Dm&&o.push(l);return e.includes(l)},Xl(i)),o}function Am(t,e,r){const n=Oe(e),i=[];return jw(t,(o,a)=>{const s=n.indexOf(o);return s!==-1&&(i.push(a),n.splice(s,1)),!!n.length},Xl(r)),i}var nO=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};function FJ(t){const{isLeaf:e,expanded:r}=t;return e?d.createElement(FD,null):r?d.createElement(NX,null):d.createElement(AX,null)}function iO({treeData:t,children:e}){return t||lD(e)}const LJ=(t,e)=>{var{defaultExpandAll:r,defaultExpandParent:n,defaultExpandedKeys:i}=t,o=nO(t,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const a=d.useRef(null),s=d.useRef(null),l=()=>{const{keyEntities:O}=Ew(iO(o));let x;return r?x=Object.keys(O):n?x=s1(o.expandedKeys||i||[],O):x=o.expandedKeys||i||[],x},[c,u]=d.useState(o.selectedKeys||o.defaultSelectedKeys||[]),[f,h]=d.useState(()=>l());d.useEffect(()=>{"selectedKeys"in o&&u(o.selectedKeys)},[o.selectedKeys]),d.useEffect(()=>{"expandedKeys"in o&&h(o.expandedKeys)},[o.expandedKeys]);const v=(O,x)=>{var I;return"expandedKeys"in o||h(O),(I=o.onExpand)===null||I===void 0?void 0:I.call(o,O,x)},g=(O,x)=>{var I;const{multiple:T,fieldNames:N}=o,{node:P,nativeEvent:_}=x,{key:R=""}=P,M=iO(o),D=Object.assign(Object.assign({},x),{selected:!0}),j=_?.ctrlKey||_?.metaKey,k=_?.shiftKey;let V;T&&j?(V=O,a.current=R,s.current=V,D.selectedNodes=Am(M,V,N)):T&&k?(V=Array.from(new Set([].concat(Oe(s.current||[]),Oe(BJ({treeData:M,expandedKeys:f,startKey:R,endKey:a.current,fieldNames:N}))))),D.selectedNodes=Am(M,V,N)):(V=[R],a.current=R,s.current=V,D.selectedNodes=Am(M,V,N)),(I=o.onSelect)===null||I===void 0||I.call(o,V,D),"selectedKeys"in o||u(V)},{getPrefixCls:m,direction:p}=d.useContext(Dt),{prefixCls:y,className:b,showIcon:$=!0,expandAction:S="click"}=o,w=nO(o,["prefixCls","className","showIcon","expandAction"]),C=m("tree",y),E=ae(`${C}-directory`,{[`${C}-directory-rtl`]:p==="rtl"},b);return d.createElement(oA,Object.assign({icon:FJ,ref:e,blockNode:!0},w,{showIcon:$,expandAction:S,prefixCls:C,className:E,expandedKeys:f,selectedKeys:c,onSelect:g,onExpand:v}))},zJ=d.forwardRef(LJ),kw=oA;kw.DirectoryTree=zJ;kw.TreeNode=Qu;const oO=t=>{const{value:e,filterSearch:r,tablePrefixCls:n,locale:i,onChange:o}=t;return r?d.createElement("div",{className:`${n}-filter-dropdown-search`},d.createElement(Rd,{prefix:d.createElement(fw,null),placeholder:i.filterSearchPlaceholder,onChange:o,value:e,htmlSize:1,className:`${n}-filter-dropdown-search-input`})):null},HJ=t=>{const{keyCode:e}=t;e===Ze.ENTER&&t.stopPropagation()},VJ=d.forwardRef((t,e)=>d.createElement("div",{className:t.className,onClick:r=>r.stopPropagation(),onKeyDown:HJ,ref:e},t.children));function Al(t){let e=[];return(t||[]).forEach(({value:r,children:n})=>{e.push(r),n&&(e=[].concat(Oe(e),Oe(Al(n))))}),e}function WJ(t){return t.some(({children:e})=>e)}function aA(t,e){return typeof e=="string"||typeof e=="number"?e?.toString().toLowerCase().includes(t.trim().toLowerCase()):!1}function sA({filters:t,prefixCls:e,filteredKeys:r,filterMultiple:n,searchValue:i,filterSearch:o}){return t.map((a,s)=>{const l=String(a.value);if(a.children)return{key:l||s,label:a.text,popupClassName:`${e}-dropdown-submenu`,children:sA({filters:a.children,prefixCls:e,filteredKeys:r,filterMultiple:n,searchValue:i,filterSearch:o})};const c=n?Yl:Id,u={key:a.value!==void 0?l:s,label:d.createElement(d.Fragment,null,d.createElement(c,{checked:r.includes(l)}),d.createElement("span",null,a.text))};return i.trim()?typeof o=="function"?o(i,a)?u:null:aA(i,a.text)?u:null:u})}function jm(t){return t||[]}const KJ=t=>{var e,r,n,i;const{tablePrefixCls:o,prefixCls:a,column:s,dropdownPrefixCls:l,columnKey:c,filterOnClose:u,filterMultiple:f,filterMode:h="menu",filterSearch:v=!1,filterState:g,triggerFilter:m,locale:p,children:y,getPopupContainer:b,rootClassName:$}=t,{filterResetToDefaultFilteredValue:S,defaultFilteredValue:w,filterDropdownProps:C={},filterDropdownOpen:E,filterDropdownVisible:O,onFilterDropdownVisibleChange:x,onFilterDropdownOpenChange:I}=s,[T,N]=d.useState(!1),P=!!(g&&(!((e=g.filteredKeys)===null||e===void 0)&&e.length||g.forceFiltered)),_=ve=>{var ye;N(ve),(ye=C.onOpenChange)===null||ye===void 0||ye.call(C,ve),I?.(ve),x?.(ve)},R=(i=(n=(r=C.open)!==null&&r!==void 0?r:E)!==null&&n!==void 0?n:O)!==null&&i!==void 0?i:T,M=g?.filteredKeys,[D,j]=gJ(jm(M)),k=({selectedKeys:ve})=>{j(ve)},V=(ve,{node:ye,checked:xe})=>{k(f?{selectedKeys:ve}:{selectedKeys:xe&&ye.key?[ye.key]:[]})};d.useEffect(()=>{T&&k({selectedKeys:jm(M)})},[M]);const[G,W]=d.useState([]),Y=ve=>{W(ve)},[q,J]=d.useState(""),oe=ve=>{const{value:ye}=ve.target;J(ye)};d.useEffect(()=>{T||J("")},[T]);const ie=ve=>{const ye=ve?.length?ve:null;if(ye===null&&(!g||!g.filteredKeys)||So(ye,g?.filteredKeys,!0))return null;m({column:s,key:c,filteredKeys:ye})},te=()=>{_(!1),ie(D())},z=({confirm:ve,closeDropdown:ye}={confirm:!1,closeDropdown:!1})=>{ve&&ie([]),ye&&_(!1),J(""),j(S?(w||[]).map(xe=>String(xe)):[])},K=({closeDropdown:ve}={closeDropdown:!0})=>{ve&&_(!1),ie(D())},B=(ve,ye)=>{ye.source==="trigger"&&(ve&&M!==void 0&&j(jm(M)),_(ve),!ve&&!s.filterDropdown&&u&&te())},F=ae({[`${l}-menu-without-submenu`]:!WJ(s.filters||[])}),U=ve=>{if(ve.target.checked){const ye=Al(s?.filters).map(xe=>String(xe));j(ye)}else j([])},Z=({filters:ve})=>(ve||[]).map((ye,xe)=>{const ge=String(ye.value),ne={title:ye.text,key:ye.value!==void 0?ge:String(xe)};return ye.children&&(ne.children=Z({filters:ye.children})),ne}),ee=ve=>{var ye;return Object.assign(Object.assign({},ve),{text:ve.title,value:ve.key,children:((ye=ve.children)===null||ye===void 0?void 0:ye.map(xe=>ee(xe)))||[]})};let Q;const{direction:ce,renderEmpty:me}=d.useContext(Dt);if(typeof s.filterDropdown=="function")Q=s.filterDropdown({prefixCls:`${l}-custom`,setSelectedKeys:ve=>k({selectedKeys:ve}),selectedKeys:D(),confirm:K,clearFilters:z,filters:s.filters,visible:R,close:()=>{_(!1)}});else if(s.filterDropdown)Q=s.filterDropdown;else{const ve=D()||[],ye=()=>{var ge,ne;const X=(ge=me?.("Table.filter"))!==null&&ge!==void 0?ge:d.createElement(Do,{image:Do.PRESENTED_IMAGE_SIMPLE,description:p.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((s.filters||[]).length===0)return X;if(h==="tree")return d.createElement(d.Fragment,null,d.createElement(oO,{filterSearch:v,value:q,onChange:oe,tablePrefixCls:o,locale:p}),d.createElement("div",{className:`${o}-filter-dropdown-tree`},f?d.createElement(Yl,{checked:ve.length===Al(s.filters).length,indeterminate:ve.length>0&&ve.length<Al(s.filters).length,className:`${o}-filter-dropdown-checkall`,onChange:U},(ne=p?.filterCheckall)!==null&&ne!==void 0?ne:p?.filterCheckAll):null,d.createElement(kw,{checkable:!0,selectable:!1,blockNode:!0,multiple:f,checkStrictly:!f,className:`${l}-menu`,onCheck:V,checkedKeys:ve,selectedKeys:ve,showIcon:!1,treeData:Z({filters:s.filters}),autoExpandParent:!0,defaultExpandAll:!0,filterTreeNode:q.trim()?$e=>typeof v=="function"?v(q,ee($e)):aA(q,$e.title):void 0})));const fe=sA({filters:s.filters||[],filterSearch:v,prefixCls:a,filteredKeys:D(),filterMultiple:f,searchValue:q}),pe=fe.every($e=>$e===null);return d.createElement(d.Fragment,null,d.createElement(oO,{filterSearch:v,value:q,onChange:oe,tablePrefixCls:o,locale:p}),pe?X:d.createElement(mc,{selectable:!0,multiple:f,prefixCls:`${l}-menu`,className:F,onSelect:k,onDeselect:k,selectedKeys:ve,getPopupContainer:b,openKeys:G,onOpenChange:Y,items:fe}))},xe=()=>S?So((w||[]).map(ge=>String(ge)),ve,!0):ve.length===0;Q=d.createElement(d.Fragment,null,ye(),d.createElement("div",{className:`${a}-dropdown-btns`},d.createElement(bs,{type:"link",size:"small",disabled:xe(),onClick:()=>z()},p.filterReset),d.createElement(bs,{type:"primary",size:"small",onClick:te},p.filterConfirm)))}s.filterDropdown&&(Q=d.createElement(XM,{selectable:void 0},Q)),Q=d.createElement(VJ,{className:`${a}-dropdown`},Q);const _e=rM({trigger:["click"],placement:ce==="rtl"?"bottomLeft":"bottomRight",children:(()=>{let ve;return typeof s.filterIcon=="function"?ve=s.filterIcon(P):s.filterIcon?ve=s.filterIcon:ve=d.createElement(_X,null),d.createElement("span",{role:"button",tabIndex:-1,className:ae(`${a}-trigger`,{active:P}),onClick:ye=>{ye.stopPropagation()}},ve)})(),getPopupContainer:b},Object.assign(Object.assign({},C),{rootClassName:ae($,C.rootClassName),open:R,onOpenChange:B,popupRender:()=>typeof C?.dropdownRender=="function"?C.dropdownRender(Q):Q}));return d.createElement("div",{className:`${a}-column`},d.createElement("span",{className:`${o}-column-title`},y),d.createElement(Ow,Object.assign({},_e)))},f1=(t,e,r)=>{let n=[];return(t||[]).forEach((i,o)=>{var a;const s=wc(o,r),l=i.filterDropdown!==void 0;if(i.filters||l||"onFilter"in i)if("filteredValue"in i){let c=i.filteredValue;l||(c=(a=c?.map(String))!==null&&a!==void 0?a:c),n.push({column:i,key:Ra(i,s),filteredKeys:c,forceFiltered:i.filtered})}else n.push({column:i,key:Ra(i,s),filteredKeys:e&&i.defaultFilteredValue?i.defaultFilteredValue:void 0,forceFiltered:i.filtered});"children"in i&&(n=[].concat(Oe(n),Oe(f1(i.children,e,s))))}),n};function lA(t,e,r,n,i,o,a,s,l){return r.map((c,u)=>{const f=wc(u,s),{filterOnClose:h=!0,filterMultiple:v=!0,filterMode:g,filterSearch:m}=c;let p=c;if(p.filters||p.filterDropdown){const y=Ra(p,f),b=n.find(({key:$})=>y===$);p=Object.assign(Object.assign({},p),{title:$=>d.createElement(KJ,{tablePrefixCls:t,prefixCls:`${t}-filter`,dropdownPrefixCls:e,column:p,columnKey:y,filterState:b,filterOnClose:h,filterMultiple:v,filterMode:g,filterSearch:m,triggerFilter:o,locale:i,getPopupContainer:a,rootClassName:l},qp(c.title,$))})}return"children"in p&&(p=Object.assign(Object.assign({},p),{children:lA(t,e,p.children,n,i,o,a,f,l)})),p})}const aO=t=>{const e={};return t.forEach(({key:r,filteredKeys:n,column:i})=>{const o=r,{filters:a,filterDropdown:s}=i;if(s)e[o]=n||null;else if(Array.isArray(n)){const l=Al(a);e[o]=l.filter(c=>n.includes(String(c)))}else e[o]=null}),e},h1=(t,e,r)=>e.reduce((i,o)=>{const{column:{onFilter:a,filters:s},filteredKeys:l}=o;return a&&l&&l.length?i.map(c=>Object.assign({},c)).filter(c=>l.some(u=>{const f=Al(s),h=f.findIndex(g=>String(g)===String(u)),v=h!==-1?f[h]:u;return c[r]&&(c[r]=h1(c[r],e,r)),a(v,c)})):i},t),cA=t=>t.flatMap(e=>"children"in e?[e].concat(Oe(cA(e.children||[]))):[e]),UJ=t=>{const{prefixCls:e,dropdownPrefixCls:r,mergedColumns:n,onFilterChange:i,getPopupContainer:o,locale:a,rootClassName:s}=t;Ms();const l=d.useMemo(()=>cA(n||[]),[n]),[c,u]=d.useState(()=>f1(l,!0)),f=d.useMemo(()=>{const m=f1(l,!1);if(m.length===0)return m;let p=!0;if(m.forEach(({filteredKeys:y})=>{y!==void 0&&(p=!1)}),p){const y=(l||[]).map((b,$)=>Ra(b,wc($)));return c.filter(({key:b})=>y.includes(b)).map(b=>{const $=l[y.findIndex(S=>S===b.key)];return Object.assign(Object.assign({},b),{column:Object.assign(Object.assign({},b.column),$),forceFiltered:$.filtered})})}return m},[l,c]),h=d.useMemo(()=>aO(f),[f]),v=m=>{const p=f.filter(({key:y})=>y!==m.key);p.push(m),u(p),i(aO(p),p)};return[m=>lA(e,r,m,f,a,v,o,void 0,s),f,h]},qJ=(t,e,r)=>{const n=d.useRef({});function i(o){var a;if(!n.current||n.current.data!==t||n.current.childrenColumnName!==e||n.current.getRowKey!==r){let l=function(c){c.forEach((u,f)=>{const h=r(u,f);s.set(h,u),u&&typeof u=="object"&&e in u&&l(u[e]||[])})};const s=new Map;l(t),n.current={data:t,childrenColumnName:e,kvMap:s,getRowKey:r}}return(a=n.current.kvMap)===null||a===void 0?void 0:a.get(o)}return[i]};var GJ=function(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(t);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(t,n[i])&&(r[n[i]]=t[n[i]]);return r};const uA=10;function XJ(t,e){const r={current:t.current,pageSize:t.pageSize};return Object.keys(e&&typeof e=="object"?e:{}).forEach(i=>{const o=t[i];typeof o!="function"&&(r[i]=o)}),r}function YJ(t,e,r){const n=r&&typeof r=="object"?r:{},{total:i=0}=n,o=GJ(n,["total"]),[a,s]=d.useState(()=>({current:"defaultCurrent"in o?o.defaultCurrent:1,pageSize:"defaultPageSize"in o?o.defaultPageSize:uA})),l=rM(a,o,{total:i>0?i:t}),c=Math.ceil((i||t)/l.pageSize);l.current>c&&(l.current=c||1);const u=(h,v)=>{s({current:h??1,pageSize:v||l.pageSize})},f=(h,v)=>{var g;r&&((g=r.onChange)===null||g===void 0||g.call(r,h,v)),u(h,v),e(h,v||l?.pageSize)};return r===!1?[{},()=>{}]:[Object.assign(Object.assign({},l),{onChange:f}),u]}const Yh="ascend",km="descend",jv=t=>typeof t.sorter=="object"&&typeof t.sorter.multiple=="number"?t.sorter.multiple:!1,sO=t=>typeof t=="function"?t:t&&typeof t=="object"&&t.compare?t.compare:!1,JJ=(t,e)=>e?t[t.indexOf(e)+1]:t[0],v1=(t,e,r)=>{let n=[];const i=(o,a)=>{n.push({column:o,key:Ra(o,a),multiplePriority:jv(o),sortOrder:o.sortOrder})};return(t||[]).forEach((o,a)=>{const s=wc(a,r);o.children?("sortOrder"in o&&i(o,s),n=[].concat(Oe(n),Oe(v1(o.children,e,s)))):o.sorter&&("sortOrder"in o?i(o,s):e&&o.defaultSortOrder&&n.push({column:o,key:Ra(o,s),multiplePriority:jv(o),sortOrder:o.defaultSortOrder}))}),n},dA=(t,e,r,n,i,o,a,s)=>(e||[]).map((c,u)=>{const f=wc(u,s);let h=c;if(h.sorter){const v=h.sortDirections||i,g=h.showSorterTooltip===void 0?a:h.showSorterTooltip,m=Ra(h,f),p=r.find(({key:x})=>x===m),y=p?p.sortOrder:null,b=JJ(v,y);let $;if(c.sortIcon)$=c.sortIcon({sortOrder:y});else{const x=v.includes(Yh)&&d.createElement(xX,{className:ae(`${t}-column-sorter-up`,{active:y===Yh})}),I=v.includes(km)&&d.createElement(wX,{className:ae(`${t}-column-sorter-down`,{active:y===km})});$=d.createElement("span",{className:ae(`${t}-column-sorter`,{[`${t}-column-sorter-full`]:!!(x&&I)})},d.createElement("span",{className:`${t}-column-sorter-inner`,"aria-hidden":"true"},x,I))}const{cancelSort:S,triggerAsc:w,triggerDesc:C}=o||{};let E=S;b===km?E=C:b===Yh&&(E=w);const O=typeof g=="object"?Object.assign({title:E},g):{title:E};h=Object.assign(Object.assign({},h),{className:ae(h.className,{[`${t}-column-sort`]:y}),title:x=>{const I=`${t}-column-sorters`,T=d.createElement("span",{className:`${t}-column-title`},qp(c.title,x)),N=d.createElement("div",{className:I},T,$);return g?typeof g!="boolean"&&g?.target==="sorter-icon"?d.createElement("div",{className:`${I} ${t}-column-sorters-tooltip-target-sorter`},T,d.createElement(Ju,Object.assign({},O),$)):d.createElement(Ju,Object.assign({},O),N):N},onHeaderCell:x=>{var I;const T=((I=c.onHeaderCell)===null||I===void 0?void 0:I.call(c,x))||{},N=T.onClick,P=T.onKeyDown;T.onClick=M=>{n({column:c,key:m,sortOrder:b,multiplePriority:jv(c)}),N?.(M)},T.onKeyDown=M=>{M.keyCode===Ze.ENTER&&(n({column:c,key:m,sortOrder:b,multiplePriority:jv(c)}),P?.(M))};const _=pJ(c.title,{}),R=_?.toString();return y&&(T["aria-sort"]=y==="ascend"?"ascending":"descending"),T["aria-label"]=R||"",T.className=ae(T.className,`${t}-column-has-sorters`),T.tabIndex=0,c.ellipsis&&(T.title=(_??"").toString()),T}})}return"children"in h&&(h=Object.assign(Object.assign({},h),{children:dA(t,h.children,r,n,i,o,a,f)})),h}),lO=t=>{const{column:e,sortOrder:r}=t;return{column:e,order:r,field:e.dataIndex,columnKey:e.key}},cO=t=>{const e=t.filter(({sortOrder:r})=>r).map(lO);if(e.length===0&&t.length){const r=t.length-1;return Object.assign(Object.assign({},lO(t[r])),{column:void 0,order:void 0,field:void 0,columnKey:void 0})}return e.length<=1?e[0]||{}:e},p1=(t,e,r)=>{const n=e.slice().sort((a,s)=>s.multiplePriority-a.multiplePriority),i=t.slice(),o=n.filter(({column:{sorter:a},sortOrder:s})=>sO(a)&&s);return o.length?i.sort((a,s)=>{for(let l=0;l<o.length;l+=1){const c=o[l],{column:{sorter:u},sortOrder:f}=c,h=sO(u);if(h&&f){const v=h(a,s,f);if(v!==0)return f===Yh?v:-v}}return 0}).map(a=>{const s=a[r];return s?Object.assign(Object.assign({},a),{[r]:p1(s,e,r)}):a}):i},ZJ=t=>{const{prefixCls:e,mergedColumns:r,sortDirections:n,tableLocale:i,showSorterTooltip:o,onSorterChange:a}=t,[s,l]=d.useState(()=>v1(r,!0)),c=(m,p)=>{const y=[];return m.forEach((b,$)=>{const S=wc($,p);if(y.push(Ra(b,S)),Array.isArray(b.children)){const w=c(b.children,S);y.push.apply(y,Oe(w))}}),y},u=d.useMemo(()=>{let m=!0;const p=v1(r,!1);if(!p.length){const S=c(r);return s.filter(({key:w})=>S.includes(w))}const y=[];function b(S){m?y.push(S):y.push(Object.assign(Object.assign({},S),{sortOrder:null}))}let $=null;return p.forEach(S=>{$===null?(b(S),S.sortOrder&&(S.multiplePriority===!1?m=!1:$=!0)):($&&S.multiplePriority!==!1||(m=!1),b(S))}),y},[r,s]),f=d.useMemo(()=>{var m,p;const y=u.map(({column:b,sortOrder:$})=>({column:b,order:$}));return{sortColumns:y,sortColumn:(m=y[0])===null||m===void 0?void 0:m.column,sortOrder:(p=y[0])===null||p===void 0?void 0:p.order}},[u]),h=m=>{let p;m.multiplePriority===!1||!u.length||u[0].multiplePriority===!1?p=[m]:p=[].concat(Oe(u.filter(({key:y})=>y!==m.key)),[m]),l(p),a(cO(p),p)};return[m=>dA(e,m,u,h,n,i,o),u,f,()=>cO(u)]},fA=(t,e)=>t.map(n=>{const i=Object.assign({},n);return i.title=qp(n.title,e),"children"in i&&(i.children=fA(i.children,e)),i}),QJ=t=>[d.useCallback(r=>fA(r,t),[t])],eZ=QD((t,e)=>{const{_renderTimes:r}=t,{_renderTimes:n}=e;return r!==n}),tZ=tA((t,e)=>{const{_renderTimes:r}=t,{_renderTimes:n}=e;return r!==n}),rZ=t=>{const{componentCls:e,lineWidth:r,lineType:n,tableBorderColor:i,tableHeaderBg:o,tablePaddingVertical:a,tablePaddingHorizontal:s,calc:l}=t,c=`${se(r)} ${n} ${i}`,u=(f,h,v)=>({[`&${e}-${f}`]:{[`> ${e}-container`]:{[`> ${e}-content, > ${e}-body`]:{"\n            > table > tbody > tr > th,\n            > table > tbody > tr > td\n          ":{[`> ${e}-expanded-row-fixed`]:{margin:`${se(l(h).mul(-1).equal())}
              ${se(l(l(v).add(r)).mul(-1).equal())}`}}}}}});return{[`${e}-wrapper`]:{[`${e}${e}-bordered`]:Object.assign(Object.assign(Object.assign({[`> ${e}-title`]:{border:c,borderBottom:0},[`> ${e}-container`]:{borderInlineStart:c,borderTop:c,[`
            > ${e}-content,
            > ${e}-header,
            > ${e}-body,
            > ${e}-summary
          `]:{"> table":{"\n                > thead > tr > th,\n                > thead > tr > td,\n                > tbody > tr > th,\n                > tbody > tr > td,\n                > tfoot > tr > th,\n                > tfoot > tr > td\n              ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n                > thead > tr,\n                > tbody > tr,\n                > tfoot > tr\n              ":{[`> ${e}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n                > tbody > tr > th,\n                > tbody > tr > td\n              ":{[`> ${e}-expanded-row-fixed`]:{margin:`${se(l(a).mul(-1).equal())} ${se(l(l(s).add(r)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:r,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${e}-scroll-horizontal`]:{[`> ${e}-container > ${e}-body`]:{"> table > tbody":{[`
                > tr${e}-expanded-row,
                > tr${e}-placeholder
              `]:{"> th, > td":{borderInlineEnd:0}}}}}},u("middle",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle)),u("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall)),{[`> ${e}-footer`]:{border:c,borderTop:0}}),[`${e}-cell`]:{[`${e}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${se(r)} 0 ${se(r)} ${o}`}},[`${e}-bordered ${e}-cell-scrollbar`]:{borderInlineEnd:c}}}},nZ=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-cell-ellipsis`]:Object.assign(Object.assign({},Ku),{wordBreak:"keep-all",[`
          &${e}-cell-fix-left-last,
          &${e}-cell-fix-right-first
        `]:{overflow:"visible",[`${e}-cell-content`]:{display:"block",overflow:"hidden",textOverflow:"ellipsis"}},[`${e}-column-title`]:{overflow:"hidden",textOverflow:"ellipsis",wordBreak:"keep-all"}})}}},iZ=t=>{const{componentCls:e}=t;return{[`${e}-wrapper`]:{[`${e}-tbody > tr${e}-placeholder`]:{textAlign:"center",color:t.colorTextDisabled,"\n          &:hover > th,\n          &:hover > td,\n        ":{background:t.colorBgContainer}}}}},oZ=t=>{const{componentCls:e,antCls:r,motionDurationSlow:n,lineWidth:i,paddingXS:o,lineType:a,tableBorderColor:s,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:f,tablePaddingHorizontal:h,tableExpandedRowBg:v,paddingXXS:g,expandIconMarginTop:m,expandIconSize:p,expandIconHalfInner:y,expandIconScale:b,calc:$}=t,S=`${se(i)} ${a} ${s}`,w=$(g).sub(i).equal();return{[`${e}-wrapper`]:{[`${e}-expand-icon-col`]:{width:c},[`${e}-row-expand-icon-cell`]:{textAlign:"center",[`${e}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${e}-row-indent`]:{height:1,float:"left"},[`${e}-row-expand-icon`]:Object.assign(Object.assign({},r6(t)),{position:"relative",float:"left",width:p,height:p,color:"inherit",lineHeight:se(p),background:l,border:S,borderRadius:u,transform:`scale(${b})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${n} ease-out`,content:'""'},"&::before":{top:y,insetInlineEnd:w,insetInlineStart:w,height:i},"&::after":{top:w,bottom:w,insetInlineStart:y,width:i,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}}),[`${e}-row-indent + ${e}-row-expand-icon`]:{marginTop:m,marginInlineEnd:o},[`tr${e}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:v}},[`${r}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${e}-expanded-row-fixed`]:{position:"relative",margin:`${se($(f).mul(-1).equal())} ${se($(h).mul(-1).equal())}`,padding:`${se(f)} ${se(h)}`}}}},aZ=t=>{const{componentCls:e,antCls:r,iconCls:n,tableFilterDropdownWidth:i,tableFilterDropdownSearchWidth:o,paddingXXS:a,paddingXS:s,colorText:l,lineWidth:c,lineType:u,tableBorderColor:f,headerIconColor:h,fontSizeSM:v,tablePaddingHorizontal:g,borderRadius:m,motionDurationSlow:p,colorIcon:y,colorPrimary:b,tableHeaderFilterActiveBg:$,colorTextDisabled:S,tableFilterDropdownBg:w,tableFilterDropdownHeight:C,controlItemBgHover:E,controlItemBgActive:O,boxShadowSecondary:x,filterDropdownMenuBg:I,calc:T}=t,N=`${r}-dropdown`,P=`${e}-filter-dropdown`,_=`${r}-tree`,R=`${se(c)} ${u} ${f}`;return[{[`${e}-wrapper`]:{[`${e}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${e}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:T(a).mul(-1).equal(),marginInline:`${se(a)} ${se(T(g).div(2).mul(-1).equal())}`,padding:`0 ${se(a)}`,color:h,fontSize:v,borderRadius:m,cursor:"pointer",transition:`all ${p}`,"&:hover":{color:y,background:$},"&.active":{color:b}}}},{[`${r}-dropdown`]:{[P]:Object.assign(Object.assign({},Ar(t)),{minWidth:i,backgroundColor:w,borderRadius:m,boxShadow:x,overflow:"hidden",[`${N}-menu`]:{maxHeight:C,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:I,"&:empty::after":{display:"block",padding:`${se(s)} 0`,color:S,fontSize:v,textAlign:"center",content:'"Not Found"'}},[`${P}-tree`]:{paddingBlock:`${se(s)} 0`,paddingInline:s,[_]:{padding:0},[`${_}-treenode ${_}-node-content-wrapper:hover`]:{backgroundColor:E},[`${_}-treenode-checkbox-checked ${_}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:O}}},[`${P}-search`]:{padding:s,borderBottom:R,"&-input":{input:{minWidth:o},[n]:{color:S}}},[`${P}-checkall`]:{width:"100%",marginBottom:a,marginInlineStart:a},[`${P}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${se(T(s).sub(c).equal())} ${se(s)}`,overflow:"hidden",borderTop:R}})}},{[`${r}-dropdown ${P}, ${P}-submenu`]:{[`${r}-checkbox-wrapper + span`]:{paddingInlineStart:s,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]},sZ=t=>{const{componentCls:e,lineWidth:r,colorSplit:n,motionDurationSlow:i,zIndexTableFixed:o,tableBg:a,zIndexTableSticky:s,calc:l}=t,c=n;return{[`${e}-wrapper`]:{[`
        ${e}-cell-fix-left,
        ${e}-cell-fix-right
      `]:{position:"sticky !important",zIndex:o,background:a},[`
        ${e}-cell-fix-left-first::after,
        ${e}-cell-fix-left-last::after
      `]:{position:"absolute",top:0,right:{_skip_check_:!0,value:0},bottom:l(r).mul(-1).equal(),width:30,transform:"translateX(100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${e}-cell-fix-left-all::after`]:{display:"none"},[`
        ${e}-cell-fix-right-first::after,
        ${e}-cell-fix-right-last::after
      `]:{position:"absolute",top:0,bottom:l(r).mul(-1).equal(),left:{_skip_check_:!0,value:0},width:30,transform:"translateX(-100%)",transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},[`${e}-container`]:{position:"relative","&::before, &::after":{position:"absolute",top:0,bottom:0,zIndex:l(s).add(1).equal({unit:!1}),width:30,transition:`box-shadow ${i}`,content:'""',pointerEvents:"none"},"&::before":{insetInlineStart:0},"&::after":{insetInlineEnd:0}},[`${e}-ping-left`]:{[`&:not(${e}-has-fix-left) ${e}-container::before`]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`
          ${e}-cell-fix-left-first::after,
          ${e}-cell-fix-left-last::after
        `]:{boxShadow:`inset 10px 0 8px -8px ${c}`},[`${e}-cell-fix-left-last::before`]:{backgroundColor:"transparent !important"}},[`${e}-ping-right`]:{[`&:not(${e}-has-fix-right) ${e}-container::after`]:{boxShadow:`inset -10px 0 8px -8px ${c}`},[`
          ${e}-cell-fix-right-first::after,
          ${e}-cell-fix-right-last::after
        `]:{boxShadow:`inset -10px 0 8px -8px ${c}`}},[`${e}-fixed-column-gapped`]:{[`
        ${e}-cell-fix-left-first::after,
        ${e}-cell-fix-left-last::after,
        ${e}-cell-fix-right-first::after,
        ${e}-cell-fix-right-last::after
      `]:{boxShadow:"none"}}}}},lZ=t=>{const{componentCls:e,antCls:r,margin:n}=t;return{[`${e}-wrapper`]:{[`${e}-pagination${r}-pagination`]:{margin:`${se(n)} 0`},[`${e}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:t.paddingXS,"> *":{flex:"none"},"&-left":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-right":{justifyContent:"flex-end"}}}}},cZ=t=>{const{componentCls:e,tableRadius:r}=t;return{[`${e}-wrapper`]:{[e]:{[`${e}-title, ${e}-header`]:{borderRadius:`${se(r)} ${se(r)} 0 0`},[`${e}-title + ${e}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${e}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:r,borderStartEndRadius:r,"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:r},"> *:last-child":{borderStartEndRadius:r}}},"&-footer":{borderRadius:`0 0 ${se(r)} ${se(r)}`}}}}},uZ=t=>{const{componentCls:e}=t;return{[`${e}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${e}-pagination-left`]:{justifyContent:"flex-end"},[`${e}-pagination-right`]:{justifyContent:"flex-start"},[`${e}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${e}-container`]:{"&::before":{insetInlineStart:"unset",insetInlineEnd:0},"&::after":{insetInlineStart:0,insetInlineEnd:"unset"},[`${e}-row-indent`]:{float:"right"}}}}},dZ=t=>{const{componentCls:e,antCls:r,iconCls:n,fontSizeIcon:i,padding:o,paddingXS:a,headerIconColor:s,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:f,tableRowHoverBg:h,tablePaddingHorizontal:v,calc:g}=t;return{[`${e}-wrapper`]:{[`${e}-selection-col`]:{width:c,[`&${e}-selection-col-with-dropdown`]:{width:g(c).add(i).add(g(o).div(4)).equal()}},[`${e}-bordered ${e}-selection-col`]:{width:g(c).add(g(a).mul(2)).equal(),[`&${e}-selection-col-with-dropdown`]:{width:g(c).add(i).add(g(o).div(4)).add(g(a).mul(2)).equal()}},[`
        table tr th${e}-selection-column,
        table tr td${e}-selection-column,
        ${e}-selection-column
      `]:{paddingInlineEnd:t.paddingXS,paddingInlineStart:t.paddingXS,textAlign:"center",[`${r}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${e}-selection-column${e}-cell-fix-left`]:{zIndex:g(t.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${e}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${e}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${e}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${t.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:se(g(v).div(4).equal()),[n]:{color:s,fontSize:i,verticalAlign:"baseline","&:hover":{color:l}}},[`${e}-tbody`]:{[`${e}-row`]:{[`&${e}-row-selected`]:{[`> ${e}-cell`]:{background:u,"&-row-hover":{background:f}}},[`> ${e}-cell-row-hover`]:{background:h}}}}}},fZ=t=>{const{componentCls:e,tableExpandColumnWidth:r,calc:n}=t,i=(o,a,s,l)=>({[`${e}${e}-${o}`]:{fontSize:l,[`
        ${e}-title,
        ${e}-footer,
        ${e}-cell,
        ${e}-thead > tr > th,
        ${e}-tbody > tr > th,
        ${e}-tbody > tr > td,
        tfoot > tr > th,
        tfoot > tr > td
      `]:{padding:`${se(a)} ${se(s)}`},[`${e}-filter-trigger`]:{marginInlineEnd:se(n(s).div(2).mul(-1).equal())},[`${e}-expanded-row-fixed`]:{margin:`${se(n(a).mul(-1).equal())} ${se(n(s).mul(-1).equal())}`},[`${e}-tbody`]:{[`${e}-wrapper:only-child ${e}`]:{marginBlock:se(n(a).mul(-1).equal()),marginInline:`${se(n(r).sub(s).equal())} ${se(n(s).mul(-1).equal())}`}},[`${e}-selection-extra`]:{paddingInlineStart:se(n(s).div(4).equal())}}});return{[`${e}-wrapper`]:Object.assign(Object.assign({},i("middle",t.tablePaddingVerticalMiddle,t.tablePaddingHorizontalMiddle,t.tableFontSizeMiddle)),i("small",t.tablePaddingVerticalSmall,t.tablePaddingHorizontalSmall,t.tableFontSizeSmall))}},hZ=t=>{const{componentCls:e,marginXXS:r,fontSizeIcon:n,headerIconColor:i,headerIconHoverColor:o}=t;return{[`${e}-wrapper`]:{[`${e}-thead th${e}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${t.motionDurationSlow}, left 0s`,"&:hover":{background:t.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:t.colorPrimary},[`
          &${e}-cell-fix-left:hover,
          &${e}-cell-fix-right:hover
        `]:{background:t.tableFixedHeaderSortActiveBg}},[`${e}-thead th${e}-column-sort`]:{background:t.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${e}-column-sort`]:{background:t.tableBodySortBg},[`${e}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${e}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${e}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${e}-column-sorter`]:{marginInlineStart:r,color:i,fontSize:0,transition:`color ${t.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:n,"&.active":{color:t.colorPrimary}},[`${e}-column-sorter-up + ${e}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${e}-column-sorters:hover ${e}-column-sorter`]:{color:o}}}},vZ=t=>{const{componentCls:e,opacityLoading:r,tableScrollThumbBg:n,tableScrollThumbBgHover:i,tableScrollThumbSize:o,tableScrollBg:a,zIndexTableSticky:s,stickyScrollBarBorderRadius:l,lineWidth:c,lineType:u,tableBorderColor:f}=t,h=`${se(c)} ${u} ${f}`;return{[`${e}-wrapper`]:{[`${e}-sticky`]:{"&-holder":{position:"sticky",zIndex:s,background:t.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${se(o)} !important`,zIndex:s,display:"flex",alignItems:"center",background:a,borderTop:h,opacity:r,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:o,backgroundColor:n,borderRadius:l,transition:`all ${t.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:i}}}}}}},uO=t=>{const{componentCls:e,lineWidth:r,tableBorderColor:n,calc:i}=t,o=`${se(r)} ${t.lineType} ${n}`;return{[`${e}-wrapper`]:{[`${e}-summary`]:{position:"relative",zIndex:t.zIndexTableFixed,background:t.tableBg,"> tr":{"> th, > td":{borderBottom:o}}},[`div${e}-summary`]:{boxShadow:`0 ${se(i(r).mul(-1).equal())} 0 ${n}`}}}},pZ=t=>{const{componentCls:e,motionDurationMid:r,lineWidth:n,lineType:i,tableBorderColor:o,calc:a}=t,s=`${se(n)} ${i} ${o}`,l=`${e}-expanded-row-cell`;return{[`${e}-wrapper`]:{[`${e}-tbody-virtual`]:{[`${e}-tbody-virtual-holder-inner`]:{[`
            & > ${e}-row, 
            & > div:not(${e}-row) > ${e}-row
          `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${e}-cell`]:{borderBottom:s,transition:`background ${r}`},[`${e}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${se(n)})`,borderInlineEnd:"none"}}},[`${e}-bordered`]:{[`${e}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:s,position:"absolute"},[`${e}-cell`]:{borderInlineEnd:s,[`&${e}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:a(n).mul(-1).equal(),borderInlineStart:s}}},[`&${e}-virtual`]:{[`${e}-placeholder ${e}-cell`]:{borderInlineEnd:s,borderBottom:s}}}}}},gZ=t=>{const{componentCls:e,fontWeightStrong:r,tablePaddingVertical:n,tablePaddingHorizontal:i,tableExpandColumnWidth:o,lineWidth:a,lineType:s,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:f,tableHeaderTextColor:h,motionDurationMid:v,tableHeaderBg:g,tableHeaderCellSplitColor:m,tableFooterTextColor:p,tableFooterBg:y,calc:b}=t,$=`${se(a)} ${s} ${l}`;return{[`${e}-wrapper`]:Object.assign(Object.assign({clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":t.tableScrollBg},$v()),{[e]:Object.assign(Object.assign({},Ar(t)),{fontSize:c,background:u,borderRadius:`${se(f)} ${se(f)} 0 0`,scrollbarColor:`${t.tableScrollThumbBg} ${t.tableScrollBg}`}),table:{width:"100%",textAlign:"start",borderRadius:`${se(f)} ${se(f)} 0 0`,borderCollapse:"separate",borderSpacing:0},[`
          ${e}-cell,
          ${e}-thead > tr > th,
          ${e}-tbody > tr > th,
          ${e}-tbody > tr > td,
          tfoot > tr > th,
          tfoot > tr > td
        `]:{position:"relative",padding:`${se(n)} ${se(i)}`,overflowWrap:"break-word"},[`${e}-title`]:{padding:`${se(n)} ${se(i)}`},[`${e}-thead`]:{"\n          > tr > th,\n          > tr > td\n        ":{position:"relative",color:h,fontWeight:r,textAlign:"start",background:g,borderBottom:$,transition:`background ${v} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${e}-selection-column):not(${e}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:m,transform:"translateY(-50%)",transition:`background-color ${v}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${e}-tbody`]:{"> tr":{"> th, > td":{transition:`background ${v}, border-color ${v}`,borderBottom:$,[`
              > ${e}-wrapper:only-child,
              > ${e}-expanded-row-fixed > ${e}-wrapper:only-child
            `]:{[e]:{marginBlock:se(b(n).mul(-1).equal()),marginInline:`${se(b(o).sub(i).equal())}
                ${se(b(i).mul(-1).equal())}`,[`${e}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:h,fontWeight:r,textAlign:"start",background:g,borderBottom:$,transition:`background ${v} ease`}}},[`${e}-footer`]:{padding:`${se(n)} ${se(i)}`,color:p,background:y}})}},mZ=t=>{const{colorFillAlter:e,colorBgContainer:r,colorTextHeading:n,colorFillSecondary:i,colorFillContent:o,controlItemBgActive:a,controlItemBgActiveHover:s,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:f,borderRadiusLG:h,controlHeight:v,colorTextPlaceholder:g,fontSize:m,fontSizeSM:p,lineHeight:y,lineWidth:b,colorIcon:$,colorIconHover:S,opacityLoading:w,controlInteractiveSize:C}=t,E=new Ut(i).onBackground(r).toHexString(),O=new Ut(o).onBackground(r).toHexString(),x=new Ut(e).onBackground(r).toHexString(),I=new Ut($),T=new Ut(S),N=C/2-b,P=N*2+b*3;return{headerBg:x,headerColor:n,headerSortActiveBg:E,headerSortHoverBg:O,bodySortBg:x,rowHoverBg:x,rowSelectedBg:a,rowSelectedHoverBg:s,rowExpandedBg:e,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:f,headerBorderRadius:h,footerBg:x,footerColor:n,cellFontSize:m,cellFontSizeMD:m,cellFontSizeSM:m,headerSplitColor:f,fixedHeaderSortActiveBg:E,headerFilterHoverBg:o,filterDropdownMenuBg:r,filterDropdownBg:r,expandIconBg:r,selectionColumnWidth:v,stickyScrollBarBg:g,stickyScrollBarBorderRadius:100,expandIconMarginTop:(m*y-b*3)/2-Math.ceil((p*1.4-b*3)/2),headerIconColor:I.clone().setA(I.a*w).toRgbString(),headerIconHoverColor:T.clone().setA(T.a*w).toRgbString(),expandIconHalfInner:N,expandIconSize:P,expandIconScale:C/P}},dO=2,yZ=Gr("Table",t=>{const{colorTextHeading:e,colorSplit:r,colorBgContainer:n,controlInteractiveSize:i,headerBg:o,headerColor:a,headerSortActiveBg:s,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:f,rowSelectedHoverBg:h,rowExpandedBg:v,cellPaddingBlock:g,cellPaddingInline:m,cellPaddingBlockMD:p,cellPaddingInlineMD:y,cellPaddingBlockSM:b,cellPaddingInlineSM:$,borderColor:S,footerBg:w,footerColor:C,headerBorderRadius:E,cellFontSize:O,cellFontSizeMD:x,cellFontSizeSM:I,headerSplitColor:T,fixedHeaderSortActiveBg:N,headerFilterHoverBg:P,filterDropdownBg:_,expandIconBg:R,selectionColumnWidth:M,stickyScrollBarBg:D,calc:j}=t,k=Xt(t,{tableFontSize:O,tableBg:n,tableRadius:E,tablePaddingVertical:g,tablePaddingHorizontal:m,tablePaddingVerticalMiddle:p,tablePaddingHorizontalMiddle:y,tablePaddingVerticalSmall:b,tablePaddingHorizontalSmall:$,tableBorderColor:S,tableHeaderTextColor:a,tableHeaderBg:o,tableFooterTextColor:C,tableFooterBg:w,tableHeaderCellSplitColor:T,tableHeaderSortBg:s,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:N,tableHeaderFilterActiveBg:P,tableFilterDropdownBg:_,tableRowHoverBg:u,tableSelectedRowBg:f,tableSelectedRowHoverBg:h,zIndexTableFixed:dO,zIndexTableSticky:j(dO).add(1).equal({unit:!1}),tableFontSizeMiddle:x,tableFontSizeSmall:I,tableSelectionColumnWidth:M,tableExpandIconBg:R,tableExpandColumnWidth:j(i).add(j(t.padding).mul(2)).equal(),tableExpandedRowBg:v,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:D,tableScrollThumbBgHover:e,tableScrollBg:r});return[gZ(k),lZ(k),uO(k),hZ(k),aZ(k),rZ(k),cZ(k),oZ(k),uO(k),iZ(k),dZ(k),sZ(k),vZ(k),nZ(k),fZ(k),uZ(k),pZ(k)]},mZ,{unitless:{expandIconScale:!0}}),bZ=[],$Z=(t,e)=>{var r,n;const{prefixCls:i,className:o,rootClassName:a,style:s,size:l,bordered:c,dropdownPrefixCls:u,dataSource:f,pagination:h,rowSelection:v,rowKey:g="key",rowClassName:m,columns:p,children:y,childrenColumnName:b,onChange:$,getPopupContainer:S,loading:w,expandIcon:C,expandable:E,expandedRowRender:O,expandIconColumnIndex:x,indentSize:I,scroll:T,sortDirections:N,locale:P,showSorterTooltip:_={target:"full-header"},virtual:R}=t;Ms();const M=d.useMemo(()=>p||Rw(y),[p,y]),D=d.useMemo(()=>M.some(Ue=>Ue.responsive),[M]),j=hw(D),k=d.useMemo(()=>{const Ue=new Set(Object.keys(j).filter(He=>j[He]));return M.filter(He=>!He.responsive||He.responsive.some(rt=>Ue.has(rt)))},[M,j]),V=yn(t,["className","style","columns"]),{locale:G=_a,direction:W,table:Y,renderEmpty:q,getPrefixCls:J,getPopupContainer:oe}=d.useContext(Dt),ie=no(l),te=Object.assign(Object.assign({},G.Table),P),z=f||bZ,K=J("table",i),B=J("dropdown",u),[,F]=_n(),U=yi(K),[Z,ee,Q]=yZ(K,U),ce=Object.assign(Object.assign({childrenColumnName:b,expandIconColumnIndex:x},E),{expandIcon:(r=E?.expandIcon)!==null&&r!==void 0?r:(n=Y?.expandable)===null||n===void 0?void 0:n.expandIcon}),{childrenColumnName:me="children"}=ce,Te=d.useMemo(()=>z.some(Ue=>Ue?.[me])?"nest":O||E?.expandedRowRender?"row":null,[z]),_e={body:d.useRef(null)},ve=vJ(K),ye=d.useRef(null),xe=d.useRef(null);fJ(e,()=>Object.assign(Object.assign({},xe.current),{nativeElement:ye.current}));const ge=d.useMemo(()=>typeof g=="function"?g:Ue=>Ue?.[g],[g]),[ne]=qJ(z,me,ge),X={},fe=(Ue,He,rt=!1)=>{var ht,_t,Nt,kt;const Bt=Object.assign(Object.assign({},X),Ue);rt&&((ht=X.resetPagination)===null||ht===void 0||ht.call(X),!((_t=Bt.pagination)===null||_t===void 0)&&_t.current&&(Bt.pagination.current=1),h&&((Nt=h.onChange)===null||Nt===void 0||Nt.call(h,1,(kt=Bt.pagination)===null||kt===void 0?void 0:kt.pageSize))),T&&T.scrollToFirstRowOnChange!==!1&&_e.body.current&&yH(0,{getContainer:()=>_e.body.current}),$?.(Bt.pagination,Bt.filters,Bt.sorter,{currentDataSource:h1(p1(z,Bt.sorterStates,me),Bt.filterStates,me),action:He})},pe=(Ue,He)=>{fe({sorter:Ue,sorterStates:He},"sort",!1)},[$e,Ee,be,H]=ZJ({prefixCls:K,mergedColumns:k,onSorterChange:pe,sortDirections:N||["ascend","descend"],tableLocale:te,showSorterTooltip:_}),re=d.useMemo(()=>p1(z,Ee,me),[z,Ee]);X.sorter=H(),X.sorterStates=Ee;const he=(Ue,He)=>{fe({filters:Ue,filterStates:He},"filter",!0)},[ue,we,Ie]=UJ({prefixCls:K,locale:te,dropdownPrefixCls:B,mergedColumns:k,onFilterChange:he,getPopupContainer:S||oe,rootClassName:ae(a,U)}),Fe=h1(re,we,me);X.filters=Ie,X.filterStates=we;const qe=d.useMemo(()=>{const Ue={};return Object.keys(Ie).forEach(He=>{Ie[He]!==null&&(Ue[He]=Ie[He])}),Object.assign(Object.assign({},be),{filters:Ue})},[be,Ie]),[st]=QJ(qe),ft=(Ue,He)=>{fe({pagination:Object.assign(Object.assign({},X.pagination),{current:Ue,pageSize:He})},"paginate")},[et,St]=YJ(Fe.length,ft,h);X.pagination=h===!1?{}:XJ(et,h),X.resetPagination=St;const Et=d.useMemo(()=>{if(h===!1||!et.pageSize)return Fe;const{current:Ue=1,total:He,pageSize:rt=uA}=et;return Fe.length<He?Fe.length>rt?Fe.slice((Ue-1)*rt,Ue*rt):Fe:Fe.slice((Ue-1)*rt,Ue*rt)},[!!h,Fe,et?.current,et?.pageSize,et?.total]),[at,nt]=uJ({prefixCls:K,data:Fe,pageData:Et,getRowKey:ge,getRecordByKey:ne,expandType:Te,childrenColumnName:me,locale:te,getPopupContainer:S||oe},v),Le=(Ue,He,rt)=>{let ht;return typeof m=="function"?ht=ae(m(Ue,He,rt)):ht=ae(m),ae({[`${K}-row-selected`]:nt.has(ge(Ue,He))},ht)};ce.__PARENT_RENDER_ICON__=ce.expandIcon,ce.expandIcon=ce.expandIcon||C||hJ(te),Te==="nest"&&ce.expandIconColumnIndex===void 0?ce.expandIconColumnIndex=v?1:0:ce.expandIconColumnIndex>0&&v&&(ce.expandIconColumnIndex-=1),typeof ce.indentSize!="number"&&(ce.indentSize=typeof I=="number"?I:15);const ze=d.useCallback(Ue=>st(at(ue($e(Ue)))),[$e,ue,at]);let Ne,Ye;if(h!==!1&&et?.total){let Ue;et.size?Ue=et.size:Ue=ie==="small"||ie==="middle"?"small":void 0;const He=_t=>d.createElement(nX,Object.assign({},et,{className:ae(`${K}-pagination ${K}-pagination-${_t}`,et.className),size:Ue})),rt=W==="rtl"?"left":"right",{position:ht}=et;if(ht!==null&&Array.isArray(ht)){const _t=ht.find(Bt=>Bt.includes("top")),Nt=ht.find(Bt=>Bt.includes("bottom")),kt=ht.every(Bt=>`${Bt}`=="none");!_t&&!Nt&&!kt&&(Ye=He(rt)),_t&&(Ne=He(_t.toLowerCase().replace("top",""))),Nt&&(Ye=He(Nt.toLowerCase().replace("bottom","")))}else Ye=He(rt)}let lt;typeof w=="boolean"?lt={spinning:w}:typeof w=="object"&&(lt=Object.assign({spinning:!0},w));const De=ae(Q,U,`${K}-wrapper`,Y?.className,{[`${K}-wrapper-rtl`]:W==="rtl"},o,a,ee),Me=Object.assign(Object.assign({},Y?.style),s),Qe=typeof P?.emptyText<"u"?P.emptyText:q?.("Table")||d.createElement($M,{componentName:"Table"}),Ge=R?tZ:eZ,We={},it=d.useMemo(()=>{const{fontSize:Ue,lineHeight:He,lineWidth:rt,padding:ht,paddingXS:_t,paddingSM:Nt}=F,kt=Math.floor(Ue*He);switch(ie){case"middle":return Nt*2+kt+rt;case"small":return _t*2+kt+rt;default:return ht*2+kt+rt}},[F,ie]);return R&&(We.listItemHeight=it),Z(d.createElement("div",{ref:ye,className:De,style:Me},d.createElement(BD,Object.assign({spinning:!1},lt),Ne,d.createElement(Ge,Object.assign({},We,V,{ref:xe,columns:k,direction:W,expandable:ce,prefixCls:K,className:ae({[`${K}-middle`]:ie==="middle",[`${K}-small`]:ie==="small",[`${K}-bordered`]:c,[`${K}-empty`]:z.length===0},Q,U,ee),data:Et,rowKey:ge,rowClassName:Le,emptyText:Qe,internalHooks:Md,internalRefs:_e,transformColumns:ze,getContainerWidth:ve})),Ye)))},wZ=d.forwardRef($Z),SZ=(t,e)=>{const r=d.useRef(0);return r.current+=1,d.createElement(wZ,Object.assign({},t,{ref:e,_renderTimes:r.current}))},Fa=d.forwardRef(SZ);Fa.SELECTION_COLUMN=oa;Fa.EXPAND_COLUMN=No;Fa.SELECTION_ALL=l1;Fa.SELECTION_INVERT=c1;Fa.SELECTION_NONE=u1;Fa.Column=QY;Fa.ColumnGroup=eJ;Fa.Summary=VD;const CZ=()=>{const[t,e]=d.useState(()=>document.body.classList.contains("dark-theme"));return d.useEffect(()=>{const r=new MutationObserver(n=>{n.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="class"){const o=i.target;o===document.body&&e(o.classList.contains("dark-theme"))}})});return r.observe(document.body,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),t},hA={messages:[],selectedNode:Object.keys(fr?.canvas?.selected_nodes??{})?.length?Object.values(fr?.canvas?.selected_nodes):null,installedNodes:[],loading:!1,sessionId:null,showChat:!1,activeTab:"chat",screenState:null};function xZ(t,e){switch(e.type){case"SET_MESSAGES":return{...t,messages:e.payload};case"ADD_MESSAGE":return{...t,messages:[...t.messages,e.payload]};case"UPDATE_MESSAGE":return{...t,messages:t.messages.map(r=>r.id===e.payload.id&&!r.finished?e.payload:r)};case"SET_SELECTED_NODE":return{...t,selectedNode:e.payload};case"SET_INSTALLED_NODES":return{...t,installedNodes:e.payload};case"SET_LOADING":return{...t,loading:e.payload};case"SET_SESSION_ID":return{...t,sessionId:e.payload};case"SET_SHOW_CHAT":return{...t,showChat:e.payload};case"SET_ACTIVE_TAB":return{...t,activeTab:e.payload};case"SET_SCREEN_STATE":return{...t,screenState:e.payload};case"CLEAR_MESSAGES":return{...t,messages:[]};default:return t}}const vA=d.createContext({state:hA,dispatch:()=>null,showcasIng:{current:!1},abortControllerRef:{current:null},modelDownloadMap:{},addDownloadId:()=>{}});function a5e({children:t}){const[e,r]=d.useReducer(xZ,hA),n=d.useRef(!0),i=d.useRef(null),[o,a]=d.useState({}),s=d.useRef([]),l=async v=>(await(await fetch(`/api/download-progress/${v}`)).json()).data||null,c=CZ(),u=async()=>{if(s?.current?.length>0){const v=await Promise.all(s?.current?.map(m=>l(m)));let g={};v?.forEach(m=>{m&&(g[m.id]={id:m.id,percentage:m.percentage,status:m.status},(m.status==="completed"||m.status==="failed")&&s?.current?.splice(s?.current?.indexOf(m.id),1))}),a(g),s?.current?.length>0&&setTimeout(()=>{u()},2e3)}},f=v=>{Array.isArray(v)?s.current.push(...v):s.current.push(v),u()},h=async()=>{const g=await(await fetch("/api/download-progress")).json();g?.data?.downloads?.length>0&&f(g.data.downloads)};return d.useEffect(()=>{h()},[]),d.useEffect(()=>{e.sessionId&&e.messages.length>0&&localStorage.setItem(`messages_${e.sessionId}`,JSON.stringify(e.messages))},[e.messages,e.sessionId]),Ce.jsx(Ds,{theme:{token:{colorBgContainer:c?"#18181b":"#fff",colorBgElevated:c?"#18181b":"#fff",colorText:c?"rgba(255,255,255,0.88)":"rgba(0,0,0,0.88)",colorTextDescription:c?"rgba(255,255,255,0.45)":"rgba(0,0,0,0.45)",colorTextPlaceholder:c?"rgba(255,255,255,0.25)":"rgba(0,0,0,0.25)"},components:{Select:{optionSelectedBg:c?"#333":"#e6f4ff",optionActiveBg:c?"rgba(255,255,255,0.04)":"rgba(0,0,0,0.04)"},Table:{borderColor:c?"#666":"#f0f0f0",headerBg:c?"#333":"#fafafa",headerColor:c?"#fff":"#18181b",rowHoverBg:c?"#333":"#fafafa"},Pagination:{itemBg:c?"rgb(24, 24, 27)":"#fff",itemActiveBg:c?"rgb(24, 24, 27)":"#fff",colorText:c?"rgba(255,255,255,0.88)":"rgba(0,0,0,0.88)",colorBgTextHover:c?"#555":"rgba(0,0,0,0.06)",colorPrimary:c?"#aaa":"#1677ff",colorPrimaryHover:c?"#999":"#4096ff"},Form:{labelColor:c?"rgba(255,255,255,0.88)":"rgba(0,0,0,0.88)"},Button:{primaryShadow:"0 2px 0 rgba(5,145,255,0.1)"}}},children:Ce.jsx(vA.Provider,{value:{state:e,dispatch:r,showcasIng:n,abortControllerRef:i,modelDownloadMap:o,addDownloadId:f},children:t})})}function EZ(){const t=d.useContext(vA);if(!t)throw new Error("useChatContext must be used within a ChatProvider");return t}const s5e="https://github.com/AIDC-AI/ComfyUI-Copilot",pA={apiBaseUrl:"https://comfyui-copilot-server-pre.onrender.com"};function OZ(t,e){if(Ta==null)throw console.error("api is null!"),new Error("api is null!");return Ta.fetchApi(t,e)}function Gn(){return typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})}var IZ="0123456789abcdefghijklmnopqrstuvwxyz";function Mo(t){return IZ.charAt(t)}function TZ(t,e){return t&e}function Uf(t,e){return t|e}function fO(t,e){return t^e}function hO(t,e){return t&~e}function _Z(t){if(t==0)return-1;var e=0;return t&65535||(t>>=16,e+=16),t&255||(t>>=8,e+=8),t&15||(t>>=4,e+=4),t&3||(t>>=2,e+=2),t&1||++e,e}function PZ(t){for(var e=0;t!=0;)t&=t-1,++e;return e}var gl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gA="=";function kv(t){var e,r,n="";for(e=0;e+3<=t.length;e+=3)r=parseInt(t.substring(e,e+3),16),n+=gl.charAt(r>>6)+gl.charAt(r&63);for(e+1==t.length?(r=parseInt(t.substring(e,e+1),16),n+=gl.charAt(r<<2)):e+2==t.length&&(r=parseInt(t.substring(e,e+2),16),n+=gl.charAt(r>>2)+gl.charAt((r&3)<<4));(n.length&3)>0;)n+=gA;return n}function vO(t){var e="",r,n=0,i=0;for(r=0;r<t.length&&t.charAt(r)!=gA;++r){var o=gl.indexOf(t.charAt(r));o<0||(n==0?(e+=Mo(o>>2),i=o&3,n=1):n==1?(e+=Mo(i<<2|o>>4),i=o&15,n=2):n==2?(e+=Mo(i),e+=Mo(o>>2),i=o&3,n=3):(e+=Mo(i<<2|o>>4),e+=Mo(o&15),n=0))}return n==1&&(e+=Mo(i<<2)),e}var nl,RZ={decode:function(t){var e;if(nl===void 0){var r="0123456789ABCDEF",n=` \f
\r	 \u2028\u2029`;for(nl={},e=0;e<16;++e)nl[r.charAt(e)]=e;for(r=r.toLowerCase(),e=10;e<16;++e)nl[r.charAt(e)]=e;for(e=0;e<n.length;++e)nl[n.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if(s=="=")break;if(s=nl[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+e);o|=s,++a>=2?(i[i.length]=o,o=0,a=0):o<<=4}}if(a)throw new Error("Hex encoding incomplete: 4 bits missing");return i}},Ya,g1={decode:function(t){var e;if(Ya===void 0){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=`= \f
\r	 \u2028\u2029`;for(Ya=Object.create(null),e=0;e<64;++e)Ya[r.charAt(e)]=e;for(Ya["-"]=62,Ya._=63,e=0;e<n.length;++e)Ya[n.charAt(e)]=-1}var i=[],o=0,a=0;for(e=0;e<t.length;++e){var s=t.charAt(e);if(s=="=")break;if(s=Ya[s],s!=-1){if(s===void 0)throw new Error("Illegal character at offset "+e);o|=s,++a>=4?(i[i.length]=o>>16,i[i.length]=o>>8&255,i[i.length]=o&255,o=0,a=0):o<<=6}}switch(a){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:i[i.length]=o>>10;break;case 3:i[i.length]=o>>16,i[i.length]=o>>8&255;break}return i},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(t){var e=g1.re.exec(t);if(e)if(e[1])t=e[1];else if(e[2])t=e[2];else throw new Error("RegExp out of sync");return g1.decode(t)}},il=1e13,hu=function(){function t(e){this.buf=[+e||0]}return t.prototype.mulAdd=function(e,r){var n=this.buf,i=n.length,o,a;for(o=0;o<i;++o)a=n[o]*e+r,a<il?r=0:(r=0|a/il,a-=r*il),n[o]=a;r>0&&(n[o]=r)},t.prototype.sub=function(e){var r=this.buf,n=r.length,i,o;for(i=0;i<n;++i)o=r[i]-e,o<0?(o+=il,e=1):e=0,r[i]=o;for(;r[r.length-1]===0;)r.pop()},t.prototype.toString=function(e){if((e||10)!=10)throw new Error("only base 10 is supported");for(var r=this.buf,n=r[r.length-1].toString(),i=r.length-2;i>=0;--i)n+=(il+r[i]).toString().substring(1);return n},t.prototype.valueOf=function(){for(var e=this.buf,r=0,n=e.length-1;n>=0;--n)r=r*il+e[n];return r},t.prototype.simplify=function(){var e=this.buf;return e.length==1?e[0]:this},t}(),mA="…",NZ=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,MZ=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function jl(t,e){return t.length>e&&(t=t.substring(0,e)+mA),t}var Bm=function(){function t(e,r){this.hexDigits="0123456789ABCDEF",e instanceof t?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=r)}return t.prototype.get=function(e){if(e===void 0&&(e=this.pos++),e>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(e):this.enc[e]},t.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(e&15)},t.prototype.hexDump=function(e,r,n){for(var i="",o=e;o<r;++o)if(i+=this.hexByte(this.get(o)),n!==!0)switch(o&15){case 7:i+="  ";break;case 15:i+=`
`;break;default:i+=" "}return i},t.prototype.isASCII=function(e,r){for(var n=e;n<r;++n){var i=this.get(n);if(i<32||i>176)return!1}return!0},t.prototype.parseStringISO=function(e,r){for(var n="",i=e;i<r;++i)n+=String.fromCharCode(this.get(i));return n},t.prototype.parseStringUTF=function(e,r){for(var n="",i=e;i<r;){var o=this.get(i++);o<128?n+=String.fromCharCode(o):o>191&&o<224?n+=String.fromCharCode((o&31)<<6|this.get(i++)&63):n+=String.fromCharCode((o&15)<<12|(this.get(i++)&63)<<6|this.get(i++)&63)}return n},t.prototype.parseStringBMP=function(e,r){for(var n="",i,o,a=e;a<r;)i=this.get(a++),o=this.get(a++),n+=String.fromCharCode(i<<8|o);return n},t.prototype.parseTime=function(e,r,n){var i=this.parseStringISO(e,r),o=(n?NZ:MZ).exec(i);return o?(n&&(o[1]=+o[1],o[1]+=+o[1]<70?2e3:1900),i=o[1]+"-"+o[2]+"-"+o[3]+" "+o[4],o[5]&&(i+=":"+o[5],o[6]&&(i+=":"+o[6],o[7]&&(i+="."+o[7]))),o[8]&&(i+=" UTC",o[8]!="Z"&&(i+=o[8],o[9]&&(i+=":"+o[9]))),i):"Unrecognized time: "+i},t.prototype.parseInteger=function(e,r){for(var n=this.get(e),i=n>127,o=i?255:0,a,s="";n==o&&++e<r;)n=this.get(e);if(a=r-e,a===0)return i?-1:0;if(a>4){for(s=n,a<<=3;!((+s^o)&128);)s=+s<<1,--a;s="("+a+` bit)
`}i&&(n=n-256);for(var l=new hu(n),c=e+1;c<r;++c)l.mulAdd(256,this.get(c));return s+l.toString()},t.prototype.parseBitString=function(e,r,n){for(var i=this.get(e),o=(r-e-1<<3)-i,a="("+o+` bit)
`,s="",l=e+1;l<r;++l){for(var c=this.get(l),u=l==r-1?i:0,f=7;f>=u;--f)s+=c>>f&1?"1":"0";if(s.length>n)return a+jl(s,n)}return a+s},t.prototype.parseOctetString=function(e,r,n){if(this.isASCII(e,r))return jl(this.parseStringISO(e,r),n);var i=r-e,o="("+i+` byte)
`;n/=2,i>n&&(r=e+n);for(var a=e;a<r;++a)o+=this.hexByte(this.get(a));return i>n&&(o+=mA),o},t.prototype.parseOID=function(e,r,n){for(var i="",o=new hu,a=0,s=e;s<r;++s){var l=this.get(s);if(o.mulAdd(128,l&127),a+=7,!(l&128)){if(i==="")if(o=o.simplify(),o instanceof hu)o.sub(80),i="2."+o.toString();else{var c=o<80?o<40?0:1:2;i=c+"."+(o-c*40)}else i+="."+o.toString();if(i.length>n)return jl(i,n);o=new hu,a=0}}return a>0&&(i+=".incomplete"),i},t}(),DZ=function(){function t(e,r,n,i,o){if(!(i instanceof pO))throw new Error("Invalid tag value.");this.stream=e,this.header=r,this.length=n,this.tag=i,this.sub=o}return t.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},t.prototype.content=function(e){if(this.tag===void 0)return null;e===void 0&&(e=1/0);var r=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(r,r+n,e);switch(this.tag.tagNumber){case 1:return this.stream.get(r)===0?"false":"true";case 2:return this.stream.parseInteger(r,r+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(r,r+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(r,r+n,e);case 6:return this.stream.parseOID(r,r+n,e);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return jl(this.stream.parseStringUTF(r,r+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return jl(this.stream.parseStringISO(r,r+n),e);case 30:return jl(this.stream.parseStringBMP(r,r+n),e);case 23:case 24:return this.stream.parseTime(r,r+n,this.tag.tagNumber==23)}return null},t.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},t.prototype.toPrettyString=function(e){e===void 0&&(e="");var r=e+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(r+="+"),r+=this.length,this.tag.tagConstructed?r+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(r+=" (encapsulates)"),r+=`
`,this.sub!==null){e+="  ";for(var n=0,i=this.sub.length;n<i;++n)r+=this.sub[n].toPrettyString(e)}return r},t.prototype.posStart=function(){return this.stream.pos},t.prototype.posContent=function(){return this.stream.pos+this.header},t.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},t.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},t.decodeLength=function(e){var r=e.get(),n=r&127;if(n==r)return n;if(n>6)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(n===0)return null;r=0;for(var i=0;i<n;++i)r=r*256+e.get();return r},t.prototype.getHexStringValue=function(){var e=this.toHexString(),r=this.header*2,n=this.length*2;return e.substr(r,n)},t.decode=function(e){var r;e instanceof Bm?r=e:r=new Bm(e,0);var n=new Bm(r),i=new pO(r),o=t.decodeLength(r),a=r.pos,s=a-n.pos,l=null,c=function(){var f=[];if(o!==null){for(var h=a+o;r.pos<h;)f[f.length]=t.decode(r);if(r.pos!=h)throw new Error("Content size is not correct for container starting at offset "+a)}else try{for(;;){var v=t.decode(r);if(v.tag.isEOC())break;f[f.length]=v}o=a-r.pos}catch(g){throw new Error("Exception while decoding undefined length content: "+g)}return f};if(i.tagConstructed)l=c();else if(i.isUniversal()&&(i.tagNumber==3||i.tagNumber==4))try{if(i.tagNumber==3&&r.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");l=c();for(var u=0;u<l.length;++u)if(l[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch{l=null}if(l===null){if(o===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+a);r.pos=a+Math.abs(o)}return new t(n,s,o,i,l)},t}(),pO=function(){function t(e){var r=e.get();if(this.tagClass=r>>6,this.tagConstructed=(r&32)!==0,this.tagNumber=r&31,this.tagNumber==31){var n=new hu;do r=e.get(),n.mulAdd(128,r&127);while(r&128);this.tagNumber=n.simplify()}}return t.prototype.isUniversal=function(){return this.tagClass===0},t.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},t}(),ba,AZ=0xdeadbeefcafe,gO=(AZ&16777215)==15715070,Mn=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],jZ=(1<<26)/Mn[Mn.length-1],Rt=function(){function t(e,r,n){e!=null&&(typeof e=="number"?this.fromNumber(e,r,n):r==null&&typeof e!="string"?this.fromString(e,256):this.fromString(e,r))}return t.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var r;if(e==16)r=4;else if(e==8)r=3;else if(e==2)r=1;else if(e==32)r=5;else if(e==4)r=2;else return this.toRadix(e);var n=(1<<r)-1,i,o=!1,a="",s=this.t,l=this.DB-s*this.DB%r;if(s-- >0)for(l<this.DB&&(i=this[s]>>l)>0&&(o=!0,a=Mo(i));s>=0;)l<r?(i=(this[s]&(1<<l)-1)<<r-l,i|=this[--s]>>(l+=this.DB-r)):(i=this[s]>>(l-=r)&n,l<=0&&(l+=this.DB,--s)),i>0&&(o=!0),o&&(a+=Mo(i));return o?a:"0"},t.prototype.negate=function(){var e=jt();return t.ZERO.subTo(this,e),e},t.prototype.abs=function(){return this.s<0?this.negate():this},t.prototype.compareTo=function(e){var r=this.s-e.s;if(r!=0)return r;var n=this.t;if(r=n-e.t,r!=0)return this.s<0?-r:r;for(;--n>=0;)if((r=this[n]-e[n])!=0)return r;return 0},t.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+qf(this[this.t-1]^this.s&this.DM)},t.prototype.mod=function(e){var r=jt();return this.abs().divRemTo(e,null,r),this.s<0&&r.compareTo(t.ZERO)>0&&e.subTo(r,r),r},t.prototype.modPowInt=function(e,r){var n;return e<256||r.isEven()?n=new mO(r):n=new yO(r),this.exp(e,n)},t.prototype.clone=function(){var e=jt();return this.copyTo(e),e},t.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},t.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},t.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},t.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},t.prototype.toByteArray=function(){var e=this.t,r=[];r[0]=this.s;var n=this.DB-e*this.DB%8,i,o=0;if(e-- >0)for(n<this.DB&&(i=this[e]>>n)!=(this.s&this.DM)>>n&&(r[o++]=i|this.s<<this.DB-n);e>=0;)n<8?(i=(this[e]&(1<<n)-1)<<8-n,i|=this[--e]>>(n+=this.DB-8)):(i=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),i&128&&(i|=-256),o==0&&(this.s&128)!=(i&128)&&++o,(o>0||i!=this.s)&&(r[o++]=i);return r},t.prototype.equals=function(e){return this.compareTo(e)==0},t.prototype.min=function(e){return this.compareTo(e)<0?this:e},t.prototype.max=function(e){return this.compareTo(e)>0?this:e},t.prototype.and=function(e){var r=jt();return this.bitwiseTo(e,TZ,r),r},t.prototype.or=function(e){var r=jt();return this.bitwiseTo(e,Uf,r),r},t.prototype.xor=function(e){var r=jt();return this.bitwiseTo(e,fO,r),r},t.prototype.andNot=function(e){var r=jt();return this.bitwiseTo(e,hO,r),r},t.prototype.not=function(){for(var e=jt(),r=0;r<this.t;++r)e[r]=this.DM&~this[r];return e.t=this.t,e.s=~this.s,e},t.prototype.shiftLeft=function(e){var r=jt();return e<0?this.rShiftTo(-e,r):this.lShiftTo(e,r),r},t.prototype.shiftRight=function(e){var r=jt();return e<0?this.lShiftTo(-e,r):this.rShiftTo(e,r),r},t.prototype.getLowestSetBit=function(){for(var e=0;e<this.t;++e)if(this[e]!=0)return e*this.DB+_Z(this[e]);return this.s<0?this.t*this.DB:-1},t.prototype.bitCount=function(){for(var e=0,r=this.s&this.DM,n=0;n<this.t;++n)e+=PZ(this[n]^r);return e},t.prototype.testBit=function(e){var r=Math.floor(e/this.DB);return r>=this.t?this.s!=0:(this[r]&1<<e%this.DB)!=0},t.prototype.setBit=function(e){return this.changeBit(e,Uf)},t.prototype.clearBit=function(e){return this.changeBit(e,hO)},t.prototype.flipBit=function(e){return this.changeBit(e,fO)},t.prototype.add=function(e){var r=jt();return this.addTo(e,r),r},t.prototype.subtract=function(e){var r=jt();return this.subTo(e,r),r},t.prototype.multiply=function(e){var r=jt();return this.multiplyTo(e,r),r},t.prototype.divide=function(e){var r=jt();return this.divRemTo(e,r,null),r},t.prototype.remainder=function(e){var r=jt();return this.divRemTo(e,null,r),r},t.prototype.divideAndRemainder=function(e){var r=jt(),n=jt();return this.divRemTo(e,r,n),[r,n]},t.prototype.modPow=function(e,r){var n=e.bitLength(),i,o=la(1),a;if(n<=0)return o;n<18?i=1:n<48?i=3:n<144?i=4:n<768?i=5:i=6,n<8?a=new mO(r):r.isEven()?a=new BZ(r):a=new yO(r);var s=[],l=3,c=i-1,u=(1<<i)-1;if(s[1]=a.convert(this),i>1){var f=jt();for(a.sqrTo(s[1],f);l<=u;)s[l]=jt(),a.mulTo(f,s[l-2],s[l]),l+=2}var h=e.t-1,v,g=!0,m=jt(),p;for(n=qf(e[h])-1;h>=0;){for(n>=c?v=e[h]>>n-c&u:(v=(e[h]&(1<<n+1)-1)<<c-n,h>0&&(v|=e[h-1]>>this.DB+n-c)),l=i;!(v&1);)v>>=1,--l;if((n-=l)<0&&(n+=this.DB,--h),g)s[v].copyTo(o),g=!1;else{for(;l>1;)a.sqrTo(o,m),a.sqrTo(m,o),l-=2;l>0?a.sqrTo(o,m):(p=o,o=m,m=p),a.mulTo(m,s[v],o)}for(;h>=0&&!(e[h]&1<<n);)a.sqrTo(o,m),p=o,o=m,m=p,--n<0&&(n=this.DB-1,--h)}return a.revert(o)},t.prototype.modInverse=function(e){var r=e.isEven();if(this.isEven()&&r||e.signum()==0)return t.ZERO;for(var n=e.clone(),i=this.clone(),o=la(1),a=la(0),s=la(0),l=la(1);n.signum()!=0;){for(;n.isEven();)n.rShiftTo(1,n),r?((!o.isEven()||!a.isEven())&&(o.addTo(this,o),a.subTo(e,a)),o.rShiftTo(1,o)):a.isEven()||a.subTo(e,a),a.rShiftTo(1,a);for(;i.isEven();)i.rShiftTo(1,i),r?((!s.isEven()||!l.isEven())&&(s.addTo(this,s),l.subTo(e,l)),s.rShiftTo(1,s)):l.isEven()||l.subTo(e,l),l.rShiftTo(1,l);n.compareTo(i)>=0?(n.subTo(i,n),r&&o.subTo(s,o),a.subTo(l,a)):(i.subTo(n,i),r&&s.subTo(o,s),l.subTo(a,l))}if(i.compareTo(t.ONE)!=0)return t.ZERO;if(l.compareTo(e)>=0)return l.subtract(e);if(l.signum()<0)l.addTo(e,l);else return l;return l.signum()<0?l.add(e):l},t.prototype.pow=function(e){return this.exp(e,new kZ)},t.prototype.gcd=function(e){var r=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(r.compareTo(n)<0){var i=r;r=n,n=i}var o=r.getLowestSetBit(),a=n.getLowestSetBit();if(a<0)return r;for(o<a&&(a=o),a>0&&(r.rShiftTo(a,r),n.rShiftTo(a,n));r.signum()>0;)(o=r.getLowestSetBit())>0&&r.rShiftTo(o,r),(o=n.getLowestSetBit())>0&&n.rShiftTo(o,n),r.compareTo(n)>=0?(r.subTo(n,r),r.rShiftTo(1,r)):(n.subTo(r,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n},t.prototype.isProbablePrime=function(e){var r,n=this.abs();if(n.t==1&&n[0]<=Mn[Mn.length-1]){for(r=0;r<Mn.length;++r)if(n[0]==Mn[r])return!0;return!1}if(n.isEven())return!1;for(r=1;r<Mn.length;){for(var i=Mn[r],o=r+1;o<Mn.length&&i<jZ;)i*=Mn[o++];for(i=n.modInt(i);r<o;)if(i%Mn[r++]==0)return!1}return n.millerRabin(e)},t.prototype.copyTo=function(e){for(var r=this.t-1;r>=0;--r)e[r]=this[r];e.t=this.t,e.s=this.s},t.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},t.prototype.fromString=function(e,r){var n;if(r==16)n=4;else if(r==8)n=3;else if(r==256)n=8;else if(r==2)n=1;else if(r==32)n=5;else if(r==4)n=2;else{this.fromRadix(e,r);return}this.t=0,this.s=0;for(var i=e.length,o=!1,a=0;--i>=0;){var s=n==8?+e[i]&255:$O(e,i);if(s<0){e.charAt(i)=="-"&&(o=!0);continue}o=!1,a==0?this[this.t++]=s:a+n>this.DB?(this[this.t-1]|=(s&(1<<this.DB-a)-1)<<a,this[this.t++]=s>>this.DB-a):this[this.t-1]|=s<<a,a+=n,a>=this.DB&&(a-=this.DB)}n==8&&+e[0]&128&&(this.s=-1,a>0&&(this[this.t-1]|=(1<<this.DB-a)-1<<a)),this.clamp(),o&&t.ZERO.subTo(this,this)},t.prototype.clamp=function(){for(var e=this.s&this.DM;this.t>0&&this[this.t-1]==e;)--this.t},t.prototype.dlShiftTo=function(e,r){var n;for(n=this.t-1;n>=0;--n)r[n+e]=this[n];for(n=e-1;n>=0;--n)r[n]=0;r.t=this.t+e,r.s=this.s},t.prototype.drShiftTo=function(e,r){for(var n=e;n<this.t;++n)r[n-e]=this[n];r.t=Math.max(this.t-e,0),r.s=this.s},t.prototype.lShiftTo=function(e,r){for(var n=e%this.DB,i=this.DB-n,o=(1<<i)-1,a=Math.floor(e/this.DB),s=this.s<<n&this.DM,l=this.t-1;l>=0;--l)r[l+a+1]=this[l]>>i|s,s=(this[l]&o)<<n;for(var l=a-1;l>=0;--l)r[l]=0;r[a]=s,r.t=this.t+a+1,r.s=this.s,r.clamp()},t.prototype.rShiftTo=function(e,r){r.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t){r.t=0;return}var i=e%this.DB,o=this.DB-i,a=(1<<i)-1;r[0]=this[n]>>i;for(var s=n+1;s<this.t;++s)r[s-n-1]|=(this[s]&a)<<o,r[s-n]=this[s]>>i;i>0&&(r[this.t-n-1]|=(this.s&a)<<o),r.t=this.t-n,r.clamp()},t.prototype.subTo=function(e,r){for(var n=0,i=0,o=Math.min(e.t,this.t);n<o;)i+=this[n]-e[n],r[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i-=e.s;n<this.t;)i+=this[n],r[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i-=e[n],r[n++]=i&this.DM,i>>=this.DB;i-=e.s}r.s=i<0?-1:0,i<-1?r[n++]=this.DV+i:i>0&&(r[n++]=i),r.t=n,r.clamp()},t.prototype.multiplyTo=function(e,r){var n=this.abs(),i=e.abs(),o=n.t;for(r.t=o+i.t;--o>=0;)r[o]=0;for(o=0;o<i.t;++o)r[o+n.t]=n.am(0,i[o],r,o,0,n.t);r.s=0,r.clamp(),this.s!=e.s&&t.ZERO.subTo(r,r)},t.prototype.squareTo=function(e){for(var r=this.abs(),n=e.t=2*r.t;--n>=0;)e[n]=0;for(n=0;n<r.t-1;++n){var i=r.am(n,r[n],e,2*n,0,1);(e[n+r.t]+=r.am(n+1,2*r[n],e,2*n+1,i,r.t-n-1))>=r.DV&&(e[n+r.t]-=r.DV,e[n+r.t+1]=1)}e.t>0&&(e[e.t-1]+=r.am(n,r[n],e,2*n,0,1)),e.s=0,e.clamp()},t.prototype.divRemTo=function(e,r,n){var i=e.abs();if(!(i.t<=0)){var o=this.abs();if(o.t<i.t){r?.fromInt(0),n!=null&&this.copyTo(n);return}n==null&&(n=jt());var a=jt(),s=this.s,l=e.s,c=this.DB-qf(i[i.t-1]);c>0?(i.lShiftTo(c,a),o.lShiftTo(c,n)):(i.copyTo(a),o.copyTo(n));var u=a.t,f=a[u-1];if(f!=0){var h=f*(1<<this.F1)+(u>1?a[u-2]>>this.F2:0),v=this.FV/h,g=(1<<this.F1)/h,m=1<<this.F2,p=n.t,y=p-u,b=r??jt();for(a.dlShiftTo(y,b),n.compareTo(b)>=0&&(n[n.t++]=1,n.subTo(b,n)),t.ONE.dlShiftTo(u,b),b.subTo(a,a);a.t<u;)a[a.t++]=0;for(;--y>=0;){var $=n[--p]==f?this.DM:Math.floor(n[p]*v+(n[p-1]+m)*g);if((n[p]+=a.am(0,$,n,y,0,u))<$)for(a.dlShiftTo(y,b),n.subTo(b,n);n[p]<--$;)n.subTo(b,n)}r!=null&&(n.drShiftTo(u,r),s!=l&&t.ZERO.subTo(r,r)),n.t=u,n.clamp(),c>0&&n.rShiftTo(c,n),s<0&&t.ZERO.subTo(n,n)}}},t.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(!(e&1))return 0;var r=e&3;return r=r*(2-(e&15)*r)&15,r=r*(2-(e&255)*r)&255,r=r*(2-((e&65535)*r&65535))&65535,r=r*(2-e*r%this.DV)%this.DV,r>0?this.DV-r:-r},t.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},t.prototype.exp=function(e,r){if(e>4294967295||e<1)return t.ONE;var n=jt(),i=jt(),o=r.convert(this),a=qf(e)-1;for(o.copyTo(n);--a>=0;)if(r.sqrTo(n,i),(e&1<<a)>0)r.mulTo(i,o,n);else{var s=n;n=i,i=s}return r.revert(n)},t.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},t.prototype.toRadix=function(e){if(e==null&&(e=10),this.signum()==0||e<2||e>36)return"0";var r=this.chunkSize(e),n=Math.pow(e,r),i=la(n),o=jt(),a=jt(),s="";for(this.divRemTo(i,o,a);o.signum()>0;)s=(n+a.intValue()).toString(e).substr(1)+s,o.divRemTo(i,o,a);return a.intValue().toString(e)+s},t.prototype.fromRadix=function(e,r){this.fromInt(0),r==null&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),o=!1,a=0,s=0,l=0;l<e.length;++l){var c=$O(e,l);if(c<0){e.charAt(l)=="-"&&this.signum()==0&&(o=!0);continue}s=r*s+c,++a>=n&&(this.dMultiply(i),this.dAddOffset(s,0),a=0,s=0)}a>0&&(this.dMultiply(Math.pow(r,a)),this.dAddOffset(s,0)),o&&t.ZERO.subTo(this,this)},t.prototype.fromNumber=function(e,r,n){if(typeof r=="number")if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Uf,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(t.ONE.shiftLeft(e-1),this);else{var i=[],o=e&7;i.length=(e>>3)+1,r.nextBytes(i),o>0?i[0]&=(1<<o)-1:i[0]=0,this.fromString(i,256)}},t.prototype.bitwiseTo=function(e,r,n){var i,o,a=Math.min(e.t,this.t);for(i=0;i<a;++i)n[i]=r(this[i],e[i]);if(e.t<this.t){for(o=e.s&this.DM,i=a;i<this.t;++i)n[i]=r(this[i],o);n.t=this.t}else{for(o=this.s&this.DM,i=a;i<e.t;++i)n[i]=r(o,e[i]);n.t=e.t}n.s=r(this.s,e.s),n.clamp()},t.prototype.changeBit=function(e,r){var n=t.ONE.shiftLeft(e);return this.bitwiseTo(n,r,n),n},t.prototype.addTo=function(e,r){for(var n=0,i=0,o=Math.min(e.t,this.t);n<o;)i+=this[n]+e[n],r[n++]=i&this.DM,i>>=this.DB;if(e.t<this.t){for(i+=e.s;n<this.t;)i+=this[n],r[n++]=i&this.DM,i>>=this.DB;i+=this.s}else{for(i+=this.s;n<e.t;)i+=e[n],r[n++]=i&this.DM,i>>=this.DB;i+=e.s}r.s=i<0?-1:0,i>0?r[n++]=i:i<-1&&(r[n++]=this.DV+i),r.t=n,r.clamp()},t.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},t.prototype.dAddOffset=function(e,r){if(e!=0){for(;this.t<=r;)this[this.t++]=0;for(this[r]+=e;this[r]>=this.DV;)this[r]-=this.DV,++r>=this.t&&(this[this.t++]=0),++this[r]}},t.prototype.multiplyLowerTo=function(e,r,n){var i=Math.min(this.t+e.t,r);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(var o=n.t-this.t;i<o;++i)n[i+this.t]=this.am(0,e[i],n,i,0,this.t);for(var o=Math.min(e.t,r);i<o;++i)this.am(0,e[i],n,i,0,r-i);n.clamp()},t.prototype.multiplyUpperTo=function(e,r,n){--r;var i=n.t=this.t+e.t-r;for(n.s=0;--i>=0;)n[i]=0;for(i=Math.max(r-this.t,0);i<e.t;++i)n[this.t+i-r]=this.am(r-i,e[i],n,0,0,this.t+i-r);n.clamp(),n.drShiftTo(1,n)},t.prototype.modInt=function(e){if(e<=0)return 0;var r=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(r==0)n=this[0]%e;else for(var i=this.t-1;i>=0;--i)n=(r*n+this[i])%e;return n},t.prototype.millerRabin=function(e){var r=this.subtract(t.ONE),n=r.getLowestSetBit();if(n<=0)return!1;var i=r.shiftRight(n);e=e+1>>1,e>Mn.length&&(e=Mn.length);for(var o=jt(),a=0;a<e;++a){o.fromInt(Mn[Math.floor(Math.random()*Mn.length)]);var s=o.modPow(i,this);if(s.compareTo(t.ONE)!=0&&s.compareTo(r)!=0){for(var l=1;l++<n&&s.compareTo(r)!=0;)if(s=s.modPowInt(2,this),s.compareTo(t.ONE)==0)return!1;if(s.compareTo(r)!=0)return!1}}return!0},t.prototype.square=function(){var e=jt();return this.squareTo(e),e},t.prototype.gcda=function(e,r){var n=this.s<0?this.negate():this.clone(),i=e.s<0?e.negate():e.clone();if(n.compareTo(i)<0){var o=n;n=i,i=o}var a=n.getLowestSetBit(),s=i.getLowestSetBit();if(s<0){r(n);return}a<s&&(s=a),s>0&&(n.rShiftTo(s,n),i.rShiftTo(s,i));var l=function(){(a=n.getLowestSetBit())>0&&n.rShiftTo(a,n),(a=i.getLowestSetBit())>0&&i.rShiftTo(a,i),n.compareTo(i)>=0?(n.subTo(i,n),n.rShiftTo(1,n)):(i.subTo(n,i),i.rShiftTo(1,i)),n.signum()>0?setTimeout(l,0):(s>0&&i.lShiftTo(s,i),setTimeout(function(){r(i)},0))};setTimeout(l,10)},t.prototype.fromNumberAsync=function(e,r,n,i){if(typeof r=="number")if(e<2)this.fromInt(1);else{this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(t.ONE.shiftLeft(e-1),Uf,this),this.isEven()&&this.dAddOffset(1,0);var o=this,a=function(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(t.ONE.shiftLeft(e-1),o),o.isProbablePrime(r)?setTimeout(function(){i()},0):setTimeout(a,0)};setTimeout(a,0)}else{var s=[],l=e&7;s.length=(e>>3)+1,r.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},t}(),kZ=function(){function t(){}return t.prototype.convert=function(e){return e},t.prototype.revert=function(e){return e},t.prototype.mulTo=function(e,r,n){e.multiplyTo(r,n)},t.prototype.sqrTo=function(e,r){e.squareTo(r)},t}(),mO=function(){function t(e){this.m=e}return t.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},t.prototype.revert=function(e){return e},t.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},t.prototype.mulTo=function(e,r,n){e.multiplyTo(r,n),this.reduce(n)},t.prototype.sqrTo=function(e,r){e.squareTo(r),this.reduce(r)},t}(),yO=function(){function t(e){this.m=e,this.mp=e.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}return t.prototype.convert=function(e){var r=jt();return e.abs().dlShiftTo(this.m.t,r),r.divRemTo(this.m,null,r),e.s<0&&r.compareTo(Rt.ZERO)>0&&this.m.subTo(r,r),r},t.prototype.revert=function(e){var r=jt();return e.copyTo(r),this.reduce(r),r},t.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var r=0;r<this.m.t;++r){var n=e[r]&32767,i=n*this.mpl+((n*this.mph+(e[r]>>15)*this.mpl&this.um)<<15)&e.DM;for(n=r+this.m.t,e[n]+=this.m.am(0,i,e,r,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},t.prototype.mulTo=function(e,r,n){e.multiplyTo(r,n),this.reduce(n)},t.prototype.sqrTo=function(e,r){e.squareTo(r),this.reduce(r)},t}(),BZ=function(){function t(e){this.m=e,this.r2=jt(),this.q3=jt(),Rt.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}return t.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var r=jt();return e.copyTo(r),this.reduce(r),r},t.prototype.revert=function(e){return e},t.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},t.prototype.mulTo=function(e,r,n){e.multiplyTo(r,n),this.reduce(n)},t.prototype.sqrTo=function(e,r){e.squareTo(r),this.reduce(r)},t}();function jt(){return new Rt(null)}function Er(t,e){return new Rt(t,e)}var bO=typeof navigator<"u";bO&&gO&&navigator.appName=="Microsoft Internet Explorer"?(Rt.prototype.am=function(e,r,n,i,o,a){for(var s=r&32767,l=r>>15;--a>=0;){var c=this[e]&32767,u=this[e++]>>15,f=l*c+u*s;c=s*c+((f&32767)<<15)+n[i]+(o&1073741823),o=(c>>>30)+(f>>>15)+l*u+(o>>>30),n[i++]=c&1073741823}return o},ba=30):bO&&gO&&navigator.appName!="Netscape"?(Rt.prototype.am=function(e,r,n,i,o,a){for(;--a>=0;){var s=r*this[e++]+n[i]+o;o=Math.floor(s/67108864),n[i++]=s&67108863}return o},ba=26):(Rt.prototype.am=function(e,r,n,i,o,a){for(var s=r&16383,l=r>>14;--a>=0;){var c=this[e]&16383,u=this[e++]>>14,f=l*c+u*s;c=s*c+((f&16383)<<14)+n[i]+o,o=(c>>28)+(f>>14)+l*u,n[i++]=c&268435455}return o},ba=28);Rt.prototype.DB=ba;Rt.prototype.DM=(1<<ba)-1;Rt.prototype.DV=1<<ba;var Bw=52;Rt.prototype.FV=Math.pow(2,Bw);Rt.prototype.F1=Bw-ba;Rt.prototype.F2=2*ba-Bw;var Gp=[],Sc,Pi;Sc=48;for(Pi=0;Pi<=9;++Pi)Gp[Sc++]=Pi;Sc=97;for(Pi=10;Pi<36;++Pi)Gp[Sc++]=Pi;Sc=65;for(Pi=10;Pi<36;++Pi)Gp[Sc++]=Pi;function $O(t,e){var r=Gp[t.charCodeAt(e)];return r??-1}function la(t){var e=jt();return e.fromInt(t),e}function qf(t){var e=1,r;return(r=t>>>16)!=0&&(t=r,e+=16),(r=t>>8)!=0&&(t=r,e+=8),(r=t>>4)!=0&&(t=r,e+=4),(r=t>>2)!=0&&(t=r,e+=2),(r=t>>1)!=0&&(t=r,e+=1),e}Rt.ZERO=la(0);Rt.ONE=la(1);var FZ=function(){function t(){this.i=0,this.j=0,this.S=[]}return t.prototype.init=function(e){var r,n,i;for(r=0;r<256;++r)this.S[r]=r;for(n=0,r=0;r<256;++r)n=n+this.S[r]+e[r%e.length]&255,i=this.S[r],this.S[r]=this.S[n],this.S[n]=i;this.i=0,this.j=0},t.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]},t}();function LZ(){return new FZ}var yA=256,Gf,pa=null,Li;if(pa==null){pa=[],Li=0;var Xf=void 0;if(typeof window<"u"&&window.crypto&&window.crypto.getRandomValues){var Fm=new Uint32Array(256);for(window.crypto.getRandomValues(Fm),Xf=0;Xf<Fm.length;++Xf)pa[Li++]=Fm[Xf]&255}var Yf=0,Jf=function(t){if(Yf=Yf||0,Yf>=256||Li>=yA){window.removeEventListener?window.removeEventListener("mousemove",Jf,!1):window.detachEvent&&window.detachEvent("onmousemove",Jf);return}try{var e=t.x+t.y;pa[Li++]=e&255,Yf+=1}catch{}};typeof window<"u"&&(window.addEventListener?window.addEventListener("mousemove",Jf,!1):window.attachEvent&&window.attachEvent("onmousemove",Jf))}function zZ(){if(Gf==null){for(Gf=LZ();Li<yA;){var t=Math.floor(65536*Math.random());pa[Li++]=t&255}for(Gf.init(pa),Li=0;Li<pa.length;++Li)pa[Li]=0;Li=0}return Gf.next()}var m1=function(){function t(){}return t.prototype.nextBytes=function(e){for(var r=0;r<e.length;++r)e[r]=zZ()},t}();function HZ(t,e){if(e<t.length+22)return console.error("Message too long for RSA"),null;for(var r=e-t.length-6,n="",i=0;i<r;i+=2)n+="ff";var o="0001"+n+"00"+t;return Er(o,16)}function VZ(t,e){if(e<t.length+11)return console.error("Message too long for RSA"),null;for(var r=[],n=t.length-1;n>=0&&e>0;){var i=t.charCodeAt(n--);i<128?r[--e]=i:i>127&&i<2048?(r[--e]=i&63|128,r[--e]=i>>6|192):(r[--e]=i&63|128,r[--e]=i>>6&63|128,r[--e]=i>>12|224)}r[--e]=0;for(var o=new m1,a=[];e>2;){for(a[0]=0;a[0]==0;)o.nextBytes(a);r[--e]=a[0]}return r[--e]=2,r[--e]=0,new Rt(r)}var WZ=function(){function t(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return t.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},t.prototype.doPrivate=function(e){if(this.p==null||this.q==null)return e.modPow(this.d,this.n);for(var r=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);r.compareTo(n)<0;)r=r.add(this.p);return r.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},t.prototype.setPublic=function(e,r){e!=null&&r!=null&&e.length>0&&r.length>0?(this.n=Er(e,16),this.e=parseInt(r,16)):console.error("Invalid RSA public key")},t.prototype.encrypt=function(e){var r=this.n.bitLength()+7>>3,n=VZ(e,r);if(n==null)return null;var i=this.doPublic(n);if(i==null)return null;for(var o=i.toString(16),a=o.length,s=0;s<r*2-a;s++)o="0"+o;return o},t.prototype.setPrivate=function(e,r,n){e!=null&&r!=null&&e.length>0&&r.length>0?(this.n=Er(e,16),this.e=parseInt(r,16),this.d=Er(n,16)):console.error("Invalid RSA private key")},t.prototype.setPrivateEx=function(e,r,n,i,o,a,s,l){e!=null&&r!=null&&e.length>0&&r.length>0?(this.n=Er(e,16),this.e=parseInt(r,16),this.d=Er(n,16),this.p=Er(i,16),this.q=Er(o,16),this.dmp1=Er(a,16),this.dmq1=Er(s,16),this.coeff=Er(l,16)):console.error("Invalid RSA private key")},t.prototype.generate=function(e,r){var n=new m1,i=e>>1;this.e=parseInt(r,16);for(var o=new Rt(r,16);;){for(;this.p=new Rt(e-i,1,n),!(this.p.subtract(Rt.ONE).gcd(o).compareTo(Rt.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new Rt(i,1,n),!(this.q.subtract(Rt.ONE).gcd(o).compareTo(Rt.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var a=this.p;this.p=this.q,this.q=a}var s=this.p.subtract(Rt.ONE),l=this.q.subtract(Rt.ONE),c=s.multiply(l);if(c.gcd(o).compareTo(Rt.ONE)==0){this.n=this.p.multiply(this.q),this.d=o.modInverse(c),this.dmp1=this.d.mod(s),this.dmq1=this.d.mod(l),this.coeff=this.q.modInverse(this.p);break}}},t.prototype.decrypt=function(e){var r=Er(e,16),n=this.doPrivate(r);return n==null?null:KZ(n,this.n.bitLength()+7>>3)},t.prototype.generateAsync=function(e,r,n){var i=new m1,o=e>>1;this.e=parseInt(r,16);var a=new Rt(r,16),s=this,l=function(){var c=function(){if(s.p.compareTo(s.q)<=0){var h=s.p;s.p=s.q,s.q=h}var v=s.p.subtract(Rt.ONE),g=s.q.subtract(Rt.ONE),m=v.multiply(g);m.gcd(a).compareTo(Rt.ONE)==0?(s.n=s.p.multiply(s.q),s.d=a.modInverse(m),s.dmp1=s.d.mod(v),s.dmq1=s.d.mod(g),s.coeff=s.q.modInverse(s.p),setTimeout(function(){n()},0)):setTimeout(l,0)},u=function(){s.q=jt(),s.q.fromNumberAsync(o,1,i,function(){s.q.subtract(Rt.ONE).gcda(a,function(h){h.compareTo(Rt.ONE)==0&&s.q.isProbablePrime(10)?setTimeout(c,0):setTimeout(u,0)})})},f=function(){s.p=jt(),s.p.fromNumberAsync(e-o,1,i,function(){s.p.subtract(Rt.ONE).gcda(a,function(h){h.compareTo(Rt.ONE)==0&&s.p.isProbablePrime(10)?setTimeout(u,0):setTimeout(f,0)})})};setTimeout(f,0)};setTimeout(l,0)},t.prototype.sign=function(e,r,n){var i=UZ(n),o=i+r(e).toString(),a=HZ(o,this.n.bitLength()/4);if(a==null)return null;var s=this.doPrivate(a);if(s==null)return null;var l=s.toString(16);return l.length&1?"0"+l:l},t.prototype.verify=function(e,r,n){var i=Er(r,16),o=this.doPublic(i);if(o==null)return null;var a=o.toString(16).replace(/^1f+00/,""),s=qZ(a);return s==n(e).toString()},t}();function KZ(t,e){for(var r=t.toByteArray(),n=0;n<r.length&&r[n]==0;)++n;if(r.length-n!=e-1||r[n]!=2)return null;for(++n;r[n]!=0;)if(++n>=r.length)return null;for(var i="";++n<r.length;){var o=r[n]&255;o<128?i+=String.fromCharCode(o):o>191&&o<224?(i+=String.fromCharCode((o&31)<<6|r[n+1]&63),++n):(i+=String.fromCharCode((o&15)<<12|(r[n+1]&63)<<6|r[n+2]&63),n+=2)}return i}var Jh={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function UZ(t){return Jh[t]||""}function qZ(t){for(var e in Jh)if(Jh.hasOwnProperty(e)){var r=Jh[e],n=r.length;if(t.substr(0,n)==r)return t.substr(n)}return t}/*!
Copyright (c) 2011, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.9.0
*/var Fr={};Fr.lang={extend:function(t,e,r){if(!e||!t)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var n=function(){};if(n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t,t.superclass=e.prototype,e.prototype.constructor==Object.prototype.constructor&&(e.prototype.constructor=e),r){var i;for(i in r)t.prototype[i]=r[i];var o=function(){},a=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(o=function(s,l){for(i=0;i<a.length;i=i+1){var c=a[i],u=l[c];typeof u=="function"&&u!=Object.prototype[c]&&(s[c]=u)}})}catch{}o(t.prototype,r)}}};/**
 * @fileOverview
 * @name asn1-1.0.js
 * @author Kenji Urushima kenji.urushima@gmail.com
 * @version asn1 1.0.13 (2017-Jun-02)
 * @since jsrsasign 2.1
 * @license <a href="https://kjur.github.io/jsrsasign/license/">MIT License</a>
 */var Pe={};(typeof Pe.asn1>"u"||!Pe.asn1)&&(Pe.asn1={});Pe.asn1.ASN1Util=new function(){this.integerToByteHex=function(t){var e=t.toString(16);return e.length%2==1&&(e="0"+e),e},this.bigIntToMinTwosComplementsHex=function(t){var e=t.toString(16);if(e.substr(0,1)!="-")e.length%2==1?e="0"+e:e.match(/^[0-7]/)||(e="00"+e);else{var r=e.substr(1),n=r.length;n%2==1?n+=1:e.match(/^[0-7]/)||(n+=2);for(var i="",o=0;o<n;o++)i+="f";var a=new Rt(i,16),s=a.xor(t).add(Rt.ONE);e=s.toString(16).replace(/^-/,"")}return e},this.getPEMStringFromHex=function(t,e){return hextopem(t,e)},this.newObject=function(t){var e=Pe,r=e.asn1,n=r.DERBoolean,i=r.DERInteger,o=r.DERBitString,a=r.DEROctetString,s=r.DERNull,l=r.DERObjectIdentifier,c=r.DEREnumerated,u=r.DERUTF8String,f=r.DERNumericString,h=r.DERPrintableString,v=r.DERTeletexString,g=r.DERIA5String,m=r.DERUTCTime,p=r.DERGeneralizedTime,y=r.DERSequence,b=r.DERSet,$=r.DERTaggedObject,S=r.ASN1Util.newObject,w=Object.keys(t);if(w.length!=1)throw"key of param shall be only one.";var C=w[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+C+":")==-1)throw"undefined key: "+C;if(C=="bool")return new n(t[C]);if(C=="int")return new i(t[C]);if(C=="bitstr")return new o(t[C]);if(C=="octstr")return new a(t[C]);if(C=="null")return new s(t[C]);if(C=="oid")return new l(t[C]);if(C=="enum")return new c(t[C]);if(C=="utf8str")return new u(t[C]);if(C=="numstr")return new f(t[C]);if(C=="prnstr")return new h(t[C]);if(C=="telstr")return new v(t[C]);if(C=="ia5str")return new g(t[C]);if(C=="utctime")return new m(t[C]);if(C=="gentime")return new p(t[C]);if(C=="seq"){for(var E=t[C],O=[],x=0;x<E.length;x++){var I=S(E[x]);O.push(I)}return new y({array:O})}if(C=="set"){for(var E=t[C],O=[],x=0;x<E.length;x++){var I=S(E[x]);O.push(I)}return new b({array:O})}if(C=="tag"){var T=t[C];if(Object.prototype.toString.call(T)==="[object Array]"&&T.length==3){var N=S(T[2]);return new $({tag:T[0],explicit:T[1],obj:N})}else{var P={};if(T.explicit!==void 0&&(P.explicit=T.explicit),T.tag!==void 0&&(P.tag=T.tag),T.obj===void 0)throw"obj shall be specified for 'tag'.";return P.obj=S(T.obj),new $(P)}}},this.jsonToASN1HEX=function(t){var e=this.newObject(t);return e.getEncodedHex()}};Pe.asn1.ASN1Util.oidHexToInt=function(t){for(var i="",e=parseInt(t.substr(0,2),16),r=Math.floor(e/40),n=e%40,i=r+"."+n,o="",a=2;a<t.length;a+=2){var s=parseInt(t.substr(a,2),16),l=("00000000"+s.toString(2)).slice(-8);if(o=o+l.substr(1,7),l.substr(0,1)=="0"){var c=new Rt(o,2);i=i+"."+c.toString(10),o=""}}return i};Pe.asn1.ASN1Util.oidIntToHex=function(t){var e=function(s){var l=s.toString(16);return l.length==1&&(l="0"+l),l},r=function(s){var l="",c=new Rt(s,10),u=c.toString(2),f=7-u.length%7;f==7&&(f=0);for(var h="",v=0;v<f;v++)h+="0";u=h+u;for(var v=0;v<u.length-1;v+=7){var g=u.substr(v,7);v!=u.length-7&&(g="1"+g),l+=e(parseInt(g,2))}return l};if(!t.match(/^[0-9.]+$/))throw"malformed oid string: "+t;var n="",i=t.split("."),o=parseInt(i[0])*40+parseInt(i[1]);n+=e(o),i.splice(0,2);for(var a=0;a<i.length;a++)n+=r(i[a]);return n};Pe.asn1.ASN1Object=function(){var t="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+t.length+",v="+this.hV;var e=this.hV.length/2,r=e.toString(16);if(r.length%2==1&&(r="0"+r),e<128)return r;var n=r.length/2;if(n>15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);var i=128+n;return i.toString(16)+r},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};Pe.asn1.DERAbstractString=function(t){Pe.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof t<"u"&&(typeof t=="string"?this.setString(t):typeof t.str<"u"?this.setString(t.str):typeof t.hex<"u"&&this.setStringHex(t.hex))};Fr.lang.extend(Pe.asn1.DERAbstractString,Pe.asn1.ASN1Object);Pe.asn1.DERAbstractTime=function(t){Pe.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){utc=e.getTime()+e.getTimezoneOffset()*6e4;var r=new Date(utc);return r},this.formatDate=function(e,r,n){var i=this.zeroPadding,o=this.localDateToUTC(e),a=String(o.getFullYear());r=="utc"&&(a=a.substr(2,2));var s=i(String(o.getMonth()+1),2),l=i(String(o.getDate()),2),c=i(String(o.getHours()),2),u=i(String(o.getMinutes()),2),f=i(String(o.getSeconds()),2),h=a+s+l+c+u+f;if(n===!0){var v=o.getMilliseconds();if(v!=0){var g=i(String(v),3);g=g.replace(/[0]+$/,""),h=h+"."+g}}return h+"Z"},this.zeroPadding=function(e,r){return e.length>=r?e:new Array(r-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,r,n,i,o,a){var s=new Date(Date.UTC(e,r-1,n,i,o,a,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}};Fr.lang.extend(Pe.asn1.DERAbstractTime,Pe.asn1.ASN1Object);Pe.asn1.DERAbstractStructured=function(t){Pe.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,typeof t<"u"&&typeof t.array<"u"&&(this.asn1Array=t.array)};Fr.lang.extend(Pe.asn1.DERAbstractStructured,Pe.asn1.ASN1Object);Pe.asn1.DERBoolean=function(){Pe.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};Fr.lang.extend(Pe.asn1.DERBoolean,Pe.asn1.ASN1Object);Pe.asn1.DERInteger=function(t){Pe.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var r=new Rt(String(e),10);this.setByBigInteger(r)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof t<"u"&&(typeof t.bigint<"u"?this.setByBigInteger(t.bigint):typeof t.int<"u"?this.setByInteger(t.int):typeof t=="number"?this.setByInteger(t):typeof t.hex<"u"&&this.setValueHex(t.hex))};Fr.lang.extend(Pe.asn1.DERInteger,Pe.asn1.ASN1Object);Pe.asn1.DERBitString=function(t){if(t!==void 0&&typeof t.obj<"u"){var e=Pe.asn1.ASN1Util.newObject(t.obj);t.hex="00"+e.getEncodedHex()}Pe.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(r){this.hTLV=null,this.isModified=!0,this.hV=r},this.setUnusedBitsAndHexValue=function(r,n){if(r<0||7<r)throw"unused bits shall be from 0 to 7: u = "+r;var i="0"+r;this.hTLV=null,this.isModified=!0,this.hV=i+n},this.setByBinaryString=function(r){r=r.replace(/0+$/,"");var n=8-r.length%8;n==8&&(n=0);for(var i=0;i<=n;i++)r+="0";for(var o="",i=0;i<r.length-1;i+=8){var a=r.substr(i,8),s=parseInt(a,2).toString(16);s.length==1&&(s="0"+s),o+=s}this.hTLV=null,this.isModified=!0,this.hV="0"+n+o},this.setByBooleanArray=function(r){for(var n="",i=0;i<r.length;i++)r[i]==!0?n+="1":n+="0";this.setByBinaryString(n)},this.newFalseArray=function(r){for(var n=new Array(r),i=0;i<r;i++)n[i]=!1;return n},this.getFreshValueHex=function(){return this.hV},typeof t<"u"&&(typeof t=="string"&&t.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(t):typeof t.hex<"u"?this.setHexValueIncludingUnusedBits(t.hex):typeof t.bin<"u"?this.setByBinaryString(t.bin):typeof t.array<"u"&&this.setByBooleanArray(t.array))};Fr.lang.extend(Pe.asn1.DERBitString,Pe.asn1.ASN1Object);Pe.asn1.DEROctetString=function(t){if(t!==void 0&&typeof t.obj<"u"){var e=Pe.asn1.ASN1Util.newObject(t.obj);t.hex=e.getEncodedHex()}Pe.asn1.DEROctetString.superclass.constructor.call(this,t),this.hT="04"};Fr.lang.extend(Pe.asn1.DEROctetString,Pe.asn1.DERAbstractString);Pe.asn1.DERNull=function(){Pe.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};Fr.lang.extend(Pe.asn1.DERNull,Pe.asn1.ASN1Object);Pe.asn1.DERObjectIdentifier=function(t){var e=function(n){var i=n.toString(16);return i.length==1&&(i="0"+i),i},r=function(n){var i="",o=new Rt(n,10),a=o.toString(2),s=7-a.length%7;s==7&&(s=0);for(var l="",c=0;c<s;c++)l+="0";a=l+a;for(var c=0;c<a.length-1;c+=7){var u=a.substr(c,7);c!=a.length-7&&(u="1"+u),i+=e(parseInt(u,2))}return i};Pe.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(n){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueOidString=function(n){if(!n.match(/^[0-9.]+$/))throw"malformed oid string: "+n;var i="",o=n.split("."),a=parseInt(o[0])*40+parseInt(o[1]);i+=e(a),o.splice(0,2);for(var s=0;s<o.length;s++)i+=r(o[s]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=i},this.setValueName=function(n){var i=Pe.asn1.x509.OID.name2oid(n);if(i!=="")this.setValueOidString(i);else throw"DERObjectIdentifier oidName undefined: "+n},this.getFreshValueHex=function(){return this.hV},t!==void 0&&(typeof t=="string"?t.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(t):this.setValueName(t):t.oid!==void 0?this.setValueOidString(t.oid):t.hex!==void 0?this.setValueHex(t.hex):t.name!==void 0&&this.setValueName(t.name))};Fr.lang.extend(Pe.asn1.DERObjectIdentifier,Pe.asn1.ASN1Object);Pe.asn1.DEREnumerated=function(t){Pe.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=Pe.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var r=new Rt(String(e),10);this.setByBigInteger(r)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},typeof t<"u"&&(typeof t.int<"u"?this.setByInteger(t.int):typeof t=="number"?this.setByInteger(t):typeof t.hex<"u"&&this.setValueHex(t.hex))};Fr.lang.extend(Pe.asn1.DEREnumerated,Pe.asn1.ASN1Object);Pe.asn1.DERUTF8String=function(t){Pe.asn1.DERUTF8String.superclass.constructor.call(this,t),this.hT="0c"};Fr.lang.extend(Pe.asn1.DERUTF8String,Pe.asn1.DERAbstractString);Pe.asn1.DERNumericString=function(t){Pe.asn1.DERNumericString.superclass.constructor.call(this,t),this.hT="12"};Fr.lang.extend(Pe.asn1.DERNumericString,Pe.asn1.DERAbstractString);Pe.asn1.DERPrintableString=function(t){Pe.asn1.DERPrintableString.superclass.constructor.call(this,t),this.hT="13"};Fr.lang.extend(Pe.asn1.DERPrintableString,Pe.asn1.DERAbstractString);Pe.asn1.DERTeletexString=function(t){Pe.asn1.DERTeletexString.superclass.constructor.call(this,t),this.hT="14"};Fr.lang.extend(Pe.asn1.DERTeletexString,Pe.asn1.DERAbstractString);Pe.asn1.DERIA5String=function(t){Pe.asn1.DERIA5String.superclass.constructor.call(this,t),this.hT="16"};Fr.lang.extend(Pe.asn1.DERIA5String,Pe.asn1.DERAbstractString);Pe.asn1.DERUTCTime=function(t){Pe.asn1.DERUTCTime.superclass.constructor.call(this,t),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},t!==void 0&&(t.str!==void 0?this.setString(t.str):typeof t=="string"&&t.match(/^[0-9]{12}Z$/)?this.setString(t):t.hex!==void 0?this.setStringHex(t.hex):t.date!==void 0&&this.setByDate(t.date))};Fr.lang.extend(Pe.asn1.DERUTCTime,Pe.asn1.DERAbstractTime);Pe.asn1.DERGeneralizedTime=function(t){Pe.asn1.DERGeneralizedTime.superclass.constructor.call(this,t),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},t!==void 0&&(t.str!==void 0?this.setString(t.str):typeof t=="string"&&t.match(/^[0-9]{14}Z$/)?this.setString(t):t.hex!==void 0?this.setStringHex(t.hex):t.date!==void 0&&this.setByDate(t.date),t.millis===!0&&(this.withMillis=!0))};Fr.lang.extend(Pe.asn1.DERGeneralizedTime,Pe.asn1.DERAbstractTime);Pe.asn1.DERSequence=function(t){Pe.asn1.DERSequence.superclass.constructor.call(this,t),this.hT="30",this.getFreshValueHex=function(){for(var e="",r=0;r<this.asn1Array.length;r++){var n=this.asn1Array[r];e+=n.getEncodedHex()}return this.hV=e,this.hV}};Fr.lang.extend(Pe.asn1.DERSequence,Pe.asn1.DERAbstractStructured);Pe.asn1.DERSet=function(t){Pe.asn1.DERSet.superclass.constructor.call(this,t),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,r=0;r<this.asn1Array.length;r++){var n=this.asn1Array[r];e.push(n.getEncodedHex())}return this.sortFlag==!0&&e.sort(),this.hV=e.join(""),this.hV},typeof t<"u"&&typeof t.sortflag<"u"&&t.sortflag==!1&&(this.sortFlag=!1)};Fr.lang.extend(Pe.asn1.DERSet,Pe.asn1.DERAbstractStructured);Pe.asn1.DERTaggedObject=function(t){Pe.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,r,n){this.hT=r,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,r),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof t<"u"&&(typeof t.tag<"u"&&(this.hT=t.tag),typeof t.explicit<"u"&&(this.isExplicit=t.explicit),typeof t.obj<"u"&&(this.asn1Object=t.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};Fr.lang.extend(Pe.asn1.DERTaggedObject,Pe.asn1.ASN1Object);var GZ=function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function n(){this.constructor=e}e.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wO=function(t){GZ(e,t);function e(r){var n=t.call(this)||this;return r&&(typeof r=="string"?n.parseKey(r):(e.hasPrivateKeyProperty(r)||e.hasPublicKeyProperty(r))&&n.parsePropertiesFrom(r)),n}return e.prototype.parseKey=function(r){try{var n=0,i=0,o=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,a=o.test(r)?RZ.decode(r):g1.unarmor(r),s=DZ.decode(a);if(s.sub.length===3&&(s=s.sub[2].sub[0]),s.sub.length===9){n=s.sub[1].getHexStringValue(),this.n=Er(n,16),i=s.sub[2].getHexStringValue(),this.e=parseInt(i,16);var l=s.sub[3].getHexStringValue();this.d=Er(l,16);var c=s.sub[4].getHexStringValue();this.p=Er(c,16);var u=s.sub[5].getHexStringValue();this.q=Er(u,16);var f=s.sub[6].getHexStringValue();this.dmp1=Er(f,16);var h=s.sub[7].getHexStringValue();this.dmq1=Er(h,16);var v=s.sub[8].getHexStringValue();this.coeff=Er(v,16)}else if(s.sub.length===2)if(s.sub[0].sub){var g=s.sub[1],m=g.sub[0];n=m.sub[0].getHexStringValue(),this.n=Er(n,16),i=m.sub[1].getHexStringValue(),this.e=parseInt(i,16)}else n=s.sub[0].getHexStringValue(),this.n=Er(n,16),i=s.sub[1].getHexStringValue(),this.e=parseInt(i,16);else return!1;return!0}catch{return!1}},e.prototype.getPrivateBaseKey=function(){var r={array:[new Pe.asn1.DERInteger({int:0}),new Pe.asn1.DERInteger({bigint:this.n}),new Pe.asn1.DERInteger({int:this.e}),new Pe.asn1.DERInteger({bigint:this.d}),new Pe.asn1.DERInteger({bigint:this.p}),new Pe.asn1.DERInteger({bigint:this.q}),new Pe.asn1.DERInteger({bigint:this.dmp1}),new Pe.asn1.DERInteger({bigint:this.dmq1}),new Pe.asn1.DERInteger({bigint:this.coeff})]},n=new Pe.asn1.DERSequence(r);return n.getEncodedHex()},e.prototype.getPrivateBaseKeyB64=function(){return kv(this.getPrivateBaseKey())},e.prototype.getPublicBaseKey=function(){var r=new Pe.asn1.DERSequence({array:[new Pe.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new Pe.asn1.DERNull]}),n=new Pe.asn1.DERSequence({array:[new Pe.asn1.DERInteger({bigint:this.n}),new Pe.asn1.DERInteger({int:this.e})]}),i=new Pe.asn1.DERBitString({hex:"00"+n.getEncodedHex()}),o=new Pe.asn1.DERSequence({array:[r,i]});return o.getEncodedHex()},e.prototype.getPublicBaseKeyB64=function(){return kv(this.getPublicBaseKey())},e.wordwrap=function(r,n){if(n=n||64,!r)return r;var i="(.{1,"+n+`})( +|$
?)|(.{1,`+n+"})";return r.match(RegExp(i,"g")).join(`
`)},e.prototype.getPrivateKey=function(){var r=`-----BEGIN RSA PRIVATE KEY-----
`;return r+=e.wordwrap(this.getPrivateBaseKeyB64())+`
`,r+="-----END RSA PRIVATE KEY-----",r},e.prototype.getPublicKey=function(){var r=`-----BEGIN PUBLIC KEY-----
`;return r+=e.wordwrap(this.getPublicBaseKeyB64())+`
`,r+="-----END PUBLIC KEY-----",r},e.hasPublicKeyProperty=function(r){return r=r||{},r.hasOwnProperty("n")&&r.hasOwnProperty("e")},e.hasPrivateKeyProperty=function(r){return r=r||{},r.hasOwnProperty("n")&&r.hasOwnProperty("e")&&r.hasOwnProperty("d")&&r.hasOwnProperty("p")&&r.hasOwnProperty("q")&&r.hasOwnProperty("dmp1")&&r.hasOwnProperty("dmq1")&&r.hasOwnProperty("coeff")},e.prototype.parsePropertiesFrom=function(r){this.n=r.n,this.e=r.e,r.hasOwnProperty("d")&&(this.d=r.d,this.p=r.p,this.q=r.q,this.dmp1=r.dmp1,this.dmq1=r.dmq1,this.coeff=r.coeff)},e}(WZ),XZ={},Lm,YZ=typeof process<"u"?(Lm=XZ)===null||Lm===void 0?void 0:Lm.npm_package_version:void 0,JZ=function(){function t(e){e===void 0&&(e={}),e=e||{},this.default_key_size=e.default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}return t.prototype.setKey=function(e){this.log&&this.key&&console.warn("A key was already set, overriding existing."),this.key=new wO(e)},t.prototype.setPrivateKey=function(e){this.setKey(e)},t.prototype.setPublicKey=function(e){this.setKey(e)},t.prototype.decrypt=function(e){try{return this.getKey().decrypt(vO(e))}catch{return!1}},t.prototype.encrypt=function(e){try{return kv(this.getKey().encrypt(e))}catch{return!1}},t.prototype.sign=function(e,r,n){try{return kv(this.getKey().sign(e,r,n))}catch{return!1}},t.prototype.verify=function(e,r,n){try{return this.getKey().verify(e,vO(r),n)}catch{return!1}},t.prototype.getKey=function(e){if(!this.key){if(this.key=new wO,e&&{}.toString.call(e)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},t.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},t.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},t.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},t.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},t.version=YZ,t}();async function l5e(){try{const e=await(await fetch(`${pA.apiBaseUrl}/api/chat/rsa_public_key`)).json();if(!e.success)throw new Error(e.message||"Failed to fetch RSA public key");return e.data}catch(t){throw console.error("Error fetching RSA public key:",t),t}}async function SO(t,e){try{if(window.crypto&&window.crypto.subtle){const r="-----BEGIN PUBLIC KEY-----",i=e.substring(e.indexOf(r)+r.length,e.indexOf("-----END PUBLIC KEY-----")).replace(/\s/g,""),o=window.atob(i),a=new ArrayBuffer(o.length),s=new Uint8Array(a);for(let h=0;h<o.length;h++)s[h]=o.charCodeAt(h);const l=await window.crypto.subtle.importKey("spki",a,{name:"RSA-OAEP",hash:"SHA-256"},!1,["encrypt"]),u=new TextEncoder().encode(t),f=await window.crypto.subtle.encrypt({name:"RSA-OAEP"},l,u);return ZZ(f)}else{console.warn("Web Crypto API 不可用，使用 JSEncrypt 作为备选方案");const r=new JZ;r.setPublicKey(e);const n=r.encrypt(t);if(!n)throw new Error("JSEncrypt 加密失败");return n}}catch(r){throw console.error("Error encrypting data with RSA public key:",r),r}}function ZZ(t){const e=new Uint8Array(t);let r="";const n=e.byteLength;for(let i=0;i<n;i++)r+=String.fromCharCode(e[i]);return window.btoa(r)}async function c5e(t,e){try{const n=await(await fetch("/verify_openai_key",{method:"GET",headers:{"Openai-Api-Key":t,"Openai-Base-Url":e}})).json();return n.success&&n.data===!0}catch(r){return console.error("Error verifying OpenAI API key:",r),!1}}const na=pA.apiBaseUrl,Ja=()=>localStorage.getItem("chatApiKey"),Zf=()=>{const t=localStorage.getItem("openaiApiKey"),e=localStorage.getItem("openaiBaseUrl"),r=localStorage.getItem("rsaPublicKey"),n=localStorage.getItem("workflowLLMApiKey"),i=localStorage.getItem("workflowLLMBaseUrl"),o=localStorage.getItem("workflowLLMModel");return{openaiApiKey:t||"",openaiBaseUrl:e||"",rsaPublicKey:r,workflowLLMApiKey:n||"",workflowLLMBaseUrl:i||"",workflowLLMModel:o||""}},tu=()=>navigator.language||"zh-CN",ru=t=>{const e=t.headers.get("User-Api-Key");e&&!localStorage.getItem("chatApiKey")&&localStorage.setItem("chatApiKey",e)};var yo;(t=>{async function e(m){try{const p=Ja(),y=tu();m.session_id=localStorage.getItem("sessionId")||null,fetch(`${na}/api/chat/track_event`,{method:"POST",headers:{"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${p}`,"trace-id":Gn(),"Accept-Language":y},body:JSON.stringify(m)}).catch(b=>{console.warn("Track event failed:",b)})}catch(p){console.warn("Error preparing track event:",p)}return Promise.resolve()}t.trackEvent=e;async function r(m){try{const p=new FormData;p.append("image",m),p.append("type","input");const y=await OZ("/upload/image",{method:"POST",headers:{Accept:"*/*","Accept-Language":"zh-CN,zh;q=0.9,en;q=0.8","Cache-Control":"max-age=0","Comfy-User":"",Origin:na,Referer:`${na}/`,"Sec-Fetch-Dest":"empty","Sec-Fetch-Mode":"cors","Sec-Fetch-Site":"same-origin"},body:p});if(!y.ok)throw new Error(`Upload failed: ${y.status} ${y.statusText}`);return await y.json()}catch(p){throw console.error("Error uploading image:",p),p}}t.uploadImage=r;async function*n(m,p,y=[],b=null,$=null,S,w,C=[],E){try{const O=Ja(),x=fr.extensionManager.setting.get("Comfy.Locale"),{openaiApiKey:I,openaiBaseUrl:T,rsaPublicKey:N,workflowLLMApiKey:P,workflowLLMBaseUrl:_,workflowLLMModel:R}=Zf(),M=Gn();e({event_type:"chat_request",message_type:"chat",data:{prompt:p,ext:$,intent:b,messageId:M}});const D=C.filter(z=>z.role!=="showcase"&&z.role!=="tool").map(z=>{if(z.role==="user")return{role:"user",content:z.content};if(z.role==="ai"||z.role==="assistant")try{return{role:"assistant",content:JSON.parse(z.content).text||z.content}}catch{return{role:"assistant",content:z.content}}return{role:z.role,content:z.content}});let j={role:"user",content:p};if(y&&y.length>0){const z=[{type:"input_text",text:p+" Current image filenames: "+y.map(K=>K.name).join(", ")}];y.forEach(K=>{K.url&&z.push({type:"input_image",detail:"low",image_url:K.url})}),j.content=z}const k=[...D,j];let V=$?Array.isArray($)?$:[$]:[],G=null;if(E)try{console.log("Saving workflow checkpoint before invoke...");const z=await fr.graphToPrompt();G=(await g(m,z.output,z.workflow,E)).checkpoint_id,console.log(`Successfully saved workflow checkpoint with ID: ${G}`)}catch(z){console.error("Failed to save workflow checkpoint before invoke:",z)}const W={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${O}`,"trace-id":S||Gn(),"Accept-Language":x};if(I&&I.trim()!==""&&N)try{W["Openai-Base-Url"]=T}catch(z){console.error("Error encrypting OpenAI API key:",z)}_&&(W["Workflow-LLM-Base-Url"]=_),P&&(W["Workflow-LLM-Api-Key"]=P),R&&(W["Workflow-LLM-Model"]=R);const Y=new AbortController,q=setTimeout(()=>Y.abort(),12e4);w&&w.addEventListener("abort",()=>{clearTimeout(q),Y.abort()});let J="/api/chat/invoke";b&&b!==""?J=`${na}/api/chat/invoke`:W["Openai-Api-Key"]=I;const oe=await fetch(J,{method:"POST",headers:W,body:JSON.stringify({session_id:m,prompt:p,mock:!1,intent:b,ext:V,messages:k,images:[],workflow_checkpoint_id:G}),signal:Y.signal});clearTimeout(q),ru(oe);const ie=oe.body.getReader();let te="";for(;;){const{done:z,value:K}=await ie.read();if(z)break;te+=new TextDecoder().decode(K);const B=te.split(`
`);te=B.pop()||"";for(const F of B)F.trim()&&(yield{...JSON.parse(F),message_id:M})}te.trim()&&(yield{...JSON.parse(te),message_id:M})}catch(O){if(console.error("Error in streamInvokeServer:",O),O instanceof Error&&O.name==="AbortError"){if(w?.aborted)throw O;alert("Request timed out after 2 minutes. Please try again.")}else alert(O instanceof Error?O.message:"An error occurred while streaming, please refresh the page and try again.");throw O}}t.streamInvokeServer=n;async function i(m,p){try{const y=Ja(),b=tu(),{openaiApiKey:$,openaiBaseUrl:S,rsaPublicKey:w,workflowLLMApiKey:C,workflowLLMBaseUrl:E}=Zf(),O={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${y}`,"trace-id":Gn(),"Accept-Language":b};if($&&$.trim()!==""&&w)try{const T=await SO($,w);O["Encrypted-Openai-Api-Key"]=T,O["Openai-Base-Url"]=S}catch(T){console.error("Error encrypting OpenAI API key:",T)}E&&(O["Workflow-LLM-Base-Url"]=E),C&&(O["Workflow-LLM-Api-Key"]=C);const x=await fetch(`${na}/api/chat/get_optimized_workflow`,{method:"POST",headers:O,body:JSON.stringify({workflow_id:m,prompt:p})});ru(x);const I=await x.json();if(!I.success){const T=I.message||"Failed to get optimized workflow";throw alert(T),new Error(T)}return I.data}catch(y){throw console.error("Error getting optimized workflow:",y),alert(y instanceof Error?y.message:"Failed to get optimized workflow"),y}}t.getOptimizedWorkflow=i;async function o(m){const p=Ja(),y=tu(),{openaiApiKey:b,openaiBaseUrl:$,rsaPublicKey:S,workflowLLMApiKey:w,workflowLLMBaseUrl:C}=Zf(),E={"Content-Type":"application/json",Authorization:`Bearer ${p}`,"trace-id":Gn(),"Accept-Language":y};if(b&&b.trim()!==""&&S)try{const I=await SO(b,S);E["Encrypted-Openai-Api-Key"]=I,E["Openai-Base-Url"]=$}catch(I){console.error("Error encrypting OpenAI API key:",I)}C&&(E["Workflow-LLM-Base-Url"]=C),w&&(E["Workflow-LLM-Api-Key"]=w);const O=await fetch(`${na}/api/chat/get_node_info_by_types`,{method:"POST",headers:E,body:JSON.stringify({node_types:m})});ru(O);const x=await O.json();if(!x.success){const I=x.message||"Failed to get node info by types";throw alert(I),new Error(I)}return x.data}t.batchGetNodeInfo=o;async function a(m){try{const p=localStorage.getItem(`messages_${m}`);return p?(console.log("Using cached messages from localStorage"),JSON.parse(p)):[]}catch(p){throw console.error("Error fetching messages:",p),alert(p instanceof Error?p.message:"Failed to fetch messages, please refresh the page and try again."),p}}t.fetchMessages=a;async function s(){try{const m=Ja(),p=tu(),y={accept:"application/json",Authorization:`Bearer ${m}`,"trace-id":Gn(),"Accept-Language":p},b=await fetch(`${na}/api/chat/announcement`,{method:"GET",headers:y});ru(b);const $=await b.json();if(!$.success){const S=$.message||"Failed to fetch announcement";return console.error(S),""}return $.data}catch(m){return console.error("Error fetching announcement:",m),""}}t.fetchAnnouncement=s;async function l(m){let y=0,b;for(;y<3;)try{const $=Ja(),S=tu(),w={"Content-Type":"application/json",accept:"application/json",Authorization:`Bearer ${$}`,"trace-id":Gn(),"Accept-Language":S},C=await fetch(`${na}/api/param_debug/generate_sd_prompts`,{method:"POST",headers:w,body:JSON.stringify({text:m})});ru(C);const E=await C.json();if(!E.success){const O=E.message||"Failed to generate SD prompts";throw new Error(O)}return E.data}catch($){if(b=$,y++,y>=3)throw console.error("Error generating SD prompts after 3 attempts:",$),$;console.warn(`Attempt ${y} failed, retrying... Error: ${$ instanceof Error?$.message:"Unknown error"}`),await new Promise(S=>setTimeout(S,500*Math.pow(2,y-1)))}throw b}t.generateSDPrompts=l;async function c(){const m={"Content-Type":"application/json",accept:"application/json","trace-id":Gn()},p=localStorage.getItem("openaiApiKey");p&&(m["Openai-Api-Key"]=p);const y=localStorage.getItem("openaiBaseUrl");return y&&(m["Openai-Base-Url"]=y),await(await fetch("/api/model_config",{method:"GET",headers:m})).json()}t.listModels=c;async function u(m,p){const y={accept:"application/json"};p&&p.trim()!==""&&(y.Authorization=`Bearer ${p}`);const $=`${m.replace(/\/$/,"")}/models`,S=await fetch($,{method:"GET",headers:y});if(!S.ok)throw new Error(`Failed to fetch models from LLM: ${S.status} ${S.statusText}`);const w=await S.json();if(Array.isArray(w?.data)){const O=w.data.map(x=>typeof x=="string"?x:x?.id||x?.name).filter(x=>typeof x=="string"&&x.trim()!=="");return Array.from(new Set(O))}const C=w?.models??w;if(Array.isArray(C)){const O=C.map(x=>typeof x=="string"?x:x?.id||x?.name).filter(x=>typeof x=="string"&&x.trim()!=="");return Array.from(new Set(O))}const E=w?.id||w?.name;return typeof E=="string"&&E.trim()!==""?[E]:[]}t.listModelsFromLLM=u;async function*f(m,p){try{const{openaiApiKey:y,openaiBaseUrl:b,workflowLLMApiKey:$,workflowLLMBaseUrl:S,workflowLLMModel:w}=Zf(),C=fr.extensionManager.setting.get("Comfy.Locale"),E=localStorage.getItem("sessionId")||null,x={"Content-Type":"application/json",accept:"application/json","Access-Control-Allow-Origin":"*",Authorization:`Bearer ${Ja()}`,"trace-id":Gn(),"Accept-Language":C};y&&y.trim()!==""&&(x["Openai-Api-Key"]=y,x["Openai-Base-Url"]=b),S&&(x["Workflow-LLM-Base-Url"]=S),$&&(x["Workflow-LLM-Api-Key"]=$),w&&(x["Workflow-LLM-Model"]=w);const I=new AbortController,T=setTimeout(()=>I.abort(),12e4);p&&p.addEventListener("abort",()=>{clearTimeout(T),I.abort()});const N=await fetch("/api/debug-agent",{method:"POST",headers:x,body:JSON.stringify({session_id:E,workflow_data:m.output}),signal:I.signal});if(clearTimeout(T),!N.ok)throw new Error(`Debug agent request failed: ${N.statusText}`);const P=N.body?.getReader();if(!P)throw new Error("No response body");let _="";const R=Gn();try{for(;;){const{done:M,value:D}=await P.read();if(M)break;_+=new TextDecoder().decode(D);const j=_.split(`
`);_=j.pop()||"";for(const k of j)k.trim()&&(yield{...JSON.parse(k),message_id:R})}if(_.trim())try{yield{...JSON.parse(_),message_id:R}}catch(M){console.error("Error parsing final debug response data:",M)}}finally{P.releaseLock()}}catch(y){throw console.error("Error in streamDebugAgent:",y),y instanceof Error&&y.name==="AbortError"?p?.aborted?y:new Error("Debug request timed out after 2 minutes. Please try again."):new Error(y instanceof Error?y.message:"An error occurred while debugging the workflow.")}}t.streamDebugAgent=f;async function h(m,p,y,b="debug_start"){try{const S=await(await fetch("/api/save-workflow-checkpoint",{method:"POST",headers:{"Content-Type":"application/json","trace-id":Gn()},body:JSON.stringify({session_id:m,workflow_api:p,workflow_ui:y,checkpoint_type:b})})).json();if(!S.success)throw new Error(S.message||"Failed to save workflow checkpoint");return S.data}catch($){throw console.error("Error saving workflow checkpoint:",$),$}}t.saveWorkflowCheckpoint=h;async function v(m){try{const y=await(await fetch(`/api/restore-workflow-checkpoint?version_id=${m}`,{method:"GET",headers:{"trace-id":Gn()}})).json();if(!y.success)throw new Error(y.message||"Failed to restore workflow checkpoint");return y.data}catch(p){throw console.error("Error restoring workflow checkpoint:",p),p}}t.restoreWorkflowCheckpoint=v;async function g(m,p,y,b){try{const S=await(await fetch("/api/save-workflow-checkpoint",{method:"POST",headers:{"Content-Type":"application/json","trace-id":Gn()},body:JSON.stringify({session_id:m,workflow_api:p,workflow_ui:y,checkpoint_type:"user_message_checkpoint",message_id:b})})).json();if(!S.success)throw new Error(S.message||"Failed to save workflow checkpoint before invoke");return S.data}catch($){throw console.error("Error saving workflow checkpoint before invoke:",$),$}}t.saveWorkflowCheckpointBeforeInvoke=g})(yo||(yo={}));/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const QZ=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),bA=(...t)=>t.filter((e,r,n)=>!!e&&e.trim()!==""&&n.indexOf(e)===r).join(" ").trim();/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */var eQ={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const tQ=d.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:n,className:i="",children:o,iconNode:a,...s},l)=>d.createElement("svg",{ref:l,...eQ,width:e,height:e,stroke:t,strokeWidth:n?Number(r)*24/Number(e):r,className:bA("lucide",i),...s},[...a.map(([c,u])=>d.createElement(c,u)),...Array.isArray(o)?o:[o]]));/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Hn=(t,e)=>{const r=d.forwardRef(({className:n,...i},o)=>d.createElement(tQ,{ref:o,iconNode:e,className:bA(`lucide-${QZ(t)}`,n),...i}));return r.displayName=`${t}`,r};/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const rQ=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],u5e=Hn("ChevronDown",rQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const nQ=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],d5e=Hn("ChevronUp",nQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const iQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],f5e=Hn("CirclePlus",iQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const oQ=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],h5e=Hn("CircleStop",oQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const aQ=[["path",{d:"m18 5-2.414-2.414A2 2 0 0 0 14.172 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2",key:"142zxg"}],["path",{d:"M21.378 12.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"2t3380"}],["path",{d:"M8 18h1",key:"13wk12"}]],v5e=Hn("FilePenLine",aQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const sQ=[["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"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],p5e=Hn("History",sQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const lQ=[["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"}]],g5e=Hn("Image",lQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const cQ=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],m5e=Hn("MessageCircleWarning",cQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const uQ=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],y5e=Hn("Plus",uQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const dQ=[["path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"14sxne"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16",key:"1hlbsb"}],["path",{d:"M16 16h5v5",key:"ccwih5"}]],b5e=Hn("RefreshCcw",dQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const fQ=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],$5e=Hn("Send",fQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const hQ=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],w5e=Hn("Settings",hQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const vQ=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]],S5e=Hn("Trash",vQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const pQ=[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]],gQ=Hn("Undo2",pQ);/**
 * @license lucide-react v0.475.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const mQ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],C5e=Hn("X",mQ);function $A({name:t,isUser:e=!1,children:r}){return Ce.jsx("div",{className:"flex flex-col w-full items-start gap-2 py-2 animate-fadeIn",children:Ce.jsx("div",{className:"w-full flex",children:r})})}const yQ=LiteGraph;async function bQ(){try{return await(await Ta.fetchApi("/object_info",{method:"GET"})).json()}catch(t){throw console.error("Error fetching object info:",t),t}}async function x5e(){const t=await bQ();return Object.keys(t)}async function $Q(t){try{return await(await fetch(`/object_info/${t}`,{method:"GET"})).json()}catch(e){throw console.error(`Error fetching object info for ${t}:`,e),e}}async function E5e(t){return await(await Ta.fetchApi("/prompt",{method:"POST",body:JSON.stringify(t)})).json()}async function O5e(t){try{const e=await Ta.fetchApi("/queue",{method:"POST",body:JSON.stringify(t)});if(!e.ok)throw new Error(`Failed to manage queue: ${e.status} ${e.statusText}`);return e}catch(e){throw console.error("Error managing queue:",e),e}}async function I5e(){try{const t=await Ta.fetchApi("/interrupt",{method:"POST"});if(!t.ok)throw new Error(`Failed to interrupt processing: ${t.status} ${t.statusText}`);return t}catch(t){throw console.error("Error interrupting processing:",t),t}}async function T5e(t){try{const e=await Ta.fetchApi(`/history/${t}`,{method:"GET"});if(!e.ok)throw new Error(`Failed to fetch history: ${e.status} ${e.statusText}`);return await e.json()}catch(e){throw console.error("Error fetching history:",e),e}}function wQ(t){const e=t.nodes,r=t.links||[],n=new Map,i=new Map,o=new Map;for(const c of e)n.set(c.id,c),i.set(c.id,new Set),o.set(c.id,new Set);for(const c of r)if(Array.isArray(c)&&c.length>=4){const[,u,,f]=c;i.get(f)?.add(u),o.get(u)?.add(f)}const a=new Map,s=new Set;function l(c){if(s.has(c))return a.get(c)||0;s.add(c);const u=i.get(c)||new Set;if(u.size===0)return a.set(c,0),0;let f=-1;for(const v of u)f=Math.max(f,l(v));const h=f+1;return a.set(c,h),h}for(const c of e)l(c.id);return a}function SQ(t){const e=t.nodes;if(!e||e.length===0)return;const r=250,n=60,i=20,o=320,a=50,s=100,l=100,c=wQ(t),u=Math.max(...Array.from(c.values())),f=new Map;for(let h=0;h<=u;h++)f.set(h,[]);e.map(h=>{const v=h.inputs?h.inputs.length:0,g=h.outputs?h.outputs.length:0,m=h.widgets_values?h.widgets_values.length:0,p=Math.max(v,g)+m,y=Math.max(i*p+n,n),b=c.get(h.id)||0,$={node:h,layer:b,size_y:y};return f.get(b)?.push($),$});for(let h=0;h<=u;h++){const v=f.get(h)||[];if(v.length===0)continue;v.sort((p,y)=>y.size_y-p.size_y);const g=v.reduce((p,y,b)=>p+y.size_y+(b>0?a:0),0);let m=l-g/2;m<50&&(m=50);for(const p of v)p.node.size=[r,p.size_y],p.node.pos=[s+h*o,Math.max(m,50)],m+=p.size_y+a}console.log(`[Layout] Applied layer-based layout with ${u+1} layers`)}async function wA(t){Object.keys(t).length;const e=[],r=[],n=new Map,i=new Map;let o=0,a=0,s=0;for(const[c,u]of Object.entries(t)){const f=u,h=isNaN(+c)?s:+c;typeof h=="number"&&h>a&&(a=h);const v=f.class_type in LiteGraph.registered_node_types,g={id:h,type:f.class_type,pos:[0,0],size:[210,58],flags:{},order:s,mode:v?0:4,inputs:[],outputs:[],properties:{},widgets_values:[]};f._meta?.title&&(g.title=f._meta.title),n.set(c,s),e.push(g),s++}s=0;for(const[,c]of Object.entries(t)){const u=c,f=e[s],h=u.class_type in LiteGraph.registered_node_types,v={},g=[];for(const[m,p]of Object.entries(u.inputs??{}))Array.isArray(p)&&p.length===2&&typeof p[1]=="number"?g.push({name:m,value:p}):v[m]=p;try{const m=await $Q(u.class_type);if(m&&m[u.class_type]){const p=m[u.class_type],y=p.input_order?.required||[],b=p.input?.required||{};console.log(`[API to Workflow] Processing ${u.class_type} with input_order:`,y),console.log("[API to Workflow] Available widget inputs:",Object.keys(v));for(const $ of y){const S=b[$];if(!S)continue;const w=S[0];if(!(typeof w=="string"&&(w==="MODEL"||w==="CONDITIONING"||w==="LATENT"||w==="VAE"||w==="CLIP"||w==="IMAGE"||w==="CONTROL_NET"||w==="STYLE_MODEL"))){if(v.hasOwnProperty($)){const E=v[$];if(f.widgets_values.push(E&&typeof E=="object"&&"__value__"in E?E.__value__:E),console.log(`[API to Workflow] Added widget ${$}:`,E),S[1]&&S[1].control_after_generate){const O="randomize";f.widgets_values.push(O),console.log(`[API to Workflow] Added control_after_generate for ${$}:`,O)}}else if(S[1]&&"default"in S[1]){const E=S[1].default;if(f.widgets_values.push(E),console.log(`[API to Workflow] Added default widget ${$}:`,E),S[1].control_after_generate){const O="randomize";f.widgets_values.push(O),console.log(`[API to Workflow] Added default control_after_generate for ${$}:`,O)}}delete v[$]}}console.log(`[API to Workflow] Final ${u.class_type} widgets_values:`,f.widgets_values)}else for(const[,p]of Object.entries(v))f.widgets_values.push(p&&typeof p=="object"&&"__value__"in p?p.__value__:p)}catch(m){if(console.warn(`[API to Workflow] Failed to get node info for ${u.class_type}:`,m),h){const p=LiteGraph.registered_node_types[u.class_type];try{const y=new p;if(y.widgets){for(const b of y.widgets)if(v.hasOwnProperty(b.name)){const $=v[b.name];f.widgets_values.push($&&typeof $=="object"&&"__value__"in $?$.__value__:$),delete v[b.name]}}y.graph=null,y.widgets=null,y.inputs=null,y.outputs=null}catch{for(const[,b]of Object.entries(v))f.widgets_values.push(b&&typeof b=="object"&&"__value__"in b?b.__value__:b)}}else for(const[,p]of Object.entries(v))f.widgets_values.push(p&&typeof p=="object"&&"__value__"in p?p.__value__:p)}for(const{name:m,value:[p,y]}of g){const b=n.get(p);if(b===void 0)continue;const $=e[b],S=o++,w=[S,$.id,y,f.id,f.inputs.length,"unknown"];r.push(w),f.inputs.push({name:m,type:"unknown",link:S});const C=i.get(b)??0;if(y>=C){for(let E=C;E<=y;E++)$.outputs.push({name:`${$.type}_${E}`,type:"unknown",links:[],slot_index:E});i.set(b,y+1)}$.outputs[y].links.push(S)}s++}n.clear(),i.clear();const l={last_node_id:a+1,last_link_id:o,nodes:e,links:r,groups:[],config:{},extra:{},version:.4};return SQ(l),l}async function SA(t,e="API Workflow",r){try{const n=await wA(t);app.loadGraphData(n,!0,!0,e,{showMissingNodesDialog:!0,showMissingModelsDialog:!0})}catch(n){console.error("[LLM Extension] Failed to generate workflow:",n),app.loadApiJson(t,e)}}globalThis.testKSamplerParameterFix=async function(){const t={8:{inputs:{seed:920015823038803,steps:20,cfg:1,sampler_name:"euler",scheduler:"normal",denoise:1,model:["2",0],positive:["8",0],negative:["8",1],latent_image:["8",2]},class_type:"KSampler",_meta:{title:"KSampler"}}};try{console.log("🧪 [Debug] Testing KSampler parameter conversion...");const e=await wA(t),r=e.nodes.find(o=>o.type==="KSampler");if(!r){console.error("× [Debug] KSampler node not found");return}console.log("✅ [Debug] KSampler node found:"),console.log("📋 [Debug] Widget values:",r.widgets_values),console.log("🔗 [Debug] Input connections:",r.inputs?.map(o=>o.name));const n=[920015823038803,"randomize",20,1,"euler","normal",1],i=r.widgets_values;return i.length===n.length&&i.every((o,a)=>o===n[a])?(console.log("🎉 [Debug] SUCCESS! All KSampler parameters are correctly set and in proper order!"),console.log("✅ [Debug] No more null values in widget parameters!")):(console.log("❌ [Debug] Parameter mismatch:"),console.log("   Expected:",n),console.log("   Actual:  ",i)),e}catch(e){console.error("❌ [Debug] Test failed:",e)}};console.log("🔧 [Debug] KSampler parameter fix loaded. Run 'testKSamplerParameterFix()' in console to test.");function Fw(t,e={}){const r=yQ.createNode(t,"",e);if(!e.pos){const n=fr.canvas.canvas.getBoundingClientRect(),i=fr.canvas.visible_area?.[0]||0,o=fr.canvas.visible_area?.[1]||0;r.pos=[i+n.width/fr.canvas.ds.scale/2-r.size[0]/2,o+n.height/fr.canvas.ds.scale/2-r.size[1]/2]}return fr.graph.add(r),r}function CQ(t){try{return console.log("[graphUtils] Applying new workflow to canvas...",t),!fr||!fr.graph?(console.error("[graphUtils] App or graph not available"),!1):(t.nodes?(console.log("[graphUtils] Loading UI format workflow with nodes:",t.nodes.length),fr.loadGraphData(t)):(console.log("[graphUtils] Loading API format workflow with node count:",Object.keys(t).length),SA(t)),fr.graph&&(fr.graph.setDirtyCanvas(!1,!0),console.log("[graphUtils] Canvas marked as dirty for re-rendering")),console.log("[graphUtils] Workflow successfully applied to canvas"),!0)}catch(e){return console.error("[graphUtils] Error applying new workflow:",e),!1}}function CA(t){try{if(!fr.graph||!t)return console.warn("[graphUtils] Invalid graph or nodeParams"),!1;let e=!1;return Object.entries(t).forEach(([r,n])=>{const i=fr.graph._nodes_by_id[r];if(!i||!i.widgets){console.warn(`[graphUtils] Node ${r} not found or has no widgets`);return}Object.entries(n).forEach(([o,a])=>{for(const s of i.widgets)if(s.name===o){s.value!==a&&(s.value=a,e=!0,console.log(`[graphUtils] Updated node ${r}, parameter ${o} to:`,a));break}})}),e&&(fr.graph.setDirtyCanvas(!1,!0),console.log("[graphUtils] Applied node parameters and marked canvas as dirty")),e}catch(e){return console.error("[graphUtils] Error applying node parameters:",e),!1}}function xQ(t){try{if(!t||t.length===0)return console.warn("[graphUtils] No changes to apply"),!1;const e={};return t.forEach(r=>{e[r.node_id]||(e[r.node_id]={}),e[r.node_id][r.parameter]=r.new_value}),CA(e)}catch(e){return console.error("[graphUtils] Error applying parameter changes:",e),!1}}const _5e=Object.freeze(Object.defineProperty({__proto__:null,addNodeOnGraph:Fw,applyNewWorkflow:CQ,applyNodeParameters:CA,applyParameterChanges:xQ},Symbol.toStringTag,{value:"Module"})),EQ=d.memo(c3,(t,e)=>t.children===e.children&&t.className===e.className);var xA={exports:{}};(()=>{var t={296:(i,o,a)=>{var s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,u=/^0o[0-7]+$/i,f=parseInt,h=typeof a.g=="object"&&a.g&&a.g.Object===Object&&a.g,v=typeof self=="object"&&self&&self.Object===Object&&self,g=h||v||Function("return this")(),m=Object.prototype.toString,p=Math.max,y=Math.min,b=function(){return g.Date.now()};function $(w){var C=typeof w;return!!w&&(C=="object"||C=="function")}function S(w){if(typeof w=="number")return w;if(function(O){return typeof O=="symbol"||function(x){return!!x&&typeof x=="object"}(O)&&m.call(O)=="[object Symbol]"}(w))return NaN;if($(w)){var C=typeof w.valueOf=="function"?w.valueOf():w;w=$(C)?C+"":C}if(typeof w!="string")return w===0?w:+w;w=w.replace(s,"");var E=c.test(w);return E||u.test(w)?f(w.slice(2),E?2:8):l.test(w)?NaN:+w}i.exports=function(w,C,E){var O,x,I,T,N,P,_=0,R=!1,M=!1,D=!0;if(typeof w!="function")throw new TypeError("Expected a function");function j(Y){var q=O,J=x;return O=x=void 0,_=Y,T=w.apply(J,q)}function k(Y){var q=Y-P;return P===void 0||q>=C||q<0||M&&Y-_>=I}function V(){var Y=b();if(k(Y))return G(Y);N=setTimeout(V,function(q){var J=C-(q-P);return M?y(J,I-(q-_)):J}(Y))}function G(Y){return N=void 0,D&&O?j(Y):(O=x=void 0,T)}function W(){var Y=b(),q=k(Y);if(O=arguments,x=this,P=Y,q){if(N===void 0)return function(J){return _=J,N=setTimeout(V,C),R?j(J):T}(P);if(M)return N=setTimeout(V,C),j(P)}return N===void 0&&(N=setTimeout(V,C)),T}return C=S(C)||0,$(E)&&(R=!!E.leading,I=(M="maxWait"in E)?p(S(E.maxWait)||0,C):I,D="trailing"in E?!!E.trailing:D),W.cancel=function(){N!==void 0&&clearTimeout(N),_=0,O=P=x=N=void 0},W.flush=function(){return N===void 0?T:G(b())},W}},96:(i,o,a)=>{var s="Expected a function",l=NaN,c="[object Symbol]",u=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,h=/^0b[01]+$/i,v=/^0o[0-7]+$/i,g=parseInt,m=typeof a.g=="object"&&a.g&&a.g.Object===Object&&a.g,p=typeof self=="object"&&self&&self.Object===Object&&self,y=m||p||Function("return this")(),b=Object.prototype.toString,$=Math.max,S=Math.min,w=function(){return y.Date.now()};function C(O){var x=typeof O;return!!O&&(x=="object"||x=="function")}function E(O){if(typeof O=="number")return O;if(function(T){return typeof T=="symbol"||function(N){return!!N&&typeof N=="object"}(T)&&b.call(T)==c}(O))return l;if(C(O)){var x=typeof O.valueOf=="function"?O.valueOf():O;O=C(x)?x+"":x}if(typeof O!="string")return O===0?O:+O;O=O.replace(u,"");var I=h.test(O);return I||v.test(O)?g(O.slice(2),I?2:8):f.test(O)?l:+O}i.exports=function(O,x,I){var T=!0,N=!0;if(typeof O!="function")throw new TypeError(s);return C(I)&&(T="leading"in I?!!I.leading:T,N="trailing"in I?!!I.trailing:N),function(P,_,R){var M,D,j,k,V,G,W=0,Y=!1,q=!1,J=!0;if(typeof P!="function")throw new TypeError(s);function oe(B){var F=M,U=D;return M=D=void 0,W=B,k=P.apply(U,F)}function ie(B){var F=B-G;return G===void 0||F>=_||F<0||q&&B-W>=j}function te(){var B=w();if(ie(B))return z(B);V=setTimeout(te,function(F){var U=_-(F-G);return q?S(U,j-(F-W)):U}(B))}function z(B){return V=void 0,J&&M?oe(B):(M=D=void 0,k)}function K(){var B=w(),F=ie(B);if(M=arguments,D=this,G=B,F){if(V===void 0)return function(U){return W=U,V=setTimeout(te,_),Y?oe(U):k}(G);if(q)return V=setTimeout(te,_),oe(G)}return V===void 0&&(V=setTimeout(te,_)),k}return _=E(_)||0,C(R)&&(Y=!!R.leading,j=(q="maxWait"in R)?$(E(R.maxWait)||0,_):j,J="trailing"in R?!!R.trailing:J),K.cancel=function(){V!==void 0&&clearTimeout(V),W=0,M=G=D=V=void 0},K.flush=function(){return V===void 0?k:z(w())},K}(O,x,{leading:T,maxWait:x,trailing:N})}},703:(i,o,a)=>{var s=a(414);function l(){}function c(){}c.resetWarningCache=l,i.exports=function(){function u(v,g,m,p,y,b){if(b!==s){var $=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw $.name="Invariant Violation",$}}function f(){return u}u.isRequired=u;var h={array:u,bigint:u,bool:u,func:u,number:u,object:u,string:u,symbol:u,any:u,arrayOf:f,element:u,elementType:u,instanceOf:f,node:u,objectOf:f,oneOf:f,oneOfType:f,shape:f,exact:f,checkPropTypes:c,resetWarningCache:l};return h.PropTypes=h,h}},697:(i,o,a)=>{i.exports=a(703)()},414:i=>{i.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}},e={};function r(i){var o=e[i];if(o!==void 0)return o.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,r),a.exports}r.n=i=>{var o=i&&i.__esModule?()=>i.default:()=>i;return r.d(o,{a:o}),o},r.d=(i,o)=>{for(var a in o)r.o(o,a)&&!r.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:o[a]})},r.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),r.o=(i,o)=>Object.prototype.hasOwnProperty.call(i,o),r.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var n={};(()=>{r.r(n),r.d(n,{LazyLoadComponent:()=>F,LazyLoadImage:()=>ge,trackWindowScroll:()=>k});const i=d;var o=r.n(i),a=r(697);function s(){return typeof window<"u"&&"IntersectionObserver"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype}function l(ne){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},l(ne)}function c(ne,X){var fe=Object.keys(ne);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(ne);X&&(pe=pe.filter(function($e){return Object.getOwnPropertyDescriptor(ne,$e).enumerable})),fe.push.apply(fe,pe)}return fe}function u(ne,X,fe){return(X=h(X))in ne?Object.defineProperty(ne,X,{value:fe,enumerable:!0,configurable:!0,writable:!0}):ne[X]=fe,ne}function f(ne,X){for(var fe=0;fe<X.length;fe++){var pe=X[fe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,h(pe.key),pe)}}function h(ne){var X=function(fe,pe){if(l(fe)!=="object"||fe===null)return fe;var $e=fe[Symbol.toPrimitive];if($e!==void 0){var Ee=$e.call(fe,"string");if(l(Ee)!=="object")return Ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(fe)}(ne);return l(X)==="symbol"?X:String(X)}function v(ne,X){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,pe){return fe.__proto__=pe,fe},v(ne,X)}function g(ne){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},g(ne)}var m=function(ne){ne.forEach(function(X){X.isIntersecting&&X.target.onVisible()})},p={},y=function(ne){(function(H,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(re&&re.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),re&&v(H,re)})(be,ne);var X,fe,pe,$e,Ee=(pe=be,$e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var H,re=g(pe);if($e){var he=g(this).constructor;H=Reflect.construct(re,arguments,he)}else H=re.apply(this,arguments);return function(ue,we){if(we&&(l(we)==="object"||typeof we=="function"))return we;if(we!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ie){if(Ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ie}(ue)}(this,H)});function be(H){var re;if(function(ue,we){if(!(ue instanceof we))throw new TypeError("Cannot call a class as a function")}(this,be),(re=Ee.call(this,H)).supportsObserver=!H.scrollPosition&&H.useIntersectionObserver&&s(),re.supportsObserver){var he=H.threshold;re.observer=function(ue){return p[ue]=p[ue]||new IntersectionObserver(m,{rootMargin:ue+"px"}),p[ue]}(he)}return re}return X=be,fe=[{key:"componentDidMount",value:function(){this.placeholder&&this.observer&&(this.placeholder.onVisible=this.props.onVisible,this.observer.observe(this.placeholder)),this.supportsObserver||this.updateVisibility()}},{key:"componentWillUnmount",value:function(){this.observer&&this.placeholder&&this.observer.unobserve(this.placeholder)}},{key:"componentDidUpdate",value:function(){this.supportsObserver||this.updateVisibility()}},{key:"getPlaceholderBoundingBox",value:function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.props.scrollPosition,re=this.placeholder.getBoundingClientRect(),he=this.placeholder.style,ue=parseInt(he.getPropertyValue("margin-left"),10)||0,we=parseInt(he.getPropertyValue("margin-top"),10)||0;return{bottom:H.y+re.bottom+we,left:H.x+re.left+ue,right:H.x+re.right+ue,top:H.y+re.top+we}}},{key:"isPlaceholderInViewport",value:function(){if(typeof window>"u"||!this.placeholder)return!1;var H=this.props,re=H.scrollPosition,he=H.threshold,ue=this.getPlaceholderBoundingBox(re),we=re.y+window.innerHeight,Ie=re.x,Fe=re.x+window.innerWidth,qe=re.y;return qe-he<=ue.bottom&&we+he>=ue.top&&Ie-he<=ue.right&&Fe+he>=ue.left}},{key:"updateVisibility",value:function(){this.isPlaceholderInViewport()&&this.props.onVisible()}},{key:"render",value:function(){var H=this,re=this.props,he=re.className,ue=re.height,we=re.placeholder,Ie=re.style,Fe=re.width;if(we&&typeof we.type!="function")return o().cloneElement(we,{ref:function(st){return H.placeholder=st}});var qe=function(st){for(var ft=1;ft<arguments.length;ft++){var et=arguments[ft]!=null?arguments[ft]:{};ft%2?c(Object(et),!0).forEach(function(St){u(st,St,et[St])}):Object.getOwnPropertyDescriptors?Object.defineProperties(st,Object.getOwnPropertyDescriptors(et)):c(Object(et)).forEach(function(St){Object.defineProperty(st,St,Object.getOwnPropertyDescriptor(et,St))})}return st}({display:"inline-block"},Ie);return Fe!==void 0&&(qe.width=Fe),ue!==void 0&&(qe.height=ue),o().createElement("span",{className:he,ref:function(st){return H.placeholder=st},style:qe},we)}}],fe&&f(X.prototype,fe),Object.defineProperty(X,"prototype",{writable:!1}),be}(o().Component);y.propTypes={onVisible:a.PropTypes.func.isRequired,className:a.PropTypes.string,height:a.PropTypes.oneOfType([a.PropTypes.number,a.PropTypes.string]),placeholder:a.PropTypes.element,threshold:a.PropTypes.number,useIntersectionObserver:a.PropTypes.bool,scrollPosition:a.PropTypes.shape({x:a.PropTypes.number.isRequired,y:a.PropTypes.number.isRequired}),width:a.PropTypes.oneOfType([a.PropTypes.number,a.PropTypes.string])},y.defaultProps={className:"",placeholder:null,threshold:100,useIntersectionObserver:!0};const b=y;var $=r(296),S=r.n($),w=r(96),C=r.n(w),E=function(ne){var X=getComputedStyle(ne,null);return X.getPropertyValue("overflow")+X.getPropertyValue("overflow-y")+X.getPropertyValue("overflow-x")};const O=function(ne){if(!(ne instanceof HTMLElement))return window;for(var X=ne;X&&X instanceof HTMLElement;){if(/(scroll|auto)/.test(E(X)))return X;X=X.parentNode}return window};function x(ne){return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},x(ne)}var I=["delayMethod","delayTime"];function T(){return T=Object.assign?Object.assign.bind():function(ne){for(var X=1;X<arguments.length;X++){var fe=arguments[X];for(var pe in fe)Object.prototype.hasOwnProperty.call(fe,pe)&&(ne[pe]=fe[pe])}return ne},T.apply(this,arguments)}function N(ne,X){for(var fe=0;fe<X.length;fe++){var pe=X[fe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,($e=function(Ee,be){if(x(Ee)!=="object"||Ee===null)return Ee;var H=Ee[Symbol.toPrimitive];if(H!==void 0){var re=H.call(Ee,"string");if(x(re)!=="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ee)}(pe.key),x($e)==="symbol"?$e:String($e)),pe)}var $e}function P(ne,X){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,pe){return fe.__proto__=pe,fe},P(ne,X)}function _(ne,X){if(X&&(x(X)==="object"||typeof X=="function"))return X;if(X!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return R(ne)}function R(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function M(ne){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},M(ne)}var D=function(){return typeof window>"u"?0:window.scrollX||window.pageXOffset},j=function(){return typeof window>"u"?0:window.scrollY||window.pageYOffset};const k=function(ne){var X=function(fe){(function(he,ue){if(typeof ue!="function"&&ue!==null)throw new TypeError("Super expression must either be null or a function");he.prototype=Object.create(ue&&ue.prototype,{constructor:{value:he,writable:!0,configurable:!0}}),Object.defineProperty(he,"prototype",{writable:!1}),ue&&P(he,ue)})(re,fe);var pe,$e,Ee,be,H=(Ee=re,be=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var he,ue=M(Ee);if(be){var we=M(this).constructor;he=Reflect.construct(ue,arguments,we)}else he=ue.apply(this,arguments);return _(this,he)});function re(he){var ue;if(function(Ie,Fe){if(!(Ie instanceof Fe))throw new TypeError("Cannot call a class as a function")}(this,re),(ue=H.call(this,he)).useIntersectionObserver=he.useIntersectionObserver&&s(),ue.useIntersectionObserver)return _(ue);var we=ue.onChangeScroll.bind(R(ue));return he.delayMethod==="debounce"?ue.delayedScroll=S()(we,he.delayTime):he.delayMethod==="throttle"&&(ue.delayedScroll=C()(we,he.delayTime)),ue.state={scrollPosition:{x:D(),y:j()}},ue.baseComponentRef=o().createRef(),ue}return pe=re,($e=[{key:"componentDidMount",value:function(){this.addListeners()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"componentDidUpdate",value:function(){typeof window>"u"||this.useIntersectionObserver||O(this.baseComponentRef.current)!==this.scrollElement&&(this.removeListeners(),this.addListeners())}},{key:"addListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement=O(this.baseComponentRef.current),this.scrollElement.addEventListener("scroll",this.delayedScroll,{passive:!0}),window.addEventListener("resize",this.delayedScroll,{passive:!0}),this.scrollElement!==window&&window.addEventListener("scroll",this.delayedScroll,{passive:!0}))}},{key:"removeListeners",value:function(){typeof window>"u"||this.useIntersectionObserver||(this.scrollElement.removeEventListener("scroll",this.delayedScroll),window.removeEventListener("resize",this.delayedScroll),this.scrollElement!==window&&window.removeEventListener("scroll",this.delayedScroll))}},{key:"onChangeScroll",value:function(){this.useIntersectionObserver||this.setState({scrollPosition:{x:D(),y:j()}})}},{key:"render",value:function(){var he=this.props,ue=(he.delayMethod,he.delayTime,function(Ie,Fe){if(Ie==null)return{};var qe,st,ft=function(St,Et){if(St==null)return{};var at,nt,Le={},ze=Object.keys(St);for(nt=0;nt<ze.length;nt++)at=ze[nt],Et.indexOf(at)>=0||(Le[at]=St[at]);return Le}(Ie,Fe);if(Object.getOwnPropertySymbols){var et=Object.getOwnPropertySymbols(Ie);for(st=0;st<et.length;st++)qe=et[st],Fe.indexOf(qe)>=0||Object.prototype.propertyIsEnumerable.call(Ie,qe)&&(ft[qe]=Ie[qe])}return ft}(he,I)),we=this.useIntersectionObserver?null:this.state.scrollPosition;return o().createElement(ne,T({forwardRef:this.baseComponentRef,scrollPosition:we},ue))}}])&&N(pe.prototype,$e),Object.defineProperty(pe,"prototype",{writable:!1}),re}(o().Component);return X.propTypes={delayMethod:a.PropTypes.oneOf(["debounce","throttle"]),delayTime:a.PropTypes.number,useIntersectionObserver:a.PropTypes.bool},X.defaultProps={delayMethod:"throttle",delayTime:300,useIntersectionObserver:!0},X};function V(ne){return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},V(ne)}function G(ne,X){for(var fe=0;fe<X.length;fe++){var pe=X[fe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,($e=function(Ee,be){if(V(Ee)!=="object"||Ee===null)return Ee;var H=Ee[Symbol.toPrimitive];if(H!==void 0){var re=H.call(Ee,"string");if(V(re)!=="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ee)}(pe.key),V($e)==="symbol"?$e:String($e)),pe)}var $e}function W(ne,X){return W=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,pe){return fe.__proto__=pe,fe},W(ne,X)}function Y(ne){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},Y(ne)}var q=function(ne){(function(H,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(re&&re.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),re&&W(H,re)})(be,ne);var X,fe,pe,$e,Ee=(pe=be,$e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var H,re=Y(pe);if($e){var he=Y(this).constructor;H=Reflect.construct(re,arguments,he)}else H=re.apply(this,arguments);return function(ue,we){if(we&&(V(we)==="object"||typeof we=="function"))return we;if(we!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ie){if(Ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ie}(ue)}(this,H)});function be(H){return function(re,he){if(!(re instanceof he))throw new TypeError("Cannot call a class as a function")}(this,be),Ee.call(this,H)}return X=be,(fe=[{key:"render",value:function(){return o().createElement(b,this.props)}}])&&G(X.prototype,fe),Object.defineProperty(X,"prototype",{writable:!1}),be}(o().Component);const J=k(q);function oe(ne){return oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},oe(ne)}function ie(ne,X){for(var fe=0;fe<X.length;fe++){var pe=X[fe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,($e=function(Ee,be){if(oe(Ee)!=="object"||Ee===null)return Ee;var H=Ee[Symbol.toPrimitive];if(H!==void 0){var re=H.call(Ee,"string");if(oe(re)!=="object")return re;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Ee)}(pe.key),oe($e)==="symbol"?$e:String($e)),pe)}var $e}function te(ne,X){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,pe){return fe.__proto__=pe,fe},te(ne,X)}function z(ne){if(ne===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return ne}function K(ne){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},K(ne)}var B=function(ne){(function(H,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(re&&re.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),re&&te(H,re)})(be,ne);var X,fe,pe,$e,Ee=(pe=be,$e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var H,re=K(pe);if($e){var he=K(this).constructor;H=Reflect.construct(re,arguments,he)}else H=re.apply(this,arguments);return function(ue,we){if(we&&(oe(we)==="object"||typeof we=="function"))return we;if(we!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return z(ue)}(this,H)});function be(H){var re;(function(Fe,qe){if(!(Fe instanceof qe))throw new TypeError("Cannot call a class as a function")})(this,be),re=Ee.call(this,H);var he=H.afterLoad,ue=H.beforeLoad,we=H.scrollPosition,Ie=H.visibleByDefault;return re.state={visible:Ie},Ie&&(ue(),he()),re.onVisible=re.onVisible.bind(z(re)),re.isScrollTracked=!!(we&&Number.isFinite(we.x)&&we.x>=0&&Number.isFinite(we.y)&&we.y>=0),re}return X=be,(fe=[{key:"componentDidUpdate",value:function(H,re){re.visible!==this.state.visible&&this.props.afterLoad()}},{key:"onVisible",value:function(){this.props.beforeLoad(),this.setState({visible:!0})}},{key:"render",value:function(){if(this.state.visible)return this.props.children;var H=this.props,re=H.className,he=H.delayMethod,ue=H.delayTime,we=H.height,Ie=H.placeholder,Fe=H.scrollPosition,qe=H.style,st=H.threshold,ft=H.useIntersectionObserver,et=H.width;return this.isScrollTracked||ft&&s()?o().createElement(b,{className:re,height:we,onVisible:this.onVisible,placeholder:Ie,scrollPosition:Fe,style:qe,threshold:st,useIntersectionObserver:ft,width:et}):o().createElement(J,{className:re,delayMethod:he,delayTime:ue,height:we,onVisible:this.onVisible,placeholder:Ie,style:qe,threshold:st,width:et})}}])&&ie(X.prototype,fe),Object.defineProperty(X,"prototype",{writable:!1}),be}(o().Component);B.propTypes={afterLoad:a.PropTypes.func,beforeLoad:a.PropTypes.func,useIntersectionObserver:a.PropTypes.bool,visibleByDefault:a.PropTypes.bool},B.defaultProps={afterLoad:function(){return{}},beforeLoad:function(){return{}},useIntersectionObserver:!0,visibleByDefault:!1};const F=B;function U(ne){return U=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(X){return typeof X}:function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},U(ne)}var Z=["afterLoad","beforeLoad","delayMethod","delayTime","effect","placeholder","placeholderSrc","scrollPosition","threshold","useIntersectionObserver","visibleByDefault","wrapperClassName","wrapperProps"];function ee(ne,X){var fe=Object.keys(ne);if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(ne);X&&(pe=pe.filter(function($e){return Object.getOwnPropertyDescriptor(ne,$e).enumerable})),fe.push.apply(fe,pe)}return fe}function Q(ne){for(var X=1;X<arguments.length;X++){var fe=arguments[X]!=null?arguments[X]:{};X%2?ee(Object(fe),!0).forEach(function(pe){ce(ne,pe,fe[pe])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ne,Object.getOwnPropertyDescriptors(fe)):ee(Object(fe)).forEach(function(pe){Object.defineProperty(ne,pe,Object.getOwnPropertyDescriptor(fe,pe))})}return ne}function ce(ne,X,fe){return(X=_e(X))in ne?Object.defineProperty(ne,X,{value:fe,enumerable:!0,configurable:!0,writable:!0}):ne[X]=fe,ne}function me(){return me=Object.assign?Object.assign.bind():function(ne){for(var X=1;X<arguments.length;X++){var fe=arguments[X];for(var pe in fe)Object.prototype.hasOwnProperty.call(fe,pe)&&(ne[pe]=fe[pe])}return ne},me.apply(this,arguments)}function Te(ne,X){for(var fe=0;fe<X.length;fe++){var pe=X[fe];pe.enumerable=pe.enumerable||!1,pe.configurable=!0,"value"in pe&&(pe.writable=!0),Object.defineProperty(ne,_e(pe.key),pe)}}function _e(ne){var X=function(fe,pe){if(U(fe)!=="object"||fe===null)return fe;var $e=fe[Symbol.toPrimitive];if($e!==void 0){var Ee=$e.call(fe,"string");if(U(Ee)!=="object")return Ee;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(fe)}(ne);return U(X)==="symbol"?X:String(X)}function ve(ne,X){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,pe){return fe.__proto__=pe,fe},ve(ne,X)}function ye(ne){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(X){return X.__proto__||Object.getPrototypeOf(X)},ye(ne)}var xe=function(ne){(function(H,re){if(typeof re!="function"&&re!==null)throw new TypeError("Super expression must either be null or a function");H.prototype=Object.create(re&&re.prototype,{constructor:{value:H,writable:!0,configurable:!0}}),Object.defineProperty(H,"prototype",{writable:!1}),re&&ve(H,re)})(be,ne);var X,fe,pe,$e,Ee=(pe=be,$e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var H,re=ye(pe);if($e){var he=ye(this).constructor;H=Reflect.construct(re,arguments,he)}else H=re.apply(this,arguments);return function(ue,we){if(we&&(U(we)==="object"||typeof we=="function"))return we;if(we!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(Ie){if(Ie===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Ie}(ue)}(this,H)});function be(H){var re;return function(he,ue){if(!(he instanceof ue))throw new TypeError("Cannot call a class as a function")}(this,be),(re=Ee.call(this,H)).state={loaded:!1},re}return X=be,(fe=[{key:"onImageLoad",value:function(){var H=this;return this.state.loaded?null:function(re){H.props.onLoad(re),H.props.afterLoad(),H.setState({loaded:!0})}}},{key:"getImg",value:function(){var H=this.props,re=(H.afterLoad,H.beforeLoad,H.delayMethod,H.delayTime,H.effect,H.placeholder,H.placeholderSrc,H.scrollPosition,H.threshold,H.useIntersectionObserver,H.visibleByDefault,H.wrapperClassName,H.wrapperProps,function(he,ue){if(he==null)return{};var we,Ie,Fe=function(st,ft){if(st==null)return{};var et,St,Et={},at=Object.keys(st);for(St=0;St<at.length;St++)et=at[St],ft.indexOf(et)>=0||(Et[et]=st[et]);return Et}(he,ue);if(Object.getOwnPropertySymbols){var qe=Object.getOwnPropertySymbols(he);for(Ie=0;Ie<qe.length;Ie++)we=qe[Ie],ue.indexOf(we)>=0||Object.prototype.propertyIsEnumerable.call(he,we)&&(Fe[we]=he[we])}return Fe}(H,Z));return o().createElement("img",me({},re,{onLoad:this.onImageLoad()}))}},{key:"getLazyLoadImage",value:function(){var H=this.props,re=H.beforeLoad,he=H.className,ue=H.delayMethod,we=H.delayTime,Ie=H.height,Fe=H.placeholder,qe=H.scrollPosition,st=H.style,ft=H.threshold,et=H.useIntersectionObserver,St=H.visibleByDefault,Et=H.width;return o().createElement(F,{beforeLoad:re,className:he,delayMethod:ue,delayTime:we,height:Ie,placeholder:Fe,scrollPosition:qe,style:st,threshold:ft,useIntersectionObserver:et,visibleByDefault:St,width:Et},this.getImg())}},{key:"getWrappedLazyLoadImage",value:function(H){var re=this.props,he=re.effect,ue=re.height,we=re.placeholderSrc,Ie=re.width,Fe=re.wrapperClassName,qe=re.wrapperProps,st=this.state.loaded,ft=st?" lazy-load-image-loaded":"",et=st||!we?{}:{backgroundImage:"url(".concat(we,")"),backgroundSize:"100% 100%"};return o().createElement("span",me({className:Fe+" lazy-load-image-background "+he+ft,style:Q(Q({},et),{},{color:"transparent",display:"inline-block",height:ue,width:Ie})},qe),H)}},{key:"render",value:function(){var H=this.props,re=H.effect,he=H.placeholderSrc,ue=H.visibleByDefault,we=H.wrapperClassName,Ie=H.wrapperProps,Fe=this.getLazyLoadImage();return(re||he)&&!ue||we||Ie?this.getWrappedLazyLoadImage(Fe):Fe}}])&&Te(X.prototype,fe),Object.defineProperty(X,"prototype",{writable:!1}),be}(o().Component);xe.propTypes={onLoad:a.PropTypes.func,afterLoad:a.PropTypes.func,beforeLoad:a.PropTypes.func,delayMethod:a.PropTypes.string,delayTime:a.PropTypes.number,effect:a.PropTypes.string,placeholderSrc:a.PropTypes.string,threshold:a.PropTypes.number,useIntersectionObserver:a.PropTypes.bool,visibleByDefault:a.PropTypes.bool,wrapperClassName:a.PropTypes.string,wrapperProps:a.PropTypes.object},xe.defaultProps={onLoad:function(){},afterLoad:function(){return{}},beforeLoad:function(){return{}},delayMethod:"throttle",delayTime:300,effect:"",placeholderSrc:null,threshold:100,useIntersectionObserver:!0,visibleByDefault:!1,wrapperClassName:""};const ge=xe})(),xA.exports=n})();var OQ=xA.exports;const zm=({response:t,specialClass:e})=>{const r=d.useMemo(()=>t?.text||"",[t]),[n,i]=d.useState(!1);return Ce.jsx(EQ,{rehypePlugins:[[f3,{target:"_blank"}],h3],remarkPlugins:[u3,d3],className:`prose prose-xs prose-neutral prose-a:text-accent-foreground/50 break-words [&>*]:!my-1 leading-relaxed text-xs text-gray-700
        prose-headings:font-semibold
        prose-h1:text-base
        prose-h2:text-sm
        prose-h3:text-xs
        prose-h4:text-xs
        prose-p:text-xs
        prose-ul:text-xs
        prose-ol:text-xs
        prose-li:text-xs
        prose-code:text-xs
        prose-pre:text-xs
        ${e||""}`,components:{p:({children:o})=>Ce.jsx("p",{className:"!my-0.5 leading-relaxed text-xs",children:o}),strong:({children:o})=>Ce.jsx("strong",{className:"text-gray-900",children:o}),h1:({children:o})=>Ce.jsx("h1",{className:"text-base font-semibold !my-1",children:o}),h2:({children:o})=>Ce.jsx("h2",{className:"text-sm font-semibold !my-1",children:o}),h3:({children:o})=>Ce.jsx("h3",{className:"text-xs font-semibold !my-1",children:o}),h4:({children:o})=>Ce.jsx("h4",{className:"text-xs font-semibold !my-1",children:o}),table:({children:o})=>Ce.jsx("table",{className:"border-solid border w-[100%] text-xs",children:o}),th:({children:o})=>Ce.jsx("th",{className:"border-solid border text-center pt-2 text-xs",children:o}),td:({children:o})=>{if(Array.isArray(o)&&o?.length>0){const a=[],s=o.length;for(let l=0;l<s;l++)o[l]==="<br>"?a.push(Ce.jsx("br",{})):a.push(o[l]);o=a}return Ce.jsx("td",{className:"border-solid border border-[#979797] text-center text-xs",children:o})},code:({children:o})=>{const a=async()=>{try{await navigator.clipboard.writeText(o),i(!0),setTimeout(()=>i(!1),2e3)}catch(s){console.error("Failed to copy text:",s)}};return Ce.jsxs("span",{className:"relative group inline-flex items-center",children:[Ce.jsx("code",{className:"text-xs bg-gray-100 text-gray-900 rounded px-1",children:o}),Ce.jsx("button",{onClick:a,className:"absolute top-0 right-0 bg-gray-200 rounded p-1 opacity-0 group-hover:opacity-100 transition-opacity hover:bg-gray-300 z-10","aria-label":"Copy code",children:n?Ce.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:Ce.jsx("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}):Ce.jsxs("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:[Ce.jsx("path",{d:"M8 2a1 1 0 000 2h2a1 1 0 100-2H8z"}),Ce.jsx("path",{d:"M3 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v6h-4.586l1.293-1.293a1 1 0 00-1.414-1.414l-3 3a1 1 0 000 1.414l3 3a1 1 0 001.414-1.414L10.414 13H15v3a2 2 0 01-2 2H5a2 2 0 01-2-2V5z"})]})})]})},pre:({children:o})=>Ce.jsx("pre",{className:"text-xs bg-gray-100 text-gray-800 rounded p-2 overflow-x-auto",children:o}),img:({node:o,...a})=>{let s=!1;const l=a.src?.split("?");return l&&l.length>0&&(s=l[0]?.endsWith(".gif")||l[0]?.endsWith(".webp")),Ce.jsx("div",{className:`${s?"":"w-1/2"} mx-auto`,children:Ce.jsx(OQ.LazyLoadImage,{...a,effect:"opacity",className:"w-full h-auto",onError:c=>{console.warn("Image failed to load:",a.src,"Error:",c),c.currentTarget.style.opacity="0"}})})},a:({href:o,children:a})=>{let s="markdown",l=null;try{s=t.ext?.[0]?.type||"markdown",l=t?.message_id}catch(c){console.error("Error parsing content:",c)}return Ce.jsx("a",{href:o,target:"_blank",rel:"noopener noreferrer",onClick:()=>{yo.trackEvent({event_type:"markdown_link_click",message_type:s,message_id:l,data:{link_url:o,link_text:a}})},children:a})}},children:r})},IQ=({content:t})=>Ce.jsxs("div",{className:"rounded-lg shadow-sm",children:[Ce.jsxs("div",{className:"flex items-center mb-1",children:[Ce.jsx("div",{className:"rounded-full mr-1",children:Ce.jsx("svg",{className:"h-4 w-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}),Ce.jsx("h3",{className:"text-base font-bold",children:"Node Usage Guide"})]}),Ce.jsx("div",{className:"markdown-content",children:t})]}),TQ=({content:t})=>Ce.jsxs("div",{className:"rounded-lg border border-green-200 bg-green-50 p-1 shadow-sm",children:[Ce.jsxs("div",{className:"flex items-center mb-1",children:[Ce.jsx("div",{className:"bg-green-100 rounded-full p-1 mr-1",children:Ce.jsxs("svg",{className:"h-4 w-4 text-green-700",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}),Ce.jsx("h3",{className:"text-sm font-medium text-green-800",children:"Node Parameter Reference"})]}),Ce.jsx("div",{className:"markdown-content text-green-900",children:t})]});function _Q({content:t,name:e="Assistant",avatar:r,format:n,onOptionClick:i,extComponent:o,metadata:a,finished:s,debugGuide:l}){const c=d.useRef(null),u=()=>{try{const f=JSON.parse(t),h=f.ext?.find(m=>m.type==="guides")?.data||[],v=f.ext?.some(m=>m.type==="workflow_update"),g=f.ext?.some(m=>m.type==="param_update");if(a?.intent){const m=a.intent;if(m==="node_explain")return Ce.jsx(IQ,{content:Ce.jsx(zm,{response:f||{}})});if(m==="node_params")return Ce.jsx(TQ,{content:Ce.jsx(zm,{response:f||{}})})}return Ce.jsxs("div",{className:"space-y-3",children:[n==="markdown"&&f.text?Ce.jsx("div",{ref:c,children:Ce.jsx(zm,{response:f||{}})}):f.text?Ce.jsx("p",{className:"whitespace-pre-wrap text-left",children:f.text}):null,h.length>0&&Ce.jsx("div",{className:"flex flex-wrap gap-2 mt-2",children:h.map((m,p)=>Ce.jsx("button",{className:"px-3 py-1.5 text-gray-700 rounded-md hover:!bg-gray-50 transition-colors text-[12px] w-[calc(50%-0.25rem)] border border-gray-700",onClick:()=>i?.(m),children:m},p))}),o]})}catch{return Ce.jsx("p",{className:"whitespace-pre-wrap text-left",children:t})}};return Ce.jsx($A,{name:e,children:Ce.jsxs("div",{className:"w-full rounded-lg bg-gray-50 p-4 text-gray-900 text-sm break-words overflow-hidden",children:[u(),l&&!s&&Ce.jsxs("div",{className:"flex items-center gap-2 text-blue-500 text-sm",children:[Ce.jsx("div",{className:"animate-spin h-4 w-4 border-2 border-blue-500 border-t-transparent rounded-full"}),"Analyzing workflow..."]}),(()=>{try{const f=JSON.parse(t),h=f.ext?.some(g=>g.type==="workflow_update"),v=f.ext?.some(g=>g.type==="param_update");if(!s&&(h||v))return Ce.jsxs("div",{className:"mt-3 p-3 bg-green-50 border border-green-200 rounded-lg",children:[Ce.jsxs("div",{className:"flex items-center gap-2 text-green-700 text-sm",children:[Ce.jsx("svg",{className:"w-5 h-5 text-green-600",fill:"currentColor",viewBox:"0 0 20 20",children:Ce.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),Ce.jsx("span",{className:"font-medium",children:h?"Workflow Updated":"Parameters Updated"})]}),Ce.jsx("div",{className:"text-xs text-green-600 mt-1",children:"Changes have been applied to the canvas. Debug process continues..."})]})}catch{}return null})()]})})}const P5e=Object.freeze(Object.defineProperty({__proto__:null,AIMessage:_Q},Symbol.toStringTag,{value:"Module"}));function PQ({title:t,titleId:e,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":e},r),t?d.createElement("title",{id:e},t):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"}))}const RQ=d.forwardRef(PQ),NQ=({checkpointId:t,onRestore:e,title:r})=>{const[n,i]=d.useState(!1),o=async()=>{if(!n){i(!0);try{yo.trackEvent({event_type:"restore_checkpoint",message_type:"ui",data:{checkpoint_id:t}});const a=await yo.restoreWorkflowCheckpoint(t),s=a.workflow_data_ui||a.workflow_data;s?(a.workflow_data_ui?fr.loadGraphData(s):SA(s),console.log(`Restored workflow checkpoint ${t}`),e()):(console.error("No workflow data found in checkpoint"),alert("No workflow data found in checkpoint."))}catch(a){console.error("Failed to restore checkpoint:",a),alert("Failed to restore workflow checkpoint. Please try again.")}finally{i(!1)}}};return Ce.jsxs("button",{onClick:o,disabled:n,className:`flex flex-row items-center gap-1 p-1 rounded transition-colors ${n?"text-gray-400 cursor-not-allowed":"text-gray-500 hover:!bg-gray-100 hover:!text-gray-600"}`,title:r||`Restore checkpoint ${t}`,children:[Ce.jsx(gQ,{size:12}),Ce.jsx("span",{className:"text-xs",children:"Restore checkpoint"})]})};function MQ({content:t,trace_id:e,ext:r,finished:n}){const[i,o]=d.useState(!1),[a,s]=d.useState(!1),l=async()=>{e&&(await navigator.clipboard.writeText(e),s(!0),setTimeout(()=>s(!1),2e3))},[c,u]=d.useState(null),[f,h]=d.useState([]);return d.useEffect(()=>{console.log("[UserMessage] checkpointId:",c)},[c]),d.useEffect(()=>{if(console.log("[UserMessage] Received ext data:",r),r){const v=r.find(m=>m.type==="workflow_rewrite_checkpoint"||m.type==="debug_checkpoint"&&m.data?.checkpoint_type==="workflow_rewrite_start");if(console.log("[UserMessage] Found checkpoint ext:",v),v&&v.data&&v.data.checkpoint_id&&(u(v.data.checkpoint_id),console.log("[UserMessage] Extracted checkpoint ID:",v.data.checkpoint_id)),r.some(m=>m.type==="img")){let m=[];r.filter(p=>p.type==="img").forEach(p=>m=m.concat(p.data)),h(m)}}},[r,n]),Ce.jsx($A,{name:"User",isUser:!0,children:Ce.jsxs("div",{className:"w-full rounded-lg border border-gray-700 p-4 text-gray-700 text-sm break-words",children:[f.length>0&&Ce.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:f.map(v=>Ce.jsx("img",{src:v.url,alt:v.name,className:"w-16 h-16 object-cover"}))}),Ce.jsx("p",{className:"whitespace-pre-wrap leading-snug",children:t}),Ce.jsx("div",{className:"flex justify-end",children:Ce.jsxs("div",{className:"flex items-center space-x-1 -mb-2",children:[c&&Ce.jsx(NQ,{checkpointId:c,onRestore:()=>{console.log("Workflow restored from user message checkpoint")},title:`Restore to version before this request (Checkpoint ${c})`}),e&&Ce.jsxs("div",{className:"cursor-pointer opacity-40 hover:opacity-100 transition-opacity",onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),onClick:l,children:[Ce.jsx(RQ,{className:"h-3.5 w-3.5 text-gray-500 hover:!text-gray-700"}),i&&Ce.jsx("div",{className:"absolute right-0 -top-6 bg-gray-700 text-white text-[10px] py-0.5 px-1.5 rounded shadow-sm whitespace-nowrap",children:a?"Copied!":"Copy trace ID"})]})]})})]})})}const R5e=Object.freeze(Object.defineProperty({__proto__:null,UserMessage:MQ},Symbol.toStringTag,{value:"Module"}));function DQ({content:t,name:e="Assistant",avatar:r,installedNodes:n}){const i=JSON.parse(t),[o,a]=d.useState(null),[s,l]=d.useState(null),c=i.ext?.find(p=>p.type==="node")?.data||[],u=p=>n.some(y=>y===p),f=c.filter(p=>u(p.name)),h=c.filter(p=>!u(p.name)),v=p=>p>=1e4?`${(p/1e4).toFixed(1)}w`:p>=1e3?`${(p/1e3).toFixed(1)}k`:p.toString(),g=p=>{a(p.name),l(p)},m=()=>{a(null),l(null)};return Ce.jsxs("div",{className:"rounded-lg bg-gray-50 p-3 text-gray-700 text-xs break-words overflow-visible",children:[f.length>0&&Ce.jsxs("div",{className:"space-y-3",children:[Ce.jsx("p",{className:"text-xs font-medium",children:"Installed nodes:"}),Ce.jsx("div",{className:"grid grid-cols-2 gap-3",children:f.map(p=>Ce.jsxs("div",{className:`w-full p-3 rounded-lg border border-gray-200 
                                         hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>g(p),onMouseLeave:m,children:[Ce.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:p.name}),Ce.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[Ce.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[Ce.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:Ce.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),Ce.jsx("span",{children:v(p.github_stars||0)})]}),Ce.jsxs("button",{className:`px-2 py-1 bg-blue-500 text-white rounded-md 
                                                 hover:bg-blue-600 transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{const y=Fw(p.name);y&&(y.connect(p.from_index,y,p.to_index),yo.trackEvent({event_type:"node_add_to_canvas",message_type:"node",message_id:i.message_id,data:{node_name:p.name}}))},children:[Ce.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add to Canvas"]})]})]},p.name))})]}),h.length>0&&Ce.jsxs("div",{className:`space-y-3 ${f.length>0?"mt-4":""}`,children:[Ce.jsx("p",{className:"text-xs font-medium",children:"Uninstalled nodes:"}),Ce.jsx("div",{className:"grid grid-cols-2 gap-3",children:h.map(p=>Ce.jsxs("div",{className:`w-full p-3 rounded-lg border border-gray-200 
                                         hover:shadow-sm transition-all duration-200 relative group`,onMouseEnter:()=>g(p),onMouseLeave:m,children:[Ce.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:p.name}),Ce.jsxs("div",{className:"flex items-center justify-between text-[11px]",children:[Ce.jsxs("div",{className:"flex items-center gap-1 text-gray-600",children:[Ce.jsx("svg",{className:"w-3.5 h-3.5",fill:"currentColor",viewBox:"0 0 24 24",children:Ce.jsx("path",{d:"M12 .25a.75.75 0 0 1 .673.418l3.058 6.197 6.839.994a.75.75 0 0 1 .415 1.279l-4.948 4.823 1.168 6.811a.75.75 0 0 1-1.088.791L12 18.347l-6.117 3.216a.75.75 0 0 1-1.088-.79l1.168-6.812-4.948-4.823a.75.75 0 0 1 .416-1.28l6.838-.993L11.327.668A.75.75 0 0 1 12 .25z"})}),Ce.jsx("span",{children:v(p.github_stars||0)})]}),p.github_url?Ce.jsxs("a",{href:p.github_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 text-gray-900 rounded-md 
                                                     border border-gray-900 hover:bg-gray-100 
                                                     transition-colors text-[10px] flex items-center gap-1`,onClick:()=>{yo.trackEvent({event_type:"node_download",message_type:"node",message_id:i.message_id,data:{node_name:p.name,github_url:p.github_url}})},children:[Ce.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}):Ce.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(p.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md
                                                     border border-gray-300 text-[10px] flex items-center gap-1`,onClick:()=>{yo.trackEvent({event_type:"node_search",message_type:"node",message_id:i.message_id,data:{node_name:p.name}})},children:[Ce.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})]})]},p.name))})]}),o&&s?.description&&Ce.jsxs("div",{className:`fixed -translate-y-full z-[9999] w-64 p-2 
                            bg-gray-800 text-white text-xs rounded-md shadow-lg mb-2`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:[s.description,Ce.jsx("div",{className:`absolute -bottom-1 left-1/2 -translate-x-1/2 
                                border-4 border-transparent border-t-gray-800`})]})]})}const N5e=Object.freeze(Object.defineProperty({__proto__:null,NodeSearch:DQ},Symbol.toStringTag,{value:"Module"}));/**
 * vis-data
 * http://visjs.org/
 *
 * Manage unstructured data using DataSet. Add, update, and remove data, and listen for changes in the data.
 *
 * @version 7.1.9
 * @date    2023-11-24T17:53:34.179Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */function Xp(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Hm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var EA={exports:{}},Qf=function(t){return t&&t.Math===Math&&t},mr=Qf(typeof globalThis=="object"&&globalThis)||Qf(typeof window=="object"&&window)||Qf(typeof self=="object"&&self)||Qf(typeof Hm=="object"&&Hm)||function(){return this}()||Hm||Function("return this")(),tr=function(t){try{return!!t()}catch{return!0}},AQ=tr,Dd=!AQ(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),jQ=Dd,OA=Function.prototype,CO=OA.apply,xO=OA.call,Cc=typeof Reflect=="object"&&Reflect.apply||(jQ?xO.bind(CO):function(){return xO.apply(CO,arguments)}),IA=Dd,TA=Function.prototype,y1=TA.call,kQ=IA&&TA.bind.bind(y1,y1),hr=IA?kQ:function(t){return function(){return y1.apply(t,arguments)}},_A=hr,BQ=_A({}.toString),FQ=_A("".slice),La=function(t){return FQ(BQ(t),8,-1)},LQ=La,zQ=hr,PA=function(t){if(LQ(t)==="Function")return zQ(t)},b1=typeof document=="object"&&document.all,HQ=typeof b1>"u"&&b1!==void 0,RA={all:b1,IS_HTMLDDA:HQ},NA=RA,VQ=NA.all,Tr=NA.IS_HTMLDDA?function(t){return typeof t=="function"||t===VQ}:function(t){return typeof t=="function"},js={},WQ=tr,cn=!WQ(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),KQ=Dd,eh=Function.prototype.call,un=KQ?eh.bind(eh):function(){return eh.apply(eh,arguments)},Yp={},MA={}.propertyIsEnumerable,DA=Object.getOwnPropertyDescriptor,UQ=DA&&!MA.call({1:2},1);Yp.f=UQ?function(e){var r=DA(this,e);return!!r&&r.enumerable}:MA;var ks=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},qQ=hr,GQ=tr,XQ=La,Vm=Object,YQ=qQ("".split),Jp=GQ(function(){return!Vm("z").propertyIsEnumerable(0)})?function(t){return XQ(t)==="String"?YQ(t,""):Vm(t)}:Vm,xc=function(t){return t==null},JQ=xc,ZQ=TypeError,Lw=function(t){if(JQ(t))throw new ZQ("Can't call method on "+t);return t},QQ=Jp,eee=Lw,Io=function(t){return QQ(eee(t))},EO=Tr,AA=RA,tee=AA.all,bn=AA.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:EO(t)||t===tee}:function(t){return typeof t=="object"?t!==null:EO(t)},yr={},Wm=yr,Km=mr,ree=Tr,OO=function(t){return ree(t)?t:void 0},Vn=function(t,e){return arguments.length<2?OO(Wm[t])||OO(Km[t]):Wm[t]&&Wm[t][e]||Km[t]&&Km[t][e]},nee=hr,Xr=nee({}.isPrototypeOf),za=typeof navigator<"u"&&String(navigator.userAgent)||"",jA=mr,Um=za,IO=jA.process,TO=jA.Deno,_O=IO&&IO.versions||TO&&TO.version,PO=_O&&_O.v8,zi,Bv;PO&&(zi=PO.split("."),Bv=zi[0]>0&&zi[0]<4?1:+(zi[0]+zi[1]));!Bv&&Um&&(zi=Um.match(/Edge\/(\d+)/),(!zi||zi[1]>=74)&&(zi=Um.match(/Chrome\/(\d+)/),zi&&(Bv=+zi[1])));var Ec=Bv,RO=Ec,iee=tr,oee=mr,aee=oee.String,Oc=!!Object.getOwnPropertySymbols&&!iee(function(){var t=Symbol("symbol detection");return!aee(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&RO&&RO<41}),see=Oc,kA=see&&!Symbol.sham&&typeof Symbol.iterator=="symbol",lee=Vn,cee=Tr,uee=Xr,dee=kA,fee=Object,Ad=dee?function(t){return typeof t=="symbol"}:function(t){var e=lee("Symbol");return cee(e)&&uee(e.prototype,fee(t))},hee=String,Ic=function(t){try{return hee(t)}catch{return"Object"}},vee=Tr,pee=Ic,gee=TypeError,ii=function(t){if(vee(t))return t;throw new gee(pee(t)+" is not a function")},mee=ii,yee=xc,zw=function(t,e){var r=t[e];return yee(r)?void 0:mee(r)},qm=un,Gm=Tr,Xm=bn,bee=TypeError,$ee=function(t,e){var r,n;if(e==="string"&&Gm(r=t.toString)&&!Xm(n=qm(r,t))||Gm(r=t.valueOf)&&!Xm(n=qm(r,t))||e!=="string"&&Gm(r=t.toString)&&!Xm(n=qm(r,t)))return n;throw new bee("Can't convert object to primitive value")},BA={exports:{}},wee=!0,NO=mr,See=Object.defineProperty,Cee=function(t,e){try{See(NO,t,{value:e,configurable:!0,writable:!0})}catch{NO[t]=e}return e},xee=mr,Eee=Cee,MO="__core-js_shared__",Oee=xee[MO]||Eee(MO,{}),Hw=Oee,DO=Hw;(BA.exports=function(t,e){return DO[t]||(DO[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.33.2",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.2/LICENSE",source:"https://github.com/zloirock/core-js"});var Tc=BA.exports,Iee=Lw,Tee=Object,oi=function(t){return Tee(Iee(t))},_ee=hr,Pee=oi,Ree=_ee({}.hasOwnProperty),Yr=Object.hasOwn||function(e,r){return Ree(Pee(e),r)},Nee=hr,Mee=0,Dee=Math.random(),Aee=Nee(1 .toString),Zp=function(t){return"Symbol("+(t===void 0?"":t)+")_"+Aee(++Mee+Dee,36)},jee=mr,kee=Tc,AO=Yr,Bee=Zp,Fee=Oc,Lee=kA,wl=jee.Symbol,Ym=kee("wks"),zee=Lee?wl.for||wl:wl&&wl.withoutSetter||Bee,wr=function(t){return AO(Ym,t)||(Ym[t]=Fee&&AO(wl,t)?wl[t]:zee("Symbol."+t)),Ym[t]},Hee=un,jO=bn,kO=Ad,Vee=zw,Wee=$ee,Kee=wr,Uee=TypeError,qee=Kee("toPrimitive"),Gee=function(t,e){if(!jO(t)||kO(t))return t;var r=Vee(t,qee),n;if(r){if(e===void 0&&(e="default"),n=Hee(r,t,e),!jO(n)||kO(n))return n;throw new Uee("Can't convert object to primitive value")}return e===void 0&&(e="number"),Wee(t,e)},Xee=Gee,Yee=Ad,Qp=function(t){var e=Xee(t,"string");return Yee(e)?e:e+""},Jee=mr,BO=bn,$1=Jee.document,Zee=BO($1)&&BO($1.createElement),Vw=function(t){return Zee?$1.createElement(t):{}},Qee=cn,ete=tr,tte=Vw,FA=!Qee&&!ete(function(){return Object.defineProperty(tte("div"),"a",{get:function(){return 7}}).a!==7}),rte=cn,nte=un,ite=Yp,ote=ks,ate=Io,ste=Qp,lte=Yr,cte=FA,FO=Object.getOwnPropertyDescriptor;js.f=rte?FO:function(e,r){if(e=ate(e),r=ste(r),cte)try{return FO(e,r)}catch{}if(lte(e,r))return ote(!nte(ite.f,e,r),e[r])};var ute=tr,dte=Tr,fte=/#|\.prototype\./,jd=function(t,e){var r=vte[hte(t)];return r===gte?!0:r===pte?!1:dte(e)?ute(e):!!e},hte=jd.normalize=function(t){return String(t).replace(fte,".").toLowerCase()},vte=jd.data={},pte=jd.NATIVE="N",gte=jd.POLYFILL="P",LA=jd,LO=PA,mte=ii,yte=Dd,bte=LO(LO.bind),Ha=function(t,e){return mte(t),e===void 0?t:yte?bte(t,e):function(){return t.apply(e,arguments)}},ai={},$te=cn,wte=tr,zA=$te&&wte(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Ste=bn,Cte=String,xte=TypeError,bi=function(t){if(Ste(t))return t;throw new xte(Cte(t)+" is not an object")},Ete=cn,Ote=FA,Ite=zA,th=bi,zO=Qp,Tte=TypeError,Jm=Object.defineProperty,_te=Object.getOwnPropertyDescriptor,Zm="enumerable",Qm="configurable",ey="writable";ai.f=Ete?Ite?function(e,r,n){if(th(e),r=zO(r),th(n),typeof e=="function"&&r==="prototype"&&"value"in n&&ey in n&&!n[ey]){var i=_te(e,r);i&&i[ey]&&(e[r]=n.value,n={configurable:Qm in n?n[Qm]:i[Qm],enumerable:Zm in n?n[Zm]:i[Zm],writable:!1})}return Jm(e,r,n)}:Jm:function(e,r,n){if(th(e),r=zO(r),th(n),Ote)try{return Jm(e,r,n)}catch{}if("get"in n||"set"in n)throw new Tte("Accessors not supported");return"value"in n&&(e[r]=n.value),e};var Pte=cn,Rte=ai,Nte=ks,Jo=Pte?function(t,e,r){return Rte.f(t,e,Nte(1,r))}:function(t,e,r){return t[e]=r,t},rh=mr,Mte=Cc,Dte=PA,Ate=Tr,jte=js.f,kte=LA,ol=yr,Bte=Ha,al=Jo,HO=Yr,Fte=function(t){var e=function(r,n,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,i)}return Mte(t,this,arguments)};return e.prototype=t.prototype,e},yt=function(t,e){var r=t.target,n=t.global,i=t.stat,o=t.proto,a=n?rh:i?rh[r]:(rh[r]||{}).prototype,s=n?ol:ol[r]||al(ol,r,{})[r],l=s.prototype,c,u,f,h,v,g,m,p,y;for(h in e)c=kte(n?h:r+(i?".":"#")+h,t.forced),u=!c&&a&&HO(a,h),g=s[h],u&&(t.dontCallGetSet?(y=jte(a,h),m=y&&y.value):m=a[h]),v=u&&m?m:e[h],!(u&&typeof g==typeof v)&&(t.bind&&u?p=Bte(v,rh):t.wrap&&u?p=Fte(v):o&&Ate(v)?p=Dte(v):p=v,(t.sham||v&&v.sham||g&&g.sham)&&al(p,"sham",!0),al(s,h,p),o&&(f=r+"Prototype",HO(ol,f)||al(ol,f,{}),al(ol[f],h,v),t.real&&l&&(c||!l[h])&&al(l,h,v)))},Lte=yt,zte=cn,VO=ai.f;Lte({target:"Object",stat:!0,forced:Object.defineProperty!==VO,sham:!zte},{defineProperty:VO});var Hte=yr,HA=Hte.Object,Vte=EA.exports=function(e,r,n){return HA.defineProperty(e,r,n)};HA.defineProperty.sham&&(Vte.sham=!0);var Wte=EA.exports,Kte=Wte,VA=Kte,Ute=VA,qte=Ute,Gte=qte,Xte=Gte,WA=Xte,eg=wt(WA),Yte=La,Va=Array.isArray||function(e){return Yte(e)==="Array"},Jte=Math.ceil,Zte=Math.floor,Qte=Math.trunc||function(e){var r=+e;return(r>0?Zte:Jte)(r)},ere=Qte,tg=function(t){var e=+t;return e!==e||e===0?0:ere(e)},tre=tg,rre=Math.min,nre=function(t){return t>0?rre(tre(t),9007199254740991):0},ire=nre,$i=function(t){return ire(t.length)},ore=TypeError,are=9007199254740991,rg=function(t){if(t>are)throw ore("Maximum allowed index exceeded");return t},sre=Qp,lre=ai,cre=ks,_c=function(t,e,r){var n=sre(e);n in t?lre.f(t,n,cre(0,r)):t[n]=r},ure=wr,dre=ure("toStringTag"),KA={};KA[dre]="z";var Ww=String(KA)==="[object z]",fre=Ww,hre=Tr,Zh=La,vre=wr,pre=vre("toStringTag"),gre=Object,mre=Zh(function(){return arguments}())==="Arguments",yre=function(t,e){try{return t[e]}catch{}},Zo=fre?Zh:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=yre(e=gre(t),pre))=="string"?r:mre?Zh(e):(n=Zh(e))==="Object"&&hre(e.callee)?"Arguments":n},bre=hr,$re=Tr,w1=Hw,wre=bre(Function.toString);$re(w1.inspectSource)||(w1.inspectSource=function(t){return wre(t)});var UA=w1.inspectSource,Sre=hr,Cre=tr,qA=Tr,xre=Zo,Ere=Vn,Ore=UA,GA=function(){},Ire=[],XA=Ere("Reflect","construct"),Kw=/^\s*(?:class|function)\b/,Tre=Sre(Kw.exec),_re=!Kw.test(GA),nu=function(e){if(!qA(e))return!1;try{return XA(GA,Ire,e),!0}catch{return!1}},YA=function(e){if(!qA(e))return!1;switch(xre(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return _re||!!Tre(Kw,Ore(e))}catch{return!0}};YA.sham=!0;var ng=!XA||Cre(function(){var t;return nu(nu.call)||!nu(Object)||!nu(function(){t=!0})||t})?YA:nu,WO=Va,Pre=ng,Rre=bn,Nre=wr,Mre=Nre("species"),KO=Array,Dre=function(t){var e;return WO(t)&&(e=t.constructor,Pre(e)&&(e===KO||WO(e.prototype))?e=void 0:Rre(e)&&(e=e[Mre],e===null&&(e=void 0))),e===void 0?KO:e},Are=Dre,ig=function(t,e){return new(Are(t))(e===0?0:e)},jre=tr,kre=wr,Bre=Ec,Fre=kre("species"),kd=function(t){return Bre>=51||!jre(function(){var e=[],r=e.constructor={};return r[Fre]=function(){return{foo:1}},e[t](Boolean).foo!==1})},Lre=yt,zre=tr,Hre=Va,Vre=bn,Wre=oi,Kre=$i,UO=rg,qO=_c,Ure=ig,qre=kd,Gre=wr,Xre=Ec,JA=Gre("isConcatSpreadable"),Yre=Xre>=51||!zre(function(){var t=[];return t[JA]=!1,t.concat()[0]!==t}),Jre=function(t){if(!Vre(t))return!1;var e=t[JA];return e!==void 0?!!e:Hre(t)},Zre=!Yre||!qre("concat");Lre({target:"Array",proto:!0,forced:Zre},{concat:function(e){var r=Wre(this),n=Ure(r,0),i=0,o,a,s,l,c;for(o=-1,s=arguments.length;o<s;o++)if(c=o===-1?r:arguments[o],Jre(c))for(l=Kre(c),UO(i+l),a=0;a<l;a++,i++)a in c&&qO(n,i,c[a]);else UO(i+1),qO(n,i++,c);return n.length=i,n}});var Qre=Zo,ene=String,Bs=function(t){if(Qre(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return ene(t)},og={},tne=tg,rne=Math.max,nne=Math.min,ag=function(t,e){var r=tne(t);return r<0?rne(r+e,0):nne(r,e)},ine=Io,one=ag,ane=$i,sne=function(t){return function(e,r,n){var i=ine(e),o=ane(i),a=one(n,o),s;if(t&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},lne={indexOf:sne(!1)},Bd={},cne=hr,ty=Yr,une=Io,dne=lne.indexOf,fne=Bd,GO=cne([].push),ZA=function(t,e){var r=une(t),n=0,i=[],o;for(o in r)!ty(fne,o)&&ty(r,o)&&GO(i,o);for(;e.length>n;)ty(r,o=e[n++])&&(~dne(i,o)||GO(i,o));return i},Uw=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],hne=ZA,vne=Uw,sg=Object.keys||function(e){return hne(e,vne)},pne=cn,gne=zA,mne=ai,yne=bi,bne=Io,$ne=sg;og.f=pne&&!gne?Object.defineProperties:function(e,r){yne(e);for(var n=bne(r),i=$ne(r),o=i.length,a=0,s;o>a;)mne.f(e,s=i[a++],n[s]);return e};var wne=Vn,QA=wne("document","documentElement"),Sne=Tc,Cne=Zp,XO=Sne("keys"),lg=function(t){return XO[t]||(XO[t]=Cne(t))},xne=bi,Ene=og,YO=Uw,One=Bd,Ine=QA,Tne=Vw,_ne=lg,JO=">",ZO="<",S1="prototype",C1="script",ej=_ne("IE_PROTO"),ry=function(){},tj=function(t){return ZO+C1+JO+t+ZO+"/"+C1+JO},QO=function(t){t.write(tj("")),t.close();var e=t.parentWindow.Object;return t=null,e},Pne=function(){var t=Tne("iframe"),e="java"+C1+":",r;return t.style.display="none",Ine.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(tj("document.F=Object")),r.close(),r.F},nh,Qh=function(){try{nh=new ActiveXObject("htmlfile")}catch{}Qh=typeof document<"u"?document.domain&&nh?QO(nh):Pne():QO(nh);for(var t=YO.length;t--;)delete Qh[S1][YO[t]];return Qh()};One[ej]=!0;var Fs=Object.create||function(e,r){var n;return e!==null?(ry[S1]=xne(e),n=new ry,ry[S1]=null,n[ej]=e):n=Qh(),r===void 0?n:Ene.f(n,r)},Fd={},Rne=ZA,Nne=Uw,Mne=Nne.concat("length","prototype");Fd.f=Object.getOwnPropertyNames||function(e){return Rne(e,Mne)};var qw={},eI=ag,Dne=$i,Ane=_c,jne=Array,kne=Math.max,rj=function(t,e,r){for(var n=Dne(t),i=eI(e,n),o=eI(r===void 0?n:r,n),a=jne(kne(o-i,0)),s=0;i<o;i++,s++)Ane(a,s,t[i]);return a.length=s,a},Bne=La,Fne=Io,nj=Fd.f,Lne=rj,ij=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],zne=function(t){try{return nj(t)}catch{return Lne(ij)}};qw.f=function(e){return ij&&Bne(e)==="Window"?zne(e):nj(Fne(e))};var Ld={};Ld.f=Object.getOwnPropertySymbols;var Hne=Jo,Pc=function(t,e,r,n){return n&&n.enumerable?t[e]=r:Hne(t,e,r),t},Vne=ai,Gw=function(t,e,r){return Vne.f(t,e,r)},zd={},Wne=wr;zd.f=Wne;var tI=yr,Kne=Yr,Une=zd,qne=ai.f,_r=function(t){var e=tI.Symbol||(tI.Symbol={});Kne(e,t)||qne(e,t,{value:Une.f(t)})},Gne=un,Xne=Vn,Yne=wr,Jne=Pc,oj=function(){var t=Xne("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=Yne("toPrimitive");e&&!e[n]&&Jne(e,n,function(i){return Gne(r,this)},{})},Zne=Ww,Qne=Zo,eie=Zne?{}.toString:function(){return"[object "+Qne(this)+"]"},tie=Ww,rie=ai.f,nie=Jo,iie=Yr,oie=eie,aie=wr,rI=aie("toStringTag"),Ls=function(t,e,r,n){if(t){var i=r?t:t.prototype;iie(i,rI)||rie(i,rI,{configurable:!0,value:e}),n&&!tie&&nie(i,"toString",oie)}},sie=mr,lie=Tr,nI=sie.WeakMap,cie=lie(nI)&&/native code/.test(String(nI)),uie=cie,aj=mr,die=bn,fie=Jo,ny=Yr,iy=Hw,hie=lg,vie=Bd,iI="Object already initialized",x1=aj.TypeError,pie=aj.WeakMap,Fv,ed,Lv,gie=function(t){return Lv(t)?ed(t):Fv(t,{})},mie=function(t){return function(e){var r;if(!die(e)||(r=ed(e)).type!==t)throw new x1("Incompatible receiver, "+t+" required");return r}};if(uie||iy.state){var so=iy.state||(iy.state=new pie);so.get=so.get,so.has=so.has,so.set=so.set,Fv=function(t,e){if(so.has(t))throw new x1(iI);return e.facade=t,so.set(t,e),e},ed=function(t){return so.get(t)||{}},Lv=function(t){return so.has(t)}}else{var sl=hie("state");vie[sl]=!0,Fv=function(t,e){if(ny(t,sl))throw new x1(iI);return e.facade=t,fie(t,sl,e),e},ed=function(t){return ny(t,sl)?t[sl]:{}},Lv=function(t){return ny(t,sl)}}var Rc={set:Fv,get:ed,has:Lv,enforce:gie,getterFor:mie},yie=Ha,bie=hr,$ie=Jp,wie=oi,Sie=$i,Cie=ig,oI=bie([].push),ih=function(t){var e=t===1,r=t===2,n=t===3,i=t===4,o=t===6,a=t===7,s=t===5||o;return function(l,c,u,f){for(var h=wie(l),v=$ie(h),g=yie(c,u),m=Sie(v),p=0,y=f||Cie,b=e?y(l,m):r||a?y(l,0):void 0,$,S;m>p;p++)if((s||p in v)&&($=v[p],S=g($,p,h),t))if(e)b[p]=S;else if(S)switch(t){case 3:return!0;case 5:return $;case 6:return p;case 2:oI(b,$)}else switch(t){case 4:return!1;case 7:oI(b,$)}return o?-1:n||i?i:b}},Nc={forEach:ih(0),map:ih(1),filter:ih(2),some:ih(3)},cg=yt,Hd=mr,Xw=un,xie=hr,Jl=cn,Zl=Oc,Eie=tr,an=Yr,Oie=Xr,E1=bi,ug=Io,Yw=Qp,Iie=Bs,O1=ks,td=Fs,sj=sg,Tie=Fd,lj=qw,_ie=Ld,cj=js,uj=ai,Pie=og,dj=Yp,aI=Pc,Rie=Gw,Jw=Tc,Nie=lg,fj=Bd,sI=Zp,Mie=wr,Die=zd,Aie=_r,jie=oj,kie=Ls,hj=Rc,dg=Nc.forEach,Zn=Nie("hidden"),fg="Symbol",rd="prototype",Bie=hj.set,lI=hj.getterFor(fg),Ui=Object[rd],ss=Hd.Symbol,vu=ss&&ss[rd],Fie=Hd.RangeError,Lie=Hd.TypeError,oy=Hd.QObject,vj=cj.f,ls=uj.f,pj=lj.f,zie=dj.f,gj=xie([].push),qo=Jw("symbols"),Vd=Jw("op-symbols"),Hie=Jw("wks"),I1=!oy||!oy[rd]||!oy[rd].findChild,mj=function(t,e,r){var n=vj(Ui,e);n&&delete Ui[e],ls(t,e,r),n&&t!==Ui&&ls(Ui,e,n)},T1=Jl&&Eie(function(){return td(ls({},"a",{get:function(){return ls(this,"a",{value:7}).a}})).a!==7})?mj:ls,ay=function(t,e){var r=qo[t]=td(vu);return Bie(r,{type:fg,tag:t,description:e}),Jl||(r.description=e),r},hg=function(e,r,n){e===Ui&&hg(Vd,r,n),E1(e);var i=Yw(r);return E1(n),an(qo,i)?(n.enumerable?(an(e,Zn)&&e[Zn][i]&&(e[Zn][i]=!1),n=td(n,{enumerable:O1(0,!1)})):(an(e,Zn)||ls(e,Zn,O1(1,{})),e[Zn][i]=!0),T1(e,i,n)):ls(e,i,n)},Zw=function(e,r){E1(e);var n=ug(r),i=sj(n).concat(wj(n));return dg(i,function(o){(!Jl||Xw(yj,n,o))&&hg(e,o,n[o])}),e},Vie=function(e,r){return r===void 0?td(e):Zw(td(e),r)},yj=function(e){var r=Yw(e),n=Xw(zie,this,r);return this===Ui&&an(qo,r)&&!an(Vd,r)?!1:n||!an(this,r)||!an(qo,r)||an(this,Zn)&&this[Zn][r]?n:!0},bj=function(e,r){var n=ug(e),i=Yw(r);if(!(n===Ui&&an(qo,i)&&!an(Vd,i))){var o=vj(n,i);return o&&an(qo,i)&&!(an(n,Zn)&&n[Zn][i])&&(o.enumerable=!0),o}},$j=function(e){var r=pj(ug(e)),n=[];return dg(r,function(i){!an(qo,i)&&!an(fj,i)&&gj(n,i)}),n},wj=function(t){var e=t===Ui,r=pj(e?Vd:ug(t)),n=[];return dg(r,function(i){an(qo,i)&&(!e||an(Ui,i))&&gj(n,qo[i])}),n};Zl||(ss=function(){if(Oie(vu,this))throw new Lie("Symbol is not a constructor");var e=!arguments.length||arguments[0]===void 0?void 0:Iie(arguments[0]),r=sI(e),n=function(i){var o=this===void 0?Hd:this;o===Ui&&Xw(n,Vd,i),an(o,Zn)&&an(o[Zn],r)&&(o[Zn][r]=!1);var a=O1(1,i);try{T1(o,r,a)}catch(s){if(!(s instanceof Fie))throw s;mj(o,r,a)}};return Jl&&I1&&T1(Ui,r,{configurable:!0,set:n}),ay(r,e)},vu=ss[rd],aI(vu,"toString",function(){return lI(this).tag}),aI(ss,"withoutSetter",function(t){return ay(sI(t),t)}),dj.f=yj,uj.f=hg,Pie.f=Zw,cj.f=bj,Tie.f=lj.f=$j,_ie.f=wj,Die.f=function(t){return ay(Mie(t),t)},Jl&&Rie(vu,"description",{configurable:!0,get:function(){return lI(this).description}}));cg({global:!0,wrap:!0,forced:!Zl,sham:!Zl},{Symbol:ss});dg(sj(Hie),function(t){Aie(t)});cg({target:fg,stat:!0,forced:!Zl},{useSetter:function(){I1=!0},useSimple:function(){I1=!1}});cg({target:"Object",stat:!0,forced:!Zl,sham:!Jl},{create:Vie,defineProperty:hg,defineProperties:Zw,getOwnPropertyDescriptor:bj});cg({target:"Object",stat:!0,forced:!Zl},{getOwnPropertyNames:$j});jie();kie(ss,fg);fj[Zn]=!0;var Wie=Oc,Sj=Wie&&!!Symbol.for&&!!Symbol.keyFor,Kie=yt,Uie=Vn,qie=Yr,Gie=Bs,Cj=Tc,Xie=Sj,sy=Cj("string-to-symbol-registry"),Yie=Cj("symbol-to-string-registry");Kie({target:"Symbol",stat:!0,forced:!Xie},{for:function(t){var e=Gie(t);if(qie(sy,e))return sy[e];var r=Uie("Symbol")(e);return sy[e]=r,Yie[r]=e,r}});var Jie=yt,Zie=Yr,Qie=Ad,eoe=Ic,toe=Tc,roe=Sj,cI=toe("symbol-to-string-registry");Jie({target:"Symbol",stat:!0,forced:!roe},{keyFor:function(e){if(!Qie(e))throw new TypeError(eoe(e)+" is not a symbol");if(Zie(cI,e))return cI[e]}});var noe=hr,Wd=noe([].slice),ioe=hr,uI=Va,ooe=Tr,dI=La,aoe=Bs,fI=ioe([].push),soe=function(t){if(ooe(t))return t;if(uI(t)){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];typeof i=="string"?fI(r,i):(typeof i=="number"||dI(i)==="Number"||dI(i)==="String")&&fI(r,aoe(i))}var o=r.length,a=!0;return function(s,l){if(a)return a=!1,l;if(uI(this))return l;for(var c=0;c<o;c++)if(r[c]===s)return l}}},loe=yt,xj=Vn,Ej=Cc,coe=un,Kd=hr,Oj=tr,hI=Tr,vI=Ad,Ij=Wd,uoe=soe,doe=Oc,foe=String,$a=xj("JSON","stringify"),oh=Kd(/./.exec),pI=Kd("".charAt),hoe=Kd("".charCodeAt),voe=Kd("".replace),poe=Kd(1 .toString),goe=/[\uD800-\uDFFF]/g,gI=/^[\uD800-\uDBFF]$/,mI=/^[\uDC00-\uDFFF]$/,yI=!doe||Oj(function(){var t=xj("Symbol")("stringify detection");return $a([t])!=="[null]"||$a({a:t})!=="{}"||$a(Object(t))!=="{}"}),bI=Oj(function(){return $a("\uDF06\uD834")!=='"\\udf06\\ud834"'||$a("\uDEAD")!=='"\\udead"'}),moe=function(t,e){var r=Ij(arguments),n=uoe(e);if(!(!hI(n)&&(t===void 0||vI(t))))return r[1]=function(i,o){if(hI(n)&&(o=coe(n,this,foe(i),o)),!vI(o))return o},Ej($a,null,r)},yoe=function(t,e,r){var n=pI(r,e-1),i=pI(r,e+1);return oh(gI,t)&&!oh(mI,i)||oh(mI,t)&&!oh(gI,n)?"\\u"+poe(hoe(t,0),16):t};$a&&loe({target:"JSON",stat:!0,forced:yI||bI},{stringify:function(e,r,n){var i=Ij(arguments),o=Ej(yI?moe:$a,null,i);return bI&&typeof o=="string"?voe(o,goe,yoe):o}});var boe=yt,$oe=Oc,woe=tr,Tj=Ld,Soe=oi,Coe=!$oe||woe(function(){Tj.f(1)});boe({target:"Object",stat:!0,forced:Coe},{getOwnPropertySymbols:function(e){var r=Tj.f;return r?r(Soe(e)):[]}});var xoe=_r;xoe("asyncIterator");var Eoe=_r;Eoe("hasInstance");var Ooe=_r;Ooe("isConcatSpreadable");var Ioe=_r;Ioe("iterator");var Toe=_r;Toe("match");var _oe=_r;_oe("matchAll");var Poe=_r;Poe("replace");var Roe=_r;Roe("search");var Noe=_r;Noe("species");var Moe=_r;Moe("split");var Doe=_r,Aoe=oj;Doe("toPrimitive");Aoe();var joe=Vn,koe=_r,Boe=Ls;koe("toStringTag");Boe(joe("Symbol"),"Symbol");var Foe=_r;Foe("unscopables");var Loe=mr,zoe=Ls;zoe(Loe.JSON,"JSON",!0);var Hoe=yr,Voe=Hoe.Symbol,Mc={},_1=cn,Woe=Yr,_j=Function.prototype,Koe=_1&&Object.getOwnPropertyDescriptor,Pj=Woe(_j,"name"),Uoe=Pj&&function(){}.name==="something";Pj&&(!_1||_1&&Koe(_j,"name").configurable);var qoe={PROPER:Uoe},Goe=tr,Rj=!Goe(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Xoe=Yr,Yoe=Tr,Joe=oi,Zoe=lg,Qoe=Rj,$I=Zoe("IE_PROTO"),P1=Object,eae=P1.prototype,vg=Qoe?P1.getPrototypeOf:function(t){var e=Joe(t);if(Xoe(e,$I))return e[$I];var r=e.constructor;return Yoe(r)&&e instanceof r?r.prototype:e instanceof P1?eae:null},tae=tr,rae=Tr,nae=bn,iae=Fs,wI=vg,oae=Pc,aae=wr,R1=aae("iterator"),Nj=!1,ko,ly,cy;[].keys&&(cy=[].keys(),"next"in cy?(ly=wI(wI(cy)),ly!==Object.prototype&&(ko=ly)):Nj=!0);var sae=!nae(ko)||tae(function(){var t={};return ko[R1].call(t)!==t});sae?ko={}:ko=iae(ko);rae(ko[R1])||oae(ko,R1,function(){return this});var Mj={IteratorPrototype:ko,BUGGY_SAFARI_ITERATORS:Nj},lae=Mj.IteratorPrototype,cae=Fs,uae=ks,dae=Ls,fae=Mc,hae=function(){return this},vae=function(t,e,r,n){var i=e+" Iterator";return t.prototype=cae(lae,{next:uae(+!n,r)}),dae(t,i,!1,!0),fae[i]=hae,t},pae=hr,gae=ii,mae=function(t,e,r){try{return pae(gae(Object.getOwnPropertyDescriptor(t,e)[r]))}catch{}},yae=Tr,bae=String,$ae=TypeError,wae=function(t){if(typeof t=="object"||yae(t))return t;throw new $ae("Can't set "+bae(t)+" as a prototype")},Sae=mae,Cae=bi,xae=wae,Dj=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},r;try{r=Sae(Object.prototype,"__proto__","set"),r(e,[]),t=e instanceof Array}catch{}return function(i,o){return Cae(i),xae(o),t?r(i,o):i.__proto__=o,i}}():void 0),Eae=yt,Oae=un,Iae=qoe,Tae=vae,_ae=vg,Pae=Ls,SI=Pc,Rae=wr,CI=Mc,Nae=Mj,Mae=Iae.PROPER,ah=Nae.BUGGY_SAFARI_ITERATORS,uy=Rae("iterator"),xI="keys",sh="values",EI="entries",Dae=function(){return this},Qw=function(t,e,r,n,i,o,a){Tae(r,e,n);var s=function(y){if(y===i&&h)return h;if(!ah&&y&&y in u)return u[y];switch(y){case xI:return function(){return new r(this,y)};case sh:return function(){return new r(this,y)};case EI:return function(){return new r(this,y)}}return function(){return new r(this)}},l=e+" Iterator",c=!1,u=t.prototype,f=u[uy]||u["@@iterator"]||i&&u[i],h=!ah&&f||s(i),v=e==="Array"&&u.entries||f,g,m,p;if(v&&(g=_ae(v.call(new t)),g!==Object.prototype&&g.next&&(Pae(g,l,!0,!0),CI[l]=Dae)),Mae&&i===sh&&f&&f.name!==sh&&(c=!0,h=function(){return Oae(f,this)}),i)if(m={values:s(sh),keys:o?h:s(xI),entries:s(EI)},a)for(p in m)(ah||c||!(p in u))&&SI(u,p,m[p]);else Eae({target:e,proto:!0,forced:ah||c},m);return a&&u[uy]!==h&&SI(u,uy,h,{}),CI[e]=h,m},eS=function(t,e){return{value:t,done:e}},Aae=Io,OI=Mc,Aj=Rc;ai.f;var jae=Qw,lh=eS,jj="Array Iterator",kae=Aj.set,Bae=Aj.getterFor(jj);jae(Array,"Array",function(t,e){kae(this,{type:jj,target:Aae(t),index:0,kind:e})},function(){var t=Bae(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=void 0,lh(void 0,!0);switch(t.kind){case"keys":return lh(r,!1);case"values":return lh(e[r],!1)}return lh([r,e[r]],!1)},"values");OI.Arguments=OI.Array;var Fae={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Lae=Fae,zae=mr,Hae=Zo,Vae=Jo,II=Mc,Wae=wr,TI=Wae("toStringTag");for(var dy in Lae){var _I=zae[dy],fy=_I&&_I.prototype;fy&&Hae(fy)!==TI&&Vae(fy,TI,dy),II[dy]=II.Array}var Kae=Voe,kj=Kae,Uae=wr,qae=ai.f,PI=Uae("metadata"),RI=Function.prototype;RI[PI]===void 0&&qae(RI,PI,{value:null});var Gae=_r;Gae("asyncDispose");var Xae=_r;Xae("dispose");var Yae=_r;Yae("metadata");var Jae=kj,Zae=Jae,Qae=Vn,ese=hr,tS=Qae("Symbol"),tse=tS.keyFor,rse=ese(tS.prototype.valueOf),Bj=tS.isRegisteredSymbol||function(e){try{return tse(rse(e))!==void 0}catch{return!1}},nse=yt,ise=Bj;nse({target:"Symbol",stat:!0},{isRegisteredSymbol:ise});var ose=Tc,Fj=Vn,ase=hr,sse=Ad,lse=wr,zv=Fj("Symbol"),NI=zv.isWellKnownSymbol,Lj=Fj("Object","getOwnPropertyNames"),cse=ase(zv.prototype.valueOf),MI=ose("wks");for(var hy=0,DI=Lj(zv),use=DI.length;hy<use;hy++)try{var AI=DI[hy];sse(zv[AI])&&lse(AI)}catch{}var zj=function(e){if(NI&&NI(e))return!0;try{for(var r=cse(e),n=0,i=Lj(MI),o=i.length;n<o;n++)if(MI[i[n]]==r)return!0}catch{}return!1},dse=yt,fse=zj;dse({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:fse});var hse=_r;hse("matcher");var vse=_r;vse("observable");var pse=yt,gse=Bj;pse({target:"Symbol",stat:!0},{isRegistered:gse});var mse=yt,yse=zj;mse({target:"Symbol",stat:!0,forced:!0},{isWellKnown:yse});var bse=_r;bse("metadataKey");var $se=_r;$se("patternMatch");var wse=_r;wse("replaceAll");var Sse=Zae,Cse=Sse,rS=Cse,Sl=wt(rS),nS=hr,xse=tg,Ese=Bs,Ose=Lw,Ise=nS("".charAt),jI=nS("".charCodeAt),Tse=nS("".slice),_se=function(t){return function(e,r){var n=Ese(Ose(e)),i=xse(r),o=n.length,a,s;return i<0||i>=o?t?"":void 0:(a=jI(n,i),a<55296||a>56319||i+1===o||(s=jI(n,i+1))<56320||s>57343?t?Ise(n,i):a:t?Tse(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},Pse={charAt:_se(!0)},Rse=Pse.charAt,Nse=Bs,Hj=Rc,Mse=Qw,kI=eS,Vj="String Iterator",Dse=Hj.set,Ase=Hj.getterFor(Vj);Mse(String,"String",function(t){Dse(this,{type:Vj,string:Nse(t),index:0})},function(){var e=Ase(this),r=e.string,n=e.index,i;return n>=r.length?kI(void 0,!0):(i=Rse(r,n),e.index+=i.length,kI(i,!1))});var jse=zd,kse=jse.f("iterator"),Bse=kse,Wj=Bse,Fse=Wj,Lse=Fse,zse=Lse,Hse=zse,Kj=Hse,Vse=wt(Kj);function Ql(t){"@babel/helpers - typeof";return Ql=typeof Sl=="function"&&typeof Vse=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Sl=="function"&&e.constructor===Sl&&e!==Sl.prototype?"symbol":typeof e},Ql(t)}var Wse=zd,Kse=Wse.f("toPrimitive"),Use=Kse,qse=Use,Gse=qse,Xse=Gse,Yse=Xse,Jse=Yse,Zse=Jse,Qse=wt(Zse);function ele(t,e){if(Ql(t)!=="object"||t===null)return t;var r=t[Qse];if(r!==void 0){var n=r.call(t,e);if(Ql(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Uj(t){var e=ele(t,"string");return Ql(e)==="symbol"?e:String(e)}function BI(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),eg(t,Uj(n.key),n)}}function pg(t,e,r){return e&&BI(t.prototype,e),r&&BI(t,r),eg(t,"prototype",{writable:!1}),t}function wa(t,e,r){return e=Uj(e),e in t?eg(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var qj=hr,tle=ii,rle=bn,nle=Yr,FI=Wd,ile=Dd,Gj=Function,ole=qj([].concat),ale=qj([].join),vy={},sle=function(t,e,r){if(!nle(vy,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";vy[e]=Gj("C,a","return new C("+ale(n,",")+")")}return vy[e](t,r)},Xj=ile?Gj.bind:function(e){var r=tle(this),n=r.prototype,i=FI(arguments,1),o=function(){var s=ole(i,FI(arguments));return this instanceof o?sle(r,s.length,s):r.apply(e,s)};return rle(n)&&(o.prototype=n),o},lle=yt,LI=Xj;lle({target:"Function",proto:!0,forced:Function.bind!==LI},{bind:LI});var cle=mr,ule=yr,Pn=function(t,e){var r=ule[t+"Prototype"],n=r&&r[e];if(n)return n;var i=cle[t],o=i&&i.prototype;return o&&o[e]},dle=Pn,fle=dle("Function","bind"),hle=Xr,vle=fle,py=Function.prototype,ple=function(t){var e=t.bind;return t===py||hle(py,t)&&e===py.bind?vle:e},gle=ple,Yj=gle,mle=Yj,Jj=wt(mle),yle=ii,ble=oi,$le=Jp,wle=$i,Sle=TypeError,Cle=function(t){return function(e,r,n,i){yle(r);var o=ble(e),a=$le(o),s=wle(o),l=t?s-1:0,c=t?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=c;break}if(l+=c,t?l<0:s<=l)throw new Sle("Reduce of empty array with no initial value")}for(;t?l>=0:s>l;l+=c)l in a&&(i=r(i,a[l],l,o));return i}},xle={left:Cle(!1)},Ele=tr,gg=function(t,e){var r=[][t];return!!r&&Ele(function(){r.call(null,e||function(){return 1},1)})},Ole=mr,Ile=La,Ud=Ile(Ole.process)==="process",Tle=yt,_le=xle.left,Ple=gg,zI=Ec,Rle=Ud,Nle=!Rle&&zI>79&&zI<83,Mle=Nle||!Ple("reduce");Tle({target:"Array",proto:!0,forced:Mle},{reduce:function(e){var r=arguments.length;return _le(this,e,r,r>1?arguments[1]:void 0)}});var Dle=Pn,Ale=Dle("Array","reduce"),jle=Xr,kle=Ale,gy=Array.prototype,Ble=function(t){var e=t.reduce;return t===gy||jle(gy,t)&&e===gy.reduce?kle:e},Fle=Ble,Lle=Fle,zle=Lle,Hle=wt(zle),Vle=yt,Wle=Nc.filter,Kle=kd,Ule=Kle("filter");Vle({target:"Array",proto:!0,forced:!Ule},{filter:function(e){return Wle(this,e,arguments.length>1?arguments[1]:void 0)}});var qle=Pn,Gle=qle("Array","filter"),Xle=Xr,Yle=Gle,my=Array.prototype,Jle=function(t){var e=t.filter;return t===my||Xle(my,t)&&e===my.filter?Yle:e},Zle=Jle,Qle=Zle,ece=Qle,Cl=wt(ece),tce=yt,rce=Nc.map,nce=kd,ice=nce("map");tce({target:"Array",proto:!0,forced:!ice},{map:function(e){return rce(this,e,arguments.length>1?arguments[1]:void 0)}});var oce=Pn,ace=oce("Array","map"),sce=Xr,lce=ace,yy=Array.prototype,cce=function(t){var e=t.map;return t===yy||sce(yy,t)&&e===yy.map?lce:e},uce=cce,dce=uce,fce=dce,Hi=wt(fce),hce=Va,vce=$i,pce=rg,gce=Ha,Zj=function(t,e,r,n,i,o,a,s){for(var l=i,c=0,u=a?gce(a,s):!1,f,h;c<n;)c in r&&(f=u?u(r[c],c,e):r[c],o>0&&hce(f)?(h=vce(f),l=Zj(t,e,f,h,l,o-1)-1):(pce(l+1),t[l]=f),l++),c++;return l},mce=Zj,yce=yt,bce=mce,$ce=ii,wce=oi,Sce=$i,Cce=ig;yce({target:"Array",proto:!0},{flatMap:function(e){var r=wce(this),n=Sce(r),i;return $ce(e),i=Cce(r,0),i.length=bce(i,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),i}});var xce=Pn;xce("Array","flatMap");var Ece=un,HI=bi,Oce=zw,Qj=function(t,e,r){var n,i;HI(t);try{if(n=Oce(t,"return"),!n){if(e==="throw")throw r;return r}n=Ece(n,t)}catch(o){i=!0,n=o}if(e==="throw")throw r;if(i)throw n;return HI(n),r},Ice=bi,Tce=Qj,_ce=function(t,e,r,n){try{return n?e(Ice(r)[0],r[1]):e(r)}catch(i){Tce(t,"throw",i)}},Pce=wr,Rce=Mc,Nce=Pce("iterator"),Mce=Array.prototype,ek=function(t){return t!==void 0&&(Rce.Array===t||Mce[Nce]===t)},Dce=Zo,VI=zw,Ace=xc,jce=Mc,kce=wr,Bce=kce("iterator"),mg=function(t){if(!Ace(t))return VI(t,Bce)||VI(t,"@@iterator")||jce[Dce(t)]},Fce=un,Lce=ii,zce=bi,Hce=Ic,Vce=mg,Wce=TypeError,iS=function(t,e){var r=arguments.length<2?Vce(t):e;if(Lce(r))return zce(Fce(r,t));throw new Wce(Hce(t)+" is not iterable")},Kce=Ha,Uce=un,qce=oi,Gce=_ce,Xce=ek,Yce=ng,Jce=$i,WI=_c,Zce=iS,Qce=mg,KI=Array,eue=function(e){var r=qce(e),n=Yce(this),i=arguments.length,o=i>1?arguments[1]:void 0,a=o!==void 0;a&&(o=Kce(o,i>2?arguments[2]:void 0));var s=Qce(r),l=0,c,u,f,h,v,g;if(s&&!(this===KI&&Xce(s)))for(h=Zce(r,s),v=h.next,u=n?new this:[];!(f=Uce(v,h)).done;l++)g=a?Gce(h,o,[f.value,l],!0):f.value,WI(u,l,g);else for(c=Jce(r),u=n?new this(c):KI(c);c>l;l++)g=a?o(r[l],l):r[l],WI(u,l,g);return u.length=l,u},tue=wr,tk=tue("iterator"),rk=!1;try{var rue=0,UI={next:function(){return{done:!!rue++}},return:function(){rk=!0}};UI[tk]=function(){return this},Array.from(UI,function(){throw 2})}catch{}var nk=function(t,e){try{if(!e&&!rk)return!1}catch{return!1}var r=!1;try{var n={};n[tk]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch{}return r},nue=yt,iue=eue,oue=nk,aue=!oue(function(t){Array.from(t)});nue({target:"Array",stat:!0,forced:aue},{from:iue});var sue=yr,lue=sue.Array.from,cue=lue,ik=cue,uue=ik,oS=wt(uue),due=mg,fue=due,hue=fue,vue=hue,pue=vue,gue=pue,mue=gue,yue=mue,ok=yue,ak=wt(ok),bue=ok,aS=wt(bue),$ue=yt,wue=Va;$ue({target:"Array",stat:!0},{isArray:wue});var Sue=yr,Cue=Sue.Array.isArray,xue=Cue,sk=xue,Eue=sk,Oue=Eue,Iue=Oue,Tue=Iue,_ue=Tue,lk=wt(_ue);function Pue(t){if(lk(t))return t}var Rue=cn,Nue=Va,Mue=TypeError,Due=Object.getOwnPropertyDescriptor,Aue=Rue&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),ck=Aue?function(t,e){if(Nue(t)&&!Due(t,"length").writable)throw new Mue("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},jue=yt,kue=oi,Bue=$i,Fue=ck,Lue=rg,zue=tr,Hue=zue(function(){return[].push.call({length:4294967296},1)!==4294967297}),Vue=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(t){return t instanceof TypeError}},Wue=Hue||!Vue();jue({target:"Array",proto:!0,forced:Wue},{push:function(e){var r=kue(this),n=Bue(r),i=arguments.length;Lue(n+i);for(var o=0;o<i;o++)r[n]=arguments[o],n++;return Fue(r,n),n}});var Kue=Pn,Uue=Kue("Array","push"),que=Xr,Gue=Uue,by=Array.prototype,Xue=function(t){var e=t.push;return t===by||que(by,t)&&e===by.push?Gue:e},Yue=Xue,Jue=Yue,Zue=Jue,Que=Zue,ede=Que,tde=ede,uk=tde,rde=wt(uk);function nde(t,e){var r=t==null?null:typeof Sl<"u"&&ak(t)||t["@@iterator"];if(r!=null){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(rde(s).call(s,n.value),s.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}var ide=yt,qI=Va,ode=ng,ade=bn,GI=ag,sde=$i,lde=Io,cde=_c,ude=wr,dde=kd,fde=Wd,hde=dde("slice"),vde=ude("species"),$y=Array,pde=Math.max;ide({target:"Array",proto:!0,forced:!hde},{slice:function(e,r){var n=lde(this),i=sde(n),o=GI(e,i),a=GI(r===void 0?i:r,i),s,l,c;if(qI(n)&&(s=n.constructor,ode(s)&&(s===$y||qI(s.prototype))?s=void 0:ade(s)&&(s=s[vde],s===null&&(s=void 0)),s===$y||s===void 0))return fde(n,o,a);for(l=new(s===void 0?$y:s)(pde(a-o,0)),c=0;o<a;o++,c++)o in n&&cde(l,c,n[o]);return l.length=c,l}});var gde=Pn,mde=gde("Array","slice"),yde=Xr,bde=mde,wy=Array.prototype,$de=function(t){var e=t.slice;return t===wy||yde(wy,t)&&e===wy.slice?bde:e},wde=$de,dk=wde,Sde=dk,Cde=Sde,xde=Cde,Ede=xde,fk=Ede,Ode=wt(fk),Ide=ik,Tde=Ide,_de=Tde,Pde=_de,Rde=Pde,hk=wt(Rde);function N1(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function vk(t,e){var r;if(t){if(typeof t=="string")return N1(t,e);var n=Ode(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return hk(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N1(t,e)}}function Nde(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qn(t,e){return Pue(t)||nde(t,e)||vk(t,e)||Nde()}function Mde(t){if(lk(t))return N1(t)}function Dde(t){if(typeof Sl<"u"&&ak(t)!=null||t["@@iterator"]!=null)return hk(t)}function Ade(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qn(t){return Mde(t)||Dde(t)||vk(t)||Ade()}var jde=kj,yg=wt(jde),kde=Pn,Bde=kde("Array","concat"),Fde=Xr,Lde=Bde,Sy=Array.prototype,zde=function(t){var e=t.concat;return t===Sy||Fde(Sy,t)&&e===Sy.concat?Lde:e},Hde=zde,Vde=Hde,Wde=Vde,bg=wt(Wde),Kde=dk,$g=wt(Kde),Ude=Vn,qde=hr,Gde=Fd,Xde=Ld,Yde=bi,Jde=qde([].concat),sS=Ude("Reflect","ownKeys")||function(e){var r=Gde.f(Yde(e)),n=Xde.f;return n?Jde(r,n(e)):r},Zde=yt,Qde=sS;Zde({target:"Reflect",stat:!0},{ownKeys:Qde});var efe=yr,tfe=efe.Reflect.ownKeys,rfe=tfe,nfe=rfe,ife=nfe,ofe=wt(ife),afe=sk,hi=wt(afe),sfe=yt,lfe=oi,pk=sg,cfe=tr,ufe=cfe(function(){pk(1)});sfe({target:"Object",stat:!0,forced:ufe},{keys:function(e){return pk(lfe(e))}});var dfe=yr,ffe=dfe.Object.keys,hfe=ffe,vfe=hfe,pfe=vfe,lS=wt(pfe),gfe=Nc.forEach,mfe=gg,yfe=mfe("forEach"),bfe=yfe?[].forEach:function(e){return gfe(this,e,arguments.length>1?arguments[1]:void 0)},$fe=yt,XI=bfe;$fe({target:"Array",proto:!0,forced:[].forEach!==XI},{forEach:XI});var wfe=Pn,Sfe=wfe("Array","forEach"),Cfe=Sfe,xfe=Cfe,Efe=Zo,Ofe=Yr,Ife=Xr,Tfe=xfe,Cy=Array.prototype,_fe={DOMTokenList:!0,NodeList:!0},gk=function(t){var e=t.forEach;return t===Cy||Ife(Cy,t)&&e===Cy.forEach||Ofe(_fe,Efe(t))?Tfe:e},Pfe=gk,Ss=wt(Pfe),Rfe=yt,Nfe=hr,Mfe=Va,Dfe=Nfe([].reverse),YI=[1,2];Rfe({target:"Array",proto:!0,forced:String(YI)===String(YI.reverse())},{reverse:function(){return Mfe(this)&&(this.length=this.length),Dfe(this)}});var Afe=Pn,jfe=Afe("Array","reverse"),kfe=Xr,Bfe=jfe,xy=Array.prototype,Ffe=function(t){var e=t.reverse;return t===xy||kfe(xy,t)&&e===xy.reverse?Bfe:e},Lfe=Ffe,mk=Lfe,zfe=mk,Hfe=wt(zfe),JI=Ic,Vfe=TypeError,yk=function(t,e){if(!delete t[e])throw new Vfe("Cannot delete property "+JI(e)+" of "+JI(t))},Wfe=yt,Kfe=oi,Ufe=ag,qfe=tg,Gfe=$i,Xfe=ck,Yfe=rg,Jfe=ig,Zfe=_c,Ey=yk,Qfe=kd,ehe=Qfe("splice"),the=Math.max,rhe=Math.min;Wfe({target:"Array",proto:!0,forced:!ehe},{splice:function(e,r){var n=Kfe(this),i=Gfe(n),o=Ufe(e,i),a=arguments.length,s,l,c,u,f,h;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=rhe(the(qfe(r),0),i-o)),Yfe(i+s-l),c=Jfe(n,l),u=0;u<l;u++)f=o+u,f in n&&Zfe(c,u,n[f]);if(c.length=l,s<l){for(u=o;u<i-l;u++)f=u+l,h=u+s,f in n?n[h]=n[f]:Ey(n,h);for(u=i;u>i-l+s;u--)Ey(n,u-1)}else if(s>l)for(u=i-l;u>o;u--)f=u+l-1,h=u+s-1,f in n?n[h]=n[f]:Ey(n,h);for(u=0;u<s;u++)n[u+o]=arguments[u+2];return Xfe(n,i-l+s),c}});var nhe=Pn,ihe=nhe("Array","splice"),ohe=Xr,ahe=ihe,Oy=Array.prototype,she=function(t){var e=t.splice;return t===Oy||ohe(Oy,t)&&e===Oy.splice?ahe:e},lhe=she,che=lhe,uhe=che,bk=wt(uhe),ZI=cn,dhe=hr,fhe=un,hhe=tr,Iy=sg,vhe=Ld,phe=Yp,ghe=oi,mhe=Jp,ll=Object.assign,QI=Object.defineProperty,yhe=dhe([].concat),bhe=!ll||hhe(function(){if(ZI&&ll({b:1},ll(QI({},"a",{enumerable:!0,get:function(){QI(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(i){e[i]=i}),ll({},t)[r]!==7||Iy(ll({},e)).join("")!==n})?function(e,r){for(var n=ghe(e),i=arguments.length,o=1,a=vhe.f,s=phe.f;i>o;)for(var l=mhe(arguments[o++]),c=a?yhe(Iy(l),a(l)):Iy(l),u=c.length,f=0,h;u>f;)h=c[f++],(!ZI||fhe(s,l,h))&&(n[h]=l[h]);return n}:ll,$he=yt,eT=bhe;$he({target:"Object",stat:!0,forced:Object.assign!==eT},{assign:eT});var whe=yr,She=whe.Object.assign,Che=She,xhe=Che,Ehe=xhe,Ohe=wt(Ehe),Ihe=yt,The=tr,_he=oi,$k=vg,Phe=Rj,Rhe=The(function(){$k(1)});Ihe({target:"Object",stat:!0,forced:Rhe,sham:!Phe},{getPrototypeOf:function(e){return $k(_he(e))}});var Nhe=yr,Mhe=Nhe.Object.getPrototypeOf,Dhe=Mhe,Ahe=Dhe,jhe=yt,khe=cn,Bhe=Fs;jhe({target:"Object",stat:!0,sham:!khe},{create:Bhe});var Fhe=yr,Lhe=Fhe.Object,zhe=function(e,r){return Lhe.create(e,r)},Hhe=zhe,wk=Hhe,Vhe=wk,Whe=wt(Vhe),M1=yr,Khe=Cc;M1.JSON||(M1.JSON={stringify:JSON.stringify});var Uhe=function(e,r,n){return Khe(M1.JSON.stringify,null,arguments)},qhe=Uhe,Ghe=qhe,Xhe=Ghe,Yhe=wt(Xhe),Jhe=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",Zhe=TypeError,Sk=function(t,e){if(t<e)throw new Zhe("Not enough arguments");return t},Ck=mr,Qhe=Cc,eve=Tr,tve=Jhe,rve=za,nve=Wd,ive=Sk,ove=Ck.Function,ave=/MSIE .\./.test(rve)||tve&&function(){var t=Ck.Bun.version.split(".");return t.length<3||t[0]==="0"&&(t[1]<3||t[1]==="3"&&t[2]==="0")}(),xk=function(t,e){var r=e?2:1;return ave?function(n,i){var o=ive(arguments.length,1)>r,a=eve(n)?n:ove(n),s=o?nve(arguments,r):[],l=o?function(){Qhe(a,this,s)}:a;return e?t(l,i):t(l)}:t},sve=yt,Ek=mr,lve=xk,tT=lve(Ek.setInterval,!0);sve({global:!0,bind:!0,forced:Ek.setInterval!==tT},{setInterval:tT});var cve=yt,Ok=mr,uve=xk,rT=uve(Ok.setTimeout,!0);cve({global:!0,bind:!0,forced:Ok.setTimeout!==rT},{setTimeout:rT});var dve=yr,fve=dve.setTimeout,hve=fve,vve=wt(hve),Ik={exports:{}};(function(t){function e(n){if(n)return r(n);this._callbacks=new Map}function r(n){return Object.assign(n,e.prototype),n._callbacks=new Map,n}e.prototype.on=function(n,i){const o=this._callbacks.get(n)??[];return o.push(i),this._callbacks.set(n,o),this},e.prototype.once=function(n,i){const o=(...a)=>{this.off(n,o),i.apply(this,a)};return o.fn=i,this.on(n,o),this},e.prototype.off=function(n,i){if(n===void 0&&i===void 0)return this._callbacks.clear(),this;if(i===void 0)return this._callbacks.delete(n),this;const o=this._callbacks.get(n);if(o){for(const[a,s]of o.entries())if(s===i||s.fn===i){o.splice(a,1);break}o.length===0?this._callbacks.delete(n):this._callbacks.set(n,o)}return this},e.prototype.emit=function(n,...i){const o=this._callbacks.get(n);if(o){const a=[...o];for(const s of a)s.apply(this,i)}return this},e.prototype.listeners=function(n){return this._callbacks.get(n)??[]},e.prototype.listenerCount=function(n){if(n)return this.listeners(n).length;let i=0;for(const o of this._callbacks.values())i+=o.length;return i},e.prototype.hasListeners=function(n){return this.listenerCount(n)>0},e.prototype.addEventListener=e.prototype.on,e.prototype.removeListener=e.prototype.off,e.prototype.removeEventListener=e.prototype.off,e.prototype.removeAllListeners=e.prototype.off,t.exports=e})(Ik);var pve=Ik.exports,gve=wt(pve);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
 * http://naver.github.io/egjs
 *
 * Forked By Naver egjs
 * Copyright (c) hammerjs
 * Licensed under the MIT license */function eo(){return eo=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},eo.apply(this,arguments)}function ji(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ch(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var D1;typeof Object.assign!="function"?D1=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!=null)for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])}return r}:D1=Object.assign;var Cs=D1,nT=["","webkit","Moz","MS","ms","o"],mve=typeof document>"u"?{style:{}}:document.createElement("div"),yve="function",xl=Math.round,xs=Math.abs,cS=Date.now;function wg(t,e){for(var r,n,i=e[0].toUpperCase()+e.slice(1),o=0;o<nT.length;){if(r=nT[o],n=r?r+i:e,n in t)return n;o++}}var Bo;typeof window>"u"?Bo={}:Bo=window;var Tk=wg(mve.style,"touchAction"),_k=Tk!==void 0;function bve(){if(!_k)return!1;var t={},e=Bo.CSS&&Bo.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){return t[r]=e?Bo.CSS.supports("touch-action",r):!0}),t}var Pk="compute",Rk="auto",A1="manipulation",cs="none",nd="pan-x",id="pan-y",uh=bve(),$ve=/mobile|tablet|ip(ad|hone|od)|android/i,Nk="ontouchstart"in Bo,wve=wg(Bo,"PointerEvent")!==void 0,Sve=Nk&&$ve.test(navigator.userAgent),qd="touch",Cve="pen",uS="mouse",xve="kinect",Eve=25,Fn=1,zs=2,Kr=4,ri=8,Hv=1,Gd=2,Xd=4,Yd=8,ec=16,bo=Gd|Xd,us=Yd|ec,Mk=bo|us,Dk=["x","y"],Vv=["clientX","clientY"];function Fo(t,e,r){var n;if(t)if(t.forEach)t.forEach(e,r);else if(t.length!==void 0)for(n=0;n<t.length;)e.call(r,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function Sg(t,e){return typeof t===yve?t.apply(e&&e[0]||void 0,e):t}function ns(t,e){return t.indexOf(e)>-1}function Ove(t){if(ns(t,cs))return cs;var e=ns(t,nd),r=ns(t,id);return e&&r?cs:e||r?e?nd:id:ns(t,A1)?A1:Rk}var Ak=function(){function t(r,n){this.manager=r,this.set(n)}var e=t.prototype;return e.set=function(n){n===Pk&&(n=this.compute()),_k&&this.manager.element.style&&uh[n]&&(this.manager.element.style[Tk]=n),this.actions=n.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var n=[];return Fo(this.manager.recognizers,function(i){Sg(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),Ove(n.join(" "))},e.preventDefaults=function(n){var i=n.srcEvent,o=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var a=this.actions,s=ns(a,cs)&&!uh[cs],l=ns(a,id)&&!uh[id],c=ns(a,nd)&&!uh[nd];if(s){var u=n.pointers.length===1,f=n.distance<2,h=n.deltaTime<250;if(u&&f&&h)return}if(!(c&&l)&&(s||l&&o&bo||c&&o&us))return this.preventSrc(i)},e.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},t}();function dS(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function jk(t){var e=t.length;if(e===1)return{x:xl(t[0].clientX),y:xl(t[0].clientY)};for(var r=0,n=0,i=0;i<e;)r+=t[i].clientX,n+=t[i].clientY,i++;return{x:xl(r/e),y:xl(n/e)}}function iT(t){for(var e=[],r=0;r<t.pointers.length;)e[r]={clientX:xl(t.pointers[r].clientX),clientY:xl(t.pointers[r].clientY)},r++;return{timeStamp:cS(),pointers:e,center:jk(e),deltaX:t.deltaX,deltaY:t.deltaY}}function Wv(t,e,r){r||(r=Dk);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(n*n+i*i)}function j1(t,e,r){r||(r=Dk);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.atan2(i,n)*180/Math.PI}function kk(t,e){return t===e?Hv:xs(t)>=xs(e)?t<0?Gd:Xd:e<0?Yd:ec}function Ive(t,e){var r=e.center,n=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};(e.eventType===Fn||o.eventType===Kr)&&(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-n.x),e.deltaY=i.y+(r.y-n.y)}function Bk(t,e,r){return{x:e/t||0,y:r/t||0}}function Tve(t,e){return Wv(e[0],e[1],Vv)/Wv(t[0],t[1],Vv)}function _ve(t,e){return j1(e[1],e[0],Vv)+j1(t[1],t[0],Vv)}function Pve(t,e){var r=t.lastInterval||e,n=e.timeStamp-r.timeStamp,i,o,a,s;if(e.eventType!==ri&&(n>Eve||r.velocity===void 0)){var l=e.deltaX-r.deltaX,c=e.deltaY-r.deltaY,u=Bk(n,l,c);o=u.x,a=u.y,i=xs(u.x)>xs(u.y)?u.x:u.y,s=kk(l,c),t.lastInterval=e}else i=r.velocity,o=r.velocityX,a=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=a,e.direction=s}function Rve(t,e){var r=t.session,n=e.pointers,i=n.length;r.firstInput||(r.firstInput=iT(e)),i>1&&!r.firstMultiple?r.firstMultiple=iT(e):i===1&&(r.firstMultiple=!1);var o=r.firstInput,a=r.firstMultiple,s=a?a.center:o.center,l=e.center=jk(n);e.timeStamp=cS(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=j1(s,l),e.distance=Wv(s,l),Ive(r,e),e.offsetDirection=kk(e.deltaX,e.deltaY);var c=Bk(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=xs(c.x)>xs(c.y)?c.x:c.y,e.scale=a?Tve(a.pointers,n):1,e.rotation=a?_ve(a.pointers,n):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,Pve(r,e);var u=t.element,f=e.srcEvent,h;f.composedPath?h=f.composedPath()[0]:f.path?h=f.path[0]:h=f.target,dS(h,u)&&(u=h),e.target=u}function Nve(t,e,r){var n=r.pointers.length,i=r.changedPointers.length,o=e&Fn&&n-i===0,a=e&(Kr|ri)&&n-i===0;r.isFirst=!!o,r.isFinal=!!a,o&&(t.session={}),r.eventType=e,Rve(t,r),t.emit("hammer.input",r),t.recognize(r),t.session.prevInput=r}function od(t){return t.trim().split(/\s+/g)}function Eu(t,e,r){Fo(od(e),function(n){t.addEventListener(n,r,!1)})}function Ou(t,e,r){Fo(od(e),function(n){t.removeEventListener(n,r,!1)})}function oT(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Dc=function(){function t(r,n){var i=this;this.manager=r,this.callback=n,this.element=r.element,this.target=r.options.inputTarget,this.domHandler=function(o){Sg(r.options.enable,[r])&&i.handler(o)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Eu(this.element,this.evEl,this.domHandler),this.evTarget&&Eu(this.target,this.evTarget,this.domHandler),this.evWin&&Eu(oT(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Ou(this.element,this.evEl,this.domHandler),this.evTarget&&Ou(this.target,this.evTarget,this.domHandler),this.evWin&&Ou(oT(this.element),this.evWin,this.domHandler)},t}();function Es(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;n<t.length;){if(r&&t[n][r]==e||!r&&t[n]===e)return n;n++}return-1}var Mve={pointerdown:Fn,pointermove:zs,pointerup:Kr,pointercancel:ri,pointerout:ri},Dve={2:qd,3:Cve,4:uS,5:xve},Fk="pointerdown",Lk="pointermove pointerup pointercancel";Bo.MSPointerEvent&&!Bo.PointerEvent&&(Fk="MSPointerDown",Lk="MSPointerMove MSPointerUp MSPointerCancel");var zk=function(t){ji(e,t);function e(){var n,i=e.prototype;return i.evEl=Fk,i.evWin=Lk,n=t.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var r=e.prototype;return r.handler=function(i){var o=this.store,a=!1,s=i.type.toLowerCase().replace("ms",""),l=Mve[s],c=Dve[i.pointerType]||i.pointerType,u=c===qd,f=Es(o,i.pointerId,"pointerId");l&Fn&&(i.button===0||u)?f<0&&(o.push(i),f=o.length-1):l&(Kr|ri)&&(a=!0),!(f<0)&&(o[f]=i,this.callback(this.manager,l,{pointers:o,changedPointers:[i],pointerType:c,srcEvent:i}),a&&o.splice(f,1))},e}(Dc);function ad(t){return Array.prototype.slice.call(t,0)}function fS(t,e,r){for(var n=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];Es(i,a)<0&&n.push(t[o]),i[o]=a,o++}return r&&(e?n=n.sort(function(s,l){return s[e]>l[e]}):n=n.sort()),n}var Ave={touchstart:Fn,touchmove:zs,touchend:Kr,touchcancel:ri},jve="touchstart touchmove touchend touchcancel",hS=function(t){ji(e,t);function e(){var n;return e.prototype.evTarget=jve,n=t.apply(this,arguments)||this,n.targetIds={},n}var r=e.prototype;return r.handler=function(i){var o=Ave[i.type],a=kve.call(this,i,o);a&&this.callback(this.manager,o,{pointers:a[0],changedPointers:a[1],pointerType:qd,srcEvent:i})},e}(Dc);function kve(t,e){var r=ad(t.touches),n=this.targetIds;if(e&(Fn|zs)&&r.length===1)return n[r[0].identifier]=!0,[r,r];var i,o,a=ad(t.changedTouches),s=[],l=this.target;if(o=r.filter(function(c){return dS(c.target,l)}),e===Fn)for(i=0;i<o.length;)n[o[i].identifier]=!0,i++;for(i=0;i<a.length;)n[a[i].identifier]&&s.push(a[i]),e&(Kr|ri)&&delete n[a[i].identifier],i++;if(s.length)return[fS(o.concat(s),"identifier",!0),s]}var Bve={mousedown:Fn,mousemove:zs,mouseup:Kr},Fve="mousedown",Lve="mousemove mouseup",vS=function(t){ji(e,t);function e(){var n,i=e.prototype;return i.evEl=Fve,i.evWin=Lve,n=t.apply(this,arguments)||this,n.pressed=!1,n}var r=e.prototype;return r.handler=function(i){var o=Bve[i.type];o&Fn&&i.button===0&&(this.pressed=!0),o&zs&&i.which!==1&&(o=Kr),this.pressed&&(o&Kr&&(this.pressed=!1),this.callback(this.manager,o,{pointers:[i],changedPointers:[i],pointerType:uS,srcEvent:i}))},e}(Dc),zve=2500,aT=25;function sT(t){var e=t.changedPointers,r=e[0];if(r.identifier===this.primaryTouch){var n={x:r.clientX,y:r.clientY},i=this.lastTouches;this.lastTouches.push(n);var o=function(){var s=i.indexOf(n);s>-1&&i.splice(s,1)};setTimeout(o,zve)}}function Hve(t,e){t&Fn?(this.primaryTouch=e.changedPointers[0].identifier,sT.call(this,e)):t&(Kr|ri)&&sT.call(this,e)}function Vve(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],o=Math.abs(e-i.x),a=Math.abs(r-i.y);if(o<=aT&&a<=aT)return!0}return!1}var Hk=function(){var t=function(e){ji(r,e);function r(i,o){var a;return a=e.call(this,i,o)||this,a.handler=function(s,l,c){var u=c.pointerType===qd,f=c.pointerType===uS;if(!(f&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(u)Hve.call(ch(ch(a)),l,c);else if(f&&Vve.call(ch(ch(a)),c))return;a.callback(s,l,c)}},a.touch=new hS(a.manager,a.handler),a.mouse=new vS(a.manager,a.handler),a.primaryTouch=null,a.lastTouches=[],a}var n=r.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},r}(Dc);return t}();function Wve(t){var e,r=t.options.inputClass;return r?e=r:wve?e=zk:Sve?e=hS:Nk?e=Hk:e=vS,new e(t,Nve)}function El(t,e,r){return Array.isArray(t)?(Fo(t,r[e],r),!0):!1}var ev=1,Ri=2,tc=4,Sa=8,Lo=Sa,sd=16,vo=32,Kve=1;function Uve(){return Kve++}function dh(t,e){var r=e.manager;return r?r.get(t):t}function lT(t){return t&sd?"cancel":t&Sa?"end":t&tc?"move":t&Ri?"start":""}var Jd=function(){function t(r){r===void 0&&(r={}),this.options=eo({enable:!0},r),this.id=Uve(),this.manager=null,this.state=ev,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(n){return Cs(this.options,n),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(n){if(El(n,"recognizeWith",this))return this;var i=this.simultaneous;return n=dh(n,this),i[n.id]||(i[n.id]=n,n.recognizeWith(this)),this},e.dropRecognizeWith=function(n){return El(n,"dropRecognizeWith",this)?this:(n=dh(n,this),delete this.simultaneous[n.id],this)},e.requireFailure=function(n){if(El(n,"requireFailure",this))return this;var i=this.requireFail;return n=dh(n,this),Es(i,n)===-1&&(i.push(n),n.requireFailure(this)),this},e.dropRequireFailure=function(n){if(El(n,"dropRequireFailure",this))return this;n=dh(n,this);var i=Es(this.requireFail,n);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},e.emit=function(n){var i=this,o=this.state;function a(s){i.manager.emit(s,n)}o<Sa&&a(i.options.event+lT(o)),a(i.options.event),n.additionalEvent&&a(n.additionalEvent),o>=Sa&&a(i.options.event+lT(o))},e.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=vo},e.canEmit=function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(vo|ev)))return!1;n++}return!0},e.recognize=function(n){var i=Cs({},n);if(!Sg(this.options.enable,[this,i])){this.reset(),this.state=vo;return}this.state&(Lo|sd|vo)&&(this.state=ev),this.state=this.process(i),this.state&(Ri|tc|Sa|sd)&&this.tryEmit(i)},e.process=function(n){},e.getTouchAction=function(){},e.reset=function(){},t}(),k1=function(t){ji(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,eo({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},n))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var r=e.prototype;return r.getTouchAction=function(){return[A1]},r.process=function(i){var o=this,a=this.options,s=i.pointers.length===a.pointers,l=i.distance<a.threshold,c=i.deltaTime<a.time;if(this.reset(),i.eventType&Fn&&this.count===0)return this.failTimeout();if(l&&c&&s){if(i.eventType!==Kr)return this.failTimeout();var u=this.pTime?i.timeStamp-this.pTime<a.interval:!0,f=!this.pCenter||Wv(this.pCenter,i.center)<a.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!f||!u?this.count=1:this.count+=1,this._input=i;var h=this.count%a.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){o.state=Lo,o.tryEmit()},a.interval),Ri):Lo}return vo},r.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=vo},this.options.interval),vo},r.reset=function(){clearTimeout(this._timer)},r.emit=function(){this.state===Lo&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(Jd),rc=function(t){ji(e,t);function e(n){return n===void 0&&(n={}),t.call(this,eo({pointers:1},n))||this}var r=e.prototype;return r.attrTest=function(i){var o=this.options.pointers;return o===0||i.pointers.length===o},r.process=function(i){var o=this.state,a=i.eventType,s=o&(Ri|tc),l=this.attrTest(i);return s&&(a&ri||!l)?o|sd:s||l?a&Kr?o|Sa:o&Ri?o|tc:Ri:vo},e}(Jd);function Vk(t){return t===ec?"down":t===Yd?"up":t===Gd?"left":t===Xd?"right":""}var pS=function(t){ji(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,eo({event:"pan",threshold:10,pointers:1,direction:Mk},n))||this,i.pX=null,i.pY=null,i}var r=e.prototype;return r.getTouchAction=function(){var i=this.options.direction,o=[];return i&bo&&o.push(id),i&us&&o.push(nd),o},r.directionTest=function(i){var o=this.options,a=!0,s=i.distance,l=i.direction,c=i.deltaX,u=i.deltaY;return l&o.direction||(o.direction&bo?(l=c===0?Hv:c<0?Gd:Xd,a=c!==this.pX,s=Math.abs(i.deltaX)):(l=u===0?Hv:u<0?Yd:ec,a=u!==this.pY,s=Math.abs(i.deltaY))),i.direction=l,a&&s>o.threshold&&l&o.direction},r.attrTest=function(i){return rc.prototype.attrTest.call(this,i)&&(this.state&Ri||!(this.state&Ri)&&this.directionTest(i))},r.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var o=Vk(i.direction);o&&(i.additionalEvent=this.options.event+o),t.prototype.emit.call(this,i)},e}(rc),Wk=function(t){ji(e,t);function e(n){return n===void 0&&(n={}),t.call(this,eo({event:"swipe",threshold:10,velocity:.3,direction:bo|us,pointers:1},n))||this}var r=e.prototype;return r.getTouchAction=function(){return pS.prototype.getTouchAction.call(this)},r.attrTest=function(i){var o=this.options.direction,a;return o&(bo|us)?a=i.overallVelocity:o&bo?a=i.overallVelocityX:o&us&&(a=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&o&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&xs(a)>this.options.velocity&&i.eventType&Kr},r.emit=function(i){var o=Vk(i.offsetDirection);o&&this.manager.emit(this.options.event+o,i),this.manager.emit(this.options.event,i)},e}(rc),Kk=function(t){ji(e,t);function e(n){return n===void 0&&(n={}),t.call(this,eo({event:"pinch",threshold:0,pointers:2},n))||this}var r=e.prototype;return r.getTouchAction=function(){return[cs]},r.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ri)},r.emit=function(i){if(i.scale!==1){var o=i.scale<1?"in":"out";i.additionalEvent=this.options.event+o}t.prototype.emit.call(this,i)},e}(rc),Uk=function(t){ji(e,t);function e(n){return n===void 0&&(n={}),t.call(this,eo({event:"rotate",threshold:0,pointers:2},n))||this}var r=e.prototype;return r.getTouchAction=function(){return[cs]},r.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ri)},e}(rc),qk=function(t){ji(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,eo({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var r=e.prototype;return r.getTouchAction=function(){return[Rk]},r.process=function(i){var o=this,a=this.options,s=i.pointers.length===a.pointers,l=i.distance<a.threshold,c=i.deltaTime>a.time;if(this._input=i,!l||!s||i.eventType&(Kr|ri)&&!c)this.reset();else if(i.eventType&Fn)this.reset(),this._timer=setTimeout(function(){o.state=Lo,o.tryEmit()},a.time);else if(i.eventType&Kr)return Lo;return vo},r.reset=function(){clearTimeout(this._timer)},r.emit=function(i){this.state===Lo&&(i&&i.eventType&Kr?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=cS(),this.manager.emit(this.options.event,this._input)))},e}(Jd),Gk={domEvents:!1,touchAction:Pk,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},cT=[[Uk,{enable:!1}],[Kk,{enable:!1},["rotate"]],[Wk,{direction:bo}],[pS,{direction:bo},["swipe"]],[k1],[k1,{event:"doubletap",taps:2},["tap"]],[qk]],qve=1,uT=2;function dT(t,e){var r=t.element;if(r.style){var n;Fo(t.options.cssProps,function(i,o){n=wg(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function Gve(t,e){var r=document.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=e,e.target.dispatchEvent(r)}var fT=function(){function t(r,n){var i=this;this.options=Cs({},Gk,n||{}),this.options.inputTarget=this.options.inputTarget||r,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=r,this.input=Wve(this),this.touchAction=new Ak(this,this.options.touchAction),dT(this,!0),Fo(this.options.recognizers,function(o){var a=i.add(new o[0](o[1]));o[2]&&a.recognizeWith(o[2]),o[3]&&a.requireFailure(o[3])},this)}var e=t.prototype;return e.set=function(n){return Cs(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},e.stop=function(n){this.session.stopped=n?uT:qve},e.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var o,a=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Lo)&&(i.curRecognizer=null,s=null);for(var l=0;l<a.length;)o=a[l],i.stopped!==uT&&(!s||o===s||o.canRecognizeWith(s))?o.recognize(n):o.reset(),!s&&o.state&(Ri|tc|Sa)&&(i.curRecognizer=o,s=o),l++}},e.get=function(n){if(n instanceof Jd)return n;for(var i=this.recognizers,o=0;o<i.length;o++)if(i[o].options.event===n)return i[o];return null},e.add=function(n){if(El(n,"add",this))return this;var i=this.get(n.options.event);return i&&this.remove(i),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},e.remove=function(n){if(El(n,"remove",this))return this;var i=this.get(n);if(n){var o=this.recognizers,a=Es(o,i);a!==-1&&(o.splice(a,1),this.touchAction.update())}return this},e.on=function(n,i){if(n===void 0||i===void 0)return this;var o=this.handlers;return Fo(od(n),function(a){o[a]=o[a]||[],o[a].push(i)}),this},e.off=function(n,i){if(n===void 0)return this;var o=this.handlers;return Fo(od(n),function(a){i?o[a]&&o[a].splice(Es(o[a],i),1):delete o[a]}),this},e.emit=function(n,i){this.options.domEvents&&Gve(n,i);var o=this.handlers[n]&&this.handlers[n].slice();if(!(!o||!o.length)){i.type=n,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var a=0;a<o.length;)o[a](i),a++}},e.destroy=function(){this.element&&dT(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),Xve={touchstart:Fn,touchmove:zs,touchend:Kr,touchcancel:ri},Yve="touchstart",Jve="touchstart touchmove touchend touchcancel",Zve=function(t){ji(e,t);function e(){var n,i=e.prototype;return i.evTarget=Yve,i.evWin=Jve,n=t.apply(this,arguments)||this,n.started=!1,n}var r=e.prototype;return r.handler=function(i){var o=Xve[i.type];if(o===Fn&&(this.started=!0),!!this.started){var a=Qve.call(this,i,o);o&(Kr|ri)&&a[0].length-a[1].length===0&&(this.started=!1),this.callback(this.manager,o,{pointers:a[0],changedPointers:a[1],pointerType:qd,srcEvent:i})}},e}(Dc);function Qve(t,e){var r=ad(t.touches),n=ad(t.changedTouches);return e&(Kr|ri)&&(r=fS(r.concat(n),"identifier",!0)),[r,n]}function Xk(t,e,r){var n="DEPRECATED METHOD: "+e+`
`+r+` AT 
`;return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,n,o),t.apply(this,arguments)}}var Yk=Xk(function(t,e,r){for(var n=Object.keys(e),i=0;i<n.length;)(!r||r&&t[n[i]]===void 0)&&(t[n[i]]=e[n[i]]),i++;return t},"extend","Use `assign`."),epe=Xk(function(t,e){return Yk(t,e,!0)},"merge","Use `assign`.");function tpe(t,e,r){var n=e.prototype,i;i=t.prototype=Object.create(n),i.constructor=t,i._super=n,r&&Cs(i,r)}function hT(t,e){return function(){return t.apply(e,arguments)}}var rpe=function(){var t=function(r,n){return n===void 0&&(n={}),new fT(r,eo({recognizers:cT.concat()},n))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=Mk,t.DIRECTION_DOWN=ec,t.DIRECTION_LEFT=Gd,t.DIRECTION_RIGHT=Xd,t.DIRECTION_UP=Yd,t.DIRECTION_HORIZONTAL=bo,t.DIRECTION_VERTICAL=us,t.DIRECTION_NONE=Hv,t.DIRECTION_DOWN=ec,t.INPUT_START=Fn,t.INPUT_MOVE=zs,t.INPUT_END=Kr,t.INPUT_CANCEL=ri,t.STATE_POSSIBLE=ev,t.STATE_BEGAN=Ri,t.STATE_CHANGED=tc,t.STATE_ENDED=Sa,t.STATE_RECOGNIZED=Lo,t.STATE_CANCELLED=sd,t.STATE_FAILED=vo,t.Manager=fT,t.Input=Dc,t.TouchAction=Ak,t.TouchInput=hS,t.MouseInput=vS,t.PointerEventInput=zk,t.TouchMouseInput=Hk,t.SingleTouchInput=Zve,t.Recognizer=Jd,t.AttrRecognizer=rc,t.Tap=k1,t.Pan=pS,t.Swipe=Wk,t.Pinch=Kk,t.Rotate=Uk,t.Press=qk,t.on=Eu,t.off=Ou,t.each=Fo,t.merge=epe,t.extend=Yk,t.bindFn=hT,t.assign=Cs,t.inherit=tpe,t.bindFn=hT,t.prefixed=wg,t.toArray=ad,t.inArray=Es,t.uniqueArray=fS,t.splitStr=od,t.boolOrFn=Sg,t.hasParent=dS,t.addEventListeners=Eu,t.removeEventListeners=Ou,t.defaults=Cs({},Gk,{preset:cT}),t}(),npe=rpe;function Jk(t,e){var r=typeof yg<"u"&&aS(t)||t["@@iterator"];if(!r){if(hi(t)||(r=ipe(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function ipe(t,e){var r;if(t){if(typeof t=="string")return vT(t,e);var n=$g(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return oS(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return vT(t,e)}}function vT(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var Zk=yg("DELETE");function ope(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Qk.apply(void 0,bg(e=[{},t]).call(e,n))}function Qk(){var t=Kv.apply(void 0,arguments);return tB(t),t}function Kv(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(e.length<2)return e[0];if(e.length>2){var n;return Kv.apply(void 0,bg(n=[Qk(e[0],e[1])]).call(n,Qn($g(e).call(e,2))))}var i=e[0],o=e[1];if(i instanceof Date&&o instanceof Date)return i.setTime(o.getTime()),i;var a=Jk(ofe(o)),s;try{for(a.s();!(s=a.n()).done;){var l=s.value;Object.prototype.propertyIsEnumerable.call(o,l)&&(o[l]===Zk?delete i[l]:i[l]!==null&&o[l]!==null&&typeof i[l]=="object"&&typeof o[l]=="object"&&!hi(i[l])&&!hi(o[l])?i[l]=Kv(i[l],o[l]):i[l]=eB(o[l]))}}catch(c){a.e(c)}finally{a.f()}return i}function eB(t){return hi(t)?Hi(t).call(t,function(e){return eB(e)}):typeof t=="object"&&t!==null?t instanceof Date?new Date(t.getTime()):Kv({},t):t}function tB(t){for(var e=0,r=lS(t);e<r.length;e++){var n=r[e];t[n]===Zk?delete t[n]:typeof t[n]=="object"&&t[n]!==null&&tB(t[n])}}function ape(){var t=function(){};return{on:t,off:t,destroy:t,emit:t,get(){return{set:t}}}}var spe=typeof window<"u"?window.Hammer||npe:function(){return ape()};function Ao(t){var e=this,r;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(function(){e._dom.overlay.parentNode.removeChild(e._dom.overlay)});var n=spe(this._dom.overlay);n.on("tap",Jj(r=this._onTapOverlay).call(r,this)),this._cleanupQueue.push(function(){n.destroy()});var i=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];Ss(i).call(i,function(o){n.on(o,function(a){a.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=function(o){lpe(o.target,t)||e.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(function(){document.body.removeEventListener("click",e._onClick)})),this._escListener=function(o){("key"in o?o.key==="Escape":o.keyCode===27)&&e.deactivate()}}gve(Ao.prototype);Ao.current=null;Ao.prototype.destroy=function(){var t,e;this.deactivate();var r=Jk(Hfe(t=bk(e=this._cleanupQueue).call(e,0)).call(t)),n;try{for(r.s();!(n=r.n()).done;){var i=n.value;i()}}catch(o){r.e(o)}finally{r.f()}};Ao.prototype.activate=function(){Ao.current&&Ao.current.deactivate(),Ao.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};Ao.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};Ao.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function lpe(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}var cpe=ng,upe=Ic,dpe=TypeError,rB=function(t){if(cpe(t))return t;throw new dpe(upe(t)+" is not a constructor")},fpe=yt,hpe=Vn,Ty=Cc,vpe=Xj,pT=rB,ppe=bi,gT=bn,gpe=Fs,nB=tr,gS=hpe("Reflect","construct"),mpe=Object.prototype,ype=[].push,iB=nB(function(){function t(){}return!(gS(function(){},[],t)instanceof t)}),oB=!nB(function(){gS(function(){})}),mT=iB||oB;fpe({target:"Reflect",stat:!0,forced:mT,sham:mT},{construct:function(e,r){pT(e),ppe(r);var n=arguments.length<3?e:pT(arguments[2]);if(oB&&!iB)return gS(e,r,n);if(e===n){switch(r.length){case 0:return new e;case 1:return new e(r[0]);case 2:return new e(r[0],r[1]);case 3:return new e(r[0],r[1],r[2]);case 4:return new e(r[0],r[1],r[2],r[3])}var i=[null];return Ty(ype,i,r),new(Ty(vpe,e,i))}var o=n.prototype,a=gpe(gT(o)?o:mpe),s=Ty(e,a,r);return gT(s)?s:a}});var bpe=yr,$pe=bpe.Reflect.construct,wpe=$pe,Spe=wpe,Cpe=Spe,tv=wt(Cpe),xpe=yr,Epe=xpe.Object.getOwnPropertySymbols,Ope=Epe,Ipe=Ope,Tpe=Ipe,yT=wt(Tpe),aB={exports:{}},_pe=yt,Ppe=tr,Rpe=Io,sB=js.f,lB=cn,Npe=!lB||Ppe(function(){sB(1)});_pe({target:"Object",stat:!0,forced:Npe,sham:!lB},{getOwnPropertyDescriptor:function(e,r){return sB(Rpe(e),r)}});var Mpe=yr,cB=Mpe.Object,Dpe=aB.exports=function(e,r){return cB.getOwnPropertyDescriptor(e,r)};cB.getOwnPropertyDescriptor.sham&&(Dpe.sham=!0);var Ape=aB.exports,jpe=Ape,kpe=jpe,Bpe=kpe,uB=wt(Bpe),Fpe=yt,Lpe=cn,zpe=sS,Hpe=Io,Vpe=js,Wpe=_c;Fpe({target:"Object",stat:!0,sham:!Lpe},{getOwnPropertyDescriptors:function(e){for(var r=Hpe(e),n=Vpe.f,i=zpe(r),o={},a=0,s,l;i.length>a;)l=n(r,s=i[a++]),l!==void 0&&Wpe(o,s,l);return o}});var Kpe=yr,Upe=Kpe.Object.getOwnPropertyDescriptors,qpe=Upe,Gpe=qpe,Xpe=Gpe,bT=wt(Xpe),dB={exports:{}},Ype=yt,Jpe=cn,$T=og.f;Ype({target:"Object",stat:!0,forced:Object.defineProperties!==$T,sham:!Jpe},{defineProperties:$T});var Zpe=yr,fB=Zpe.Object,Qpe=dB.exports=function(e,r){return fB.defineProperties(e,r)};fB.defineProperties.sham&&(Qpe.sham=!0);var ege=dB.exports,tge=ege,rge=tge,nge=rge,ige=wt(nge),oge=VA,age=wt(oge);function hB(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var sge=wk,lge=sge,cge=lge,uge=cge,vB=uge,dge=wt(vB),fge=yt,hge=Dj;fge({target:"Object",stat:!0},{setPrototypeOf:hge});var vge=yr,pge=vge.Object.setPrototypeOf,gge=pge,mge=gge,yge=mge,bge=yge,$ge=bge,wge=$ge,pB=wge,B1=wt(pB),Sge=Yj,Cge=Sge,xge=Cge,Ege=xge,Oge=Ege,gB=wt(Oge);function F1(t,e){var r;return F1=B1?gB(r=B1).call(r):function(i,o){return i.__proto__=o,i},F1(t,e)}function Ige(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=dge(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),eg(t,"prototype",{writable:!1}),e&&F1(t,e)}function Tge(t,e){if(e&&(Ql(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return hB(t)}var _ge=Ahe,Pge=_ge,Rge=Pge,Nge=Rge,mB=Nge,wT=wt(mB);function Uv(t){var e;return Uv=B1?gB(e=wT).call(e):function(n){return n.__proto__||wT(n)},Uv(t)}var yB={exports:{}},bB={exports:{}};(function(t){var e=rS,r=Kj;function n(i){"@babel/helpers - typeof";return t.exports=n=typeof e=="function"&&typeof r=="symbol"?function(o){return typeof o}:function(o){return o&&typeof e=="function"&&o.constructor===e&&o!==e.prototype?"symbol":typeof o},t.exports.__esModule=!0,t.exports.default=t.exports,n(i)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports})(bB);var Mge=bB.exports,Dge=gk,Age=Dge,jge=Age,kge=jge,Bge=kge,ST=Yr,Fge=sS,Lge=js,zge=ai,Hge=function(t,e,r){for(var n=Fge(e),i=zge.f,o=Lge.f,a=0;a<n.length;a++){var s=n[a];!ST(t,s)&&!(r&&ST(r,s))&&i(t,s,o(e,s))}},Vge=bn,Wge=Jo,Kge=function(t,e){Vge(e)&&"cause"in e&&Wge(t,"cause",e.cause)},Uge=hr,$B=Error,qge=Uge("".replace),Gge=function(t){return String(new $B(t).stack)}("zxcasd"),wB=/\n\s*at [^:]*:[^\n]*/,Xge=wB.test(Gge),Yge=function(t,e){if(Xge&&typeof t=="string"&&!$B.prepareStackTrace)for(;e--;)t=qge(t,wB,"");return t},Jge=tr,Zge=ks,Qge=!Jge(function(){var t=new Error("a");return"stack"in t?(Object.defineProperty(t,"stack",Zge(1,7)),t.stack!==7):!0}),eme=Jo,tme=Yge,rme=Qge,CT=Error.captureStackTrace,nme=function(t,e,r,n){rme&&(CT?CT(t,e):eme(t,"stack",tme(r,n)))},ime=Ha,ome=un,ame=bi,sme=Ic,lme=ek,cme=$i,xT=Xr,ume=iS,dme=mg,ET=Qj,fme=TypeError,rv=function(t,e){this.stopped=t,this.result=e},OT=rv.prototype,Hs=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=ime(e,n),c,u,f,h,v,g,m,p=function(b){return c&&ET(c,"normal",b),new rv(!0,b)},y=function(b){return i?(ame(b),s?l(b[0],b[1],p):l(b[0],b[1])):s?l(b,p):l(b)};if(o)c=t.iterator;else if(a)c=t;else{if(u=dme(t),!u)throw new fme(sme(t)+" is not iterable");if(lme(u)){for(f=0,h=cme(t);h>f;f++)if(v=y(t[f]),v&&xT(OT,v))return v;return new rv(!1)}c=ume(t,u)}for(g=o?t.next:c.next;!(m=ome(g,c)).done;){try{v=y(m.value)}catch(b){ET(c,"throw",b)}if(typeof v=="object"&&v&&xT(OT,v))return v}return new rv(!1)},hme=Bs,vme=function(t,e){return t===void 0?arguments.length<2?"":e:hme(t)},pme=yt,gme=Xr,mme=vg,qv=Dj,yme=Hge,SB=Fs,_y=Jo,Py=ks,bme=Kge,$me=nme,wme=Hs,Sme=vme,Cme=wr,xme=Cme("toStringTag"),Gv=Error,Eme=[].push,nc=function(e,r){var n=gme(Ry,this),i;qv?i=qv(new Gv,n?mme(this):Ry):(i=n?this:SB(Ry),_y(i,xme,"Error")),r!==void 0&&_y(i,"message",Sme(r)),$me(i,nc,i.stack,1),arguments.length>2&&bme(i,arguments[2]);var o=[];return wme(e,Eme,{that:o}),_y(i,"errors",o),i};qv?qv(nc,Gv):yme(nc,Gv,{name:!0});var Ry=nc.prototype=SB(Gv.prototype,{constructor:Py(1,nc),message:Py(1,""),name:Py(1,"AggregateError")});pme({global:!0},{AggregateError:nc});var Ome=Vn,Ime=Gw,Tme=wr,_me=cn,IT=Tme("species"),CB=function(t){var e=Ome(t);_me&&e&&!e[IT]&&Ime(e,IT,{configurable:!0,get:function(){return this}})},Pme=Xr,Rme=TypeError,mS=function(t,e){if(Pme(e,t))return t;throw new Rme("Incorrect invocation")},TT=bi,Nme=rB,Mme=xc,Dme=wr,Ame=Dme("species"),xB=function(t,e){var r=TT(t).constructor,n;return r===void 0||Mme(n=TT(r)[Ame])?e:Nme(n)},jme=za,EB=/(?:ipad|iphone|ipod).*applewebkit/i.test(jme),pi=mr,kme=Cc,Bme=Ha,_T=Tr,Fme=Yr,OB=tr,PT=QA,Lme=Wd,RT=Vw,zme=Sk,Hme=EB,Vme=Ud,L1=pi.setImmediate,NT=pi.clearImmediate,Wme=pi.process,Ny=pi.Dispatch,Kme=pi.Function,MT=pi.MessageChannel,Ume=pi.String,My=0,Iu={},DT="onreadystatechange",ld,Za,Dy,Ay;OB(function(){ld=pi.location});var yS=function(t){if(Fme(Iu,t)){var e=Iu[t];delete Iu[t],e()}},jy=function(t){return function(){yS(t)}},AT=function(t){yS(t.data)},jT=function(t){pi.postMessage(Ume(t),ld.protocol+"//"+ld.host)};(!L1||!NT)&&(L1=function(e){zme(arguments.length,1);var r=_T(e)?e:Kme(e),n=Lme(arguments,1);return Iu[++My]=function(){kme(r,void 0,n)},Za(My),My},NT=function(e){delete Iu[e]},Vme?Za=function(t){Wme.nextTick(jy(t))}:Ny&&Ny.now?Za=function(t){Ny.now(jy(t))}:MT&&!Hme?(Dy=new MT,Ay=Dy.port2,Dy.port1.onmessage=AT,Za=Bme(Ay.postMessage,Ay)):pi.addEventListener&&_T(pi.postMessage)&&!pi.importScripts&&ld&&ld.protocol!=="file:"&&!OB(jT)?(Za=jT,pi.addEventListener("message",AT,!1)):DT in RT("script")?Za=function(t){PT.appendChild(RT("script"))[DT]=function(){PT.removeChild(this),yS(t)}}:Za=function(t){setTimeout(jy(t),0)});var IB={set:L1},TB=function(){this.head=null,this.tail=null};TB.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return e===null&&(this.tail=null),t.item}}};var _B=TB,qme=za,Gme=/ipad|iphone|ipod/i.test(qme)&&typeof Pebble<"u",Xme=za,Yme=/web0s(?!.*chrome)/i.test(Xme),Os=mr,kT=Ha,Jme=js.f,ky=IB.set,Zme=_B,Qme=EB,eye=Gme,tye=Yme,By=Ud,BT=Os.MutationObserver||Os.WebKitMutationObserver,FT=Os.document,LT=Os.process,fh=Os.Promise,zT=Jme(Os,"queueMicrotask"),z1=zT&&zT.value,cl,Fy,Ly,hh,HT;if(!z1){var vh=new Zme,ph=function(){var t,e;for(By&&(t=LT.domain)&&t.exit();e=vh.get();)try{e()}catch(r){throw vh.head&&cl(),r}t&&t.enter()};!Qme&&!By&&!tye&&BT&&FT?(Fy=!0,Ly=FT.createTextNode(""),new BT(ph).observe(Ly,{characterData:!0}),cl=function(){Ly.data=Fy=!Fy}):!eye&&fh&&fh.resolve?(hh=fh.resolve(void 0),hh.constructor=fh,HT=kT(hh.then,hh),cl=function(){HT(ph)}):By?cl=function(){LT.nextTick(ph)}:(ky=kT(ky,Os),cl=function(){ky(ph)}),z1=function(t){vh.head||cl(),vh.add(t)}}var rye=z1,nye=function(t,e){try{arguments.length===1?console.error(t):console.error(t,e)}catch{}},Ac=function(t){try{return{error:!1,value:t()}}catch(e){return{error:!0,value:e}}},iye=mr,jc=iye.Promise,PB=typeof Deno=="object"&&Deno&&typeof Deno.version=="object",oye=PB,aye=Ud,sye=!oye&&!aye&&typeof window=="object"&&typeof document=="object",lye=mr,Tu=jc,cye=Tr,uye=LA,dye=UA,fye=wr,hye=sye,vye=PB,zy=Ec,VT=Tu&&Tu.prototype,pye=fye("species"),WT=!1,RB=cye(lye.PromiseRejectionEvent),gye=uye("Promise",function(){var t=dye(Tu),e=t!==String(Tu);if(!e&&zy===66||!(VT.catch&&VT.finally))return!0;if(!zy||zy<51||!/native code/.test(t)){var r=new Tu(function(o){o(1)}),n=function(o){o(function(){},function(){})},i=r.constructor={};if(i[pye]=n,WT=r.then(function(){})instanceof n,!WT)return!0}return!e&&(hye||vye)&&!RB}),Zd={CONSTRUCTOR:gye,REJECTION_EVENT:RB},To={},KT=ii,mye=TypeError,yye=function(t){var e,r;this.promise=new t(function(n,i){if(e!==void 0||r!==void 0)throw new mye("Bad Promise constructor");e=n,r=i}),this.resolve=KT(e),this.reject=KT(r)};To.f=function(t){return new yye(t)};var bye=yt,Xv=Ud,Na=mr,Qd=un,$ye=Pc,wye=Ls,Sye=CB,Cye=ii,H1=Tr,xye=bn,Eye=mS,Oye=xB,NB=IB.set,bS=rye,Iye=nye,Tye=Ac,_ye=_B,MB=Rc,V1=jc,DB=Zd,AB=To,Cg="Promise",jB=DB.CONSTRUCTOR,Pye=DB.REJECTION_EVENT,Hy=MB.getterFor(Cg),Rye=MB.set,Nye=V1&&V1.prototype,Ol=V1,Vy=Nye,kB=Na.TypeError,W1=Na.document,$S=Na.process,K1=AB.f,Mye=K1,Dye=!!(W1&&W1.createEvent&&Na.dispatchEvent),BB="unhandledrejection",Aye="rejectionhandled",UT=0,FB=1,jye=2,wS=1,LB=2,gh,qT,kye,zB=function(t){var e;return xye(t)&&H1(e=t.then)?e:!1},HB=function(t,e){var r=e.value,n=e.state===FB,i=n?t.ok:t.fail,o=t.resolve,a=t.reject,s=t.domain,l,c,u;try{i?(n||(e.rejection===LB&&Fye(e),e.rejection=wS),i===!0?l=r:(s&&s.enter(),l=i(r),s&&(s.exit(),u=!0)),l===t.promise?a(new kB("Promise-chain cycle")):(c=zB(l))?Qd(c,l,o,a):o(l)):a(r)}catch(f){s&&!u&&s.exit(),a(f)}},VB=function(t,e){t.notified||(t.notified=!0,bS(function(){for(var r=t.reactions,n;n=r.get();)HB(n,t);t.notified=!1,e&&!t.rejection&&Bye(t)}))},WB=function(t,e,r){var n,i;Dye?(n=W1.createEvent("Event"),n.promise=e,n.reason=r,n.initEvent(t,!1,!0),Na.dispatchEvent(n)):n={promise:e,reason:r},!Pye&&(i=Na["on"+t])?i(n):t===BB&&Iye("Unhandled promise rejection",r)},Bye=function(t){Qd(NB,Na,function(){var e=t.facade,r=t.value,n=GT(t),i;if(n&&(i=Tye(function(){Xv?$S.emit("unhandledRejection",r,e):WB(BB,e,r)}),t.rejection=Xv||GT(t)?LB:wS,i.error))throw i.value})},GT=function(t){return t.rejection!==wS&&!t.parent},Fye=function(t){Qd(NB,Na,function(){var e=t.facade;Xv?$S.emit("rejectionHandled",e):WB(Aye,e,t.value)})},Il=function(t,e,r){return function(n){t(e,n,r)}},kl=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=jye,VB(t,!0))},U1=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new kB("Promise can't be resolved itself");var n=zB(e);n?bS(function(){var i={done:!1};try{Qd(n,e,Il(U1,i,t),Il(kl,i,t))}catch(o){kl(i,o,t)}}):(t.value=e,t.state=FB,VB(t,!1))}catch(i){kl({done:!1},i,t)}}};jB&&(Ol=function(e){Eye(this,Vy),Cye(e),Qd(gh,this);var r=Hy(this);try{e(Il(U1,r),Il(kl,r))}catch(n){kl(r,n)}},Vy=Ol.prototype,gh=function(e){Rye(this,{type:Cg,done:!1,notified:!1,parent:!1,reactions:new _ye,rejection:!1,state:UT,value:void 0})},gh.prototype=$ye(Vy,"then",function(e,r){var n=Hy(this),i=K1(Oye(this,Ol));return n.parent=!0,i.ok=H1(e)?e:!0,i.fail=H1(r)&&r,i.domain=Xv?$S.domain:void 0,n.state===UT?n.reactions.add(i):bS(function(){HB(i,n)}),i.promise}),qT=function(){var t=new gh,e=Hy(t);this.promise=t,this.resolve=Il(U1,e),this.reject=Il(kl,e)},AB.f=K1=function(t){return t===Ol||t===kye?new qT(t):Mye(t)});bye({global:!0,wrap:!0,forced:jB},{Promise:Ol});wye(Ol,Cg,!1,!0);Sye(Cg);var Lye=jc,zye=nk,Hye=Zd.CONSTRUCTOR,xg=Hye||!zye(function(t){Lye.all(t).then(void 0,function(){})}),Vye=yt,Wye=un,Kye=ii,Uye=To,qye=Ac,Gye=Hs,Xye=xg;Vye({target:"Promise",stat:!0,forced:Xye},{all:function(e){var r=this,n=Uye.f(r),i=n.resolve,o=n.reject,a=qye(function(){var s=Kye(r.resolve),l=[],c=0,u=1;Gye(e,function(f){var h=c++,v=!1;u++,Wye(s,r,f).then(function(g){v||(v=!0,l[h]=g,--u||i(l))},o)}),--u||i(l)});return a.error&&o(a.value),n.promise}});var Yye=yt,Jye=Zd.CONSTRUCTOR,XT=jc;XT&&XT.prototype;Yye({target:"Promise",proto:!0,forced:Jye,real:!0},{catch:function(t){return this.then(void 0,t)}});var Zye=yt,Qye=un,ebe=ii,tbe=To,rbe=Ac,nbe=Hs,ibe=xg;Zye({target:"Promise",stat:!0,forced:ibe},{race:function(e){var r=this,n=tbe.f(r),i=n.reject,o=rbe(function(){var a=ebe(r.resolve);nbe(e,function(s){Qye(a,r,s).then(n.resolve,i)})});return o.error&&i(o.value),n.promise}});var obe=yt,abe=un,sbe=To,lbe=Zd.CONSTRUCTOR;obe({target:"Promise",stat:!0,forced:lbe},{reject:function(e){var r=sbe.f(this);return abe(r.reject,void 0,e),r.promise}});var cbe=bi,ube=bn,dbe=To,KB=function(t,e){if(cbe(t),ube(e)&&e.constructor===t)return e;var r=dbe.f(t),n=r.resolve;return n(e),r.promise},fbe=yt,hbe=Vn,vbe=wee,pbe=jc,gbe=Zd.CONSTRUCTOR,mbe=KB,ybe=hbe("Promise"),bbe=!gbe;fbe({target:"Promise",stat:!0,forced:vbe},{resolve:function(e){return mbe(bbe&&this===ybe?pbe:this,e)}});var $be=yt,wbe=un,Sbe=ii,Cbe=To,xbe=Ac,Ebe=Hs,Obe=xg;$be({target:"Promise",stat:!0,forced:Obe},{allSettled:function(e){var r=this,n=Cbe.f(r),i=n.resolve,o=n.reject,a=xbe(function(){var s=Sbe(r.resolve),l=[],c=0,u=1;Ebe(e,function(f){var h=c++,v=!1;u++,wbe(s,r,f).then(function(g){v||(v=!0,l[h]={status:"fulfilled",value:g},--u||i(l))},function(g){v||(v=!0,l[h]={status:"rejected",reason:g},--u||i(l))})}),--u||i(l)});return a.error&&o(a.value),n.promise}});var Ibe=yt,Tbe=un,_be=ii,Pbe=Vn,Rbe=To,Nbe=Ac,Mbe=Hs,Dbe=xg,YT="No one promise resolved";Ibe({target:"Promise",stat:!0,forced:Dbe},{any:function(e){var r=this,n=Pbe("AggregateError"),i=Rbe.f(r),o=i.resolve,a=i.reject,s=Nbe(function(){var l=_be(r.resolve),c=[],u=0,f=1,h=!1;Mbe(e,function(v){var g=u++,m=!1;f++,Tbe(l,r,v).then(function(p){m||h||(h=!0,o(p))},function(p){m||h||(m=!0,c[g]=p,--f||a(new n(c,YT)))})}),--f||a(new n(c,YT))});return s.error&&a(s.value),i.promise}});var Abe=yt,q1=jc,jbe=tr,kbe=Vn,Bbe=Tr,Fbe=xB,JT=KB,Lbe=q1&&q1.prototype,zbe=!!q1&&jbe(function(){Lbe.finally.call({then:function(){}},function(){})});Abe({target:"Promise",proto:!0,real:!0,forced:zbe},{finally:function(t){var e=Fbe(this,kbe("Promise")),r=Bbe(t);return this.then(r?function(n){return JT(e,t()).then(function(){return n})}:t,r?function(n){return JT(e,t()).then(function(){throw n})}:t)}});var Hbe=yr,Vbe=Hbe.Promise,Wbe=Vbe,Kbe=Wbe,Ube=yt,qbe=To;Ube({target:"Promise",stat:!0},{withResolvers:function(){var e=qbe.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var Gbe=Kbe,Xbe=Gbe,Ybe=yt,Jbe=To,Zbe=Ac;Ybe({target:"Promise",stat:!0,forced:!0},{try:function(t){var e=Jbe.f(this),r=Zbe(t);return(r.error?e.reject:e.resolve)(r.value),e.promise}});var Qbe=Xbe,e0e=Qbe,t0e=e0e,r0e=mk,n0e=r0e,i0e=n0e,o0e=i0e,a0e=o0e;(function(t){var e=Mge.default,r=WA,n=rS,i=vB,o=mB,a=Bge,s=uk,l=pB,c=t0e,u=a0e,f=fk;function h(){t.exports=h=function(){return g},t.exports.__esModule=!0,t.exports.default=t.exports;var v,g={},m=Object.prototype,p=m.hasOwnProperty,y=r||function(z,K,B){z[K]=B.value},b=typeof n=="function"?n:{},$=b.iterator||"@@iterator",S=b.asyncIterator||"@@asyncIterator",w=b.toStringTag||"@@toStringTag";function C(z,K,B){return r(z,K,{value:B,enumerable:!0,configurable:!0,writable:!0}),z[K]}try{C({},"")}catch{C=function(B,F,U){return B[F]=U}}function E(z,K,B,F){var U=K&&K.prototype instanceof _?K:_,Z=i(U.prototype),ee=new ie(F||[]);return y(Z,"_invoke",{value:Y(z,B,ee)}),Z}function O(z,K,B){try{return{type:"normal",arg:z.call(K,B)}}catch(F){return{type:"throw",arg:F}}}g.wrap=E;var x="suspendedStart",I="suspendedYield",T="executing",N="completed",P={};function _(){}function R(){}function M(){}var D={};C(D,$,function(){return this});var j=o,k=j&&j(j(te([])));k&&k!==m&&p.call(k,$)&&(D=k);var V=M.prototype=_.prototype=i(D);function G(z){var K;a(K=["next","throw","return"]).call(K,function(B){C(z,B,function(F){return this._invoke(B,F)})})}function W(z,K){function B(U,Z,ee,Q){var ce=O(z[U],z,Z);if(ce.type!=="throw"){var me=ce.arg,Te=me.value;return Te&&e(Te)=="object"&&p.call(Te,"__await")?K.resolve(Te.__await).then(function(_e){B("next",_e,ee,Q)},function(_e){B("throw",_e,ee,Q)}):K.resolve(Te).then(function(_e){me.value=_e,ee(me)},function(_e){return B("throw",_e,ee,Q)})}Q(ce.arg)}var F;y(this,"_invoke",{value:function(Z,ee){function Q(){return new K(function(ce,me){B(Z,ee,ce,me)})}return F=F?F.then(Q,Q):Q()}})}function Y(z,K,B){var F=x;return function(U,Z){if(F===T)throw new Error("Generator is already running");if(F===N){if(U==="throw")throw Z;return{value:v,done:!0}}for(B.method=U,B.arg=Z;;){var ee=B.delegate;if(ee){var Q=q(ee,B);if(Q){if(Q===P)continue;return Q}}if(B.method==="next")B.sent=B._sent=B.arg;else if(B.method==="throw"){if(F===x)throw F=N,B.arg;B.dispatchException(B.arg)}else B.method==="return"&&B.abrupt("return",B.arg);F=T;var ce=O(z,K,B);if(ce.type==="normal"){if(F=B.done?N:I,ce.arg===P)continue;return{value:ce.arg,done:B.done}}ce.type==="throw"&&(F=N,B.method="throw",B.arg=ce.arg)}}}function q(z,K){var B=K.method,F=z.iterator[B];if(F===v)return K.delegate=null,B==="throw"&&z.iterator.return&&(K.method="return",K.arg=v,q(z,K),K.method==="throw")||B!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+B+"' method")),P;var U=O(F,z.iterator,K.arg);if(U.type==="throw")return K.method="throw",K.arg=U.arg,K.delegate=null,P;var Z=U.arg;return Z?Z.done?(K[z.resultName]=Z.value,K.next=z.nextLoc,K.method!=="return"&&(K.method="next",K.arg=v),K.delegate=null,P):Z:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,P)}function J(z){var K,B={tryLoc:z[0]};1 in z&&(B.catchLoc=z[1]),2 in z&&(B.finallyLoc=z[2],B.afterLoc=z[3]),s(K=this.tryEntries).call(K,B)}function oe(z){var K=z.completion||{};K.type="normal",delete K.arg,z.completion=K}function ie(z){this.tryEntries=[{tryLoc:"root"}],a(z).call(z,J,this),this.reset(!0)}function te(z){if(z||z===""){var K=z[$];if(K)return K.call(z);if(typeof z.next=="function")return z;if(!isNaN(z.length)){var B=-1,F=function U(){for(;++B<z.length;)if(p.call(z,B))return U.value=z[B],U.done=!1,U;return U.value=v,U.done=!0,U};return F.next=F}}throw new TypeError(e(z)+" is not iterable")}return R.prototype=M,y(V,"constructor",{value:M,configurable:!0}),y(M,"constructor",{value:R,configurable:!0}),R.displayName=C(M,w,"GeneratorFunction"),g.isGeneratorFunction=function(z){var K=typeof z=="function"&&z.constructor;return!!K&&(K===R||(K.displayName||K.name)==="GeneratorFunction")},g.mark=function(z){return l?l(z,M):(z.__proto__=M,C(z,w,"GeneratorFunction")),z.prototype=i(V),z},g.awrap=function(z){return{__await:z}},G(W.prototype),C(W.prototype,S,function(){return this}),g.AsyncIterator=W,g.async=function(z,K,B,F,U){U===void 0&&(U=c);var Z=new W(E(z,K,B,F),U);return g.isGeneratorFunction(K)?Z:Z.next().then(function(ee){return ee.done?ee.value:Z.next()})},G(V),C(V,w,"Generator"),C(V,$,function(){return this}),C(V,"toString",function(){return"[object Generator]"}),g.keys=function(z){var K=Object(z),B=[];for(var F in K)s(B).call(B,F);return u(B).call(B),function U(){for(;B.length;){var Z=B.pop();if(Z in K)return U.value=Z,U.done=!1,U}return U.done=!0,U}},g.values=te,ie.prototype={constructor:ie,reset:function(K){var B;if(this.prev=0,this.next=0,this.sent=this._sent=v,this.done=!1,this.delegate=null,this.method="next",this.arg=v,a(B=this.tryEntries).call(B,oe),!K)for(var F in this)F.charAt(0)==="t"&&p.call(this,F)&&!isNaN(+f(F).call(F,1))&&(this[F]=v)},stop:function(){this.done=!0;var K=this.tryEntries[0].completion;if(K.type==="throw")throw K.arg;return this.rval},dispatchException:function(K){if(this.done)throw K;var B=this;function F(me,Te){return ee.type="throw",ee.arg=K,B.next=me,Te&&(B.method="next",B.arg=v),!!Te}for(var U=this.tryEntries.length-1;U>=0;--U){var Z=this.tryEntries[U],ee=Z.completion;if(Z.tryLoc==="root")return F("end");if(Z.tryLoc<=this.prev){var Q=p.call(Z,"catchLoc"),ce=p.call(Z,"finallyLoc");if(Q&&ce){if(this.prev<Z.catchLoc)return F(Z.catchLoc,!0);if(this.prev<Z.finallyLoc)return F(Z.finallyLoc)}else if(Q){if(this.prev<Z.catchLoc)return F(Z.catchLoc,!0)}else{if(!ce)throw new Error("try statement without catch or finally");if(this.prev<Z.finallyLoc)return F(Z.finallyLoc)}}}},abrupt:function(K,B){for(var F=this.tryEntries.length-1;F>=0;--F){var U=this.tryEntries[F];if(U.tryLoc<=this.prev&&p.call(U,"finallyLoc")&&this.prev<U.finallyLoc){var Z=U;break}}Z&&(K==="break"||K==="continue")&&Z.tryLoc<=B&&B<=Z.finallyLoc&&(Z=null);var ee=Z?Z.completion:{};return ee.type=K,ee.arg=B,Z?(this.method="next",this.next=Z.finallyLoc,P):this.complete(ee)},complete:function(K,B){if(K.type==="throw")throw K.arg;return K.type==="break"||K.type==="continue"?this.next=K.arg:K.type==="return"?(this.rval=this.arg=K.arg,this.method="return",this.next="end"):K.type==="normal"&&B&&(this.next=B),P},finish:function(K){for(var B=this.tryEntries.length-1;B>=0;--B){var F=this.tryEntries[B];if(F.finallyLoc===K)return this.complete(F.completion,F.afterLoc),oe(F),P}},catch:function(K){for(var B=this.tryEntries.length-1;B>=0;--B){var F=this.tryEntries[B];if(F.tryLoc===K){var U=F.completion;if(U.type==="throw"){var Z=U.arg;oe(F)}return Z}}throw new Error("illegal catch attempt")},delegateYield:function(K,B,F){return this.delegate={iterator:te(K),resultName:B,nextLoc:F},this.method==="next"&&(this.arg=v),P}},g}t.exports=h,t.exports.__esModule=!0,t.exports.default=t.exports})(yB);var s0e=yB.exports,nv=s0e(),l0e=nv;try{regeneratorRuntime=nv}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=nv:Function("r","regeneratorRuntime = r")(nv)}var Xn=wt(l0e),UB={exports:{}},c0e=tr,u0e=c0e(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),d0e=tr,f0e=bn,h0e=La,ZT=u0e,iv=Object.isExtensible,v0e=d0e(function(){iv(1)}),p0e=v0e||ZT?function(e){return!f0e(e)||ZT&&h0e(e)==="ArrayBuffer"?!1:iv?iv(e):!0}:iv,g0e=tr,m0e=!g0e(function(){return Object.isExtensible(Object.preventExtensions({}))}),y0e=yt,b0e=hr,$0e=Bd,w0e=bn,SS=Yr,S0e=ai.f,QT=Fd,C0e=qw,CS=p0e,x0e=Zp,E0e=m0e,qB=!1,Go=x0e("meta"),O0e=0,xS=function(t){S0e(t,Go,{value:{objectID:"O"+O0e++,weakData:{}}})},I0e=function(t,e){if(!w0e(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!SS(t,Go)){if(!CS(t))return"F";if(!e)return"E";xS(t)}return t[Go].objectID},T0e=function(t,e){if(!SS(t,Go)){if(!CS(t))return!0;if(!e)return!1;xS(t)}return t[Go].weakData},_0e=function(t){return E0e&&qB&&CS(t)&&!SS(t,Go)&&xS(t),t},P0e=function(){R0e.enable=function(){},qB=!0;var t=QT.f,e=b0e([].splice),r={};r[Go]=1,t(r).length&&(QT.f=function(n){for(var i=t(n),o=0,a=i.length;o<a;o++)if(i[o]===Go){e(i,o,1);break}return i},y0e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:C0e.f}))},R0e=UB.exports={enable:P0e,fastKey:I0e,getWeakData:T0e,onFreeze:_0e};$0e[Go]=!0;var GB=UB.exports,N0e=yt,M0e=mr,D0e=GB,A0e=tr,j0e=Jo,k0e=Hs,B0e=mS,F0e=Tr,L0e=bn,z0e=xc,H0e=Ls,V0e=ai.f,W0e=Nc.forEach,K0e=cn,XB=Rc,U0e=XB.set,q0e=XB.getterFor,YB=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,o=n?"set":"add",a=M0e[t],s=a&&a.prototype,l={},c;if(!K0e||!F0e(a)||!(i||s.forEach&&!A0e(function(){new a().entries().next()})))c=r.getConstructor(e,t,n,o),D0e.enable();else{c=e(function(h,v){U0e(B0e(h,u),{type:t,collection:new a}),z0e(v)||k0e(v,h[o],{that:h,AS_ENTRIES:n})});var u=c.prototype,f=q0e(t);W0e(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var v=h==="add"||h==="set";h in s&&!(i&&h==="clear")&&j0e(u,h,function(g,m){var p=f(this).collection;if(!v&&i&&!L0e(g))return h==="get"?void 0:!1;var y=p[h](g===0?0:g,m);return v?this:y})}),i||V0e(u,"size",{configurable:!0,get:function(){return f(this).collection.size}})}return H0e(c,t,!1,!0),l[t]=c,N0e({global:!0,forced:!0},l),i||r.setStrong(c,t,n),c},G0e=Pc,X0e=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:G0e(t,n,e[n],r);return t},Y0e=Fs,J0e=Gw,e_=X0e,Z0e=Ha,Q0e=mS,e1e=xc,t1e=Hs,r1e=Qw,mh=eS,n1e=CB,iu=cn,t_=GB.fastKey,JB=Rc,r_=JB.set,Wy=JB.getterFor,ZB={getConstructor:function(t,e,r,n){var i=t(function(c,u){Q0e(c,o),r_(c,{type:e,index:Y0e(null),first:void 0,last:void 0,size:0}),iu||(c.size=0),e1e(u)||t1e(u,c[n],{that:c,AS_ENTRIES:r})}),o=i.prototype,a=Wy(e),s=function(c,u,f){var h=a(c),v=l(c,u),g,m;return v?v.value=f:(h.last=v={index:m=t_(u,!0),key:u,value:f,previous:g=h.last,next:void 0,removed:!1},h.first||(h.first=v),g&&(g.next=v),iu?h.size++:c.size++,m!=="F"&&(h.index[m]=v)),c},l=function(c,u){var f=a(c),h=t_(u),v;if(h!=="F")return f.index[h];for(v=f.first;v;v=v.next)if(v.key===u)return v};return e_(o,{clear:function(){for(var u=this,f=a(u),h=f.index,v=f.first;v;)v.removed=!0,v.previous&&(v.previous=v.previous.next=void 0),delete h[v.index],v=v.next;f.first=f.last=void 0,iu?f.size=0:u.size=0},delete:function(c){var u=this,f=a(u),h=l(u,c);if(h){var v=h.next,g=h.previous;delete f.index[h.index],h.removed=!0,g&&(g.next=v),v&&(v.previous=g),f.first===h&&(f.first=v),f.last===h&&(f.last=g),iu?f.size--:u.size--}return!!h},forEach:function(u){for(var f=a(this),h=Z0e(u,arguments.length>1?arguments[1]:void 0),v;v=v?v.next:f.first;)for(h(v.value,v.key,this);v&&v.removed;)v=v.previous},has:function(u){return!!l(this,u)}}),e_(o,r?{get:function(u){var f=l(this,u);return f&&f.value},set:function(u,f){return s(this,u===0?0:u,f)}}:{add:function(u){return s(this,u=u===0?0:u,u)}}),iu&&J0e(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=Wy(e),o=Wy(n);r1e(t,e,function(a,s){r_(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,l=a.last;l&&l.removed;)l=l.previous;return!a.target||!(a.last=l=l?l.next:a.state.first)?(a.target=void 0,mh(void 0,!0)):mh(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},r?"entries":"values",!r,!0),n1e(e)}},i1e=YB,o1e=ZB;i1e("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},o1e);var a1e=yr,s1e=a1e.Map,l1e=s1e,c1e=l1e,u1e=c1e,QB=wt(u1e),d1e=yt,f1e=Nc.some,h1e=gg,v1e=h1e("some");d1e({target:"Array",proto:!0,forced:!v1e},{some:function(e){return f1e(this,e,arguments.length>1?arguments[1]:void 0)}});var p1e=Pn,g1e=p1e("Array","some"),m1e=Xr,y1e=g1e,Ky=Array.prototype,b1e=function(t){var e=t.some;return t===Ky||m1e(Ky,t)&&e===Ky.some?y1e:e},$1e=b1e,w1e=$1e,S1e=w1e,C1e=wt(S1e),x1e=Pn,E1e=x1e("Array","keys"),O1e=E1e,I1e=O1e,T1e=Zo,_1e=Yr,P1e=Xr,R1e=I1e,Uy=Array.prototype,N1e={DOMTokenList:!0,NodeList:!0},M1e=function(t){var e=t.keys;return t===Uy||P1e(Uy,t)&&e===Uy.keys||_1e(N1e,T1e(t))?R1e:e},D1e=M1e,ul=wt(D1e),n_=rj,A1e=Math.floor,G1=function(t,e){var r=t.length,n=A1e(r/2);return r<8?j1e(t,e):k1e(t,G1(n_(t,0,n),e),G1(n_(t,n),e),e)},j1e=function(t,e){for(var r=t.length,n=1,i,o;n<r;){for(o=n,i=t[n];o&&e(t[o-1],i)>0;)t[o]=t[--o];o!==n++&&(t[o]=i)}return t},k1e=function(t,e,r,n){for(var i=e.length,o=r.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?n(e[a],r[s])<=0?e[a++]:r[s++]:a<i?e[a++]:r[s++];return t},B1e=G1,F1e=za,i_=F1e.match(/firefox\/(\d+)/i),L1e=!!i_&&+i_[1],z1e=za,H1e=/MSIE|Trident/.test(z1e),V1e=za,o_=V1e.match(/AppleWebKit\/(\d+)\./),W1e=!!o_&&+o_[1],K1e=yt,eF=hr,U1e=ii,q1e=oi,a_=$i,G1e=yk,s_=Bs,ES=tr,X1e=B1e,Y1e=gg,l_=L1e,J1e=H1e,c_=Ec,u_=W1e,ga=[],d_=eF(ga.sort),Z1e=eF(ga.push),Q1e=ES(function(){ga.sort(void 0)}),e$e=ES(function(){ga.sort(null)}),t$e=Y1e("sort"),tF=!ES(function(){if(c_)return c_<70;if(!(l_&&l_>3)){if(J1e)return!0;if(u_)return u_<603;var t="",e,r,n,i;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)ga.push({k:r+i,v:n})}for(ga.sort(function(o,a){return a.v-o.v}),i=0;i<ga.length;i++)r=ga[i].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),r$e=Q1e||!e$e||!t$e||!tF,n$e=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:s_(e)>s_(r)?1:-1}};K1e({target:"Array",proto:!0,forced:r$e},{sort:function(e){e!==void 0&&U1e(e);var r=q1e(this);if(tF)return e===void 0?d_(r):d_(r,e);var n=[],i=a_(r),o,a;for(a=0;a<i;a++)a in r&&Z1e(n,r[a]);for(X1e(n,n$e(e)),o=a_(n),a=0;a<o;)r[a]=n[a++];for(;a<i;)G1e(r,a++);return r}});var i$e=Pn,o$e=i$e("Array","sort"),a$e=Xr,s$e=o$e,qy=Array.prototype,l$e=function(t){var e=t.sort;return t===qy||a$e(qy,t)&&e===qy.sort?s$e:e},c$e=l$e,u$e=c$e,d$e=u$e,X1=wt(d$e),f$e=Pn,h$e=f$e("Array","values"),v$e=h$e,p$e=v$e,g$e=Zo,m$e=Yr,y$e=Xr,b$e=p$e,Gy=Array.prototype,$$e={DOMTokenList:!0,NodeList:!0},w$e=function(t){var e=t.values;return t===Gy||y$e(Gy,t)&&e===Gy.values||m$e($$e,g$e(t))?b$e:e},S$e=w$e,f_=wt(S$e),C$e=Wj,Tl=wt(C$e),x$e=Pn,E$e=x$e("Array","entries"),O$e=E$e,I$e=O$e,T$e=Zo,_$e=Yr,P$e=Xr,R$e=I$e,Xy=Array.prototype,N$e={DOMTokenList:!0,NodeList:!0},M$e=function(t){var e=t.entries;return t===Xy||P$e(Xy,t)&&e===Xy.entries||_$e(N$e,T$e(t))?R$e:e},D$e=M$e,A$e=wt(D$e);let yh;const j$e=new Uint8Array(16);function k$e(){if(!yh&&(yh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yh(j$e)}const pn=[];for(let t=0;t<256;++t)pn.push((t+256).toString(16).slice(1));function B$e(t,e=0){return pn[t[e+0]]+pn[t[e+1]]+pn[t[e+2]]+pn[t[e+3]]+"-"+pn[t[e+4]]+pn[t[e+5]]+"-"+pn[t[e+6]]+pn[t[e+7]]+"-"+pn[t[e+8]]+pn[t[e+9]]+"-"+pn[t[e+10]]+pn[t[e+11]]+pn[t[e+12]]+pn[t[e+13]]+pn[t[e+14]]+pn[t[e+15]]}const F$e=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var h_={randomUUID:F$e};function L$e(t,e,r){if(h_.randomUUID&&!t)return h_.randomUUID();t=t||{};const n=t.random||(t.rng||k$e)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,B$e(n)}function v_(t){return typeof t=="string"||typeof t=="number"}var z$e=function(){function t(e){Xp(this,t),wa(this,"_queue",[]),wa(this,"_timeout",null),wa(this,"_extended",null),this.delay=null,this.max=1/0,this.setOptions(e)}return pg(t,[{key:"setOptions",value:function(r){r&&typeof r.delay<"u"&&(this.delay=r.delay),r&&typeof r.max<"u"&&(this.max=r.max),this._flushIfNeeded()}},{key:"destroy",value:function(){if(this.flush(),this._extended){for(var r=this._extended.object,n=this._extended.methods,i=0;i<n.length;i++){var o=n[i];o.original?r[o.name]=o.original:delete r[o.name]}this._extended=null}}},{key:"replace",value:function(r,n){var i=this,o=r[n];if(!o)throw new Error("Method "+n+" undefined");r[n]=function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];i.queue({args:s,fn:o,context:this})}}},{key:"queue",value:function(r){typeof r=="function"?this._queue.push({fn:r}):this._queue.push(r),this._flushIfNeeded()}},{key:"_flushIfNeeded",value:function(){var r=this;this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay=="number"&&(this._timeout=vve(function(){r.flush()},this.delay))}},{key:"flush",value:function(){var r,n;Ss(r=bk(n=this._queue).call(n,0)).call(r,function(i){i.fn.apply(i.context||i.fn,i.args||[])})}}],[{key:"extend",value:function(r,n){var i=new t(n);if(r.flush!==void 0)throw new Error("Target object already has a property flush");r.flush=function(){i.flush()};var o=[{name:"flush",original:void 0}];if(n&&n.replace)for(var a=0;a<n.replace.length;a++){var s=n.replace[a];o.push({name:s,original:r[s]}),i.replace(r,s)}return i._extended={object:r,methods:o},i}}]),t}(),H$e=function(){function t(){Xp(this,t),wa(this,"_subscribers",{"*":[],add:[],remove:[],update:[]}),wa(this,"subscribe",t.prototype.on),wa(this,"unsubscribe",t.prototype.off)}return pg(t,[{key:"_trigger",value:function(r,n,i){var o,a;if(r==="*")throw new Error("Cannot trigger event *");Ss(o=bg(a=[]).call(a,Qn(this._subscribers[r]),Qn(this._subscribers["*"]))).call(o,function(s){s(r,n,i??null)})}},{key:"on",value:function(r,n){typeof n=="function"&&this._subscribers[r].push(n)}},{key:"off",value:function(r,n){var i;this._subscribers[r]=Cl(i=this._subscribers[r]).call(i,function(o){return o!==n})}}]),t}(),V$e=YB,W$e=ZB;V$e("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},W$e);var K$e=yr,U$e=K$e.Set,q$e=U$e,G$e=q$e,X$e=G$e,Yy=wt(X$e),Y$e=iS,J$e=Y$e,Z$e=J$e,Q$e=Z$e,ewe=Q$e,twe=ewe,rwe=twe,nwe=rwe,iwe=nwe,owe=iwe,Jy=wt(owe);function lo(t,e){var r=typeof yg<"u"&&aS(t)||t["@@iterator"];if(!r){if(hi(t)||(r=awe(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function awe(t,e){var r;if(t){if(typeof t=="string")return p_(t,e);var n=$g(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return oS(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p_(t,e)}}function p_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var g_=function(t){function e(r){Xp(this,e),this._pairs=r}return pg(e,[{key:t,value:Xn.mark(function r(){var n,i,o,a,s;return Xn.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=lo(this._pairs),c.prev=1,n.s();case 3:if((i=n.n()).done){c.next=9;break}return o=qn(i.value,2),a=o[0],s=o[1],c.next=7,[a,s];case 7:c.next=3;break;case 9:c.next=14;break;case 11:c.prev=11,c.t0=c.catch(1),n.e(c.t0);case 14:return c.prev=14,n.f(),c.finish(14);case 17:case"end":return c.stop()}},r,this,[[1,11,14,17]])})},{key:"entries",value:Xn.mark(function r(){var n,i,o,a,s;return Xn.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:n=lo(this._pairs),c.prev=1,n.s();case 3:if((i=n.n()).done){c.next=9;break}return o=qn(i.value,2),a=o[0],s=o[1],c.next=7,[a,s];case 7:c.next=3;break;case 9:c.next=14;break;case 11:c.prev=11,c.t0=c.catch(1),n.e(c.t0);case 14:return c.prev=14,n.f(),c.finish(14);case 17:case"end":return c.stop()}},r,this,[[1,11,14,17]])})},{key:"keys",value:Xn.mark(function r(){var n,i,o,a;return Xn.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:n=lo(this._pairs),l.prev=1,n.s();case 3:if((i=n.n()).done){l.next=9;break}return o=qn(i.value,1),a=o[0],l.next=7,a;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),n.e(l.t0);case 14:return l.prev=14,n.f(),l.finish(14);case 17:case"end":return l.stop()}},r,this,[[1,11,14,17]])})},{key:"values",value:Xn.mark(function r(){var n,i,o,a;return Xn.wrap(function(l){for(;;)switch(l.prev=l.next){case 0:n=lo(this._pairs),l.prev=1,n.s();case 3:if((i=n.n()).done){l.next=9;break}return o=qn(i.value,2),a=o[1],l.next=7,a;case 7:l.next=3;break;case 9:l.next=14;break;case 11:l.prev=11,l.t0=l.catch(1),n.e(l.t0);case 14:return l.prev=14,n.f(),l.finish(14);case 17:case"end":return l.stop()}},r,this,[[1,11,14,17]])})},{key:"toIdArray",value:function(){var n;return Hi(n=Qn(this._pairs)).call(n,function(i){return i[0]})}},{key:"toItemArray",value:function(){var n;return Hi(n=Qn(this._pairs)).call(n,function(i){return i[1]})}},{key:"toEntryArray",value:function(){return Qn(this._pairs)}},{key:"toObjectMap",value:function(){var n=Whe(null),i=lo(this._pairs),o;try{for(i.s();!(o=i.n()).done;){var a=qn(o.value,2),s=a[0],l=a[1];n[s]=l}}catch(c){i.e(c)}finally{i.f()}return n}},{key:"toMap",value:function(){return new QB(this._pairs)}},{key:"toIdSet",value:function(){return new Yy(this.toIdArray())}},{key:"toItemSet",value:function(){return new Yy(this.toItemArray())}},{key:"cache",value:function(){return new e(Qn(this._pairs))}},{key:"distinct",value:function(n){var i=new Yy,o=lo(this._pairs),a;try{for(o.s();!(a=o.n()).done;){var s=qn(a.value,2),l=s[0],c=s[1];i.add(n(c,l))}}catch(u){o.e(u)}finally{o.f()}return i}},{key:"filter",value:function(n){var i=this._pairs;return new e({[Tl](){return Xn.mark(function o(){var a,s,l,c,u;return Xn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=lo(i),h.prev=1,a.s();case 3:if((s=a.n()).done){h.next=10;break}if(l=qn(s.value,2),c=l[0],u=l[1],!n(u,c)){h.next=8;break}return h.next=8,[c,u];case 8:h.next=3;break;case 10:h.next=15;break;case 12:h.prev=12,h.t0=h.catch(1),a.e(h.t0);case 15:return h.prev=15,a.f(),h.finish(15);case 18:case"end":return h.stop()}},o,null,[[1,12,15,18]])})()}})}},{key:"forEach",value:function(n){var i=lo(this._pairs),o;try{for(i.s();!(o=i.n()).done;){var a=qn(o.value,2),s=a[0],l=a[1];n(l,s)}}catch(c){i.e(c)}finally{i.f()}}},{key:"map",value:function(n){var i=this._pairs;return new e({[Tl](){return Xn.mark(function o(){var a,s,l,c,u;return Xn.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:a=lo(i),h.prev=1,a.s();case 3:if((s=a.n()).done){h.next=9;break}return l=qn(s.value,2),c=l[0],u=l[1],h.next=7,[c,n(u,c)];case 7:h.next=3;break;case 9:h.next=14;break;case 11:h.prev=11,h.t0=h.catch(1),a.e(h.t0);case 14:return h.prev=14,a.f(),h.finish(14);case 17:case"end":return h.stop()}},o,null,[[1,11,14,17]])})()}})}},{key:"max",value:function(n){var i=Jy(this._pairs),o=i.next();if(o.done)return null;for(var a=o.value[1],s=n(o.value[1],o.value[0]);!(o=i.next()).done;){var l=qn(o.value,2),c=l[0],u=l[1],f=n(u,c);f>s&&(s=f,a=u)}return a}},{key:"min",value:function(n){var i=Jy(this._pairs),o=i.next();if(o.done)return null;for(var a=o.value[1],s=n(o.value[1],o.value[0]);!(o=i.next()).done;){var l=qn(o.value,2),c=l[0],u=l[1],f=n(u,c);f<s&&(s=f,a=u)}return a}},{key:"reduce",value:function(n,i){var o=lo(this._pairs),a;try{for(o.s();!(a=o.n()).done;){var s=qn(a.value,2),l=s[0],c=s[1];i=n(i,c,l)}}catch(u){o.e(u)}finally{o.f()}return i}},{key:"sort",value:function(n){var i=this;return new e({[Tl]:function(){var o;return Jy(X1(o=Qn(i._pairs)).call(o,function(a,s){var l=qn(a,2),c=l[0],u=l[1],f=qn(s,2),h=f[0],v=f[1];return n(u,v,c,h)}))}})}}]),e}(Tl);function m_(t,e){var r=lS(t);if(yT){var n=yT(t);e&&(n=Cl(n).call(n,function(i){return uB(t,i).enumerable})),r.push.apply(r,n)}return r}function y_(t){for(var e=1;e<arguments.length;e++){var r,n,i=arguments[e]!=null?arguments[e]:{};e%2?Ss(r=m_(Object(i),!0)).call(r,function(o){wa(t,o,i[o])}):bT?ige(t,bT(i)):Ss(n=m_(Object(i))).call(n,function(o){age(t,o,uB(i,o))})}return t}function Zy(t,e){var r=typeof yg<"u"&&aS(t)||t["@@iterator"];if(!r){if(hi(t)||(r=swe(t))||e){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(c){throw c},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,s;return{s:function(){r=r.call(t)},n:function(){var c=r.next();return o=c.done,c},e:function(c){a=!0,s=c},f:function(){try{!o&&r.return!=null&&r.return()}finally{if(a)throw s}}}}function swe(t,e){var r;if(t){if(typeof t=="string")return b_(t,e);var n=$g(r=Object.prototype.toString.call(t)).call(r,8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return oS(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b_(t,e)}}function b_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function lwe(t){var e=cwe();return function(){var n=Uv(t),i;if(e){var o=Uv(this).constructor;i=tv(n,arguments,o)}else i=n.apply(this,arguments);return Tge(this,i)}}function cwe(){if(typeof Reflect>"u"||!tv||tv.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(tv(Boolean,[],function(){})),!0}catch{return!1}}function uwe(t,e){return t[e]==null&&(t[e]=L$e()),t}var Yv=function(t){Ige(r,t);var e=lwe(r);function r(n,i){var o;return Xp(this,r),o=e.call(this),wa(hB(o),"_queue",null),n&&!hi(n)&&(i=n,n=[]),o._options=i||{},o._data=new QB,o.length=0,o._idProp=o._options.fieldId||"id",n&&n.length&&o.add(n),o.setOptions(i),o}return pg(r,[{key:"idProp",get:function(){return this._idProp}},{key:"setOptions",value:function(i){i&&i.queue!==void 0&&(i.queue===!1?this._queue&&(this._queue.destroy(),this._queue=null):(this._queue||(this._queue=z$e.extend(this,{replace:["add","update","remove"]})),i.queue&&typeof i.queue=="object"&&this._queue.setOptions(i.queue)))}},{key:"add",value:function(i,o){var a=this,s=[],l;if(hi(i)){var c=Hi(i).call(i,function(h){return h[a._idProp]});if(C1e(c).call(c,function(h){return a._data.has(h)}))throw new Error("A duplicate id was found in the parameter array.");for(var u=0,f=i.length;u<f;u++)l=this._addItem(i[u]),s.push(l)}else if(i&&typeof i=="object")l=this._addItem(i),s.push(l);else throw new Error("Unknown dataType");return s.length&&this._trigger("add",{items:s},o),s}},{key:"update",value:function(i,o){var a=this,s=[],l=[],c=[],u=[],f=this._idProp,h=function(y){var b=y[f];if(b!=null&&a._data.has(b)){var $=y,S=Ohe({},a._data.get(b)),w=a._updateItem($);l.push(w),u.push($),c.push(S)}else{var C=a._addItem(y);s.push(C)}};if(hi(i))for(var v=0,g=i.length;v<g;v++)i[v]&&typeof i[v]=="object"?h(i[v]):console.warn("Ignoring input item, which is not an object at index "+v);else if(i&&typeof i=="object")h(i);else throw new Error("Unknown dataType");if(s.length&&this._trigger("add",{items:s},o),l.length){var m={items:l,oldData:c,data:u};this._trigger("update",m,o)}return bg(s).call(s,l)}},{key:"updateOnly",value:function(i,o){var a,s=this;hi(i)||(i=[i]);var l=Hi(a=Hi(i).call(i,function(u){var f=s._data.get(u[s._idProp]);if(f==null)throw new Error("Updating non-existent items is not allowed.");return{oldData:f,update:u}})).call(a,function(u){var f=u.oldData,h=u.update,v=f[s._idProp],g=ope(f,h);return s._data.set(v,g),{id:v,oldData:f,updatedData:g}});if(l.length){var c={items:Hi(l).call(l,function(u){return u.id}),oldData:Hi(l).call(l,function(u){return u.oldData}),data:Hi(l).call(l,function(u){return u.updatedData})};return this._trigger("update",c,o),c.items}else return[]}},{key:"get",value:function(i,o){var a=void 0,s=void 0,l=void 0;v_(i)?(a=i,l=o):hi(i)?(s=i,l=o):l=i;var c=l&&l.returnType==="Object"?"Object":"Array",u=l&&Cl(l),f=[],h=void 0,v=void 0,g=void 0;if(a!=null)h=this._data.get(a),h&&u&&!u(h)&&(h=void 0);else if(s!=null)for(var m=0,p=s.length;m<p;m++)h=this._data.get(s[m]),h!=null&&(!u||u(h))&&f.push(h);else{var y;v=Qn(ul(y=this._data).call(y));for(var b=0,$=v.length;b<$;b++)g=v[b],h=this._data.get(g),h!=null&&(!u||u(h))&&f.push(h)}if(l&&l.order&&a==null&&this._sort(f,l.order),l&&l.fields){var S=l.fields;if(a!=null&&h!=null)h=this._filterFields(h,S);else for(var w=0,C=f.length;w<C;w++)f[w]=this._filterFields(f[w],S)}if(c=="Object"){for(var E={},O=0,x=f.length;O<x;O++){var I=f[O],T=I[this._idProp];E[T]=I}return E}else if(a!=null){var N;return(N=h)!==null&&N!==void 0?N:null}else return f}},{key:"getIds",value:function(i){var o=this._data,a=i&&Cl(i),s=i&&i.order,l=Qn(ul(o).call(o)),c=[];if(a)if(s){for(var u=[],f=0,h=l.length;f<h;f++){var v=l[f],g=this._data.get(v);g!=null&&a(g)&&u.push(g)}this._sort(u,s);for(var m=0,p=u.length;m<p;m++)c.push(u[m][this._idProp])}else for(var y=0,b=l.length;y<b;y++){var $=l[y],S=this._data.get($);S!=null&&a(S)&&c.push(S[this._idProp])}else if(s){for(var w=[],C=0,E=l.length;C<E;C++){var O=l[C];w.push(o.get(O))}this._sort(w,s);for(var x=0,I=w.length;x<I;x++)c.push(w[x][this._idProp])}else for(var T=0,N=l.length;T<N;T++){var P=l[T],_=o.get(P);_!=null&&c.push(_[this._idProp])}return c}},{key:"getDataSet",value:function(){return this}},{key:"forEach",value:function(i,o){var a=o&&Cl(o),s=this._data,l=Qn(ul(s).call(s));if(o&&o.order)for(var c=this.get(o),u=0,f=c.length;u<f;u++){var h=c[u],v=h[this._idProp];i(h,v)}else for(var g=0,m=l.length;g<m;g++){var p=l[g],y=this._data.get(p);y!=null&&(!a||a(y))&&i(y,p)}}},{key:"map",value:function(i,o){for(var a=o&&Cl(o),s=[],l=this._data,c=Qn(ul(l).call(l)),u=0,f=c.length;u<f;u++){var h=c[u],v=this._data.get(h);v!=null&&(!a||a(v))&&s.push(i(v,h))}return o&&o.order&&this._sort(s,o.order),s}},{key:"_filterFields",value:function(i,o){var a;return i&&Hle(a=hi(o)?o:lS(o)).call(a,function(s,l){return s[l]=i[l],s},{})}},{key:"_sort",value:function(i,o){if(typeof o=="string"){var a=o;X1(i).call(i,function(s,l){var c=s[a],u=l[a];return c>u?1:c<u?-1:0})}else if(typeof o=="function")X1(i).call(i,o);else throw new TypeError("Order must be a function or a string")}},{key:"remove",value:function(i,o){for(var a=[],s=[],l=hi(i)?i:[i],c=0,u=l.length;c<u;c++){var f=this._remove(l[c]);if(f){var h=f[this._idProp];h!=null&&(a.push(h),s.push(f))}}return a.length&&this._trigger("remove",{items:a,oldData:s},o),a}},{key:"_remove",value:function(i){var o;if(v_(i)?o=i:i&&typeof i=="object"&&(o=i[this._idProp]),o!=null&&this._data.has(o)){var a=this._data.get(o)||null;return this._data.delete(o),--this.length,a}return null}},{key:"clear",value:function(i){for(var o,a=Qn(ul(o=this._data).call(o)),s=[],l=0,c=a.length;l<c;l++)s.push(this._data.get(a[l]));return this._data.clear(),this.length=0,this._trigger("remove",{items:a,oldData:s},i),a}},{key:"max",value:function(i){var o,a=null,s=null,l=Zy(f_(o=this._data).call(o)),c;try{for(l.s();!(c=l.n()).done;){var u=c.value,f=u[i];typeof f=="number"&&(s==null||f>s)&&(a=u,s=f)}}catch(h){l.e(h)}finally{l.f()}return a||null}},{key:"min",value:function(i){var o,a=null,s=null,l=Zy(f_(o=this._data).call(o)),c;try{for(l.s();!(c=l.n()).done;){var u=c.value,f=u[i];typeof f=="number"&&(s==null||f<s)&&(a=u,s=f)}}catch(h){l.e(h)}finally{l.f()}return a||null}},{key:"distinct",value:function(i){for(var o=this._data,a=Qn(ul(o).call(o)),s=[],l=0,c=0,u=a.length;c<u;c++){for(var f=a[c],h=o.get(f),v=h[i],g=!1,m=0;m<l;m++)if(s[m]==v){g=!0;break}!g&&v!==void 0&&(s[l]=v,l++)}return s}},{key:"_addItem",value:function(i){var o=uwe(i,this._idProp),a=o[this._idProp];if(this._data.has(a))throw new Error("Cannot add item: item with id "+a+" already exists");return this._data.set(a,o),++this.length,a}},{key:"_updateItem",value:function(i){var o=i[this._idProp];if(o==null)throw new Error("Cannot update item: item has no id (item: "+Yhe(i)+")");var a=this._data.get(o);if(!a)throw new Error("Cannot update item: no item with id "+o+" found");return this._data.set(o,y_(y_({},a),i)),o}},{key:"stream",value:function(i){if(i){var o=this._data;return new g_({[Tl](){return Xn.mark(function s(){var l,c,u,f;return Xn.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:l=Zy(i),v.prev=1,l.s();case 3:if((c=l.n()).done){v.next=11;break}if(u=c.value,f=o.get(u),f==null){v.next=9;break}return v.next=9,[u,f];case 9:v.next=3;break;case 11:v.next=16;break;case 13:v.prev=13,v.t0=v.catch(1),l.e(v.t0);case 16:return v.prev=16,l.f(),v.finish(16);case 19:case"end":return v.stop()}},s,null,[[1,13,16,19]])})()}})}else{var a;return new g_({[Tl]:Jj(a=A$e(this._data)).call(a,this._data)})}}}]),r}(H$e);function dwe(t,e){return typeof e=="object"&&e!==null&&t===e.idProp&&typeof e.add=="function"&&typeof e.clear=="function"&&typeof e.distinct=="function"&&typeof Ss(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof Hi(e)=="function"&&typeof e.max=="function"&&typeof e.min=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.remove=="function"&&typeof e.setOptions=="function"&&typeof e.stream=="function"&&typeof e.update=="function"&&typeof e.updateOnly=="function"}function rF(t,e){return typeof e=="object"&&e!==null&&t===e.idProp&&typeof Ss(e)=="function"&&typeof e.get=="function"&&typeof e.getDataSet=="function"&&typeof e.getIds=="function"&&typeof e.length=="number"&&typeof Hi(e)=="function"&&typeof e.off=="function"&&typeof e.on=="function"&&typeof e.stream=="function"&&dwe(t,e.getDataSet())}/**
 * vis-network
 * https://visjs.github.io/vis-network/
 *
 * A dynamic, browser-based visualization library.
 *
 * @version 9.1.12
 * @date    2025-06-10T17:34:31.193Z
 *
 * @copyright (c) 2011-2017 Almende B.V, http://almende.com
 * @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
 *
 * @license
 * vis.js is dual licensed under both
 *
 *   1. The Apache 2.0 License
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *   and
 *
 *   2. The MIT License
 *      http://opensource.org/licenses/MIT
 *
 * vis.js may be distributed under either license.
 */var Qy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ot(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bh=function(t){return t&&t.Math===Math&&t},Pr=bh(typeof globalThis=="object"&&globalThis)||bh(typeof window=="object"&&window)||bh(typeof self=="object"&&self)||bh(typeof Qy=="object"&&Qy)||function(){return this}()||Qy||Function("return this")(),Jt=function(t){try{return!!t()}catch{return!0}},fwe=Jt,ef=!fwe(function(){var t=function(){}.bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),hwe=ef,nF=Function.prototype,$_=nF.apply,w_=nF.call,Eg=typeof Reflect=="object"&&Reflect.apply||(hwe?w_.bind($_):function(){return w_.apply($_,arguments)}),iF=ef,oF=Function.prototype,Y1=oF.call,vwe=iF&&oF.bind.bind(Y1,Y1),Zt=iF?vwe:function(t){return function(){return Y1.apply(t,arguments)}},aF=Zt,pwe=aF({}.toString),gwe=aF("".slice),Qo=function(t){return gwe(pwe(t),8,-1)},mwe=Qo,ywe=Zt,OS=function(t){if(mwe(t)==="Function")return ywe(t)},J1=typeof document=="object"&&document.all,bwe=typeof J1>"u"&&J1!==void 0,sF={all:J1,IS_HTMLDDA:bwe},lF=sF,$we=lF.all,$n=lF.IS_HTMLDDA?function(t){return typeof t=="function"||t===$we}:function(t){return typeof t=="function"},tf={},wwe=Jt,rn=!wwe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Swe=ef,$h=Function.prototype.call,io=Swe?$h.bind($h):function(){return $h.apply($h,arguments)},rf={},cF={}.propertyIsEnumerable,uF=Object.getOwnPropertyDescriptor,Cwe=uF&&!cF.call({1:2},1);rf.f=Cwe?function(e){var r=uF(this,e);return!!r&&r.enumerable}:cF;var nf=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}},xwe=Zt,Ewe=Jt,Owe=Qo,eb=Object,Iwe=xwe("".split),Og=Ewe(function(){return!eb("z").propertyIsEnumerable(0)})?function(t){return Owe(t)==="String"?Iwe(t,""):eb(t)}:eb,kc=function(t){return t==null},Twe=kc,_we=TypeError,of=function(t){if(Twe(t))throw new _we("Can't call method on "+t);return t},Pwe=Og,Rwe=of,oo=function(t){return Pwe(Rwe(t))},S_=$n,dF=sF,Nwe=dF.all,Rn=dF.IS_HTMLDDA?function(t){return typeof t=="object"?t!==null:S_(t)||t===Nwe}:function(t){return typeof t=="object"?t!==null:S_(t)},ir={},tb=ir,rb=Pr,Mwe=$n,C_=function(t){return Mwe(t)?t:void 0},ao=function(t,e){return arguments.length<2?C_(tb[t])||C_(rb[t]):tb[t]&&tb[t][e]||rb[t]&&rb[t][e]},Dwe=Zt,Jr=Dwe({}.isPrototypeOf),af=typeof navigator<"u"&&String(navigator.userAgent)||"",fF=Pr,nb=af,x_=fF.process,E_=fF.Deno,O_=x_&&x_.versions||E_&&E_.version,I_=O_&&O_.v8,Vi,Jv;I_&&(Vi=I_.split("."),Jv=Vi[0]>0&&Vi[0]<4?1:+(Vi[0]+Vi[1]));!Jv&&nb&&(Vi=nb.match(/Edge\/(\d+)/),(!Vi||Vi[1]>=74)&&(Vi=nb.match(/Chrome\/(\d+)/),Vi&&(Jv=+Vi[1])));var sf=Jv,T_=sf,Awe=Jt,jwe=Pr,kwe=jwe.String,Bc=!!Object.getOwnPropertySymbols&&!Awe(function(){var t=Symbol("symbol detection");return!kwe(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&T_&&T_<41}),Bwe=Bc,hF=Bwe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Fwe=ao,Lwe=$n,zwe=Jr,Hwe=hF,Vwe=Object,lf=Hwe?function(t){return typeof t=="symbol"}:function(t){var e=Fwe("Symbol");return Lwe(e)&&zwe(e.prototype,Vwe(t))},Wwe=String,cf=function(t){try{return Wwe(t)}catch{return"Object"}},Kwe=$n,Uwe=cf,qwe=TypeError,Fc=function(t){if(Kwe(t))return t;throw new qwe(Uwe(t)+" is not a function")},Gwe=Fc,Xwe=kc,IS=function(t,e){var r=t[e];return Xwe(r)?void 0:Gwe(r)},ib=io,ob=$n,ab=Rn,Ywe=TypeError,Jwe=function(t,e){var r,n;if(e==="string"&&ob(r=t.toString)&&!ab(n=ib(r,t))||ob(r=t.valueOf)&&!ab(n=ib(r,t))||e!=="string"&&ob(r=t.toString)&&!ab(n=ib(r,t)))return n;throw new Ywe("Can't convert object to primitive value")},vF={exports:{}},__=Pr,Zwe=Object.defineProperty,Qwe=function(t,e){try{Zwe(__,t,{value:e,configurable:!0,writable:!0})}catch{__[t]=e}return e},eSe=Pr,tSe=Qwe,P_="__core-js_shared__",rSe=eSe[P_]||tSe(P_,{}),TS=rSe,R_=TS;(vF.exports=function(t,e){return R_[t]||(R_[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.33.0",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE",source:"https://github.com/zloirock/core-js"});var Lc=vF.exports,nSe=of,iSe=Object,ki=function(t){return iSe(nSe(t))},oSe=Zt,aSe=ki,sSe=oSe({}.hasOwnProperty),wn=Object.hasOwn||function(e,r){return sSe(aSe(e),r)},lSe=Zt,cSe=0,uSe=Math.random(),dSe=lSe(1 .toString),Ig=function(t){return"Symbol("+(t===void 0?"":t)+")_"+dSe(++cSe+uSe,36)},fSe=Pr,hSe=Lc,N_=wn,vSe=Ig,pSe=Bc,gSe=hF,_l=fSe.Symbol,sb=hSe("wks"),mSe=gSe?_l.for||_l:_l&&_l.withoutSetter||vSe,Lr=function(t){return N_(sb,t)||(sb[t]=pSe&&N_(_l,t)?_l[t]:mSe("Symbol."+t)),sb[t]},ySe=io,M_=Rn,D_=lf,bSe=IS,$Se=Jwe,wSe=Lr,SSe=TypeError,CSe=wSe("toPrimitive"),xSe=function(t,e){if(!M_(t)||D_(t))return t;var r=bSe(t,CSe),n;if(r){if(e===void 0&&(e="default"),n=ySe(r,t,e),!M_(n)||D_(n))return n;throw new SSe("Can't convert object to primitive value")}return e===void 0&&(e="number"),$Se(t,e)},ESe=xSe,OSe=lf,Tg=function(t){var e=ESe(t,"string");return OSe(e)?e:e+""},ISe=Pr,A_=Rn,Z1=ISe.document,TSe=A_(Z1)&&A_(Z1.createElement),pF=function(t){return TSe?Z1.createElement(t):{}},_Se=rn,PSe=Jt,RSe=pF,gF=!_Se&&!PSe(function(){return Object.defineProperty(RSe("div"),"a",{get:function(){return 7}}).a!==7}),NSe=rn,MSe=io,DSe=rf,ASe=nf,jSe=oo,kSe=Tg,BSe=wn,FSe=gF,j_=Object.getOwnPropertyDescriptor;tf.f=NSe?j_:function(e,r){if(e=jSe(e),r=kSe(r),FSe)try{return j_(e,r)}catch{}if(BSe(e,r))return ASe(!MSe(DSe.f,e,r),e[r])};var LSe=Jt,zSe=$n,HSe=/#|\.prototype\./,uf=function(t,e){var r=WSe[VSe(t)];return r===USe?!0:r===KSe?!1:zSe(e)?LSe(e):!!e},VSe=uf.normalize=function(t){return String(t).replace(HSe,".").toLowerCase()},WSe=uf.data={},KSe=uf.NATIVE="N",USe=uf.POLYFILL="P",qSe=uf,k_=OS,GSe=Fc,XSe=ef,YSe=k_(k_.bind),_g=function(t,e){return GSe(t),e===void 0?t:XSe?YSe(t,e):function(){return t.apply(e,arguments)}},wi={},JSe=rn,ZSe=Jt,mF=JSe&&ZSe(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),QSe=Rn,eCe=String,tCe=TypeError,ea=function(t){if(QSe(t))return t;throw new tCe(eCe(t)+" is not an object")},rCe=rn,nCe=gF,iCe=mF,wh=ea,B_=Tg,oCe=TypeError,lb=Object.defineProperty,aCe=Object.getOwnPropertyDescriptor,cb="enumerable",ub="configurable",db="writable";wi.f=rCe?iCe?function(e,r,n){if(wh(e),r=B_(r),wh(n),typeof e=="function"&&r==="prototype"&&"value"in n&&db in n&&!n[db]){var i=aCe(e,r);i&&i[db]&&(e[r]=n.value,n={configurable:ub in n?n[ub]:i[ub],enumerable:cb in n?n[cb]:i[cb],writable:!1})}return lb(e,r,n)}:lb:function(e,r,n){if(wh(e),r=B_(r),wh(n),nCe)try{return lb(e,r,n)}catch{}if("get"in n||"set"in n)throw new oCe("Accessors not supported");return"value"in n&&(e[r]=n.value),e};var sCe=rn,lCe=wi,cCe=nf,zc=sCe?function(t,e,r){return lCe.f(t,e,cCe(1,r))}:function(t,e,r){return t[e]=r,t},Sh=Pr,uCe=Eg,dCe=OS,fCe=$n,hCe=tf.f,vCe=qSe,dl=ir,pCe=_g,fl=zc,F_=wn,gCe=function(t){var e=function(r,n,i){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(r);case 2:return new t(r,n)}return new t(r,n,i)}return uCe(t,this,arguments)};return e.prototype=t.prototype,e},xt=function(t,e){var r=t.target,n=t.global,i=t.stat,o=t.proto,a=n?Sh:i?Sh[r]:(Sh[r]||{}).prototype,s=n?dl:dl[r]||fl(dl,r,{})[r],l=s.prototype,c,u,f,h,v,g,m,p,y;for(h in e)c=vCe(n?h:r+(i?".":"#")+h,t.forced),u=!c&&a&&F_(a,h),g=s[h],u&&(t.dontCallGetSet?(y=hCe(a,h),m=y&&y.value):m=a[h]),v=u&&m?m:e[h],!(u&&typeof g==typeof v)&&(t.bind&&u?p=pCe(v,Sh):t.wrap&&u?p=gCe(v):o&&fCe(v)?p=dCe(v):p=v,(t.sham||v&&v.sham||g&&g.sham)&&fl(p,"sham",!0),fl(s,h,p),o&&(f=r+"Prototype",F_(dl,f)||fl(dl,f,{}),fl(dl[f],h,v),t.real&&l&&(c||!l[h])&&fl(l,h,v)))},mCe=Math.ceil,yCe=Math.floor,bCe=Math.trunc||function(e){var r=+e;return(r>0?yCe:mCe)(r)},$Ce=bCe,Pg=function(t){var e=+t;return e!==e||e===0?0:$Ce(e)},wCe=Pg,SCe=Math.max,CCe=Math.min,df=function(t,e){var r=wCe(t);return r<0?SCe(r+e,0):CCe(r,e)},xCe=Pg,ECe=Math.min,OCe=function(t){return t>0?ECe(xCe(t),9007199254740991):0},ICe=OCe,_o=function(t){return ICe(t.length)},TCe=oo,_Ce=df,PCe=_o,L_=function(t){return function(e,r,n){var i=TCe(e),o=PCe(i),a=_Ce(n,o),s;if(t&&r!==r){for(;o>a;)if(s=i[a++],s!==s)return!0}else for(;o>a;a++)if((t||a in i)&&i[a]===r)return t||a||0;return!t&&-1}},_S={includes:L_(!0),indexOf:L_(!1)},ff={},RCe=Zt,fb=wn,NCe=oo,MCe=_S.indexOf,DCe=ff,z_=RCe([].push),yF=function(t,e){var r=NCe(t),n=0,i=[],o;for(o in r)!fb(DCe,o)&&fb(r,o)&&z_(i,o);for(;e.length>n;)fb(r,o=e[n++])&&(~MCe(i,o)||z_(i,o));return i},PS=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ACe=yF,jCe=PS,hf=Object.keys||function(e){return ACe(e,jCe)},vf={};vf.f=Object.getOwnPropertySymbols;var H_=rn,kCe=Zt,BCe=io,FCe=Jt,hb=hf,LCe=vf,zCe=rf,HCe=ki,VCe=Og,hl=Object.assign,V_=Object.defineProperty,WCe=kCe([].concat),KCe=!hl||FCe(function(){if(H_&&hl({b:1},hl(V_({},"a",{enumerable:!0,get:function(){V_(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return t[r]=7,n.split("").forEach(function(i){e[i]=i}),hl({},t)[r]!==7||hb(hl({},e)).join("")!==n})?function(e,r){for(var n=HCe(e),i=arguments.length,o=1,a=LCe.f,s=zCe.f;i>o;)for(var l=VCe(arguments[o++]),c=a?WCe(hb(l),a(l)):hb(l),u=c.length,f=0,h;u>f;)h=c[f++],(!H_||BCe(s,l,h))&&(n[h]=l[h]);return n}:hl,UCe=xt,W_=KCe;UCe({target:"Object",stat:!0,forced:Object.assign!==W_},{assign:W_});var qCe=ir,GCe=qCe.Object.assign,XCe=GCe,YCe=XCe,JCe=YCe,Ur=Ot(JCe),ZCe=Zt,Rg=ZCe([].slice),bF=Zt,QCe=Fc,exe=Rn,txe=wn,K_=Rg,rxe=ef,$F=Function,nxe=bF([].concat),ixe=bF([].join),vb={},oxe=function(t,e,r){if(!txe(vb,e)){for(var n=[],i=0;i<e;i++)n[i]="a["+i+"]";vb[e]=$F("C,a","return new C("+ixe(n,",")+")")}return vb[e](t,r)},axe=rxe?$F.bind:function(e){var r=QCe(this),n=r.prototype,i=K_(arguments,1),o=function(){var s=nxe(i,K_(arguments));return this instanceof o?oxe(r,s.length,s):r.apply(e,s)};return exe(n)&&(o.prototype=n),o},sxe=xt,U_=axe;sxe({target:"Function",proto:!0,forced:Function.bind!==U_},{bind:U_});var lxe=ir,Sn=function(t){return lxe[t+"Prototype"]},cxe=Sn,uxe=cxe("Function").bind,dxe=Jr,fxe=uxe,pb=Function.prototype,hxe=function(t){var e=t.bind;return t===pb||dxe(pb,t)&&e===pb.bind?fxe:e},vxe=hxe,pxe=vxe,gxe=pxe,je=Ot(gxe);function RS(t,e,r,n){t.beginPath(),t.arc(e,r,n,0,2*Math.PI,!1),t.closePath()}function mxe(t,e,r,n){t.beginPath(),t.rect(e-n,r-n,n*2,n*2),t.closePath()}function yxe(t,e,r,n){t.beginPath(),n*=1.15,r+=.275*n;const i=n*2,o=i/2,a=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,r-(s-a)),t.lineTo(e+o,r+a),t.lineTo(e-o,r+a),t.lineTo(e,r-(s-a)),t.closePath()}function bxe(t,e,r,n){t.beginPath(),n*=1.15,r-=.275*n;const i=n*2,o=i/2,a=Math.sqrt(3)/6*i,s=Math.sqrt(i*i-o*o);t.moveTo(e,r+(s-a)),t.lineTo(e+o,r-a),t.lineTo(e-o,r-a),t.lineTo(e,r+(s-a)),t.closePath()}function $xe(t,e,r,n){t.beginPath(),n*=.82,r+=.1*n;for(let i=0;i<10;i++){const o=i%2===0?n*1.3:n*.5;t.lineTo(e+o*Math.sin(i*2*Math.PI/10),r-o*Math.cos(i*2*Math.PI/10))}t.closePath()}function wxe(t,e,r,n){t.beginPath(),t.lineTo(e,r+n),t.lineTo(e+n,r),t.lineTo(e,r-n),t.lineTo(e-n,r),t.closePath()}function wF(t,e,r,n,i,o){const a=Math.PI/180;n-2*o<0&&(o=n/2),i-2*o<0&&(o=i/2),t.beginPath(),t.moveTo(e+o,r),t.lineTo(e+n-o,r),t.arc(e+n-o,r+o,o,a*270,a*360,!1),t.lineTo(e+n,r+i-o),t.arc(e+n-o,r+i-o,o,0,a*90,!1),t.lineTo(e+o,r+i),t.arc(e+o,r+i-o,o,a*90,a*180,!1),t.lineTo(e,r+o),t.arc(e+o,r+o,o,a*180,a*270,!1),t.closePath()}function Q1(t,e,r,n,i){const o=.5522848,a=n/2*o,s=i/2*o,l=e+n,c=r+i,u=e+n/2,f=r+i/2;t.beginPath(),t.moveTo(e,f),t.bezierCurveTo(e,f-s,u-a,r,u,r),t.bezierCurveTo(u+a,r,l,f-s,l,f),t.bezierCurveTo(l,f+s,u+a,c,u,c),t.bezierCurveTo(u-a,c,e,f+s,e,f),t.closePath()}function SF(t,e,r,n,i){const o=.3333333333333333,a=n,s=i*o,l=.5522848,c=a/2*l,u=s/2*l,f=e+a,h=r+s,v=e+a/2,g=r+s/2,m=r+(i-s/2),p=r+i;t.beginPath(),t.moveTo(f,g),t.bezierCurveTo(f,g+u,v+c,h,v,h),t.bezierCurveTo(v-c,h,e,g+u,e,g),t.bezierCurveTo(e,g-u,v-c,r,v,r),t.bezierCurveTo(v+c,r,f,g-u,f,g),t.lineTo(f,m),t.bezierCurveTo(f,m+u,v+c,p,v,p),t.bezierCurveTo(v-c,p,e,m+u,e,m),t.lineTo(e,g)}function CF(t,e,r,n,i,o){t.beginPath(),t.moveTo(e,r);const a=o.length,s=n-e,l=i-r,c=l/s;let u=Math.sqrt(s*s+l*l),f=0,h=!0,v=0,g=+o[0];for(;u>=.1;)g=+o[f++%a],g>u&&(g=u),v=Math.sqrt(g*g/(1+c*c)),v=s<0?-v:v,e+=v,r+=c*v,h===!0?t.lineTo(e,r):t.moveTo(e,r),u-=g,h=!h}function Sxe(t,e,r,n){t.beginPath();const i=6,o=Math.PI*2/i;t.moveTo(e+n,r);for(let a=1;a<i;a++)t.lineTo(e+n*Math.cos(o*a),r+n*Math.sin(o*a));t.closePath()}const q_={circle:RS,dashedLine:CF,database:SF,diamond:wxe,ellipse:Q1,ellipse_vis:Q1,hexagon:Sxe,roundRect:wF,square:mxe,star:$xe,triangle:yxe,triangleDown:bxe};function Cxe(t){return Object.prototype.hasOwnProperty.call(q_,t)?q_[t]:function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];CanvasRenderingContext2D.prototype[t].call(e,n)}}var xF={exports:{}};(function(t){t.exports=e;function e(n){if(n)return r(n)}function r(n){for(var i in e.prototype)n[i]=e.prototype[i];return n}e.prototype.on=e.prototype.addEventListener=function(n,i){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(i),this},e.prototype.once=function(n,i){function o(){this.off(n,o),i.apply(this,arguments)}return o.fn=i,this.on(n,o),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(n,i){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var o=this._callbacks["$"+n];if(!o)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var a,s=0;s<o.length;s++)if(a=o[s],a===i||a.fn===i){o.splice(s,1);break}return o.length===0&&delete this._callbacks["$"+n],this},e.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var i=new Array(arguments.length-1),o=this._callbacks["$"+n],a=1;a<arguments.length;a++)i[a-1]=arguments[a];if(o){o=o.slice(0);for(var a=0,s=o.length;a<s;++a)o[a].apply(this,i)}return this},e.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]},e.prototype.hasListeners=function(n){return!!this.listeners(n).length}})(xF);var xxe=xF.exports,EF=Ot(xxe),Exe=Qo,Vs=Array.isArray||function(e){return Exe(e)==="Array"},Oxe=TypeError,Ixe=9007199254740991,OF=function(t){if(t>Ixe)throw Oxe("Maximum allowed index exceeded");return t},Txe=Tg,_xe=wi,Pxe=nf,pf=function(t,e,r){var n=Txe(e);n in t?_xe.f(t,n,Pxe(0,r)):t[n]=r},Rxe=Lr,Nxe=Rxe("toStringTag"),IF={};IF[Nxe]="z";var NS=String(IF)==="[object z]",Mxe=NS,Dxe=$n,ov=Qo,Axe=Lr,jxe=Axe("toStringTag"),kxe=Object,Bxe=ov(function(){return arguments}())==="Arguments",Fxe=function(t,e){try{return t[e]}catch{}},Ws=Mxe?ov:function(t){var e,r,n;return t===void 0?"Undefined":t===null?"Null":typeof(r=Fxe(e=kxe(t),jxe))=="string"?r:Bxe?ov(e):(n=ov(e))==="Object"&&Dxe(e.callee)?"Arguments":n},Lxe=Zt,zxe=$n,e$=TS,Hxe=Lxe(Function.toString);zxe(e$.inspectSource)||(e$.inspectSource=function(t){return Hxe(t)});var Vxe=e$.inspectSource,Wxe=Zt,Kxe=Jt,TF=$n,Uxe=Ws,qxe=ao,Gxe=Vxe,_F=function(){},Xxe=[],PF=qxe("Reflect","construct"),MS=/^\s*(?:class|function)\b/,Yxe=Wxe(MS.exec),Jxe=!MS.test(_F),ou=function(e){if(!TF(e))return!1;try{return PF(_F,Xxe,e),!0}catch{return!1}},RF=function(e){if(!TF(e))return!1;switch(Uxe(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Jxe||!!Yxe(MS,Gxe(e))}catch{return!0}};RF.sham=!0;var NF=!PF||Kxe(function(){var t;return ou(ou.call)||!ou(Object)||!ou(function(){t=!0})||t})?RF:ou,G_=Vs,Zxe=NF,Qxe=Rn,eEe=Lr,tEe=eEe("species"),X_=Array,rEe=function(t){var e;return G_(t)&&(e=t.constructor,Zxe(e)&&(e===X_||G_(e.prototype))?e=void 0:Qxe(e)&&(e=e[tEe],e===null&&(e=void 0))),e===void 0?X_:e},nEe=rEe,DS=function(t,e){return new(nEe(t))(e===0?0:e)},iEe=Jt,oEe=Lr,aEe=sf,sEe=oEe("species"),gf=function(t){return aEe>=51||!iEe(function(){var e=[],r=e.constructor={};return r[sEe]=function(){return{foo:1}},e[t](Boolean).foo!==1})},lEe=xt,cEe=Jt,uEe=Vs,dEe=Rn,fEe=ki,hEe=_o,Y_=OF,J_=pf,vEe=DS,pEe=gf,gEe=Lr,mEe=sf,MF=gEe("isConcatSpreadable"),yEe=mEe>=51||!cEe(function(){var t=[];return t[MF]=!1,t.concat()[0]!==t}),bEe=function(t){if(!dEe(t))return!1;var e=t[MF];return e!==void 0?!!e:uEe(t)},$Ee=!yEe||!pEe("concat");lEe({target:"Array",proto:!0,forced:$Ee},{concat:function(e){var r=fEe(this),n=vEe(r,0),i=0,o,a,s,l,c;for(o=-1,s=arguments.length;o<s;o++)if(c=o===-1?r:arguments[o],bEe(c))for(l=hEe(c),Y_(i+l),a=0;a<l;a++,i++)a in c&&J_(n,i,c[a]);else Y_(i+1),J_(n,i++,c);return n.length=i,n}});var wEe=Ws,SEe=String,Po=function(t){if(wEe(t)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return SEe(t)},Ng={},CEe=rn,xEe=mF,EEe=wi,OEe=ea,IEe=oo,TEe=hf;Ng.f=CEe&&!xEe?Object.defineProperties:function(e,r){OEe(e);for(var n=IEe(r),i=TEe(r),o=i.length,a=0,s;o>a;)EEe.f(e,s=i[a++],n[s]);return e};var _Ee=ao,PEe=_Ee("document","documentElement"),REe=Lc,NEe=Ig,Z_=REe("keys"),Mg=function(t){return Z_[t]||(Z_[t]=NEe(t))},MEe=ea,DEe=Ng,Q_=PS,AEe=ff,jEe=PEe,kEe=pF,BEe=Mg,eP=">",tP="<",t$="prototype",r$="script",DF=BEe("IE_PROTO"),gb=function(){},AF=function(t){return tP+r$+eP+t+tP+"/"+r$+eP},rP=function(t){t.write(AF("")),t.close();var e=t.parentWindow.Object;return t=null,e},FEe=function(){var t=kEe("iframe"),e="java"+r$+":",r;return t.style.display="none",jEe.appendChild(t),t.src=String(e),r=t.contentWindow.document,r.open(),r.write(AF("document.F=Object")),r.close(),r.F},Ch,av=function(){try{Ch=new ActiveXObject("htmlfile")}catch{}av=typeof document<"u"?document.domain&&Ch?rP(Ch):FEe():rP(Ch);for(var t=Q_.length;t--;)delete av[t$][Q_[t]];return av()};AEe[DF]=!0;var mf=Object.create||function(e,r){var n;return e!==null?(gb[t$]=MEe(e),n=new gb,gb[t$]=null,n[DF]=e):n=av(),r===void 0?n:DEe.f(n,r)},yf={},LEe=yF,zEe=PS,HEe=zEe.concat("length","prototype");yf.f=Object.getOwnPropertyNames||function(e){return LEe(e,HEe)};var Dg={},nP=df,VEe=_o,WEe=pf,KEe=Array,UEe=Math.max,jF=function(t,e,r){for(var n=VEe(t),i=nP(e,n),o=nP(r===void 0?n:r,n),a=KEe(UEe(o-i,0)),s=0;i<o;i++,s++)WEe(a,s,t[i]);return a.length=s,a},qEe=Qo,GEe=oo,kF=yf.f,XEe=jF,BF=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],YEe=function(t){try{return kF(t)}catch{return XEe(BF)}};Dg.f=function(e){return BF&&qEe(e)==="Window"?YEe(e):kF(GEe(e))};var JEe=zc,bf=function(t,e,r,n){return n&&n.enumerable?t[e]=r:JEe(t,e,r),t},ZEe=wi,AS=function(t,e,r){return ZEe.f(t,e,r)},$f={},QEe=Lr;$f.f=QEe;var iP=ir,eOe=wn,tOe=$f,rOe=wi.f,Rr=function(t){var e=iP.Symbol||(iP.Symbol={});eOe(e,t)||rOe(e,t,{value:tOe.f(t)})},nOe=io,iOe=ao,oOe=Lr,aOe=bf,FF=function(){var t=iOe("Symbol"),e=t&&t.prototype,r=e&&e.valueOf,n=oOe("toPrimitive");e&&!e[n]&&aOe(e,n,function(i){return nOe(r,this)},{})},sOe=NS,lOe=Ws,cOe=sOe?{}.toString:function(){return"[object "+lOe(this)+"]"},uOe=NS,dOe=wi.f,fOe=zc,hOe=wn,vOe=cOe,pOe=Lr,oP=pOe("toStringTag"),Hc=function(t,e,r,n){if(t){var i=r?t:t.prototype;hOe(i,oP)||dOe(i,oP,{configurable:!0,value:e}),n&&!uOe&&fOe(i,"toString",vOe)}},gOe=Pr,mOe=$n,aP=gOe.WeakMap,LF=mOe(aP)&&/native code/.test(String(aP)),yOe=LF,zF=Pr,bOe=Rn,$Oe=zc,mb=wn,yb=TS,wOe=Mg,SOe=ff,sP="Object already initialized",n$=zF.TypeError,COe=zF.WeakMap,Zv,cd,Qv,xOe=function(t){return Qv(t)?cd(t):Zv(t,{})},EOe=function(t){return function(e){var r;if(!bOe(e)||(r=cd(e)).type!==t)throw new n$("Incompatible receiver, "+t+" required");return r}};if(yOe||yb.state){var co=yb.state||(yb.state=new COe);co.get=co.get,co.has=co.has,co.set=co.set,Zv=function(t,e){if(co.has(t))throw new n$(sP);return e.facade=t,co.set(t,e),e},cd=function(t){return co.get(t)||{}},Qv=function(t){return co.has(t)}}else{var vl=wOe("state");SOe[vl]=!0,Zv=function(t,e){if(mb(t,vl))throw new n$(sP);return e.facade=t,$Oe(t,vl,e),e},cd=function(t){return mb(t,vl)?t[vl]:{}},Qv=function(t){return mb(t,vl)}}var Ks={set:Zv,get:cd,has:Qv,enforce:xOe,getterFor:EOe},OOe=_g,IOe=Zt,TOe=Og,_Oe=ki,POe=_o,ROe=DS,lP=IOe([].push),Qa=function(t){var e=t===1,r=t===2,n=t===3,i=t===4,o=t===6,a=t===7,s=t===5||o;return function(l,c,u,f){for(var h=_Oe(l),v=TOe(h),g=OOe(c,u),m=POe(v),p=0,y=f||ROe,b=e?y(l,m):r||a?y(l,0):void 0,$,S;m>p;p++)if((s||p in v)&&($=v[p],S=g($,p,h),t))if(e)b[p]=S;else if(S)switch(t){case 3:return!0;case 5:return $;case 6:return p;case 2:lP(b,$)}else switch(t){case 4:return!1;case 7:lP(b,$)}return o?-1:n||i?i:b}},Wa={forEach:Qa(0),map:Qa(1),filter:Qa(2),some:Qa(3),every:Qa(4),find:Qa(5),findIndex:Qa(6)},Ag=xt,jg=Pr,jS=io,NOe=Zt,ic=rn,oc=Bc,MOe=Jt,sn=wn,DOe=Jr,i$=ea,kg=oo,kS=Tg,AOe=Po,o$=nf,ud=mf,HF=hf,jOe=yf,VF=Dg,kOe=vf,WF=tf,KF=wi,BOe=Ng,UF=rf,cP=bf,FOe=AS,BS=Lc,LOe=Mg,qF=ff,uP=Ig,zOe=Lr,HOe=$f,VOe=Rr,WOe=FF,KOe=Hc,GF=Ks,Bg=Wa.forEach,ei=LOe("hidden"),Fg="Symbol",dd="prototype",UOe=GF.set,dP=GF.getterFor(Fg),qi=Object[dd],ds=jg.Symbol,pu=ds&&ds[dd],qOe=jg.RangeError,GOe=jg.TypeError,bb=jg.QObject,XF=WF.f,fs=KF.f,YF=VF.f,XOe=UF.f,JF=NOe([].push),Xo=BS("symbols"),wf=BS("op-symbols"),YOe=BS("wks"),a$=!bb||!bb[dd]||!bb[dd].findChild,ZF=function(t,e,r){var n=XF(qi,e);n&&delete qi[e],fs(t,e,r),n&&t!==qi&&fs(qi,e,n)},s$=ic&&MOe(function(){return ud(fs({},"a",{get:function(){return fs(this,"a",{value:7}).a}})).a!==7})?ZF:fs,$b=function(t,e){var r=Xo[t]=ud(pu);return UOe(r,{type:Fg,tag:t,description:e}),ic||(r.description=e),r},Lg=function(e,r,n){e===qi&&Lg(wf,r,n),i$(e);var i=kS(r);return i$(n),sn(Xo,i)?(n.enumerable?(sn(e,ei)&&e[ei][i]&&(e[ei][i]=!1),n=ud(n,{enumerable:o$(0,!1)})):(sn(e,ei)||fs(e,ei,o$(1,{})),e[ei][i]=!0),s$(e,i,n)):fs(e,i,n)},FS=function(e,r){i$(e);var n=kg(r),i=HF(n).concat(rL(n));return Bg(i,function(o){(!ic||jS(QF,n,o))&&Lg(e,o,n[o])}),e},JOe=function(e,r){return r===void 0?ud(e):FS(ud(e),r)},QF=function(e){var r=kS(e),n=jS(XOe,this,r);return this===qi&&sn(Xo,r)&&!sn(wf,r)?!1:n||!sn(this,r)||!sn(Xo,r)||sn(this,ei)&&this[ei][r]?n:!0},eL=function(e,r){var n=kg(e),i=kS(r);if(!(n===qi&&sn(Xo,i)&&!sn(wf,i))){var o=XF(n,i);return o&&sn(Xo,i)&&!(sn(n,ei)&&n[ei][i])&&(o.enumerable=!0),o}},tL=function(e){var r=YF(kg(e)),n=[];return Bg(r,function(i){!sn(Xo,i)&&!sn(qF,i)&&JF(n,i)}),n},rL=function(t){var e=t===qi,r=YF(e?wf:kg(t)),n=[];return Bg(r,function(i){sn(Xo,i)&&(!e||sn(qi,i))&&JF(n,Xo[i])}),n};oc||(ds=function(){if(DOe(pu,this))throw new GOe("Symbol is not a constructor");var e=!arguments.length||arguments[0]===void 0?void 0:AOe(arguments[0]),r=uP(e),n=function(i){this===qi&&jS(n,wf,i),sn(this,ei)&&sn(this[ei],r)&&(this[ei][r]=!1);var o=o$(1,i);try{s$(this,r,o)}catch(a){if(!(a instanceof qOe))throw a;ZF(this,r,o)}};return ic&&a$&&s$(qi,r,{configurable:!0,set:n}),$b(r,e)},pu=ds[dd],cP(pu,"toString",function(){return dP(this).tag}),cP(ds,"withoutSetter",function(t){return $b(uP(t),t)}),UF.f=QF,KF.f=Lg,BOe.f=FS,WF.f=eL,jOe.f=VF.f=tL,kOe.f=rL,HOe.f=function(t){return $b(zOe(t),t)},ic&&FOe(pu,"description",{configurable:!0,get:function(){return dP(this).description}}));Ag({global:!0,wrap:!0,forced:!oc,sham:!oc},{Symbol:ds});Bg(HF(YOe),function(t){VOe(t)});Ag({target:Fg,stat:!0,forced:!oc},{useSetter:function(){a$=!0},useSimple:function(){a$=!1}});Ag({target:"Object",stat:!0,forced:!oc,sham:!ic},{create:JOe,defineProperty:Lg,defineProperties:FS,getOwnPropertyDescriptor:eL});Ag({target:"Object",stat:!0,forced:!oc},{getOwnPropertyNames:tL});WOe();KOe(ds,Fg);qF[ei]=!0;var ZOe=Bc,nL=ZOe&&!!Symbol.for&&!!Symbol.keyFor,QOe=xt,eIe=ao,tIe=wn,rIe=Po,iL=Lc,nIe=nL,wb=iL("string-to-symbol-registry"),iIe=iL("symbol-to-string-registry");QOe({target:"Symbol",stat:!0,forced:!nIe},{for:function(t){var e=rIe(t);if(tIe(wb,e))return wb[e];var r=eIe("Symbol")(e);return wb[e]=r,iIe[r]=e,r}});var oIe=xt,aIe=wn,sIe=lf,lIe=cf,cIe=Lc,uIe=nL,fP=cIe("symbol-to-string-registry");oIe({target:"Symbol",stat:!0,forced:!uIe},{keyFor:function(e){if(!sIe(e))throw new TypeError(lIe(e)+" is not a symbol");if(aIe(fP,e))return fP[e]}});var dIe=Zt,hP=Vs,fIe=$n,vP=Qo,hIe=Po,pP=dIe([].push),vIe=function(t){if(fIe(t))return t;if(hP(t)){for(var e=t.length,r=[],n=0;n<e;n++){var i=t[n];typeof i=="string"?pP(r,i):(typeof i=="number"||vP(i)==="Number"||vP(i)==="String")&&pP(r,hIe(i))}var o=r.length,a=!0;return function(s,l){if(a)return a=!1,l;if(hP(this))return l;for(var c=0;c<o;c++)if(r[c]===s)return l}}},pIe=xt,oL=ao,aL=Eg,gIe=io,Sf=Zt,sL=Jt,gP=$n,mP=lf,lL=Rg,mIe=vIe,yIe=Bc,bIe=String,Ca=oL("JSON","stringify"),xh=Sf(/./.exec),yP=Sf("".charAt),$Ie=Sf("".charCodeAt),wIe=Sf("".replace),SIe=Sf(1 .toString),CIe=/[\uD800-\uDFFF]/g,bP=/^[\uD800-\uDBFF]$/,$P=/^[\uDC00-\uDFFF]$/,wP=!yIe||sL(function(){var t=oL("Symbol")("stringify detection");return Ca([t])!=="[null]"||Ca({a:t})!=="{}"||Ca(Object(t))!=="{}"}),SP=sL(function(){return Ca("\uDF06\uD834")!=='"\\udf06\\ud834"'||Ca("\uDEAD")!=='"\\udead"'}),xIe=function(t,e){var r=lL(arguments),n=mIe(e);if(!(!gP(n)&&(t===void 0||mP(t))))return r[1]=function(i,o){if(gP(n)&&(o=gIe(n,this,bIe(i),o)),!mP(o))return o},aL(Ca,null,r)},EIe=function(t,e,r){var n=yP(r,e-1),i=yP(r,e+1);return xh(bP,t)&&!xh($P,i)||xh($P,t)&&!xh(bP,n)?"\\u"+SIe($Ie(t,0),16):t};Ca&&pIe({target:"JSON",stat:!0,forced:wP||SP},{stringify:function(e,r,n){var i=lL(arguments),o=aL(wP?xIe:Ca,null,i);return SP&&typeof o=="string"?wIe(o,CIe,EIe):o}});var OIe=xt,IIe=Bc,TIe=Jt,cL=vf,_Ie=ki,PIe=!IIe||TIe(function(){cL.f(1)});OIe({target:"Object",stat:!0,forced:PIe},{getOwnPropertySymbols:function(e){var r=cL.f;return r?r(_Ie(e)):[]}});var RIe=Rr;RIe("asyncIterator");var NIe=Rr;NIe("hasInstance");var MIe=Rr;MIe("isConcatSpreadable");var DIe=Rr;DIe("iterator");var AIe=Rr;AIe("match");var jIe=Rr;jIe("matchAll");var kIe=Rr;kIe("replace");var BIe=Rr;BIe("search");var FIe=Rr;FIe("species");var LIe=Rr;LIe("split");var zIe=Rr,HIe=FF;zIe("toPrimitive");HIe();var VIe=ao,WIe=Rr,KIe=Hc;WIe("toStringTag");KIe(VIe("Symbol"),"Symbol");var UIe=Rr;UIe("unscopables");var qIe=Pr,GIe=Hc;GIe(qIe.JSON,"JSON",!0);var XIe=ir,YIe=XIe.Symbol,Vc={},l$=rn,JIe=wn,uL=Function.prototype,ZIe=l$&&Object.getOwnPropertyDescriptor,dL=JIe(uL,"name"),QIe=dL&&function(){}.name==="something";dL&&(!l$||l$&&ZIe(uL,"name").configurable);var eTe={PROPER:QIe},tTe=Jt,fL=!tTe(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),rTe=wn,nTe=$n,iTe=ki,oTe=Mg,aTe=fL,CP=oTe("IE_PROTO"),c$=Object,sTe=c$.prototype,zg=aTe?c$.getPrototypeOf:function(t){var e=iTe(t);if(rTe(e,CP))return e[CP];var r=e.constructor;return nTe(r)&&e instanceof r?r.prototype:e instanceof c$?sTe:null},lTe=Jt,cTe=$n,uTe=Rn,dTe=mf,xP=zg,fTe=bf,hTe=Lr,u$=hTe("iterator"),hL=!1,zo,Sb,Cb;[].keys&&(Cb=[].keys(),"next"in Cb?(Sb=xP(xP(Cb)),Sb!==Object.prototype&&(zo=Sb)):hL=!0);var vTe=!uTe(zo)||lTe(function(){var t={};return zo[u$].call(t)!==t});vTe?zo={}:zo=dTe(zo);cTe(zo[u$])||fTe(zo,u$,function(){return this});var vL={IteratorPrototype:zo,BUGGY_SAFARI_ITERATORS:hL},pTe=vL.IteratorPrototype,gTe=mf,mTe=nf,yTe=Hc,bTe=Vc,$Te=function(){return this},wTe=function(t,e,r,n){var i=e+" Iterator";return t.prototype=gTe(pTe,{next:mTe(+!n,r)}),yTe(t,i,!1,!0),bTe[i]=$Te,t},STe=xt,CTe=io,xTe=eTe,ETe=wTe,OTe=zg,ITe=Hc,EP=bf,TTe=Lr,OP=Vc,_Te=vL,PTe=xTe.PROPER,Eh=_Te.BUGGY_SAFARI_ITERATORS,xb=TTe("iterator"),IP="keys",Oh="values",TP="entries",RTe=function(){return this},LS=function(t,e,r,n,i,o,a){ETe(r,e,n);var s=function(y){if(y===i&&h)return h;if(!Eh&&y&&y in u)return u[y];switch(y){case IP:return function(){return new r(this,y)};case Oh:return function(){return new r(this,y)};case TP:return function(){return new r(this,y)}}return function(){return new r(this)}},l=e+" Iterator",c=!1,u=t.prototype,f=u[xb]||u["@@iterator"]||i&&u[i],h=!Eh&&f||s(i),v=e==="Array"&&u.entries||f,g,m,p;if(v&&(g=OTe(v.call(new t)),g!==Object.prototype&&g.next&&(ITe(g,l,!0,!0),OP[l]=RTe)),PTe&&i===Oh&&f&&f.name!==Oh&&(c=!0,h=function(){return CTe(f,this)}),i)if(m={values:s(Oh),keys:o?h:s(IP),entries:s(TP)},a)for(p in m)(Eh||c||!(p in u))&&EP(u,p,m[p]);else STe({target:e,proto:!0,forced:Eh||c},m);return a&&u[xb]!==h&&EP(u,xb,h,{}),OP[e]=h,m},zS=function(t,e){return{value:t,done:e}},NTe=oo,_P=Vc,pL=Ks;wi.f;var MTe=LS,Ih=zS,gL="Array Iterator",DTe=pL.set,ATe=pL.getterFor(gL);MTe(Array,"Array",function(t,e){DTe(this,{type:gL,target:NTe(t),index:0,kind:e})},function(){var t=ATe(this),e=t.target,r=t.kind,n=t.index++;if(!e||n>=e.length)return t.target=void 0,Ih(void 0,!0);switch(r){case"keys":return Ih(n,!1);case"values":return Ih(e[n],!1)}return Ih([n,e[n]],!1)},"values");_P.Arguments=_P.Array;var jTe={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},kTe=jTe,BTe=Pr,FTe=Ws,LTe=zc,PP=Vc,zTe=Lr,RP=zTe("toStringTag");for(var Eb in kTe){var NP=BTe[Eb],Ob=NP&&NP.prototype;Ob&&FTe(Ob)!==RP&&LTe(Ob,RP,Eb),PP[Eb]=PP.Array}var HTe=YIe,mL=HTe,VTe=mL,WTe=Ot(VTe),KTe=xt,MP=Vs,UTe=NF,qTe=Rn,DP=df,GTe=_o,XTe=oo,YTe=pf,JTe=Lr,ZTe=gf,QTe=Rg,e_e=ZTe("slice"),t_e=JTe("species"),Ib=Array,r_e=Math.max;KTe({target:"Array",proto:!0,forced:!e_e},{slice:function(e,r){var n=XTe(this),i=GTe(n),o=DP(e,i),a=DP(r===void 0?i:r,i),s,l,c;if(MP(n)&&(s=n.constructor,UTe(s)&&(s===Ib||MP(s.prototype))?s=void 0:qTe(s)&&(s=s[t_e],s===null&&(s=void 0)),s===Ib||s===void 0))return QTe(n,o,a);for(l=new(s===void 0?Ib:s)(r_e(a-o,0)),c=0;o<a;o++,c++)o in n&&YTe(l,c,n[o]);return l.length=c,l}});var n_e=Sn,i_e=n_e("Array").slice,o_e=Jr,a_e=i_e,Tb=Array.prototype,s_e=function(t){var e=t.slice;return t===Tb||o_e(Tb,t)&&e===Tb.slice?a_e:e},l_e=s_e,c_e=l_e,u_e=c_e,ho=Ot(u_e),d_e=ao,f_e=Zt,h_e=yf,v_e=vf,p_e=ea,g_e=f_e([].concat),m_e=d_e("Reflect","ownKeys")||function(e){var r=h_e.f(p_e(e)),n=v_e.f;return n?g_e(r,n(e)):r},y_e=xt,b_e=Vs;y_e({target:"Array",stat:!0},{isArray:b_e});var $_e=ir,w_e=$_e.Array.isArray,S_e=w_e,C_e=S_e,x_e=C_e,Ir=Ot(x_e),E_e=xt,O_e=Wa.map,I_e=gf,T_e=I_e("map");E_e({target:"Array",proto:!0,forced:!T_e},{map:function(e){return O_e(this,e,arguments.length>1?arguments[1]:void 0)}});var __e=Sn,P_e=__e("Array").map,R_e=Jr,N_e=P_e,_b=Array.prototype,M_e=function(t){var e=t.map;return t===_b||R_e(_b,t)&&e===_b.map?N_e:e},D_e=M_e,A_e=D_e,j_e=A_e,ac=Ot(j_e),k_e=xt,B_e=ki,yL=hf,F_e=Jt,L_e=F_e(function(){yL(1)});k_e({target:"Object",stat:!0,forced:L_e},{keys:function(e){return yL(B_e(e))}});var z_e=ir,H_e=z_e.Object.keys,V_e=H_e,W_e=V_e,K_e=W_e,Or=Ot(K_e),U_e=xt,q_e=Zt,bL=Date,G_e=q_e(bL.prototype.getTime);U_e({target:"Date",stat:!0},{now:function(){return G_e(new bL)}});var X_e=ir,Y_e=X_e.Date.now,J_e=Y_e,Z_e=J_e,Q_e=Z_e,ep=Ot(Q_e),ePe=Jt,Wc=function(t,e){var r=[][t];return!!r&&ePe(function(){r.call(null,e||function(){return 1},1)})},tPe=Wa.forEach,rPe=Wc,nPe=rPe("forEach"),iPe=nPe?[].forEach:function(e){return tPe(this,e,arguments.length>1?arguments[1]:void 0)},oPe=xt,AP=iPe;oPe({target:"Array",proto:!0,forced:[].forEach!==AP},{forEach:AP});var aPe=Sn,sPe=aPe("Array").forEach,lPe=sPe,cPe=lPe,uPe=Ws,dPe=wn,fPe=Jr,hPe=cPe,Pb=Array.prototype,vPe={DOMTokenList:!0,NodeList:!0},pPe=function(t){var e=t.forEach;return t===Pb||fPe(Pb,t)&&e===Pb.forEach||dPe(vPe,uPe(t))?hPe:e},gPe=pPe,lr=Ot(gPe),mPe=xt,yPe=Zt,bPe=Vs,$Pe=yPe([].reverse),jP=[1,2];mPe({target:"Array",proto:!0,forced:String(jP)===String(jP.reverse())},{reverse:function(){return bPe(this)&&(this.length=this.length),$Pe(this)}});var wPe=Sn,SPe=wPe("Array").reverse,CPe=Jr,xPe=SPe,Rb=Array.prototype,EPe=function(t){var e=t.reverse;return t===Rb||CPe(Rb,t)&&e===Rb.reverse?xPe:e},OPe=EPe,IPe=OPe,TPe=IPe,hs=Ot(TPe),_Pe=rn,PPe=Vs,RPe=TypeError,NPe=Object.getOwnPropertyDescriptor,MPe=_Pe&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}(),DPe=MPe?function(t,e){if(PPe(t)&&!NPe(t,"length").writable)throw new RPe("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e},kP=cf,APe=TypeError,$L=function(t,e){if(!delete t[e])throw new APe("Cannot delete property "+kP(e)+" of "+kP(t))},jPe=xt,kPe=ki,BPe=df,FPe=Pg,LPe=_o,zPe=DPe,HPe=OF,VPe=DS,WPe=pf,Nb=$L,KPe=gf,UPe=KPe("splice"),qPe=Math.max,GPe=Math.min;jPe({target:"Array",proto:!0,forced:!UPe},{splice:function(e,r){var n=kPe(this),i=LPe(n),o=BPe(e,i),a=arguments.length,s,l,c,u,f,h;for(a===0?s=l=0:a===1?(s=0,l=i-o):(s=a-2,l=GPe(qPe(FPe(r),0),i-o)),HPe(i+s-l),c=VPe(n,l),u=0;u<l;u++)f=o+u,f in n&&WPe(c,u,n[f]);if(c.length=l,s<l){for(u=o;u<i-l;u++)f=u+l,h=u+s,f in n?n[h]=n[f]:Nb(n,h);for(u=i;u>i-l+s;u--)Nb(n,u-1)}else if(s>l)for(u=i-l;u>o;u--)f=u+l-1,h=u+s-1,f in n?n[h]=n[f]:Nb(n,h);for(u=0;u<s;u++)n[u+o]=arguments[u+2];return zPe(n,i-l+s),c}});var XPe=Sn,YPe=XPe("Array").splice,JPe=Jr,ZPe=YPe,Mb=Array.prototype,QPe=function(t){var e=t.splice;return t===Mb||JPe(Mb,t)&&e===Mb.splice?ZPe:e},e2e=QPe,t2e=e2e,r2e=t2e,Ho=Ot(r2e),n2e=xt,i2e=_S.includes,o2e=Jt,a2e=o2e(function(){return!Array(1).includes()});n2e({target:"Array",proto:!0,forced:a2e},{includes:function(e){return i2e(this,e,arguments.length>1?arguments[1]:void 0)}});var s2e=Sn,l2e=s2e("Array").includes,c2e=Rn,u2e=Qo,d2e=Lr,f2e=d2e("match"),h2e=function(t){var e;return c2e(t)&&((e=t[f2e])!==void 0?!!e:u2e(t)==="RegExp")},v2e=h2e,p2e=TypeError,g2e=function(t){if(v2e(t))throw new p2e("The method doesn't accept regular expressions");return t},m2e=Lr,y2e=m2e("match"),b2e=function(t){var e=/./;try{"/./"[t](e)}catch{try{return e[y2e]=!1,"/./"[t](e)}catch{}}return!1},$2e=xt,w2e=Zt,S2e=g2e,C2e=of,BP=Po,x2e=b2e,E2e=w2e("".indexOf);$2e({target:"String",proto:!0,forced:!x2e("includes")},{includes:function(e){return!!~E2e(BP(C2e(this)),BP(S2e(e)),arguments.length>1?arguments[1]:void 0)}});var O2e=Sn,I2e=O2e("String").includes,FP=Jr,T2e=l2e,_2e=I2e,Db=Array.prototype,Ab=String.prototype,P2e=function(t){var e=t.includes;return t===Db||FP(Db,t)&&e===Db.includes?T2e:typeof t=="string"||t===Ab||FP(Ab,t)&&e===Ab.includes?_2e:e},R2e=P2e,N2e=R2e,M2e=N2e,xa=Ot(M2e),D2e=xt,A2e=Jt,j2e=ki,wL=zg,k2e=fL,B2e=A2e(function(){wL(1)});D2e({target:"Object",stat:!0,forced:B2e,sham:!k2e},{getPrototypeOf:function(e){return wL(j2e(e))}});var F2e=ir,L2e=F2e.Object.getPrototypeOf,z2e=L2e,H2e=z2e,V2e=H2e,LP=Ot(V2e),W2e=Sn,K2e=W2e("Array").concat,U2e=Jr,q2e=K2e,jb=Array.prototype,G2e=function(t){var e=t.concat;return t===jb||U2e(jb,t)&&e===jb.concat?q2e:e},X2e=G2e,Y2e=X2e,J2e=Y2e,Z2e=Ot(J2e),Q2e=xt,eRe=Wa.filter,tRe=gf,rRe=tRe("filter");Q2e({target:"Array",proto:!0,forced:!rRe},{filter:function(e){return eRe(this,e,arguments.length>1?arguments[1]:void 0)}});var nRe=Sn,iRe=nRe("Array").filter,oRe=Jr,aRe=iRe,kb=Array.prototype,sRe=function(t){var e=t.filter;return t===kb||oRe(kb,t)&&e===kb.filter?aRe:e},lRe=sRe,cRe=lRe,uRe=cRe,ti=Ot(uRe),SL=rn,dRe=Jt,CL=Zt,fRe=zg,hRe=hf,vRe=oo,pRe=rf.f,xL=CL(pRe),gRe=CL([].push),mRe=SL&&dRe(function(){var t=Object.create(null);return t[2]=2,!xL(t,2)}),yRe=function(t){return function(e){for(var r=vRe(e),n=hRe(r),i=mRe&&fRe(r)===null,o=n.length,a=0,s=[],l;o>a;)l=n[a++],(!SL||(i?l in r:xL(r,l)))&&gRe(s,t?[l,r[l]]:r[l]);return s}},bRe={values:yRe(!1)},$Re=xt,wRe=bRe.values;$Re({target:"Object",stat:!0},{values:function(e){return wRe(e)}});var SRe=ir,CRe=SRe.Object.values,xRe=CRe,ERe=xRe,ORe=ERe,IRe=Ot(ORe),HS=`	
\v\f\r                　\u2028\u2029\uFEFF`,TRe=Zt,_Re=of,PRe=Po,d$=HS,zP=TRe("".replace),RRe=RegExp("^["+d$+"]+"),NRe=RegExp("(^|[^"+d$+"])["+d$+"]+$"),MRe=function(t){return function(e){var r=PRe(_Re(e));return t&1&&(r=zP(r,RRe,"")),t&2&&(r=zP(r,NRe,"$1")),r}},EL={trim:MRe(3)},OL=Pr,DRe=Jt,ARe=Zt,jRe=Po,kRe=EL.trim,HP=HS,_u=OL.parseInt,VP=OL.Symbol,WP=VP&&VP.iterator,IL=/^[+-]?0x/i,BRe=ARe(IL.exec),FRe=_u(HP+"08")!==8||_u(HP+"0x16")!==22||WP&&!DRe(function(){_u(Object(WP))}),LRe=FRe?function(e,r){var n=kRe(jRe(e));return _u(n,r>>>0||(BRe(IL,n)?16:10))}:_u,zRe=xt,KP=LRe;zRe({global:!0,forced:parseInt!==KP},{parseInt:KP});var HRe=ir,VRe=HRe.parseInt,WRe=VRe,KRe=WRe,URe=KRe,Wi=Ot(URe),qRe=xt,GRe=OS,XRe=_S.indexOf,YRe=Wc,f$=GRe([].indexOf),TL=!!f$&&1/f$([1],1,-0)<0,JRe=TL||!YRe("indexOf");qRe({target:"Array",proto:!0,forced:JRe},{indexOf:function(e){var r=arguments.length>1?arguments[1]:void 0;return TL?f$(this,e,r)||0:XRe(this,e,r)}});var ZRe=Sn,QRe=ZRe("Array").indexOf,eNe=Jr,tNe=QRe,Bb=Array.prototype,rNe=function(t){var e=t.indexOf;return t===Bb||eNe(Bb,t)&&e===Bb.indexOf?tNe:e},nNe=rNe,iNe=nNe,oNe=iNe,Gt=Ot(oNe),aNe=xt,sNe=rn,lNe=mf;aNe({target:"Object",stat:!0,sham:!sNe},{create:lNe});var cNe=ir,uNe=cNe.Object,dNe=function(e,r){return uNe.create(e,r)},fNe=dNe,hNe=fNe,vNe=hNe,vs=Ot(vNe),h$=ir,pNe=Eg;h$.JSON||(h$.JSON={stringify:JSON.stringify});var gNe=function(e,r,n){return pNe(h$.JSON.stringify,null,arguments)},mNe=gNe,yNe=mNe,bNe=yNe,Cf=Ot(bNe),$Ne=typeof Bun=="function"&&Bun&&typeof Bun.version=="string",wNe=TypeError,SNe=function(t,e){if(t<e)throw new wNe("Not enough arguments");return t},_L=Pr,CNe=Eg,xNe=$n,ENe=$Ne,ONe=af,INe=Rg,TNe=SNe,_Ne=_L.Function,PNe=/MSIE .\./.test(ONe)||ENe&&function(){var t=_L.Bun.version.split(".");return t.length<3||t[0]==="0"&&(t[1]<3||t[1]==="3"&&t[2]==="0")}(),PL=function(t,e){var r=e?2:1;return PNe?function(n,i){var o=TNe(arguments.length,1)>r,a=xNe(n)?n:_Ne(n),s=o?INe(arguments,r):[],l=o?function(){CNe(a,this,s)}:a;return e?t(l,i):t(l)}:t},RNe=xt,RL=Pr,NNe=PL,UP=NNe(RL.setInterval,!0);RNe({global:!0,bind:!0,forced:RL.setInterval!==UP},{setInterval:UP});var MNe=xt,NL=Pr,DNe=PL,qP=DNe(NL.setTimeout,!0);MNe({global:!0,bind:!0,forced:NL.setTimeout!==qP},{setTimeout:qP});var ANe=ir,jNe=ANe.setTimeout,kNe=jNe,$o=Ot(kNe),BNe=ki,GP=df,FNe=_o,LNe=function(e){for(var r=BNe(this),n=FNe(r),i=arguments.length,o=GP(i>1?arguments[1]:void 0,n),a=i>2?arguments[2]:void 0,s=a===void 0?n:GP(a,n);s>o;)r[o++]=e;return r},zNe=xt,HNe=LNe;zNe({target:"Array",proto:!0},{fill:HNe});var VNe=Sn,WNe=VNe("Array").fill,KNe=Jr,UNe=WNe,Fb=Array.prototype,qNe=function(t){var e=t.fill;return t===Fb||KNe(Fb,t)&&e===Fb.fill?UNe:e},GNe=qNe,XNe=GNe,YNe=XNe,xf=Ot(YNe);/*! Hammer.JS - v2.0.17-rc - 2019-12-16
 * http://naver.github.io/egjs
 *
 * Forked By Naver egjs
 * Copyright (c) hammerjs
 * Licensed under the MIT license */function to(){return to=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},to.apply(this,arguments)}function Bi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function Th(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var v$;typeof Object.assign!="function"?v$=function(e){if(e==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];if(i!=null)for(var o in i)i.hasOwnProperty(o)&&(r[o]=i[o])}return r}:v$=Object.assign;var Is=v$,XP=["","webkit","Moz","MS","ms","o"],JNe=typeof document>"u"?{style:{}}:document.createElement("div"),ZNe="function",Pl=Math.round,Ts=Math.abs,VS=Date.now;function Hg(t,e){for(var r,n,i=e[0].toUpperCase()+e.slice(1),o=0;o<XP.length;){if(r=XP[o],n=r?r+i:e,n in t)return n;o++}}var Vo;typeof window>"u"?Vo={}:Vo=window;var ML=Hg(JNe.style,"touchAction"),DL=ML!==void 0;function QNe(){if(!DL)return!1;var t={},e=Vo.CSS&&Vo.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(r){return t[r]=e?Vo.CSS.supports("touch-action",r):!0}),t}var AL="compute",jL="auto",p$="manipulation",ps="none",fd="pan-x",hd="pan-y",_h=QNe(),eMe=/mobile|tablet|ip(ad|hone|od)|android/i,kL="ontouchstart"in Vo,tMe=Hg(Vo,"PointerEvent")!==void 0,rMe=kL&&eMe.test(navigator.userAgent),Ef="touch",nMe="pen",WS="mouse",iMe="kinect",oMe=25,Ln=1,Us=2,qr=4,ni=8,tp=1,Of=2,If=4,Tf=8,sc=16,wo=Of|If,gs=Tf|sc,BL=wo|gs,FL=["x","y"],rp=["clientX","clientY"];function Wo(t,e,r){var n;if(t)if(t.forEach)t.forEach(e,r);else if(t.length!==void 0)for(n=0;n<t.length;)e.call(r,t[n],n,t),n++;else for(n in t)t.hasOwnProperty(n)&&e.call(r,t[n],n,t)}function Vg(t,e){return typeof t===ZNe?t.apply(e&&e[0]||void 0,e):t}function is(t,e){return t.indexOf(e)>-1}function aMe(t){if(is(t,ps))return ps;var e=is(t,fd),r=is(t,hd);return e&&r?ps:e||r?e?fd:hd:is(t,p$)?p$:jL}var LL=function(){function t(r,n){this.manager=r,this.set(n)}var e=t.prototype;return e.set=function(n){n===AL&&(n=this.compute()),DL&&this.manager.element.style&&_h[n]&&(this.manager.element.style[ML]=n),this.actions=n.toLowerCase().trim()},e.update=function(){this.set(this.manager.options.touchAction)},e.compute=function(){var n=[];return Wo(this.manager.recognizers,function(i){Vg(i.options.enable,[i])&&(n=n.concat(i.getTouchAction()))}),aMe(n.join(" "))},e.preventDefaults=function(n){var i=n.srcEvent,o=n.offsetDirection;if(this.manager.session.prevented){i.preventDefault();return}var a=this.actions,s=is(a,ps)&&!_h[ps],l=is(a,hd)&&!_h[hd],c=is(a,fd)&&!_h[fd];if(s){var u=n.pointers.length===1,f=n.distance<2,h=n.deltaTime<250;if(u&&f&&h)return}if(!(c&&l)&&(s||l&&o&wo||c&&o&gs))return this.preventSrc(i)},e.preventSrc=function(n){this.manager.session.prevented=!0,n.preventDefault()},t}();function KS(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}function zL(t){var e=t.length;if(e===1)return{x:Pl(t[0].clientX),y:Pl(t[0].clientY)};for(var r=0,n=0,i=0;i<e;)r+=t[i].clientX,n+=t[i].clientY,i++;return{x:Pl(r/e),y:Pl(n/e)}}function YP(t){for(var e=[],r=0;r<t.pointers.length;)e[r]={clientX:Pl(t.pointers[r].clientX),clientY:Pl(t.pointers[r].clientY)},r++;return{timeStamp:VS(),pointers:e,center:zL(e),deltaX:t.deltaX,deltaY:t.deltaY}}function np(t,e,r){r||(r=FL);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.sqrt(n*n+i*i)}function g$(t,e,r){r||(r=FL);var n=e[r[0]]-t[r[0]],i=e[r[1]]-t[r[1]];return Math.atan2(i,n)*180/Math.PI}function HL(t,e){return t===e?tp:Ts(t)>=Ts(e)?t<0?Of:If:e<0?Tf:sc}function sMe(t,e){var r=e.center,n=t.offsetDelta||{},i=t.prevDelta||{},o=t.prevInput||{};(e.eventType===Ln||o.eventType===qr)&&(i=t.prevDelta={x:o.deltaX||0,y:o.deltaY||0},n=t.offsetDelta={x:r.x,y:r.y}),e.deltaX=i.x+(r.x-n.x),e.deltaY=i.y+(r.y-n.y)}function VL(t,e,r){return{x:e/t||0,y:r/t||0}}function lMe(t,e){return np(e[0],e[1],rp)/np(t[0],t[1],rp)}function cMe(t,e){return g$(e[1],e[0],rp)+g$(t[1],t[0],rp)}function uMe(t,e){var r=t.lastInterval||e,n=e.timeStamp-r.timeStamp,i,o,a,s;if(e.eventType!==ni&&(n>oMe||r.velocity===void 0)){var l=e.deltaX-r.deltaX,c=e.deltaY-r.deltaY,u=VL(n,l,c);o=u.x,a=u.y,i=Ts(u.x)>Ts(u.y)?u.x:u.y,s=HL(l,c),t.lastInterval=e}else i=r.velocity,o=r.velocityX,a=r.velocityY,s=r.direction;e.velocity=i,e.velocityX=o,e.velocityY=a,e.direction=s}function dMe(t,e){var r=t.session,n=e.pointers,i=n.length;r.firstInput||(r.firstInput=YP(e)),i>1&&!r.firstMultiple?r.firstMultiple=YP(e):i===1&&(r.firstMultiple=!1);var o=r.firstInput,a=r.firstMultiple,s=a?a.center:o.center,l=e.center=zL(n);e.timeStamp=VS(),e.deltaTime=e.timeStamp-o.timeStamp,e.angle=g$(s,l),e.distance=np(s,l),sMe(r,e),e.offsetDirection=HL(e.deltaX,e.deltaY);var c=VL(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=c.x,e.overallVelocityY=c.y,e.overallVelocity=Ts(c.x)>Ts(c.y)?c.x:c.y,e.scale=a?lMe(a.pointers,n):1,e.rotation=a?cMe(a.pointers,n):0,e.maxPointers=r.prevInput?e.pointers.length>r.prevInput.maxPointers?e.pointers.length:r.prevInput.maxPointers:e.pointers.length,uMe(r,e);var u=t.element,f=e.srcEvent,h;f.composedPath?h=f.composedPath()[0]:f.path?h=f.path[0]:h=f.target,KS(h,u)&&(u=h),e.target=u}function fMe(t,e,r){var n=r.pointers.length,i=r.changedPointers.length,o=e&Ln&&n-i===0,a=e&(qr|ni)&&n-i===0;r.isFirst=!!o,r.isFinal=!!a,o&&(t.session={}),r.eventType=e,dMe(t,r),t.emit("hammer.input",r),t.recognize(r),t.session.prevInput=r}function vd(t){return t.trim().split(/\s+/g)}function Pu(t,e,r){Wo(vd(e),function(n){t.addEventListener(n,r,!1)})}function Ru(t,e,r){Wo(vd(e),function(n){t.removeEventListener(n,r,!1)})}function JP(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow||window}var Kc=function(){function t(r,n){var i=this;this.manager=r,this.callback=n,this.element=r.element,this.target=r.options.inputTarget,this.domHandler=function(o){Vg(r.options.enable,[r])&&i.handler(o)},this.init()}var e=t.prototype;return e.handler=function(){},e.init=function(){this.evEl&&Pu(this.element,this.evEl,this.domHandler),this.evTarget&&Pu(this.target,this.evTarget,this.domHandler),this.evWin&&Pu(JP(this.element),this.evWin,this.domHandler)},e.destroy=function(){this.evEl&&Ru(this.element,this.evEl,this.domHandler),this.evTarget&&Ru(this.target,this.evTarget,this.domHandler),this.evWin&&Ru(JP(this.element),this.evWin,this.domHandler)},t}();function _s(t,e,r){if(t.indexOf&&!r)return t.indexOf(e);for(var n=0;n<t.length;){if(r&&t[n][r]==e||!r&&t[n]===e)return n;n++}return-1}var hMe={pointerdown:Ln,pointermove:Us,pointerup:qr,pointercancel:ni,pointerout:ni},vMe={2:Ef,3:nMe,4:WS,5:iMe},WL="pointerdown",KL="pointermove pointerup pointercancel";Vo.MSPointerEvent&&!Vo.PointerEvent&&(WL="MSPointerDown",KL="MSPointerMove MSPointerUp MSPointerCancel");var UL=function(t){Bi(e,t);function e(){var n,i=e.prototype;return i.evEl=WL,i.evWin=KL,n=t.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var r=e.prototype;return r.handler=function(i){var o=this.store,a=!1,s=i.type.toLowerCase().replace("ms",""),l=hMe[s],c=vMe[i.pointerType]||i.pointerType,u=c===Ef,f=_s(o,i.pointerId,"pointerId");l&Ln&&(i.button===0||u)?f<0&&(o.push(i),f=o.length-1):l&(qr|ni)&&(a=!0),!(f<0)&&(o[f]=i,this.callback(this.manager,l,{pointers:o,changedPointers:[i],pointerType:c,srcEvent:i}),a&&o.splice(f,1))},e}(Kc);function pd(t){return Array.prototype.slice.call(t,0)}function US(t,e,r){for(var n=[],i=[],o=0;o<t.length;){var a=e?t[o][e]:t[o];_s(i,a)<0&&n.push(t[o]),i[o]=a,o++}return r&&(e?n=n.sort(function(s,l){return s[e]>l[e]}):n=n.sort()),n}var pMe={touchstart:Ln,touchmove:Us,touchend:qr,touchcancel:ni},gMe="touchstart touchmove touchend touchcancel",qS=function(t){Bi(e,t);function e(){var n;return e.prototype.evTarget=gMe,n=t.apply(this,arguments)||this,n.targetIds={},n}var r=e.prototype;return r.handler=function(i){var o=pMe[i.type],a=mMe.call(this,i,o);a&&this.callback(this.manager,o,{pointers:a[0],changedPointers:a[1],pointerType:Ef,srcEvent:i})},e}(Kc);function mMe(t,e){var r=pd(t.touches),n=this.targetIds;if(e&(Ln|Us)&&r.length===1)return n[r[0].identifier]=!0,[r,r];var i,o,a=pd(t.changedTouches),s=[],l=this.target;if(o=r.filter(function(c){return KS(c.target,l)}),e===Ln)for(i=0;i<o.length;)n[o[i].identifier]=!0,i++;for(i=0;i<a.length;)n[a[i].identifier]&&s.push(a[i]),e&(qr|ni)&&delete n[a[i].identifier],i++;if(s.length)return[US(o.concat(s),"identifier",!0),s]}var yMe={mousedown:Ln,mousemove:Us,mouseup:qr},bMe="mousedown",$Me="mousemove mouseup",GS=function(t){Bi(e,t);function e(){var n,i=e.prototype;return i.evEl=bMe,i.evWin=$Me,n=t.apply(this,arguments)||this,n.pressed=!1,n}var r=e.prototype;return r.handler=function(i){var o=yMe[i.type];o&Ln&&i.button===0&&(this.pressed=!0),o&Us&&i.which!==1&&(o=qr),this.pressed&&(o&qr&&(this.pressed=!1),this.callback(this.manager,o,{pointers:[i],changedPointers:[i],pointerType:WS,srcEvent:i}))},e}(Kc),wMe=2500,ZP=25;function QP(t){var e=t.changedPointers,r=e[0];if(r.identifier===this.primaryTouch){var n={x:r.clientX,y:r.clientY},i=this.lastTouches;this.lastTouches.push(n);var o=function(){var s=i.indexOf(n);s>-1&&i.splice(s,1)};setTimeout(o,wMe)}}function SMe(t,e){t&Ln?(this.primaryTouch=e.changedPointers[0].identifier,QP.call(this,e)):t&(qr|ni)&&QP.call(this,e)}function CMe(t){for(var e=t.srcEvent.clientX,r=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var i=this.lastTouches[n],o=Math.abs(e-i.x),a=Math.abs(r-i.y);if(o<=ZP&&a<=ZP)return!0}return!1}var qL=function(){var t=function(e){Bi(r,e);function r(i,o){var a;return a=e.call(this,i,o)||this,a.handler=function(s,l,c){var u=c.pointerType===Ef,f=c.pointerType===WS;if(!(f&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(u)SMe.call(Th(Th(a)),l,c);else if(f&&CMe.call(Th(Th(a)),c))return;a.callback(s,l,c)}},a.touch=new qS(a.manager,a.handler),a.mouse=new GS(a.manager,a.handler),a.primaryTouch=null,a.lastTouches=[],a}var n=r.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},r}(Kc);return t}();function xMe(t){var e,r=t.options.inputClass;return r?e=r:tMe?e=UL:rMe?e=qS:kL?e=qL:e=GS,new e(t,fMe)}function Rl(t,e,r){return Array.isArray(t)?(Wo(t,r[e],r),!0):!1}var sv=1,Ni=2,lc=4,Ea=8,Ko=Ea,gd=16,po=32,EMe=1;function OMe(){return EMe++}function Ph(t,e){var r=e.manager;return r?r.get(t):t}function e2(t){return t&gd?"cancel":t&Ea?"end":t&lc?"move":t&Ni?"start":""}var _f=function(){function t(r){r===void 0&&(r={}),this.options=to({enable:!0},r),this.id=OMe(),this.manager=null,this.state=sv,this.simultaneous={},this.requireFail=[]}var e=t.prototype;return e.set=function(n){return Is(this.options,n),this.manager&&this.manager.touchAction.update(),this},e.recognizeWith=function(n){if(Rl(n,"recognizeWith",this))return this;var i=this.simultaneous;return n=Ph(n,this),i[n.id]||(i[n.id]=n,n.recognizeWith(this)),this},e.dropRecognizeWith=function(n){return Rl(n,"dropRecognizeWith",this)?this:(n=Ph(n,this),delete this.simultaneous[n.id],this)},e.requireFailure=function(n){if(Rl(n,"requireFailure",this))return this;var i=this.requireFail;return n=Ph(n,this),_s(i,n)===-1&&(i.push(n),n.requireFailure(this)),this},e.dropRequireFailure=function(n){if(Rl(n,"dropRequireFailure",this))return this;n=Ph(n,this);var i=_s(this.requireFail,n);return i>-1&&this.requireFail.splice(i,1),this},e.hasRequireFailures=function(){return this.requireFail.length>0},e.canRecognizeWith=function(n){return!!this.simultaneous[n.id]},e.emit=function(n){var i=this,o=this.state;function a(s){i.manager.emit(s,n)}o<Ea&&a(i.options.event+e2(o)),a(i.options.event),n.additionalEvent&&a(n.additionalEvent),o>=Ea&&a(i.options.event+e2(o))},e.tryEmit=function(n){if(this.canEmit())return this.emit(n);this.state=po},e.canEmit=function(){for(var n=0;n<this.requireFail.length;){if(!(this.requireFail[n].state&(po|sv)))return!1;n++}return!0},e.recognize=function(n){var i=Is({},n);if(!Vg(this.options.enable,[this,i])){this.reset(),this.state=po;return}this.state&(Ko|gd|po)&&(this.state=sv),this.state=this.process(i),this.state&(Ni|lc|Ea|gd)&&this.tryEmit(i)},e.process=function(n){},e.getTouchAction=function(){},e.reset=function(){},t}(),m$=function(t){Bi(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,to({event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},n))||this,i.pTime=!1,i.pCenter=!1,i._timer=null,i._input=null,i.count=0,i}var r=e.prototype;return r.getTouchAction=function(){return[p$]},r.process=function(i){var o=this,a=this.options,s=i.pointers.length===a.pointers,l=i.distance<a.threshold,c=i.deltaTime<a.time;if(this.reset(),i.eventType&Ln&&this.count===0)return this.failTimeout();if(l&&c&&s){if(i.eventType!==qr)return this.failTimeout();var u=this.pTime?i.timeStamp-this.pTime<a.interval:!0,f=!this.pCenter||np(this.pCenter,i.center)<a.posThreshold;this.pTime=i.timeStamp,this.pCenter=i.center,!f||!u?this.count=1:this.count+=1,this._input=i;var h=this.count%a.taps;if(h===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){o.state=Ko,o.tryEmit()},a.interval),Ni):Ko}return po},r.failTimeout=function(){var i=this;return this._timer=setTimeout(function(){i.state=po},this.options.interval),po},r.reset=function(){clearTimeout(this._timer)},r.emit=function(){this.state===Ko&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},e}(_f),cc=function(t){Bi(e,t);function e(n){return n===void 0&&(n={}),t.call(this,to({pointers:1},n))||this}var r=e.prototype;return r.attrTest=function(i){var o=this.options.pointers;return o===0||i.pointers.length===o},r.process=function(i){var o=this.state,a=i.eventType,s=o&(Ni|lc),l=this.attrTest(i);return s&&(a&ni||!l)?o|gd:s||l?a&qr?o|Ea:o&Ni?o|lc:Ni:po},e}(_f);function GL(t){return t===sc?"down":t===Tf?"up":t===Of?"left":t===If?"right":""}var XS=function(t){Bi(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,to({event:"pan",threshold:10,pointers:1,direction:BL},n))||this,i.pX=null,i.pY=null,i}var r=e.prototype;return r.getTouchAction=function(){var i=this.options.direction,o=[];return i&wo&&o.push(hd),i&gs&&o.push(fd),o},r.directionTest=function(i){var o=this.options,a=!0,s=i.distance,l=i.direction,c=i.deltaX,u=i.deltaY;return l&o.direction||(o.direction&wo?(l=c===0?tp:c<0?Of:If,a=c!==this.pX,s=Math.abs(i.deltaX)):(l=u===0?tp:u<0?Tf:sc,a=u!==this.pY,s=Math.abs(i.deltaY))),i.direction=l,a&&s>o.threshold&&l&o.direction},r.attrTest=function(i){return cc.prototype.attrTest.call(this,i)&&(this.state&Ni||!(this.state&Ni)&&this.directionTest(i))},r.emit=function(i){this.pX=i.deltaX,this.pY=i.deltaY;var o=GL(i.direction);o&&(i.additionalEvent=this.options.event+o),t.prototype.emit.call(this,i)},e}(cc),XL=function(t){Bi(e,t);function e(n){return n===void 0&&(n={}),t.call(this,to({event:"swipe",threshold:10,velocity:.3,direction:wo|gs,pointers:1},n))||this}var r=e.prototype;return r.getTouchAction=function(){return XS.prototype.getTouchAction.call(this)},r.attrTest=function(i){var o=this.options.direction,a;return o&(wo|gs)?a=i.overallVelocity:o&wo?a=i.overallVelocityX:o&gs&&(a=i.overallVelocityY),t.prototype.attrTest.call(this,i)&&o&i.offsetDirection&&i.distance>this.options.threshold&&i.maxPointers===this.options.pointers&&Ts(a)>this.options.velocity&&i.eventType&qr},r.emit=function(i){var o=GL(i.offsetDirection);o&&this.manager.emit(this.options.event+o,i),this.manager.emit(this.options.event,i)},e}(cc),YL=function(t){Bi(e,t);function e(n){return n===void 0&&(n={}),t.call(this,to({event:"pinch",threshold:0,pointers:2},n))||this}var r=e.prototype;return r.getTouchAction=function(){return[ps]},r.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.scale-1)>this.options.threshold||this.state&Ni)},r.emit=function(i){if(i.scale!==1){var o=i.scale<1?"in":"out";i.additionalEvent=this.options.event+o}t.prototype.emit.call(this,i)},e}(cc),JL=function(t){Bi(e,t);function e(n){return n===void 0&&(n={}),t.call(this,to({event:"rotate",threshold:0,pointers:2},n))||this}var r=e.prototype;return r.getTouchAction=function(){return[ps]},r.attrTest=function(i){return t.prototype.attrTest.call(this,i)&&(Math.abs(i.rotation)>this.options.threshold||this.state&Ni)},e}(cc),ZL=function(t){Bi(e,t);function e(n){var i;return n===void 0&&(n={}),i=t.call(this,to({event:"press",pointers:1,time:251,threshold:9},n))||this,i._timer=null,i._input=null,i}var r=e.prototype;return r.getTouchAction=function(){return[jL]},r.process=function(i){var o=this,a=this.options,s=i.pointers.length===a.pointers,l=i.distance<a.threshold,c=i.deltaTime>a.time;if(this._input=i,!l||!s||i.eventType&(qr|ni)&&!c)this.reset();else if(i.eventType&Ln)this.reset(),this._timer=setTimeout(function(){o.state=Ko,o.tryEmit()},a.time);else if(i.eventType&qr)return Ko;return po},r.reset=function(){clearTimeout(this._timer)},r.emit=function(i){this.state===Ko&&(i&&i.eventType&qr?this.manager.emit(this.options.event+"up",i):(this._input.timeStamp=VS(),this.manager.emit(this.options.event,this._input)))},e}(_f),QL={domEvents:!1,touchAction:AL,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}},t2=[[JL,{enable:!1}],[YL,{enable:!1},["rotate"]],[XL,{direction:wo}],[XS,{direction:wo},["swipe"]],[m$],[m$,{event:"doubletap",taps:2},["tap"]],[ZL]],IMe=1,r2=2;function n2(t,e){var r=t.element;if(r.style){var n;Wo(t.options.cssProps,function(i,o){n=Hg(r.style,o),e?(t.oldCssProps[n]=r.style[n],r.style[n]=i):r.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function TMe(t,e){var r=document.createEvent("Event");r.initEvent(t,!0,!0),r.gesture=e,e.target.dispatchEvent(r)}var i2=function(){function t(r,n){var i=this;this.options=Is({},QL,n||{}),this.options.inputTarget=this.options.inputTarget||r,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=r,this.input=xMe(this),this.touchAction=new LL(this,this.options.touchAction),n2(this,!0),Wo(this.options.recognizers,function(o){var a=i.add(new o[0](o[1]));o[2]&&a.recognizeWith(o[2]),o[3]&&a.requireFailure(o[3])},this)}var e=t.prototype;return e.set=function(n){return Is(this.options,n),n.touchAction&&this.touchAction.update(),n.inputTarget&&(this.input.destroy(),this.input.target=n.inputTarget,this.input.init()),this},e.stop=function(n){this.session.stopped=n?r2:IMe},e.recognize=function(n){var i=this.session;if(!i.stopped){this.touchAction.preventDefaults(n);var o,a=this.recognizers,s=i.curRecognizer;(!s||s&&s.state&Ko)&&(i.curRecognizer=null,s=null);for(var l=0;l<a.length;)o=a[l],i.stopped!==r2&&(!s||o===s||o.canRecognizeWith(s))?o.recognize(n):o.reset(),!s&&o.state&(Ni|lc|Ea)&&(i.curRecognizer=o,s=o),l++}},e.get=function(n){if(n instanceof _f)return n;for(var i=this.recognizers,o=0;o<i.length;o++)if(i[o].options.event===n)return i[o];return null},e.add=function(n){if(Rl(n,"add",this))return this;var i=this.get(n.options.event);return i&&this.remove(i),this.recognizers.push(n),n.manager=this,this.touchAction.update(),n},e.remove=function(n){if(Rl(n,"remove",this))return this;var i=this.get(n);if(n){var o=this.recognizers,a=_s(o,i);a!==-1&&(o.splice(a,1),this.touchAction.update())}return this},e.on=function(n,i){if(n===void 0||i===void 0)return this;var o=this.handlers;return Wo(vd(n),function(a){o[a]=o[a]||[],o[a].push(i)}),this},e.off=function(n,i){if(n===void 0)return this;var o=this.handlers;return Wo(vd(n),function(a){i?o[a]&&o[a].splice(_s(o[a],i),1):delete o[a]}),this},e.emit=function(n,i){this.options.domEvents&&TMe(n,i);var o=this.handlers[n]&&this.handlers[n].slice();if(!(!o||!o.length)){i.type=n,i.preventDefault=function(){i.srcEvent.preventDefault()};for(var a=0;a<o.length;)o[a](i),a++}},e.destroy=function(){this.element&&n2(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},t}(),_Me={touchstart:Ln,touchmove:Us,touchend:qr,touchcancel:ni},PMe="touchstart",RMe="touchstart touchmove touchend touchcancel",NMe=function(t){Bi(e,t);function e(){var n,i=e.prototype;return i.evTarget=PMe,i.evWin=RMe,n=t.apply(this,arguments)||this,n.started=!1,n}var r=e.prototype;return r.handler=function(i){var o=_Me[i.type];if(o===Ln&&(this.started=!0),!!this.started){var a=MMe.call(this,i,o);o&(qr|ni)&&a[0].length-a[1].length===0&&(this.started=!1),this.callback(this.manager,o,{pointers:a[0],changedPointers:a[1],pointerType:Ef,srcEvent:i})}},e}(Kc);function MMe(t,e){var r=pd(t.touches),n=pd(t.changedTouches);return e&(qr|ni)&&(r=US(r.concat(n),"identifier",!0)),[r,n]}function ez(t,e,r){var n="DEPRECATED METHOD: "+e+`
`+r+` AT 
`;return function(){var i=new Error("get-stack-trace"),o=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,n,o),t.apply(this,arguments)}}var tz=ez(function(t,e,r){for(var n=Object.keys(e),i=0;i<n.length;)(!r||r&&t[n[i]]===void 0)&&(t[n[i]]=e[n[i]]),i++;return t},"extend","Use `assign`."),DMe=ez(function(t,e){return tz(t,e,!0)},"merge","Use `assign`.");function AMe(t,e,r){var n=e.prototype,i;i=t.prototype=Object.create(n),i.constructor=t,i._super=n,r&&Is(i,r)}function o2(t,e){return function(){return t.apply(e,arguments)}}var rz=function(){var t=function(r,n){return n===void 0&&(n={}),new i2(r,to({recognizers:t2.concat()},n))};return t.VERSION="2.0.17-rc",t.DIRECTION_ALL=BL,t.DIRECTION_DOWN=sc,t.DIRECTION_LEFT=Of,t.DIRECTION_RIGHT=If,t.DIRECTION_UP=Tf,t.DIRECTION_HORIZONTAL=wo,t.DIRECTION_VERTICAL=gs,t.DIRECTION_NONE=tp,t.DIRECTION_DOWN=sc,t.INPUT_START=Ln,t.INPUT_MOVE=Us,t.INPUT_END=qr,t.INPUT_CANCEL=ni,t.STATE_POSSIBLE=sv,t.STATE_BEGAN=Ni,t.STATE_CHANGED=lc,t.STATE_ENDED=Ea,t.STATE_RECOGNIZED=Ko,t.STATE_CANCELLED=gd,t.STATE_FAILED=po,t.Manager=i2,t.Input=Kc,t.TouchAction=LL,t.TouchInput=qS,t.MouseInput=GS,t.PointerEventInput=UL,t.TouchMouseInput=qL,t.SingleTouchInput=NMe,t.Recognizer=_f,t.AttrRecognizer=cc,t.Tap=m$,t.Pan=XS,t.Swipe=XL,t.Pinch=YL,t.Rotate=JL,t.Press=ZL,t.on=Pu,t.off=Ru,t.each=Wo,t.merge=DMe,t.extend=tz,t.bindFn=o2,t.assign=Is,t.inherit=AMe,t.bindFn=o2,t.prefixed=Hg,t.toArray=pd,t.inArray=_s,t.uniqueArray=US,t.splitStr=vd,t.boolOrFn=Vg,t.hasParent=KS,t.addEventListeners=Pu,t.removeEventListeners=Ru,t.defaults=Is({},QL,{preset:t2}),t}();rz.defaults;var jMe=rz;WTe("DELETE");function Wg(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return kMe(e.length?e:[ep()])}function kMe(t){let[e,r,n]=BMe(t),i=1;const o=()=>{const a=2091639*e+i*23283064365386963e-26;return e=r,r=n,n=a-(i=a|0)};return o.uint32=()=>o()*4294967296,o.fract53=()=>o()+(o()*2097152|0)*11102230246251565e-32,o.algorithm="Alea",o.seed=t,o.version="0.9",o}function BMe(){const t=FMe();let e=t(" "),r=t(" "),n=t(" ");for(let i=0;i<arguments.length;i++)e-=t(i<0||arguments.length<=i?void 0:arguments[i]),e<0&&(e+=1),r-=t(i<0||arguments.length<=i?void 0:arguments[i]),r<0&&(r+=1),n-=t(i<0||arguments.length<=i?void 0:arguments[i]),n<0&&(n+=1);return[e,r,n]}function FMe(){let t=4022871197;return function(e){const r=e.toString();for(let n=0;n<r.length;n++){t+=r.charCodeAt(n);let i=.02519603282416938*t;t=i>>>0,i-=t,i*=t,t=i>>>0,i-=t,t+=i*4294967296}return(t>>>0)*23283064365386963e-26}}function LMe(){const t=()=>{};return{on:t,off:t,destroy:t,emit:t,get(){return{set:t}}}}const YS=typeof window<"u"?window.Hammer||jMe:function(){return LMe()};function go(t){var e;this._cleanupQueue=[],this.active=!1,this._dom={container:t,overlay:document.createElement("div")},this._dom.overlay.classList.add("vis-overlay"),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});const r=YS(this._dom.overlay);r.on("tap",je(e=this._onTapOverlay).call(e,this)),this._cleanupQueue.push(()=>{r.destroy()});const n=["tap","doubletap","press","pinch","pan","panstart","panmove","panend"];lr(n).call(n,i=>{r.on(i,o=>{o.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=i=>{zMe(i.target,t)||this.deactivate()},document.body.addEventListener("click",this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener("click",this._onClick)})),this._escListener=i=>{("key"in i?i.key==="Escape":i.keyCode===27)&&this.deactivate()}}EF(go.prototype);go.current=null;go.prototype.destroy=function(){this.deactivate();for(const r of hs(t=Ho(e=this._cleanupQueue).call(e,0)).call(t)){var t,e;r()}};go.prototype.activate=function(){go.current&&go.current.deactivate(),go.current=this,this.active=!0,this._dom.overlay.style.display="none",this._dom.container.classList.add("vis-active"),this.emit("change"),this.emit("activate"),document.body.addEventListener("keydown",this._escListener)};go.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display="block",this._dom.container.classList.remove("vis-active"),document.body.removeEventListener("keydown",this._escListener),this.emit("change"),this.emit("deactivate")};go.prototype._onTapOverlay=function(t){this.activate(),t.srcEvent.stopPropagation()};function zMe(t,e){for(;t;){if(t===e)return!0;t=t.parentNode}return!1}const HMe=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,VMe=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,WMe=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,KMe=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function ca(t){if(t)for(;t.hasChildNodes()===!0;){const e=t.firstChild;e&&(ca(e),t.removeChild(e))}}function Bl(t){return t instanceof String||typeof t=="string"}function a2(t){return typeof t=="object"&&t!==null}function Ps(t,e,r,n){let i=!1;n===!0&&(i=e[r]===null&&t[r]!==void 0),i?delete t[r]:t[r]=e[r]}function nz(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;for(const n in t)if(e[n]!==void 0)if(e[n]===null||typeof e[n]!="object")Ps(t,e,n,r);else{const i=t[n],o=e[n];a2(i)&&a2(o)&&nz(i,o,r)}}function Uc(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ir(r))throw new TypeError("Arrays are not supported by deepExtend");for(let i=0;i<t.length;i++){const o=t[i];if(Object.prototype.hasOwnProperty.call(r,o))if(r[o]&&r[o].constructor===Object)e[o]===void 0&&(e[o]={}),e[o].constructor===Object?ur(e[o],r[o],!1,n):Ps(e,r,o,n);else{if(Ir(r[o]))throw new TypeError("Arrays are not supported by deepExtend");Ps(e,r,o,n)}}return e}function ip(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(Ir(r))throw new TypeError("Arrays are not supported by deepExtend");for(const i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&!xa(t).call(t,i))if(r[i]&&r[i].constructor===Object)e[i]===void 0&&(e[i]={}),e[i].constructor===Object?ur(e[i],r[i]):Ps(e,r,i,n);else if(Ir(r[i])){e[i]=[];for(let o=0;o<r[i].length;o++)e[i].push(r[i][o])}else Ps(e,r,i,n);return e}function ur(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)||r===!0)if(typeof e[o]=="object"&&e[o]!==null&&LP(e[o])===Object.prototype)t[o]===void 0?t[o]=ur({},e[o],r):typeof t[o]=="object"&&t[o]!==null&&LP(t[o])===Object.prototype?ur(t[o],e[o],r):Ps(t,e,o,n);else if(Ir(e[o])){var i;t[o]=ho(i=e[o]).call(i)}else Ps(t,e,o,n);return t}function op(t,e){return[...t,e]}function UMe(t){return ho(t).call(t)}function qMe(t){return t.getBoundingClientRect().left}function GMe(t){return t.getBoundingClientRect().top}function At(t,e){if(Ir(t)){const r=t.length;for(let n=0;n<r;n++)e(t[n],n,t)}else for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&e(t[r],r,t)}function JS(t){let e;switch(t.length){case 3:case 4:return e=VMe.exec(t),e?{r:Wi(e[1]+e[1],16),g:Wi(e[2]+e[2],16),b:Wi(e[3]+e[3],16)}:null;case 6:case 7:return e=HMe.exec(t),e?{r:Wi(e[1],16),g:Wi(e[2],16),b:Wi(e[3],16)}:null;default:return null}}function _i(t,e){if(xa(t).call(t,"rgba"))return t;if(xa(t).call(t,"rgb")){const r=t.substr(Gt(t).call(t,"(")+1).replace(")","").split(",");return"rgba("+r[0]+","+r[1]+","+r[2]+","+e+")"}else{const r=JS(t);return r==null?t:"rgba("+r.r+","+r.g+","+r.b+","+e+")"}}function iz(t,e,r){var n;return"#"+ho(n=((1<<24)+(t<<16)+(e<<8)+r).toString(16)).call(n,1)}function y$(t,e){if(Bl(t)){let n=t;if(az(n)){var r;const i=ac(r=n.substr(4).substr(0,n.length-5).split(",")).call(r,function(o){return Wi(o)});n=iz(i[0],i[1],i[2])}if(oz(n)===!0){const i=XMe(n),o={h:i.h,s:i.s*.8,v:Math.min(1,i.v*1.02)},a={h:i.h,s:Math.min(1,i.s*1.25),v:i.v*.8},s=b$(a.h,a.s,a.v),l=b$(o.h,o.s,o.v);return{background:n,border:s,highlight:{background:l,border:s},hover:{background:l,border:s}}}else return{background:n,border:n,highlight:{background:n,border:n},hover:{background:n,border:n}}}else return{background:t.background||void 0,border:t.border||void 0,highlight:Bl(t.highlight)?{border:t.highlight,background:t.highlight}:{background:t.highlight&&t.highlight.background||void 0,border:t.highlight&&t.highlight.border||void 0},hover:Bl(t.hover)?{border:t.hover,background:t.hover}:{border:t.hover&&t.hover.border||void 0,background:t.hover&&t.hover.background||void 0}}}function gu(t,e,r){t=t/255,e=e/255,r=r/255;const n=Math.min(t,Math.min(e,r)),i=Math.max(t,Math.max(e,r));if(n===i)return{h:0,s:0,v:n};const o=t===n?e-r:r===n?t-e:r-t,s=60*((t===n?3:r===n?1:5)-o/(i-n))/360,l=(i-n)/i;return{h:s,s:l,v:i}}function lv(t,e,r){let n,i,o;const a=Math.floor(t*6),s=t*6-a,l=r*(1-e),c=r*(1-s*e),u=r*(1-(1-s)*e);switch(a%6){case 0:n=r,i=u,o=l;break;case 1:n=c,i=r,o=l;break;case 2:n=l,i=r,o=u;break;case 3:n=l,i=c,o=r;break;case 4:n=u,i=l,o=r;break;case 5:n=r,i=l,o=c;break}return{r:Math.floor(n*255),g:Math.floor(i*255),b:Math.floor(o*255)}}function b$(t,e,r){const n=lv(t,e,r);return iz(n.r,n.g,n.b)}function XMe(t){const e=JS(t);if(!e)throw new TypeError("'".concat(t,"' is not a valid color."));return gu(e.r,e.g,e.b)}function oz(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(t)}function az(t){return WMe.test(t)}function YMe(t){return KMe.test(t)}function Oa(t){if(t===null||typeof t!="object")return null;if(t instanceof Element)return t;const e=vs(t);for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&typeof t[r]=="object"&&(e[r]=Oa(t[r]));return e}function Ti(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=function(v){return v!=null},o=function(v){return v!==null&&typeof v=="object"},a=function(v){for(const g in v)if(Object.prototype.hasOwnProperty.call(v,g))return!1;return!0};if(!o(t))throw new Error("Parameter mergeTarget must be an object");if(!o(e))throw new Error("Parameter options must be an object");if(!i(r))throw new Error("Parameter option must have a value");if(!o(n))throw new Error("Parameter globalOptions must be an object");const s=function(v,g,m){o(v[m])||(v[m]={});const p=g[m],y=v[m];for(const b in p)Object.prototype.hasOwnProperty.call(p,b)&&(y[b]=p[b])},l=e[r],u=o(n)&&!a(n)?n[r]:void 0,f=u?u.enabled:void 0;if(l===void 0)return;if(typeof l=="boolean"){o(t[r])||(t[r]={}),t[r].enabled=l;return}if(l===null&&!o(t[r]))if(i(u))t[r]=vs(u);else return;if(!o(l))return;let h=!0;l.enabled!==void 0?h=l.enabled:f!==void 0&&(h=u.enabled),s(t,e,r),t[r].enabled=h}const JMe={linear(t){return t},easeInQuad(t){return t*t},easeOutQuad(t){return t*(2-t)},easeInOutQuad(t){return t<.5?2*t*t:-1+(4-2*t)*t},easeInCubic(t){return t*t*t},easeOutCubic(t){return--t*t*t+1},easeInOutCubic(t){return t<.5?4*t*t*t:(t-1)*(2*t-2)*(2*t-2)+1},easeInQuart(t){return t*t*t*t},easeOutQuart(t){return 1- --t*t*t*t},easeInOutQuart(t){return t<.5?8*t*t*t*t:1-8*--t*t*t*t},easeInQuint(t){return t*t*t*t*t},easeOutQuint(t){return 1+--t*t*t*t*t},easeInOutQuint(t){return t<.5?16*t*t*t*t*t:1+16*--t*t*t*t*t}};function ua(t,e){let r;Ir(e)||(e=[e]);for(const n of t)if(n){r=n[e[0]];for(let i=1;i<e.length;i++)r&&(r=r[e[i]]);if(typeof r<"u")break}return r}const ZMe={black:"#000000",navy:"#000080",darkblue:"#00008B",mediumblue:"#0000CD",blue:"#0000FF",darkgreen:"#006400",green:"#008000",teal:"#008080",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",lime:"#00FF00",springgreen:"#00FF7F",aqua:"#00FFFF",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",mediumaquamarine:"#66CDAA",dimgray:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",lightslategray:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",maroon:"#800000",purple:"#800080",olive:"#808000",gray:"#808080",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370D8",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",silver:"#C0C0C0",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgrey:"#D3D3D3",palevioletred:"#D87093",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",red:"#FF0000",fuchsia:"#FF00FF",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",yellow:"#FFFF00",lightyellow:"#FFFFE0",ivory:"#FFFFF0",white:"#FFFFFF"};let QMe=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e=="function")this.updateCallback=e;else throw new Error("Function attempted to set as colorPicker update callback is not a function.")}setCloseCallback(e){if(typeof e=="function")this.closeCallback=e;else throw new Error("Function attempted to set as colorPicker closing callback is not a function.")}_isColorString(e){if(typeof e=="string")return ZMe[e]}setColor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e==="none")return;let n;const i=this._isColorString(e);if(i!==void 0&&(e=i),Bl(e)===!0){if(az(e)===!0){const o=e.substr(4).substr(0,e.length-5).split(",");n={r:o[0],g:o[1],b:o[2],a:1}}else if(YMe(e)===!0){const o=e.substr(5).substr(0,e.length-6).split(",");n={r:o[0],g:o[1],b:o[2],a:o[3]}}else if(oz(e)===!0){const o=JS(e);n={r:o.r,g:o.g,b:o.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){const o=e.a!==void 0?e.a:"1.0";n={r:e.r,g:e.g,b:e.b,a:o}}if(n===void 0)throw new Error("Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: "+Cf(e));this._setColor(n,r)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display="block",this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=Ur({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display="none",$o(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor!==void 0?this.setColor(this.previousColor,!1):alert("There is no last color to load...")}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=Ur({},e)),this.color=e;const n=gu(e.r,e.g,e.b),i=2*Math.PI,o=this.r*n.s,a=this.centerCoordinates.x+o*Math.sin(i*n.h),s=this.centerCoordinates.y+o*Math.cos(i*n.h);this.colorPickerSelector.style.left=a-.5*this.colorPickerSelector.clientWidth+"px",this.colorPickerSelector.style.top=s-.5*this.colorPickerSelector.clientHeight+"px",this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){const r=gu(this.color.r,this.color.g,this.color.b);r.v=e/100;const n=lv(r.h,r.s,r.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color;const r=gu(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const i=this.colorPickerCanvas.clientWidth,o=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,i,o),n.putImageData(this.hueCircle,0,0),n.fillStyle="rgba(0,0,0,"+(1-r.v)+")",n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),xf(n).call(n),this.brightnessRange.value=100*r.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}_setSize(){this.colorPickerCanvas.style.width="100%",this.colorPickerCanvas.style.height="100%",this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,r,n,i;if(this.frame=document.createElement("div"),this.frame.className="vis-color-picker",this.colorPickerDiv=document.createElement("div"),this.colorPickerSelector=document.createElement("div"),this.colorPickerSelector.className="vis-selector",this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement("canvas"),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){const a=this.colorPickerCanvas.getContext("2d");this.pixelRatio=(window.devicePixelRatio||1)/(a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1),this.colorPickerCanvas.getContext("2d").setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{const a=document.createElement("DIV");a.style.color="red",a.style.fontWeight="bold",a.style.padding="10px",a.innerText="Error: your browser does not support HTML canvas",this.colorPickerCanvas.appendChild(a)}this.colorPickerDiv.className="vis-color",this.opacityDiv=document.createElement("div"),this.opacityDiv.className="vis-opacity",this.brightnessDiv=document.createElement("div"),this.brightnessDiv.className="vis-brightness",this.arrowDiv=document.createElement("div"),this.arrowDiv.className="vis-arrow",this.opacityRange=document.createElement("input");try{this.opacityRange.type="range",this.opacityRange.min="0",this.opacityRange.max="100"}catch{}this.opacityRange.value="100",this.opacityRange.className="vis-range",this.brightnessRange=document.createElement("input");try{this.brightnessRange.type="range",this.brightnessRange.min="0",this.brightnessRange.max="100"}catch{}this.brightnessRange.value="100",this.brightnessRange.className="vis-range",this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);const o=this;this.opacityRange.onchange=function(){o._setOpacity(this.value)},this.opacityRange.oninput=function(){o._setOpacity(this.value)},this.brightnessRange.onchange=function(){o._setBrightness(this.value)},this.brightnessRange.oninput=function(){o._setBrightness(this.value)},this.brightnessLabel=document.createElement("div"),this.brightnessLabel.className="vis-label vis-brightness",this.brightnessLabel.innerText="brightness:",this.opacityLabel=document.createElement("div"),this.opacityLabel.className="vis-label vis-opacity",this.opacityLabel.innerText="opacity:",this.newColorDiv=document.createElement("div"),this.newColorDiv.className="vis-new-color",this.newColorDiv.innerText="new",this.initialColorDiv=document.createElement("div"),this.initialColorDiv.className="vis-initial-color",this.initialColorDiv.innerText="initial",this.cancelButton=document.createElement("div"),this.cancelButton.className="vis-button vis-cancel",this.cancelButton.innerText="cancel",this.cancelButton.onclick=je(e=this._hide).call(e,this,!1),this.applyButton=document.createElement("div"),this.applyButton.className="vis-button vis-apply",this.applyButton.innerText="apply",this.applyButton.onclick=je(r=this._apply).call(r,this),this.saveButton=document.createElement("div"),this.saveButton.className="vis-button vis-save",this.saveButton.innerText="save",this.saveButton.onclick=je(n=this._save).call(n,this),this.loadButton=document.createElement("div"),this.loadButton.className="vis-button vis-load",this.loadButton.innerText="load last",this.loadButton.onclick=je(i=this._loadLast).call(i,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new YS(this.colorPickerCanvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.on("hammer.input",e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on("tap",e=>{this._moveSelector(e)}),this.hammer.on("panstart",e=>{this._moveSelector(e)}),this.hammer.on("panmove",e=>{this._moveSelector(e)}),this.hammer.on("panend",e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){const e=this.colorPickerCanvas.getContext("2d");this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);const r=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,r,n);let i,o,a,s;this.centerCoordinates={x:r*.5,y:n*.5},this.r=.49*r;const l=2*Math.PI/360,c=1/360,u=1/this.r;let f;for(a=0;a<360;a++)for(s=0;s<this.r;s++)i=this.centerCoordinates.x+s*Math.sin(l*a),o=this.centerCoordinates.y+s*Math.cos(l*a),f=lv(a*c,s*u,1),e.fillStyle="rgb("+f.r+","+f.g+","+f.b+")",e.fillRect(i-.5,o-.5,2,2);e.strokeStyle="rgba(0,0,0,1)",e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,r,n)}this.generated=!0}_moveSelector(e){const r=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-r.left,i=e.center.y-r.top,o=.5*this.colorPickerDiv.clientHeight,a=.5*this.colorPickerDiv.clientWidth,s=n-a,l=i-o,c=Math.atan2(s,l),u=.98*Math.min(Math.sqrt(s*s+l*l),a),f=Math.cos(c)*u+o,h=Math.sin(c)*u+a;this.colorPickerSelector.style.top=f-.5*this.colorPickerSelector.clientHeight+"px",this.colorPickerSelector.style.left=h-.5*this.colorPickerSelector.clientWidth+"px";let v=c/(2*Math.PI);v=v<0?v+1:v;const g=u/this.r,m=gu(this.color.r,this.color.g,this.color.b);m.h=v,m.s=g;const p=lv(m.h,m.s,m.v);p.a=this.color.a,this.color=p,this.initialColorDiv.style.backgroundColor="rgba("+this.initialColor.r+","+this.initialColor.g+","+this.initialColor.b+","+this.initialColor.a+")",this.newColorDiv.style.backgroundColor="rgba("+this.color.r+","+this.color.g+","+this.color.b+","+this.color.a+")"}};function $$(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(e.length<1)throw new TypeError("Invalid arguments.");if(e.length===1)return document.createTextNode(e[0]);{const n=document.createElement(e[0]);return n.appendChild($$(...ho(e).call(e,1))),n}}let eDe=class{constructor(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=r,this.allowCreation=!1,this.hideOption=o,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Ur(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new QMe(i),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let r=!0;if(typeof e=="string")this.options.filter=e;else if(Ir(e))this.options.filter=e.join();else if(typeof e=="object"){if(e==null)throw new TypeError("options cannot be null");e.container!==void 0&&(this.options.container=e.container),ti(e)!==void 0&&(this.options.filter=ti(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(r=e.enabled)}else typeof e=="boolean"?(this.options.filter=!0,r=e):typeof e=="function"&&(this.options.filter=e,r=!0);ti(this.options)===!1&&(r=!1),this.options.enabled=r}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];const e=ti(this.options);let r=0,n=!1;for(const i in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,i)&&(this.allowCreation=!1,n=!1,typeof e=="function"?(n=e(i,[]),n=n||this._handleObject(this.configureOptions[i],[i],!0)):(e===!0||Gt(e).call(e,i)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,r>0&&this._makeItem([]),this._makeHeader(i),this._handleObject(this.configureOptions[i],[i])),r++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement("div"),this.wrapper.className="vis-configuration-wrapper",this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let r=this.moduleOptions;for(let n=0;n<e.length;n++)if(r[e[n]]!==void 0)r=r[e[n]];else{r=void 0;break}return r}_makeItem(e){if(this.allowCreation===!0){const o=document.createElement("div");o.className="vis-configuration vis-config-item vis-config-s"+e.length;for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return lr(n).call(n,a=>{o.appendChild(a)}),this.domElements.push(o),this.domElements.length}return 0}_makeHeader(e){const r=document.createElement("div");r.className="vis-configuration vis-config-header",r.innerText=e,this._makeItem([],r)}_makeLabel(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=document.createElement("div");if(i.className="vis-configuration vis-config-label vis-config-s"+r.length,n===!0){for(;i.firstChild;)i.removeChild(i.firstChild);i.appendChild($$("i","b",e))}else i.innerText=e+":";return i}_makeDropdown(e,r,n){const i=document.createElement("select");i.className="vis-configuration vis-config-select";let o=0;r!==void 0&&Gt(e).call(e,r)!==-1&&(o=Gt(e).call(e,r));for(let l=0;l<e.length;l++){const c=document.createElement("option");c.value=e[l],l===o&&(c.selected="selected"),c.innerText=e[l],i.appendChild(c)}const a=this;i.onchange=function(){a._update(this.value,n)};const s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,i)}_makeRange(e,r,n){const i=e[0],o=e[1],a=e[2],s=e[3],l=document.createElement("input");l.className="vis-configuration vis-config-range";try{l.type="range",l.min=o,l.max=a}catch{}l.step=s;let c="",u=0;r!==void 0?(r<0&&r*1.2<o?(l.min=Math.ceil(r*1.2),u=l.min,c="range increased"):r/1.2<o&&(l.min=Math.ceil(r/1.2),u=l.min,c="range increased"),r*1.2>a&&a!==1&&(l.max=Math.ceil(r*1.2),u=l.max,c="range increased"),l.value=r):l.value=i;const f=document.createElement("input");f.className="vis-configuration vis-config-rangeinput",f.value=l.value;const h=this;l.onchange=function(){f.value=this.value,h._update(Number(this.value),n)},l.oninput=function(){f.value=this.value};const v=this._makeLabel(n[n.length-1],n),g=this._makeItem(n,v,l,f);c!==""&&this.popupHistory[g]!==u&&(this.popupHistory[g]=u,this._setupPopup(c,g))}_makeButton(){if(this.options.showButton===!0){const e=document.createElement("div");e.className="vis-configuration vis-config-button",e.innerText="generate options",e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className="vis-configuration vis-config-button hover"},e.onmouseout=()=>{e.className="vis-configuration vis-config-button"},this.optionsContainer=document.createElement("div"),this.optionsContainer.className="vis-configuration vis-config-option-container",this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,r){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){const n=document.createElement("div");n.id="vis-configuration-popup",n.className="vis-configuration-popup",n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:r}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){const r=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=r.left+"px",this.popupDiv.html.style.top=r.top-30+"px",document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=$o(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=$o(()=>{this._removePopup()},1800)}}_makeCheckbox(e,r,n){const i=document.createElement("input");i.type="checkbox",i.className="vis-configuration vis-config-checkbox",i.checked=e,r!==void 0&&(i.checked=r,r!==e&&(typeof e=="object"?r!==e.enabled&&this.changedOptions.push({path:n,value:r}):this.changedOptions.push({path:n,value:r})));const o=this;i.onchange=function(){o._update(this.checked,n)};const a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_makeTextInput(e,r,n){const i=document.createElement("input");i.type="text",i.className="vis-configuration vis-config-text",i.value=r,r!==e&&this.changedOptions.push({path:n,value:r});const o=this;i.onchange=function(){o._update(this.value,n)};const a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,i)}_makeColorField(e,r,n){const i=e[1],o=document.createElement("div");r=r===void 0?i:r,r!=="none"?(o.className="vis-configuration vis-config-colorBlock",o.style.backgroundColor=r):o.className="vis-configuration vis-config-colorBlock none",r=r===void 0?i:r,o.onclick=()=>{this._showColorPicker(r,o,n)};const a=this._makeLabel(n[n.length-1],n);this._makeItem(n,a,o)}_showColorPicker(e,r,n){r.onclick=function(){},this.colorPicker.insertTo(r),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(i=>{const o="rgba("+i.r+","+i.g+","+i.b+","+i.a+")";r.style.backgroundColor=o,this._update(o,n)}),this.colorPicker.setCloseCallback(()=>{r.onclick=()=>{this._showColorPicker(e,r,n)}})}_handleObject(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=!1;const o=ti(this.options);let a=!1;for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){i=!0;const l=e[s],c=op(r,s);if(typeof o=="function"&&(i=o(s,r),i===!1&&!Ir(l)&&typeof l!="string"&&typeof l!="boolean"&&l instanceof Object&&(this.allowCreation=!1,i=this._handleObject(l,c,!0),this.allowCreation=n===!1)),i!==!1){a=!0;const u=this._getValue(c);if(Ir(l))this._handleArray(l,u,c);else if(typeof l=="string")this._makeTextInput(l,u,c);else if(typeof l=="boolean")this._makeCheckbox(l,u,c);else if(l instanceof Object){if(!this.hideOption(r,s,this.moduleOptions))if(l.enabled!==void 0){const f=op(c,"enabled"),h=this._getValue(f);if(h===!0){const v=this._makeLabel(s,c,!0);this._makeItem(c,v),a=this._handleObject(l,c)||a}else this._makeCheckbox(l,h,c)}else{const f=this._makeLabel(s,c,!0);this._makeItem(c,f),a=this._handleObject(l,c)||a}}else console.error("dont know how to handle",l,s,c)}}return a}_handleArray(e,r,n){typeof e[0]=="string"&&e[0]==="color"?(this._makeColorField(e,r,n),e[1]!==r&&this.changedOptions.push({path:n,value:r})):typeof e[0]=="string"?(this._makeDropdown(e,r,n),e[0]!==r&&this.changedOptions.push({path:n,value:r})):typeof e[0]=="number"&&(this._makeRange(e,r,n),e[0]!==r&&this.changedOptions.push({path:n,value:Number(r)}))}_update(e,r){const n=this._constructOptions(e,r);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit("configChange",n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n;e=e==="true"?!0:e,e=e==="false"?!1:e;for(let o=0;o<r.length;o++)r[o]!=="global"&&(i[r[o]]===void 0&&(i[r[o]]={}),o!==r.length-1?i=i[r[o]]:i[r[o]]=e);return n}_printOptions(){const e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild($$("pre","const options = "+Cf(e,null,2)))}getOptions(){const e={};for(let r=0;r<this.changedOptions.length;r++)this._constructOptions(this.changedOptions[r].value,this.changedOptions[r].path,e);return e}},tDe=class{constructor(e,r){this.container=e,this.overflowMethod=r||"cap",this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement("div"),this.frame.className="vis-tooltip",this.container.appendChild(this.frame)}setPosition(e,r){this.x=Wi(e),this.y=Wi(r)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){const r=this.frame.clientHeight,n=this.frame.clientWidth,i=this.frame.parentNode.clientHeight,o=this.frame.parentNode.clientWidth;let a=0,s=0;if(this.overflowMethod=="flip"){let l=!1,c=!0;this.y-r<this.padding&&(c=!1),this.x+n>o-this.padding&&(l=!0),l?a=this.x-n:a=this.x,c?s=this.y-r:s=this.y}else s=this.y-r,s+r+this.padding>i&&(s=i-r-this.padding),s<this.padding&&(s=this.padding),a=this.x,a+n+this.padding>o&&(a=o-n-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+"px",this.frame.style.top=s+"px",this.frame.style.visibility="visible",this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left="0",this.frame.style.top="0",this.frame.style.visibility="hidden"}destroy(){this.frame.parentNode.removeChild(this.frame)}},au=!1,s2;const w$="background: #FFeeee; color: #dd0000";let rDe=class xr{static validate(e,r,n){au=!1,s2=r;let i=r;return n!==void 0&&(i=r[n]),xr.parse(e,i,[]),au}static parse(e,r,n){for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&xr.check(i,e,r,n)}static check(e,r,n,i){if(n[e]===void 0&&n.__any__===void 0){xr.getSuggestion(e,n,i);return}let o=e,a=!0;n[e]===void 0&&n.__any__!==void 0&&(o="__any__",a=xr.getType(r[e])==="object");let s=n[o];a&&s.__type__!==void 0&&(s=s.__type__),xr.checkFields(e,r,n,o,s,i)}static checkFields(e,r,n,i,o,a){const s=function(u){console.error("%c"+u+xr.printLocation(a,e),w$)},l=xr.getType(r[e]),c=o[l];c!==void 0?xr.getType(c)==="array"&&Gt(c).call(c,r[e])===-1?(s('Invalid option detected in "'+e+'". Allowed values are:'+xr.print(c)+' not "'+r[e]+'". '),au=!0):l==="object"&&i!=="__any__"&&(a=op(a,e),xr.parse(r[e],n[i],a)):o.any===void 0&&(s('Invalid type received for "'+e+'". Expected: '+xr.print(Or(o))+". Received ["+l+'] "'+r[e]+'"'),au=!0)}static getType(e){const r=typeof e;return r==="object"?e===null?"null":e instanceof Boolean?"boolean":e instanceof Number?"number":e instanceof String?"string":Ir(e)?"array":e instanceof Date?"date":e.nodeType!==void 0?"dom":e._isAMomentObject===!0?"moment":"object":r==="number"?"number":r==="boolean"?"boolean":r==="string"?"string":r===void 0?"undefined":r}static getSuggestion(e,r,n){const i=xr.findInOptions(e,r,n,!1),o=xr.findInOptions(e,s2,[],!0),a=8,s=4;let l;i.indexMatch!==void 0?l=" in "+xr.printLocation(i.path,e,"")+'Perhaps it was incomplete? Did you mean: "'+i.indexMatch+`"?

`:o.distance<=s&&i.distance>o.distance?l=" in "+xr.printLocation(i.path,e,"")+"Perhaps it was misplaced? Matching option found at: "+xr.printLocation(o.path,o.closestMatch,""):i.distance<=a?l='. Did you mean "'+i.closestMatch+'"?'+xr.printLocation(i.path,e):l=". Did you mean one of these: "+xr.print(Or(r))+xr.printLocation(n,e),console.error('%cUnknown option detected: "'+e+'"'+l,w$),au=!0}static findInOptions(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,o=1e9,a="",s=[];const l=e.toLowerCase();let c;for(const f in r){let h;if(r[f].__type__!==void 0&&i===!0){const v=xr.findInOptions(e,r[f],op(n,f));o>v.distance&&(a=v.closestMatch,s=v.path,o=v.distance,c=v.indexMatch)}else{var u;Gt(u=f.toLowerCase()).call(u,l)!==-1&&(c=f),h=xr.levenshteinDistance(e,f),o>h&&(a=f,s=UMe(n),o=h)}}return{closestMatch:a,path:s,distance:o,indexMatch:c}}static printLocation(e,r){let i=`

`+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at: 
`)+`options = {
`;for(let o=0;o<e.length;o++){for(let a=0;a<o+1;a++)i+="  ";i+=e[o]+`: {
`}for(let o=0;o<e.length+1;o++)i+="  ";i+=r+`
`;for(let o=0;o<e.length+1;o++){for(let a=0;a<e.length-o;a++)i+="  ";i+=`}
`}return i+`

`}static print(e){return Cf(e).replace(/(")|(\[)|(\])|(,"__type__")/g,"").replace(/(,)/g,", ")}static levenshteinDistance(e,r){if(e.length===0)return r.length;if(r.length===0)return e.length;const n=[];let i;for(i=0;i<=r.length;i++)n[i]=[i];let o;for(o=0;o<=e.length;o++)n[0][o]=o;for(i=1;i<=r.length;i++)for(o=1;o<=e.length;o++)r.charAt(i-1)==e.charAt(o-1)?n[i][o]=n[i-1][o-1]:n[i][o]=Math.min(n[i-1][o-1]+1,Math.min(n[i][o-1]+1,n[i-1][o]+1));return n[r.length][e.length]}};const nDe=go,iDe=eDe,Fl=YS,oDe=tDe,sz=w$,aDe=rDe;function sDe(t){return ma=t,dDe()}var lz={fontsize:"font.size",fontcolor:"font.color",labelfontcolor:"font.color",fontname:"font.face",color:["color.border","color.background"],fillcolor:"color.background",tooltip:"title",labeltooltip:"title"},ZS=vs(lz);ZS.color="color.color";ZS.style="dashes";var Dn={NULL:0,DELIMITER:1,IDENTIFIER:2,UNKNOWN:3},l2={"{":!0,"}":!0,"[":!0,"]":!0,";":!0,"=":!0,",":!0,"->":!0,"--":!0},ma="",uc=0,Mt="",bt="",Yn=Dn.NULL;function lDe(){uc=0,Mt=ma.charAt(0)}function on(){uc++,Mt=ma.charAt(uc)}function pl(){return ma.charAt(uc+1)}function c2(t){var e=t.charCodeAt(0);return e<47?e===35||e===46:e<59?e>47:e<91?e>64:e<96?e===95:e<123?e>96:!1}function Ma(t,e){if(t||(t={}),e)for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t}function cDe(t,e,r){for(var n=e.split("."),i=t;n.length;){var o=n.shift();n.length?(i[o]||(i[o]={}),i=i[o]):i[o]=r}}function cz(t,e){for(var r,n,i=null,o=[t],a=t;a.parent;)o.push(a.parent),a=a.parent;if(a.nodes){for(r=0,n=a.nodes.length;r<n;r++)if(e.id===a.nodes[r].id){i=a.nodes[r];break}}for(i||(i={id:e.id},t.node&&(i.attr=Ma(i.attr,t.node))),r=o.length-1;r>=0;r--){var s,l=o[r];l.nodes||(l.nodes=[]),Gt(s=l.nodes).call(s,i)===-1&&l.nodes.push(i)}e.attr&&(i.attr=Ma(i.attr,e.attr))}function uDe(t,e){if(t.edges||(t.edges=[]),t.edges.push(e),t.edge){var r=Ma({},t.edge);e.attr=Ma(r,e.attr)}}function uz(t,e,r,n,i){var o={from:e,to:r,type:n};return t.edge&&(o.attr=Ma({},t.edge)),o.attr=Ma(o.attr||{},i),i!=null&&i.hasOwnProperty("arrows")&&i.arrows!=null&&(o.arrows={to:{enabled:!0,type:i.arrows.type}},i.arrows=null),o}function dr(){for(Yn=Dn.NULL,bt="";Mt===" "||Mt==="	"||Mt===`
`||Mt==="\r";)on();do{var t=!1;if(Mt==="#"){for(var e=uc-1;ma.charAt(e)===" "||ma.charAt(e)==="	";)e--;if(ma.charAt(e)===`
`||ma.charAt(e)===""){for(;Mt!=""&&Mt!=`
`;)on();t=!0}}if(Mt==="/"&&pl()==="/"){for(;Mt!=""&&Mt!=`
`;)on();t=!0}if(Mt==="/"&&pl()==="*"){for(;Mt!="";)if(Mt==="*"&&pl()==="/"){on(),on();break}else on();t=!0}for(;Mt===" "||Mt==="	"||Mt===`
`||Mt==="\r";)on()}while(t);if(Mt===""){Yn=Dn.DELIMITER;return}var r=Mt+pl();if(l2[r]){Yn=Dn.DELIMITER,bt=r,on(),on();return}if(l2[Mt]){Yn=Dn.DELIMITER,bt=Mt,on();return}if(c2(Mt)||Mt==="-"){for(bt+=Mt,on();c2(Mt);)bt+=Mt,on();bt==="false"?bt=!1:bt==="true"?bt=!0:isNaN(Number(bt))||(bt=Number(bt)),Yn=Dn.IDENTIFIER;return}if(Mt==='"'){for(on();Mt!=""&&(Mt!='"'||Mt==='"'&&pl()==='"');)Mt==='"'?(bt+=Mt,on()):Mt==="\\"&&pl()==="n"?(bt+=`
`,on()):bt+=Mt,on();if(Mt!='"')throw An('End of string " expected');on(),Yn=Dn.IDENTIFIER;return}for(Yn=Dn.UNKNOWN;Mt!="";)bt+=Mt,on();throw new SyntaxError('Syntax error in part "'+vz(bt,30)+'"')}function dDe(){var t={};if(lDe(),dr(),bt==="strict"&&(t.strict=!0,dr()),(bt==="graph"||bt==="digraph")&&(t.type=bt,dr()),Yn===Dn.IDENTIFIER&&(t.id=bt,dr()),bt!="{")throw An("Angle bracket { expected");if(dr(),dz(t),bt!="}")throw An("Angle bracket } expected");if(dr(),bt!=="")throw An("End of file expected");return dr(),delete t.node,delete t.edge,delete t.graph,t}function dz(t){for(;bt!==""&&bt!="}";)fDe(t),bt===";"&&dr()}function fDe(t){var e=fz(t);if(e){hz(t,e);return}var r=hDe(t);if(!r){if(Yn!=Dn.IDENTIFIER)throw An("Identifier expected");var n=bt;if(dr(),bt==="="){if(dr(),Yn!=Dn.IDENTIFIER)throw An("Identifier expected");t[n]=bt,dr()}else vDe(t,n)}}function fz(t){var e=null;if(bt==="subgraph"&&(e={},e.type="subgraph",dr(),Yn===Dn.IDENTIFIER&&(e.id=bt,dr())),bt==="{"){if(dr(),e||(e={}),e.parent=t,e.node=t.node,e.edge=t.edge,e.graph=t.graph,dz(e),bt!="}")throw An("Angle bracket } expected");dr(),delete e.node,delete e.edge,delete e.graph,delete e.parent,t.subgraphs||(t.subgraphs=[]),t.subgraphs.push(e)}return e}function hDe(t){return bt==="node"?(dr(),t.node=Nu(),"node"):bt==="edge"?(dr(),t.edge=Nu(),"edge"):bt==="graph"?(dr(),t.graph=Nu(),"graph"):null}function vDe(t,e){var r={id:e},n=Nu();n&&(r.attr=n),cz(t,r),hz(t,e)}function hz(t,e){for(;bt==="->"||bt==="--";){var r,n=bt;dr();var i=fz(t);if(i)r=i;else{if(Yn!=Dn.IDENTIFIER)throw An("Identifier or subgraph expected");r=bt,cz(t,{id:r}),dr()}var o=Nu(),a=uz(t,e,r,n,o);uDe(t,a),e=r}}function Nu(){for(var t,e=null,r={dashed:!0,solid:!1,dotted:[1,5]},n={dot:"circle",box:"box",crow:"crow",curve:"curve",icurve:"inv_curve",normal:"triangle",inv:"inv_triangle",diamond:"diamond",tee:"bar",vee:"vee"},i=new Array,o=new Array;bt==="[";){for(dr(),e={};bt!==""&&bt!="]";){if(Yn!=Dn.IDENTIFIER)throw An("Attribute name expected");var a=bt;if(dr(),bt!="=")throw An("Equal sign = expected");if(dr(),Yn!=Dn.IDENTIFIER)throw An("Attribute value expected");var s=bt;a==="style"&&(s=r[s]);var l;a==="arrowhead"&&(l=n[s],a="arrows",s={to:{enabled:!0,type:l}}),a==="arrowtail"&&(l=n[s],a="arrows",s={from:{enabled:!0,type:l}}),i.push({attr:e,name:a,value:s}),o.push(a),dr(),bt==","&&dr()}if(bt!="]")throw An("Bracket ] expected");dr()}if(xa(o).call(o,"dir")){var c={};for(c.arrows={},t=0;t<i.length;t++)if(i[t].name==="arrows")if(i[t].value.to!=null)c.arrows.to=t;else if(i[t].value.from!=null)c.arrows.from=t;else throw An("Invalid value of arrows");else i[t].name==="dir"&&(c.dir=t);var u=i[c.dir].value;if(!xa(o).call(o,"arrows"))if(u==="both")i.push({attr:i[c.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),c.arrows.to=i.length-1,i.push({attr:i[c.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),c.arrows.from=i.length-1;else if(u==="forward")i.push({attr:i[c.dir].attr,name:"arrows",value:{to:{enabled:!0}}}),c.arrows.to=i.length-1;else if(u==="back")i.push({attr:i[c.dir].attr,name:"arrows",value:{from:{enabled:!0}}}),c.arrows.from=i.length-1;else if(u==="none")i.push({attr:i[c.dir].attr,name:"arrows",value:""}),c.arrows.to=i.length-1;else throw An('Invalid dir type "'+u+'"');var f,h;if(u==="both")c.arrows.to&&c.arrows.from?(h=i[c.arrows.to].value.to.type,f=i[c.arrows.from].value.from.type,i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}},Ho(i).call(i,c.arrows.from,1)):c.arrows.to?(h=i[c.arrows.to].value.to.type,f="arrow",i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}):c.arrows.from&&(h="arrow",f=i[c.arrows.from].value.from.type,i[c.arrows.from]={attr:i[c.arrows.from].attr,name:i[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}});else if(u==="back")c.arrows.to&&c.arrows.from?(h="",f=i[c.arrows.from].value.from.type,i[c.arrows.from]={attr:i[c.arrows.from].attr,name:i[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}):c.arrows.to?(h="",f="arrow",c.arrows.from=c.arrows.to,i[c.arrows.from]={attr:i[c.arrows.from].attr,name:i[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}):c.arrows.from&&(h="",f=i[c.arrows.from].value.from.type,i[c.arrows.to]={attr:i[c.arrows.from].attr,name:i[c.arrows.from].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}),i[c.arrows.from]={attr:i[c.arrows.from].attr,name:i[c.arrows.from].name,value:{from:{enabled:!0,type:i[c.arrows.from].value.from.type}}};else if(u==="none"){var v;c.arrows.to?v=c.arrows.to:v=c.arrows.from,i[v]={attr:i[v].attr,name:i[v].name,value:""}}else if(u==="forward")c.arrows.to&&c.arrows.from?(h=i[c.arrows.to].value.to.type,f="",i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}):c.arrows.to?(h=i[c.arrows.to].value.to.type,f="",i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}):c.arrows.from&&(h="arrow",f="",c.arrows.to=c.arrows.from,i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:h},from:{enabled:!0,type:f}}}),i[c.arrows.to]={attr:i[c.arrows.to].attr,name:i[c.arrows.to].name,value:{to:{enabled:!0,type:i[c.arrows.to].value.to.type}}};else throw An('Invalid dir type "'+u+'"');Ho(i).call(i,c.dir,1)}var g;if(xa(o).call(o,"penwidth")){var m=[];for(g=i.length,t=0;t<g;t++)i[t].name!=="width"&&(i[t].name==="penwidth"&&(i[t].name="width"),m.push(i[t]));i=m}for(g=i.length,t=0;t<g;t++)cDe(i[t].attr,i[t].name,i[t].value);return e}function An(t){return new SyntaxError(t+', got "'+vz(bt,30)+'" (char '+uc+")")}function vz(t,e){return t.length<=e?t:t.substr(0,27)+"..."}function pDe(t,e,r){Ir(t)?lr(t).call(t,function(n){Ir(e)?lr(e).call(e,function(i){r(n,i)}):r(n,e)}):Ir(e)?lr(e).call(e,function(n){r(t,n)}):r(t,e)}function Lb(t,e,r){for(var n=e.split("."),i=n.pop(),o=t,a=0;a<n.length;a++){var s=n[a];s in o||(o[s]={}),o=o[s]}return o[i]=r,t}function u2(t,e){var r={};for(var n in t)if(t.hasOwnProperty(n)){var i=e[n];Ir(i)?lr(i).call(i,function(o){Lb(r,o,t[n])}):typeof i=="string"?Lb(r,i,t[n]):Lb(r,n,t[n])}return r}function gDe(t){var e=sDe(t),r={nodes:[],edges:[],options:{}};if(e.nodes){var n;lr(n=e.nodes).call(n,function(a){var s={id:a.id,label:String(a.label||a.id)};Ma(s,u2(a.attr,lz)),s.image&&(s.shape="image"),r.nodes.push(s)})}if(e.edges){var i,o=function(a){var s={from:a.from,to:a.to};return Ma(s,u2(a.attr,ZS)),s.arrows==null&&a.type==="->"&&(s.arrows="to"),s};lr(i=e.edges).call(i,function(a){var s,l;if(a.from instanceof Object?s=a.from.nodes:s={id:a.from},a.to instanceof Object?l=a.to.nodes:l={id:a.to},a.from instanceof Object&&a.from.edges){var c;lr(c=a.from.edges).call(c,function(f){var h=o(f);r.edges.push(h)})}if(pDe(s,l,function(f,h){var v=uz(r,f.id,h.id,a.type,a.attr),g=o(v);r.edges.push(g)}),a.to instanceof Object&&a.to.edges){var u;lr(u=a.to.edges).call(u,function(f){var h=o(f);r.edges.push(h)})}})}return e.attr&&(r.options=e.attr),r}function mDe(t,e){var r;const n={edges:{inheritColor:!1},nodes:{fixed:!1,parseColor:!1}};e!=null&&(e.fixed!=null&&(n.nodes.fixed=e.fixed),e.parseColor!=null&&(n.nodes.parseColor=e.parseColor),e.inheritColor!=null&&(n.edges.inheritColor=e.inheritColor));const i=t.edges,o=ac(i).call(i,s=>{const l={from:s.source,id:s.id,to:s.target};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.type==="Directed"&&(l.arrows="to"),s.color&&n.edges.inheritColor===!1&&(l.color=s.color),l});return{nodes:ac(r=t.nodes).call(r,s=>{const l={id:s.id,fixed:n.nodes.fixed&&s.x!=null&&s.y!=null};return s.attributes!=null&&(l.attributes=s.attributes),s.label!=null&&(l.label=s.label),s.size!=null&&(l.size=s.size),s.attributes!=null&&s.attributes.title!=null&&(l.title=s.attributes.title),s.title!=null&&(l.title=s.title),s.x!=null&&(l.x=s.x),s.y!=null&&(l.y=s.y),s.color!=null&&(n.nodes.parseColor===!0?l.color=s.color:l.color={background:s.color,border:s.color,highlight:{background:s.color,border:s.color},hover:{background:s.color,border:s.color}}),l}),edges:o}}const yDe={addDescription:"Click in an empty space to place a new node.",addEdge:"Add Edge",addNode:"Add Node",back:"Back",close:"Close",createEdgeError:"Cannot link edges to a cluster.",del:"Delete selected",deleteClusterError:"Clusters cannot be deleted.",edgeDescription:"Click on a node and drag the edge to another node to connect them.",edit:"Edit",editClusterError:"Clusters cannot be edited.",editEdge:"Edit Edge",editEdgeDescription:"Click on the control points and drag them to a node to connect to it.",editNode:"Edit Node"},bDe={addDescription:"Klicke auf eine freie Stelle, um einen neuen Knoten zu plazieren.",addEdge:"Kante hinzufügen",addNode:"Knoten hinzufügen",back:"Zurück",close:"Schließen",createEdgeError:"Es ist nicht möglich, Kanten mit Clustern zu verbinden.",del:"Lösche Auswahl",deleteClusterError:"Cluster können nicht gelöscht werden.",edgeDescription:"Klicke auf einen Knoten und ziehe die Kante zu einem anderen Knoten, um diese zu verbinden.",edit:"Editieren",editClusterError:"Cluster können nicht editiert werden.",editEdge:"Kante editieren",editEdgeDescription:"Klicke auf die Verbindungspunkte und ziehe diese auf einen Knoten, um sie zu verbinden.",editNode:"Knoten editieren"},$De={addDescription:"Haga clic en un lugar vacío para colocar un nuevo nodo.",addEdge:"Añadir arista",addNode:"Añadir nodo",back:"Atrás",close:"Cerrar",createEdgeError:"No se puede conectar una arista a un grupo.",del:"Eliminar selección",deleteClusterError:"No es posible eliminar grupos.",edgeDescription:"Haga clic en un nodo y arrastre la arista hacia otro nodo para conectarlos.",edit:"Editar",editClusterError:"No es posible editar grupos.",editEdge:"Editar arista",editEdgeDescription:"Haga clic en un punto de control y arrastrelo a un nodo para conectarlo.",editNode:"Editar nodo"},wDe={addDescription:"Clicca per aggiungere un nuovo nodo",addEdge:"Aggiungi un vertice",addNode:"Aggiungi un nodo",back:"Indietro",close:"Chiudere",createEdgeError:"Non si possono collegare vertici ad un cluster",del:"Cancella la selezione",deleteClusterError:"I cluster non possono essere cancellati",edgeDescription:"Clicca su un nodo e trascinalo ad un altro nodo per connetterli.",edit:"Modifica",editClusterError:"I clusters non possono essere modificati.",editEdge:"Modifica il vertice",editEdgeDescription:"Clicca sui Punti di controllo e trascinali ad un nodo per connetterli.",editNode:"Modifica il nodo"},SDe={addDescription:"Klik op een leeg gebied om een nieuwe node te maken.",addEdge:"Link toevoegen",addNode:"Node toevoegen",back:"Terug",close:"Sluiten",createEdgeError:"Kan geen link maken naar een cluster.",del:"Selectie verwijderen",deleteClusterError:"Clusters kunnen niet worden verwijderd.",edgeDescription:"Klik op een node en sleep de link naar een andere node om ze te verbinden.",edit:"Wijzigen",editClusterError:"Clusters kunnen niet worden aangepast.",editEdge:"Link wijzigen",editEdgeDescription:"Klik op de verbindingspunten en sleep ze naar een node om daarmee te verbinden.",editNode:"Node wijzigen"},CDe={addDescription:"Clique em um espaço em branco para adicionar um novo nó",addEdge:"Adicionar aresta",addNode:"Adicionar nó",back:"Voltar",close:"Fechar",createEdgeError:"Não foi possível linkar arestas a um cluster.",del:"Remover selecionado",deleteClusterError:"Clusters não puderam ser removidos.",edgeDescription:"Clique em um nó e arraste a aresta até outro nó para conectá-los",edit:"Editar",editClusterError:"Clusters não puderam ser editados.",editEdge:"Editar aresta",editEdgeDescription:"Clique nos pontos de controle e os arraste para um nó para conectá-los",editNode:"Editar nó"},xDe={addDescription:"Кликните в свободное место, чтобы добавить новый узел.",addEdge:"Добавить ребро",addNode:"Добавить узел",back:"Назад",close:"Закрывать",createEdgeError:"Невозможно соединить ребра в кластер.",del:"Удалить выбранное",deleteClusterError:"Кластеры не могут быть удалены",edgeDescription:"Кликните на узел и протяните ребро к другому узлу, чтобы соединить их.",edit:"Редактировать",editClusterError:"Кластеры недоступны для редактирования.",editEdge:"Редактировать ребро",editEdgeDescription:"Кликните на контрольные точки и перетащите их в узел, чтобы подключиться к нему.",editNode:"Редактировать узел"},EDe={addDescription:"单击空白处放置新节点。",addEdge:"添加连接线",addNode:"添加节点",back:"返回",close:"關閉",createEdgeError:"无法将连接线连接到群集。",del:"删除选定",deleteClusterError:"无法删除群集。",edgeDescription:"单击某个节点并将该连接线拖动到另一个节点以连接它们。",edit:"编辑",editClusterError:"无法编辑群集。",editEdge:"编辑连接线",editEdgeDescription:"单击控制节点并将它们拖到节点上连接。",editNode:"编辑节点"},ODe={addDescription:"Kлікніть на вільне місце, щоб додати новий вузол.",addEdge:"Додати край",addNode:"Додати вузол",back:"Назад",close:"Закрити",createEdgeError:"Не можливо об'єднати краї в групу.",del:"Видалити обране",deleteClusterError:"Групи не можуть бути видалені.",edgeDescription:"Клікніть на вузол і перетягніть край до іншого вузла, щоб їх з'єднати.",edit:"Редагувати",editClusterError:"Групи недоступні для редагування.",editEdge:"Редагувати край",editEdgeDescription:"Клікніть на контрольні точки і перетягніть їх у вузол, щоб підключитися до нього.",editNode:"Редагувати вузол"},IDe={addDescription:"Cliquez dans un endroit vide pour placer un nœud.",addEdge:"Ajouter un lien",addNode:"Ajouter un nœud",back:"Retour",close:"Fermer",createEdgeError:"Impossible de créer un lien vers un cluster.",del:"Effacer la sélection",deleteClusterError:"Les clusters ne peuvent pas être effacés.",edgeDescription:"Cliquez sur un nœud et glissez le lien vers un autre nœud pour les connecter.",edit:"Éditer",editClusterError:"Les clusters ne peuvent pas être édités.",editEdge:"Éditer le lien",editEdgeDescription:"Cliquez sur les points de contrôle et glissez-les pour connecter un nœud.",editNode:"Éditer le nœud"},TDe={addDescription:"Kluknutím do prázdného prostoru můžete přidat nový vrchol.",addEdge:"Přidat hranu",addNode:"Přidat vrchol",back:"Zpět",close:"Zavřít",createEdgeError:"Nelze připojit hranu ke shluku.",del:"Smazat výběr",deleteClusterError:"Nelze mazat shluky.",edgeDescription:"Přetažením z jednoho vrcholu do druhého můžete spojit tyto vrcholy novou hranou.",edit:"Upravit",editClusterError:"Nelze upravovat shluky.",editEdge:"Upravit hranu",editEdgeDescription:"Přetažením kontrolního vrcholu hrany ji můžete připojit k jinému vrcholu.",editNode:"Upravit vrchol"};var _De=Object.freeze({__proto__:null,cn:EDe,cs:TDe,de:bDe,en:yDe,es:$De,fr:IDe,it:wDe,nl:SDe,pt:CDe,ru:xDe,uk:ODe});function PDe(t,e){try{const[n,i]=e.split(/[-_ /]/,2),o=n!=null?n.toLowerCase():null,a=i!=null?i.toUpperCase():null;if(o&&a){const s=o+"-"+a;if(Object.prototype.hasOwnProperty.call(t,s))return s;var r;console.warn(Z2e(r="Unknown variant ".concat(a," of language ")).call(r,o,"."))}if(o){const s=o;if(Object.prototype.hasOwnProperty.call(t,s))return s;console.warn("Unknown language ".concat(o))}return console.warn("Unknown locale ".concat(e,", falling back to English.")),"en"}catch(n){return console.error(n),console.warn("Unexpected error while normalizing locale ".concat(e,", falling back to English.")),"en"}}class RDe{constructor(){this.NUM_ITERATIONS=4,this.image=new Image,this.canvas=document.createElement("canvas")}init(){if(this.initialized())return;this.src=this.image.src;const e=this.image.width,r=this.image.height;this.width=e,this.height=r;const n=Math.floor(r/2),i=Math.floor(r/4),o=Math.floor(r/8),a=Math.floor(r/16),s=Math.floor(e/2),l=Math.floor(e/4),c=Math.floor(e/8),u=Math.floor(e/16);this.canvas.width=3*l,this.canvas.height=n,this.coordinates=[[0,0,s,n],[s,0,l,i],[s,i,c,o],[5*c,i,u,a]],this._fillMipMap()}initialized(){return this.coordinates!==void 0}_fillMipMap(){const e=this.canvas.getContext("2d"),r=this.coordinates[0];e.drawImage(this.image,r[0],r[1],r[2],r[3]);for(let n=1;n<this.NUM_ITERATIONS;n++){const i=this.coordinates[n-1],o=this.coordinates[n];e.drawImage(this.canvas,i[0],i[1],i[2],i[3],o[0],o[1],o[2],o[3])}}drawImageAtPosition(e,r,n,i,o,a){if(this.initialized())if(r>2){r*=.5;let s=0;for(;r>2&&s<this.NUM_ITERATIONS;)r*=.5,s+=1;s>=this.NUM_ITERATIONS&&(s=this.NUM_ITERATIONS-1);const l=this.coordinates[s];e.drawImage(this.canvas,l[0],l[1],l[2],l[3],n,i,o,a)}else e.drawImage(this.image,n,i,o,a)}}class NDe{constructor(e){this.images={},this.imageBroken={},this.callback=e}_tryloadBrokenUrl(e,r,n){if(!(e===void 0||n===void 0)){if(r===void 0){console.warn("No broken url image defined");return}n.image.onerror=()=>{console.error("Could not load brokenImage:",r)},n.image.src=r}}_redrawWithImage(e){this.callback&&this.callback(e)}load(e,r){const n=this.images[e];if(n)return n;const i=new RDe;return this.images[e]=i,i.image.onload=()=>{this._fixImageCoordinates(i.image),i.init(),this._redrawWithImage(i)},i.image.onerror=()=>{console.error("Could not load image:",e),this._tryloadBrokenUrl(e,r,i)},i.image.src=e,i}_fixImageCoordinates(e){e.width===0&&(document.body.appendChild(e),e.width=e.offsetWidth,e.height=e.offsetHeight,document.body.removeChild(e))}}var pz={exports:{}},MDe=Jt,DDe=MDe(function(){if(typeof ArrayBuffer=="function"){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),ADe=Jt,jDe=Rn,kDe=Qo,d2=DDe,cv=Object.isExtensible,BDe=ADe(function(){cv(1)}),FDe=BDe||d2?function(e){return!jDe(e)||d2&&kDe(e)==="ArrayBuffer"?!1:cv?cv(e):!0}:cv,LDe=Jt,gz=!LDe(function(){return Object.isExtensible(Object.preventExtensions({}))}),zDe=xt,HDe=Zt,VDe=ff,WDe=Rn,QS=wn,KDe=wi.f,f2=yf,UDe=Dg,eC=FDe,qDe=Ig,GDe=gz,mz=!1,Yo=qDe("meta"),XDe=0,tC=function(t){KDe(t,Yo,{value:{objectID:"O"+XDe++,weakData:{}}})},YDe=function(t,e){if(!WDe(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!QS(t,Yo)){if(!eC(t))return"F";if(!e)return"E";tC(t)}return t[Yo].objectID},JDe=function(t,e){if(!QS(t,Yo)){if(!eC(t))return!0;if(!e)return!1;tC(t)}return t[Yo].weakData},ZDe=function(t){return GDe&&mz&&eC(t)&&!QS(t,Yo)&&tC(t),t},QDe=function(){eAe.enable=function(){},mz=!0;var t=f2.f,e=HDe([].splice),r={};r[Yo]=1,t(r).length&&(f2.f=function(n){for(var i=t(n),o=0,a=i.length;o<a;o++)if(i[o]===Yo){e(i,o,1);break}return i},zDe({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:UDe.f}))},eAe=pz.exports={enable:QDe,fastKey:YDe,getWeakData:JDe,onFreeze:ZDe};VDe[Yo]=!0;var Kg=pz.exports,tAe=Lr,rAe=Vc,nAe=tAe("iterator"),iAe=Array.prototype,oAe=function(t){return t!==void 0&&(rAe.Array===t||iAe[nAe]===t)},aAe=Ws,h2=IS,sAe=kc,lAe=Vc,cAe=Lr,uAe=cAe("iterator"),yz=function(t){if(!sAe(t))return h2(t,uAe)||h2(t,"@@iterator")||lAe[aAe(t)]},dAe=io,fAe=Fc,hAe=ea,vAe=cf,pAe=yz,gAe=TypeError,mAe=function(t,e){var r=arguments.length<2?pAe(t):e;if(fAe(r))return hAe(dAe(r,t));throw new gAe(vAe(t)+" is not iterable")},yAe=io,v2=ea,bAe=IS,$Ae=function(t,e,r){var n,i;v2(t);try{if(n=bAe(t,"return"),!n){if(e==="throw")throw r;return r}n=yAe(n,t)}catch(o){i=!0,n=o}if(e==="throw")throw r;if(i)throw n;return v2(n),r},wAe=_g,SAe=io,CAe=ea,xAe=cf,EAe=oAe,OAe=_o,p2=Jr,IAe=mAe,TAe=yz,g2=$Ae,_Ae=TypeError,uv=function(t,e){this.stopped=t,this.result=e},m2=uv.prototype,rC=function(t,e,r){var n=r&&r.that,i=!!(r&&r.AS_ENTRIES),o=!!(r&&r.IS_RECORD),a=!!(r&&r.IS_ITERATOR),s=!!(r&&r.INTERRUPTED),l=wAe(e,n),c,u,f,h,v,g,m,p=function(b){return c&&g2(c,"normal",b),new uv(!0,b)},y=function(b){return i?(CAe(b),s?l(b[0],b[1],p):l(b[0],b[1])):s?l(b,p):l(b)};if(o)c=t.iterator;else if(a)c=t;else{if(u=TAe(t),!u)throw new _Ae(xAe(t)+" is not iterable");if(EAe(u)){for(f=0,h=OAe(t);h>f;f++)if(v=y(t[f]),v&&p2(m2,v))return v;return new uv(!1)}c=IAe(t,u)}for(g=o?t.next:c.next;!(m=SAe(g,c)).done;){try{v=y(m.value)}catch(b){g2(c,"throw",b)}if(typeof v=="object"&&v&&p2(m2,v))return v}return new uv(!1)},PAe=Jr,RAe=TypeError,nC=function(t,e){if(PAe(e,t))return t;throw new RAe("Incorrect invocation")},NAe=xt,MAe=Pr,DAe=Kg,AAe=Jt,jAe=zc,kAe=rC,BAe=nC,FAe=$n,LAe=Rn,zAe=kc,HAe=Hc,VAe=wi.f,WAe=Wa.forEach,KAe=rn,bz=Ks,UAe=bz.set,qAe=bz.getterFor,iC=function(t,e,r){var n=t.indexOf("Map")!==-1,i=t.indexOf("Weak")!==-1,o=n?"set":"add",a=MAe[t],s=a&&a.prototype,l={},c;if(!KAe||!FAe(a)||!(i||s.forEach&&!AAe(function(){new a().entries().next()})))c=r.getConstructor(e,t,n,o),DAe.enable();else{c=e(function(h,v){UAe(BAe(h,u),{type:t,collection:new a}),zAe(v)||kAe(v,h[o],{that:h,AS_ENTRIES:n})});var u=c.prototype,f=qAe(t);WAe(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(h){var v=h==="add"||h==="set";h in s&&!(i&&h==="clear")&&jAe(u,h,function(g,m){var p=f(this).collection;if(!v&&i&&!LAe(g))return h==="get"?void 0:!1;var y=p[h](g===0?0:g,m);return v?this:y})}),i||VAe(u,"size",{configurable:!0,get:function(){return f(this).collection.size}})}return HAe(c,t,!1,!0),l[t]=c,NAe({global:!0,forced:!0},l),i||r.setStrong(c,t,n),c},GAe=bf,oC=function(t,e,r){for(var n in e)r&&r.unsafe&&t[n]?t[n]=e[n]:GAe(t,n,e[n],r);return t},XAe=ao,YAe=AS,JAe=Lr,ZAe=rn,y2=JAe("species"),QAe=function(t){var e=XAe(t);ZAe&&e&&!e[y2]&&YAe(e,y2,{configurable:!0,get:function(){return this}})},eje=mf,tje=AS,b2=oC,rje=_g,nje=nC,ije=kc,oje=rC,aje=LS,Rh=zS,sje=QAe,su=rn,$2=Kg.fastKey,$z=Ks,w2=$z.set,zb=$z.getterFor,wz={getConstructor:function(t,e,r,n){var i=t(function(c,u){nje(c,o),w2(c,{type:e,index:eje(null),first:void 0,last:void 0,size:0}),su||(c.size=0),ije(u)||oje(u,c[n],{that:c,AS_ENTRIES:r})}),o=i.prototype,a=zb(e),s=function(c,u,f){var h=a(c),v=l(c,u),g,m;return v?v.value=f:(h.last=v={index:m=$2(u,!0),key:u,value:f,previous:g=h.last,next:void 0,removed:!1},h.first||(h.first=v),g&&(g.next=v),su?h.size++:c.size++,m!=="F"&&(h.index[m]=v)),c},l=function(c,u){var f=a(c),h=$2(u),v;if(h!=="F")return f.index[h];for(v=f.first;v;v=v.next)if(v.key===u)return v};return b2(o,{clear:function(){for(var u=this,f=a(u),h=f.index,v=f.first;v;)v.removed=!0,v.previous&&(v.previous=v.previous.next=void 0),delete h[v.index],v=v.next;f.first=f.last=void 0,su?f.size=0:u.size=0},delete:function(c){var u=this,f=a(u),h=l(u,c);if(h){var v=h.next,g=h.previous;delete f.index[h.index],h.removed=!0,g&&(g.next=v),v&&(v.previous=g),f.first===h&&(f.first=v),f.last===h&&(f.last=g),su?f.size--:u.size--}return!!h},forEach:function(u){for(var f=a(this),h=rje(u,arguments.length>1?arguments[1]:void 0),v;v=v?v.next:f.first;)for(h(v.value,v.key,this);v&&v.removed;)v=v.previous},has:function(u){return!!l(this,u)}}),b2(o,r?{get:function(u){var f=l(this,u);return f&&f.value},set:function(u,f){return s(this,u===0?0:u,f)}}:{add:function(u){return s(this,u=u===0?0:u,u)}}),su&&tje(o,"size",{configurable:!0,get:function(){return a(this).size}}),i},setStrong:function(t,e,r){var n=e+" Iterator",i=zb(e),o=zb(n);aje(t,e,function(a,s){w2(this,{type:n,target:a,state:i(a),kind:s,last:void 0})},function(){for(var a=o(this),s=a.kind,l=a.last;l&&l.removed;)l=l.previous;return!a.target||!(a.last=l=l?l.next:a.state.first)?(a.target=void 0,Rh(void 0,!0)):Rh(s==="keys"?l.key:s==="values"?l.value:[l.key,l.value],!1)},r?"entries":"values",!r,!0),sje(e)}},lje=iC,cje=wz;lje("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},cje);var aC=Zt,uje=Pg,dje=Po,fje=of,hje=aC("".charAt),S2=aC("".charCodeAt),vje=aC("".slice),pje=function(t){return function(e,r){var n=dje(fje(e)),i=uje(r),o=n.length,a,s;return i<0||i>=o?t?"":void 0:(a=S2(n,i),a<55296||a>56319||i+1===o||(s=S2(n,i+1))<56320||s>57343?t?hje(n,i):a:t?vje(n,i,i+2):(a-55296<<10)+(s-56320)+65536)}},gje={charAt:pje(!0)},mje=gje.charAt,yje=Po,Sz=Ks,bje=LS,C2=zS,Cz="String Iterator",$je=Sz.set,wje=Sz.getterFor(Cz);bje(String,"String",function(t){$je(this,{type:Cz,string:yje(t),index:0})},function(){var e=wje(this),r=e.string,n=e.index,i;return n>=r.length?C2(void 0,!0):(i=mje(r,n),e.index+=i.length,C2(i,!1))});var Sje=ir,Cje=Sje.Map,xje=Cje,Eje=xje,Oje=Eje,sC=Ot(Oje);class Ije{constructor(){this.clear(),this._defaultIndex=0,this._groupIndex=0,this._defaultGroups=[{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},{border:"#FFA500",background:"#FFFF00",highlight:{border:"#FFA500",background:"#FFFFA3"},hover:{border:"#FFA500",background:"#FFFFA3"}},{border:"#FA0A10",background:"#FB7E81",highlight:{border:"#FA0A10",background:"#FFAFB1"},hover:{border:"#FA0A10",background:"#FFAFB1"}},{border:"#41A906",background:"#7BE141",highlight:{border:"#41A906",background:"#A1EC76"},hover:{border:"#41A906",background:"#A1EC76"}},{border:"#E129F0",background:"#EB7DF4",highlight:{border:"#E129F0",background:"#F0B3F5"},hover:{border:"#E129F0",background:"#F0B3F5"}},{border:"#7C29F0",background:"#AD85E4",highlight:{border:"#7C29F0",background:"#D3BDF0"},hover:{border:"#7C29F0",background:"#D3BDF0"}},{border:"#C37F00",background:"#FFA807",highlight:{border:"#C37F00",background:"#FFCA66"},hover:{border:"#C37F00",background:"#FFCA66"}},{border:"#4220FB",background:"#6E6EFD",highlight:{border:"#4220FB",background:"#9B9BFD"},hover:{border:"#4220FB",background:"#9B9BFD"}},{border:"#FD5A77",background:"#FFC0CB",highlight:{border:"#FD5A77",background:"#FFD1D9"},hover:{border:"#FD5A77",background:"#FFD1D9"}},{border:"#4AD63A",background:"#C2FABC",highlight:{border:"#4AD63A",background:"#E6FFE3"},hover:{border:"#4AD63A",background:"#E6FFE3"}},{border:"#990000",background:"#EE0000",highlight:{border:"#BB0000",background:"#FF3333"},hover:{border:"#BB0000",background:"#FF3333"}},{border:"#FF6000",background:"#FF6000",highlight:{border:"#FF6000",background:"#FF6000"},hover:{border:"#FF6000",background:"#FF6000"}},{border:"#97C2FC",background:"#2B7CE9",highlight:{border:"#D2E5FF",background:"#2B7CE9"},hover:{border:"#D2E5FF",background:"#2B7CE9"}},{border:"#399605",background:"#255C03",highlight:{border:"#399605",background:"#255C03"},hover:{border:"#399605",background:"#255C03"}},{border:"#B70054",background:"#FF007E",highlight:{border:"#B70054",background:"#FF007E"},hover:{border:"#B70054",background:"#FF007E"}},{border:"#AD85E4",background:"#7C29F0",highlight:{border:"#D3BDF0",background:"#7C29F0"},hover:{border:"#D3BDF0",background:"#7C29F0"}},{border:"#4557FA",background:"#000EA1",highlight:{border:"#6E6EFD",background:"#000EA1"},hover:{border:"#6E6EFD",background:"#000EA1"}},{border:"#FFC0CB",background:"#FD5A77",highlight:{border:"#FFD1D9",background:"#FD5A77"},hover:{border:"#FFD1D9",background:"#FD5A77"}},{border:"#C2FABC",background:"#74D66A",highlight:{border:"#E6FFE3",background:"#74D66A"},hover:{border:"#E6FFE3",background:"#74D66A"}},{border:"#EE0000",background:"#990000",highlight:{border:"#FF3333",background:"#BB0000"},hover:{border:"#FF3333",background:"#BB0000"}}],this.options={},this.defaultOptions={useDefaultGroups:!0},Ur(this.options,this.defaultOptions)}setOptions(e){const r=["useDefaultGroups"];if(e!==void 0){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Gt(r).call(r,n)===-1){const i=e[n];this.add(n,i)}}}clear(){this._groups=new sC,this._groupNames=[]}get(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this._groups.get(e);if(n===void 0&&r)if(this.options.useDefaultGroups===!1&&this._groupNames.length>0){const i=this._groupIndex%this._groupNames.length;++this._groupIndex,n={},n.color=this._groups.get(this._groupNames[i]),this._groups.set(e,n)}else{const i=this._defaultIndex%this._defaultGroups.length;this._defaultIndex++,n={},n.color=this._defaultGroups[i],this._groups.set(e,n)}return n}add(e,r){return this._groups.has(e)||this._groupNames.push(e),this._groups.set(e,r),r}}var Tje=xt;Tje({target:"Number",stat:!0},{isNaN:function(e){return e!==e}});var _je=ir,Pje=_je.Number.isNaN,Rje=Pje,Nje=Rje,Mje=Nje,S$=Ot(Mje),Dje=Pr,Aje=Dje.isFinite,jje=Number.isFinite||function(e){return typeof e=="number"&&Aje(e)},kje=xt,Bje=jje;kje({target:"Number",stat:!0},{isFinite:Bje});var Fje=ir,Lje=Fje.Number.isFinite,zje=Lje,Hje=zje,Vje=Hje,os=Ot(Vje),Wje=xt,Kje=Wa.some,Uje=Wc,qje=Uje("some");Wje({target:"Array",proto:!0,forced:!qje},{some:function(e){return Kje(this,e,arguments.length>1?arguments[1]:void 0)}});var Gje=Sn,Xje=Gje("Array").some,Yje=Jr,Jje=Xje,Hb=Array.prototype,Zje=function(t){var e=t.some;return t===Hb||Yje(Hb,t)&&e===Hb.some?Jje:e},Qje=Zje,eke=Qje,tke=eke,rke=Ot(tke),xz={exports:{}},nke=xt,ike=rn,x2=wi.f;nke({target:"Object",stat:!0,forced:Object.defineProperty!==x2,sham:!ike},{defineProperty:x2});var oke=ir,Ez=oke.Object,ake=xz.exports=function(e,r,n){return Ez.defineProperty(e,r,n)};Ez.defineProperty.sham&&(ake.sham=!0);var ske=xz.exports,lke=ske,Oz=lke,cke=Oz,uke=cke,dke=uke,fke=dke,hke=fke,vke=Ot(hke),pke=Lr,gke=wi.f,E2=pke("metadata"),O2=Function.prototype;O2[E2]===void 0&&gke(O2,E2,{value:null});var mke=Rr;mke("asyncDispose");var yke=Rr;yke("dispose");var bke=Rr;bke("metadata");var $ke=mL,wke=$ke,Ske=ao,Cke=Zt,lC=Ske("Symbol"),xke=lC.keyFor,Eke=Cke(lC.prototype.valueOf),Iz=lC.isRegisteredSymbol||function(e){try{return xke(Eke(e))!==void 0}catch{return!1}},Oke=xt,Ike=Iz;Oke({target:"Symbol",stat:!0},{isRegisteredSymbol:Ike});var Tke=Lc,Tz=ao,_ke=Zt,Pke=lf,Rke=Lr,ap=Tz("Symbol"),I2=ap.isWellKnownSymbol,_z=Tz("Object","getOwnPropertyNames"),Nke=_ke(ap.prototype.valueOf),T2=Tke("wks");for(var Vb=0,_2=_z(ap),Mke=_2.length;Vb<Mke;Vb++)try{var P2=_2[Vb];Pke(ap[P2])&&Rke(P2)}catch{}var Pz=function(e){if(I2&&I2(e))return!0;try{for(var r=Nke(e),n=0,i=_z(T2),o=i.length;n<o;n++)if(T2[i[n]]==r)return!0}catch{}return!1},Dke=xt,Ake=Pz;Dke({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Ake});var jke=Rr;jke("matcher");var kke=Rr;kke("observable");var Bke=xt,Fke=Iz;Bke({target:"Symbol",stat:!0},{isRegistered:Fke});var Lke=xt,zke=Pz;Lke({target:"Symbol",stat:!0,forced:!0},{isWellKnown:zke});var Hke=Rr;Hke("metadataKey");var Vke=Rr;Vke("patternMatch");var Wke=Rr;Wke("replaceAll");var Kke=wke,Uke=Kke,qke=Uke,Nh=Ot(qke),Gke=$f,Xke=Gke.f("iterator"),Yke=Xke,Jke=Yke,Zke=Jke,Qke=Zke,eBe=Qke,tBe=eBe,rBe=tBe,nBe=Ot(rBe);function md(t){"@babel/helpers - typeof";return md=typeof Nh=="function"&&typeof nBe=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Nh=="function"&&e.constructor===Nh&&e!==Nh.prototype?"symbol":typeof e},md(t)}var iBe=$f,oBe=iBe.f("toPrimitive"),aBe=oBe,sBe=aBe,lBe=sBe,cBe=lBe,uBe=cBe,dBe=uBe,fBe=dBe,hBe=Ot(fBe);function vBe(t,e){if(md(t)!=="object"||t===null)return t;var r=t[hBe];if(r!==void 0){var n=r.call(t,e);if(md(n)!=="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function pBe(t){var e=vBe(t,"string");return md(e)==="symbol"?e:String(e)}function Ug(t,e,r){return e=pBe(e),e in t?vke(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Rz=Pr,gBe=Jt,mBe=Zt,yBe=Po,bBe=EL.trim,$Be=HS,wBe=mBe("".charAt),sp=Rz.parseFloat,R2=Rz.Symbol,N2=R2&&R2.iterator,SBe=1/sp($Be+"-0")!==-1/0||N2&&!gBe(function(){sp(Object(N2))}),CBe=SBe?function(e){var r=bBe(yBe(e)),n=sp(r);return n===0&&wBe(r,0)==="-"?-0:n}:sp,xBe=xt,M2=CBe;xBe({global:!0,forced:parseFloat!==M2},{parseFloat:M2});var EBe=ir,OBe=EBe.parseFloat,IBe=OBe,TBe=IBe,_Be=TBe,Nz=Ot(_Be),PBe=xt,RBe=Jt,NBe=Dg.f,MBe=RBe(function(){return!Object.getOwnPropertyNames(1)});PBe({target:"Object",stat:!0,forced:MBe},{getOwnPropertyNames:NBe});var DBe=ir,ABe=DBe.Object,jBe=function(e){return ABe.getOwnPropertyNames(e)},kBe=jBe,BBe=kBe,FBe=BBe,LBe=Ot(FBe),zBe=ir,HBe=zBe.Object.getOwnPropertySymbols,VBe=HBe,WBe=VBe,KBe=WBe,Da=Ot(KBe),Mz={exports:{}},UBe=xt,qBe=Jt,GBe=oo,Dz=tf.f,Az=rn,XBe=!Az||qBe(function(){Dz(1)});UBe({target:"Object",stat:!0,forced:XBe,sham:!Az},{getOwnPropertyDescriptor:function(e,r){return Dz(GBe(e),r)}});var YBe=ir,jz=YBe.Object,JBe=Mz.exports=function(e,r){return jz.getOwnPropertyDescriptor(e,r)};jz.getOwnPropertyDescriptor.sham&&(JBe.sham=!0);var ZBe=Mz.exports,QBe=ZBe,eFe=QBe,tFe=eFe,Ka=Ot(tFe),rFe=xt,nFe=rn,iFe=m_e,oFe=oo,aFe=tf,sFe=pf;rFe({target:"Object",stat:!0,sham:!nFe},{getOwnPropertyDescriptors:function(e){for(var r=oFe(e),n=aFe.f,i=iFe(r),o={},a=0,s,l;i.length>a;)l=n(r,s=i[a++]),l!==void 0&&sFe(o,s,l);return o}});var lFe=ir,cFe=lFe.Object.getOwnPropertyDescriptors,uFe=cFe,dFe=uFe,fFe=dFe,Aa=Ot(fFe),kz={exports:{}},hFe=xt,vFe=rn,D2=Ng.f;hFe({target:"Object",stat:!0,forced:Object.defineProperties!==D2,sham:!vFe},{defineProperties:D2});var pFe=ir,Bz=pFe.Object,gFe=kz.exports=function(e,r){return Bz.defineProperties(e,r)};Bz.defineProperties.sham&&(gFe.sham=!0);var mFe=kz.exports,yFe=mFe,bFe=yFe,$Fe=bFe,qg=Ot($Fe),wFe=Oz,Gg=Ot(wFe);function cC(t,e){const r=["node","edge","label"];let n=!0;const i=ua(e,"chosen");if(typeof i=="boolean")n=i;else if(typeof i=="object"){if(Gt(r).call(r,t)===-1)throw new Error("choosify: subOption '"+t+"' should be one of '"+r.join("', '")+"'");const o=ua(e,["chosen",t]);(typeof o=="boolean"||typeof o=="function")&&(n=o)}return n}function C$(t,e,r){if(t.width<=0||t.height<=0)return!1;if(r!==void 0){const o={x:e.x-r.x,y:e.y-r.y};if(r.angle!==0){const a=-r.angle;e={x:Math.cos(a)*o.x-Math.sin(a)*o.y,y:Math.sin(a)*o.x+Math.cos(a)*o.y}}else e=o}const n=t.x+t.width,i=t.y+t.width;return t.left<e.x&&n>e.x&&t.top<e.y&&i>e.y}function lp(t){return typeof t=="string"&&t!==""}function Fz(t,e,r,n){let i=n.x,o=n.y;if(typeof n.distanceToBorder=="function"){const a=n.distanceToBorder(t,e),s=Math.sin(e)*a,l=Math.cos(e)*a;l===a?(i+=a,o=n.y):s===a?(i=n.x,o-=a):(i+=l,o-=s)}else n.shape.width>n.shape.height?(i=n.x+n.shape.width*.5,o=n.y-r):(i=n.x+r,o=n.y-n.shape.height*.5);return{x:i,y:o}}var SFe=Sn,CFe=SFe("Array").values,xFe=CFe,EFe=xFe,OFe=Ws,IFe=wn,TFe=Jr,_Fe=EFe,Wb=Array.prototype,PFe={DOMTokenList:!0,NodeList:!0},RFe=function(t){var e=t.values;return t===Wb||TFe(Wb,t)&&e===Wb.values||IFe(PFe,OFe(t))?_Fe:e},NFe=RFe,Lz=Ot(NFe);class MFe{constructor(e){this.measureText=e,this.current=0,this.width=0,this.height=0,this.lines=[]}_add(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"normal";this.lines[e]===void 0&&(this.lines[e]={width:0,height:0,blocks:[]});let i=r;(r===void 0||r==="")&&(i=" ");const o=this.measureText(i,n),a=Ur({},Lz(o));a.text=r,a.width=o.width,a.mod=n,(r===void 0||r==="")&&(a.width=0),this.lines[e].blocks.push(a),this.lines[e].width+=a.width}curWidth(){const e=this.lines[this.current];return e===void 0?0:e.width}append(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r)}newLine(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal";this._add(this.current,e,r),this.current++}determineLineHeights(){for(let e=0;e<this.lines.length;e++){const r=this.lines[e];let n=0;if(r.blocks!==void 0)for(let i=0;i<r.blocks.length;i++){const o=r.blocks[i];n<o.height&&(n=o.height)}r.height=n}}determineLabelSize(){let e=0,r=0;for(let n=0;n<this.lines.length;n++){const i=this.lines[n];i.width>e&&(e=i.width),r+=i.height}this.width=e,this.height=r}removeEmptyBlocks(){const e=[];for(let r=0;r<this.lines.length;r++){const n=this.lines[r];if(n.blocks.length===0||r===this.lines.length-1&&n.width===0)continue;const i={};Ur(i,n),i.blocks=[];let o;const a=[];for(let s=0;s<n.blocks.length;s++){const l=n.blocks[s];l.width!==0?a.push(l):o===void 0&&(o=l)}a.length===0&&o!==void 0&&a.push(o),i.blocks=a,e.push(i)}return e}finalize(){this.determineLineHeights(),this.determineLabelSize();const e=this.removeEmptyBlocks();return{width:this.width,height:this.height,lines:e}}}const DFe={"<b>":/<b>/,"<i>":/<i>/,"<code>":/<code>/,"</b>":/<\/b>/,"</i>":/<\/i>/,"</code>":/<\/code>/,"*":/\*/,_:/_/,"`":/`/,afterBold:/[^*]/,afterItal:/[^_]/,afterMono:/[^`]/};class A2{constructor(e){this.text=e,this.bold=!1,this.ital=!1,this.mono=!1,this.spacing=!1,this.position=0,this.buffer="",this.modStack=[],this.blocks=[]}mod(){return this.modStack.length===0?"normal":this.modStack[0]}modName(){if(this.modStack.length===0)return"normal";if(this.modStack[0]==="mono")return"mono";if(this.bold&&this.ital)return"boldital";if(this.bold)return"bold";if(this.ital)return"ital"}emitBlock(){this.spacing&&(this.add(" "),this.spacing=!1),this.buffer.length>0&&(this.blocks.push({text:this.buffer,mod:this.modName()}),this.buffer="")}add(e){e===" "&&(this.spacing=!0),this.spacing&&(this.buffer+=" ",this.spacing=!1),e!=" "&&(this.buffer+=e)}parseWS(e){return/[ \t]/.test(e)?(this.mono?this.add(e):this.spacing=!0,!0):!1}setTag(e){this.emitBlock(),this[e]=!0,this.modStack.unshift(e)}unsetTag(e){this.emitBlock(),this[e]=!1,this.modStack.shift()}parseStartTag(e,r){return!this.mono&&!this[e]&&this.match(r)?(this.setTag(e),!0):!1}match(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const[n,i]=this.prepareRegExp(e),o=n.test(this.text.substr(this.position,i));return o&&r&&(this.position+=i-1),o}parseEndTag(e,r,n){let i=this.mod()===e;return e==="mono"?i=i&&this.mono:i=i&&!this.mono,i&&this.match(r)?(n!==void 0?(this.position===this.text.length-1||this.match(n,!1))&&this.unsetTag(e):this.unsetTag(e),!0):!1}replace(e,r){return this.match(e)?(this.add(r),this.position+=length-1,!0):!1}prepareRegExp(e){let r,n;if(e instanceof RegExp)n=e,r=1;else{const i=DFe[e];i!==void 0?n=i:n=new RegExp(e),r=e.length}return[n,r]}}class AFe{constructor(e,r,n,i){this.ctx=e,this.parent=r,this.selected=n,this.hover=i;const o=(a,s)=>{if(a===void 0)return 0;const l=this.parent.getFormattingValues(e,n,i,s);let c=0;return a!==""&&(c=this.ctx.measureText(a).width),{width:c,values:l}};this.lines=new MFe(o)}process(e){if(!lp(e))return this.lines.finalize();const r=this.parent.fontOptions;e=e.replace(/\r\n/g,`
`),e=e.replace(/\r/g,`
`);const n=String(e).split(`
`),i=n.length;if(r.multi)for(let o=0;o<i;o++){const a=this.splitBlocks(n[o],r.multi);if(a!==void 0){if(a.length===0){this.lines.newLine("");continue}if(r.maxWdt>0)for(let s=0;s<a.length;s++){const l=a[s].mod,c=a[s].text;this.splitStringIntoLines(c,l,!0)}else for(let s=0;s<a.length;s++){const l=a[s].mod,c=a[s].text;this.lines.append(c,l)}this.lines.newLine()}}else if(r.maxWdt>0)for(let o=0;o<i;o++)this.splitStringIntoLines(n[o]);else for(let o=0;o<i;o++)this.lines.newLine(n[o]);return this.lines.finalize()}decodeMarkupSystem(e){let r="none";return e==="markdown"||e==="md"?r="markdown":(e===!0||e==="html")&&(r="html"),r}splitHtmlBlocks(e){const r=new A2(e),n=i=>/&/.test(i)?(r.replace(r.text,"&lt;","<")||r.replace(r.text,"&amp;","&")||r.add("&"),!0):!1;for(;r.position<r.text.length;){const i=r.text.charAt(r.position);r.parseWS(i)||/</.test(i)&&(r.parseStartTag("bold","<b>")||r.parseStartTag("ital","<i>")||r.parseStartTag("mono","<code>")||r.parseEndTag("bold","</b>")||r.parseEndTag("ital","</i>")||r.parseEndTag("mono","</code>"))||n(i)||r.add(i),r.position++}return r.emitBlock(),r.blocks}splitMarkdownBlocks(e){const r=new A2(e);let n=!0;const i=o=>/\\/.test(o)?(r.position<this.text.length+1&&(r.position++,o=this.text.charAt(r.position),/ \t/.test(o)?r.spacing=!0:(r.add(o),n=!1)),!0):!1;for(;r.position<r.text.length;){const o=r.text.charAt(r.position);r.parseWS(o)||i(o)||(n||r.spacing)&&(r.parseStartTag("bold","*")||r.parseStartTag("ital","_")||r.parseStartTag("mono","`"))||r.parseEndTag("bold","*","afterBold")||r.parseEndTag("ital","_","afterItal")||r.parseEndTag("mono","`","afterMono")||(r.add(o),n=!1),r.position++}return r.emitBlock(),r.blocks}splitBlocks(e,r){const n=this.decodeMarkupSystem(r);if(n==="none")return[{text:e,mod:"normal"}];if(n==="markdown")return this.splitMarkdownBlocks(e);if(n==="html")return this.splitHtmlBlocks(e)}overMaxWidth(e){const r=this.ctx.measureText(e).width;return this.lines.curWidth()+r>this.parent.fontOptions.maxWdt}getLongestFit(e){let r="",n=0;for(;n<e.length;){const o=r+(r===""?"":" ")+e[n];if(this.overMaxWidth(o))break;r=o,n++}return n}getLongestFitWord(e){let r=0;for(;r<e.length&&!this.overMaxWidth(ho(e).call(e,0,r));)r++;return r}splitStringIntoLines(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"normal",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.parent.getFormattingValues(this.ctx,this.selected,this.hover,r),e=e.replace(/^( +)/g,"$1\r"),e=e.replace(/([^\r][^ ]*)( +)/g,"$1\r$2\r");let i=e.split("\r");for(;i.length>0;){let o=this.getLongestFit(i);if(o===0){const a=i[0],s=this.getLongestFitWord(a);this.lines.newLine(ho(a).call(a,0,s),r),i[0]=ho(a).call(a,s)}else{let a=o;i[o-1]===" "?o--:i[a]===" "&&a++;const s=ho(i).call(i,0,o).join("");o==i.length&&n?this.lines.append(s,r):this.lines.newLine(s,r),i=ho(i).call(i,a)}}}}const lu=["bold","ital","boldital","mono"];class Ll{constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.body=e,this.pointToSelf=!1,this.baseSize=void 0,this.fontOptions={},this.setOptions(r),this.size={top:0,left:0,width:0,height:0,yLine:0},this.isEdgeLabel=n}setOptions(e){if(this.elementOptions=e,this.initFontOptions(e.font),lp(e.label)?this.labelDirty=!0:e.label=void 0,e.font!==void 0&&e.font!==null){if(typeof e.font=="string")this.baseSize=this.fontOptions.size;else if(typeof e.font=="object"){const r=e.font.size;r!==void 0&&(this.baseSize=r)}}}initFontOptions(e){if(At(lu,r=>{this.fontOptions[r]={}}),Ll.parseFontString(this.fontOptions,e)){this.fontOptions.vadjust=0;return}At(e,(r,n)=>{r!=null&&typeof r!="object"&&(this.fontOptions[n]=r)})}static parseFontString(e,r){if(!r||typeof r!="string")return!1;const n=r.split(" ");return e.size=+n[0].replace("px",""),e.face=n[1],e.color=n[2],!0}constrain(e){const r={constrainWidth:!1,maxWdt:-1,minWdt:-1,constrainHeight:!1,minHgt:-1,valign:"middle"},n=ua(e,"widthConstraint");if(typeof n=="number")r.maxWdt=Number(n),r.minWdt=Number(n);else if(typeof n=="object"){const o=ua(e,["widthConstraint","maximum"]);typeof o=="number"&&(r.maxWdt=Number(o));const a=ua(e,["widthConstraint","minimum"]);typeof a=="number"&&(r.minWdt=Number(a))}const i=ua(e,"heightConstraint");if(typeof i=="number")r.minHgt=Number(i);else if(typeof i=="object"){const o=ua(e,["heightConstraint","minimum"]);typeof o=="number"&&(r.minHgt=Number(o));const a=ua(e,["heightConstraint","valign"]);typeof a=="string"&&(a==="top"||a==="bottom")&&(r.valign=a)}return r}update(e,r){this.setOptions(e,!0),this.propagateFonts(r),ur(this.fontOptions,this.constrain(r)),this.fontOptions.chooser=cC("label",r)}adjustSizes(e){const r=e?e.right+e.left:0;this.fontOptions.constrainWidth&&(this.fontOptions.maxWdt-=r,this.fontOptions.minWdt-=r);const n=e?e.top+e.bottom:0;this.fontOptions.constrainHeight&&(this.fontOptions.minHgt-=n)}addFontOptionsToPile(e,r){for(let n=0;n<r.length;++n)this.addFontToPile(e,r[n])}addFontToPile(e,r){if(r===void 0||r.font===void 0||r.font===null)return;const n=r.font;e.push(n)}getBasicOptions(e){const r={};for(let n=0;n<e.length;++n){let i=e[n];const o={};Ll.parseFontString(o,i)&&(i=o),At(i,(a,s)=>{a!==void 0&&(Object.prototype.hasOwnProperty.call(r,s)||(Gt(lu).call(lu,s)!==-1?r[s]={}:r[s]=a))})}return r}getFontOption(e,r,n){let i;for(let o=0;o<e.length;++o){const a=e[o];if(Object.prototype.hasOwnProperty.call(a,r)){if(i=a[r],i==null)continue;const s={};if(Ll.parseFontString(s,i)&&(i=s),Object.prototype.hasOwnProperty.call(i,n))return i[n]}}if(Object.prototype.hasOwnProperty.call(this.fontOptions,n))return this.fontOptions[n];throw new Error("Did not find value for multi-font for property: '"+n+"'")}getFontOptions(e,r){const n={},i=["color","size","face","mod","vadjust"];for(let o=0;o<i.length;++o){const a=i[o];n[a]=this.getFontOption(e,r,a)}return n}propagateFonts(e){const r=[];this.addFontOptionsToPile(r,e),this.fontOptions=this.getBasicOptions(r);for(let n=0;n<lu.length;++n){const i=lu[n],o=this.fontOptions[i],a=this.getFontOptions(r,i);At(a,(s,l)=>{o[l]=s}),o.size=Number(o.size),o.vadjust=Number(o.vadjust)}}draw(e,r,n,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";if(this.elementOptions.label===void 0)return;let s=this.fontOptions.size*this.body.view.scale;this.elementOptions.label&&s<this.elementOptions.scaling.label.drawThreshold-1||(s>=this.elementOptions.scaling.label.maxVisible&&(s=Number(this.elementOptions.scaling.label.maxVisible)/this.body.view.scale),this.calculateLabelSize(e,i,o,r,n,a),this._drawBackground(e),this._drawText(e,r,this.size.yLine,a,s))}_drawBackground(e){if(this.fontOptions.background!==void 0&&this.fontOptions.background!=="none"){e.fillStyle=this.fontOptions.background;const r=this.getSize();e.fillRect(r.left,r.top,r.width,r.height)}}_drawText(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"middle",o=arguments.length>4?arguments[4]:void 0;[r,n]=this._setAlignment(e,r,n,i),e.textAlign="left",r=r-this.size.width/2,this.fontOptions.valign&&this.size.height>this.size.labelHeight&&(this.fontOptions.valign==="top"&&(n-=(this.size.height-this.size.labelHeight)/2),this.fontOptions.valign==="bottom"&&(n+=(this.size.height-this.size.labelHeight)/2));for(let a=0;a<this.lineCount;a++){const s=this.lines[a];if(s&&s.blocks){let l=0;this.isEdgeLabel||this.fontOptions.align==="center"?l+=(this.size.width-s.width)/2:this.fontOptions.align==="right"&&(l+=this.size.width-s.width);for(let c=0;c<s.blocks.length;c++){const u=s.blocks[c];e.font=u.font;const[f,h]=this._getColor(u.color,o,u.strokeColor);u.strokeWidth>0&&(e.lineWidth=u.strokeWidth,e.strokeStyle=h,e.lineJoin="round"),e.fillStyle=f,u.strokeWidth>0&&e.strokeText(u.text,r+l,n+u.vadjust),e.fillText(u.text,r+l,n+u.vadjust),l+=u.width}n+=s.height}}}_setAlignment(e,r,n,i){if(this.isEdgeLabel&&this.fontOptions.align!=="horizontal"&&this.pointToSelf===!1){r=0,n=0;const o=2;this.fontOptions.align==="top"?(e.textBaseline="alphabetic",n-=2*o):this.fontOptions.align==="bottom"?(e.textBaseline="hanging",n+=2*o):e.textBaseline="middle"}else e.textBaseline=i;return[r,n]}_getColor(e,r,n){let i=e||"#000000",o=n||"#ffffff";if(r<=this.elementOptions.scaling.label.drawThreshold){const a=Math.max(0,Math.min(1,1-(this.elementOptions.scaling.label.drawThreshold-r)));i=_i(i,a),o=_i(o,a)}return[i,o]}getTextSize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return this._processLabel(e,r,n),{width:this.size.width,height:this.size.height,lineCount:this.lineCount}}getSize(){let r=this.size.left,n=this.size.top-.5*2;if(this.isEdgeLabel){const o=-this.size.width*.5;switch(this.fontOptions.align){case"middle":r=o,n=-this.size.height*.5;break;case"top":r=o,n=-(this.size.height+2);break;case"bottom":r=o,n=2;break}}return{left:r,top:n,width:this.size.width,height:this.size.height}}calculateLabelSize(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"middle";this._processLabel(e,r,n),this.size.left=i-this.size.width*.5,this.size.top=o-this.size.height*.5,this.size.yLine=o+(1-this.lineCount)*.5*this.fontOptions.size,a==="hanging"&&(this.size.top+=.5*this.fontOptions.size,this.size.top+=4,this.size.yLine+=4)}getFormattingValues(e,r,n,i){const o=function(l,c,u){return c==="normal"?u==="mod"?"":l[u]:l[c][u]!==void 0?l[c][u]:l[u]},a={color:o(this.fontOptions,i,"color"),size:o(this.fontOptions,i,"size"),face:o(this.fontOptions,i,"face"),mod:o(this.fontOptions,i,"mod"),vadjust:o(this.fontOptions,i,"vadjust"),strokeWidth:this.fontOptions.strokeWidth,strokeColor:this.fontOptions.strokeColor};(r||n)&&(i==="normal"&&this.fontOptions.chooser===!0&&this.elementOptions.labelHighlightBold?a.mod="bold":typeof this.fontOptions.chooser=="function"&&this.fontOptions.chooser(a,this.elementOptions.id,r,n));let s="";return a.mod!==void 0&&a.mod!==""&&(s+=a.mod+" "),s+=a.size+"px "+a.face,e.font=s.replace(/"/g,""),a.font=e.font,a.height=a.size,a}differentState(e,r){return e!==this.selectedState||r!==this.hoverState}_processLabelText(e,r,n,i){return new AFe(e,this,r,n).process(i)}_processLabel(e,r,n){if(this.labelDirty===!1&&!this.differentState(r,n))return;const i=this._processLabelText(e,r,n,this.elementOptions.label);this.fontOptions.minWdt>0&&i.width<this.fontOptions.minWdt&&(i.width=this.fontOptions.minWdt),this.size.labelHeight=i.height,this.fontOptions.minHgt>0&&i.height<this.fontOptions.minHgt&&(i.height=this.fontOptions.minHgt),this.lines=i.lines,this.lineCount=i.lines.length,this.size.width=i.width,this.size.height=i.height,this.selectedState=r,this.hoverState=n,this.labelDirty=!1}visible(){return!(this.size.width===0||this.size.height===0||this.elementOptions.label===void 0||this.fontOptions.size*this.body.view.scale<this.elementOptions.scaling.label.drawThreshold-1)}}class qs{constructor(e,r,n){this.body=r,this.labelModule=n,this.setOptions(e),this.top=void 0,this.left=void 0,this.height=void 0,this.width=void 0,this.radius=void 0,this.margin=void 0,this.refreshNeeded=!0,this.boundingBox={top:0,left:0,right:0,bottom:0}}setOptions(e){this.options=e}_setMargins(e){this.margin={},this.options.margin&&(typeof this.options.margin=="object"?(this.margin.top=this.options.margin.top,this.margin.right=this.options.margin.right,this.margin.bottom=this.options.margin.bottom,this.margin.left=this.options.margin.left):(this.margin.top=this.options.margin,this.margin.right=this.options.margin,this.margin.bottom=this.options.margin,this.margin.left=this.options.margin)),e.adjustSizes(this.margin)}_distanceToBorder(e,r){const n=this.options.borderWidth;return e&&this.resize(e),Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+n}enableShadow(e,r){r.shadow&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}disableShadow(e,r){r.shadow&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}enableBorderDashes(e,r){if(r.borderDashes!==!1)if(e.setLineDash!==void 0){let n=r.borderDashes;n===!0&&(n=[5,15]),e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1}disableBorderDashes(e,r){r.borderDashes!==!1&&(e.setLineDash!==void 0?e.setLineDash([0]):(console.warn("setLineDash is not supported in this browser. The dashed borders cannot be used."),this.options.shapeProperties.borderDashes=!1,r.borderDashes=!1))}needsRefresh(e,r){return this.refreshNeeded===!0?(this.refreshNeeded=!1,!0):this.width===void 0||this.labelModule.differentState(e,r)}initContextForDraw(e,r){const n=r.borderWidth/this.body.view.scale;e.lineWidth=Math.min(this.width,n),e.strokeStyle=r.borderColor,e.fillStyle=r.color}performStroke(e,r){const n=r.borderWidth/this.body.view.scale;e.save(),n>0&&(this.enableBorderDashes(e,r),e.stroke(),this.disableBorderDashes(e,r)),e.restore()}performFill(e,r){e.save(),e.fillStyle=r.color,this.enableShadow(e,r),xf(e).call(e),this.disableShadow(e,r),e.restore(),this.performStroke(e,r)}_addBoundingBoxMargin(e){this.boundingBox.left-=e,this.boundingBox.top-=e,this.boundingBox.bottom+=e,this.boundingBox.right+=e}_updateBoundingBox(e,r,n,i,o){n!==void 0&&this.resize(n,i,o),this.left=e-this.width/2,this.top=r-this.height/2,this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width}updateBoundingBox(e,r,n,i,o){this._updateBoundingBox(e,r,n,i,o)}getDimensionsFromLabel(e,r,n){this.textSize=this.labelModule.getTextSize(e,r,n);let i=this.textSize.width,o=this.textSize.height;const a=14;return i===0&&(i=a,o=a),{width:i,height:o}}}let jFe=class extends qs{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const i=this.getDimensionsFromLabel(e,r,n);this.width=i.width+this.margin.right+this.margin.left,this.height=i.height+this.margin.top+this.margin.bottom,this.radius=this.width/2}}draw(e,r,n,i,o,a){this.resize(e,i,o),this.left=r-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),wF(e,this.left,this.top,this.width,this.height,a.borderRadius),this.performFill(e,a),this.updateBoundingBox(r,n,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}updateBoundingBox(e,r,n,i,o){this._updateBoundingBox(e,r,n,i,o);const a=this.options.shapeProperties.borderRadius;this._addBoundingBoxMargin(a)}distanceToBorder(e,r){e&&this.resize(e);const n=this.options.borderWidth;return Math.min(Math.abs(this.width/2/Math.cos(r)),Math.abs(this.height/2/Math.sin(r)))+n}};class uC extends qs{constructor(e,r,n){super(e,r,n),this.labelOffset=0,this.selected=!1}setOptions(e,r,n){this.options=e,r===void 0&&n===void 0||this.setImages(r,n)}setImages(e,r){r&&this.selected?(this.imageObj=r,this.imageObjAlt=e):(this.imageObj=e,this.imageObjAlt=r)}switchImages(e){const r=e&&!this.selected||!e&&this.selected;if(this.selected=e,this.imageObjAlt!==void 0&&r){const n=this.imageObj;this.imageObj=this.imageObjAlt,this.imageObjAlt=n}}_getImagePadding(){const e={top:0,right:0,bottom:0,left:0};if(this.options.imagePadding){const r=this.options.imagePadding;typeof r=="object"?(e.top=r.top,e.right=r.right,e.bottom=r.bottom,e.left=r.left):(e.top=r,e.right=r,e.bottom=r,e.left=r)}return e}_resizeImage(){let e,r;if(this.options.shapeProperties.useImageSize===!1){let n=1,i=1;this.imageObj.width&&this.imageObj.height&&(this.imageObj.width>this.imageObj.height?n=this.imageObj.width/this.imageObj.height:i=this.imageObj.height/this.imageObj.width),e=this.options.size*2*n,r=this.options.size*2*i}else{const n=this._getImagePadding();e=this.imageObj.width+n.left+n.right,r=this.imageObj.height+n.top+n.bottom}this.width=e,this.height=r,this.radius=.5*this.width}_drawRawCircle(e,r,n,i){this.initContextForDraw(e,i),RS(e,r,n,i.size),this.performFill(e,i)}_drawImageAtPosition(e,r){if(this.imageObj.width!=0){e.globalAlpha=r.opacity!==void 0?r.opacity:1,this.enableShadow(e,r);let n=1;this.options.shapeProperties.interpolation===!0&&(n=this.imageObj.width/this.width/this.body.view.scale);const i=this._getImagePadding(),o=this.left+i.left,a=this.top+i.top,s=this.width-i.left-i.right,l=this.height-i.top-i.bottom;this.imageObj.drawImageAtPosition(e,n,o,a,s,l),this.disableShadow(e,r)}}_drawImageLabel(e,r,n,i,o){let a=0;if(this.height!==void 0){a=this.height*.5;const l=this.labelModule.getTextSize(e,i,o);l.lineCount>=1&&(a+=l.height/2)}const s=n+a;this.options.label&&(this.labelOffset=a),this.labelModule.draw(e,r,s,i,o,"hanging")}}let kFe=class extends uC{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const i=this.getDimensionsFromLabel(e,r,n),o=Math.max(i.width+this.margin.right+this.margin.left,i.height+this.margin.top+this.margin.bottom);this.options.size=o/2,this.width=o,this.height=o,this.radius=this.width/2}}draw(e,r,n,i,o,a){this.resize(e,i,o),this.left=r-this.width/2,this.top=n-this.height/2,this._drawRawCircle(e,r,n,a),this.updateBoundingBox(r,n),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,n,i,o)}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size}distanceToBorder(e){return e&&this.resize(e),this.width*.5}};class BFe extends uC{constructor(e,r,n,i,o){super(e,r,n),this.setImages(i,o)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o,this.radius=.5*this.width;return}this.needsRefresh(r,n)&&this._resizeImage()}draw(e,r,n,i,o,a){this.switchImages(i),this.resize();let s=r,l=n;this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=r,this.top=n,s+=this.width/2,l+=this.height/2):(this.left=r-this.width/2,this.top=n-this.height/2),this._drawRawCircle(e,s,l,a),e.save(),e.clip(),this._drawImageAtPosition(e,a),e.restore(),this._drawImageLabel(e,s,l,i,o),this.updateBoundingBox(r,n)}updateBoundingBox(e,r){this.options.shapeProperties.coordinateOrigin==="top-left"?(this.boundingBox.top=r,this.boundingBox.left=e,this.boundingBox.right=e+this.options.size*2,this.boundingBox.bottom=r+this.options.size*2):(this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size),this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset)}distanceToBorder(e){return e&&this.resize(e),this.width*.5}}class Ua extends qs{constructor(e,r,n){super(e,r,n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{size:this.options.size};if(this.needsRefresh(r,n)){var o,a;this.labelModule.getTextSize(e,r,n);const s=2*i.size;this.width=(o=this.customSizeWidth)!==null&&o!==void 0?o:s,this.height=(a=this.customSizeHeight)!==null&&a!==void 0?a:s,this.radius=.5*this.width}}_drawShape(e,r,n,i,o,a,s,l){return this.resize(e,a,s,l),this.left=i-this.width/2,this.top=o-this.height/2,this.initContextForDraw(e,l),Cxe(r)(e,i,o,l.size),this.performFill(e,l),this.options.icon!==void 0&&this.options.icon.code!==void 0&&(e.font=(a?"bold ":"")+this.height/2+"px "+(this.options.icon.face||"FontAwesome"),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",e.fillText(this.options.icon.code,i,o)),{drawExternalLabel:()=>{if(this.options.label!==void 0){this.labelModule.calculateLabelSize(e,a,s,i,o,"hanging");const c=o+.5*this.height+.5*this.labelModule.size.height;this.labelModule.draw(e,i,c,a,s,"hanging")}this.updateBoundingBox(i,o)}}}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.size,this.boundingBox.left=e-this.options.size,this.boundingBox.right=e+this.options.size,this.boundingBox.bottom=r+this.options.size,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height))}}function j2(t,e){var r=Or(t);if(Da){var n=Da(t);e&&(n=ti(n).call(n,function(i){return Ka(t,i).enumerable})),r.push.apply(r,n)}return r}function FFe(t){for(var e=1;e<arguments.length;e++){var r,n,i=arguments[e]!=null?arguments[e]:{};e%2?lr(r=j2(Object(i),!0)).call(r,function(o){Ug(t,o,i[o])}):Aa?qg(t,Aa(i)):lr(n=j2(Object(i))).call(n,function(o){Gg(t,o,Ka(i,o))})}return t}class LFe extends Ua{constructor(e,r,n,i){super(e,r,n,i),this.ctxRenderer=i}draw(e,r,n,i,o,a){this.resize(e,i,o,a),this.left=r-this.width/2,this.top=n-this.height/2,e.save();const s=this.ctxRenderer({ctx:e,id:this.options.id,x:r,y:n,state:{selected:i,hover:o},style:FFe({},a),label:this.options.label});if(s.drawNode!=null&&s.drawNode(),e.restore(),s.drawExternalLabel){const l=s.drawExternalLabel;s.drawExternalLabel=()=>{e.save(),l(),e.restore()}}return s.nodeDimensions&&(this.customSizeWidth=s.nodeDimensions.width,this.customSizeHeight=s.nodeDimensions.height),s}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class zFe extends qs{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){if(this.needsRefresh(r,n)){const o=this.getDimensionsFromLabel(e,r,n).width+this.margin.right+this.margin.left;this.width=o,this.height=o,this.radius=this.width/2}}draw(e,r,n,i,o,a){this.resize(e,i,o),this.left=r-this.width/2,this.top=n-this.height/2,this.initContextForDraw(e,a),SF(e,r-this.width/2,n-this.height/2,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(r,n,e,i,o),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let HFe=class extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"diamond",4,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class VFe extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"circle",2,r,n,i,o,a)}distanceToBorder(e){return e&&this.resize(e),this.options.size}}class k2 extends qs{constructor(e,r,n){super(e,r,n)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.needsRefresh(r,n)){const i=this.getDimensionsFromLabel(e,r,n);this.height=i.height*2,this.width=i.width+i.height,this.radius=.5*this.width}}draw(e,r,n,i,o,a){this.resize(e,i,o),this.left=r-this.width*.5,this.top=n-this.height*.5,this.initContextForDraw(e,a),Q1(e,this.left,this.top,this.width,this.height),this.performFill(e,a),this.updateBoundingBox(r,n,e,i,o),this.labelModule.draw(e,r,n,i,o)}distanceToBorder(e,r){e&&this.resize(e);const n=this.width*.5,i=this.height*.5,o=Math.sin(r)*n,a=Math.cos(r)*i;return n*i/Math.sqrt(o*o+a*a)}}class WFe extends qs{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){this.needsRefresh(r,n)&&(this.iconSize={width:Number(this.options.icon.size),height:Number(this.options.icon.size)},this.width=this.iconSize.width+this.margin.right+this.margin.left,this.height=this.iconSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,r,n,i,o,a){return this.resize(e,i,o),this.options.icon.size=this.options.icon.size||50,this.left=r-this.width/2,this.top=n-this.height/2,this._icon(e,r,n,i,o,a),{drawExternalLabel:()=>{this.options.label!==void 0&&this.labelModule.draw(e,this.left+this.iconSize.width/2+this.margin.left,n+this.height/2+5,i),this.updateBoundingBox(r,n)}}}updateBoundingBox(e,r){this.boundingBox.top=r-this.options.icon.size*.5,this.boundingBox.left=e-this.options.icon.size*.5,this.boundingBox.right=e+this.options.icon.size*.5,this.boundingBox.bottom=r+this.options.icon.size*.5,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelModule.size.height+5))}_icon(e,r,n,i,o,a){const s=Number(this.options.icon.size);this.options.icon.code!==void 0?(e.font=[this.options.icon.weight!=null?this.options.icon.weight:i?"bold":"",(this.options.icon.weight!=null&&i?5:0)+s+"px",this.options.icon.face].join(" "),e.fillStyle=this.options.icon.color||"black",e.textAlign="center",e.textBaseline="middle",this.enableShadow(e,a),e.fillText(this.options.icon.code,r,n),this.disableShadow(e,a)):console.error("When using the icon shape, you need to define the code in the icon options object. This can be done per node or globally.")}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let KFe=class extends uC{constructor(e,r,n,i,o){super(e,r,n),this.setImages(i,o)}resize(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.selected,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.hover;if(this.imageObj.src===void 0||this.imageObj.width===void 0||this.imageObj.height===void 0){const o=this.options.size*2;this.width=o,this.height=o;return}this.needsRefresh(r,n)&&this._resizeImage()}draw(e,r,n,i,o,a){e.save(),this.switchImages(i),this.resize();let s=r,l=n;if(this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=r,this.top=n,s+=this.width/2,l+=this.height/2):(this.left=r-this.width/2,this.top=n-this.height/2),this.options.shapeProperties.useBorderWithImage===!0){const c=this.options.borderWidth,u=this.options.borderWidthSelected||2*this.options.borderWidth,f=(i?u:c)/this.body.view.scale;e.lineWidth=Math.min(this.width,f),e.beginPath();let h=i?this.options.color.highlight.border:o?this.options.color.hover.border:this.options.color.border,v=i?this.options.color.highlight.background:o?this.options.color.hover.background:this.options.color.background;a.opacity!==void 0&&(h=_i(h,a.opacity),v=_i(v,a.opacity)),e.strokeStyle=h,e.fillStyle=v,e.rect(this.left-.5*e.lineWidth,this.top-.5*e.lineWidth,this.width+e.lineWidth,this.height+e.lineWidth),xf(e).call(e),this.performStroke(e,a),e.closePath()}this._drawImageAtPosition(e,a),this._drawImageLabel(e,s,l,i,o),this.updateBoundingBox(r,n),e.restore()}updateBoundingBox(e,r){this.resize(),this.options.shapeProperties.coordinateOrigin==="top-left"?(this.left=e,this.top=r):(this.left=e-this.width/2,this.top=r-this.height/2),this.boundingBox.left=this.left,this.boundingBox.top=this.top,this.boundingBox.bottom=this.top+this.height,this.boundingBox.right=this.left+this.width,this.options.label!==void 0&&this.labelModule.size.width>0&&(this.boundingBox.left=Math.min(this.boundingBox.left,this.labelModule.size.left),this.boundingBox.right=Math.max(this.boundingBox.right,this.labelModule.size.left+this.labelModule.size.width),this.boundingBox.bottom=Math.max(this.boundingBox.bottom,this.boundingBox.bottom+this.labelOffset))}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class UFe extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"square",2,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class qFe extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"hexagon",4,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class GFe extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"star",4,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}class XFe extends qs{constructor(e,r,n){super(e,r,n),this._setMargins(n)}resize(e,r,n){this.needsRefresh(r,n)&&(this.textSize=this.labelModule.getTextSize(e,r,n),this.width=this.textSize.width+this.margin.right+this.margin.left,this.height=this.textSize.height+this.margin.top+this.margin.bottom,this.radius=.5*this.width)}draw(e,r,n,i,o,a){this.resize(e,i,o),this.left=r-this.width/2,this.top=n-this.height/2,this.enableShadow(e,a),this.labelModule.draw(e,this.left+this.textSize.width/2+this.margin.left,this.top+this.textSize.height/2+this.margin.top,i,o),this.disableShadow(e,a),this.updateBoundingBox(r,n,e,i,o)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}let YFe=class extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"triangle",3,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}};class JFe extends Ua{constructor(e,r,n){super(e,r,n)}draw(e,r,n,i,o,a){return this._drawShape(e,"triangleDown",3,r,n,i,o,a)}distanceToBorder(e,r){return this._distanceToBorder(e,r)}}function B2(t,e){var r=Or(t);if(Da){var n=Da(t);e&&(n=ti(n).call(n,function(i){return Ka(t,i).enumerable})),r.push.apply(r,n)}return r}function F2(t){for(var e=1;e<arguments.length;e++){var r,n,i=arguments[e]!=null?arguments[e]:{};e%2?lr(r=B2(Object(i),!0)).call(r,function(o){Ug(t,o,i[o])}):Aa?qg(t,Aa(i)):lr(n=B2(Object(i))).call(n,function(o){Gg(t,o,Ka(i,o))})}return t}class pr{constructor(e,r,n,i,o,a){this.options=Oa(o),this.globalOptions=o,this.defaultOptions=a,this.body=r,this.edges=[],this.id=void 0,this.imagelist=n,this.grouplist=i,this.x=void 0,this.y=void 0,this.baseSize=this.options.size,this.baseFontSize=this.options.font.size,this.predefinedPosition=!1,this.selected=!1,this.hover=!1,this.labelModule=new Ll(this.body,this.options,!1),this.setOptions(e)}attachEdge(e){var r;Gt(r=this.edges).call(r,e)===-1&&this.edges.push(e)}detachEdge(e){var r;const n=Gt(r=this.edges).call(r,e);if(n!=-1){var i;Ho(i=this.edges).call(i,n,1)}}setOptions(e){const r=this.options.shape;if(!e)return;if(typeof e.color<"u"&&(this._localColor=e.color),e.id!==void 0&&(this.id=e.id),this.id===void 0)throw new Error("Node must have an id");pr.checkMass(e,this.id),e.x!==void 0&&(e.x===null?(this.x=void 0,this.predefinedPosition=!1):(this.x=Wi(e.x),this.predefinedPosition=!0)),e.y!==void 0&&(e.y===null?(this.y=void 0,this.predefinedPosition=!1):(this.y=Wi(e.y),this.predefinedPosition=!0)),e.size!==void 0&&(this.baseSize=e.size),e.value!==void 0&&(e.value=Nz(e.value)),pr.parseOptions(this.options,e,!0,this.globalOptions,this.grouplist);const n=[e,this.options,this.defaultOptions];return this.chooser=cC("node",n),this._load_images(),this.updateLabelModule(e),e.opacity!==void 0&&pr.checkOpacity(e.opacity)&&(this.options.opacity=e.opacity),this.updateShape(r),e.hidden!==void 0||e.physics!==void 0}_load_images(){if((this.options.shape==="circularImage"||this.options.shape==="image")&&this.options.image===void 0)throw new Error("Option image must be defined for node type '"+this.options.shape+"'");if(this.options.image!==void 0){if(this.imagelist===void 0)throw new Error("Internal Error: No images provided");if(typeof this.options.image=="string")this.imageObj=this.imagelist.load(this.options.image,this.options.brokenImage,this.id);else{if(this.options.image.unselected===void 0)throw new Error("No unselected image provided");this.imageObj=this.imagelist.load(this.options.image.unselected,this.options.brokenImage,this.id),this.options.image.selected!==void 0?this.imageObjAlt=this.imagelist.load(this.options.image.selected,this.options.brokenImage,this.id):this.imageObjAlt=void 0}}}static checkOpacity(e){return 0<=e&&e<=1}static checkCoordinateOrigin(e){return e===void 0||e==="center"||e==="top-left"}static updateGroupOptions(e,r,n){var i;if(n===void 0)return;const o=e.group;if(r!==void 0&&r.group!==void 0&&o!==r.group)throw new Error("updateGroupOptions: group values in options don't match.");if(!(typeof o=="number"||typeof o=="string"&&o!=""))return;const s=n.get(o);s.opacity!==void 0&&r.opacity===void 0&&(pr.checkOpacity(s.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+s.opacity),s.opacity=void 0));const l=ti(i=LBe(r)).call(i,c=>r[c]!=null);l.push("font"),ip(l,e,s),e.color=y$(e.color)}static parseOptions(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0;if(ip(["color","fixed","shadow"],e,r,n),pr.checkMass(r),e.opacity!==void 0&&(pr.checkOpacity(e.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity),e.opacity=void 0)),r.opacity!==void 0&&(pr.checkOpacity(r.opacity)||(console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+r.opacity),r.opacity=void 0)),r.shapeProperties&&!pr.checkCoordinateOrigin(r.shapeProperties.coordinateOrigin)&&console.error("Invalid option for node coordinateOrigin, found: "+r.shapeProperties.coordinateOrigin),Ti(e,r,"shadow",i),r.color!==void 0&&r.color!==null){const s=y$(r.color);nz(e.color,s)}else n===!0&&r.color===null&&(e.color=Oa(i.color));r.fixed!==void 0&&r.fixed!==null&&(typeof r.fixed=="boolean"?(e.fixed.x=r.fixed,e.fixed.y=r.fixed):(r.fixed.x!==void 0&&typeof r.fixed.x=="boolean"&&(e.fixed.x=r.fixed.x),r.fixed.y!==void 0&&typeof r.fixed.y=="boolean"&&(e.fixed.y=r.fixed.y))),n===!0&&r.font===null&&(e.font=Oa(i.font)),pr.updateGroupOptions(e,r,o),r.scaling!==void 0&&Ti(e.scaling,r.scaling,"label",i.scaling)}getFormattingValues(){const e={color:this.options.color.background,opacity:this.options.opacity,borderWidth:this.options.borderWidth,borderColor:this.options.color.border,size:this.options.size,borderDashes:this.options.shapeProperties.borderDashes,borderRadius:this.options.shapeProperties.borderRadius,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y};if(this.selected||this.hover?this.chooser===!0?this.selected?(this.options.borderWidthSelected!=null?e.borderWidth=this.options.borderWidthSelected:e.borderWidth*=2,e.color=this.options.color.highlight.background,e.borderColor=this.options.color.highlight.border,e.shadow=this.options.shadow.enabled):this.hover&&(e.color=this.options.color.hover.background,e.borderColor=this.options.color.hover.border,e.shadow=this.options.shadow.enabled):typeof this.chooser=="function"&&(this.chooser(e,this.options.id,this.selected,this.hover),e.shadow===!1&&(e.shadowColor!==this.options.shadow.color||e.shadowSize!==this.options.shadow.size||e.shadowX!==this.options.shadow.x||e.shadowY!==this.options.shadow.y)&&(e.shadow=!0)):e.shadow=this.options.shadow.enabled,this.options.opacity!==void 0){const r=this.options.opacity;e.borderColor=_i(e.borderColor,r),e.color=_i(e.color,r),e.shadowColor=_i(e.shadowColor,r)}return e}updateLabelModule(e){(this.options.label===void 0||this.options.label===null)&&(this.options.label=""),pr.updateGroupOptions(this.options,F2(F2({},e),{},{color:e&&e.color||this._localColor||void 0}),this.grouplist);const r=this.grouplist.get(this.options.group,!1),n=[e,this.options,r,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,n),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateShape(e){if(e===this.options.shape&&this.shape)this.shape.setOptions(this.options,this.imageObj,this.imageObjAlt);else switch(this.options.shape){case"box":this.shape=new jFe(this.options,this.body,this.labelModule);break;case"circle":this.shape=new kFe(this.options,this.body,this.labelModule);break;case"circularImage":this.shape=new BFe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"custom":this.shape=new LFe(this.options,this.body,this.labelModule,this.options.ctxRenderer);break;case"database":this.shape=new zFe(this.options,this.body,this.labelModule);break;case"diamond":this.shape=new HFe(this.options,this.body,this.labelModule);break;case"dot":this.shape=new VFe(this.options,this.body,this.labelModule);break;case"ellipse":this.shape=new k2(this.options,this.body,this.labelModule);break;case"icon":this.shape=new WFe(this.options,this.body,this.labelModule);break;case"image":this.shape=new KFe(this.options,this.body,this.labelModule,this.imageObj,this.imageObjAlt);break;case"square":this.shape=new UFe(this.options,this.body,this.labelModule);break;case"hexagon":this.shape=new qFe(this.options,this.body,this.labelModule);break;case"star":this.shape=new GFe(this.options,this.body,this.labelModule);break;case"text":this.shape=new XFe(this.options,this.body,this.labelModule);break;case"triangle":this.shape=new YFe(this.options,this.body,this.labelModule);break;case"triangleDown":this.shape=new JFe(this.options,this.body,this.labelModule);break;default:this.shape=new k2(this.options,this.body,this.labelModule);break}this.needsRefresh()}select(){this.selected=!0,this.needsRefresh()}unselect(){this.selected=!1,this.needsRefresh()}needsRefresh(){this.shape.refreshNeeded=!0}getTitle(){return this.options.title}distanceToBorder(e,r){return this.shape.distanceToBorder(e,r)}isFixed(){return this.options.fixed.x&&this.options.fixed.y}isSelected(){return this.selected}getValue(){return this.options.value}getLabelSize(){return this.labelModule.size()}setValueRange(e,r,n){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,r,n,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const a=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*a}this.options.size=this.options.scaling.min+i*o}else this.options.size=this.baseSize,this.options.font.size=this.baseFontSize;this.updateLabelModule()}draw(e){const r=this.getFormattingValues();return this.shape.draw(e,this.x,this.y,this.selected,this.hover,r)||{}}updateBoundingBox(e){this.shape.updateBoundingBox(this.x,this.y,e)}resize(e){const r=this.getFormattingValues();this.shape.resize(e,this.selected,this.hover,r)}getItemsOnPoint(e){const r=[];return this.labelModule.visible()&&C$(this.labelModule.getSize(),e)&&r.push({nodeId:this.id,labelId:0}),C$(this.shape.boundingBox,e)&&r.push({nodeId:this.id}),r}isOverlappingWith(e){return this.shape.left<e.right&&this.shape.left+this.shape.width>e.left&&this.shape.top<e.bottom&&this.shape.top+this.shape.height>e.top}isBoundingBoxOverlappingWith(e){return this.shape.boundingBox.left<e.right&&this.shape.boundingBox.right>e.left&&this.shape.boundingBox.top<e.bottom&&this.shape.boundingBox.bottom>e.top}static checkMass(e,r){if(e.mass!==void 0&&e.mass<=0){let n="";r!==void 0&&(n=" in node id: "+r),console.error("%cNegative or zero mass disallowed"+n+", setting mass to 1.",sz),e.mass=1}}}class ZFe{constructor(e,r,n,i){var o;if(this.body=e,this.images=r,this.groups=n,this.layoutEngine=i,this.body.functions.createNode=je(o=this.create).call(o,this),this.nodesListeners={add:(a,s)=>{this.add(s.items)},update:(a,s)=>{this.update(s.items,s.data,s.oldData)},remove:(a,s)=>{this.remove(s.items)}},this.defaultOptions={borderWidth:1,borderWidthSelected:void 0,brokenImage:void 0,color:{border:"#2B7CE9",background:"#97C2FC",highlight:{border:"#2B7CE9",background:"#D2E5FF"},hover:{border:"#2B7CE9",background:"#D2E5FF"}},opacity:void 0,fixed:{x:!1,y:!1},font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:0,strokeColor:"#ffffff",align:"center",vadjust:0,multi:!1,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"monospace",vadjust:2}},group:void 0,hidden:!1,icon:{face:"FontAwesome",code:void 0,size:50,color:"#2B7CE9"},image:void 0,imagePadding:{top:0,right:0,bottom:0,left:0},label:void 0,labelHighlightBold:!0,level:void 0,margin:{top:5,right:5,bottom:5,left:5},mass:1,physics:!0,scaling:{min:10,max:30,label:{enabled:!1,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(a,s,l,c){if(s===a)return .5;{const u=1/(s-a);return Math.max(0,(c-a)*u)}}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},shape:"ellipse",shapeProperties:{borderDashes:!1,borderRadius:6,interpolation:!0,useImageSize:!1,useBorderWithImage:!1,coordinateOrigin:"center"},size:25,title:void 0,value:void 0,x:void 0,y:void 0},this.defaultOptions.mass<=0)throw"Internal error: mass in defaultOptions of NodesHandler may not be zero or negative";this.options=Oa(this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e,r;this.body.emitter.on("refreshNodes",je(e=this.refresh).call(e,this)),this.body.emitter.on("refresh",je(r=this.refresh).call(r,this)),this.body.emitter.on("destroy",()=>{At(this.nodesListeners,(n,i)=>{this.body.data.nodes&&this.body.data.nodes.off(i,n)}),delete this.body.functions.createNode,delete this.nodesListeners.add,delete this.nodesListeners.update,delete this.nodesListeners.remove,delete this.nodesListeners})}setOptions(e){if(e!==void 0){if(pr.parseOptions(this.options,e),e.opacity!==void 0&&(S$(e.opacity)||!os(e.opacity)||e.opacity<0||e.opacity>1?console.error("Invalid option for node opacity. Value must be between 0 and 1, found: "+e.opacity):this.options.opacity=e.opacity),e.shape!==void 0)for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].updateShape();if(typeof e.font<"u"||typeof e.widthConstraint<"u"||typeof e.heightConstraint<"u")for(const r of Or(this.body.nodes))this.body.nodes[r].updateLabelModule(),this.body.nodes[r].needsRefresh();if(e.size!==void 0)for(const r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&this.body.nodes[r].needsRefresh();(e.hidden!==void 0||e.physics!==void 0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.nodes;if(rF("id",e))this.body.data.nodes=e;else if(Ir(e))this.body.data.nodes=new Yv,this.body.data.nodes.add(e);else if(!e)this.body.data.nodes=new Yv;else throw new TypeError("Array or DataSet expected");if(n&&At(this.nodesListeners,function(i,o){n.off(o,i)}),this.body.nodes={},this.body.data.nodes){const i=this;At(this.nodesListeners,function(a,s){i.body.data.nodes.on(s,a)});const o=this.body.data.nodes.getIds();this.add(o,!0)}r===!1&&this.body.emitter.emit("_dataChanged")}add(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n;const i=[];for(let o=0;o<e.length;o++){n=e[o];const a=this.body.data.nodes.get(n),s=this.create(a);i.push(s),this.body.nodes[n]=s}this.layoutEngine.positionInitially(i),r===!1&&this.body.emitter.emit("_dataChanged")}update(e,r,n){const i=this.body.nodes;let o=!1;for(let a=0;a<e.length;a++){const s=e[a];let l=i[s];const c=r[a];l!==void 0?l.setOptions(c)&&(o=!0):(o=!0,l=this.create(c),i[s]=l)}!o&&n!==void 0&&(o=rke(r).call(r,function(a,s){const l=n[s];return l&&l.level!==a.level})),o===!0?this.body.emitter.emit("_dataChanged"):this.body.emitter.emit("_dataUpdated")}remove(e){const r=this.body.nodes;for(let n=0;n<e.length;n++){const i=e[n];delete r[i]}this.body.emitter.emit("_dataChanged")}create(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr;return new r(e,this.body,this.images,this.groups,this.options,this.defaultOptions)}refresh(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;At(this.body.nodes,(r,n)=>{const i=this.body.data.nodes.get(n);i!==void 0&&(e===!0&&r.setOptions({x:null,y:null}),r.setOptions({fixed:!1}),r.setOptions(i))})}getPositions(e){const r={};if(e!==void 0){if(Ir(e)===!0){for(let n=0;n<e.length;n++)if(this.body.nodes[e[n]]!==void 0){const i=this.body.nodes[e[n]];r[e[n]]={x:Math.round(i.x),y:Math.round(i.y)}}}else if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];r[e]={x:Math.round(n.x),y:Math.round(n.y)}}}else for(let n=0;n<this.body.nodeIndices.length;n++){const i=this.body.nodes[this.body.nodeIndices[n]];r[this.body.nodeIndices[n]]={x:Math.round(i.x),y:Math.round(i.y)}}return r}getPosition(e){if(e==null)throw new TypeError("No id was specified for getPosition method.");if(this.body.nodes[e]==null)throw new ReferenceError("NodeId provided for getPosition does not exist. Provided: ".concat(e));return{x:Math.round(this.body.nodes[e].x),y:Math.round(this.body.nodes[e].y)}}storePositions(){const e=[],r=this.body.data.nodes.getDataSet();for(const n of r.get()){const i=n.id,o=this.body.nodes[i],a=Math.round(o.x),s=Math.round(o.y);(n.x!==a||n.y!==s)&&e.push({id:i,x:a,y:s})}r.update(e)}getBoundingBox(e){if(this.body.nodes[e]!==void 0)return this.body.nodes[e].shape.boundingBox}getConnectedNodes(e,r){const n=[];if(this.body.nodes[e]!==void 0){const i=this.body.nodes[e],o={};for(let a=0;a<i.edges.length;a++){const s=i.edges[a];r!=="to"&&s.toId==i.id?o[s.fromId]===void 0&&(n.push(s.fromId),o[s.fromId]=!0):r!=="from"&&s.fromId==i.id&&o[s.toId]===void 0&&(n.push(s.toId),o[s.toId]=!0)}}return n}getConnectedEdges(e){const r=[];if(this.body.nodes[e]!==void 0){const n=this.body.nodes[e];for(let i=0;i<n.edges.length;i++)r.push(n.edges[i].id)}else console.error("NodeId provided for getConnectedEdges does not exist. Provided: ",e);return r}moveNode(e,r,n){this.body.nodes[e]!==void 0?(this.body.nodes[e].x=Number(r),this.body.nodes[e].y=Number(n),$o(()=>{this.body.emitter.emit("startSimulation")},0)):console.error("Node id supplied to moveNode does not exist. Provided: ",e)}}var QFe=xt,L2=Math.hypot,eLe=Math.abs,tLe=Math.sqrt,rLe=!!L2&&L2(1/0,NaN)!==1/0;QFe({target:"Math",stat:!0,forced:rLe},{hypot:function(e,r){for(var n=0,i=0,o=arguments.length,a=0,s,l;i<o;)s=eLe(arguments[i++]),a<s?(l=a/s,n=n*l*l+1,a=s):s>0?(l=s/a,n+=l*l):n+=s;return a===1/0?1/0:a*tLe(n)}});var nLe=ir,iLe=nLe.Math.hypot,oLe=iLe,aLe=oLe,sLe=aLe,lLe=Ot(sLe);class jr{static transform(e,r){Ir(e)||(e=[e]);const n=r.point.x,i=r.point.y,o=r.angle,a=r.length;for(let s=0;s<e.length;++s){const l=e[s],c=l.x*Math.cos(o)-l.y*Math.sin(o),u=l.x*Math.sin(o)+l.y*Math.cos(o);l.x=n+a*c,l.y=i+a*u}}static drawPath(e,r){e.beginPath(),e.moveTo(r[0].x,r[0].y);for(let n=1;n<r.length;++n)e.lineTo(r[n].x,r[n].y);e.closePath()}}let cLe=class extends jr{static draw(e,r){if(r.image){e.save(),e.translate(r.point.x,r.point.y),e.rotate(Math.PI/2+r.angle);const n=r.imageWidth!=null?r.imageWidth:r.image.width,i=r.imageHeight!=null?r.imageHeight:r.image.height;r.image.drawImageAtPosition(e,1,-n/2,0,n,i),e.restore()}return!1}};class uLe extends jr{static draw(e,r){const n=[{x:0,y:0},{x:-1,y:.3},{x:-.9,y:0},{x:-1,y:-.3}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class dLe{static draw(e,r){const n=[{x:-1,y:0},{x:0,y:.3},{x:-.4,y:0},{x:0,y:-.3}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class fLe{static draw(e,r){const n={x:-.4,y:0};jr.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=r.angle-i/2,a=r.angle+i/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,o,a,!1),e.stroke(),!0}}class hLe{static draw(e,r){const n={x:-.3,y:0};jr.transform(n,r),e.strokeStyle=e.fillStyle,e.fillStyle="rgba(0, 0, 0, 0)";const i=Math.PI,o=r.angle+i/2,a=r.angle+3*i/2;return e.beginPath(),e.arc(n.x,n.y,r.length*.4,o,a,!1),e.stroke(),!0}}class vLe{static draw(e,r){const n=[{x:.02,y:0},{x:-1,y:.3},{x:-1,y:-.3}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class pLe{static draw(e,r){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-1,y:0}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class gLe{static draw(e,r){const n={x:-.4,y:0};return jr.transform(n,r),RS(e,n.x,n.y,r.length*.4),!0}}class mLe{static draw(e,r){const n=[{x:0,y:.5},{x:0,y:-.5},{x:-.15,y:-.5},{x:-.15,y:.5}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class yLe{static draw(e,r){const n=[{x:0,y:.3},{x:0,y:-.3},{x:-.6,y:-.3},{x:-.6,y:.3}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class bLe{static draw(e,r){const n=[{x:0,y:0},{x:-.5,y:-.3},{x:-1,y:0},{x:-.5,y:.3}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class $Le{static draw(e,r){const n=[{x:-1,y:.3},{x:-.5,y:0},{x:-1,y:-.3},{x:0,y:0}];return jr.transform(n,r),jr.drawPath(e,n),!0}}class zz{static draw(e,r){let n;switch(r.type&&(n=r.type.toLowerCase()),n){case"image":return cLe.draw(e,r);case"circle":return gLe.draw(e,r);case"box":return yLe.draw(e,r);case"crow":return dLe.draw(e,r);case"curve":return fLe.draw(e,r);case"diamond":return bLe.draw(e,r);case"inv_curve":return hLe.draw(e,r);case"triangle":return vLe.draw(e,r);case"inv_triangle":return pLe.draw(e,r);case"bar":return mLe.draw(e,r);case"vee":return $Le.draw(e,r);case"arrow":default:return uLe.draw(e,r)}}}function z2(t,e){var r=Or(t);if(Da){var n=Da(t);e&&(n=ti(n).call(n,function(i){return Ka(t,i).enumerable})),r.push.apply(r,n)}return r}function H2(t){for(var e=1;e<arguments.length;e++){var r,n,i=arguments[e]!=null?arguments[e]:{};e%2?lr(r=z2(Object(i),!0)).call(r,function(o){Ug(t,o,i[o])}):Aa?qg(t,Aa(i)):lr(n=z2(Object(i))).call(n,function(o){Gg(t,o,Ka(i,o))})}return t}class Hz{constructor(e,r,n){this._body=r,this._labelModule=n,this.color={},this.colorDirty=!0,this.hoverWidth=1.5,this.selectionWidth=2,this.setOptions(e),this.fromPoint=this.from,this.toPoint=this.to}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to]}cleanup(){return!1}setOptions(e){this.options=e,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.id=this.options.id}drawLine(e,r,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.getViaNode();e.strokeStyle=this.getColor(e,r),e.lineWidth=r.width,r.dashes!==!1?this._drawDashedLine(e,r,o):this._drawLine(e,r,o)}_drawLine(e,r,n,i,o){if(this.from!=this.to)this._line(e,r,n,i,o);else{const[a,s,l]=this._getCircleData(e);this._circle(e,r,a,s,l)}}_drawDashedLine(e,r,n,i,o){e.lineCap="round";const a=Ir(r.dashes)?r.dashes:[5,5];if(e.setLineDash!==void 0){if(e.save(),e.setLineDash(a),e.lineDashOffset=0,this.from!=this.to)this._line(e,r,n);else{const[s,l,c]=this._getCircleData(e);this._circle(e,r,s,l,c)}e.setLineDash([0]),e.lineDashOffset=0,e.restore()}else{if(this.from!=this.to)CF(e,this.from.x,this.from.y,this.to.x,this.to.y,a);else{const[s,l,c]=this._getCircleData(e);this._circle(e,r,s,l,c)}this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}}findBorderPosition(e,r,n){return this.from!=this.to?this._findBorderPosition(e,r,n):this._findBorderPositionCircle(e,r,n)}findBorderPositions(e){if(this.from!=this.to)return{from:this._findBorderPosition(this.from,e),to:this._findBorderPosition(this.to,e)};{var r;const[n,i]=ho(r=this._getCircleData(e)).call(r,0,2);return{from:this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:.25,high:.6,direction:-1}),to:this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:.6,high:.8,direction:1})}}}_getCircleData(e){const r=this.options.selfReference.size;e!==void 0&&this.from.shape.width===void 0&&this.from.shape.resize(e);const n=Fz(e,this.options.selfReference.angle,r,this.from);return[n.x,n.y,r]}_pointOnCircle(e,r,n,i){const o=i*2*Math.PI;return{x:e+n*Math.cos(o),y:r-n*Math.sin(o)}}_findBorderPositionCircle(e,r,n){const i=n.x,o=n.y;let a=n.low,s=n.high;const l=n.direction,c=10,u=this.options.selfReference.size,f=.05;let h,v=(a+s)*.5,g=0;this.options.arrowStrikethrough===!0&&(l===-1?g=this.options.endPointOffset.from:l===1&&(g=this.options.endPointOffset.to));let m=0;do{v=(a+s)*.5,h=this._pointOnCircle(i,o,u,v);const p=Math.atan2(e.y-h.y,e.x-h.x),y=e.distanceToBorder(r,p)+g,b=Math.sqrt(Math.pow(h.x-e.x,2)+Math.pow(h.y-e.y,2)),$=y-b;if(Math.abs($)<f)break;$>0?l>0?a=v:s=v:l>0?s=v:a=v,++m}while(a<=s&&m<c);return H2(H2({},h),{},{t:v})}getLineWidth(e,r){return e===!0?Math.max(this.selectionWidth,.3/this._body.view.scale):r===!0?Math.max(this.hoverWidth,.3/this._body.view.scale):Math.max(this.options.width,.3/this._body.view.scale)}getColor(e,r){if(r.inheritsColor!==!1){if(r.inheritsColor==="both"&&this.from.id!==this.to.id){const n=e.createLinearGradient(this.from.x,this.from.y,this.to.x,this.to.y);let i=this.from.options.color.highlight.border,o=this.to.options.color.highlight.border;return this.from.selected===!1&&this.to.selected===!1?(i=_i(this.from.options.color.border,r.opacity),o=_i(this.to.options.color.border,r.opacity)):this.from.selected===!0&&this.to.selected===!1?o=this.to.options.color.border:this.from.selected===!1&&this.to.selected===!0&&(i=this.from.options.color.border),n.addColorStop(0,i),n.addColorStop(1,o),n}return r.inheritsColor==="to"?_i(this.to.options.color.border,r.opacity):_i(this.from.options.color.border,r.opacity)}else return _i(r.color,r.opacity)}_circle(e,r,n,i,o){this.enableShadow(e,r);let a=0,s=Math.PI*2;if(!this.options.selfReference.renderBehindTheNode){const l=this.options.selfReference.angle,c=this.options.selfReference.angle+Math.PI,u=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:l,high:c,direction:-1}),f=this._findBorderPositionCircle(this.from,e,{x:n,y:i,low:l,high:c,direction:1});a=Math.atan2(u.y-i,u.x-n),s=Math.atan2(f.y-i,f.x-n)}e.beginPath(),e.arc(n,i,o,a,s,!1),e.stroke(),this.disableShadow(e,r)}getDistanceToEdge(e,r,n,i,o,a){if(this.from!=this.to)return this._getDistanceToEdge(e,r,n,i,o,a);{const[s,l,c]=this._getCircleData(void 0),u=s-o,f=l-a;return Math.abs(Math.sqrt(u*u+f*f)-c)}}_getDistanceToLine(e,r,n,i,o,a){const s=n-e,l=i-r,c=s*s+l*l;let u=((o-e)*s+(a-r)*l)/c;u>1?u=1:u<0&&(u=0);const f=e+u*s,h=r+u*l,v=f-o,g=h-a;return Math.sqrt(v*v+g*g)}getArrowData(e,r,n,i,o,a){let s,l,c,u,f,h,v;const g=a.width;r==="from"?(c=this.from,u=this.to,f=a.fromArrowScale<0,h=Math.abs(a.fromArrowScale),v=a.fromArrowType):r==="to"?(c=this.to,u=this.from,f=a.toArrowScale<0,h=Math.abs(a.toArrowScale),v=a.toArrowType):(c=this.to,u=this.from,f=a.middleArrowScale<0,h=Math.abs(a.middleArrowScale),v=a.middleArrowType);const m=15*h+3*g;if(c!=u){const $=lLe(c.x-u.x,c.y-u.y),S=m/$;if(r!=="middle")if(this.options.smooth.enabled===!0){const w=this._findBorderPosition(c,e,{via:n}),C=this.getPoint(w.t+S*(r==="from"?1:-1),n);s=Math.atan2(w.y-C.y,w.x-C.x),l=w}else s=Math.atan2(c.y-u.y,c.x-u.x),l=this._findBorderPosition(c,e);else{const w=(f?-S:S)/2,C=this.getPoint(.5+w,n),E=this.getPoint(.5-w,n);s=Math.atan2(C.y-E.y,C.x-E.x),l=this.getPoint(.5,n)}}else{const[$,S,w]=this._getCircleData(e);if(r==="from"){const C=this.options.selfReference.angle,E=this.options.selfReference.angle+Math.PI,O=this._findBorderPositionCircle(this.from,e,{x:$,y:S,low:C,high:E,direction:-1});s=O.t*-2*Math.PI+1.5*Math.PI+.1*Math.PI,l=O}else if(r==="to"){const C=this.options.selfReference.angle,E=this.options.selfReference.angle+Math.PI,O=this._findBorderPositionCircle(this.from,e,{x:$,y:S,low:C,high:E,direction:1});s=O.t*-2*Math.PI+1.5*Math.PI-1.1*Math.PI,l=O}else{const C=this.options.selfReference.angle/(2*Math.PI);l=this._pointOnCircle($,S,w,C),s=C*-2*Math.PI+1.5*Math.PI+.1*Math.PI}}const p=l.x-m*.9*Math.cos(s),y=l.y-m*.9*Math.sin(s);return{point:l,core:{x:p,y},angle:s,length:m,type:v}}drawArrowHead(e,r,n,i,o){e.strokeStyle=this.getColor(e,r),e.fillStyle=e.strokeStyle,e.lineWidth=r.width,zz.draw(e,o)&&(this.enableShadow(e,r),xf(e).call(e),this.disableShadow(e,r))}enableShadow(e,r){r.shadow===!0&&(e.shadowColor=r.shadowColor,e.shadowBlur=r.shadowSize,e.shadowOffsetX=r.shadowX,e.shadowOffsetY=r.shadowY)}disableShadow(e,r){r.shadow===!0&&(e.shadowColor="rgba(0,0,0,0)",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0)}drawBackground(e,r){if(r.background!==!1){const n={strokeStyle:e.strokeStyle,lineWidth:e.lineWidth,dashes:e.dashes};e.strokeStyle=r.backgroundColor,e.lineWidth=r.backgroundSize,this.setStrokeDashed(e,r.backgroundDashes),e.stroke(),e.strokeStyle=n.strokeStyle,e.lineWidth=n.lineWidth,e.dashes=n.dashes,this.setStrokeDashed(e,r.dashes)}}setStrokeDashed(e,r){if(r!==!1)if(e.setLineDash!==void 0){const n=Ir(r)?r:[5,5];e.setLineDash(n)}else console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.");else e.setLineDash!==void 0?e.setLineDash([]):console.warn("setLineDash is not supported in this browser. The dashed stroke cannot be used.")}}function V2(t,e){var r=Or(t);if(Da){var n=Da(t);e&&(n=ti(n).call(n,function(i){return Ka(t,i).enumerable})),r.push.apply(r,n)}return r}function W2(t){for(var e=1;e<arguments.length;e++){var r,n,i=arguments[e]!=null?arguments[e]:{};e%2?lr(r=V2(Object(i),!0)).call(r,function(o){Ug(t,o,i[o])}):Aa?qg(t,Aa(i)):lr(n=V2(Object(i))).call(n,function(o){Gg(t,o,Ka(i,o))})}return t}class dC extends Hz{constructor(e,r,n){super(e,r,n)}_findBorderPositionBezier(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this._getViaCoordinates();const i=10,o=.2;let a=!1,s=1,l=0,c=this.to,u,f,h=this.options.endPointOffset?this.options.endPointOffset.to:0;e.id===this.from.id&&(c=this.from,a=!0,h=this.options.endPointOffset?this.options.endPointOffset.from:0),this.options.arrowStrikethrough===!1&&(h=0);let v=0;do{f=(l+s)*.5,u=this.getPoint(f,n);const g=Math.atan2(c.y-u.y,c.x-u.x),m=c.distanceToBorder(r,g)+h,p=Math.sqrt(Math.pow(u.x-c.x,2)+Math.pow(u.y-c.y,2)),y=m-p;if(Math.abs(y)<o)break;y<0?a===!1?l=f:s=f:a===!1?s=f:l=f,++v}while(l<=s&&v<i);return W2(W2({},u),{},{t:f})}_getDistanceToBezierEdge(e,r,n,i,o,a,s){let l=1e9,c,u,f,h,v,g=e,m=r;for(u=1;u<10;u++)f=.1*u,h=Math.pow(1-f,2)*e+2*f*(1-f)*s.x+Math.pow(f,2)*n,v=Math.pow(1-f,2)*r+2*f*(1-f)*s.y+Math.pow(f,2)*i,u>0&&(c=this._getDistanceToLine(g,m,h,v,o,a),l=c<l?c:l),g=h,m=v;return l}_bezierCurve(e,r,n,i){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),n!=null&&n.x!=null?i!=null&&i.x!=null?e.bezierCurveTo(n.x,n.y,i.x,i.y,this.toPoint.x,this.toPoint.y):e.quadraticCurveTo(n.x,n.y,this.toPoint.x,this.toPoint.y):e.lineTo(this.toPoint.x,this.toPoint.y),this.drawBackground(e,r),this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}getViaNode(){return this._getViaCoordinates()}}class K2 extends dC{constructor(e,r,n){super(e,r,n),this.via=this.via,this._boundFunction=()=>{this.positionBezierNode()},this._body.emitter.on("_repositionBezierNodes",this._boundFunction)}setOptions(e){super.setOptions(e);let r=!1;this.options.physics!==e.physics&&(r=!0),this.options=e,this.id=this.options.id,this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.setupSupportNode(),this.connect(),r===!0&&(this.via.setOptions({physics:this.options.physics}),this.positionBezierNode())}connect(){this.from=this._body.nodes[this.options.from],this.to=this._body.nodes[this.options.to],this.from===void 0||this.to===void 0||this.options.physics===!1?this.via.setOptions({physics:!1}):this.from.id===this.to.id?this.via.setOptions({physics:!1}):this.via.setOptions({physics:!0})}cleanup(){return this._body.emitter.off("_repositionBezierNodes",this._boundFunction),this.via!==void 0?(delete this._body.nodes[this.via.id],this.via=void 0,!0):!1}setupSupportNode(){if(this.via===void 0){const e="edgeId:"+this.id,r=this._body.functions.createNode({id:e,shape:"circle",physics:!0,hidden:!0});this._body.nodes[e]=r,this.via=r,this.via.parentEdgeId=this.id,this.positionBezierNode()}}positionBezierNode(){this.via!==void 0&&this.from!==void 0&&this.to!==void 0?(this.via.x=.5*(this.from.x+this.to.x),this.via.y=.5*(this.from.y+this.to.y)):this.via!==void 0&&(this.via.x=0,this.via.y=0)}_line(e,r,n){this._bezierCurve(e,r,n)}_getViaCoordinates(){return this.via}getViaNode(){return this.via}getPoint(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.via;if(this.from===this.to){const[n,i,o]=this._getCircleData(),a=2*Math.PI*(1-e);return{x:n+o*Math.sin(a),y:i+o-o*(1-Math.cos(a))}}else return{x:Math.pow(1-e,2)*this.fromPoint.x+2*e*(1-e)*r.x+Math.pow(e,2)*this.toPoint.x,y:Math.pow(1-e,2)*this.fromPoint.y+2*e*(1-e)*r.y+Math.pow(e,2)*this.toPoint.y}}_findBorderPosition(e,r){return this._findBorderPositionBezier(e,r,this.via)}_getDistanceToEdge(e,r,n,i,o,a){return this._getDistanceToBezierEdge(e,r,n,i,o,a,this.via)}}class U2 extends dC{constructor(e,r,n){super(e,r,n)}_line(e,r,n){this._bezierCurve(e,r,n)}getViaNode(){return this._getViaCoordinates()}_getViaCoordinates(){const e=this.options.smooth.roundness,r=this.options.smooth.type;let n=Math.abs(this.from.x-this.to.x),i=Math.abs(this.from.y-this.to.y);if(r==="discrete"||r==="diagonalCross"){let o,a;n<=i?o=a=e*i:o=a=e*n,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(a=-a);let s=this.from.x+o,l=this.from.y+a;return r==="discrete"&&(n<=i?s=n<e*i?this.from.x:s:l=i<e*n?this.from.y:l),{x:s,y:l}}else if(r==="straightCross"){let o=(1-e)*n,a=(1-e)*i;return n<=i?(o=0,this.from.y<this.to.y&&(a=-a)):(this.from.x<this.to.x&&(o=-o),a=0),{x:this.to.x+o,y:this.to.y+a}}else if(r==="horizontal"){let o=(1-e)*n;return this.from.x<this.to.x&&(o=-o),{x:this.to.x+o,y:this.from.y}}else if(r==="vertical"){let o=(1-e)*i;return this.from.y<this.to.y&&(o=-o),{x:this.from.x,y:this.to.y+o}}else if(r==="curvedCW"){n=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(n*n+i*i),a=Math.PI,l=(Math.atan2(i,n)+(e*.5+.5)*a)%(2*a);return{x:this.from.x+(e*.5+.5)*o*Math.sin(l),y:this.from.y+(e*.5+.5)*o*Math.cos(l)}}else if(r==="curvedCCW"){n=this.to.x-this.from.x,i=this.from.y-this.to.y;const o=Math.sqrt(n*n+i*i),a=Math.PI,l=(Math.atan2(i,n)+(-e*.5+.5)*a)%(2*a);return{x:this.from.x+(e*.5+.5)*o*Math.sin(l),y:this.from.y+(e*.5+.5)*o*Math.cos(l)}}else{let o,a;n<=i?o=a=e*i:o=a=e*n,this.from.x>this.to.x&&(o=-o),this.from.y>=this.to.y&&(a=-a);let s=this.from.x+o,l=this.from.y+a;return n<=i?this.from.x<=this.to.x?s=this.to.x<s?this.to.x:s:s=this.to.x>s?this.to.x:s:this.from.y>=this.to.y?l=this.to.y>l?this.to.y:l:l=this.to.y<l?this.to.y:l,{x:s,y:l}}}_findBorderPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._findBorderPositionBezier(e,r,n.via)}_getDistanceToEdge(e,r,n,i,o,a){let s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge(e,r,n,i,o,a,s)}getPoint(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const n=e,i=Math.pow(1-n,2)*this.fromPoint.x+2*n*(1-n)*r.x+Math.pow(n,2)*this.toPoint.x,o=Math.pow(1-n,2)*this.fromPoint.y+2*n*(1-n)*r.y+Math.pow(n,2)*this.toPoint.y;return{x:i,y:o}}}class wLe extends dC{constructor(e,r,n){super(e,r,n)}_getDistanceToBezierEdge2(e,r,n,i,o,a,s,l){let c=1e9,u=e,f=r;const h=[0,0,0,0];for(let v=1;v<10;v++){const g=.1*v;h[0]=Math.pow(1-g,3),h[1]=3*g*Math.pow(1-g,2),h[2]=3*Math.pow(g,2)*(1-g),h[3]=Math.pow(g,3);const m=h[0]*e+h[1]*s.x+h[2]*l.x+h[3]*n,p=h[0]*r+h[1]*s.y+h[2]*l.y+h[3]*i;if(v>0){const y=this._getDistanceToLine(u,f,m,p,o,a);c=y<c?y:c}u=m,f=p}return c}}class q2 extends wLe{constructor(e,r,n){super(e,r,n)}_line(e,r,n){const i=n[0],o=n[1];this._bezierCurve(e,r,i,o)}_getViaCoordinates(){const e=this.from.x-this.to.x,r=this.from.y-this.to.y;let n,i,o,a;const s=this.options.smooth.roundness;return(Math.abs(e)>Math.abs(r)||this.options.smooth.forceDirection===!0||this.options.smooth.forceDirection==="horizontal")&&this.options.smooth.forceDirection!=="vertical"?(i=this.from.y,a=this.to.y,n=this.from.x-s*e,o=this.to.x+s*e):(i=this.from.y-s*r,a=this.to.y+s*r,n=this.from.x,o=this.to.x),[{x:n,y:i},{x:o,y:a}]}getViaNode(){return this._getViaCoordinates()}_findBorderPosition(e,r){return this._findBorderPositionBezier(e,r)}_getDistanceToEdge(e,r,n,i,o,a){let[s,l]=arguments.length>6&&arguments[6]!==void 0?arguments[6]:this._getViaCoordinates();return this._getDistanceToBezierEdge2(e,r,n,i,o,a,s,l)}getPoint(e){let[r,n]=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this._getViaCoordinates();const i=e,o=[Math.pow(1-i,3),3*i*Math.pow(1-i,2),3*Math.pow(i,2)*(1-i),Math.pow(i,3)],a=o[0]*this.fromPoint.x+o[1]*r.x+o[2]*n.x+o[3]*this.toPoint.x,s=o[0]*this.fromPoint.y+o[1]*r.y+o[2]*n.y+o[3]*this.toPoint.y;return{x:a,y:s}}}class G2 extends Hz{constructor(e,r,n){super(e,r,n)}_line(e,r){e.beginPath(),e.moveTo(this.fromPoint.x,this.fromPoint.y),e.lineTo(this.toPoint.x,this.toPoint.y),this.enableShadow(e,r),e.stroke(),this.disableShadow(e,r)}getViaNode(){}getPoint(e){return{x:(1-e)*this.fromPoint.x+e*this.toPoint.x,y:(1-e)*this.fromPoint.y+e*this.toPoint.y}}_findBorderPosition(e,r){let n=this.to,i=this.from;e.id===this.from.id&&(n=this.from,i=this.to);const o=Math.atan2(n.y-i.y,n.x-i.x),a=n.x-i.x,s=n.y-i.y,l=Math.sqrt(a*a+s*s),c=e.distanceToBorder(r,o),u=(l-c)/l;return{x:(1-u)*i.x+u*n.x,y:(1-u)*i.y+u*n.y,t:0}}_getDistanceToEdge(e,r,n,i,o,a){return this._getDistanceToLine(e,r,n,i,o,a)}}class Ia{constructor(e,r,n,i,o){if(r===void 0)throw new Error("No body provided");this.options=Oa(i),this.globalOptions=i,this.defaultOptions=o,this.body=r,this.imagelist=n,this.id=void 0,this.fromId=void 0,this.toId=void 0,this.selected=!1,this.hover=!1,this.labelDirty=!0,this.baseWidth=this.options.width,this.baseFontSize=this.options.font.size,this.from=void 0,this.to=void 0,this.edgeType=void 0,this.connected=!1,this.labelModule=new Ll(this.body,this.options,!0),this.setOptions(e)}setOptions(e){if(!e)return;let r=typeof e.physics<"u"&&this.options.physics!==e.physics||typeof e.hidden<"u"&&(this.options.hidden||!1)!==(e.hidden||!1)||typeof e.from<"u"&&this.options.from!==e.from||typeof e.to<"u"&&this.options.to!==e.to;Ia.parseOptions(this.options,e,!0,this.globalOptions),e.id!==void 0&&(this.id=e.id),e.from!==void 0&&(this.fromId=e.from),e.to!==void 0&&(this.toId=e.to),e.title!==void 0&&(this.title=e.title),e.value!==void 0&&(e.value=Nz(e.value));const n=[e,this.options,this.defaultOptions];return this.chooser=cC("edge",n),this.updateLabelModule(e),r=this.updateEdgeType()||r,this._setInteractionWidths(),this.connect(),r}static parseOptions(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(Uc(["endPointOffset","arrowStrikethrough","id","from","hidden","hoverWidth","labelHighlightBold","length","line","opacity","physics","scaling","selectionWidth","selfReferenceSize","selfReference","to","title","value","width","font","chosen","widthConstraint"],e,r,n),r.endPointOffset!==void 0&&r.endPointOffset.from!==void 0&&(os(r.endPointOffset.from)?e.endPointOffset.from=r.endPointOffset.from:(e.endPointOffset.from=i.endPointOffset.from!==void 0?i.endPointOffset.from:0,console.error("endPointOffset.from is not a valid number"))),r.endPointOffset!==void 0&&r.endPointOffset.to!==void 0&&(os(r.endPointOffset.to)?e.endPointOffset.to=r.endPointOffset.to:(e.endPointOffset.to=i.endPointOffset.to!==void 0?i.endPointOffset.to:0,console.error("endPointOffset.to is not a valid number"))),lp(r.label)?e.label=r.label:lp(e.label)||(e.label=void 0),Ti(e,r,"smooth",i),Ti(e,r,"shadow",i),Ti(e,r,"background",i),r.dashes!==void 0&&r.dashes!==null?e.dashes=r.dashes:n===!0&&r.dashes===null&&(e.dashes=vs(i.dashes)),r.scaling!==void 0&&r.scaling!==null?(r.scaling.min!==void 0&&(e.scaling.min=r.scaling.min),r.scaling.max!==void 0&&(e.scaling.max=r.scaling.max),Ti(e.scaling,r.scaling,"label",i.scaling)):n===!0&&r.scaling===null&&(e.scaling=vs(i.scaling)),r.arrows!==void 0&&r.arrows!==null)if(typeof r.arrows=="string"){const s=r.arrows.toLowerCase();e.arrows.to.enabled=Gt(s).call(s,"to")!=-1,e.arrows.middle.enabled=Gt(s).call(s,"middle")!=-1,e.arrows.from.enabled=Gt(s).call(s,"from")!=-1}else if(typeof r.arrows=="object")Ti(e.arrows,r.arrows,"to",i.arrows),Ti(e.arrows,r.arrows,"middle",i.arrows),Ti(e.arrows,r.arrows,"from",i.arrows);else throw new Error("The arrow newOptions can only be an object or a string. Refer to the documentation. You used:"+Cf(r.arrows));else n===!0&&r.arrows===null&&(e.arrows=vs(i.arrows));if(r.color!==void 0&&r.color!==null){const s=Bl(r.color)?{color:r.color,highlight:r.color,hover:r.color,inherit:!1,opacity:1}:r.color,l=e.color;if(o)ur(l,i.color,!1,n);else for(const c in l)Object.prototype.hasOwnProperty.call(l,c)&&delete l[c];if(Bl(l))l.color=l,l.highlight=l,l.hover=l,l.inherit=!1,s.opacity===void 0&&(l.opacity=1);else{let c=!1;s.color!==void 0&&(l.color=s.color,c=!0),s.highlight!==void 0&&(l.highlight=s.highlight,c=!0),s.hover!==void 0&&(l.hover=s.hover,c=!0),s.inherit!==void 0&&(l.inherit=s.inherit),s.opacity!==void 0&&(l.opacity=Math.min(1,Math.max(0,s.opacity))),c===!0?l.inherit=!1:l.inherit===void 0&&(l.inherit="from")}}else n===!0&&r.color===null&&(e.color=Oa(i.color));n===!0&&r.font===null&&(e.font=Oa(i.font)),Object.prototype.hasOwnProperty.call(r,"selfReferenceSize")&&(console.warn("The selfReferenceSize property has been deprecated. Please use selfReference property instead. The selfReference can be set like thise selfReference:{size:30, angle:Math.PI / 4}"),e.selfReference.size=r.selfReferenceSize)}getFormattingValues(){const e=this.options.arrows.to===!0||this.options.arrows.to.enabled===!0,r=this.options.arrows.from===!0||this.options.arrows.from.enabled===!0,n=this.options.arrows.middle===!0||this.options.arrows.middle.enabled===!0,i=this.options.color.inherit,o={toArrow:e,toArrowScale:this.options.arrows.to.scaleFactor,toArrowType:this.options.arrows.to.type,toArrowSrc:this.options.arrows.to.src,toArrowImageWidth:this.options.arrows.to.imageWidth,toArrowImageHeight:this.options.arrows.to.imageHeight,middleArrow:n,middleArrowScale:this.options.arrows.middle.scaleFactor,middleArrowType:this.options.arrows.middle.type,middleArrowSrc:this.options.arrows.middle.src,middleArrowImageWidth:this.options.arrows.middle.imageWidth,middleArrowImageHeight:this.options.arrows.middle.imageHeight,fromArrow:r,fromArrowScale:this.options.arrows.from.scaleFactor,fromArrowType:this.options.arrows.from.type,fromArrowSrc:this.options.arrows.from.src,fromArrowImageWidth:this.options.arrows.from.imageWidth,fromArrowImageHeight:this.options.arrows.from.imageHeight,arrowStrikethrough:this.options.arrowStrikethrough,color:i?void 0:this.options.color.color,inheritsColor:i,opacity:this.options.color.opacity,hidden:this.options.hidden,length:this.options.length,shadow:this.options.shadow.enabled,shadowColor:this.options.shadow.color,shadowSize:this.options.shadow.size,shadowX:this.options.shadow.x,shadowY:this.options.shadow.y,dashes:this.options.dashes,width:this.options.width,background:this.options.background.enabled,backgroundColor:this.options.background.color,backgroundSize:this.options.background.size,backgroundDashes:this.options.background.dashes};if(this.selected||this.hover)if(this.chooser===!0){if(this.selected){const a=this.options.selectionWidth;typeof a=="function"?o.width=a(o.width):typeof a=="number"&&(o.width+=a),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.highlight,o.shadow=this.options.shadow.enabled}else if(this.hover){const a=this.options.hoverWidth;typeof a=="function"?o.width=a(o.width):typeof a=="number"&&(o.width+=a),o.width=Math.max(o.width,.3/this.body.view.scale),o.color=this.options.color.hover,o.shadow=this.options.shadow.enabled}}else typeof this.chooser=="function"&&(this.chooser(o,this.options.id,this.selected,this.hover),o.color!==void 0&&(o.inheritsColor=!1),o.shadow===!1&&(o.shadowColor!==this.options.shadow.color||o.shadowSize!==this.options.shadow.size||o.shadowX!==this.options.shadow.x||o.shadowY!==this.options.shadow.y)&&(o.shadow=!0));else o.shadow=this.options.shadow.enabled,o.width=Math.max(o.width,.3/this.body.view.scale);return o}updateLabelModule(e){const r=[e,this.options,this.globalOptions,this.defaultOptions];this.labelModule.update(this.options,r),this.labelModule.baseSize!==void 0&&(this.baseFontSize=this.labelModule.baseSize)}updateEdgeType(){const e=this.options.smooth;let r=!1,n=!0;return this.edgeType!==void 0&&((this.edgeType instanceof K2&&e.enabled===!0&&e.type==="dynamic"||this.edgeType instanceof q2&&e.enabled===!0&&e.type==="cubicBezier"||this.edgeType instanceof U2&&e.enabled===!0&&e.type!=="dynamic"&&e.type!=="cubicBezier"||this.edgeType instanceof G2&&e.type.enabled===!1)&&(n=!1),n===!0&&(r=this.cleanup())),n===!0?e.enabled===!0?e.type==="dynamic"?(r=!0,this.edgeType=new K2(this.options,this.body,this.labelModule)):e.type==="cubicBezier"?this.edgeType=new q2(this.options,this.body,this.labelModule):this.edgeType=new U2(this.options,this.body,this.labelModule):this.edgeType=new G2(this.options,this.body,this.labelModule):this.edgeType.setOptions(this.options),r}connect(){this.disconnect(),this.from=this.body.nodes[this.fromId]||void 0,this.to=this.body.nodes[this.toId]||void 0,this.connected=this.from!==void 0&&this.to!==void 0,this.connected===!0?(this.from.attachEdge(this),this.to.attachEdge(this)):(this.from&&this.from.detachEdge(this),this.to&&this.to.detachEdge(this)),this.edgeType.connect()}disconnect(){this.from&&(this.from.detachEdge(this),this.from=void 0),this.to&&(this.to.detachEdge(this),this.to=void 0),this.connected=!1}getTitle(){return this.title}isSelected(){return this.selected}getValue(){return this.options.value}setValueRange(e,r,n){if(this.options.value!==void 0){const i=this.options.scaling.customScalingFunction(e,r,n,this.options.value),o=this.options.scaling.max-this.options.scaling.min;if(this.options.scaling.label.enabled===!0){const a=this.options.scaling.label.max-this.options.scaling.label.min;this.options.font.size=this.options.scaling.label.min+i*a}this.options.width=this.options.scaling.min+i*o}else this.options.width=this.baseWidth,this.options.font.size=this.baseFontSize;this._setInteractionWidths(),this.updateLabelModule()}_setInteractionWidths(){typeof this.options.hoverWidth=="function"?this.edgeType.hoverWidth=this.options.hoverWidth(this.options.width):this.edgeType.hoverWidth=this.options.hoverWidth+this.options.width,typeof this.options.selectionWidth=="function"?this.edgeType.selectionWidth=this.options.selectionWidth(this.options.width):this.edgeType.selectionWidth=this.options.selectionWidth+this.options.width}draw(e){const r=this.getFormattingValues();if(r.hidden)return;const n=this.edgeType.getViaNode();this.edgeType.drawLine(e,r,this.selected,this.hover,n),this.drawLabel(e,n)}drawArrows(e){const r=this.getFormattingValues();if(r.hidden)return;const n=this.edgeType.getViaNode(),i={};this.edgeType.fromPoint=this.edgeType.from,this.edgeType.toPoint=this.edgeType.to,r.fromArrow&&(i.from=this.edgeType.getArrowData(e,"from",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.fromPoint=i.from.core),r.fromArrowSrc&&(i.from.image=this.imagelist.load(r.fromArrowSrc)),r.fromArrowImageWidth&&(i.from.imageWidth=r.fromArrowImageWidth),r.fromArrowImageHeight&&(i.from.imageHeight=r.fromArrowImageHeight)),r.toArrow&&(i.to=this.edgeType.getArrowData(e,"to",n,this.selected,this.hover,r),r.arrowStrikethrough===!1&&(this.edgeType.toPoint=i.to.core),r.toArrowSrc&&(i.to.image=this.imagelist.load(r.toArrowSrc)),r.toArrowImageWidth&&(i.to.imageWidth=r.toArrowImageWidth),r.toArrowImageHeight&&(i.to.imageHeight=r.toArrowImageHeight)),r.middleArrow&&(i.middle=this.edgeType.getArrowData(e,"middle",n,this.selected,this.hover,r),r.middleArrowSrc&&(i.middle.image=this.imagelist.load(r.middleArrowSrc)),r.middleArrowImageWidth&&(i.middle.imageWidth=r.middleArrowImageWidth),r.middleArrowImageHeight&&(i.middle.imageHeight=r.middleArrowImageHeight)),r.fromArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,i.from),r.middleArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,i.middle),r.toArrow&&this.edgeType.drawArrowHead(e,r,this.selected,this.hover,i.to)}drawLabel(e,r){if(this.options.label!==void 0){const n=this.from,i=this.to;this.labelModule.differentState(this.selected,this.hover)&&this.labelModule.getTextSize(e,this.selected,this.hover);let o;if(n.id!=i.id){this.labelModule.pointToSelf=!1,o=this.edgeType.getPoint(.5,r),e.save();const a=this._getRotation(e);a.angle!=0&&(e.translate(a.x,a.y),e.rotate(a.angle)),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover),e.restore()}else{this.labelModule.pointToSelf=!0;const a=Fz(e,this.options.selfReference.angle,this.options.selfReference.size,n);o=this._pointOnCircle(a.x,a.y,this.options.selfReference.size,this.options.selfReference.angle),this.labelModule.draw(e,o.x,o.y,this.selected,this.hover)}}}getItemsOnPoint(e){const r=[];if(this.labelModule.visible()){const i=this._getRotation();C$(this.labelModule.getSize(),e,i)&&r.push({edgeId:this.id,labelId:0})}const n={left:e.x,top:e.y};return this.isOverlappingWith(n)&&r.push({edgeId:this.id}),r}isOverlappingWith(e){if(this.connected){const n=this.from.x,i=this.from.y,o=this.to.x,a=this.to.y,s=e.left,l=e.top;return this.edgeType.getDistanceToEdge(n,i,o,a,s,l)<10}else return!1}_getRotation(e){const r=this.edgeType.getViaNode(),n=this.edgeType.getPoint(.5,r);e!==void 0&&this.labelModule.calculateLabelSize(e,this.selected,this.hover,n.x,n.y);const i={x:n.x,y:this.labelModule.size.yLine,angle:0};if(!this.labelModule.visible()||this.options.font.align==="horizontal")return i;const o=this.from.y-this.to.y,a=this.from.x-this.to.x;let s=Math.atan2(o,a);return(s<-1&&a<0||s>0&&a<0)&&(s+=Math.PI),i.angle=s,i}_pointOnCircle(e,r,n,i){return{x:e+n*Math.cos(i),y:r-n*Math.sin(i)}}select(){this.selected=!0}unselect(){this.selected=!1}cleanup(){return this.edgeType.cleanup()}remove(){this.cleanup(),this.disconnect(),delete this.body.edges[this.id]}endPointsValid(){return this.body.nodes[this.fromId]!==void 0&&this.body.nodes[this.toId]!==void 0}}class SLe{constructor(e,r,n){var i;this.body=e,this.images=r,this.groups=n,this.body.functions.createEdge=je(i=this.create).call(i,this),this.edgesListeners={add:(o,a)=>{this.add(a.items)},update:(o,a)=>{this.update(a.items)},remove:(o,a)=>{this.remove(a.items)}},this.options={},this.defaultOptions={arrows:{to:{enabled:!1,scaleFactor:1,type:"arrow"},middle:{enabled:!1,scaleFactor:1,type:"arrow"},from:{enabled:!1,scaleFactor:1,type:"arrow"}},endPointOffset:{from:0,to:0},arrowStrikethrough:!0,color:{color:"#848484",highlight:"#848484",hover:"#848484",inherit:"from",opacity:1},dashes:!1,font:{color:"#343434",size:14,face:"arial",background:"none",strokeWidth:2,strokeColor:"#ffffff",align:"horizontal",multi:!1,vadjust:0,bold:{mod:"bold"},boldital:{mod:"bold italic"},ital:{mod:"italic"},mono:{mod:"",size:15,face:"courier new",vadjust:2}},hidden:!1,hoverWidth:1.5,label:void 0,labelHighlightBold:!0,length:void 0,physics:!0,scaling:{min:1,max:15,label:{enabled:!0,min:14,max:30,maxVisible:30,drawThreshold:5},customScalingFunction:function(o,a,s,l){if(a===o)return .5;{const c=1/(a-o);return Math.max(0,(l-o)*c)}}},selectionWidth:1.5,selfReference:{size:20,angle:Math.PI/4,renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:10,x:5,y:5},background:{enabled:!1,color:"rgba(111,111,111,1)",size:10,dashes:!1},smooth:{enabled:!0,type:"dynamic",forceDirection:"none",roundness:.5},title:void 0,width:1,value:void 0},ur(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e=this,r,n;this.body.emitter.on("_forceDisableDynamicCurves",function(i){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;i==="dynamic"&&(i="continuous");let a=!1;for(const s in e.body.edges)if(Object.prototype.hasOwnProperty.call(e.body.edges,s)){const l=e.body.edges[s],c=e.body.data.edges.get(s);if(c!=null){const u=c.smooth;u!==void 0&&u.enabled===!0&&u.type==="dynamic"&&(i===void 0?l.setOptions({smooth:!1}):l.setOptions({smooth:{type:i}}),a=!0)}}o===!0&&a===!0&&e.body.emitter.emit("_dataChanged")}),this.body.emitter.on("_dataUpdated",()=>{this.reconnectEdges()}),this.body.emitter.on("refreshEdges",je(r=this.refresh).call(r,this)),this.body.emitter.on("refresh",je(n=this.refresh).call(n,this)),this.body.emitter.on("destroy",()=>{At(this.edgesListeners,(i,o)=>{this.body.data.edges&&this.body.data.edges.off(o,i)}),delete this.body.functions.createEdge,delete this.edgesListeners.add,delete this.edgesListeners.update,delete this.edgesListeners.remove,delete this.edgesListeners})}setOptions(e){if(e!==void 0){Ia.parseOptions(this.options,e,!0,this.defaultOptions,!0);let r=!1;if(e.smooth!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&(r=this.body.edges[n].updateEdgeType()||r);if(e.font!==void 0)for(const n in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,n)&&this.body.edges[n].updateLabelModule();(e.hidden!==void 0||e.physics!==void 0||r===!0)&&this.body.emitter.emit("_dataChanged")}}setData(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.data.edges;if(rF("id",e))this.body.data.edges=e;else if(Ir(e))this.body.data.edges=new Yv,this.body.data.edges.add(e);else if(!e)this.body.data.edges=new Yv;else throw new TypeError("Array or DataSet expected");if(n&&At(this.edgesListeners,(i,o)=>{n.off(o,i)}),this.body.edges={},this.body.data.edges){At(this.edgesListeners,(o,a)=>{this.body.data.edges.on(a,o)});const i=this.body.data.edges.getIds();this.add(i,!0)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}add(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.edges,i=this.body.data.edges;for(let o=0;o<e.length;o++){const a=e[o],s=n[a];s&&s.disconnect();const l=i.get(a,{showInternalIds:!0});n[a]=this.create(l)}this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),r===!1&&this.body.emitter.emit("_dataChanged")}update(e){const r=this.body.edges,n=this.body.data.edges;let i=!1;for(let o=0;o<e.length;o++){const a=e[o],s=n.get(a),l=r[a];l!==void 0?(l.disconnect(),i=l.setOptions(s)||i,l.connect()):(this.body.edges[a]=this.create(s),i=!0)}i===!0?(this.body.emitter.emit("_adjustEdgesForHierarchicalLayout"),this.body.emitter.emit("_dataChanged")):this.body.emitter.emit("_dataUpdated")}remove(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.length===0)return;const n=this.body.edges;At(e,i=>{const o=n[i];o!==void 0&&o.remove()}),r&&this.body.emitter.emit("_dataChanged")}refresh(){At(this.body.edges,(e,r)=>{const n=this.body.data.edges.get(r);n!==void 0&&e.setOptions(n)})}create(e){return new Ia(e,this.body,this.images,this.options,this.defaultOptions)}reconnectEdges(){let e;const r=this.body.nodes,n=this.body.edges;for(e in r)Object.prototype.hasOwnProperty.call(r,e)&&(r[e].edges=[]);for(e in n)if(Object.prototype.hasOwnProperty.call(n,e)){const i=n[e];i.from=null,i.to=null,i.connect()}}getConnectedNodes(e){const r=[];if(this.body.edges[e]!==void 0){const n=this.body.edges[e];n.fromId!==void 0&&r.push(n.fromId),n.toId!==void 0&&r.push(n.toId)}return r}_updateState(){this._addMissingEdges(),this._removeInvalidEdges()}_removeInvalidEdges(){const e=[];At(this.body.edges,(r,n)=>{const i=this.body.nodes[r.toId],o=this.body.nodes[r.fromId];i!==void 0&&i.isCluster===!0||o!==void 0&&o.isCluster===!0||(i===void 0||o===void 0)&&e.push(n)}),this.remove(e,!1)}_addMissingEdges(){const e=this.body.data.edges;if(e==null)return;const r=this.body.edges,n=[];lr(e).call(e,(i,o)=>{r[o]===void 0&&n.push(o)}),this.add(n,!0)}}class Vz{constructor(e,r,n){this.body=e,this.physicsBody=r,this.barnesHutTree,this.setOptions(n),this._rng=Wg("BARNES HUT SOLVER")}setOptions(e){this.options=e,this.thetaInversed=1/this.options.theta,this.overlapAvoidanceFactor=1-Math.max(0,Math.min(1,this.options.avoidOverlap))}solve(){if(this.options.gravitationalConstant!==0&&this.physicsBody.physicsNodeIndices.length>0){let e;const r=this.body.nodes,n=this.physicsBody.physicsNodeIndices,i=n.length,o=this._formBarnesHutTree(r,n);this.barnesHutTree=o;for(let a=0;a<i;a++)e=r[n[a]],e.options.mass>0&&this._getForceContributions(o.root,e)}}_getForceContributions(e,r){this._getForceContribution(e.children.NW,r),this._getForceContribution(e.children.NE,r),this._getForceContribution(e.children.SW,r),this._getForceContribution(e.children.SE,r)}_getForceContribution(e,r){if(e.childrenCount>0){const n=e.centerOfMass.x-r.x,i=e.centerOfMass.y-r.y,o=Math.sqrt(n*n+i*i);o*e.calcSize>this.thetaInversed?this._calculateForces(o,n,i,r,e):e.childrenCount===4?this._getForceContributions(e,r):e.children.data.id!=r.id&&this._calculateForces(o,n,i,r,e)}}_calculateForces(e,r,n,i,o){e===0&&(e=.1,r=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const a=this.options.gravitationalConstant*o.mass*i.options.mass/Math.pow(e,3),s=r*a,l=n*a;this.physicsBody.forces[i.id].x+=s,this.physicsBody.forces[i.id].y+=l}_formBarnesHutTree(e,r){let n;const i=r.length;let o=e[r[0]].x,a=e[r[0]].y,s=e[r[0]].x,l=e[r[0]].y;for(let p=1;p<i;p++){const y=e[r[p]],b=y.x,$=y.y;y.options.mass>0&&(b<o&&(o=b),b>s&&(s=b),$<a&&(a=$),$>l&&(l=$))}const c=Math.abs(s-o)-Math.abs(l-a);c>0?(a-=.5*c,l+=.5*c):(o+=.5*c,s-=.5*c);const f=Math.max(1e-5,Math.abs(s-o)),h=.5*f,v=.5*(o+s),g=.5*(a+l),m={root:{centerOfMass:{x:0,y:0},mass:0,range:{minX:v-h,maxX:v+h,minY:g-h,maxY:g+h},size:f,calcSize:1/f,children:{data:null},maxWidth:0,level:0,childrenCount:4}};this._splitBranch(m.root);for(let p=0;p<i;p++)n=e[r[p]],n.options.mass>0&&this._placeInTree(m.root,n);return m}_updateBranchMass(e,r){const n=e.centerOfMass,i=e.mass+r.options.mass,o=1/i;n.x=n.x*e.mass+r.x*r.options.mass,n.x*=o,n.y=n.y*e.mass+r.y*r.options.mass,n.y*=o,e.mass=i;const a=Math.max(Math.max(r.height,r.radius),r.width);e.maxWidth=e.maxWidth<a?a:e.maxWidth}_placeInTree(e,r,n){(n!=!0||n===void 0)&&this._updateBranchMass(e,r);const i=e.children.NW.range;let o;i.maxX>r.x?i.maxY>r.y?o="NW":o="SW":i.maxY>r.y?o="NE":o="SE",this._placeInRegion(e,r,o)}_placeInRegion(e,r,n){const i=e.children[n];switch(i.childrenCount){case 0:i.children.data=r,i.childrenCount=1,this._updateBranchMass(i,r);break;case 1:i.children.data.x===r.x&&i.children.data.y===r.y?(r.x+=this._rng(),r.y+=this._rng()):(this._splitBranch(i),this._placeInTree(i,r));break;case 4:this._placeInTree(i,r);break}}_splitBranch(e){let r=null;e.childrenCount===1&&(r=e.children.data,e.mass=0,e.centerOfMass.x=0,e.centerOfMass.y=0),e.childrenCount=4,e.children.data=null,this._insertRegion(e,"NW"),this._insertRegion(e,"NE"),this._insertRegion(e,"SW"),this._insertRegion(e,"SE"),r!=null&&this._placeInTree(e,r)}_insertRegion(e,r){let n,i,o,a;const s=.5*e.size;switch(r){case"NW":n=e.range.minX,i=e.range.minX+s,o=e.range.minY,a=e.range.minY+s;break;case"NE":n=e.range.minX+s,i=e.range.maxX,o=e.range.minY,a=e.range.minY+s;break;case"SW":n=e.range.minX,i=e.range.minX+s,o=e.range.minY+s,a=e.range.maxY;break;case"SE":n=e.range.minX+s,i=e.range.maxX,o=e.range.minY+s,a=e.range.maxY;break}e.children[r]={centerOfMass:{x:0,y:0},mass:0,range:{minX:n,maxX:i,minY:o,maxY:a},size:.5*e.size,calcSize:2*e.calcSize,children:{data:null},maxWidth:0,level:e.level+1,childrenCount:0}}_debug(e,r){this.barnesHutTree!==void 0&&(e.lineWidth=1,this._drawBranch(this.barnesHutTree.root,e,r))}_drawBranch(e,r,n){n===void 0&&(n="#FF0000"),e.childrenCount===4&&(this._drawBranch(e.children.NW,r),this._drawBranch(e.children.NE,r),this._drawBranch(e.children.SE,r),this._drawBranch(e.children.SW,r)),r.strokeStyle=n,r.beginPath(),r.moveTo(e.range.minX,e.range.minY),r.lineTo(e.range.maxX,e.range.minY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.minY),r.lineTo(e.range.maxX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.maxX,e.range.maxY),r.lineTo(e.range.minX,e.range.maxY),r.stroke(),r.beginPath(),r.moveTo(e.range.minX,e.range.maxY),r.lineTo(e.range.minX,e.range.minY),r.stroke()}}class CLe{constructor(e,r,n){this._rng=Wg("REPULSION SOLVER"),this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,i,o,a,s,l;const c=this.body.nodes,u=this.physicsBody.physicsNodeIndices,f=this.physicsBody.forces,h=this.options.nodeDistance,v=-2/3/h,g=4/3;for(let m=0;m<u.length-1;m++){s=c[u[m]];for(let p=m+1;p<u.length;p++)l=c[u[p]],e=l.x-s.x,r=l.y-s.y,n=Math.sqrt(e*e+r*r),n===0&&(n=.1*this._rng(),e=n),n<2*h&&(n<.5*h?a=1:a=v*n+g,a=a/n,i=e*a,o=r*a,f[s.id].x-=i,f[s.id].y-=o,f[l.id].x+=i,f[l.id].y+=o)}}}class xLe{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e,this.overlapAvoidanceFactor=Math.max(0,Math.min(1,this.options.avoidOverlap||0))}solve(){const e=this.body.nodes,r=this.physicsBody.physicsNodeIndices,n=this.physicsBody.forces,i=this.options.nodeDistance;for(let o=0;o<r.length-1;o++){const a=e[r[o]];for(let s=o+1;s<r.length;s++){const l=e[r[s]];if(a.level===l.level){const c=i+this.overlapAvoidanceFactor*((a.shape.radius||0)/2+(l.shape.radius||0)/2),u=l.x-a.x,f=l.y-a.y,h=Math.sqrt(u*u+f*f),v=.05;let g;h<c?g=-Math.pow(v*h,2)+Math.pow(v*c,2):g=0,h!==0&&(g=g/h);const m=u*g,p=f*g;n[a.id].x-=m,n[a.id].y-=p,n[l.id].x+=m,n[l.id].y+=p}}}}}class Kb{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r;const n=this.physicsBody.physicsEdgeIndices,i=this.body.edges;let o,a,s;for(let l=0;l<n.length;l++)r=i[n[l]],r.connected===!0&&r.toId!==r.fromId&&this.body.nodes[r.toId]!==void 0&&this.body.nodes[r.fromId]!==void 0&&(r.edgeType.via!==void 0?(e=r.options.length===void 0?this.options.springLength:r.options.length,o=r.to,a=r.edgeType.via,s=r.from,this._calculateSpringForce(o,a,.5*e),this._calculateSpringForce(a,s,.5*e)):(e=r.options.length===void 0?this.options.springLength*1.5:r.options.length,this._calculateSpringForce(r.from,r.to,e)))}_calculateSpringForce(e,r,n){const i=e.x-r.x,o=e.y-r.y,a=Math.max(Math.sqrt(i*i+o*o),.01),s=this.options.springConstant*(n-a)/a,l=i*s,c=o*s;this.physicsBody.forces[e.id]!==void 0&&(this.physicsBody.forces[e.id].x+=l,this.physicsBody.forces[e.id].y+=c),this.physicsBody.forces[r.id]!==void 0&&(this.physicsBody.forces[r.id].x-=l,this.physicsBody.forces[r.id].y-=c)}}class ELe{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,i,o,a,s,l;const c=this.body.edges,u=.5,f=this.physicsBody.physicsEdgeIndices,h=this.physicsBody.physicsNodeIndices,v=this.physicsBody.forces;for(let S=0;S<h.length;S++){const w=h[S];v[w].springFx=0,v[w].springFy=0}for(let S=0;S<f.length;S++)r=c[f[S]],r.connected===!0&&(e=r.options.length===void 0?this.options.springLength:r.options.length,n=r.from.x-r.to.x,i=r.from.y-r.to.y,l=Math.sqrt(n*n+i*i),l=l===0?.01:l,s=this.options.springConstant*(e-l)/l,o=n*s,a=i*s,r.to.level!=r.from.level?(v[r.toId]!==void 0&&(v[r.toId].springFx-=o,v[r.toId].springFy-=a),v[r.fromId]!==void 0&&(v[r.fromId].springFx+=o,v[r.fromId].springFy+=a)):(v[r.toId]!==void 0&&(v[r.toId].x-=u*o,v[r.toId].y-=u*a),v[r.fromId]!==void 0&&(v[r.fromId].x+=u*o,v[r.fromId].y+=u*a)));s=1;let g,m;for(let S=0;S<h.length;S++){const w=h[S];g=Math.min(s,Math.max(-s,v[w].springFx)),m=Math.min(s,Math.max(-s,v[w].springFy)),v[w].x+=g,v[w].y+=m}let p=0,y=0;for(let S=0;S<h.length;S++){const w=h[S];p+=v[w].x,y+=v[w].y}const b=p/h.length,$=y/h.length;for(let S=0;S<h.length;S++){const w=h[S];v[w].x-=b,v[w].y-=$}}}class dv{constructor(e,r,n){this.body=e,this.physicsBody=r,this.setOptions(n)}setOptions(e){this.options=e}solve(){let e,r,n,i;const o=this.body.nodes,a=this.physicsBody.physicsNodeIndices,s=this.physicsBody.forces;for(let l=0;l<a.length;l++){const c=a[l];i=o[c],e=-i.x,r=-i.y,n=Math.sqrt(e*e+r*r),this._calculateForces(n,e,r,s,i)}}_calculateForces(e,r,n,i,o){const a=e===0?0:this.options.centralGravity/e;i[o.id].x=r*a,i[o.id].y=n*a}}class OLe extends Vz{constructor(e,r,n){super(e,r,n),this._rng=Wg("FORCE ATLAS 2 BASED REPULSION SOLVER")}_calculateForces(e,r,n,i,o){e===0&&(e=.1*this._rng(),r=e),this.overlapAvoidanceFactor<1&&i.shape.radius&&(e=Math.max(.1+this.overlapAvoidanceFactor*i.shape.radius,e-i.shape.radius));const a=i.edges.length+1,s=this.options.gravitationalConstant*o.mass*i.options.mass*a/Math.pow(e,2),l=r*s,c=n*s;this.physicsBody.forces[i.id].x+=l,this.physicsBody.forces[i.id].y+=c}}class ILe extends dv{constructor(e,r,n){super(e,r,n)}_calculateForces(e,r,n,i,o){if(e>0){const a=o.edges.length+1,s=this.options.centralGravity*a*o.options.mass;i[o.id].x=r*s,i[o.id].y=n*s}}}class TLe{constructor(e){this.body=e,this.physicsBody={physicsNodeIndices:[],physicsEdgeIndices:[],forces:{},velocities:{}},this.physicsEnabled=!0,this.simulationInterval=1e3/60,this.requiresTimeout=!0,this.previousStates={},this.referenceState={},this.freezeCache={},this.renderTimer=void 0,this.adaptiveTimestep=!1,this.adaptiveTimestepEnabled=!1,this.adaptiveCounter=0,this.adaptiveInterval=3,this.stabilized=!1,this.startedStabilization=!1,this.stabilizationIterations=0,this.ready=!1,this.options={},this.defaultOptions={enabled:!0,barnesHut:{theta:.5,gravitationalConstant:-2e3,centralGravity:.3,springLength:95,springConstant:.04,damping:.09,avoidOverlap:0},forceAtlas2Based:{theta:.5,gravitationalConstant:-50,centralGravity:.01,springConstant:.08,springLength:100,damping:.4,avoidOverlap:0},repulsion:{centralGravity:.2,springLength:200,springConstant:.05,nodeDistance:100,damping:.09,avoidOverlap:0},hierarchicalRepulsion:{centralGravity:0,springLength:100,springConstant:.01,nodeDistance:120,damping:.09},maxVelocity:50,minVelocity:.75,solver:"barnesHut",stabilization:{enabled:!0,iterations:1e3,updateInterval:50,onlyDynamicEdges:!1,fit:!0},timestep:.5,adaptiveTimestep:!0,wind:{x:0,y:0}},Ur(this.options,this.defaultOptions),this.timestep=.5,this.layoutFailed=!1,this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("initPhysics",()=>{this.initPhysics()}),this.body.emitter.on("_layoutFailed",()=>{this.layoutFailed=!0}),this.body.emitter.on("resetPhysics",()=>{this.stopSimulation(),this.ready=!1}),this.body.emitter.on("disablePhysics",()=>{this.physicsEnabled=!1,this.stopSimulation()}),this.body.emitter.on("restorePhysics",()=>{this.setOptions(this.options),this.ready===!0&&this.startSimulation()}),this.body.emitter.on("startSimulation",()=>{this.ready===!0&&this.startSimulation()}),this.body.emitter.on("stopSimulation",()=>{this.stopSimulation()}),this.body.emitter.on("destroy",()=>{this.stopSimulation(!1),this.body.emitter.off()}),this.body.emitter.on("_dataChanged",()=>{this.updatePhysicsData()})}setOptions(e){if(e!==void 0)if(e===!1)this.options.enabled=!1,this.physicsEnabled=!1,this.stopSimulation();else if(e===!0)this.options.enabled=!0,this.physicsEnabled=!0,this.startSimulation();else{this.physicsEnabled=!0,ip(["stabilization"],this.options,e),Ti(this.options,e,"stabilization"),e.enabled===void 0&&(this.options.enabled=!0),this.options.enabled===!1&&(this.physicsEnabled=!1,this.stopSimulation());const r=this.options.wind;r&&((typeof r.x!="number"||S$(r.x))&&(r.x=0),(typeof r.y!="number"||S$(r.y))&&(r.y=0)),this.timestep=this.options.timestep}this.init()}init(){let e;this.options.solver==="forceAtlas2Based"?(e=this.options.forceAtlas2Based,this.nodesSolver=new OLe(this.body,this.physicsBody,e),this.edgesSolver=new Kb(this.body,this.physicsBody,e),this.gravitySolver=new ILe(this.body,this.physicsBody,e)):this.options.solver==="repulsion"?(e=this.options.repulsion,this.nodesSolver=new CLe(this.body,this.physicsBody,e),this.edgesSolver=new Kb(this.body,this.physicsBody,e),this.gravitySolver=new dv(this.body,this.physicsBody,e)):this.options.solver==="hierarchicalRepulsion"?(e=this.options.hierarchicalRepulsion,this.nodesSolver=new xLe(this.body,this.physicsBody,e),this.edgesSolver=new ELe(this.body,this.physicsBody,e),this.gravitySolver=new dv(this.body,this.physicsBody,e)):(e=this.options.barnesHut,this.nodesSolver=new Vz(this.body,this.physicsBody,e),this.edgesSolver=new Kb(this.body,this.physicsBody,e),this.gravitySolver=new dv(this.body,this.physicsBody,e)),this.modelOptions=e}initPhysics(){this.physicsEnabled===!0&&this.options.enabled===!0?this.options.stabilization.enabled===!0?this.stabilize():(this.stabilized=!1,this.ready=!0,this.body.emitter.emit("fit",{},this.layoutFailed),this.startSimulation()):(this.ready=!0,this.body.emitter.emit("fit"))}startSimulation(){if(this.physicsEnabled===!0&&this.options.enabled===!0){if(this.stabilized=!1,this.adaptiveTimestep=!1,this.body.emitter.emit("_resizeNodes"),this.viewFunction===void 0){var e;this.viewFunction=je(e=this.simulationStep).call(e,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}else this.body.emitter.emit("_redraw")}stopSimulation(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.stabilized=!0,e===!0&&this._emitStabilized(),this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.viewFunction=void 0,e===!0&&this.body.emitter.emit("_stopRendering"))}simulationStep(){const e=ep();this.physicsTick(),(ep()-e<.4*this.simulationInterval||this.runDoubleSpeed===!0)&&this.stabilized===!1&&(this.physicsTick(),this.runDoubleSpeed=!0),this.stabilized===!0&&this.stopSimulation()}_emitStabilized(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.stabilizationIterations;(this.stabilizationIterations>1||this.startedStabilization===!0)&&$o(()=>{this.body.emitter.emit("stabilized",{iterations:e}),this.startedStabilization=!1,this.stabilizationIterations=0},0)}physicsStep(){this.gravitySolver.solve(),this.nodesSolver.solve(),this.edgesSolver.solve(),this.moveNodes()}adjustTimeStep(){this._evaluateStepQuality()===!0?this.timestep=1.2*this.timestep:this.timestep/1.2<this.options.timestep?this.timestep=this.options.timestep:(this.adaptiveCounter=-1,this.timestep=Math.max(this.options.timestep,this.timestep/1.2))}physicsTick(){this._startStabilizing(),this.stabilized!==!0&&(this.adaptiveTimestep===!0&&this.adaptiveTimestepEnabled===!0?(this.adaptiveCounter%this.adaptiveInterval===0?(this.timestep=2*this.timestep,this.physicsStep(),this.revert(),this.timestep=.5*this.timestep,this.physicsStep(),this.physicsStep(),this.adjustTimeStep()):this.physicsStep(),this.adaptiveCounter+=1):(this.timestep=this.options.timestep,this.physicsStep()),this.stabilized===!0&&this.revert(),this.stabilizationIterations++)}updatePhysicsData(){this.physicsBody.forces={},this.physicsBody.physicsNodeIndices=[],this.physicsBody.physicsEdgeIndices=[];const e=this.body.nodes,r=this.body.edges;for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&e[n].options.physics===!0&&this.physicsBody.physicsNodeIndices.push(e[n].id);for(const n in r)Object.prototype.hasOwnProperty.call(r,n)&&r[n].options.physics===!0&&this.physicsBody.physicsEdgeIndices.push(r[n].id);for(let n=0;n<this.physicsBody.physicsNodeIndices.length;n++){const i=this.physicsBody.physicsNodeIndices[n];this.physicsBody.forces[i]={x:0,y:0},this.physicsBody.velocities[i]===void 0&&(this.physicsBody.velocities[i]={x:0,y:0})}for(const n in this.physicsBody.velocities)e[n]===void 0&&delete this.physicsBody.velocities[n]}revert(){const e=Or(this.previousStates),r=this.body.nodes,n=this.physicsBody.velocities;this.referenceState={};for(let i=0;i<e.length;i++){const o=e[i];r[o]!==void 0?r[o].options.physics===!0&&(this.referenceState[o]={positions:{x:r[o].x,y:r[o].y}},n[o].x=this.previousStates[o].vx,n[o].y=this.previousStates[o].vy,r[o].x=this.previousStates[o].x,r[o].y=this.previousStates[o].y):delete this.previousStates[o]}}_evaluateStepQuality(){let e,r,n;const i=this.body.nodes,o=this.referenceState,a=.3;for(const s in this.referenceState)if(Object.prototype.hasOwnProperty.call(this.referenceState,s)&&i[s]!==void 0&&(e=i[s].x-o[s].positions.x,r=i[s].y-o[s].positions.y,n=Math.sqrt(Math.pow(e,2)+Math.pow(r,2)),n>a))return!1;return!0}moveNodes(){const e=this.physicsBody.physicsNodeIndices;let r=0,n=0;const i=5;for(let o=0;o<e.length;o++){const a=e[o],s=this._performStep(a);r=Math.max(r,s),n+=s}this.adaptiveTimestepEnabled=n/e.length<i,this.stabilized=r<this.options.minVelocity}calculateComponentVelocity(e,r,n){const i=this.modelOptions.damping*e,o=(r-i)/n;e+=o*this.timestep;const a=this.options.maxVelocity||1e9;return Math.abs(e)>a&&(e=e>0?a:-a),e}_performStep(e){const r=this.body.nodes[e],n=this.physicsBody.forces[e];this.options.wind&&(n.x+=this.options.wind.x,n.y+=this.options.wind.y);const i=this.physicsBody.velocities[e];return this.previousStates[e]={x:r.x,y:r.y,vx:i.x,vy:i.y},r.options.fixed.x===!1?(i.x=this.calculateComponentVelocity(i.x,n.x,r.options.mass),r.x+=i.x*this.timestep):(n.x=0,i.x=0),r.options.fixed.y===!1?(i.y=this.calculateComponentVelocity(i.y,n.y,r.options.mass),r.y+=i.y*this.timestep):(n.y=0,i.y=0),Math.sqrt(Math.pow(i.x,2)+Math.pow(i.y,2))}_freezeNodes(){const e=this.body.nodes;for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&e[r].x&&e[r].y){const n=e[r].options.fixed;this.freezeCache[r]={x:n.x,y:n.y},n.x=!0,n.y=!0}}_restoreFrozenNodes(){const e=this.body.nodes;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&this.freezeCache[r]!==void 0&&(e[r].options.fixed.x=this.freezeCache[r].x,e[r].options.fixed.y=this.freezeCache[r].y);this.freezeCache={}}stabilize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.stabilization.iterations;if(typeof e!="number"&&(e=this.options.stabilization.iterations,console.error("The stabilize method needs a numeric amount of iterations. Switching to default: ",e)),this.physicsBody.physicsNodeIndices.length===0){this.ready=!0;return}this.adaptiveTimestep=this.options.adaptiveTimestep,this.body.emitter.emit("_resizeNodes"),this.stopSimulation(),this.stabilized=!1,this.body.emitter.emit("_blockRedraw"),this.targetIterations=e,this.options.stabilization.onlyDynamicEdges===!0&&this._freezeNodes(),this.stabilizationIterations=0,$o(()=>this._stabilizationBatch(),0)}_startStabilizing(){return this.startedStabilization===!0?!1:(this.body.emitter.emit("startStabilizing"),this.startedStabilization=!0,!0)}_stabilizationBatch(){const e=()=>this.stabilized===!1&&this.stabilizationIterations<this.targetIterations,r=()=>{this.body.emitter.emit("stabilizationProgress",{iterations:this.stabilizationIterations,total:this.targetIterations})};this._startStabilizing()&&r();let n=0;for(;e()&&n<this.options.stabilization.updateInterval;)this.physicsTick(),n++;if(r(),e()){var i;$o(je(i=this._stabilizationBatch).call(i,this),0)}else this._finalizeStabilization()}_finalizeStabilization(){this.body.emitter.emit("_allowRedraw"),this.options.stabilization.fit===!0&&this.body.emitter.emit("fit"),this.options.stabilization.onlyDynamicEdges===!0&&this._restoreFrozenNodes(),this.body.emitter.emit("stabilizationIterationsDone"),this.body.emitter.emit("_requestRedraw"),this.stabilized===!0?this._emitStabilized():this.startSimulation(),this.ready=!0}_drawForces(e){for(let r=0;r<this.physicsBody.physicsNodeIndices.length;r++){const n=this.physicsBody.physicsNodeIndices[r],i=this.body.nodes[n],o=this.physicsBody.forces[n],a=20,s=.03,l=Math.sqrt(Math.pow(o.x,2)+Math.pow(o.x,2)),c=Math.min(Math.max(5,l),15),u=3*c,f=b$((180-Math.min(1,Math.max(0,s*l))*180)/360,1,1),h={x:i.x+a*o.x,y:i.y+a*o.y};e.lineWidth=c,e.strokeStyle=f,e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(h.x,h.y),e.stroke();const v=Math.atan2(o.y,o.x);e.fillStyle=f,zz.draw(e,{type:"arrow",point:h,angle:v,length:u}),xf(e).call(e)}}}let Mh;const _Le=new Uint8Array(16);function PLe(){if(!Mh&&(Mh=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Mh))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Mh(_Le)}const gn=[];for(let t=0;t<256;++t)gn.push((t+256).toString(16).slice(1));function RLe(t,e=0){return gn[t[e+0]]+gn[t[e+1]]+gn[t[e+2]]+gn[t[e+3]]+"-"+gn[t[e+4]]+gn[t[e+5]]+"-"+gn[t[e+6]]+gn[t[e+7]]+"-"+gn[t[e+8]]+gn[t[e+9]]+"-"+gn[t[e+10]]+gn[t[e+11]]+gn[t[e+12]]+gn[t[e+13]]+gn[t[e+14]]+gn[t[e+15]]}const NLe=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var X2={randomUUID:NLe};function Mu(t,e,r){if(X2.randomUUID&&!t)return X2.randomUUID();t=t||{};const n=t.random||(t.rng||PLe)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,RLe(n)}class jn{constructor(){}static getRange(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,i=-1e9,o=1e9,a=-1e9,s;if(r.length>0)for(let l=0;l<r.length;l++)s=e[r[l]],o>s.shape.boundingBox.left&&(o=s.shape.boundingBox.left),a<s.shape.boundingBox.right&&(a=s.shape.boundingBox.right),n>s.shape.boundingBox.top&&(n=s.shape.boundingBox.top),i<s.shape.boundingBox.bottom&&(i=s.shape.boundingBox.bottom);return o===1e9&&a===-1e9&&n===1e9&&i===-1e9&&(n=0,i=0,o=0,a=0),{minX:o,maxX:a,minY:n,maxY:i}}static getRangeCore(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=1e9,i=-1e9,o=1e9,a=-1e9,s;if(r.length>0)for(let l=0;l<r.length;l++)s=e[r[l]],o>s.x&&(o=s.x),a<s.x&&(a=s.x),n>s.y&&(n=s.y),i<s.y&&(i=s.y);return o===1e9&&a===-1e9&&n===1e9&&i===-1e9&&(n=0,i=0,o=0,a=0),{minX:o,maxX:a,minY:n,maxY:i}}static findCenter(e){return{x:.5*(e.maxX+e.minX),y:.5*(e.maxY+e.minY)}}static cloneOptions(e,r){const n={};return r===void 0||r==="node"?(ur(n,e.options,!0),n.x=e.x,n.y=e.y,n.amountOfConnections=e.edges.length):ur(n,e.options,!0),n}}class MLe extends pr{constructor(e,r,n,i,o,a){super(e,r,n,i,o,a),this.isCluster=!0,this.containedNodes={},this.containedEdges={}}_openChildCluster(e){const r=this.body.nodes[e];if(this.containedNodes[e]===void 0)throw new Error("node with id: "+e+" not in current cluster");if(!r.isCluster)throw new Error("node with id: "+e+" is not a cluster");delete this.containedNodes[e],At(r.edges,n=>{delete this.containedEdges[n.id]}),At(r.containedNodes,(n,i)=>{this.containedNodes[i]=n}),r.containedNodes={},At(r.containedEdges,(n,i)=>{this.containedEdges[i]=n}),r.containedEdges={},At(r.edges,n=>{At(this.edges,i=>{var o,a;const s=Gt(o=i.clusteringEdgeReplacingIds).call(o,n.id);s!==-1&&(At(n.clusteringEdgeReplacingIds,l=>{i.clusteringEdgeReplacingIds.push(l),this.body.edges[l].edgeReplacedById=i.id}),Ho(a=i.clusteringEdgeReplacingIds).call(a,s,1))})}),r.edges=[]}}class DLe{constructor(e){this.body=e,this.clusteredNodes={},this.clusteredEdges={},this.options={},this.defaultOptions={},Ur(this.options,this.defaultOptions),this.body.emitter.on("_resetData",()=>{this.clusteredNodes={},this.clusteredEdges={}})}clusterByHubsize(e,r){e===void 0?e=this._getHubSize():typeof e=="object"&&(r=this._checkOptions(e),e=this._getHubSize());const n=[];for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodes[this.body.nodeIndices[i]];o.edges.length>=e&&n.push(o.id)}for(let i=0;i<n.length;i++)this.clusterByConnection(n[i],r,!0);this.body.emitter.emit("_dataChanged")}cluster(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.joinCondition===void 0)throw new Error("Cannot call clusterByNodeData without a joinCondition function in the options.");e=this._checkOptions(e);const n={},i={};At(this.body.nodes,(o,a)=>{o.options&&e.joinCondition(o.options)===!0&&(n[a]=o,At(o.edges,s=>{this.clusteredEdges[s.id]===void 0&&(i[s.id]=s)}))}),this._cluster(n,i,e,r)}clusterByEdgeCount(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;r=this._checkOptions(r);const i=[],o={};let a,s,l;for(let c=0;c<this.body.nodeIndices.length;c++){const u={},f={},h=this.body.nodeIndices[c],v=this.body.nodes[h];if(o[h]===void 0){l=0,s=[];for(let g=0;g<v.edges.length;g++)a=v.edges[g],this.clusteredEdges[a.id]===void 0&&(a.toId!==a.fromId&&l++,s.push(a));if(l===e){const g=function(p){if(r.joinCondition===void 0||r.joinCondition===null)return!0;const y=jn.cloneOptions(p);return r.joinCondition(y)};let m=!0;for(let p=0;p<s.length;p++){a=s[p];const y=this._getConnectedId(a,h);if(g(v))f[a.id]=a,u[h]=v,u[y]=this.body.nodes[y],o[h]=!0;else{m=!1;break}}if(Or(u).length>0&&Or(f).length>0&&m===!0){const y=function(){for(let b=0;b<i.length;++b)for(const $ in u)if(i[b].nodes[$]!==void 0)return i[b]}();if(y!==void 0){for(const b in u)y.nodes[b]===void 0&&(y.nodes[b]=u[b]);for(const b in f)y.edges[b]===void 0&&(y.edges[b]=f[b])}else i.push({nodes:u,edges:f})}}}}for(let c=0;c<i.length;c++)this._cluster(i[c].nodes,i[c].edges,r,!1);n===!0&&this.body.emitter.emit("_dataChanged")}clusterOutliers(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(1,e,r)}clusterBridges(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;this.clusterByEdgeCount(2,e,r)}clusterByConnection(e,r){var n;let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No nodeId supplied to clusterByConnection!");if(this.body.nodes[e]===void 0)throw new Error("The nodeId given to clusterByConnection does not exist!");const o=this.body.nodes[e];r=this._checkOptions(r,o),r.clusterNodeProperties.x===void 0&&(r.clusterNodeProperties.x=o.x),r.clusterNodeProperties.y===void 0&&(r.clusterNodeProperties.y=o.y),r.clusterNodeProperties.fixed===void 0&&(r.clusterNodeProperties.fixed={},r.clusterNodeProperties.fixed.x=o.options.fixed.x,r.clusterNodeProperties.fixed.y=o.options.fixed.y);const a={},s={},l=o.id,c=jn.cloneOptions(o);a[l]=o;for(let f=0;f<o.edges.length;f++){const h=o.edges[f];if(this.clusteredEdges[h.id]===void 0){const v=this._getConnectedId(h,l);if(this.clusteredNodes[v]===void 0)if(v!==l)if(r.joinCondition===void 0)s[h.id]=h,a[v]=this.body.nodes[v];else{const g=jn.cloneOptions(this.body.nodes[v]);r.joinCondition(c,g)===!0&&(s[h.id]=h,a[v]=this.body.nodes[v])}else s[h.id]=h}}const u=ac(n=Or(a)).call(n,function(f){return a[f].id});for(const f in a){if(!Object.prototype.hasOwnProperty.call(a,f))continue;const h=a[f];for(let v=0;v<h.edges.length;v++){const g=h.edges[v];Gt(u).call(u,this._getConnectedId(g,h.id))>-1&&(s[g.id]=g)}}this._cluster(a,s,r,i)}_createClusterEdges(e,r,n,i){let o,a,s,l,c,u;const f=Or(e),h=[];for(let m=0;m<f.length;m++){a=f[m],s=e[a];for(let p=0;p<s.edges.length;p++)o=s.edges[p],this.clusteredEdges[o.id]===void 0&&(o.toId==o.fromId?r[o.id]=o:o.toId==a?(l=n.id,c=o.fromId,u=c):(l=o.toId,c=n.id,u=l),e[u]===void 0&&h.push({edge:o,fromId:c,toId:l}))}const v=[],g=function(m){for(let p=0;p<v.length;p++){const y=v[p],b=m.fromId===y.fromId&&m.toId===y.toId,$=m.fromId===y.toId&&m.toId===y.fromId;if(b||$)return y}return null};for(let m=0;m<h.length;m++){const p=h[m],y=p.edge;let b=g(p);b===null?(b=this._createClusteredEdge(p.fromId,p.toId,y,i),v.push(b)):b.clusteringEdgeReplacingIds.push(y.id),this.body.edges[y.id].edgeReplacedById=b.id,this._backupEdgeOptions(y),y.setOptions({physics:!1})}}_checkOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return e.clusterEdgeProperties===void 0&&(e.clusterEdgeProperties={}),e.clusterNodeProperties===void 0&&(e.clusterNodeProperties={}),e}_cluster(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const o=[];for(const u in e)Object.prototype.hasOwnProperty.call(e,u)&&this.clusteredNodes[u]!==void 0&&o.push(u);for(let u=0;u<o.length;++u)delete e[o[u]];if(Or(e).length==0||Or(e).length==1&&n.clusterNodeProperties.allowSingleNodeCluster!=!0)return;let a=ur({},n.clusterNodeProperties);if(n.processProperties!==void 0){const u=[];for(const h in e)if(Object.prototype.hasOwnProperty.call(e,h)){const v=jn.cloneOptions(e[h]);u.push(v)}const f=[];for(const h in r)if(Object.prototype.hasOwnProperty.call(r,h)&&h.substr(0,12)!=="clusterEdge:"){const v=jn.cloneOptions(r[h],"edge");f.push(v)}if(a=n.processProperties(a,u,f),!a)throw new Error("The processProperties function does not return properties!")}a.id===void 0&&(a.id="cluster:"+Mu());const s=a.id;a.label===void 0&&(a.label="cluster");let l;a.x===void 0&&(l=this._getClusterPosition(e),a.x=l.x),a.y===void 0&&(l===void 0&&(l=this._getClusterPosition(e)),a.y=l.y),a.id=s;const c=this.body.functions.createNode(a,MLe);c.containedNodes=e,c.containedEdges=r,c.clusterEdgeProperties=n.clusterEdgeProperties,this.body.nodes[a.id]=c,this._clusterEdges(e,r,a,n.clusterEdgeProperties),a.id=void 0,i===!0&&this.body.emitter.emit("_dataChanged")}_backupEdgeOptions(e){this.clusteredEdges[e.id]===void 0&&(this.clusteredEdges[e.id]={physics:e.options.physics})}_restoreEdge(e){const r=this.clusteredEdges[e.id];r!==void 0&&(e.setOptions({physics:r.physics}),delete this.clusteredEdges[e.id])}isCluster(e){return this.body.nodes[e]!==void 0?this.body.nodes[e].isCluster===!0:(console.error("Node does not exist."),!1)}_getClusterPosition(e){const r=Or(e);let n=e[r[0]].x,i=e[r[0]].x,o=e[r[0]].y,a=e[r[0]].y,s;for(let l=1;l<r.length;l++)s=e[r[l]],n=s.x<n?s.x:n,i=s.x>i?s.x:i,o=s.y<o?s.y:o,a=s.y>a?s.y:a;return{x:.5*(n+i),y:.5*(o+a)}}openCluster(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0)throw new Error("No clusterNodeId supplied to openCluster.");const i=this.body.nodes[e];if(i===void 0)throw new Error("The clusterNodeId supplied to openCluster does not exist.");if(i.isCluster!==!0||i.containedNodes===void 0||i.containedEdges===void 0)throw new Error("The node:"+e+" is not a valid cluster.");const o=this.findNode(e),a=Gt(o).call(o,e)-1;if(a>=0){const u=o[a];this.body.nodes[u]._openChildCluster(e),delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged");return}const s=i.containedNodes,l=i.containedEdges;if(r!==void 0&&r.releaseFunction!==void 0&&typeof r.releaseFunction=="function"){const u={},f={x:i.x,y:i.y};for(const v in s)if(Object.prototype.hasOwnProperty.call(s,v)){const g=this.body.nodes[v];u[v]={x:g.x,y:g.y}}const h=r.releaseFunction(f,u);for(const v in s)if(Object.prototype.hasOwnProperty.call(s,v)){const g=this.body.nodes[v];h[v]!==void 0&&(g.x=h[v].x===void 0?i.x:h[v].x,g.y=h[v].y===void 0?i.y:h[v].y)}}else At(s,function(u){u.options.fixed.x===!1&&(u.x=i.x),u.options.fixed.y===!1&&(u.y=i.y)});for(const u in s)if(Object.prototype.hasOwnProperty.call(s,u)){const f=this.body.nodes[u];f.vx=i.vx,f.vy=i.vy,f.setOptions({physics:!0}),delete this.clusteredNodes[u]}const c=[];for(let u=0;u<i.edges.length;u++)c.push(i.edges[u]);for(let u=0;u<c.length;u++){const f=c[u],h=this._getConnectedId(f,e),v=this.clusteredNodes[h];for(let g=0;g<f.clusteringEdgeReplacingIds.length;g++){const m=f.clusteringEdgeReplacingIds[g],p=this.body.edges[m];if(p!==void 0)if(v!==void 0){const y=this.body.nodes[v.clusterId];y.containedEdges[p.id]=p,delete l[p.id];let b=p.fromId,$=p.toId;p.toId==h?$=v.clusterId:b=v.clusterId,this._createClusteredEdge(b,$,p,y.clusterEdgeProperties,{hidden:!1,physics:!0})}else this._restoreEdge(p)}f.remove()}for(const u in l)Object.prototype.hasOwnProperty.call(l,u)&&this._restoreEdge(l[u]);delete this.body.nodes[e],n===!0&&this.body.emitter.emit("_dataChanged")}getNodesInCluster(e){const r=[];if(this.isCluster(e)===!0){const n=this.body.nodes[e].containedNodes;for(const i in n)Object.prototype.hasOwnProperty.call(n,i)&&r.push(this.body.nodes[i].id)}return r}findNode(e){const r=[];let i=0,o;for(;this.clusteredNodes[e]!==void 0&&i<100;){if(o=this.body.nodes[e],o===void 0)return[];r.push(o.id),e=this.clusteredNodes[e].clusterId,i++}return o=this.body.nodes[e],o===void 0?[]:(r.push(o.id),hs(r).call(r),r)}updateClusteredNode(e,r){if(e===void 0)throw new Error("No clusteredNodeId supplied to updateClusteredNode.");if(r===void 0)throw new Error("No newOptions supplied to updateClusteredNode.");if(this.body.nodes[e]===void 0)throw new Error("The clusteredNodeId supplied to updateClusteredNode does not exist.");this.body.nodes[e].setOptions(r),this.body.emitter.emit("_dataChanged")}updateEdge(e,r){if(e===void 0)throw new Error("No startEdgeId supplied to updateEdge.");if(r===void 0)throw new Error("No newOptions supplied to updateEdge.");if(this.body.edges[e]===void 0)throw new Error("The startEdgeId supplied to updateEdge does not exist.");const n=this.getClusteredEdges(e);for(let i=0;i<n.length;i++)this.body.edges[n[i]].setOptions(r);this.body.emitter.emit("_dataChanged")}getClusteredEdges(e){const r=[];let i=0;for(;e!==void 0&&this.body.edges[e]!==void 0&&i<100;)r.push(this.body.edges[e].id),e=this.body.edges[e].edgeReplacedById,i++;return hs(r).call(r),r}getBaseEdge(e){return this.getBaseEdges(e)[0]}getBaseEdges(e){const r=[e],n=[],i=[],o=100;let a=0;for(;r.length>0&&a<o;){const s=r.pop();if(s===void 0)continue;const l=this.body.edges[s];if(l===void 0)continue;a++;const c=l.clusteringEdgeReplacingIds;if(c===void 0)i.push(s);else for(let u=0;u<c.length;++u){const f=c[u];Gt(r).call(r,c)!==-1||Gt(n).call(n,c)!==-1||r.push(f)}n.push(s)}return i}_getConnectedId(e,r){return e.toId!=r?e.toId:(e.fromId!=r,e.fromId)}_getHubSize(){let e=0,r=0,n=0,i=0;for(let l=0;l<this.body.nodeIndices.length;l++){const c=this.body.nodes[this.body.nodeIndices[l]];c.edges.length>i&&(i=c.edges.length),e+=c.edges.length,r+=Math.pow(c.edges.length,2),n+=1}e=e/n,r=r/n;const o=r-Math.pow(e,2),a=Math.sqrt(o);let s=Math.floor(e+2*a);return s>i&&(s=i),s}_createClusteredEdge(e,r,n,i,o){const a=jn.cloneOptions(n,"edge");ur(a,i),a.from=e,a.to=r,a.id="clusterEdge:"+Mu(),o!==void 0&&ur(a,o);const s=this.body.functions.createEdge(a);return s.clusteringEdgeReplacingIds=[n.id],s.connect(),this.body.edges[s.id]=s,s}_clusterEdges(e,r,n,i){if(r instanceof Ia){const o=r,a={};a[o.id]=o,r=a}if(e instanceof pr){const o=e,a={};a[o.id]=o,e=a}if(n==null)throw new Error("_clusterEdges: parameter clusterNode required");i===void 0&&(i=n.clusterEdgeProperties),this._createClusterEdges(e,r,n,i);for(const o in r)if(Object.prototype.hasOwnProperty.call(r,o)&&this.body.edges[o]!==void 0){const a=this.body.edges[o];this._backupEdgeOptions(a),a.setOptions({physics:!1})}for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(this.clusteredNodes[o]={clusterId:n.id,node:this.body.nodes[o]},this.body.nodes[o].setOptions({physics:!1}))}_getClusterNodeForNode(e){if(e===void 0)return;const r=this.clusteredNodes[e];if(r===void 0)return;const n=r.clusterId;if(n!==void 0)return this.body.nodes[n]}_filter(e,r){const n=[];return At(e,i=>{r(i)&&n.push(i)}),n}_updateState(){let e;const r=[],n={},i=l=>{At(this.body.nodes,c=>{c.isCluster===!0&&l(c)})};for(e in this.clusteredNodes){if(!Object.prototype.hasOwnProperty.call(this.clusteredNodes,e))continue;this.body.nodes[e]===void 0&&r.push(e)}i(function(l){for(let c=0;c<r.length;c++)delete l.containedNodes[r[c]]});for(let l=0;l<r.length;l++)delete this.clusteredNodes[r[l]];At(this.clusteredEdges,l=>{const c=this.body.edges[l];(c===void 0||!c.endPointsValid())&&(n[l]=l)}),i(function(l){At(l.containedEdges,(c,u)=>{!c.endPointsValid()&&!n[u]&&(n[u]=u)})}),At(this.body.edges,(l,c)=>{let u=!0;const f=l.clusteringEdgeReplacingIds;if(f!==void 0){let h=0;At(f,v=>{const g=this.body.edges[v];g!==void 0&&g.endPointsValid()&&(h+=1)}),u=h>0}(!l.endPointsValid()||!u)&&(n[c]=c)}),i(l=>{At(n,c=>{delete l.containedEdges[c],At(l.edges,(u,f)=>{if(u.id===c){l.edges[f]=null;return}u.clusteringEdgeReplacingIds=this._filter(u.clusteringEdgeReplacingIds,function(h){return!n[h]})}),l.edges=this._filter(l.edges,function(u){return u!==null})})}),At(n,l=>{delete this.clusteredEdges[l]}),At(n,l=>{delete this.body.edges[l]});const o=Or(this.body.edges);At(o,l=>{const c=this.body.edges[l],u=this._isClusteredNode(c.fromId)||this._isClusteredNode(c.toId);if(u!==this._isClusteredEdge(c.id))if(u){const f=this._getClusterNodeForNode(c.fromId);f!==void 0&&this._clusterEdges(this.body.nodes[c.fromId],c,f);const h=this._getClusterNodeForNode(c.toId);h!==void 0&&this._clusterEdges(this.body.nodes[c.toId],c,h)}else delete this._clusterEdges[l],this._restoreEdge(c)});let a=!1,s=!0;for(;s;){const l=[];i(function(c){const u=Or(c.containedNodes).length,f=c.options.allowSingleNodeCluster===!0;(f&&u<1||!f&&u<2)&&l.push(c.id)});for(let c=0;c<l.length;++c)this.openCluster(l[c],{},!1);s=l.length>0,a=a||s}a&&this._updateState()}_isClusteredNode(e){return this.clusteredNodes[e]!==void 0}_isClusteredEdge(e){return this.clusteredEdges[e]!==void 0}}function ALe(){let t;window!==void 0&&(t=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame),t===void 0?window.requestAnimationFrame=function(e){e()}:window.requestAnimationFrame=t}class jLe{constructor(e,r){ALe(),this.body=e,this.canvas=r,this.redrawRequested=!1,this.renderTimer=void 0,this.requiresTimeout=!0,this.renderingActive=!1,this.renderRequests=0,this.allowRedraw=!0,this.dragging=!1,this.zooming=!1,this.options={},this.defaultOptions={hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1},Ur(this.options,this.defaultOptions),this._determineBrowserMethod(),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.on("dragStart",()=>{this.dragging=!0}),this.body.emitter.on("dragEnd",()=>{this.dragging=!1}),this.body.emitter.on("zoom",()=>{this.zooming=!0,window.clearTimeout(this.zoomTimeoutId),this.zoomTimeoutId=$o(()=>{var r;this.zooming=!1,je(r=this._requestRedraw).call(r,this)()},250)}),this.body.emitter.on("_resizeNodes",()=>{this._resizeNodes()}),this.body.emitter.on("_redraw",()=>{this.renderingActive===!1&&this._redraw()}),this.body.emitter.on("_blockRedraw",()=>{this.allowRedraw=!1}),this.body.emitter.on("_allowRedraw",()=>{this.allowRedraw=!0,this.redrawRequested=!1}),this.body.emitter.on("_requestRedraw",je(e=this._requestRedraw).call(e,this)),this.body.emitter.on("_startRendering",()=>{this.renderRequests+=1,this.renderingActive=!0,this._startRendering()}),this.body.emitter.on("_stopRendering",()=>{this.renderRequests-=1,this.renderingActive=this.renderRequests>0,this.renderTimer=void 0}),this.body.emitter.on("destroy",()=>{this.renderRequests=0,this.allowRedraw=!1,this.renderingActive=!1,this.requiresTimeout===!0?clearTimeout(this.renderTimer):window.cancelAnimationFrame(this.renderTimer),this.body.emitter.off()})}setOptions(e){e!==void 0&&Uc(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag"],this.options,e)}_requestNextFrame(e,r){if(typeof window>"u")return;let n;const i=window;return this.requiresTimeout===!0?n=$o(e,r):i.requestAnimationFrame&&(n=i.requestAnimationFrame(e)),n}_startRendering(){if(this.renderingActive===!0&&this.renderTimer===void 0){var e;this.renderTimer=this._requestNextFrame(je(e=this._renderStep).call(e,this),this.simulationInterval)}}_renderStep(){this.renderingActive===!0&&(this.renderTimer=void 0,this.requiresTimeout===!0&&this._startRendering(),this._redraw(),this.requiresTimeout===!1&&this._startRendering())}redraw(){this.body.emitter.emit("setSize"),this._redraw()}_requestRedraw(){this.redrawRequested!==!0&&this.renderingActive===!1&&this.allowRedraw===!0&&(this.redrawRequested=!0,this._requestNextFrame(()=>{this._redraw(!1)},0))}_redraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(this.allowRedraw===!0){this.body.emitter.emit("initRedraw"),this.redrawRequested=!1;const r={drawExternalLabels:null};(this.canvas.frame.canvas.width===0||this.canvas.frame.canvas.height===0)&&this.canvas.setSize(),this.canvas.setTransform();const n=this.canvas.getContext(),i=this.canvas.frame.canvas.clientWidth,o=this.canvas.frame.canvas.clientHeight;if(n.clearRect(0,0,i,o),this.canvas.frame.clientWidth===0)return;if(n.save(),n.translate(this.body.view.translation.x,this.body.view.translation.y),n.scale(this.body.view.scale,this.body.view.scale),n.beginPath(),this.body.emitter.emit("beforeDrawing",n),n.closePath(),e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawEdges(n),this.dragging===!1||this.dragging===!0&&this.options.hideNodesOnDrag===!1){const{drawExternalLabels:a}=this._drawNodes(n,e);r.drawExternalLabels=a}e===!1&&(this.dragging===!1||this.dragging===!0&&this.options.hideEdgesOnDrag===!1)&&(this.zooming===!1||this.zooming===!0&&this.options.hideEdgesOnZoom===!1)&&this._drawArrows(n),r.drawExternalLabels!=null&&r.drawExternalLabels(),e===!1&&this._drawSelectionBox(n),n.beginPath(),this.body.emitter.emit("afterDrawing",n),n.closePath(),n.restore(),e===!0&&n.clearRect(0,0,i,o)}}_resizeNodes(){this.canvas.setTransform();const e=this.canvas.getContext();e.save(),e.translate(this.body.view.translation.x,this.body.view.translation.y),e.scale(this.body.view.scale,this.body.view.scale);const r=this.body.nodes;let n;for(const i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n=r[i],n.resize(e),n.updateBoundingBox(e,n.selected));e.restore()}_drawNodes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const n=this.body.nodes,i=this.body.nodeIndices;let o;const a=[],s=[],l=20,c=this.canvas.DOMtoCanvas({x:-l,y:-l}),u=this.canvas.DOMtoCanvas({x:this.canvas.frame.canvas.clientWidth+l,y:this.canvas.frame.canvas.clientHeight+l}),f={top:c.y,left:c.x,bottom:u.y,right:u.x},h=[];for(let p=0;p<i.length;p++)if(o=n[i[p]],o.hover)s.push(i[p]);else if(o.isSelected())a.push(i[p]);else if(r===!0){const y=o.draw(e);y.drawExternalLabel!=null&&h.push(y.drawExternalLabel)}else if(o.isBoundingBoxOverlappingWith(f)===!0){const y=o.draw(e);y.drawExternalLabel!=null&&h.push(y.drawExternalLabel)}else o.updateBoundingBox(e,o.selected);let v;const g=a.length,m=s.length;for(v=0;v<g;v++){o=n[a[v]];const p=o.draw(e);p.drawExternalLabel!=null&&h.push(p.drawExternalLabel)}for(v=0;v<m;v++){o=n[s[v]];const p=o.draw(e);p.drawExternalLabel!=null&&h.push(p.drawExternalLabel)}return{drawExternalLabels:()=>{for(const p of h)p()}}}_drawEdges(e){const r=this.body.edges,n=this.body.edgeIndices;for(let i=0;i<n.length;i++){const o=r[n[i]];o.connected===!0&&o.draw(e)}}_drawArrows(e){const r=this.body.edges,n=this.body.edgeIndices;for(let i=0;i<n.length;i++){const o=r[n[i]];o.connected===!0&&o.drawArrows(e)}}_determineBrowserMethod(){if(typeof window<"u"){const e=navigator.userAgent.toLowerCase();this.requiresTimeout=!1,Gt(e).call(e,"msie 9.0")!=-1?this.requiresTimeout=!0:Gt(e).call(e,"safari")!=-1&&Gt(e).call(e,"chrome")<=-1&&(this.requiresTimeout=!0)}else this.requiresTimeout=!0}_drawSelectionBox(e){if(this.body.selectionBox.show){e.beginPath();const r=this.body.selectionBox.position.end.x-this.body.selectionBox.position.start.x,n=this.body.selectionBox.position.end.y-this.body.selectionBox.position.start.y;e.rect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,n),e.fillStyle="rgba(151, 194, 252, 0.2)",e.fillRect(this.body.selectionBox.position.start.x,this.body.selectionBox.position.start.y,r,n),e.strokeStyle="rgba(151, 194, 252, 1)",e.stroke()}else e.closePath()}}var kLe=ir,BLe=kLe.setInterval,FLe=BLe,LLe=Ot(FLe);function cp(t,e){e.inputHandler=function(r){r.isFirst&&e(r)},t.on("hammer.input",e.inputHandler)}function Wz(t,e){return e.inputHandler=function(r){r.isFinal&&e(r)},t.on("hammer.input",e.inputHandler)}class zLe{constructor(e){this.body=e,this.pixelRatio=1,this.cameraState={},this.initialized=!1,this.canvasViewCenter={},this._cleanupCallbacks=[],this.options={},this.defaultOptions={autoResize:!0,height:"100%",width:"100%"},Ur(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){var e;this.body.emitter.once("resize",r=>{r.width!==0&&(this.body.view.translation.x=r.width*.5),r.height!==0&&(this.body.view.translation.y=r.height*.5)}),this.body.emitter.on("setSize",je(e=this.setSize).call(e,this)),this.body.emitter.on("destroy",()=>{this.hammerFrame.destroy(),this.hammer.destroy(),this._cleanUp()})}setOptions(e){if(e!==void 0&&Uc(["width","height","autoResize"],this.options,e),this._cleanUp(),this.options.autoResize===!0){var r;if(window.ResizeObserver){const i=new ResizeObserver(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")}),{frame:o}=this;i.observe(o),this._cleanupCallbacks.push(()=>{i.unobserve(o)})}else{const i=LLe(()=>{this.setSize()===!0&&this.body.emitter.emit("_requestRedraw")},1e3);this._cleanupCallbacks.push(()=>{clearInterval(i)})}const n=je(r=this._onResize).call(r,this);window.addEventListener("resize",n),this._cleanupCallbacks.push(()=>{window.removeEventListener("resize",n)})}}_cleanUp(){var e,r,n;lr(e=hs(r=Ho(n=this._cleanupCallbacks).call(n,0)).call(r)).call(e,i=>{try{i()}catch(o){console.error(o)}})}_onResize(){this.setSize(),this.body.emitter.emit("_redraw")}_getCameraState(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.pixelRatio;this.initialized===!0&&(this.cameraState.previousWidth=this.frame.canvas.width/e,this.cameraState.previousHeight=this.frame.canvas.height/e,this.cameraState.scale=this.body.view.scale,this.cameraState.position=this.DOMtoCanvas({x:.5*this.frame.canvas.width/e,y:.5*this.frame.canvas.height/e}))}_setCameraState(){if(this.cameraState.scale!==void 0&&this.frame.canvas.clientWidth!==0&&this.frame.canvas.clientHeight!==0&&this.pixelRatio!==0&&this.cameraState.previousWidth>0&&this.cameraState.previousHeight>0){const e=this.frame.canvas.width/this.pixelRatio/this.cameraState.previousWidth,r=this.frame.canvas.height/this.pixelRatio/this.cameraState.previousHeight;let n=this.cameraState.scale;e!=1&&r!=1?n=this.cameraState.scale*.5*(e+r):e!=1?n=this.cameraState.scale*e:r!=1&&(n=this.cameraState.scale*r),this.body.view.scale=n;const i=this.DOMtoCanvas({x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight}),o={x:i.x-this.cameraState.position.x,y:i.y-this.cameraState.position.y};this.body.view.translation.x+=o.x*this.body.view.scale,this.body.view.translation.y+=o.y*this.body.view.scale}}_prepareValue(e){if(typeof e=="number")return e+"px";if(typeof e=="string"){if(Gt(e).call(e,"%")!==-1||Gt(e).call(e,"px")!==-1)return e;if(Gt(e).call(e,"%")===-1)return e+"px"}throw new Error("Could not use the value supplied for width or height:"+e)}_create(){for(;this.body.container.hasChildNodes();)this.body.container.removeChild(this.body.container.firstChild);if(this.frame=document.createElement("div"),this.frame.className="vis-network",this.frame.style.position="relative",this.frame.style.overflow="hidden",this.frame.tabIndex=0,this.frame.canvas=document.createElement("canvas"),this.frame.canvas.style.position="relative",this.frame.appendChild(this.frame.canvas),this.frame.canvas.getContext)this._setPixelRatio(),this.setTransform();else{const e=document.createElement("DIV");e.style.color="red",e.style.fontWeight="bold",e.style.padding="10px",e.innerText="Error: your browser does not support HTML canvas",this.frame.canvas.appendChild(e)}this.body.container.appendChild(this.frame),this.body.view.scale=1,this.body.view.translation={x:.5*this.frame.canvas.clientWidth,y:.5*this.frame.canvas.clientHeight},this._bindHammer()}_bindHammer(){this.hammer!==void 0&&this.hammer.destroy(),this.drag={},this.pinch={},this.hammer=new Fl(this.frame.canvas),this.hammer.get("pinch").set({enable:!0}),this.hammer.get("pan").set({threshold:5,direction:Fl.DIRECTION_ALL}),cp(this.hammer,e=>{this.body.eventListeners.onTouch(e)}),this.hammer.on("tap",e=>{this.body.eventListeners.onTap(e)}),this.hammer.on("doubletap",e=>{this.body.eventListeners.onDoubleTap(e)}),this.hammer.on("press",e=>{this.body.eventListeners.onHold(e)}),this.hammer.on("panstart",e=>{this.body.eventListeners.onDragStart(e)}),this.hammer.on("panmove",e=>{this.body.eventListeners.onDrag(e)}),this.hammer.on("panend",e=>{this.body.eventListeners.onDragEnd(e)}),this.hammer.on("pinch",e=>{this.body.eventListeners.onPinch(e)}),this.frame.canvas.addEventListener("wheel",e=>{this.body.eventListeners.onMouseWheel(e)}),this.frame.canvas.addEventListener("mousemove",e=>{this.body.eventListeners.onMouseMove(e)}),this.frame.canvas.addEventListener("contextmenu",e=>{this.body.eventListeners.onContext(e)}),this.hammerFrame=new Fl(this.frame),Wz(this.hammerFrame,e=>{this.body.eventListeners.onRelease(e)})}setSize(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.width,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.height;e=this._prepareValue(e),r=this._prepareValue(r);let n=!1;const i=this.frame.canvas.width,o=this.frame.canvas.height,a=this.pixelRatio;if(this._setPixelRatio(),e!=this.options.width||r!=this.options.height||this.frame.style.width!=e||this.frame.style.height!=r)this._getCameraState(a),this.frame.style.width=e,this.frame.style.height=r,this.frame.canvas.style.width="100%",this.frame.canvas.style.height="100%",this.frame.canvas.width=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),this.frame.canvas.height=Math.round(this.frame.canvas.clientHeight*this.pixelRatio),this.options.width=e,this.options.height=r,this.canvasViewCenter={x:.5*this.frame.clientWidth,y:.5*this.frame.clientHeight},n=!0;else{const s=Math.round(this.frame.canvas.clientWidth*this.pixelRatio),l=Math.round(this.frame.canvas.clientHeight*this.pixelRatio);(this.frame.canvas.width!==s||this.frame.canvas.height!==l)&&this._getCameraState(a),this.frame.canvas.width!==s&&(this.frame.canvas.width=s,n=!0),this.frame.canvas.height!==l&&(this.frame.canvas.height=l,n=!0)}return n===!0&&(this.body.emitter.emit("resize",{width:Math.round(this.frame.canvas.width/this.pixelRatio),height:Math.round(this.frame.canvas.height/this.pixelRatio),oldWidth:Math.round(i/this.pixelRatio),oldHeight:Math.round(o/this.pixelRatio)}),this._setCameraState()),this.initialized=!0,n}getContext(){return this.frame.canvas.getContext("2d")}_determinePixelRatio(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");let r=1;typeof window<"u"&&(r=window.devicePixelRatio||1);const n=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return r/n}_setPixelRatio(){this.pixelRatio=this._determinePixelRatio()}setTransform(){const e=this.getContext();if(e===void 0)throw new Error("Could not get canvax context");e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}_XconvertDOMtoCanvas(e){return(e-this.body.view.translation.x)/this.body.view.scale}_XconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.x}_YconvertDOMtoCanvas(e){return(e-this.body.view.translation.y)/this.body.view.scale}_YconvertCanvasToDOM(e){return e*this.body.view.scale+this.body.view.translation.y}canvasToDOM(e){return{x:this._XconvertCanvasToDOM(e.x),y:this._YconvertCanvasToDOM(e.y)}}DOMtoCanvas(e){return{x:this._XconvertDOMtoCanvas(e.x),y:this._YconvertDOMtoCanvas(e.y)}}}function HLe(t,e){const r=Ur({nodes:e,minZoomLevel:Number.MIN_VALUE,maxZoomLevel:1},t??{});if(!Ir(r.nodes))throw new TypeError("Nodes has to be an array of ids.");if(r.nodes.length===0&&(r.nodes=e),!(typeof r.minZoomLevel=="number"&&r.minZoomLevel>0))throw new TypeError("Min zoom level has to be a number higher than zero.");if(!(typeof r.maxZoomLevel=="number"&&r.minZoomLevel<=r.maxZoomLevel))throw new TypeError("Max zoom level has to be a number higher than min zoom level.");return r}class VLe{constructor(e,r){var n,i;this.body=e,this.canvas=r,this.animationSpeed=1/this.renderRefreshRate,this.animationEasingFunction="easeInOutQuint",this.easingTime=0,this.sourceScale=0,this.targetScale=0,this.sourceTranslation=0,this.targetTranslation=0,this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0,this.touchTime=0,this.viewFunction=void 0,this.body.emitter.on("fit",je(n=this.fit).call(n,this)),this.body.emitter.on("animationFinished",()=>{this.body.emitter.emit("_stopRendering")}),this.body.emitter.on("unlockNode",je(i=this.releaseNode).call(i,this))}setOptions(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.options=e}fit(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;e=HLe(e,this.body.nodeIndices);const n=this.canvas.frame.canvas.clientWidth,i=this.canvas.frame.canvas.clientHeight;let o,a;if(n===0||i===0)a=1,o=jn.getRange(this.body.nodes,e.nodes);else if(r===!0){let c=0;for(const h in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,h)&&this.body.nodes[h].predefinedPosition===!0&&(c+=1);if(c>.5*this.body.nodeIndices.length){this.fit(e,!1);return}o=jn.getRange(this.body.nodes,e.nodes),a=12.662/(this.body.nodeIndices.length+7.4147)+.0964822;const f=Math.min(n/600,i/600);a*=f}else{this.body.emitter.emit("_resizeNodes"),o=jn.getRange(this.body.nodes,e.nodes);const c=Math.abs(o.maxX-o.minX)*1.1,u=Math.abs(o.maxY-o.minY)*1.1,f=n/c,h=i/u;a=f<=h?f:h}a>e.maxZoomLevel?a=e.maxZoomLevel:a<e.minZoomLevel&&(a=e.minZoomLevel);const l={position:jn.findCenter(o),scale:a,animation:e.animation};this.moveTo(l)}focus(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.body.nodes[e]!==void 0){const n={x:this.body.nodes[e].x,y:this.body.nodes[e].y};r.position=n,r.lockedOnNode=e,this.moveTo(r)}else console.error("Node: "+e+" cannot be found.")}moveTo(e){if(e===void 0){e={};return}if(e.offset!=null){if(e.offset.x!=null){if(e.offset.x=+e.offset.x,!os(e.offset.x))throw new TypeError('The option "offset.x" has to be a finite number.')}else e.offset.x=0;if(e.offset.y!=null){if(e.offset.y=+e.offset.y,!os(e.offset.y))throw new TypeError('The option "offset.y" has to be a finite number.')}else e.offset.x=0}else e.offset={x:0,y:0};if(e.position!=null){if(e.position.x!=null){if(e.position.x=+e.position.x,!os(e.position.x))throw new TypeError('The option "position.x" has to be a finite number.')}else e.position.x=0;if(e.position.y!=null){if(e.position.y=+e.position.y,!os(e.position.y))throw new TypeError('The option "position.y" has to be a finite number.')}else e.position.x=0}else e.position=this.getViewPosition();if(e.scale!=null){if(e.scale=+e.scale,!(e.scale>0))throw new TypeError('The option "scale" has to be a number greater than zero.')}else e.scale=this.body.view.scale;e.animation===void 0&&(e.animation={duration:0}),e.animation===!1&&(e.animation={duration:0}),e.animation===!0&&(e.animation={}),e.animation.duration===void 0&&(e.animation.duration=1e3),e.animation.easingFunction===void 0&&(e.animation.easingFunction="easeInOutQuad"),this.animateView(e)}animateView(e){if(e===void 0)return;this.animationEasingFunction=e.animation.easingFunction,this.releaseNode(),e.locked===!0&&(this.lockedOnNodeId=e.lockedOnNode,this.lockedOnNodeOffset=e.offset),this.easingTime!=0&&this._transitionRedraw(!0),this.sourceScale=this.body.view.scale,this.sourceTranslation=this.body.view.translation,this.targetScale=e.scale,this.body.view.scale=this.targetScale;const r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.position.x,y:r.y-e.position.y};if(this.targetTranslation={x:this.sourceTranslation.x+n.x*this.targetScale+e.offset.x,y:this.sourceTranslation.y+n.y*this.targetScale+e.offset.y},e.animation.duration===0)if(this.lockedOnNodeId!=null){var i;this.viewFunction=je(i=this._lockedRedraw).call(i,this),this.body.emitter.on("initRedraw",this.viewFunction)}else this.body.view.scale=this.targetScale,this.body.view.translation=this.targetTranslation,this.body.emitter.emit("_requestRedraw");else{var o;this.animationSpeed=1/(60*e.animation.duration*.001)||1/60,this.animationEasingFunction=e.animation.easingFunction,this.viewFunction=je(o=this._transitionRedraw).call(o,this),this.body.emitter.on("initRedraw",this.viewFunction),this.body.emitter.emit("_startRendering")}}_lockedRedraw(){const e={x:this.body.nodes[this.lockedOnNodeId].x,y:this.body.nodes[this.lockedOnNodeId].y},r=this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight}),n={x:r.x-e.x,y:r.y-e.y},i=this.body.view.translation,o={x:i.x+n.x*this.body.view.scale+this.lockedOnNodeOffset.x,y:i.y+n.y*this.body.view.scale+this.lockedOnNodeOffset.y};this.body.view.translation=o}releaseNode(){this.lockedOnNodeId!==void 0&&this.viewFunction!==void 0&&(this.body.emitter.off("initRedraw",this.viewFunction),this.lockedOnNodeId=void 0,this.lockedOnNodeOffset=void 0)}_transitionRedraw(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;this.easingTime+=this.animationSpeed,this.easingTime=e===!0?1:this.easingTime;const r=JMe[this.animationEasingFunction](this.easingTime);if(this.body.view.scale=this.sourceScale+(this.targetScale-this.sourceScale)*r,this.body.view.translation={x:this.sourceTranslation.x+(this.targetTranslation.x-this.sourceTranslation.x)*r,y:this.sourceTranslation.y+(this.targetTranslation.y-this.sourceTranslation.y)*r},this.easingTime>=1){if(this.body.emitter.off("initRedraw",this.viewFunction),this.easingTime=0,this.lockedOnNodeId!=null){var n;this.viewFunction=je(n=this._lockedRedraw).call(n,this),this.body.emitter.on("initRedraw",this.viewFunction)}this.body.emitter.emit("animationFinished")}}getScale(){return this.body.view.scale}getViewPosition(){return this.canvas.DOMtoCanvas({x:.5*this.canvas.frame.canvas.clientWidth,y:.5*this.canvas.frame.canvas.clientHeight})}}function Y2(t){var e=t&&t.preventDefault||!1,r=t&&t.container||window,n={},i={keydown:{},keyup:{}},o={},a;for(a=97;a<=122;a++)o[String.fromCharCode(a)]={code:65+(a-97),shift:!1};for(a=65;a<=90;a++)o[String.fromCharCode(a)]={code:a,shift:!0};for(a=0;a<=9;a++)o[""+a]={code:48+a,shift:!1};for(a=1;a<=12;a++)o["F"+a]={code:111+a,shift:!1};for(a=0;a<=9;a++)o["num"+a]={code:96+a,shift:!1};o["num*"]={code:106,shift:!1},o["num+"]={code:107,shift:!1},o["num-"]={code:109,shift:!1},o["num/"]={code:111,shift:!1},o["num."]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o["="]={code:187,shift:!1},o["-"]={code:189,shift:!1},o["]"]={code:221,shift:!1},o["["]={code:219,shift:!1};var s=function(u){c(u,"keydown")},l=function(u){c(u,"keyup")},c=function(u,f){if(i[f][u.keyCode]!==void 0){for(var h=i[f][u.keyCode],v=0;v<h.length;v++)(h[v].shift===void 0||h[v].shift==!0&&u.shiftKey==!0||h[v].shift==!1&&u.shiftKey==!1)&&h[v].fn(u);e==!0&&u.preventDefault()}};return n.bind=function(u,f,h){if(h===void 0&&(h="keydown"),o[u]===void 0)throw new Error("unsupported key: "+u);i[h][o[u].code]===void 0&&(i[h][o[u].code]=[]),i[h][o[u].code].push({fn:f,shift:o[u].shift})},n.bindAll=function(u,f){f===void 0&&(f="keydown");for(var h in o)o.hasOwnProperty(h)&&n.bind(h,u,f)},n.getKey=function(u){for(var f in o)if(o.hasOwnProperty(f)){if(u.shiftKey==!0&&o[f].shift==!0&&u.keyCode==o[f].code)return f;if(u.shiftKey==!1&&o[f].shift==!1&&u.keyCode==o[f].code)return f;if(u.keyCode==o[f].code&&f=="shift")return f}return"unknown key, currently not supported"},n.unbind=function(u,f,h){if(h===void 0&&(h="keydown"),o[u]===void 0)throw new Error("unsupported key: "+u);if(f!==void 0){var v=[],g=i[h][o[u].code];if(g!==void 0)for(var m=0;m<g.length;m++)g[m].fn==f&&g[m].shift==o[u].shift||v.push(i[h][o[u].code][m]);i[h][o[u].code]=v}else i[h][o[u].code]=[]},n.reset=function(){i={keydown:{},keyup:{}}},n.destroy=function(){i={keydown:{},keyup:{}},r.removeEventListener("keydown",s,!0),r.removeEventListener("keyup",l,!0)},r.addEventListener("keydown",s,!0),r.addEventListener("keyup",l,!0),n}class WLe{constructor(e,r){this.body=e,this.canvas=r,this.iconsCreated=!1,this.navigationHammers=[],this.boundFunctions={},this.touchTime=0,this.activated=!1,this.body.emitter.on("activate",()=>{this.activated=!0,this.configureKeyboardBindings()}),this.body.emitter.on("deactivate",()=>{this.activated=!1,this.configureKeyboardBindings()}),this.body.emitter.on("destroy",()=>{this.keycharm!==void 0&&this.keycharm.destroy()}),this.options={}}setOptions(e){e!==void 0&&(this.options=e,this.create())}create(){this.options.navigationButtons===!0?this.iconsCreated===!1&&this.loadNavigationElements():this.iconsCreated===!0&&this.cleanNavigation(),this.configureKeyboardBindings()}cleanNavigation(){if(this.navigationHammers.length!=0){for(let e=0;e<this.navigationHammers.length;e++)this.navigationHammers[e].destroy();this.navigationHammers=[]}this.navigationDOM&&this.navigationDOM.wrapper&&this.navigationDOM.wrapper.parentNode&&this.navigationDOM.wrapper.parentNode.removeChild(this.navigationDOM.wrapper),this.iconsCreated=!1}loadNavigationElements(){this.cleanNavigation(),this.navigationDOM={};const e=["up","down","left","right","zoomIn","zoomOut","zoomExtends"],r=["_moveUp","_moveDown","_moveLeft","_moveRight","_zoomIn","_zoomOut","_fit"];this.navigationDOM.wrapper=document.createElement("div"),this.navigationDOM.wrapper.className="vis-navigation",this.canvas.frame.appendChild(this.navigationDOM.wrapper);for(let a=0;a<e.length;a++){this.navigationDOM[e[a]]=document.createElement("div"),this.navigationDOM[e[a]].className="vis-button vis-"+e[a],this.navigationDOM.wrapper.appendChild(this.navigationDOM[e[a]]);const s=new Fl(this.navigationDOM[e[a]]);if(r[a]==="_fit"){var n;cp(s,je(n=this._fit).call(n,this))}else{var i;cp(s,je(i=this.bindToRedraw).call(i,this,r[a]))}this.navigationHammers.push(s)}const o=new Fl(this.canvas.frame);Wz(o,()=>{this._stopMovement()}),this.navigationHammers.push(o),this.iconsCreated=!0}bindToRedraw(e){if(this.boundFunctions[e]===void 0){var r;this.boundFunctions[e]=je(r=this[e]).call(r,this),this.body.emitter.on("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_startRendering")}}unbindFromRedraw(e){this.boundFunctions[e]!==void 0&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"),delete this.boundFunctions[e])}_fit(){new Date().valueOf()-this.touchTime>700&&(this.body.emitter.emit("fit",{duration:700}),this.touchTime=new Date().valueOf())}_stopMovement(){for(const e in this.boundFunctions)Object.prototype.hasOwnProperty.call(this.boundFunctions,e)&&(this.body.emitter.off("initRedraw",this.boundFunctions[e]),this.body.emitter.emit("_stopRendering"));this.boundFunctions={}}_moveUp(){this.body.view.translation.y+=this.options.keyboard.speed.y}_moveDown(){this.body.view.translation.y-=this.options.keyboard.speed.y}_moveLeft(){this.body.view.translation.x+=this.options.keyboard.speed.x}_moveRight(){this.body.view.translation.x-=this.options.keyboard.speed.x}_zoomIn(){const e=this.body.view.scale,r=this.body.view.scale*(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,i=r/e,o=(1-i)*this.canvas.canvasViewCenter.x+n.x*i,a=(1-i)*this.canvas.canvasViewCenter.y+n.y*i;this.body.view.scale=r,this.body.view.translation={x:o,y:a},this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:null})}_zoomOut(){const e=this.body.view.scale,r=this.body.view.scale/(1+this.options.keyboard.speed.zoom),n=this.body.view.translation,i=r/e,o=(1-i)*this.canvas.canvasViewCenter.x+n.x*i,a=(1-i)*this.canvas.canvasViewCenter.y+n.y*i;this.body.view.scale=r,this.body.view.translation={x:o,y:a},this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:null})}configureKeyboardBindings(){if(this.keycharm!==void 0&&this.keycharm.destroy(),this.options.keyboard.enabled===!0&&(this.options.keyboard.bindToWindow===!0?this.keycharm=Y2({container:window,preventDefault:!0}):this.keycharm=Y2({container:this.canvas.frame,preventDefault:!0}),this.keycharm.reset(),this.activated===!0)){var e,r,n,i,o,a,s,l,c,u,f,h,v,g,m,p,y,b,$,S,w,C,E,O;je(e=this.keycharm).call(e,"up",()=>{this.bindToRedraw("_moveUp")},"keydown"),je(r=this.keycharm).call(r,"down",()=>{this.bindToRedraw("_moveDown")},"keydown"),je(n=this.keycharm).call(n,"left",()=>{this.bindToRedraw("_moveLeft")},"keydown"),je(i=this.keycharm).call(i,"right",()=>{this.bindToRedraw("_moveRight")},"keydown"),je(o=this.keycharm).call(o,"=",()=>{this.bindToRedraw("_zoomIn")},"keydown"),je(a=this.keycharm).call(a,"num+",()=>{this.bindToRedraw("_zoomIn")},"keydown"),je(s=this.keycharm).call(s,"num-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),je(l=this.keycharm).call(l,"-",()=>{this.bindToRedraw("_zoomOut")},"keydown"),je(c=this.keycharm).call(c,"[",()=>{this.bindToRedraw("_zoomOut")},"keydown"),je(u=this.keycharm).call(u,"]",()=>{this.bindToRedraw("_zoomIn")},"keydown"),je(f=this.keycharm).call(f,"pageup",()=>{this.bindToRedraw("_zoomIn")},"keydown"),je(h=this.keycharm).call(h,"pagedown",()=>{this.bindToRedraw("_zoomOut")},"keydown"),je(v=this.keycharm).call(v,"up",()=>{this.unbindFromRedraw("_moveUp")},"keyup"),je(g=this.keycharm).call(g,"down",()=>{this.unbindFromRedraw("_moveDown")},"keyup"),je(m=this.keycharm).call(m,"left",()=>{this.unbindFromRedraw("_moveLeft")},"keyup"),je(p=this.keycharm).call(p,"right",()=>{this.unbindFromRedraw("_moveRight")},"keyup"),je(y=this.keycharm).call(y,"=",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),je(b=this.keycharm).call(b,"num+",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),je($=this.keycharm).call($,"num-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),je(S=this.keycharm).call(S,"-",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),je(w=this.keycharm).call(w,"[",()=>{this.unbindFromRedraw("_zoomOut")},"keyup"),je(C=this.keycharm).call(C,"]",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),je(E=this.keycharm).call(E,"pageup",()=>{this.unbindFromRedraw("_zoomIn")},"keyup"),je(O=this.keycharm).call(O,"pagedown",()=>{this.unbindFromRedraw("_zoomOut")},"keyup")}}}class KLe{constructor(e,r,n){var i,o,a,s,l,c,u,f,h,v,g,m,p;this.body=e,this.canvas=r,this.selectionHandler=n,this.navigationHandler=new WLe(e,r),this.body.eventListeners.onTap=je(i=this.onTap).call(i,this),this.body.eventListeners.onTouch=je(o=this.onTouch).call(o,this),this.body.eventListeners.onDoubleTap=je(a=this.onDoubleTap).call(a,this),this.body.eventListeners.onHold=je(s=this.onHold).call(s,this),this.body.eventListeners.onDragStart=je(l=this.onDragStart).call(l,this),this.body.eventListeners.onDrag=je(c=this.onDrag).call(c,this),this.body.eventListeners.onDragEnd=je(u=this.onDragEnd).call(u,this),this.body.eventListeners.onMouseWheel=je(f=this.onMouseWheel).call(f,this),this.body.eventListeners.onPinch=je(h=this.onPinch).call(h,this),this.body.eventListeners.onMouseMove=je(v=this.onMouseMove).call(v,this),this.body.eventListeners.onRelease=je(g=this.onRelease).call(g,this),this.body.eventListeners.onContext=je(m=this.onContext).call(m,this),this.touchTime=0,this.drag={},this.pinch={},this.popup=void 0,this.popupObj=void 0,this.popupTimer=void 0,this.body.functions.getPointer=je(p=this.getPointer).call(p,this),this.options={},this.defaultOptions={dragNodes:!0,dragView:!0,hover:!1,keyboard:{enabled:!1,speed:{x:10,y:10,zoom:.02},bindToWindow:!0,autoFocus:!0},navigationButtons:!1,tooltipDelay:300,zoomView:!0,zoomSpeed:1},Ur(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("destroy",()=>{clearTimeout(this.popupTimer),delete this.body.functions.getPointer})}setOptions(e){e!==void 0&&(ip(["hideEdgesOnDrag","hideEdgesOnZoom","hideNodesOnDrag","keyboard","multiselect","selectable","selectConnectedEdges"],this.options,e),Ti(this.options,e,"keyboard"),e.tooltip&&(Ur(this.options.tooltip,e.tooltip),e.tooltip.color&&(this.options.tooltip.color=y$(e.tooltip.color)))),this.navigationHandler.setOptions(this.options)}getPointer(e){return{x:e.x-qMe(this.canvas.frame.canvas),y:e.y-GMe(this.canvas.frame.canvas)}}onTouch(e){new Date().valueOf()-this.touchTime>50&&(this.drag.pointer=this.getPointer(e.center),this.drag.pinched=!1,this.pinch.scale=this.body.view.scale,this.touchTime=new Date().valueOf())}onTap(e){const r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect&&(e.changedPointers[0].ctrlKey||e.changedPointers[0].metaKey);this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r)}onDoubleTap(e){const r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("doubleClick",e,r)}onHold(e){const r=this.getPointer(e.center),n=this.selectionHandler.options.multiselect;this.checkSelectionChanges(r,n),this.selectionHandler.commitAndEmit(r,e),this.selectionHandler.generateClickEvent("click",e,r),this.selectionHandler.generateClickEvent("hold",e,r)}onRelease(e){if(new Date().valueOf()-this.touchTime>10){const r=this.getPointer(e.center);this.selectionHandler.generateClickEvent("release",e,r),this.touchTime=new Date().valueOf()}}onContext(e){const r=this.getPointer({x:e.clientX,y:e.clientY});this.selectionHandler.generateClickEvent("oncontext",e,r)}checkSelectionChanges(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1)===!0?this.selectionHandler.selectAdditionalOnPoint(e):this.selectionHandler.selectOnPoint(e)}_determineDifference(e,r){const n=function(i,o){const a=[];for(let s=0;s<i.length;s++){const l=i[s];Gt(o).call(o,l)===-1&&a.push(l)}return a};return{nodes:n(e.nodes,r.nodes),edges:n(e.edges,r.edges)}}onDragStart(e){if(this.drag.dragging)return;this.drag.pointer===void 0&&this.onTouch(e);const r=this.selectionHandler.getNodeAt(this.drag.pointer);if(this.drag.dragging=!0,this.drag.selection=[],this.drag.translation=Ur({},this.body.view.translation),this.drag.nodeId=void 0,e.srcEvent.shiftKey){this.body.selectionBox.show=!0;const n=this.getPointer(e.center);this.body.selectionBox.position.start={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)},this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(n.x),y:this.canvas._YconvertDOMtoCanvas(n.y)}}else if(r!==void 0&&this.options.dragNodes===!0){this.drag.nodeId=r.id,r.isSelected()===!1&&this.selectionHandler.setSelection({nodes:[r.id]}),this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer);for(const n of this.selectionHandler.getSelectedNodes()){const i={id:n.id,node:n,x:n.x,y:n.y,xFixed:n.options.fixed.x,yFixed:n.options.fixed.y};n.options.fixed.x=!0,n.options.fixed.y=!0,this.drag.selection.push(i)}}else this.selectionHandler.generateClickEvent("dragStart",e,this.drag.pointer,void 0,!0)}onDrag(e){if(this.drag.pinched===!0)return;this.body.emitter.emit("unlockNode");const r=this.getPointer(e.center),n=this.drag.selection;if(n&&n.length&&this.options.dragNodes===!0){this.selectionHandler.generateClickEvent("dragging",e,r);const i=r.x-this.drag.pointer.x,o=r.y-this.drag.pointer.y;lr(n).call(n,a=>{const s=a.node;a.xFixed===!1&&(s.x=this.canvas._XconvertDOMtoCanvas(this.canvas._XconvertCanvasToDOM(a.x)+i)),a.yFixed===!1&&(s.y=this.canvas._YconvertDOMtoCanvas(this.canvas._YconvertCanvasToDOM(a.y)+o))}),this.body.emitter.emit("startSimulation")}else{if(e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}this.body.selectionBox.position.end={x:this.canvas._XconvertDOMtoCanvas(r.x),y:this.canvas._YconvertDOMtoCanvas(r.y)},this.body.emitter.emit("_requestRedraw")}if(this.options.dragView===!0&&!e.srcEvent.shiftKey){if(this.selectionHandler.generateClickEvent("dragging",e,r,void 0,!0),this.drag.pointer===void 0){this.onDragStart(e);return}const i=r.x-this.drag.pointer.x,o=r.y-this.drag.pointer.y;this.body.view.translation={x:this.drag.translation.x+i,y:this.drag.translation.y+o},this.body.emitter.emit("_requestRedraw")}}}onDragEnd(e){if(this.drag.dragging=!1,this.body.selectionBox.show){var r;this.body.selectionBox.show=!1;const n=this.body.selectionBox.position,i={minX:Math.min(n.start.x,n.end.x),minY:Math.min(n.start.y,n.end.y),maxX:Math.max(n.start.x,n.end.x),maxY:Math.max(n.start.y,n.end.y)},o=ti(r=this.body.nodeIndices).call(r,s=>{const l=this.body.nodes[s];return l.x>=i.minX&&l.x<=i.maxX&&l.y>=i.minY&&l.y<=i.maxY});lr(o).call(o,s=>this.selectionHandler.selectObject(this.body.nodes[s]));const a=this.getPointer(e.center);this.selectionHandler.commitAndEmit(a,e),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw")}else{const n=this.drag.selection;n&&n.length?(lr(n).call(n,function(i){i.node.options.fixed.x=i.xFixed,i.node.options.fixed.y=i.yFixed}),this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center)),this.body.emitter.emit("startSimulation")):(this.selectionHandler.generateClickEvent("dragEnd",e,this.getPointer(e.center),void 0,!0),this.body.emitter.emit("_requestRedraw"))}}onPinch(e){const r=this.getPointer(e.center);this.drag.pinched=!0,this.pinch.scale===void 0&&(this.pinch.scale=1);const n=this.pinch.scale*e.scale;this.zoom(n,r)}zoom(e,r){if(this.options.zoomView===!0){const n=this.body.view.scale;e<1e-5&&(e=1e-5),e>10&&(e=10);let i;this.drag!==void 0&&this.drag.dragging===!0&&(i=this.canvas.DOMtoCanvas(this.drag.pointer));const o=this.body.view.translation,a=e/n,s=(1-a)*r.x+o.x*a,l=(1-a)*r.y+o.y*a;if(this.body.view.scale=e,this.body.view.translation={x:s,y:l},i!=null){const c=this.canvas.canvasToDOM(i);this.drag.pointer.x=c.x,this.drag.pointer.y=c.y}this.body.emitter.emit("_requestRedraw"),n<e?this.body.emitter.emit("zoom",{direction:"+",scale:this.body.view.scale,pointer:r}):this.body.emitter.emit("zoom",{direction:"-",scale:this.body.view.scale,pointer:r})}}onMouseWheel(e){if(this.options.zoomView===!0){if(e.deltaY!==0){let r=this.body.view.scale;r*=1+(e.deltaY<0?1:-1)*(this.options.zoomSpeed*.1);const n=this.getPointer({x:e.clientX,y:e.clientY});this.zoom(r,n)}e.preventDefault()}}onMouseMove(e){const r=this.getPointer({x:e.clientX,y:e.clientY});let n=!1;this.popup!==void 0&&(this.popup.hidden===!1&&this._checkHidePopup(r),this.popup.hidden===!1&&(n=!0,this.popup.setPosition(r.x+3,r.y-5),this.popup.show())),this.options.keyboard.autoFocus&&this.options.keyboard.bindToWindow===!1&&this.options.keyboard.enabled===!0&&this.canvas.frame.focus(),n===!1&&(this.popupTimer!==void 0&&(clearInterval(this.popupTimer),this.popupTimer=void 0),this.drag.dragging||(this.popupTimer=$o(()=>this._checkShowPopup(r),this.options.tooltipDelay))),this.options.hover===!0&&this.selectionHandler.hoverObject(e,r)}_checkShowPopup(e){const r=this.canvas._XconvertDOMtoCanvas(e.x),n=this.canvas._YconvertDOMtoCanvas(e.y),i={left:r,top:n,right:r,bottom:n},o=this.popupObj===void 0?void 0:this.popupObj.id;let a=!1,s="node";if(this.popupObj===void 0){const l=this.body.nodeIndices,c=this.body.nodes;let u;const f=[];for(let h=0;h<l.length;h++)u=c[l[h]],u.isOverlappingWith(i)===!0&&(a=!0,u.getTitle()!==void 0&&f.push(l[h]));f.length>0&&(this.popupObj=c[f[f.length-1]],a=!0)}if(this.popupObj===void 0&&a===!1){const l=this.body.edgeIndices,c=this.body.edges;let u;const f=[];for(let h=0;h<l.length;h++)u=c[l[h]],u.isOverlappingWith(i)===!0&&u.connected===!0&&u.getTitle()!==void 0&&f.push(l[h]);f.length>0&&(this.popupObj=c[f[f.length-1]],s="edge")}this.popupObj!==void 0?this.popupObj.id!==o&&(this.popup===void 0&&(this.popup=new oDe(this.canvas.frame)),this.popup.popupTargetType=s,this.popup.popupTargetId=this.popupObj.id,this.popup.setPosition(e.x+3,e.y-5),this.popup.setText(this.popupObj.getTitle()),this.popup.show(),this.body.emitter.emit("showPopup",this.popupObj.id)):this.popup!==void 0&&(this.popup.hide(),this.body.emitter.emit("hidePopup"))}_checkHidePopup(e){const r=this.selectionHandler._pointerToPositionObject(e);let n=!1;if(this.popup.popupTargetType==="node"){if(this.body.nodes[this.popup.popupTargetId]!==void 0&&(n=this.body.nodes[this.popup.popupTargetId].isOverlappingWith(r),n===!0)){const i=this.selectionHandler.getNodeAt(e);n=i===void 0?!1:i.id===this.popup.popupTargetId}}else this.selectionHandler.getNodeAt(e)===void 0&&this.body.edges[this.popup.popupTargetId]!==void 0&&(n=this.body.edges[this.popup.popupTargetId].isOverlappingWith(r));n===!1&&(this.popupObj=void 0,this.popup.hide(),this.body.emitter.emit("hidePopup"))}}var ULe=iC,qLe=wz;ULe("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},qLe);var GLe=ir,XLe=GLe.Set,YLe=XLe,JLe=YLe,ZLe=JLe,da=Ot(ZLe),QLe=Zt,J2=oC,Dh=Kg.getWeakData,eze=nC,tze=ea,rze=kc,Ub=Rn,nze=rC,Kz=Wa,Z2=wn,Uz=Ks,ize=Uz.set,oze=Uz.getterFor,aze=Kz.find,sze=Kz.findIndex,lze=QLe([].splice),cze=0,Ah=function(t){return t.frozen||(t.frozen=new qz)},qz=function(){this.entries=[]},qb=function(t,e){return aze(t.entries,function(r){return r[0]===e})};qz.prototype={get:function(t){var e=qb(this,t);if(e)return e[1]},has:function(t){return!!qb(this,t)},set:function(t,e){var r=qb(this,t);r?r[1]=e:this.entries.push([t,e])},delete:function(t){var e=sze(this.entries,function(r){return r[0]===t});return~e&&lze(this.entries,e,1),!!~e}};var uze={getConstructor:function(t,e,r,n){var i=t(function(l,c){eze(l,o),ize(l,{type:e,id:cze++,frozen:void 0}),rze(c)||nze(c,l[n],{that:l,AS_ENTRIES:r})}),o=i.prototype,a=oze(e),s=function(l,c,u){var f=a(l),h=Dh(tze(c),!0);return h===!0?Ah(f).set(c,u):h[f.id]=u,l};return J2(o,{delete:function(l){var c=a(this);if(!Ub(l))return!1;var u=Dh(l);return u===!0?Ah(c).delete(l):u&&Z2(u,c.id)&&delete u[c.id]},has:function(c){var u=a(this);if(!Ub(c))return!1;var f=Dh(c);return f===!0?Ah(u).has(c):f&&Z2(f,u.id)}}),J2(o,r?{get:function(c){var u=a(this);if(Ub(c)){var f=Dh(c);return f===!0?Ah(u).get(c):f?f[u.id]:void 0}},set:function(c,u){return s(this,c,u)}}:{add:function(c){return s(this,c,!0)}}),i}},dze=gz,Q2=Pr,fv=Zt,eR=oC,fze=Kg,hze=iC,Gz=uze,jh=Rn,kh=Ks.enforce,vze=Jt,pze=LF,Pf=Object,gze=Array.isArray,Bh=Pf.isExtensible,Xz=Pf.isFrozen,mze=Pf.isSealed,Yz=Pf.freeze,yze=Pf.seal,tR={},rR={},bze=!Q2.ActiveXObject&&"ActiveXObject"in Q2,cu,Jz=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Zz=hze("WeakMap",Jz,Gz),ml=Zz.prototype,hv=fv(ml.set),$ze=function(){return dze&&vze(function(){var t=Yz([]);return hv(new Zz,t,1),!Xz(t)})};if(pze)if(bze){cu=Gz.getConstructor(Jz,"WeakMap",!0),fze.enable();var nR=fv(ml.delete),Fh=fv(ml.has),iR=fv(ml.get);eR(ml,{delete:function(t){if(jh(t)&&!Bh(t)){var e=kh(this);return e.frozen||(e.frozen=new cu),nR(this,t)||e.frozen.delete(t)}return nR(this,t)},has:function(e){if(jh(e)&&!Bh(e)){var r=kh(this);return r.frozen||(r.frozen=new cu),Fh(this,e)||r.frozen.has(e)}return Fh(this,e)},get:function(e){if(jh(e)&&!Bh(e)){var r=kh(this);return r.frozen||(r.frozen=new cu),Fh(this,e)?iR(this,e):r.frozen.get(e)}return iR(this,e)},set:function(e,r){if(jh(e)&&!Bh(e)){var n=kh(this);n.frozen||(n.frozen=new cu),Fh(this,e)?hv(this,e,r):n.frozen.set(e,r)}else hv(this,e,r);return this}})}else $ze()&&eR(ml,{set:function(e,r){var n;return gze(e)&&(Xz(e)?n=tR:mze(e)&&(n=rR)),hv(this,e,r),n===tR&&Yz(e),n===rR&&yze(e),this}});var wze=ir,Sze=wze.WeakMap,Cze=Sze,xze=Cze,Eze=xze,Du=Ot(Eze);function cr(t,e,r,n){if(typeof e=="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(t):n?n.value:e.get(t)}function x$(t,e,r,n,i){if(typeof e=="function"?t!==e||!0:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,r),r}var es,Oi,aa,sa,vv;function oR(t,e){const r=new da;for(const n of e)t.has(n)||r.add(n);return r}class aR{constructor(){es.set(this,new da),Oi.set(this,new da)}get size(){return cr(this,Oi,"f").size}add(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const i of r)cr(this,Oi,"f").add(i)}delete(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const i of r)cr(this,Oi,"f").delete(i)}clear(){cr(this,Oi,"f").clear()}getSelection(){return[...cr(this,Oi,"f")]}getChanges(){return{added:[...oR(cr(this,es,"f"),cr(this,Oi,"f"))],deleted:[...oR(cr(this,Oi,"f"),cr(this,es,"f"))],previous:[...new da(cr(this,es,"f"))],current:[...new da(cr(this,Oi,"f"))]}}commit(){const e=this.getChanges();x$(this,es,cr(this,Oi,"f")),x$(this,Oi,new da(cr(this,es,"f")));for(const r of e.added)r.select();for(const r of e.deleted)r.unselect();return e}}es=new Du,Oi=new Du;class Oze{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:()=>{};aa.set(this,new aR),sa.set(this,new aR),vv.set(this,void 0),x$(this,vv,e)}get sizeNodes(){return cr(this,aa,"f").size}get sizeEdges(){return cr(this,sa,"f").size}getNodes(){return cr(this,aa,"f").getSelection()}getEdges(){return cr(this,sa,"f").getSelection()}addNodes(){cr(this,aa,"f").add(...arguments)}addEdges(){cr(this,sa,"f").add(...arguments)}deleteNodes(e){cr(this,aa,"f").delete(e)}deleteEdges(e){cr(this,sa,"f").delete(e)}clear(){cr(this,aa,"f").clear(),cr(this,sa,"f").clear()}commit(){const e={nodes:cr(this,aa,"f").commit(),edges:cr(this,sa,"f").commit()};for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return cr(this,vv,"f").call(this,e,...n),e}}aa=new Du,sa=new Du,vv=new Du;class Ize{constructor(e,r){this.body=e,this.canvas=r,this._selectionAccumulator=new Oze,this.hoverObj={nodes:{},edges:{}},this.options={},this.defaultOptions={multiselect:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0},Ur(this.options,this.defaultOptions),this.body.emitter.on("_dataChanged",()=>{this.updateSelection()})}setOptions(e){e!==void 0&&Uc(["multiselect","hoverConnectedEdges","selectable","selectConnectedEdges"],this.options,e)}selectOnPoint(e){let r=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);this.unselectAll(),n!==void 0&&(r=this.selectObject(n)),this.body.emitter.emit("_requestRedraw")}return r}selectAdditionalOnPoint(e){let r=!1;if(this.options.selectable===!0){const n=this.getNodeAt(e)||this.getEdgeAt(e);n!==void 0&&(r=!0,n.isSelected()===!0?this.deselectObject(n):this.selectObject(n),this.body.emitter.emit("_requestRedraw"))}return r}_initBaseEvent(e,r){const n={};return n.pointer={DOM:{x:r.x,y:r.y},canvas:this.canvas.DOMtoCanvas(r)},n.event=e,n}generateClickEvent(e,r,n,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;const a=this._initBaseEvent(r,n);if(o===!0)a.nodes=[],a.edges=[];else{const s=this.getSelection();a.nodes=s.nodes,a.edges=s.edges}i!==void 0&&(a.previousSelection=i),e=="click"&&(a.items=this.getClickedItems(n)),r.controlEdge!==void 0&&(a.controlEdge=r.controlEdge),this.body.emitter.emit(e,a)}selectObject(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.selectConnectedEdges;return e!==void 0?(e instanceof pr?(r===!0&&this._selectionAccumulator.addEdges(...e.edges),this._selectionAccumulator.addNodes(e)):this._selectionAccumulator.addEdges(e),!0):!1}deselectObject(e){e.isSelected()===!0&&(e.selected=!1,this._removeFromSelection(e))}_getAllNodesOverlappingWith(e){const r=[],n=this.body.nodes;for(let i=0;i<this.body.nodeIndices.length;i++){const o=this.body.nodeIndices[i];n[o].isOverlappingWith(e)&&r.push(o)}return r}_pointerToPositionObject(e){const r=this.canvas.DOMtoCanvas(e);return{left:r.x-1,top:r.y+1,right:r.x+1,bottom:r.y-1}}getNodeAt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this._pointerToPositionObject(e),i=this._getAllNodesOverlappingWith(n);if(i.length>0)return r===!0?this.body.nodes[i[i.length-1]]:i[i.length-1]}_getEdgesOverlappingWith(e,r){const n=this.body.edges;for(let i=0;i<this.body.edgeIndices.length;i++){const o=this.body.edgeIndices[i];n[o].isOverlappingWith(e)&&r.push(o)}}_getAllEdgesOverlappingWith(e){const r=[];return this._getEdgesOverlappingWith(e,r),r}getEdgeAt(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const n=this.canvas.DOMtoCanvas(e);let i=10,o=null;const a=this.body.edges;for(let s=0;s<this.body.edgeIndices.length;s++){const l=this.body.edgeIndices[s],c=a[l];if(c.connected){const u=c.from.x,f=c.from.y,h=c.to.x,v=c.to.y,g=c.edgeType.getDistanceToEdge(u,f,h,v,n.x,n.y);g<i&&(o=l,i=g)}}if(o!==null)return r===!0?this.body.edges[o]:o}_addToHover(e){e instanceof pr?this.hoverObj.nodes[e.id]=e:this.hoverObj.edges[e.id]=e}_removeFromSelection(e){e instanceof pr?(this._selectionAccumulator.deleteNodes(e),this._selectionAccumulator.deleteEdges(...e.edges)):this._selectionAccumulator.deleteEdges(e)}unselectAll(){this._selectionAccumulator.clear()}getSelectedNodeCount(){return this._selectionAccumulator.sizeNodes}getSelectedEdgeCount(){return this._selectionAccumulator.sizeEdges}_hoverConnectedEdges(e){for(let r=0;r<e.edges.length;r++){const n=e.edges[r];n.hover=!0,this._addToHover(n)}}emitBlurEvent(e,r,n){const i=this._initBaseEvent(e,r);n.hover===!0&&(n.hover=!1,n instanceof pr?(i.node=n.id,this.body.emitter.emit("blurNode",i)):(i.edge=n.id,this.body.emitter.emit("blurEdge",i)))}emitHoverEvent(e,r,n){const i=this._initBaseEvent(e,r);let o=!1;return n.hover===!1&&(n.hover=!0,this._addToHover(n),o=!0,n instanceof pr?(i.node=n.id,this.body.emitter.emit("hoverNode",i)):(i.edge=n.id,this.body.emitter.emit("hoverEdge",i))),o}hoverObject(e,r){let n=this.getNodeAt(r);n===void 0&&(n=this.getEdgeAt(r));let i=!1;for(const o in this.hoverObj.nodes)Object.prototype.hasOwnProperty.call(this.hoverObj.nodes,o)&&(n===void 0||n instanceof pr&&n.id!=o||n instanceof Ia)&&(this.emitBlurEvent(e,r,this.hoverObj.nodes[o]),delete this.hoverObj.nodes[o],i=!0);for(const o in this.hoverObj.edges)Object.prototype.hasOwnProperty.call(this.hoverObj.edges,o)&&(i===!0?(this.hoverObj.edges[o].hover=!1,delete this.hoverObj.edges[o]):(n===void 0||n instanceof Ia&&n.id!=o||n instanceof pr&&!n.hover)&&(this.emitBlurEvent(e,r,this.hoverObj.edges[o]),delete this.hoverObj.edges[o],i=!0));if(n!==void 0){const o=Or(this.hoverObj.edges).length,a=Or(this.hoverObj.nodes).length,s=n instanceof Ia&&o===0&&a===0,l=n instanceof pr&&o===0&&a===0;(i||s||l)&&(i=this.emitHoverEvent(e,r,n)),n instanceof pr&&this.options.hoverConnectedEdges===!0&&this._hoverConnectedEdges(n)}i===!0&&this.body.emitter.emit("_requestRedraw")}commitWithoutEmitting(){this._selectionAccumulator.commit()}commitAndEmit(e,r){let n=!1;const i=this._selectionAccumulator.commit(),o={nodes:i.nodes.previous,edges:i.edges.previous};i.edges.deleted.length>0&&(this.generateClickEvent("deselectEdge",r,e,o),n=!0),i.nodes.deleted.length>0&&(this.generateClickEvent("deselectNode",r,e,o),n=!0),i.nodes.added.length>0&&(this.generateClickEvent("selectNode",r,e),n=!0),i.edges.added.length>0&&(this.generateClickEvent("selectEdge",r,e),n=!0),n===!0&&this.generateClickEvent("select",r,e)}getSelection(){return{nodes:this.getSelectedNodeIds(),edges:this.getSelectedEdgeIds()}}getSelectedNodes(){return this._selectionAccumulator.getNodes()}getSelectedEdges(){return this._selectionAccumulator.getEdges()}getSelectedNodeIds(){var e;return ac(e=this._selectionAccumulator.getNodes()).call(e,r=>r.id)}getSelectedEdgeIds(){var e;return ac(e=this._selectionAccumulator.getEdges()).call(e,r=>r.id)}setSelection(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!e||!e.nodes&&!e.edges)throw new TypeError("Selection must be an object with nodes and/or edges properties");if((r.unselectAll||r.unselectAll===void 0)&&this.unselectAll(),e.nodes)for(const n of e.nodes){const i=this.body.nodes[n];if(!i)throw new RangeError('Node with id "'+n+'" not found');this.selectObject(i,r.highlightEdges)}if(e.edges)for(const n of e.edges){const i=this.body.edges[n];if(!i)throw new RangeError('Edge with id "'+n+'" not found');this.selectObject(i)}this.body.emitter.emit("_requestRedraw"),this._selectionAccumulator.commit()}selectNodes(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({nodes:e},{highlightEdges:r})}selectEdges(e){if(!e||e.length===void 0)throw"Selection must be an array with ids";this.setSelection({edges:e})}updateSelection(){for(const e in this._selectionAccumulator.getNodes())Object.prototype.hasOwnProperty.call(this.body.nodes,e.id)||this._selectionAccumulator.deleteNodes(e);for(const e in this._selectionAccumulator.getEdges())Object.prototype.hasOwnProperty.call(this.body.edges,e.id)||this._selectionAccumulator.deleteEdges(e)}getClickedItems(e){const r=this.canvas.DOMtoCanvas(e),n=[],i=this.body.nodeIndices,o=this.body.nodes;for(let l=i.length-1;l>=0;l--){const u=o[i[l]].getItemsOnPoint(r);n.push.apply(n,u)}const a=this.body.edgeIndices,s=this.body.edges;for(let l=a.length-1;l>=0;l--){const u=s[a[l]].getItemsOnPoint(r);n.push.apply(n,u)}return n}}var sR=jF,Tze=Math.floor,E$=function(t,e){var r=t.length,n=Tze(r/2);return r<8?_ze(t,e):Pze(t,E$(sR(t,0,n),e),E$(sR(t,n),e),e)},_ze=function(t,e){for(var r=t.length,n=1,i,o;n<r;){for(o=n,i=t[n];o&&e(t[o-1],i)>0;)t[o]=t[--o];o!==n++&&(t[o]=i)}return t},Pze=function(t,e,r,n){for(var i=e.length,o=r.length,a=0,s=0;a<i||s<o;)t[a+s]=a<i&&s<o?n(e[a],r[s])<=0?e[a++]:r[s++]:a<i?e[a++]:r[s++];return t},Rze=E$,Nze=af,lR=Nze.match(/firefox\/(\d+)/i),Mze=!!lR&&+lR[1],Dze=af,Aze=/MSIE|Trident/.test(Dze),jze=af,cR=jze.match(/AppleWebKit\/(\d+)\./),kze=!!cR&&+cR[1],Bze=xt,Qz=Zt,Fze=Fc,Lze=ki,uR=_o,zze=$L,dR=Po,fC=Jt,Hze=Rze,Vze=Wc,fR=Mze,Wze=Aze,hR=sf,vR=kze,ya=[],pR=Qz(ya.sort),Kze=Qz(ya.push),Uze=fC(function(){ya.sort(void 0)}),qze=fC(function(){ya.sort(null)}),Gze=Vze("sort"),e3=!fC(function(){if(hR)return hR<70;if(!(fR&&fR>3)){if(Wze)return!0;if(vR)return vR<603;var t="",e,r,n,i;for(e=65;e<76;e++){switch(r=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)ya.push({k:r+i,v:n})}for(ya.sort(function(o,a){return a.v-o.v}),i=0;i<ya.length;i++)r=ya[i].k.charAt(0),t.charAt(t.length-1)!==r&&(t+=r);return t!=="DGBEFHACIJK"}}),Xze=Uze||!qze||!Gze||!e3,Yze=function(t){return function(e,r){return r===void 0?-1:e===void 0?1:t!==void 0?+t(e,r)||0:dR(e)>dR(r)?1:-1}};Bze({target:"Array",proto:!0,forced:Xze},{sort:function(e){e!==void 0&&Fze(e);var r=Lze(this);if(e3)return e===void 0?pR(r):pR(r,e);var n=[],i=uR(r),o,a;for(a=0;a<i;a++)a in r&&Kze(n,r[a]);for(Hze(n,Yze(e)),o=uR(n),a=0;a<o;)r[a]=n[a++];for(;a<i;)zze(r,a++);return r}});var Jze=Sn,Zze=Jze("Array").sort,Qze=Jr,e3e=Zze,Gb=Array.prototype,t3e=function(t){var e=t.sort;return t===Gb||Qze(Gb,t)&&e===Gb.sort?e3e:e},r3e=t3e,n3e=r3e,i3e=n3e,zl=Ot(i3e),o3e=Fc,a3e=ki,s3e=Og,l3e=_o,c3e=TypeError,u3e=function(t){return function(e,r,n,i){o3e(r);var o=a3e(e),a=s3e(o),s=l3e(o),l=t?s-1:0,c=t?-1:1;if(n<2)for(;;){if(l in a){i=a[l],l+=c;break}if(l+=c,t?l<0:s<=l)throw new c3e("Reduce of empty array with no initial value")}for(;t?l>=0:s>l;l+=c)l in a&&(i=r(i,a[l],l,o));return i}},d3e={left:u3e(!1)},f3e=Pr,h3e=Qo,v3e=h3e(f3e.process)==="process",p3e=xt,g3e=d3e.left,m3e=Wc,gR=sf,y3e=v3e,b3e=!y3e&&gR>79&&gR<83,$3e=b3e||!m3e("reduce");p3e({target:"Array",proto:!0,forced:$3e},{reduce:function(e){var r=arguments.length;return g3e(this,e,r,r>1?arguments[1]:void 0)}});var w3e=Sn,S3e=w3e("Array").reduce,C3e=Jr,x3e=S3e,Xb=Array.prototype,E3e=function(t){var e=t.reduce;return t===Xb||C3e(Xb,t)&&e===Xb.reduce?x3e:e},O3e=E3e,I3e=O3e,T3e=I3e,t3=Ot(T3e);class r3{abstract(){throw new Error("Can't instantiate abstract class!")}fake_use(){}curveType(){return this.abstract()}getPosition(e){return this.fake_use(e),this.abstract()}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;this.fake_use(e,r,n),this.abstract()}getTreeSize(e){return this.fake_use(e),this.abstract()}sort(e){this.fake_use(e),this.abstract()}fix(e,r){this.fake_use(e,r),this.abstract()}shift(e,r){this.fake_use(e,r),this.abstract()}}class _3e extends r3{constructor(e){super(),this.layout=e}curveType(){return"horizontal"}getPosition(e){return e.x}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.x=r}getTreeSize(e){const r=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:r.min_x,max:r.max_x}}sort(e){zl(e).call(e,function(r,n){return r.x-n.x})}fix(e,r){e.y=this.layout.options.hierarchical.levelSeparation*r,e.options.fixed.y=!0}shift(e,r){this.layout.body.nodes[e].x+=r}}class P3e extends r3{constructor(e){super(),this.layout=e}curveType(){return"vertical"}getPosition(e){return e.y}setPosition(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;n!==void 0&&this.layout.hierarchical.addToOrdering(e,n),e.y=r}getTreeSize(e){const r=this.layout.hierarchical.getTreeSize(this.layout.body.nodes,e);return{min:r.min_y,max:r.max_y}}sort(e){zl(e).call(e,function(r,n){return r.y-n.y})}fix(e,r){e.x=this.layout.options.hierarchical.levelSeparation*r,e.options.fixed.x=!0}shift(e,r){this.layout.body.nodes[e].y+=r}}var R3e=xt,N3e=Wa.every,M3e=Wc,D3e=M3e("every");R3e({target:"Array",proto:!0,forced:!D3e},{every:function(e){return N3e(this,e,arguments.length>1?arguments[1]:void 0)}});var A3e=Sn,j3e=A3e("Array").every,k3e=Jr,B3e=j3e,Yb=Array.prototype,F3e=function(t){var e=t.every;return t===Yb||k3e(Yb,t)&&e===Yb.every?B3e:e},L3e=F3e,z3e=L3e,H3e=z3e,n3=Ot(H3e);function V3e(t,e){const r=new da;return lr(t).call(t,n=>{var i;lr(i=n.edges).call(i,o=>{o.connected&&r.add(o)})}),lr(r).call(r,n=>{const i=n.from.id,o=n.to.id;e[i]==null&&(e[i]=0),(e[o]==null||e[i]>=e[o])&&(e[o]=e[i]+1)}),e}function W3e(t){return i3(e=>{var r,n;return n3(r=ti(n=e.edges).call(n,i=>t.has(i.toId))).call(r,i=>i.to===e)},(e,r)=>r>e,"from",t)}function K3e(t){return i3(e=>{var r,n;return n3(r=ti(n=e.edges).call(n,i=>t.has(i.toId))).call(r,i=>i.from===e)},(e,r)=>r<e,"to",t)}function i3(t,e,r,n){var i;const o=vs(null),a=t3(i=[...Lz(n).call(n)]).call(i,(f,h)=>f+1+h.edges.length,0),s=r+"Id",l=r==="to"?1:-1;for(const[f,h]of n){if(!n.has(f)||!t(h))continue;o[f]=0;const v=[h];let g=0,m;for(;m=v.pop();){var c,u;if(!n.has(f))continue;const p=o[m.id]+l;if(lr(c=ti(u=m.edges).call(u,y=>y.connected&&y.to!==y.from&&y[r]!==m&&n.has(y.toId)&&n.has(y.fromId))).call(c,y=>{const b=y[s],$=o[b];($==null||e(p,$))&&(o[b]=p,v.push(y[r]))}),g>a)return V3e(n,o);++g}}return o}class U3e{constructor(){this.childrenReference={},this.parentReference={},this.trees={},this.distributionOrdering={},this.levels={},this.distributionIndex={},this.isTree=!1,this.treeIndex=-1}addRelation(e,r){this.childrenReference[e]===void 0&&(this.childrenReference[e]=[]),this.childrenReference[e].push(r),this.parentReference[r]===void 0&&(this.parentReference[r]=[]),this.parentReference[r].push(e)}checkIfTree(){for(const e in this.parentReference)if(this.parentReference[e].length>1){this.isTree=!1;return}this.isTree=!0}numTrees(){return this.treeIndex+1}setTreeIndex(e,r){r!==void 0&&this.trees[e.id]===void 0&&(this.trees[e.id]=r,this.treeIndex=Math.max(r,this.treeIndex))}ensureLevel(e){this.levels[e]===void 0&&(this.levels[e]=0)}getMaxLevel(e){const r={},n=i=>{if(r[i]!==void 0)return r[i];let o=this.levels[i];if(this.childrenReference[i]){const a=this.childrenReference[i];if(a.length>0)for(let s=0;s<a.length;s++)o=Math.max(o,n(a[s]))}return r[i]=o,o};return n(e)}levelDownstream(e,r){this.levels[r.id]===void 0&&(this.levels[e.id]===void 0&&(this.levels[e.id]=0),this.levels[r.id]=this.levels[e.id]+1)}setMinLevelToZero(){var e;const r=new sC;let n=0;const i=zl(e=[...new da(IRe(this.levels))]).call(e,(o,a)=>o-a);for(const o of i)r.set(o,n++);for(const o in this.levels)Object.prototype.hasOwnProperty.call(this.levels,o)&&(this.levels[o]=r.get(this.levels[o]))}getTreeSize(e,r){let n=1e9,i=-1e9,o=1e9,a=-1e9;for(const s in this.trees)if(Object.prototype.hasOwnProperty.call(this.trees,s)&&this.trees[s]===r){const l=e[s];n=Math.min(l.x,n),i=Math.max(l.x,i),o=Math.min(l.y,o),a=Math.max(l.y,a)}return{min_x:n,max_x:i,min_y:o,max_y:a}}hasSameParent(e,r){const n=this.parentReference[e.id],i=this.parentReference[r.id];if(n===void 0||i===void 0)return!1;for(let o=0;o<n.length;o++)for(let a=0;a<i.length;a++)if(n[o]==i[a])return!0;return!1}inSameSubNetwork(e,r){return this.trees[e.id]===this.trees[r.id]}getLevels(){return Or(this.distributionOrdering)}addToOrdering(e,r){this.distributionOrdering[r]===void 0&&(this.distributionOrdering[r]=[]);let n=!1;const i=this.distributionOrdering[r];for(const o in i)if(i[o]===e){n=!0;break}n||(this.distributionOrdering[r].push(e),this.distributionIndex[e.id]=this.distributionOrdering[r].length-1)}}class q3e{constructor(e){this.body=e,this._resetRNG(Math.random()+":"+ep()),this.setPhysics=!1,this.options={},this.optionsBackup={physics:{}},this.defaultOptions={randomSeed:void 0,improvedLayout:!0,clusterThreshold:150,hierarchical:{enabled:!1,levelSeparation:150,nodeSpacing:100,treeSpacing:200,blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:"UD",sortMethod:"hubsize"}},Ur(this.options,this.defaultOptions),this.bindEventListeners()}bindEventListeners(){this.body.emitter.on("_dataChanged",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_dataLoaded",()=>{this.layoutNetwork()}),this.body.emitter.on("_resetHierarchicalLayout",()=>{this.setupHierarchicalLayout()}),this.body.emitter.on("_adjustEdgesForHierarchicalLayout",()=>{if(this.options.hierarchical.enabled!==!0)return;const e=this.direction.curveType();this.body.emitter.emit("_forceDisableDynamicCurves",e,!1)})}setOptions(e,r){if(e!==void 0){const n=this.options.hierarchical,i=n.enabled;if(Uc(["randomSeed","improvedLayout","clusterThreshold"],this.options,e),Ti(this.options,e,"hierarchical"),e.randomSeed!==void 0&&this._resetRNG(e.randomSeed),n.enabled===!0)return i===!0&&this.body.emitter.emit("refresh",!0),n.direction==="RL"||n.direction==="DU"?n.levelSeparation>0&&(n.levelSeparation*=-1):n.levelSeparation<0&&(n.levelSeparation*=-1),this.setDirectionStrategy(),this.body.emitter.emit("_resetHierarchicalLayout"),this.adaptAllOptionsForHierarchicalLayout(r);if(i===!0)return this.body.emitter.emit("refresh"),ur(r,this.optionsBackup)}return r}_resetRNG(e){this.initialRandomSeed=e,this._rng=Wg(this.initialRandomSeed)}adaptAllOptionsForHierarchicalLayout(e){if(this.options.hierarchical.enabled===!0){const r=this.optionsBackup.physics;e.physics===void 0||e.physics===!0?(e.physics={enabled:r.enabled===void 0?!0:r.enabled,solver:"hierarchicalRepulsion"},r.enabled=r.enabled===void 0?!0:r.enabled,r.solver=r.solver||"barnesHut"):typeof e.physics=="object"?(r.enabled=e.physics.enabled===void 0?!0:e.physics.enabled,r.solver=e.physics.solver||"barnesHut",e.physics.solver="hierarchicalRepulsion"):e.physics!==!1&&(r.solver="barnesHut",e.physics={solver:"hierarchicalRepulsion"});let n=this.direction.curveType();if(e.edges===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges={smooth:!1};else if(e.edges.smooth===void 0)this.optionsBackup.edges={smooth:{enabled:!0,type:"dynamic"}},e.edges.smooth=!1;else if(typeof e.edges.smooth=="boolean")this.optionsBackup.edges={smooth:e.edges.smooth},e.edges.smooth={enabled:e.edges.smooth,type:n};else{const i=e.edges.smooth;i.type!==void 0&&i.type!=="dynamic"&&(n=i.type),this.optionsBackup.edges={smooth:{enabled:i.enabled===void 0?!0:i.enabled,type:i.type===void 0?"dynamic":i.type,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}},e.edges.smooth={enabled:i.enabled===void 0?!0:i.enabled,type:n,roundness:i.roundness===void 0?.5:i.roundness,forceDirection:i.forceDirection===void 0?!1:i.forceDirection}}this.body.emitter.emit("_forceDisableDynamicCurves",n)}return e}positionInitially(e){if(this.options.hierarchical.enabled!==!0){this._resetRNG(this.initialRandomSeed);const r=e.length+50;for(let n=0;n<e.length;n++){const i=e[n],o=2*Math.PI*this._rng();i.x===void 0&&(i.x=r*Math.cos(o)),i.y===void 0&&(i.y=r*Math.sin(o))}}}layoutNetwork(){if(this.options.hierarchical.enabled!==!0&&this.options.improvedLayout===!0){const e=this.body.nodeIndices;let r=0;for(let n=0;n<e.length;n++)this.body.nodes[e[n]].predefinedPosition===!0&&(r+=1);if(r<.5*e.length){let i=0;const o=this.options.clusterThreshold,a={clusterNodeProperties:{shape:"ellipse",label:"",group:"",font:{multi:!1}},clusterEdgeProperties:{label:"",font:{multi:!1},smooth:{enabled:!1}}};if(e.length>o){const l=e.length;for(;e.length>o&&i<=10;){i+=1;const c=e.length;i%3===0?this.body.modules.clustering.clusterBridges(a):this.body.modules.clustering.clusterOutliers(a);const u=e.length;if(c==u&&i%3!==0){this._declusterAll(),this.body.emitter.emit("_layoutFailed"),console.info("This network could not be positioned by this version of the improved layout algorithm. Please disable improvedLayout for better performance.");return}}this.body.modules.kamadaKawai.setOptions({springLength:Math.max(150,2*l)})}i>10&&console.info("The clustering didn't succeed within the amount of interations allowed, progressing with partial result."),this.body.modules.kamadaKawai.solve(e,this.body.edgeIndices,!0),this._shiftToCenter();const s=70;for(let l=0;l<e.length;l++){const c=this.body.nodes[e[l]];c.predefinedPosition===!1&&(c.x+=(.5-this._rng())*s,c.y+=(.5-this._rng())*s)}this._declusterAll(),this.body.emitter.emit("_repositionBezierNodes")}}}_shiftToCenter(){const e=jn.getRangeCore(this.body.nodes,this.body.nodeIndices),r=jn.findCenter(e);for(let n=0;n<this.body.nodeIndices.length;n++){const i=this.body.nodes[this.body.nodeIndices[n]];i.x-=r.x,i.y-=r.y}}_declusterAll(){let e=!0;for(;e===!0;){e=!1;for(let r=0;r<this.body.nodeIndices.length;r++)this.body.nodes[this.body.nodeIndices[r]].isCluster===!0&&(e=!0,this.body.modules.clustering.openCluster(this.body.nodeIndices[r],{},!1));e===!0&&this.body.emitter.emit("_dataChanged")}}getSeed(){return this.initialRandomSeed}setupHierarchicalLayout(){if(this.options.hierarchical.enabled===!0&&this.body.nodeIndices.length>0){let e,r,n=!1,i=!1;this.lastNodeOnLevel={},this.hierarchical=new U3e;for(r in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,r)&&(e=this.body.nodes[r],e.options.level!==void 0?(n=!0,this.hierarchical.levels[r]=e.options.level):i=!0);if(i===!0&&n===!0)throw new Error("To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.");{if(i===!0){const a=this.options.hierarchical.sortMethod;a==="hubsize"?this._determineLevelsByHubsize():a==="directed"?this._determineLevelsDirected():a==="custom"&&this._determineLevelsCustomCallback()}for(const a in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,a)&&this.hierarchical.ensureLevel(a);const o=this._getDistribution();this._generateMap(),this._placeNodesByHierarchy(o),this._condenseHierarchy(),this._shiftToCenter()}}}_condenseHierarchy(){var e=this;let r=!1;const n={},i=()=>{const y=a();let b=0;for(let $=0;$<y.length-1;$++){const S=y[$].max-y[$+1].min;b+=S+this.options.hierarchical.treeSpacing,o($+1,b)}},o=(y,b)=>{const $=this.hierarchical.trees;for(const S in $)Object.prototype.hasOwnProperty.call($,S)&&$[S]===y&&this.direction.shift(S,b)},a=()=>{const y=[];for(let b=0;b<this.hierarchical.numTrees();b++)y.push(this.direction.getTreeSize(b));return y},s=(y,b)=>{if(!b[y.id]&&(b[y.id]=!0,this.hierarchical.childrenReference[y.id])){const $=this.hierarchical.childrenReference[y.id];if($.length>0)for(let S=0;S<$.length;S++)s(this.body.nodes[$[S]],b)}},l=function(y){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e9,$=1e9,S=1e9,w=1e9,C=-1e9;for(const E in y)if(Object.prototype.hasOwnProperty.call(y,E)){const O=e.body.nodes[E],x=e.hierarchical.levels[O.id],I=e.direction.getPosition(O),[T,N]=e._getSpaceAroundNode(O,y);$=Math.min(T,$),S=Math.min(N,S),x<=b&&(w=Math.min(I,w),C=Math.max(I,C))}return[w,C,$,S]},c=(y,b)=>{const $=this.hierarchical.getMaxLevel(y.id),S=this.hierarchical.getMaxLevel(b.id);return Math.min($,S)},u=(y,b,$)=>{const S=this.hierarchical;for(let w=0;w<b.length;w++){const C=b[w],E=S.distributionOrdering[C];if(E.length>1)for(let O=0;O<E.length-1;O++){const x=E[O],I=E[O+1];S.hasSameParent(x,I)&&S.inSameSubNetwork(x,I)&&y(x,I,$)}}},f=function(y,b){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const S=e.direction.getPosition(y),w=e.direction.getPosition(b),C=Math.abs(w-S),E=e.options.hierarchical.nodeSpacing;if(C>E){const O={},x={};s(y,O),s(b,x);const I=c(y,b),T=l(O,I),N=l(x,I),P=T[1],_=N[0],R=N[2];if(Math.abs(P-_)>E){let D=P-_+E;D<-R+E&&(D=-R+E),D<0&&(e._shiftBlock(b.id,D),r=!0,$===!0&&e._centerParent(b))}}},h=(y,b)=>{const $=b.id,S=b.edges,w=this.hierarchical.levels[b.id],C=this.options.hierarchical.levelSeparation*this.options.hierarchical.levelSeparation,E={},O=[];for(let R=0;R<S.length;R++){const M=S[R];if(M.toId!=M.fromId){const D=M.toId==$?M.from:M.to;E[S[R].id]=D,this.hierarchical.levels[D.id]<w&&O.push(M)}}const x=(R,M)=>{let D=0;for(let j=0;j<M.length;j++)if(E[M[j].id]!==void 0){const k=this.direction.getPosition(E[M[j].id])-R;D+=k/Math.sqrt(k*k+C)}return D},I=(R,M)=>{let D=0;for(let j=0;j<M.length;j++)if(E[M[j].id]!==void 0){const k=this.direction.getPosition(E[M[j].id])-R;D-=C*Math.pow(k*k+C,-1.5)}return D},T=(R,M)=>{let D=this.direction.getPosition(b);const j={};for(let k=0;k<R;k++){const V=x(D,M),G=I(D,M),W=40,Y=Math.max(-W,Math.min(W,Math.round(V/G)));if(D=D-Y,j[D]!==void 0)break;j[D]=k}return D},N=R=>{const M=this.direction.getPosition(b);if(n[b.id]===void 0){const W={};s(b,W),n[b.id]=W}const D=l(n[b.id]),j=D[2],k=D[3],V=R-M;let G=0;V>0?G=Math.min(V,k-this.options.hierarchical.nodeSpacing):V<0&&(G=-Math.min(-V,j-this.options.hierarchical.nodeSpacing)),G!=0&&(this._shiftBlock(b.id,G),r=!0)},P=R=>{const M=this.direction.getPosition(b),[D,j]=this._getSpaceAroundNode(b),k=R-M;let V=M;k>0?V=Math.min(M+(j-this.options.hierarchical.nodeSpacing),R):k<0&&(V=Math.max(M-(D-this.options.hierarchical.nodeSpacing),R)),V!==M&&(this.direction.setPosition(b,V),r=!0)};let _=T(y,O);N(_),_=T(y,S),P(_)},v=y=>{let b=this.hierarchical.getLevels();b=hs(b).call(b);for(let $=0;$<y;$++){r=!1;for(let S=0;S<b.length;S++){const w=b[S],C=this.hierarchical.distributionOrdering[w];for(let E=0;E<C.length;E++)h(1e3,C[E])}if(r!==!0)break}},g=y=>{let b=this.hierarchical.getLevels();b=hs(b).call(b);for(let $=0;$<y&&(r=!1,u(f,b,!0),r===!0);$++);},m=()=>{for(const y in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,y)&&this._centerParent(this.body.nodes[y])},p=()=>{let y=this.hierarchical.getLevels();y=hs(y).call(y);for(let b=0;b<y.length;b++){const $=y[b],S=this.hierarchical.distributionOrdering[$];for(let w=0;w<S.length;w++)this._centerParent(S[w])}};this.options.hierarchical.blockShifting===!0&&(g(5),m()),this.options.hierarchical.edgeMinimization===!0&&v(20),this.options.hierarchical.parentCentralization===!0&&p(),i()}_getSpaceAroundNode(e,r){let n=!0;r===void 0&&(n=!1);const i=this.hierarchical.levels[e.id];if(i!==void 0){const o=this.hierarchical.distributionIndex[e.id],a=this.direction.getPosition(e),s=this.hierarchical.distributionOrdering[i];let l=1e9,c=1e9;if(o!==0){const u=s[o-1];if(n===!0&&r[u.id]===void 0||n===!1){const f=this.direction.getPosition(u);l=a-f}}if(o!=s.length-1){const u=s[o+1];if(n===!0&&r[u.id]===void 0||n===!1){const f=this.direction.getPosition(u);c=Math.min(c,f-a)}}return[l,c]}else return[0,0]}_centerParent(e){if(this.hierarchical.parentReference[e.id]){const r=this.hierarchical.parentReference[e.id];for(let n=0;n<r.length;n++){const i=r[n],o=this.body.nodes[i],a=this.hierarchical.childrenReference[i];if(a!==void 0){const s=this._getCenterPosition(a),l=this.direction.getPosition(o),[c,u]=this._getSpaceAroundNode(o),f=l-s;(f<0&&Math.abs(f)<u-this.options.hierarchical.nodeSpacing||f>0&&Math.abs(f)<c-this.options.hierarchical.nodeSpacing)&&this.direction.setPosition(o,s)}}}}_placeNodesByHierarchy(e){this.positionedNodes={};for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r;let i=Or(e[n]);i=this._indexArrayToNodes(i),zl(r=this.direction).call(r,i);let o=0;for(let a=0;a<i.length;a++){const s=i[a];if(this.positionedNodes[s.id]===void 0){const l=this.options.hierarchical.nodeSpacing;let c=l*o;o>0&&(c=this.direction.getPosition(i[a-1])+l),this.direction.setPosition(s,c,n),this._validatePositionAndContinue(s,n,c),o++}}}}_placeBranchNodes(e,r){var n;const i=this.hierarchical.childrenReference[e];if(i===void 0)return;const o=[];for(let s=0;s<i.length;s++)o.push(this.body.nodes[i[s]]);zl(n=this.direction).call(n,o);for(let s=0;s<o.length;s++){const l=o[s],c=this.hierarchical.levels[l.id];if(c>r&&this.positionedNodes[l.id]===void 0){const u=this.options.hierarchical.nodeSpacing;let f;s===0?f=this.direction.getPosition(this.body.nodes[e]):f=this.direction.getPosition(o[s-1])+u,this.direction.setPosition(l,f,c),this._validatePositionAndContinue(l,c,f)}else return}const a=this._getCenterPosition(o);this.direction.setPosition(this.body.nodes[e],a,r)}_validatePositionAndContinue(e,r,n){if(this.hierarchical.isTree){if(this.lastNodeOnLevel[r]!==void 0){const i=this.direction.getPosition(this.body.nodes[this.lastNodeOnLevel[r]]);if(n-i<this.options.hierarchical.nodeSpacing){const o=i+this.options.hierarchical.nodeSpacing-n,a=this._findCommonParent(this.lastNodeOnLevel[r],e.id);this._shiftBlock(a.withChild,o)}}this.lastNodeOnLevel[r]=e.id,this.positionedNodes[e.id]=!0,this._placeBranchNodes(e.id,r)}}_indexArrayToNodes(e){const r=[];for(let n=0;n<e.length;n++)r.push(this.body.nodes[e[n]]);return r}_getDistribution(){const e={};let r,n;for(r in this.body.nodes)if(Object.prototype.hasOwnProperty.call(this.body.nodes,r)){n=this.body.nodes[r];const i=this.hierarchical.levels[r]===void 0?0:this.hierarchical.levels[r];this.direction.fix(n,i),e[i]===void 0&&(e[i]={}),e[i][r]=n}return e}_getActiveEdges(e){const r=[];return At(e.edges,n=>{var i;Gt(i=this.body.edgeIndices).call(i,n.id)!==-1&&r.push(n)}),r}_getHubSizes(){const e={},r=this.body.nodeIndices;At(r,i=>{const o=this.body.nodes[i],a=this._getActiveEdges(o).length;e[a]=!0});const n=[];return At(e,i=>{n.push(Number(i))}),zl(n).call(n,function(i,o){return o-i}),n}_determineLevelsByHubsize(){const e=(n,i)=>{this.hierarchical.levelDownstream(n,i)},r=this._getHubSizes();for(let n=0;n<r.length;++n){const i=r[n];if(i===0)break;At(this.body.nodeIndices,o=>{const a=this.body.nodes[o];i===this._getActiveEdges(a).length&&this._crawlNetwork(e,o)})}}_determineLevelsCustomCallback(){const r=function(i,o,a){},n=(i,o,a)=>{let s=this.hierarchical.levels[i.id];s===void 0&&(s=this.hierarchical.levels[i.id]=1e5);const l=r(jn.cloneOptions(i,"node"),jn.cloneOptions(o,"node"),jn.cloneOptions(a,"edge"));this.hierarchical.levels[o.id]=s+l};this._crawlNetwork(n),this.hierarchical.setMinLevelToZero()}_determineLevelsDirected(){var e;const r=t3(e=this.body.nodeIndices).call(e,(n,i)=>(n.set(i,this.body.nodes[i]),n),new sC);this.options.hierarchical.shakeTowards==="roots"?this.hierarchical.levels=K3e(r):this.hierarchical.levels=W3e(r),this.hierarchical.setMinLevelToZero()}_generateMap(){const e=(r,n)=>{this.hierarchical.levels[n.id]>this.hierarchical.levels[r.id]&&this.hierarchical.addRelation(r.id,n.id)};this._crawlNetwork(e),this.hierarchical.checkIfTree()}_crawlNetwork(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){},r=arguments.length>1?arguments[1]:void 0;const n={},i=(o,a)=>{if(n[o.id]===void 0){this.hierarchical.setTreeIndex(o,a),n[o.id]=!0;let s;const l=this._getActiveEdges(o);for(let c=0;c<l.length;c++){const u=l[c];u.connected===!0&&(u.toId==o.id?s=u.from:s=u.to,o.id!=s.id&&(e(o,s,u),i(s,a)))}}};if(r===void 0){let o=0;for(let a=0;a<this.body.nodeIndices.length;a++){const s=this.body.nodeIndices[a];if(n[s]===void 0){const l=this.body.nodes[s];i(l,o),o+=1}}}else{const o=this.body.nodes[r];if(o===void 0){console.error("Node not found:",r);return}i(o)}}_shiftBlock(e,r){const n={},i=o=>{if(n[o])return;n[o]=!0,this.direction.shift(o,r);const a=this.hierarchical.childrenReference[o];if(a!==void 0)for(let s=0;s<a.length;s++)i(a[s])};i(e)}_findCommonParent(e,r){const n={},i=(a,s)=>{const l=this.hierarchical.parentReference[s];if(l!==void 0)for(let c=0;c<l.length;c++){const u=l[c];a[u]=!0,i(a,u)}},o=(a,s)=>{const l=this.hierarchical.parentReference[s];if(l!==void 0)for(let c=0;c<l.length;c++){const u=l[c];if(a[u]!==void 0)return{foundParent:u,withChild:s};const f=o(a,u);if(f.foundParent!==null)return f}return{foundParent:null,withChild:s}};return i(n,e),o(n,r)}setDirectionStrategy(){this.options.hierarchical.direction==="UD"||this.options.hierarchical.direction==="DU"?this.direction=new _3e(this):this.direction=new P3e(this)}_getCenterPosition(e){let r=1e9,n=-1e9;for(let i=0;i<e.length;i++){let o;if(e[i].id!==void 0)o=e[i];else{const s=e[i];o=this.body.nodes[s]}const a=this.direction.getPosition(o);r=Math.min(r,a),n=Math.max(n,a)}return .5*(r+n)}}class G3e{constructor(e,r,n,i){var o,a;this.body=e,this.canvas=r,this.selectionHandler=n,this.interactionHandler=i,this.editMode=!1,this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0,this._domEventListenerCleanupQueue=[],this.temporaryUIFunctions={},this.temporaryEventFunctions=[],this.touchTime=0,this.temporaryIds={nodes:[],edges:[]},this.guiEnabled=!1,this.inMode=!1,this.selectedControlNode=void 0,this.options={},this.defaultOptions={enabled:!1,initiallyActive:!1,addNode:!0,addEdge:!0,editNode:void 0,editEdge:!0,deleteNode:!0,deleteEdge:!0,controlNodeStyle:{shape:"dot",size:6,color:{background:"#ff0000",border:"#3c3c3c",highlight:{background:"#07f968",border:"#3c3c3c"}},borderWidth:2,borderWidthSelected:2}},Ur(this.options,this.defaultOptions),this.body.emitter.on("destroy",()=>{this._clean()}),this.body.emitter.on("_dataChanged",je(o=this._restore).call(o,this)),this.body.emitter.on("_resetData",je(a=this._restore).call(a,this))}_restore(){this.inMode!==!1&&(this.options.initiallyActive===!0?this.enableEditMode():this.disableEditMode())}setOptions(e,r,n){r!==void 0&&(r.locale!==void 0?this.options.locale=r.locale:this.options.locale=n.locale,r.locales!==void 0?this.options.locales=r.locales:this.options.locales=n.locales),e!==void 0&&(typeof e=="boolean"?this.options.enabled=e:(this.options.enabled=!0,ur(this.options,e)),this.options.initiallyActive===!0&&(this.editMode=!0),this._setup())}toggleEditMode(){this.editMode===!0?this.disableEditMode():this.enableEditMode()}enableEditMode(){this.editMode=!0,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="block",this.closeDiv.style.display="block",this.editModeDiv.style.display="none",this.showManipulatorToolbar())}disableEditMode(){this.editMode=!1,this._clean(),this.guiEnabled===!0&&(this.manipulationDiv.style.display="none",this.closeDiv.style.display="none",this.editModeDiv.style.display="block",this._createEditButton())}showManipulatorToolbar(){if(this._clean(),this.manipulationDOM={},this.guiEnabled===!0){var e,r;this.editMode=!0,this.manipulationDiv.style.display="block",this.closeDiv.style.display="block";const n=this.selectionHandler.getSelectedNodeCount(),i=this.selectionHandler.getSelectedEdgeCount(),o=n+i,a=this.options.locales[this.options.locale];let s=!1;this.options.addNode!==!1&&(this._createAddNodeButton(a),s=!0),this.options.addEdge!==!1&&(s===!0?this._createSeperator(1):s=!0,this._createAddEdgeButton(a)),n===1&&typeof this.options.editNode=="function"?(s===!0?this._createSeperator(2):s=!0,this._createEditNodeButton(a)):i===1&&n===0&&this.options.editEdge!==!1&&(s===!0?this._createSeperator(3):s=!0,this._createEditEdgeButton(a)),o!==0&&(n>0&&this.options.deleteNode!==!1?(s===!0&&this._createSeperator(4),this._createDeleteButton(a)):n===0&&this.options.deleteEdge!==!1&&(s===!0&&this._createSeperator(4),this._createDeleteButton(a))),this._bindElementEvents(this.closeDiv,je(e=this.toggleEditMode).call(e,this)),this._temporaryBindEvent("select",je(r=this.showManipulatorToolbar).call(r,this))}this.body.emitter.emit("_redraw")}addNodeMode(){var e;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addNode",this.guiEnabled===!0){var r;const n=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(n),this._createSeperator(),this._createDescription(n.addDescription||this.options.locales.en.addDescription),this._bindElementEvents(this.closeDiv,je(r=this.toggleEditMode).call(r,this))}this._temporaryBindEvent("click",je(e=this._performAddNode).call(e,this))}editNode(){this.editMode!==!0&&this.enableEditMode(),this._clean();const e=this.selectionHandler.getSelectedNodes()[0];if(e!==void 0)if(this.inMode="editNode",typeof this.options.editNode=="function")if(e.isCluster!==!0){const r=ur({},e.options,!1);if(r.x=e.x,r.y=e.y,this.options.editNode.length===2)this.options.editNode(r,n=>{n!=null&&this.inMode==="editNode"&&this.body.data.nodes.getDataSet().update(n),this.showManipulatorToolbar()});else throw new Error("The function for edit does not support two arguments (data, callback)")}else alert(this.options.locales[this.options.locale].editClusterError||this.options.locales.en.editClusterError);else throw new Error("No function has been configured to handle the editing of nodes.");else this.showManipulatorToolbar()}addEdgeMode(){var e,r,n,i,o;if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="addEdge",this.guiEnabled===!0){var a;const s=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(s),this._createSeperator(),this._createDescription(s.edgeDescription||this.options.locales.en.edgeDescription),this._bindElementEvents(this.closeDiv,je(a=this.toggleEditMode).call(a,this))}this._temporaryBindUI("onTouch",je(e=this._handleConnect).call(e,this)),this._temporaryBindUI("onDragEnd",je(r=this._finishConnect).call(r,this)),this._temporaryBindUI("onDrag",je(n=this._dragControlNode).call(n,this)),this._temporaryBindUI("onRelease",je(i=this._finishConnect).call(i,this)),this._temporaryBindUI("onDragStart",je(o=this._dragStartEdge).call(o,this)),this._temporaryBindUI("onHold",()=>{})}editEdgeMode(){if(this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="editEdge",typeof this.options.editEdge=="object"&&typeof this.options.editEdge.editWithoutDrag=="function"&&(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0)){const a=this.body.edges[this.edgeBeingEditedId];this._performEditEdge(a.from.id,a.to.id);return}if(this.guiEnabled===!0){var e;const a=this.options.locales[this.options.locale];this.manipulationDOM={},this._createBackButton(a),this._createSeperator(),this._createDescription(a.editEdgeDescription||this.options.locales.en.editEdgeDescription),this._bindElementEvents(this.closeDiv,je(e=this.toggleEditMode).call(e,this))}if(this.edgeBeingEditedId=this.selectionHandler.getSelectedEdgeIds()[0],this.edgeBeingEditedId!==void 0){var r,n,i,o;const a=this.body.edges[this.edgeBeingEditedId],s=this._getNewTargetNode(a.from.x,a.from.y),l=this._getNewTargetNode(a.to.x,a.to.y);this.temporaryIds.nodes.push(s.id),this.temporaryIds.nodes.push(l.id),this.body.nodes[s.id]=s,this.body.nodeIndices.push(s.id),this.body.nodes[l.id]=l,this.body.nodeIndices.push(l.id),this._temporaryBindUI("onTouch",je(r=this._controlNodeTouch).call(r,this)),this._temporaryBindUI("onTap",()=>{}),this._temporaryBindUI("onHold",()=>{}),this._temporaryBindUI("onDragStart",je(n=this._controlNodeDragStart).call(n,this)),this._temporaryBindUI("onDrag",je(i=this._controlNodeDrag).call(i,this)),this._temporaryBindUI("onDragEnd",je(o=this._controlNodeDragEnd).call(o,this)),this._temporaryBindUI("onMouseMove",()=>{}),this._temporaryBindEvent("beforeDrawing",c=>{const u=a.edgeType.findBorderPositions(c);s.selected===!1&&(s.x=u.from.x,s.y=u.from.y),l.selected===!1&&(l.x=u.to.x,l.y=u.to.y)}),this.body.emitter.emit("_redraw")}else this.showManipulatorToolbar()}deleteSelected(){this.editMode!==!0&&this.enableEditMode(),this._clean(),this.inMode="delete";const e=this.selectionHandler.getSelectedNodeIds(),r=this.selectionHandler.getSelectedEdgeIds();let n;if(e.length>0){for(let i=0;i<e.length;i++)if(this.body.nodes[e[i]].isCluster===!0){alert(this.options.locales[this.options.locale].deleteClusterError||this.options.locales.en.deleteClusterError);return}typeof this.options.deleteNode=="function"&&(n=this.options.deleteNode)}else r.length>0&&typeof this.options.deleteEdge=="function"&&(n=this.options.deleteEdge);if(typeof n=="function"){const i={nodes:e,edges:r};if(n.length===2)n(i,o=>{o!=null&&this.inMode==="delete"?(this.body.data.edges.getDataSet().remove(o.edges),this.body.data.nodes.getDataSet().remove(o.nodes),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()):(this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar())});else throw new Error("The function for delete does not support two arguments (data, callback)")}else this.body.data.edges.getDataSet().remove(r),this.body.data.nodes.getDataSet().remove(e),this.body.emitter.emit("startSimulation"),this.showManipulatorToolbar()}_setup(){this.options.enabled===!0?(this.guiEnabled=!0,this._createWrappers(),this.editMode===!1?this._createEditButton():this.showManipulatorToolbar()):(this._removeManipulationDOM(),this.guiEnabled=!1)}_createWrappers(){if(this.manipulationDiv===void 0&&(this.manipulationDiv=document.createElement("div"),this.manipulationDiv.className="vis-manipulation",this.editMode===!0?this.manipulationDiv.style.display="block":this.manipulationDiv.style.display="none",this.canvas.frame.appendChild(this.manipulationDiv)),this.editModeDiv===void 0&&(this.editModeDiv=document.createElement("div"),this.editModeDiv.className="vis-edit-mode",this.editMode===!0?this.editModeDiv.style.display="none":this.editModeDiv.style.display="block",this.canvas.frame.appendChild(this.editModeDiv)),this.closeDiv===void 0){var e,r;this.closeDiv=document.createElement("button"),this.closeDiv.className="vis-close",this.closeDiv.setAttribute("aria-label",(e=(r=this.options.locales[this.options.locale])===null||r===void 0?void 0:r.close)!==null&&e!==void 0?e:this.options.locales.en.close),this.closeDiv.style.display=this.manipulationDiv.style.display,this.canvas.frame.appendChild(this.closeDiv)}}_getNewTargetNode(e,r){const n=ur({},this.options.controlNodeStyle);n.id="targetNode"+Mu(),n.hidden=!1,n.physics=!1,n.x=e,n.y=r;const i=this.body.functions.createNode(n);return i.shape.boundingBox={left:e,right:e,top:r,bottom:r},i}_createEditButton(){var e;this._clean(),this.manipulationDOM={},ca(this.editModeDiv);const r=this.options.locales[this.options.locale],n=this._createButton("editMode","vis-edit vis-edit-mode",r.edit||this.options.locales.en.edit);this.editModeDiv.appendChild(n),this._bindElementEvents(n,je(e=this.toggleEditMode).call(e,this))}_clean(){this.inMode=!1,this.guiEnabled===!0&&(ca(this.editModeDiv),ca(this.manipulationDiv),this._cleanupDOMEventListeners()),this._cleanupTemporaryNodesAndEdges(),this._unbindTemporaryUIs(),this._unbindTemporaryEvents(),this.body.emitter.emit("restorePhysics")}_cleanupDOMEventListeners(){for(const r of Ho(e=this._domEventListenerCleanupQueue).call(e,0)){var e;r()}}_removeManipulationDOM(){this._clean(),ca(this.manipulationDiv),ca(this.editModeDiv),ca(this.closeDiv),this.manipulationDiv&&this.canvas.frame.removeChild(this.manipulationDiv),this.editModeDiv&&this.canvas.frame.removeChild(this.editModeDiv),this.closeDiv&&this.canvas.frame.removeChild(this.closeDiv),this.manipulationDiv=void 0,this.editModeDiv=void 0,this.closeDiv=void 0}_createSeperator(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.manipulationDOM["seperatorLineDiv"+e]=document.createElement("div"),this.manipulationDOM["seperatorLineDiv"+e].className="vis-separator-line",this.manipulationDiv.appendChild(this.manipulationDOM["seperatorLineDiv"+e])}_createAddNodeButton(e){var r;const n=this._createButton("addNode","vis-add",e.addNode||this.options.locales.en.addNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,je(r=this.addNodeMode).call(r,this))}_createAddEdgeButton(e){var r;const n=this._createButton("addEdge","vis-connect",e.addEdge||this.options.locales.en.addEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,je(r=this.addEdgeMode).call(r,this))}_createEditNodeButton(e){var r;const n=this._createButton("editNode","vis-edit",e.editNode||this.options.locales.en.editNode);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,je(r=this.editNode).call(r,this))}_createEditEdgeButton(e){var r;const n=this._createButton("editEdge","vis-edit",e.editEdge||this.options.locales.en.editEdge);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,je(r=this.editEdgeMode).call(r,this))}_createDeleteButton(e){var r;let n;this.options.rtl?n="vis-delete-rtl":n="vis-delete";const i=this._createButton("delete",n,e.del||this.options.locales.en.del);this.manipulationDiv.appendChild(i),this._bindElementEvents(i,je(r=this.deleteSelected).call(r,this))}_createBackButton(e){var r;const n=this._createButton("back","vis-back",e.back||this.options.locales.en.back);this.manipulationDiv.appendChild(n),this._bindElementEvents(n,je(r=this.showManipulatorToolbar).call(r,this))}_createButton(e,r,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"vis-label";return this.manipulationDOM[e+"Div"]=document.createElement("button"),this.manipulationDOM[e+"Div"].className="vis-button "+r,this.manipulationDOM[e+"Label"]=document.createElement("div"),this.manipulationDOM[e+"Label"].className=i,this.manipulationDOM[e+"Label"].innerText=n,this.manipulationDOM[e+"Div"].appendChild(this.manipulationDOM[e+"Label"]),this.manipulationDOM[e+"Div"]}_createDescription(e){this.manipulationDOM.descriptionLabel=document.createElement("div"),this.manipulationDOM.descriptionLabel.className="vis-none",this.manipulationDOM.descriptionLabel.innerText=e,this.manipulationDiv.appendChild(this.manipulationDOM.descriptionLabel)}_temporaryBindEvent(e,r){this.temporaryEventFunctions.push({event:e,boundFunction:r}),this.body.emitter.on(e,r)}_temporaryBindUI(e,r){if(this.body.eventListeners[e]!==void 0)this.temporaryUIFunctions[e]=this.body.eventListeners[e],this.body.eventListeners[e]=r;else throw new Error("This UI function does not exist. Typo? You tried: "+e+" possible are: "+Cf(Or(this.body.eventListeners)))}_unbindTemporaryUIs(){for(const e in this.temporaryUIFunctions)Object.prototype.hasOwnProperty.call(this.temporaryUIFunctions,e)&&(this.body.eventListeners[e]=this.temporaryUIFunctions[e],delete this.temporaryUIFunctions[e]);this.temporaryUIFunctions={}}_unbindTemporaryEvents(){for(let e=0;e<this.temporaryEventFunctions.length;e++){const r=this.temporaryEventFunctions[e].event,n=this.temporaryEventFunctions[e].boundFunction;this.body.emitter.off(r,n)}this.temporaryEventFunctions=[]}_bindElementEvents(e,r){const n=new Fl(e,{});cp(n,r),this._domEventListenerCleanupQueue.push(()=>{n.destroy()});const i=o=>{let{keyCode:a,key:s}=o;(s==="Enter"||s===" "||a===13||a===32)&&r()};e.addEventListener("keyup",i,!1),this._domEventListenerCleanupQueue.push(()=>{e.removeEventListener("keyup",i,!1)})}_cleanupTemporaryNodesAndEdges(){for(let o=0;o<this.temporaryIds.edges.length;o++){var e;this.body.edges[this.temporaryIds.edges[o]].disconnect(),delete this.body.edges[this.temporaryIds.edges[o]];const a=Gt(e=this.body.edgeIndices).call(e,this.temporaryIds.edges[o]);if(a!==-1){var r;Ho(r=this.body.edgeIndices).call(r,a,1)}}for(let o=0;o<this.temporaryIds.nodes.length;o++){var n;delete this.body.nodes[this.temporaryIds.nodes[o]];const a=Gt(n=this.body.nodeIndices).call(n,this.temporaryIds.nodes[o]);if(a!==-1){var i;Ho(i=this.body.nodeIndices).call(i,a,1)}}this.temporaryIds={nodes:[],edges:[]}}_controlNodeTouch(e){this.selectionHandler.unselectAll(),this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ur({},this.body.view.translation)}_controlNodeDragStart(){const e=this.lastTouch,r=this.selectionHandler._pointerToPositionObject(e),n=this.body.nodes[this.temporaryIds.nodes[0]],i=this.body.nodes[this.temporaryIds.nodes[1]],o=this.body.edges[this.edgeBeingEditedId];this.selectedControlNode=void 0;const a=n.isOverlappingWith(r),s=i.isOverlappingWith(r);a===!0?(this.selectedControlNode=n,o.edgeType.from=n):s===!0&&(this.selectedControlNode=i,o.edgeType.to=i),this.selectedControlNode!==void 0&&this.selectionHandler.selectObject(this.selectedControlNode),this.body.emitter.emit("_redraw")}_controlNodeDrag(e){this.body.emitter.emit("disablePhysics");const r=this.body.functions.getPointer(e.center),n=this.canvas.DOMtoCanvas(r);this.selectedControlNode!==void 0?(this.selectedControlNode.x=n.x,this.selectedControlNode.y=n.y):this.interactionHandler.onDrag(e),this.body.emitter.emit("_redraw")}_controlNodeDragEnd(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r),i=this.body.edges[this.edgeBeingEditedId];if(this.selectedControlNode===void 0)return;this.selectionHandler.unselectAll();const o=this.selectionHandler._getAllNodesOverlappingWith(n);let a;for(let s=o.length-1;s>=0;s--)if(o[s]!==this.selectedControlNode.id){a=this.body.nodes[o[s]];break}if(a!==void 0&&this.selectedControlNode!==void 0)if(a.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const s=this.body.nodes[this.temporaryIds.nodes[0]];this.selectedControlNode.id===s.id?this._performEditEdge(a.id,i.to.id):this._performEditEdge(i.from.id,a.id)}else i.updateEdgeType(),this.body.emitter.emit("restorePhysics");this.body.emitter.emit("_redraw")}_handleConnect(e){if(new Date().valueOf()-this.touchTime>100){this.lastTouch=this.body.functions.getPointer(e.center),this.lastTouch.translation=Ur({},this.body.view.translation),this.interactionHandler.drag.pointer=this.lastTouch,this.interactionHandler.drag.translation=this.lastTouch.translation;const r=this.lastTouch,n=this.selectionHandler.getNodeAt(r);if(n!==void 0)if(n.isCluster===!0)alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError);else{const i=this._getNewTargetNode(n.x,n.y);this.body.nodes[i.id]=i,this.body.nodeIndices.push(i.id);const o=this.body.functions.createEdge({id:"connectionEdge"+Mu(),from:n.id,to:i.id,physics:!1,smooth:{enabled:!0,type:"continuous",roundness:.5}});this.body.edges[o.id]=o,this.body.edgeIndices.push(o.id),this.temporaryIds.nodes.push(i.id),this.temporaryIds.edges.push(o.id)}this.touchTime=new Date().valueOf()}}_dragControlNode(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(n);let a;for(let l=o.length-1;l>=0;l--){var s;if(Gt(s=this.temporaryIds.nodes).call(s,o[l])===-1){a=this.body.nodes[o[l]];break}}if(e.controlEdge={from:i,to:a?a.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragging",e,r),this.temporaryIds.nodes[0]!==void 0){const l=this.body.nodes[this.temporaryIds.nodes[0]];l.x=this.canvas._XconvertDOMtoCanvas(r.x),l.y=this.canvas._YconvertDOMtoCanvas(r.y),this.body.emitter.emit("_redraw")}else this.interactionHandler.onDrag(e)}_finishConnect(e){const r=this.body.functions.getPointer(e.center),n=this.selectionHandler._pointerToPositionObject(r);let i;this.temporaryIds.edges[0]!==void 0&&(i=this.body.edges[this.temporaryIds.edges[0]].fromId);const o=this.selectionHandler._getAllNodesOverlappingWith(n);let a;for(let l=o.length-1;l>=0;l--){var s;if(Gt(s=this.temporaryIds.nodes).call(s,o[l])===-1){a=this.body.nodes[o[l]];break}}this._cleanupTemporaryNodesAndEdges(),a!==void 0&&(a.isCluster===!0?alert(this.options.locales[this.options.locale].createEdgeError||this.options.locales.en.createEdgeError):this.body.nodes[i]!==void 0&&this.body.nodes[a.id]!==void 0&&this._performAddEdge(i,a.id)),e.controlEdge={from:i,to:a?a.id:void 0},this.selectionHandler.generateClickEvent("controlNodeDragEnd",e,r),this.body.emitter.emit("_redraw")}_dragStartEdge(e){const r=this.lastTouch;this.selectionHandler.generateClickEvent("dragStart",e,r,void 0,!0)}_performAddNode(e){const r={id:Mu(),x:e.pointer.canvas.x,y:e.pointer.canvas.y,label:"new"};if(typeof this.options.addNode=="function")if(this.options.addNode.length===2)this.options.addNode(r,n=>{n!=null&&this.inMode==="addNode"&&this.body.data.nodes.getDataSet().add(n),this.showManipulatorToolbar()});else throw this.showManipulatorToolbar(),new Error("The function for add does not support two arguments (data,callback)");else this.body.data.nodes.getDataSet().add(r),this.showManipulatorToolbar()}_performAddEdge(e,r){const n={from:e,to:r};if(typeof this.options.addEdge=="function")if(this.options.addEdge.length===2)this.options.addEdge(n,i=>{i!=null&&this.inMode==="addEdge"&&(this.body.data.edges.getDataSet().add(i),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for connect does not support two arguments (data,callback)");else this.body.data.edges.getDataSet().add(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}_performEditEdge(e,r){const n={id:this.edgeBeingEditedId,from:e,to:r,label:this.body.data.edges.get(this.edgeBeingEditedId).label};let i=this.options.editEdge;if(typeof i=="object"&&(i=i.editWithoutDrag),typeof i=="function")if(i.length===2)i(n,o=>{o==null||this.inMode!=="editEdge"?(this.body.edges[n.id].updateEdgeType(),this.body.emitter.emit("_redraw"),this.showManipulatorToolbar()):(this.body.data.edges.getDataSet().update(o),this.selectionHandler.unselectAll(),this.showManipulatorToolbar())});else throw new Error("The function for edit does not support two arguments (data, callback)");else this.body.data.edges.getDataSet().update(n),this.selectionHandler.unselectAll(),this.showManipulatorToolbar()}}const ke="string",Ae="boolean",Se="number",mu="array",dt="object",o3="dom",X3e="any",Jb=["arrow","bar","box","circle","crow","curve","diamond","image","inv_curve","inv_triangle","triangle","vee"],Zb={borderWidth:{number:Se},borderWidthSelected:{number:Se,undefined:"undefined"},brokenImage:{string:ke,undefined:"undefined"},chosen:{label:{boolean:Ae,function:"function"},node:{boolean:Ae,function:"function"},__type__:{object:dt,boolean:Ae}},color:{border:{string:ke},background:{string:ke},highlight:{border:{string:ke},background:{string:ke},__type__:{object:dt,string:ke}},hover:{border:{string:ke},background:{string:ke},__type__:{object:dt,string:ke}},__type__:{object:dt,string:ke}},opacity:{number:Se,undefined:"undefined"},fixed:{x:{boolean:Ae},y:{boolean:Ae},__type__:{object:dt,boolean:Ae}},font:{align:{string:ke},color:{string:ke},size:{number:Se},face:{string:ke},background:{string:ke},strokeWidth:{number:Se},strokeColor:{string:ke},vadjust:{number:Se},multi:{boolean:Ae,string:ke},bold:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},boldital:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},ital:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},mono:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},__type__:{object:dt,string:ke}},group:{string:ke,number:Se,undefined:"undefined"},heightConstraint:{minimum:{number:Se},valign:{string:ke},__type__:{object:dt,boolean:Ae,number:Se}},hidden:{boolean:Ae},icon:{face:{string:ke},code:{string:ke},size:{number:Se},color:{string:ke},weight:{string:ke,number:Se},__type__:{object:dt}},id:{string:ke,number:Se},image:{selected:{string:ke,undefined:"undefined"},unselected:{string:ke,undefined:"undefined"},__type__:{object:dt,string:ke}},imagePadding:{top:{number:Se},right:{number:Se},bottom:{number:Se},left:{number:Se},__type__:{object:dt,number:Se}},label:{string:ke,undefined:"undefined"},labelHighlightBold:{boolean:Ae},level:{number:Se,undefined:"undefined"},margin:{top:{number:Se},right:{number:Se},bottom:{number:Se},left:{number:Se},__type__:{object:dt,number:Se}},mass:{number:Se},physics:{boolean:Ae},scaling:{min:{number:Se},max:{number:Se},label:{enabled:{boolean:Ae},min:{number:Se},max:{number:Se},maxVisible:{number:Se},drawThreshold:{number:Se},__type__:{object:dt,boolean:Ae}},customScalingFunction:{function:"function"},__type__:{object:dt}},shadow:{enabled:{boolean:Ae},color:{string:ke},size:{number:Se},x:{number:Se},y:{number:Se},__type__:{object:dt,boolean:Ae}},shape:{string:["custom","ellipse","circle","database","box","text","image","circularImage","diamond","dot","star","triangle","triangleDown","square","icon","hexagon"]},ctxRenderer:{function:"function"},shapeProperties:{borderDashes:{boolean:Ae,array:mu},borderRadius:{number:Se},interpolation:{boolean:Ae},useImageSize:{boolean:Ae},useBorderWithImage:{boolean:Ae},coordinateOrigin:{string:["center","top-left"]},__type__:{object:dt}},size:{number:Se},title:{string:ke,dom:o3,undefined:"undefined"},value:{number:Se,undefined:"undefined"},widthConstraint:{minimum:{number:Se},maximum:{number:Se},__type__:{object:dt,boolean:Ae,number:Se}},x:{number:Se},y:{number:Se},__type__:{object:dt}},Y3e={configure:{enabled:{boolean:Ae},filter:{boolean:Ae,string:ke,array:mu,function:"function"},container:{dom:o3},showButton:{boolean:Ae},__type__:{object:dt,boolean:Ae,string:ke,array:mu,function:"function"}},edges:{arrows:{to:{enabled:{boolean:Ae},scaleFactor:{number:Se},type:{string:Jb},imageHeight:{number:Se},imageWidth:{number:Se},src:{string:ke},__type__:{object:dt,boolean:Ae}},middle:{enabled:{boolean:Ae},scaleFactor:{number:Se},type:{string:Jb},imageWidth:{number:Se},imageHeight:{number:Se},src:{string:ke},__type__:{object:dt,boolean:Ae}},from:{enabled:{boolean:Ae},scaleFactor:{number:Se},type:{string:Jb},imageWidth:{number:Se},imageHeight:{number:Se},src:{string:ke},__type__:{object:dt,boolean:Ae}},__type__:{string:["from","to","middle"],object:dt}},endPointOffset:{from:{number:Se},to:{number:Se},__type__:{object:dt,number:Se}},arrowStrikethrough:{boolean:Ae},background:{enabled:{boolean:Ae},color:{string:ke},size:{number:Se},dashes:{boolean:Ae,array:mu},__type__:{object:dt,boolean:Ae}},chosen:{label:{boolean:Ae,function:"function"},edge:{boolean:Ae,function:"function"},__type__:{object:dt,boolean:Ae}},color:{color:{string:ke},highlight:{string:ke},hover:{string:ke},inherit:{string:["from","to","both"],boolean:Ae},opacity:{number:Se},__type__:{object:dt,string:ke}},dashes:{boolean:Ae,array:mu},font:{color:{string:ke},size:{number:Se},face:{string:ke},background:{string:ke},strokeWidth:{number:Se},strokeColor:{string:ke},align:{string:["horizontal","top","middle","bottom"]},vadjust:{number:Se},multi:{boolean:Ae,string:ke},bold:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},boldital:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},ital:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},mono:{color:{string:ke},size:{number:Se},face:{string:ke},mod:{string:ke},vadjust:{number:Se},__type__:{object:dt,string:ke}},__type__:{object:dt,string:ke}},hidden:{boolean:Ae},hoverWidth:{function:"function",number:Se},label:{string:ke,undefined:"undefined"},labelHighlightBold:{boolean:Ae},length:{number:Se,undefined:"undefined"},physics:{boolean:Ae},scaling:{min:{number:Se},max:{number:Se},label:{enabled:{boolean:Ae},min:{number:Se},max:{number:Se},maxVisible:{number:Se},drawThreshold:{number:Se},__type__:{object:dt,boolean:Ae}},customScalingFunction:{function:"function"},__type__:{object:dt}},selectionWidth:{function:"function",number:Se},selfReferenceSize:{number:Se},selfReference:{size:{number:Se},angle:{number:Se},renderBehindTheNode:{boolean:Ae},__type__:{object:dt}},shadow:{enabled:{boolean:Ae},color:{string:ke},size:{number:Se},x:{number:Se},y:{number:Se},__type__:{object:dt,boolean:Ae}},smooth:{enabled:{boolean:Ae},type:{string:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"]},roundness:{number:Se},forceDirection:{string:["horizontal","vertical","none"],boolean:Ae},__type__:{object:dt,boolean:Ae}},title:{string:ke,undefined:"undefined"},width:{number:Se},widthConstraint:{maximum:{number:Se},__type__:{object:dt,boolean:Ae,number:Se}},value:{number:Se,undefined:"undefined"},__type__:{object:dt}},groups:{useDefaultGroups:{boolean:Ae},__any__:Zb,__type__:{object:dt}},interaction:{dragNodes:{boolean:Ae},dragView:{boolean:Ae},hideEdgesOnDrag:{boolean:Ae},hideEdgesOnZoom:{boolean:Ae},hideNodesOnDrag:{boolean:Ae},hover:{boolean:Ae},keyboard:{enabled:{boolean:Ae},speed:{x:{number:Se},y:{number:Se},zoom:{number:Se},__type__:{object:dt}},bindToWindow:{boolean:Ae},autoFocus:{boolean:Ae},__type__:{object:dt,boolean:Ae}},multiselect:{boolean:Ae},navigationButtons:{boolean:Ae},selectable:{boolean:Ae},selectConnectedEdges:{boolean:Ae},hoverConnectedEdges:{boolean:Ae},tooltipDelay:{number:Se},zoomView:{boolean:Ae},zoomSpeed:{number:Se},__type__:{object:dt}},layout:{randomSeed:{undefined:"undefined",number:Se,string:ke},improvedLayout:{boolean:Ae},clusterThreshold:{number:Se},hierarchical:{enabled:{boolean:Ae},levelSeparation:{number:Se},nodeSpacing:{number:Se},treeSpacing:{number:Se},blockShifting:{boolean:Ae},edgeMinimization:{boolean:Ae},parentCentralization:{boolean:Ae},direction:{string:["UD","DU","LR","RL"]},sortMethod:{string:["hubsize","directed"]},shakeTowards:{string:["leaves","roots"]},__type__:{object:dt,boolean:Ae}},__type__:{object:dt}},manipulation:{enabled:{boolean:Ae},initiallyActive:{boolean:Ae},addNode:{boolean:Ae,function:"function"},addEdge:{boolean:Ae,function:"function"},editNode:{function:"function"},editEdge:{editWithoutDrag:{function:"function"},__type__:{object:dt,boolean:Ae,function:"function"}},deleteNode:{boolean:Ae,function:"function"},deleteEdge:{boolean:Ae,function:"function"},controlNodeStyle:Zb,__type__:{object:dt,boolean:Ae}},nodes:Zb,physics:{enabled:{boolean:Ae},barnesHut:{theta:{number:Se},gravitationalConstant:{number:Se},centralGravity:{number:Se},springLength:{number:Se},springConstant:{number:Se},damping:{number:Se},avoidOverlap:{number:Se},__type__:{object:dt}},forceAtlas2Based:{theta:{number:Se},gravitationalConstant:{number:Se},centralGravity:{number:Se},springLength:{number:Se},springConstant:{number:Se},damping:{number:Se},avoidOverlap:{number:Se},__type__:{object:dt}},repulsion:{centralGravity:{number:Se},springLength:{number:Se},springConstant:{number:Se},nodeDistance:{number:Se},damping:{number:Se},__type__:{object:dt}},hierarchicalRepulsion:{centralGravity:{number:Se},springLength:{number:Se},springConstant:{number:Se},nodeDistance:{number:Se},damping:{number:Se},avoidOverlap:{number:Se},__type__:{object:dt}},maxVelocity:{number:Se},minVelocity:{number:Se},solver:{string:["barnesHut","repulsion","hierarchicalRepulsion","forceAtlas2Based"]},stabilization:{enabled:{boolean:Ae},iterations:{number:Se},updateInterval:{number:Se},onlyDynamicEdges:{boolean:Ae},fit:{boolean:Ae},__type__:{object:dt,boolean:Ae}},timestep:{number:Se},adaptiveTimestep:{boolean:Ae},wind:{x:{number:Se},y:{number:Se},__type__:{object:dt}},__type__:{object:dt,boolean:Ae}},autoResize:{boolean:Ae},clickToUse:{boolean:Ae},locale:{string:ke},locales:{__any__:{any:X3e},__type__:{object:dt}},height:{string:ke},width:{string:ke},__type__:{object:dt}},a3={nodes:{borderWidth:[1,0,10,1],borderWidthSelected:[2,0,10,1],color:{border:["color","#2B7CE9"],background:["color","#97C2FC"],highlight:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]},hover:{border:["color","#2B7CE9"],background:["color","#D2E5FF"]}},opacity:[0,0,1,.1],fixed:{x:!1,y:!1},font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[0,0,50,1],strokeColor:["color","#ffffff"]},hidden:!1,labelHighlightBold:!0,physics:!0,scaling:{min:[10,0,200,1],max:[30,0,200,1],label:{enabled:!1,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},shape:["ellipse","box","circle","database","diamond","dot","square","star","text","triangle","triangleDown","hexagon"],shapeProperties:{borderDashes:!1,borderRadius:[6,0,20,1],interpolation:!0,useImageSize:!1},size:[25,0,200,1]},edges:{arrows:{to:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},middle:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"},from:{enabled:!1,scaleFactor:[1,0,3,.05],type:"arrow"}},endPointOffset:{from:[0,-10,10,1],to:[0,-10,10,1]},arrowStrikethrough:!0,color:{color:["color","#848484"],highlight:["color","#848484"],hover:["color","#848484"],inherit:["from","to","both",!0,!1],opacity:[1,0,1,.05]},dashes:!1,font:{color:["color","#343434"],size:[14,0,100,1],face:["arial","verdana","tahoma"],background:["color","none"],strokeWidth:[2,0,50,1],strokeColor:["color","#ffffff"],align:["horizontal","top","middle","bottom"]},hidden:!1,hoverWidth:[1.5,0,5,.1],labelHighlightBold:!0,physics:!0,scaling:{min:[1,0,100,1],max:[15,0,100,1],label:{enabled:!0,min:[14,0,200,1],max:[30,0,200,1],maxVisible:[30,0,200,1],drawThreshold:[5,0,20,1]}},selectionWidth:[1.5,0,5,.1],selfReferenceSize:[20,0,200,1],selfReference:{size:[20,0,200,1],angle:[Math.PI/2,-6*Math.PI,6*Math.PI,Math.PI/8],renderBehindTheNode:!0},shadow:{enabled:!1,color:"rgba(0,0,0,0.5)",size:[10,0,20,1],x:[5,-30,30,1],y:[5,-30,30,1]},smooth:{enabled:!0,type:["dynamic","continuous","discrete","diagonalCross","straightCross","horizontal","vertical","curvedCW","curvedCCW","cubicBezier"],forceDirection:["horizontal","vertical","none"],roundness:[.5,0,1,.05]},width:[1,0,30,1]},layout:{hierarchical:{enabled:!1,levelSeparation:[150,20,500,5],nodeSpacing:[100,20,500,5],treeSpacing:[200,20,500,5],blockShifting:!0,edgeMinimization:!0,parentCentralization:!0,direction:["UD","DU","LR","RL"],sortMethod:["hubsize","directed"],shakeTowards:["leaves","roots"]}},interaction:{dragNodes:!0,dragView:!0,hideEdgesOnDrag:!1,hideEdgesOnZoom:!1,hideNodesOnDrag:!1,hover:!1,keyboard:{enabled:!1,speed:{x:[10,0,40,1],y:[10,0,40,1],zoom:[.02,0,.1,.005]},bindToWindow:!0,autoFocus:!0},multiselect:!1,navigationButtons:!1,selectable:!0,selectConnectedEdges:!0,hoverConnectedEdges:!0,tooltipDelay:[300,0,1e3,25],zoomView:!0,zoomSpeed:[1,.1,2,.1]},manipulation:{enabled:!1,initiallyActive:!1},physics:{enabled:!0,barnesHut:{theta:[.5,.1,1,.05],gravitationalConstant:[-2e3,-3e4,0,50],centralGravity:[.3,0,10,.05],springLength:[95,0,500,5],springConstant:[.04,0,1.2,.005],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},forceAtlas2Based:{theta:[.5,.1,1,.05],gravitationalConstant:[-50,-500,0,1],centralGravity:[.01,0,1,.005],springLength:[95,0,500,5],springConstant:[.08,0,1.2,.005],damping:[.4,0,1,.01],avoidOverlap:[0,0,1,.01]},repulsion:{centralGravity:[.2,0,10,.05],springLength:[200,0,500,5],springConstant:[.05,0,1.2,.005],nodeDistance:[100,0,500,5],damping:[.09,0,1,.01]},hierarchicalRepulsion:{centralGravity:[.2,0,10,.05],springLength:[100,0,500,5],springConstant:[.01,0,1.2,.005],nodeDistance:[120,0,500,5],damping:[.09,0,1,.01],avoidOverlap:[0,0,1,.01]},maxVelocity:[50,0,150,1],minVelocity:[.1,.01,.5,.01],solver:["barnesHut","forceAtlas2Based","repulsion","hierarchicalRepulsion"],timestep:[.5,.01,1,.01],wind:{x:[0,-10,10,.1],y:[0,-10,10,.1]}}},J3e=(t,e,r)=>{var n;return!!(xa(t).call(t,"physics")&&xa(n=a3.physics.solver).call(n,e)&&r.physics.solver!==e&&e!=="wind")};class Z3e{constructor(){}getDistances(e,r,n){const i={},o=e.edges;for(let s=0;s<r.length;s++){const l=r[s],c={};i[l]=c;for(let u=0;u<r.length;u++)c[r[u]]=s==u?0:1e9}for(let s=0;s<n.length;s++){const l=o[n[s]];l.connected===!0&&i[l.fromId]!==void 0&&i[l.toId]!==void 0&&(i[l.fromId][l.toId]=1,i[l.toId][l.fromId]=1)}const a=r.length;for(let s=0;s<a;s++){const l=r[s],c=i[l];for(let u=0;u<a-1;u++){const f=r[u],h=i[f];for(let v=u+1;v<a;v++){const g=r[v],m=i[g],p=Math.min(h[g],h[l]+c[g]);h[g]=p,m[f]=p}}}return i}}class Q3e{constructor(e,r,n){this.body=e,this.springLength=r,this.springConstant=n,this.distanceSolver=new Z3e}setOptions(e){e&&(e.springLength&&(this.springLength=e.springLength),e.springConstant&&(this.springConstant=e.springConstant))}solve(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const i=this.distanceSolver.getDistances(this.body,e,r);this._createL_matrix(i),this._createK_matrix(i),this._createE_matrix();const o=.01,a=1;let s=0;const l=Math.max(1e3,Math.min(10*this.body.nodeIndices.length,6e3)),c=5;let u=1e9,f=0,h=0,v=0,g=0,m=0;for(;u>o&&s<l;)for(s+=1,[f,u,h,v]=this._getHighestEnergyNode(n),g=u,m=0;g>a&&m<c;)m+=1,this._moveNode(f,h,v),[g,h,v]=this._getEnergy(f)}_getHighestEnergyNode(e){const r=this.body.nodeIndices,n=this.body.nodes;let i=0,o=r[0],a=0,s=0;for(let l=0;l<r.length;l++){const c=r[l];if(n[c].predefinedPosition!==!0||n[c].isCluster===!0&&e===!0||n[c].options.fixed.x!==!0||n[c].options.fixed.y!==!0){const[u,f,h]=this._getEnergy(c);i<u&&(i=u,o=c,a=f,s=h)}}return[o,i,a,s]}_getEnergy(e){const[r,n]=this.E_sums[e];return[Math.sqrt(r**2+n**2),r,n]}_moveNode(e,r,n){const i=this.body.nodeIndices,o=this.body.nodes;let a=0,s=0,l=0;const c=o[e].x,u=o[e].y,f=this.K_matrix[e],h=this.L_matrix[e];for(let S=0;S<i.length;S++){const w=i[S];if(w!==e){const C=o[w].x,E=o[w].y,O=f[w],x=h[w],I=1/((c-C)**2+(u-E)**2)**1.5;a+=O*(1-x*(u-E)**2*I),s+=O*(x*(c-C)*(u-E)*I),l+=O*(1-x*(c-C)**2*I)}}const v=a,g=s,m=r,p=l,y=n,b=(m/v+y/g)/(g/v-p/g),$=-(g*b+m)/v;o[e].x+=$,o[e].y+=b,this._updateE_matrix(e)}_createL_matrix(e){const r=this.body.nodeIndices,n=this.springLength;this.L_matrix=[];for(let i=0;i<r.length;i++){this.L_matrix[r[i]]={};for(let o=0;o<r.length;o++)this.L_matrix[r[i]][r[o]]=n*e[r[i]][r[o]]}}_createK_matrix(e){const r=this.body.nodeIndices,n=this.springConstant;this.K_matrix=[];for(let i=0;i<r.length;i++){this.K_matrix[r[i]]={};for(let o=0;o<r.length;o++)this.K_matrix[r[i]][r[o]]=n*e[r[i]][r[o]]**-2}}_createE_matrix(){const e=this.body.nodeIndices,r=this.body.nodes;this.E_matrix={},this.E_sums={};for(let n=0;n<e.length;n++)this.E_matrix[e[n]]=[];for(let n=0;n<e.length;n++){const i=e[n],o=r[i].x,a=r[i].y;let s=0,l=0;for(let c=n;c<e.length;c++){const u=e[c];if(u!==i){const f=r[u].x,h=r[u].y,v=1/Math.sqrt((o-f)**2+(a-h)**2);this.E_matrix[i][c]=[this.K_matrix[i][u]*(o-f-this.L_matrix[i][u]*(o-f)*v),this.K_matrix[i][u]*(a-h-this.L_matrix[i][u]*(a-h)*v)],this.E_matrix[u][n]=this.E_matrix[i][c],s+=this.E_matrix[i][c][0],l+=this.E_matrix[i][c][1]}}this.E_sums[i]=[s,l]}}_updateE_matrix(e){const r=this.body.nodeIndices,n=this.body.nodes,i=this.E_matrix[e],o=this.K_matrix[e],a=this.L_matrix[e],s=n[e].x,l=n[e].y;let c=0,u=0;for(let f=0;f<r.length;f++){const h=r[f];if(h!==e){const v=i[f],g=v[0],m=v[1],p=n[h].x,y=n[h].y,b=1/Math.sqrt((s-p)**2+(l-y)**2),$=o[h]*(s-p-a[h]*(s-p)*b),S=o[h]*(l-y-a[h]*(l-y)*b);i[f]=[$,S],c+=$,u+=S;const w=this.E_sums[h];w[0]+=$-g,w[1]+=S-m}}this.E_sums[e]=[c,u]}}function ct(t,e,r){var n,i,o,a;if(!(this instanceof ct))throw new SyntaxError("Constructor must be called with the new operator");this.options={},this.defaultOptions={locale:"en",locales:_De,clickToUse:!1},Ur(this.options,this.defaultOptions),this.body={container:t,nodes:{},nodeIndices:[],edges:{},edgeIndices:[],emitter:{on:je(n=this.on).call(n,this),off:je(i=this.off).call(i,this),emit:je(o=this.emit).call(o,this),once:je(a=this.once).call(a,this)},eventListeners:{onTap:function(){},onTouch:function(){},onDoubleTap:function(){},onHold:function(){},onDragStart:function(){},onDrag:function(){},onDragEnd:function(){},onMouseWheel:function(){},onPinch:function(){},onMouseMove:function(){},onRelease:function(){},onContext:function(){}},data:{nodes:null,edges:null},functions:{createNode:function(){},createEdge:function(){},getPointer:function(){}},modules:{},view:{scale:1,translation:{x:0,y:0}},selectionBox:{show:!1,position:{start:{x:0,y:0},end:{x:0,y:0}}}},this.bindEventListeners(),this.images=new NDe(()=>this.body.emitter.emit("_requestRedraw")),this.groups=new Ije,this.canvas=new zLe(this.body),this.selectionHandler=new Ize(this.body,this.canvas),this.interactionHandler=new KLe(this.body,this.canvas,this.selectionHandler),this.view=new VLe(this.body,this.canvas),this.renderer=new jLe(this.body,this.canvas),this.physics=new TLe(this.body),this.layoutEngine=new q3e(this.body),this.clustering=new DLe(this.body),this.manipulation=new G3e(this.body,this.canvas,this.selectionHandler,this.interactionHandler),this.nodesHandler=new ZFe(this.body,this.images,this.groups,this.layoutEngine),this.edgesHandler=new SLe(this.body,this.images,this.groups),this.body.modules.kamadaKawai=new Q3e(this.body,150,.05),this.body.modules.clustering=this.clustering,this.canvas._create(),this.setOptions(r),this.setData(e)}EF(ct.prototype);ct.prototype.setOptions=function(t){if(t===null&&(t=void 0),t!==void 0){if(aDe.validate(t,Y3e)===!0&&console.error("%cErrors have been found in the supplied options object.",sz),Uc(["locale","locales","clickToUse"],this.options,t),t.locale!==void 0&&(t.locale=PDe(t.locales||this.options.locales,t.locale)),t=this.layoutEngine.setOptions(t.layout,t),this.canvas.setOptions(t),this.groups.setOptions(t.groups),this.nodesHandler.setOptions(t.nodes),this.edgesHandler.setOptions(t.edges),this.physics.setOptions(t.physics),this.manipulation.setOptions(t.manipulation,t,this.options),this.interactionHandler.setOptions(t.interaction),this.renderer.setOptions(t.interaction),this.selectionHandler.setOptions(t.interaction),t.groups!==void 0&&this.body.emitter.emit("refreshNodes"),"configure"in t&&(this.configurator||(this.configurator=new iDe(this,this.body.container,a3,this.canvas.pixelRatio,J3e)),this.configurator.setOptions(t.configure)),this.configurator&&this.configurator.options.enabled===!0){const n={nodes:{},edges:{},layout:{},interaction:{},manipulation:{},physics:{},global:{}};ur(n.nodes,this.nodesHandler.options),ur(n.edges,this.edgesHandler.options),ur(n.layout,this.layoutEngine.options),ur(n.interaction,this.selectionHandler.options),ur(n.interaction,this.renderer.options),ur(n.interaction,this.interactionHandler.options),ur(n.manipulation,this.manipulation.options),ur(n.physics,this.physics.options),ur(n.global,this.canvas.options),ur(n.global,this.options),this.configurator.setModuleOptions(n)}t.clickToUse!==void 0?t.clickToUse===!0?this.activator===void 0&&(this.activator=new nDe(this.canvas.frame),this.activator.on("change",()=>{this.body.emitter.emit("activate")})):(this.activator!==void 0&&(this.activator.destroy(),delete this.activator),this.body.emitter.emit("activate")):this.body.emitter.emit("activate"),this.canvas.setSize(),this.body.emitter.emit("startSimulation")}};ct.prototype._updateVisibleIndices=function(){const t=this.body.nodes,e=this.body.edges;this.body.nodeIndices=[],this.body.edgeIndices=[];for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&!this.clustering._isClusteredNode(r)&&t[r].options.hidden===!1&&this.body.nodeIndices.push(t[r].id);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)){const n=e[r],i=t[n.fromId],o=t[n.toId],a=i!==void 0&&o!==void 0;!this.clustering._isClusteredEdge(r)&&n.options.hidden===!1&&a&&i.options.hidden===!1&&o.options.hidden===!1&&this.body.edgeIndices.push(n.id)}};ct.prototype.bindEventListeners=function(){this.body.emitter.on("_dataChanged",()=>{this.edgesHandler._updateState(),this.body.emitter.emit("_dataUpdated")}),this.body.emitter.on("_dataUpdated",()=>{this.clustering._updateState(),this._updateVisibleIndices(),this._updateValueRange(this.body.nodes),this._updateValueRange(this.body.edges),this.body.emitter.emit("startSimulation"),this.body.emitter.emit("_requestRedraw")})};ct.prototype.setData=function(t){if(this.body.emitter.emit("resetPhysics"),this.body.emitter.emit("_resetData"),this.selectionHandler.unselectAll(),t&&t.dot&&(t.nodes||t.edges))throw new SyntaxError('Data must contain either parameter "dot" or  parameter pair "nodes" and "edges", but not both.');if(this.setOptions(t&&t.options),t&&t.dot){console.warn("The dot property has been deprecated. Please use the static convertDot method to convert DOT into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertDot(dotString);");const e=gDe(t.dot);this.setData(e);return}else if(t&&t.gephi){console.warn("The gephi property has been deprecated. Please use the static convertGephi method to convert gephi into vis.network format and use the normal data format with nodes and edges. This converter is used like this: var data = vis.network.convertGephi(gephiJson);");const e=mDe(t.gephi);this.setData(e);return}else this.nodesHandler.setData(t&&t.nodes,!0),this.edgesHandler.setData(t&&t.edges,!0);this.body.emitter.emit("_dataChanged"),this.body.emitter.emit("_dataLoaded"),this.body.emitter.emit("initPhysics")};ct.prototype.destroy=function(){this.body.emitter.emit("destroy"),this.body.emitter.off(),this.off(),delete this.groups,delete this.canvas,delete this.selectionHandler,delete this.interactionHandler,delete this.view,delete this.renderer,delete this.physics,delete this.layoutEngine,delete this.clustering,delete this.manipulation,delete this.nodesHandler,delete this.edgesHandler,delete this.configurator,delete this.images;for(const t in this.body.nodes)Object.prototype.hasOwnProperty.call(this.body.nodes,t)&&delete this.body.nodes[t];for(const t in this.body.edges)Object.prototype.hasOwnProperty.call(this.body.edges,t)&&delete this.body.edges[t];ca(this.body.container)};ct.prototype._updateValueRange=function(t){let e,r,n,i=0;for(e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const o=t[e].getValue();o!==void 0&&(r=r===void 0?o:Math.min(o,r),n=n===void 0?o:Math.max(o,n),i+=o)}if(r!==void 0&&n!==void 0)for(e in t)Object.prototype.hasOwnProperty.call(t,e)&&t[e].setValueRange(r,n,i)};ct.prototype.isActive=function(){return!this.activator||this.activator.active};ct.prototype.setSize=function(){return this.canvas.setSize.apply(this.canvas,arguments)};ct.prototype.canvasToDOM=function(){return this.canvas.canvasToDOM.apply(this.canvas,arguments)};ct.prototype.DOMtoCanvas=function(){return this.canvas.DOMtoCanvas.apply(this.canvas,arguments)};ct.prototype.findNode=function(){return this.clustering.findNode.apply(this.clustering,arguments)};ct.prototype.isCluster=function(){return this.clustering.isCluster.apply(this.clustering,arguments)};ct.prototype.openCluster=function(){return this.clustering.openCluster.apply(this.clustering,arguments)};ct.prototype.cluster=function(){return this.clustering.cluster.apply(this.clustering,arguments)};ct.prototype.getNodesInCluster=function(){return this.clustering.getNodesInCluster.apply(this.clustering,arguments)};ct.prototype.clusterByConnection=function(){return this.clustering.clusterByConnection.apply(this.clustering,arguments)};ct.prototype.clusterByHubsize=function(){return this.clustering.clusterByHubsize.apply(this.clustering,arguments)};ct.prototype.updateClusteredNode=function(){return this.clustering.updateClusteredNode.apply(this.clustering,arguments)};ct.prototype.getClusteredEdges=function(){return this.clustering.getClusteredEdges.apply(this.clustering,arguments)};ct.prototype.getBaseEdge=function(){return this.clustering.getBaseEdge.apply(this.clustering,arguments)};ct.prototype.getBaseEdges=function(){return this.clustering.getBaseEdges.apply(this.clustering,arguments)};ct.prototype.updateEdge=function(){return this.clustering.updateEdge.apply(this.clustering,arguments)};ct.prototype.clusterOutliers=function(){return this.clustering.clusterOutliers.apply(this.clustering,arguments)};ct.prototype.getSeed=function(){return this.layoutEngine.getSeed.apply(this.layoutEngine,arguments)};ct.prototype.enableEditMode=function(){return this.manipulation.enableEditMode.apply(this.manipulation,arguments)};ct.prototype.disableEditMode=function(){return this.manipulation.disableEditMode.apply(this.manipulation,arguments)};ct.prototype.addNodeMode=function(){return this.manipulation.addNodeMode.apply(this.manipulation,arguments)};ct.prototype.editNode=function(){return this.manipulation.editNode.apply(this.manipulation,arguments)};ct.prototype.editNodeMode=function(){return console.warn("Deprecated: Please use editNode instead of editNodeMode."),this.manipulation.editNode.apply(this.manipulation,arguments)};ct.prototype.addEdgeMode=function(){return this.manipulation.addEdgeMode.apply(this.manipulation,arguments)};ct.prototype.editEdgeMode=function(){return this.manipulation.editEdgeMode.apply(this.manipulation,arguments)};ct.prototype.deleteSelected=function(){return this.manipulation.deleteSelected.apply(this.manipulation,arguments)};ct.prototype.getPositions=function(){return this.nodesHandler.getPositions.apply(this.nodesHandler,arguments)};ct.prototype.getPosition=function(){return this.nodesHandler.getPosition.apply(this.nodesHandler,arguments)};ct.prototype.storePositions=function(){return this.nodesHandler.storePositions.apply(this.nodesHandler,arguments)};ct.prototype.moveNode=function(){return this.nodesHandler.moveNode.apply(this.nodesHandler,arguments)};ct.prototype.getBoundingBox=function(){return this.nodesHandler.getBoundingBox.apply(this.nodesHandler,arguments)};ct.prototype.getConnectedNodes=function(t){return this.body.nodes[t]!==void 0?this.nodesHandler.getConnectedNodes.apply(this.nodesHandler,arguments):this.edgesHandler.getConnectedNodes.apply(this.edgesHandler,arguments)};ct.prototype.getConnectedEdges=function(){return this.nodesHandler.getConnectedEdges.apply(this.nodesHandler,arguments)};ct.prototype.startSimulation=function(){return this.physics.startSimulation.apply(this.physics,arguments)};ct.prototype.stopSimulation=function(){return this.physics.stopSimulation.apply(this.physics,arguments)};ct.prototype.stabilize=function(){return this.physics.stabilize.apply(this.physics,arguments)};ct.prototype.getSelection=function(){return this.selectionHandler.getSelection.apply(this.selectionHandler,arguments)};ct.prototype.setSelection=function(){return this.selectionHandler.setSelection.apply(this.selectionHandler,arguments)};ct.prototype.getSelectedNodes=function(){return this.selectionHandler.getSelectedNodeIds.apply(this.selectionHandler,arguments)};ct.prototype.getSelectedEdges=function(){return this.selectionHandler.getSelectedEdgeIds.apply(this.selectionHandler,arguments)};ct.prototype.getNodeAt=function(){const t=this.selectionHandler.getNodeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};ct.prototype.getEdgeAt=function(){const t=this.selectionHandler.getEdgeAt.apply(this.selectionHandler,arguments);return t!==void 0&&t.id!==void 0?t.id:t};ct.prototype.selectNodes=function(){return this.selectionHandler.selectNodes.apply(this.selectionHandler,arguments)};ct.prototype.selectEdges=function(){return this.selectionHandler.selectEdges.apply(this.selectionHandler,arguments)};ct.prototype.unselectAll=function(){this.selectionHandler.unselectAll.apply(this.selectionHandler,arguments),this.selectionHandler.commitWithoutEmitting.apply(this.selectionHandler),this.redraw()};ct.prototype.redraw=function(){return this.renderer.redraw.apply(this.renderer,arguments)};ct.prototype.getScale=function(){return this.view.getScale.apply(this.view,arguments)};ct.prototype.getViewPosition=function(){return this.view.getViewPosition.apply(this.view,arguments)};ct.prototype.fit=function(){return this.view.fit.apply(this.view,arguments)};ct.prototype.moveTo=function(){return this.view.moveTo.apply(this.view,arguments)};ct.prototype.focus=function(){return this.view.focus.apply(this.view,arguments)};ct.prototype.releaseNode=function(){return this.view.releaseNode.apply(this.view,arguments)};ct.prototype.getOptionsFromConfigurator=function(){let t={};return this.configurator&&(t=this.configurator.getOptions.apply(this.configurator)),t};function e5e({content:t,name:e="Assistant",avatar:r,onAddMessage:n}){const{state:i,dispatch:o}=EZ(),{selectedNode:a,installedNodes:s}=i,l=JSON.parse(t),[c,u]=d.useState(null),f=d.useRef(null),h=l.ext?.find(y=>y.type==="downstream_subgraph_search")?.data||[],v=y=>{const b=y.json.nodes.map(S=>({id:S.id,label:S.type,color:{background:"#2B7CE9",border:"#1B5BB1"},font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},margin:12,padding:10,shape:"box",widthConstraint:{minimum:100,maximum:200}})),$=y.json.links.map(S=>({from:S.origin_id,to:S.target_id,arrows:{to:{enabled:!0,scaleFactor:1.2}},color:"#000000",width:2}));return{nodes:b,edges:$}};d.useEffect(()=>()=>{f.current&&(f.current.destroy(),f.current=null)},[]);const g=d.useCallback((y,b)=>{f.current&&f.current.destroy();const $=v(b),S=new ct(y,$,{nodes:{shape:"box",margin:12,padding:10,font:{size:16,color:"#FFFFFF",face:"arial",bold:!0},borderWidth:2,shadow:{enabled:!0,color:"rgba(0,0,0,0.2)",size:5}},edges:{arrows:"to",color:"#000000",width:2,smooth:{enabled:!0,type:"straightCross"}},physics:{enabled:!0,solver:"hierarchicalRepulsion",hierarchicalRepulsion:{nodeDistance:200,springLength:200}},layout:{hierarchical:{enabled:!0,direction:"UD",sortMethod:"directed",nodeSpacing:200,levelSeparation:150}},interaction:{dragNodes:!1,zoomView:!1,dragView:!1}});f.current=S},[]),m=async y=>{console.log("[DownstreamSubgraphs] Starting checkAndLoadSubgraph with node:",y),yo.trackEvent({event_type:"subgraph_accept",message_type:"subgraph",message_id:l.message_id,data:{subgraph_name:y.name,subgraph_tags:y.tags}});const b=y.json.nodes,$=Object.values(fr.canvas.selected_nodes)[0];if(!$){console.warn("[DownstreamSubgraphs] No node selected"),alert("Please select a upstream node first before adding a subgraph.");return}const S=b.map(E=>E.type),w=s;console.log("[DownstreamSubgraphs] Required node types:",S),console.log("[DownstreamSubgraphs] Installed node types:",w);const C=S.filter(E=>!w.includes(E));if(console.log("[DownstreamSubgraphs] Missing node types:",C),C.length>0)try{console.log("[DownstreamSubgraphs] Fetching info for missing nodes");const E=await yo.batchGetNodeInfo(C);console.log("[DownstreamSubgraphs] Received node infos:",E);const O={text:"",ext:[{type:"node_install_guide",data:E.map(I=>({name:I.name,repository_url:I.github_url}))}]};console.log("[DownstreamSubgraphs] Created message content:",O);const x={id:Gn(),role:"ai",content:JSON.stringify(O),format:"markdown",name:"Assistant",metadata:{pendingSubgraph:y}};console.log("[DownstreamSubgraphs] Created AI message:",x),n?.(x);return}catch(E){console.error("[DownstreamSubgraphs] Error fetching node info:",E),alert("Error checking required nodes. Please try again.");return}console.log("[DownstreamSubgraphs] All required nodes are installed, proceeding to load subgraph"),p(y,$)},p=(y,b)=>{const $=y.json.nodes,S=y.json.links,w=$.find(O=>O.id===0),C=w?.id;console.log("[DownstreamSubgraphs] Entry node ID:",C);const E={};C!==null&&(E[C]=b),fr.canvas.emitBeforeChange();try{for(const O of $)if(O.id!==C){const x=w?.pos,I=[b._pos[0],b._pos[1]],T=[O.pos[0]+I[0]-x[0],O.pos[1]+I[1]-x[1]];E[O.id]=Fw(O.type,{pos:T})}for(const O of S){const x=E[O.origin_id],I=E[O.target_id];x&&I&&x.connect(O.origin_slot,I,O.target_slot)}}finally{fr.canvas.emitAfterChange()}};return d.useEffect(()=>{const y=()=>{const b=fr.canvas.selected_nodes;Object.keys(b??{}).length?o({type:"SET_SELECTED_NODE",payload:Object.values(b)}):o({type:"SET_SELECTED_NODE",payload:null})};return document.addEventListener("click",y),()=>{document.removeEventListener("click",y)}},[]),Ce.jsx("div",{className:"rounded-lg bg-gray-500 p-3 text-gray-700 text-xs break-words overflow-visible",children:h.length>0&&Ce.jsx("div",{className:"space-y-3",children:Ce.jsx("div",{className:"flex flex-wrap gap-2",children:h.map(y=>Ce.jsxs("div",{className:"relative group",children:[Ce.jsx("button",{className:`px-3 py-1.5 bg-blue-500 text-white rounded-md 
                                             hover:bg-blue-600 transition-colors text-xs`,onClick:()=>m(y),onMouseEnter:()=>u(y.name),onMouseLeave:()=>u(null),children:y.name}),Ce.jsxs("p",{className:"text-xs ml-3 text-white",children:["[",y.tags.join(", "),"]"]}),c===y.name&&Ce.jsx("div",{className:`fixed -translate-y-full 
                                                 z-[9999] w-[500px] p-4 bg-gray-800 text-white text-xs 
                                                 rounded-md shadow-lg mb-2 border border-gray-700`,style:{left:"calc(var(--mouse-x, 0) + 16px)",top:"calc(var(--mouse-y, 0) - 8px)"},children:Ce.jsx("div",{style:{width:"100%",height:"300px"},ref:b=>{b&&g(b,y)}})})]},y.name))})})})}const H5e=Object.freeze(Object.defineProperty({__proto__:null,DownstreamSubgraphs:e5e},Symbol.toStringTag,{value:"Module"}));function t5e({content:t,onLoadSubgraph:e}){const i=(JSON.parse(t).ext?.find(o=>o.type==="node_install_guide")?.data||[]).reduce((o,a)=>(o.some(s=>s.name===a.name)||o.push(a),o),[]);return Ce.jsxs("div",{children:[Ce.jsx("p",{children:"Before loading the graph to canvas, the following nodes need to be installed. Please visit the corresponding GitHub repositories to install them:"}),Ce.jsx("div",{className:"grid grid-cols-2 gap-3",children:i.map((o,a)=>Ce.jsx("div",{className:`w-full p-3 rounded-lg border border-gray-200 
                                 hover:shadow-sm transition-all duration-200`,children:Ce.jsxs("div",{className:"flex flex-col",children:[Ce.jsx("h3",{className:"text-[12px] font-medium text-gray-800 mb-4",children:o.name}),Ce.jsx("div",{className:"flex justify-end",children:o.repository_url?Ce.jsxs("a",{href:o.repository_url,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 text-gray-900 rounded-md 
                                                 border border-gray-900 hover:bg-gray-100 
                                                 transition-colors text-[10px] flex items-center gap-1`,children:[Ce.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download"]}):Ce.jsxs("a",{href:`https://www.google.com/search?q=${encodeURIComponent(o.name+" comfyui custom node")}`,target:"_blank",rel:"noopener noreferrer",className:`px-2 py-1 bg-gray-100 text-gray-500 rounded-md
                                                 border border-gray-300 text-[10px] flex items-center gap-1`,children:[Ce.jsx("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:Ce.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 21h7a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v11m0 5l4.879-4.879m0 0a3 3 0 104.243-4.242 3 3 0 00-4.243 4.242z"})}),"Search on Google"]})})]})},a))}),Ce.jsx("p",{className:"mt-4"}),Ce.jsx("p",{children:"After installation, please click the continue loading graph button to load the graph to the canvas:"}),Ce.jsx("div",{className:"mt-4",children:Ce.jsx("button",{className:`px-3 py-2 bg-blue-500 text-white rounded-md 
                             hover:bg-blue-600 transition-colors text-xs block mx-auto`,onClick:e,children:"Loading graph directly"})})]})}const V5e=Object.freeze(Object.defineProperty({__proto__:null,NodeInstallGuide:t5e},Symbol.toStringTag,{value:"Module"}));export{EQ as A,bs as B,a5e as C,Ju as D,Do as E,Fa as F,NQ as G,p5e as H,Nd as I,zm as J,_5e as K,P5e as L,m5e as M,N5e as N,H5e as O,y5e as P,V5e as Q,b5e as R,w5e as S,S5e as T,R5e as U,yo as W,C5e as X,fr as a,d5e as b,u5e as c,pA as d,f5e as e,l5e as f,s5e as g,Ba as h,SD as i,v5e as j,g5e as k,h5e as l,$5e as m,Gn as n,$A as o,CZ as p,Fw as q,O5e as r,I5e as s,E5e as t,EZ as u,c5e as v,i5e as w,T5e as x,CA as y,x5e as z};
